mirror of
https://github.com/welpo/tabi.git
synced 2026-03-10 01:57:20 +01:00
2801 lines
2.7 MiB
2801 lines
2.7 MiB
var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var w,T,k,S,E,_,A,R,N=Object.create,D=Object.defineProperty,I=Object.getOwnPropertyDescriptor,B=Object.getOwnPropertyNames,F=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,mt=(e,t)=>D(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||D(t,e,{get:()=>r[e],enumerable:!(n=I(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:D(r,"default",{value:e,enumerable:!0}),e)),j=e=>q(D({},"__esModule",{value:!0}),e),W=(x=(e,t)=>()=>t=e?e(e=0):t)(()=>{w=Object.freeze({left:0,top:0,width:16,height:16}),T=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),k=Object.freeze({...w,...T}),S=Object.freeze({...k,body:"",hidden:!1})}),Y=x(()=>{W(),E=Object.freeze({width:null,height:null}),_=Object.freeze({...E,...T})}),ee=x(()=>{A=mt((e,t,r,i="")=>{var n,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3<a.length)return null;i=a.shift().slice(1)}return 3<a.length||!a.length?null:1<a.length?(e=a.pop(),n=a.pop(),n={provider:0<a.length?a[0]:i,prefix:n,name:e},t&&!R(n)?null:n):1<(n=(e=a[0]).split("-")).length?(a={provider:i,prefix:n.shift(),name:n.join("-")},t&&!R(a)?null:a):r&&""===i&&(n={provider:i,prefix:"",name:e},!t||R(n,r))?n:null},"stringToIcon"),R=mt((e,t)=>!!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=x(()=>{mt(te,"mergeIconTransformations")});function ie(e,t){var r,i=te(e,t);for(r in S)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=x(()=>{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=x(()=>{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=x(()=>{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=x(()=>{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("</"+t);if(-1===n||-1===a)break;var s=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?"<defs>"+e+"</defs>"+t:t}function ye(e,t,r){return me((e=fe(e)).defs,t+e.content+r)}var ve=x(()=>{mt(fe,"splitSVGDefs"),mt(me,"mergeDefsAndContent"),mt(ye,"wrapSVGContent")});function be(e,t){let r={...k,...e},i={..._,...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,'<g transform="'+t.join(" ")+'">',"</g>"))}),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,we=x(()=>{W(),Y(),ge(),ve(),xe=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(be,"iconToSVG")});function Te(i,n=Ce){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+(Se++).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,Ce,Se,Ee=x(()=>{ke=/\sid="(\S+)"/g,Ce="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Se=0,mt(Te,"replaceIDs")});function _e(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'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Ae,Re,Le,Ne,M,De,Ie,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,wt,a,Tt,kt,Ct,r,St,Et,_t,i,At,Rt,Lt,Nt,Dt,It,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=x(()=>{mt(_e,"iconToHTML")}),mr=x(()=>{ee(),ce(),we(),Ee(),fr()}),yr=x(()=>{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]||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}),vr=(oqe=(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()<r.date()?-e(r,t):(i=12*(r.year()-t.year())+(r.month()-t.month()),a=r-(n=t.clone().add(i,m))<0,t=t.clone().add(i+(a?-1:1),m),+(-(i+(r-n)/(a?n-t:t-n))||0))},"t"),a:mt(function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},"a"),p:mt(function(e){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:n,Q:"quarter"}[e]||String(e||"").toLowerCase().replace(/s$/,"")},"p"),u:mt(function(e){return void 0===e},"u")},o="en",l={},a=(l[o]=e,"$isDayjsObject"),c=mt(function(e){return e instanceof T||!(!e||!e[a])},"S"),h=mt(function e(t,r,i){var n;if(!t)return o;if("string"==typeof t){var a=t.toLowerCase(),r=(l[a]&&(n=a),r&&(l[a]=r,n=a),t.split("-"));if(!n&&1<r.length)return e(r[0])}else a=t.name,l[a]=t,n=a;return!i&&n&&(o=n),n||!i&&o},"t"),x=mt(function(e,t){return c(e)?e.clone():((t="object"==typeof t?t:{}).date=e,t.args=arguments,new T(t))},"O"),w=r,T=(w.l=h,w.i=c,w.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},mt(C,"M"),(e=C.prototype).parse=function(a){this.$d=(()=>{var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(w.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 w},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)<this.startOf(t)},e.isBefore=function(e,t){return this.endOf(t)<x(e)},e.$g=function(e,t,r){return w.u(e)?this[t]:this.set(r,e)},e.unix=function(){return Math.floor(this.valueOf()/1e3)},e.valueOf=function(){return this.$d.getTime()},e.startOf=function(e,t){var r=this,i=!!w.u(t)||t,t=w.p(e),n=mt(function(e,t){return t=w.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r),i?t:t.endOf(g)},"l"),a=mt(function(e,t){return w.w(r.toDate()[e].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},"$"),s=this.$W,o=this.$M,l=this.$D,c="set"+(this.$u?"UTC":"");switch(t){case y:return i?n(1,0):n(31,11);case m:return i?n(1,o):n(0,o+1);case f:var h=(s<(h=this.$locale().weekStart||0)?s+7:s)-h;return n(i?l-h:l+(6-h),o);case g:case v:return a(c+"Hours",0);case p:return a(c+"Minutes",1);case d:return a(c+"Seconds",2);case u:return a(c+"Milliseconds",3);default:return this.clone()}},e.endOf=function(e){return this.startOf(e,!1)},e.$set=function(e,t){var e=w.p(e),r="set"+(this.$u?"UTC":""),r=((i={}).day=r+"Date",i.date=r+"Date",i[m]=r+"Month",i.year=r+"FullYear",i.hour=r+"Hours",i[d]=r+"Minutes",i[u]=r+"Seconds",i[n]=r+"Milliseconds",i[e]),i=e===g?this.$D+(t-this.$W):t;return e===m||e===y?((t=this.clone().set(v,1)).$d[r](i),t.init(),this.$d=t.set(v,Math.min(this.$D,t.daysInMonth())).$d):r&&this.$d[r](i),this.init(),this},e.set=function(e,t){return this.clone().$set(e,t)},e.get=function(e){return this[w.p(e)]()},e.add=function(r,e){var i=this,e=(r=Number(r),w.p(e)),t=mt(function(e){var t=x(i);return w.w(t.date(t.date()+Math.round(e*r)),i)},"y");return e===m?this.set(m,this.$M+r):e===y?this.set(y,this.$y+r):e===g?t(1):e===f?t(7):(t={minute:6e4,hour:36e5,second:1e3}[e]||1,e=this.$d.getTime()+r*t,w.w(e,this))},e.subtract=function(e,t){return this.add(-1*e,t)},e.format=function(e){var n,r,i,a,s,o,l,c,h,u,d=this,p=this.$locale();return this.isValid()?(n=e||"YYYY-MM-DDTHH:mm:ssZ",r=w.z(this),i=this.$H,a=this.$m,s=this.$M,o=p.weekdays,l=p.months,e=p.meridiem,c=mt(function(e,t,r,i){return e&&(e[t]||e(d,n))||r[t].slice(0,i)},"h"),h=mt(function(e){return w.s(i%12||12,e,"0")},"d"),u=e||function(e,t,r){return e=e<12?"AM":"PM",r?e.toLowerCase():e},n.replace(b,function(e,t){return t||(()=>{switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.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 w.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 w.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 w.s(a,2,"0");case"s":return String(d.$s);case"ss":return w.s(d.$s,2,"0");case"SSS":return w.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=w.p(t),a=x(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return w.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:w.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 w.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()},C),k=T.prototype;function C(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,T,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=x(()=>{Le=G(vr(),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")},De=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,Ie("FATAL"),"color: orange"):console.log.bind(console,"[35m",Ie("FATAL"))),t<=Ne.error&&(M.error=console.error?console.error.bind(console,Ie("ERROR"),"color: orange"):console.log.bind(console,"[31m",Ie("ERROR"))),t<=Ne.warn&&(M.warn=console.warn?console.warn.bind(console,Ie("WARN"),"color: orange"):console.log.bind(console,"[33m",Ie("WARN"))),t<=Ne.info&&(M.info=console.info?console.info.bind(console,Ie("INFO"),"color: lightblue"):console.log.bind(console,"[34m",Ie("INFO"))),t<=Ne.debug&&(M.debug=console.debug?console.debug.bind(console,Ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",Ie("DEBUG"))),t<=Ne.trace&&(M.trace=console.debug?console.debug.bind(console,Ie("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",Ie("TRACE")))},"setLogLevel"),Ie=mt(e=>`%c${(0,Le.default)().format("ss.SSS")} : ${e} : `,"format")}),br=x(()=>{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<e?Math.pow((.055+t)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:mt((e,t,r)=>(r<0&&(r+=1),1<r&&--r,r<.16666666666666666?e+6*(t-e)*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:mt(({h:e,s:t,l:r},i)=>{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<s?o/(2-n-a):o/(n+a));switch(n){case e:return 60*((t-r)/o+(t<r?6:0));case t:return 60*((r-e)/o+2);case r:return 60*((e-t)/o+4);default:return-1}},"rgb2hsl")},Oe=Me}),xr=x(()=>{Pe={clamp:mt((e,t,r)=>r<t?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:mt(e=>Math.round(1e10*e)/1e10,"round")},$e=Pe}),wr=x(()=>{Be={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},Fe=Be}),Tr=x(()=>{br(),xr(),wr(),ze={channel:Oe,lang:$e,unit:Fe}}),kr=x(()=>{Tr(),qe={};for(let e=0;e<=255;e++)qe[e]=ze.unit.dec2hex(e);Ue={ALL:0,RGB:1,HSL:2}}),Cr=x(()=>{kr(),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}),Sr=x(()=>{Tr(),Cr(),kr(),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}),Er=x(()=>{Sr(),Ve=new Ye({r:0,g:0,b:0,a:0},"transparent"),He=Ve}),_r=x(()=>{Er(),kr(),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<s)?8:4)*(3+(n=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(t>>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}),Ar=x(()=>{Tr(),Er(),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}),Rr=x(()=>{_r(),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}),Lr=x(()=>{Tr(),Er(),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}),Nr=x(()=>{_r(),Ar(),Rr(),Lr(),kr(),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}),Dr=x(()=>{Tr(),Nr(),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}),Ir=x(()=>{Tr(),Er(),Nr(),Dr(),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}),Mr=x(()=>{Tr(),Nr(),ct=mt((e,t)=>ze.lang.round(nt.parse(e)[t]),"channel"),ht=ct}),Or=x(()=>{Tr(),Nr(),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}),Pr=x(()=>{Or(),pt=mt(e=>.5<=dt(e),"isLight"),gt=pt}),$r=x(()=>{Pr(),ft=mt(e=>!gt(e),"isDark"),vt=ft}),Br=x(()=>{Tr(),Nr(),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}),Fr=x(()=>{Br(),wt=mt((e,t)=>xt(e,"l",t),"lighten"),a=wt}),zr=x(()=>{Br(),Tt=mt((e,t)=>xt(e,"l",-t),"darken"),kt=Tt}),qr=x(()=>{Nr(),Dr(),Ct=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=Ct}),Ur=x(()=>{Nr(),Ir(),St=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"),Et=St}),Gr=x(()=>{Nr(),Ur(),_t=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,Et(r,e,t)},"invert"),i=_t}),jr=x(()=>{Ir(),Mr(),$r(),Fr(),zr(),qr(),Gr()}),Wr=x(()=>{jr()}),Yr=x(()=>{At="#ffffff",Rt="#f2f2f2"}),Vr=x(()=>{Wr(),Lt=mt((e,t)=>r(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),Hr=x(()=>{Wr(),Yr(),Vr(),Nt=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||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(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||a(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||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(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.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||i(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||r(this.primaryColor,{h:64}),this.fillType3=this.fillType3||r(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||r(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||r(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||r(this.primaryColor,{h:128}),this.fillType7=this.fillType7||r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-10}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=kt(this.git0,25),this.git1=kt(this.git1,25),this.git2=kt(this.git2,25),this.git3=kt(this.git3,25),this.git4=kt(this.git4,25),this.git5=kt(this.git5,25),this.git6=kt(this.git6,25),this.git7=kt(this.git7,25)),this.gitInv0=this.gitInv0||i(this.git0),this.gitInv1=this.gitInv1||i(this.git1),this.gitInv2=this.gitInv2||i(this.git2),this.gitInv3=this.gitInv3||i(this.git3),this.gitInv4=this.gitInv4||i(this.git4),this.gitInv5=this.gitInv5||i(this.git5),this.gitInv6=this.gitInv6||i(this.git6),this.gitInv7=this.gitInv7||i(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||At,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Dt=mt(e=>{var t=new Nt;return t.calculate(e),t},"getThemeVariables")}),Xr=x(()=>{Wr(),Vr(),It=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=i(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(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=a(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||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=a(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=a(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=a(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=this.darkTextColor,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.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||i(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,s:-30,l:-(4*e-10)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:30,s:-30,l:-(4*e-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=a(this.secondaryColor,20),this.git1=a(this.pie2||this.secondaryColor,20),this.git2=a(this.pie3||this.tertiaryColor,20),this.git3=a(this.pie4||r(this.primaryColor,{h:-30}),20),this.git4=a(this.pie5||r(this.primaryColor,{h:-60}),20),this.git5=a(this.pie6||r(this.primaryColor,{h:-90}),10),this.git6=a(this.pie7||r(this.primaryColor,{h:60}),10),this.git7=a(this.pie8||r(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||i(this.git0),this.gitInv1=this.gitInv1||i(this.git1),this.gitInv2=this.gitInv2||i(this.git2),this.gitInv3=this.gitInv3||i(this.git3),this.gitInv4=this.gitInv4||i(this.git4),this.gitInv5=this.gitInv5||i(this.git5),this.gitInv6=this.gitInv6||i(this.git6),this.gitInv7=this.gitInv7||i(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||i(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||i(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||a(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||a(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Mt=mt(e=>{var t=new It;return t.calculate(e),t},"getThemeVariables")}),Kr=x(()=>{Wr(),Vr(),Yr(),Ot=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=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(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<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||r(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:30,l:-(7+5*e)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||i(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||i(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=a(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||a(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||a(this.primaryColor,1),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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,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.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||r(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||r(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=kt(this.git0,25),this.git1=kt(this.git1,25),this.git2=kt(this.git2,25),this.git3=kt(this.git3,25),this.git4=kt(this.git4,25),this.git5=kt(this.git5,25),this.git6=kt(this.git6,25),this.git7=kt(this.git7,25)),this.gitInv0=this.gitInv0||kt(i(this.git0),25),this.gitInv1=this.gitInv1||i(this.git1),this.gitInv2=this.gitInv2||i(this.git2),this.gitInv3=this.gitInv3||i(this.git3),this.gitInv4=this.gitInv4||i(this.git4),this.gitInv5=this.gitInv5||i(this.git5),this.gitInv6=this.gitInv6||i(this.git6),this.gitInv7=this.gitInv7||i(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||i(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||i(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||At,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;Object.keys(this).forEach(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]}))}},Pt=mt(e=>{var t=new Ot;return t.calculate(e),t},"getThemeVariables")}),Zr=x(()=>{Wr(),Yr(),Vr(),$t=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=a("#cde498",10),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(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.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||r(this["cScale"+e],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,s:-30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:30,s:-30,l:-(8+5*e)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(this.mainBkg,20),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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,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.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||r(this.primaryColor,{l:-30}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=kt(this.git0,25),this.git1=kt(this.git1,25),this.git2=kt(this.git2,25),this.git3=kt(this.git3,25),this.git4=kt(this.git4,25),this.git5=kt(this.git5,25),this.git6=kt(this.git6,25),this.git7=kt(this.git7,25)),this.gitInv0=this.gitInv0||i(this.git0),this.gitInv1=this.gitInv1||i(this.git1),this.gitInv2=this.gitInv2||i(this.git2),this.gitInv3=this.gitInv3||i(this.git3),this.gitInv4=this.gitInv4||i(this.git4),this.gitInv5=this.gitInv5||i(this.git5),this.gitInv6=this.gitInv6||i(this.git6),this.gitInv7=this.gitInv7||i(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||i(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||i(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||At,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"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")}),Qr=x(()=>{Wr(),Vr(),Yr(),Ft=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=a(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(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||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=a(this.contrast,55),this.border2=this.contrast,this.actorBorder=a(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.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||i(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{l:-(8+5*e)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=a(this.contrast,30),this.sectionBkgColor2=a(this.contrast,30),this.taskBorderColor=kt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=a(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=kt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",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||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,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});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=kt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||r(this.primaryColor,{h:-30}),this.git4=this.pie5||r(this.primaryColor,{h:-60}),this.git5=this.pie6||r(this.primaryColor,{h:-90}),this.git6=this.pie7||r(this.primaryColor,{h:60}),this.git7=this.pie8||r(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||i(this.git0),this.gitInv1=this.gitInv1||i(this.git1),this.gitInv2=this.gitInv2||i(this.git2),this.gitInv3=this.gitInv3||i(this.git3),this.gitInv4=this.gitInv4||i(this.git4),this.gitInv5=this.gitInv5||i(this.git5),this.gitInv6=this.gitInv6||i(this.git6),this.gitInv7=this.gitInv7||i(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||At,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(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")}),Jr=x(()=>{Hr(),Xr(),Kr(),Zr(),Qr(),qt={base:{getThemeVariables:Dt},dark:{getThemeVariables:Mt},default:{getThemeVariables:Pt},forest:{getThemeVariables:Bt},neutral:{getThemeVariables:zt}}}),ei=x(()=>{Ut={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,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"},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},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}}),ti=x(()=>{Jr(),ei(),Gt={...Ut,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:qt.default.getThemeVariables(),sequence:{...Ut.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:{...Ut.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ut.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ut.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:{...Ut.pie,useWidth:984},xyChart:{...Ut.xyChart,useWidth:void 0},requirement:{...Ut.requirement,useWidth:void 0},packet:{...Ut.packet},radar:{...Ut.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},jt=mt((r,i="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,i+t,...jt(r[t],"")]:[...e,i+t],[]),"keyify"),Wt=new Set(jt(Gt,"")),Yt=Gt}),ri=x(()=>{ti(),e(),Vt=mt(e=>{if(M.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>Vt(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")||!Wt.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),Vt(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(M.debug("sanitizing css option",t),e[t]=Ht(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"),Ht=mt(e=>{let t=0,r=0;for(var i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?t++:"}"===i&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss")}),ii=x(()=>{yr(),e(),Jr(),ti(),ri(),Xt=Object.freeze(Yt),Kt=Re({},Xt),Qt=[],Jt=Re({},Xt),er=mt((e,t)=>{let r=Re({},e),i={};for(var n of t)or(n),i=Re(i,n);return r=Re(r,i),i.theme&&i.theme in qt&&(e=Re({},Zt),t=Re(e.themeVariables||{},i.themeVariables),r.theme)&&r.theme in qt&&(r.themeVariables=qt[r.theme].getThemeVariables(t)),pr(Jt=r),Jt},"updateCurrentConfig"),tr=mt(e=>(Kt=Re({},Xt),Kt=Re(Kt,e),e.theme&&qt[e.theme]&&(Kt.themeVariables=qt[e.theme].getThemeVariables(e.themeVariables)),er(Kt,Qt),Kt),"setSiteConfig"),rr=mt(e=>{Zt=Re({},e)},"saveConfigFromInitialize"),ir=mt(e=>(Kt=Re(Kt,e),er(Kt,Qt),Kt),"updateSiteConfig"),nr=mt(()=>Re({},Kt),"getSiteConfig"),ar=mt(e=>(pr(e),Re(Jt,e),sr()),"setConfig"),sr=mt(()=>Re({},Jt),"getConfig"),or=mt(t=>{t&&(["secure",...Kt.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]&&or(t[e])}))},"sanitize"),lr=mt(e=>{Vt(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Qt.push(e),er(Kt,Qt)},"addDirective"),cr=mt((e=Kt)=>{er(e,Qt=[])},"reset"),hr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ur={},dr=mt(e=>{ur[e]||(M.warn(hr[e]),ur[e]=!0)},"issueWarning"),pr=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&dr("LAZY_LOAD_DEPRECATED")},"checkConfig"),gr=mt(()=>{let e={};Zt&&(e=Re(e,Zt));for(var t of Qt)e=Re(e,t);return e},"getUserDefinedConfig")});function ni(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1<t?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return vi(n,e,r)}}function ai(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return bi(i,t)}}function si(t,r){var i,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Si;di&&di(t,null);let a=r.length;for(;a--;){let e=r[a];"string"==typeof e&&(i=n(e))!==e&&(pi(r)||(r[a]=i),e=i),t[e]=!0}return t}function oi(t){for(let e=0;e<t.length;e++)Ni(t,e)||(t[e]=null);return t}function li(e){var t,r,i=yi(null);for([t,r]of ui(e))Ni(e,t)&&(Array.isArray(r)?i[t]=oi(r):r&&"object"==typeof r&&r.constructor===Object?i[t]=li(r):i[t]=r);return i}function ci(e,t){for(;null!==e;){var r=fi(e,t);if(r){if(r.get)return ni(r.get);if("function"==typeof r.value)return ni(r.value)}e=gi(e)}function i(){return null}return mt(i,"fallbackValue"),i}function hi(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:nn(),d=mt(e=>hi(e),"DOMPurify");if(d.version="3.2.6",d.removed=[],!e||!e.document||e.document.nodeType!==rn.document||!e.Element)return d.isSupported=!1,d;let n=e.document,O=n,P=O.currentScript,{DocumentFragment:$,HTMLTemplateElement:B,Node:F,Element:z,NodeFilter:t,NamedNodeMap:q=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:U,DOMParser:G,trustedTypes:p}=e,r=z.prototype,j=ci(r,"cloneNode"),W=ci(r,"remove"),Y=ci(r,"nextSibling"),V=ci(r,"childNodes"),s=ci(r,"parentNode");var H;"function"==typeof B&&(H=n.createElement("template")).content&&H.content.ownerDocument&&(n=H.content.ownerDocument);let g,c="",{implementation:X,createNodeIterator:K,createDocumentFragment:Z,getElementsByTagName:Q}=n,J=O.importNode,f=sn(),{MUSTACHE_EXPR:ee,ERB_EXPR:te,TMPLIT_EXPR:re,DATA_ATTR:ie,ARIA_ATTR:ne,IS_SCRIPT_OR_DATA:ae,ATTR_WHITESPACE:se,CUSTOM_ELEMENT:oe}=(d.isSupported="function"==typeof ui&&"function"==typeof s&&X&&void 0!==X.createHTMLDocument,tn),le=tn.IS_ALLOWED_URI,h=null,ce=si({},[...Mi,...Oi,...Pi,...Bi,...zi]),m=null,he=si({},[...qi,...Ui,...Gi,...ji]),o=Object.seal(yi(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,ue=null,de=!0,pe=!0,ge=!1,fe=!0,y=!1,v=!0,b=!1,me=!1,ye=!1,x=!1,w=!1,T=!1,ve=!0,be=!1,xe=!0,k=!1,i,l=null,we=si({},["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"]),Te=null,ke=si({},["audio","video","img","source","image","track"]),Ce=null,Se=si({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",C="http://www.w3.org/2000/svg",S="http://www.w3.org/1999/xhtml",E=S,Ee=!1,_e=null,Ae=si({},[a,C,S],Ei),_=si({},["mi","mo","mn","ms","mtext"]),A=si({},["annotation-xml"]),Re=si({},["title","style","font","a","script"]),R=null,Le=["application/xhtml+xml","text/html"],L=null,N=null,Ne=n.createElement("form"),De=mt(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),Ie=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!N||N!==e){if(e=li(e&&"object"==typeof e?e:{}),R=-1===Le.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,L="application/xhtml+xml"===R?Ei:Si,h=Ni(e,"ALLOWED_TAGS")?si({},e.ALLOWED_TAGS,L):ce,m=Ni(e,"ALLOWED_ATTR")?si({},e.ALLOWED_ATTR,L):he,_e=Ni(e,"ALLOWED_NAMESPACES")?si({},e.ALLOWED_NAMESPACES,Ei):Ae,Ce=Ni(e,"ADD_URI_SAFE_ATTR")?si(li(Se),e.ADD_URI_SAFE_ATTR,L):Se,Te=Ni(e,"ADD_DATA_URI_TAGS")?si(li(ke),e.ADD_DATA_URI_TAGS,L):ke,l=Ni(e,"FORBID_CONTENTS")?si({},e.FORBID_CONTENTS,L):we,u=Ni(e,"FORBID_TAGS")?si({},e.FORBID_TAGS,L):li({}),ue=Ni(e,"FORBID_ATTR")?si({},e.FORBID_ATTR,L):li({}),i=!!Ni(e,"USE_PROFILES")&&e.USE_PROFILES,de=!1!==e.ALLOW_ARIA_ATTR,pe=!1!==e.ALLOW_DATA_ATTR,ge=e.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,y=e.SAFE_FOR_TEMPLATES||!1,v=!1!==e.SAFE_FOR_XML,b=e.WHOLE_DOCUMENT||!1,x=e.RETURN_DOM||!1,w=e.RETURN_DOM_FRAGMENT||!1,T=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,ve=!1!==e.SANITIZE_DOM,be=e.SANITIZE_NAMED_PROPS||!1,xe=!1!==e.KEEP_CONTENT,k=e.IN_PLACE||!1,le=e.ALLOWED_URI_REGEXP||Ki,E=e.NAMESPACE||S,_=e.MATHML_TEXT_INTEGRATION_POINTS||_,A=e.HTML_INTEGRATION_POINTS||A,o=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&De(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(o.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&De(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(o.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(o.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(pe=!1),w&&(x=!0),i&&(h=si({},zi),m=[],!0===i.html&&(si(h,Mi),si(m,qi)),!0===i.svg&&(si(h,Oi),si(m,Ui),si(m,ji)),!0===i.svgFilters&&(si(h,Pi),si(m,Ui),si(m,ji)),!0===i.mathMl)&&(si(h,Bi),si(m,Gi),si(m,ji)),e.ADD_TAGS&&si(h=h===ce?li(h):h,e.ADD_TAGS,L),e.ADD_ATTR&&si(m=m===he?li(m):m,e.ADD_ATTR,L),e.ADD_URI_SAFE_ATTR&&si(Ce,e.ADD_URI_SAFE_ATTR,L),e.FORBID_CONTENTS&&si(l=l===we?li(l):l,e.FORBID_CONTENTS,L),xe&&(h["#text"]=!0),b&&si(h,["html","head","body"]),h.table&&(si(h,["tbody"]),delete u.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ii('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ii('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,c=g.createHTML("")}else null!==(g=void 0===g?an(p,P):g)&&"string"==typeof c&&(c=g.createHTML(""));mi&&mi(e),N=e}},"_parseConfig"),Me=si({},[...Oi,...Pi,...$i]),Oe=si({},[...Bi,...Fi]),Pe=mt(function(e){let t=s(e);t&&t.tagName||(t={namespaceURI:E,tagName:"template"});var r=Si(e.tagName),i=Si(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===C?t.namespaceURI===S?"svg"===r:t.namespaceURI===a?"svg"===r&&("annotation-xml"===i||_[i]):!!Me[r]:e.namespaceURI===a?t.namespaceURI===S?"math"===r:t.namespaceURI===C?"math"===r&&A[i]:!!Oe[r]:e.namespaceURI===S?!(t.namespaceURI===C&&!A[i]||t.namespaceURI===a&&!_[i]||Oe[r])&&(Re[r]||!Me[r]):!("application/xhtml+xml"!==R||!_e[e.namespaceURI]))},"_checkValidNamespace"),D=mt(function(e){ki(d.removed,{element:e});try{s(e).removeChild(e)}catch{W(e)}},"_forceRemove"),I=mt(function(e,t){try{ki(d.removed,{attribute:t.getAttributeNode(e),from:t})}catch{ki(d.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(x||w)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},"_removeAttribute"),$e=mt(function(e){let t=null,r=null;ye?e="<remove></remove>"+e:(i=_i(e,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===R&&E===S&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=g?g.createHTML(e):e;if(E===S)try{t=(new G).parseFromString(i,R)}catch{}if(!t||!t.documentElement){t=X.createDocument(E,"template",null);try{t.documentElement.innerHTML=Ee?c:i}catch{}}return i=t.body||t.documentElement,e&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),E===S?Q.call(t,b?"html":"body")[0]:b?t.documentElement:i},"_initDocument"),Be=mt(function(e){return K.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Fe=mt(function(e){return e instanceof U&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof q)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),ze=mt(function(e){return"function"==typeof F&&e instanceof F},"_isNode");function M(e,t,r){xi(e,e=>{e.call(d,t,r,N)})}mt(M,"_executeHooks");let qe=mt(function(t){let r=null;if(M(f.beforeSanitizeElements,t,null),!Fe(t)){var e=L(t.nodeName);if(M(f.uponSanitizeElement,t,{tagName:e,allowedTags:h}),!(v&&t.hasChildNodes()&&!ze(t.firstElementChild)&&Di(/<[/\w!]/g,t.innerHTML)&&Di(/<[/\w!]/g,t.textContent)||t.nodeType===rn.progressingInstruction||v&&t.nodeType===rn.comment&&Di(/<[/\w]/g,t.data))){if(h[e]&&!u[e])return t instanceof z&&!Pe(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&Di(/<\/no(script|embed|frames)/i,t.innerHTML)?(D(t),!0):(y&&t.nodeType===rn.text&&(r=t.textContent,xi([ee,te,re],e=>{r=Ai(r,e," ")}),t.textContent!==r)&&(ki(d.removed,{element:t.cloneNode()}),t.textContent=r),M(f.afterSanitizeElements,t,null),!1);if(!u[e]&&Ge(e)&&(o.tagNameCheck instanceof RegExp&&Di(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(xe&&!l[e]){var i=s(t)||t.parentNode,n=V(t)||t.childNodes;if(n&&i)for(let e=n.length-1;0<=e;--e){var a=j(n[e],!0);a.__removalCount=(t.__removalCount||0)+1,i.insertBefore(a,Y(t))}}}}return D(t),!0},"_sanitizeElements"),Ue=mt(function(e,t,r){if(ve&&("id"===t||"name"===t)&&(r in n||r in Ne))return!1;if((!pe||ue[t]||!Di(ie,t))&&(!de||!Di(ne,t)))if(!m[t]||ue[t]){if(!(Ge(e)&&(o.tagNameCheck instanceof RegExp&&Di(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&Di(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&Di(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Ce[t]&&!Di(le,Ai(r,se,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ri(r,"data:")||!Te[e])&&(!ge||Di(ae,Ai(r,se,"")))&&r)return!1;return!0},"_isValidAttribute"),Ge=mt(function(e){return"annotation-xml"!==e&&_i(e,oe)},"_isBasicCustomElement"),je=mt(function(c){M(f.beforeSanitizeAttributes,c,null);var h=c.attributes;if(h&&!Fe(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=L(t),a=i,s="value"===t?a:Li(a);if(o.attrName=n,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,M(f.uponSanitizeAttribute,c,o),s=o.attrValue,!be||"id"!==n&&"name"!==n||(I(t,c),s="user-content-"+s),v&&Di(/((--!?|])>)|<\/(style|title)/i,s))I(t,c);else if(!o.forceKeepAttr)if(o.keepAttr)if(!fe&&Di(/\/>/i,s))I(t,c);else{y&&xi([ee,te,re],e=>{s=Ai(s,e," ")});var u=L(c.nodeName);if(Ue(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),Fe(c)?D(c):Ti(d.removed)}catch{I(t,c)}}else I(t,c)}else I(t,c)}M(f.afterSanitizeAttributes,c,null)}},"_sanitizeAttributes"),We=mt(function e(t){var r,i=Be(t);for(M(f.beforeSanitizeShadowDOM,t,null);r=i.nextNode();)M(f.uponSanitizeShadowNode,r,null),qe(r),je(r),r.content instanceof $&&e(r.content);M(f.afterSanitizeShadowDOM,t,null)},"_sanitizeShadowDOM");return d.sanitize=function(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,i,n,a=null;if("string"!=typeof(e=(Ee=!e)?"\x3c!--\x3e":e)&&!ze(e)){if("function"!=typeof e.toString)throw Ii("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ii("dirty is not a string, aborting")}if(!d.isSupported)return e;if(me||Ie(t),d.removed=[],k="string"!=typeof e&&k){if(e.nodeName){var s=L(e.nodeName);if(!h[s]||u[s])throw Ii("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof F)(i=(r=$e("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===rn.element&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!x&&!y&&!b&&-1===e.indexOf("<"))return g&&T?g.createHTML(e):e;if(!(r=$e(e)))return x?null:T?c:""}r&&ye&&D(r.firstChild);for(var o=Be(k?e:r);n=o.nextNode();)qe(n),je(n),n.content instanceof $&&We(n.content);if(k)return e;if(x){if(w)for(a=Z.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?J.call(O,a,!0):a}let l=b?r.outerHTML:r.innerHTML;return b&&h["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Di(Ji,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
|
||
`+l),y&&xi([ee,te,re],e=>{l=Ai(l,e," ")}),g&&T?g.createHTML(l):l},d.setConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Ie(e),me=!0},d.clearConfig=function(){N=null,me=!1},d.isValidAttribute=function(e,t,r){return N||Ie({}),e=L(e),t=L(t),Ue(e,t,r)},d.addHook=function(e,t){"function"==typeof t&&ki(f[e],t)},d.removeHook=function(e,t){return void 0!==t?-1===(t=wi(f[e],t))?void 0:Ci(f[e],t,1)[0]:Ti(f[e])},d.removeHooks=function(e){f[e]=[]},d.removeAllHooks=function(){f=sn()},d}var ui,di,pi,gi,fi,mi,yi,vi,bi,xi,wi,Ti,ki,Ci,Si,Ei,_i,Ai,Ri,Li,Ni,Di,Ii,Mi,Oi,Pi,$i,Bi,Fi,zi,qi,Ui,Gi,ji,Wi,Yi,Vi,Hi,Xi,Ki,Zi,Qi,Ji,en,tn,rn,nn,an,sn,on,ln=x(()=>{({entries:ui,setPrototypeOf:di,isFrozen:pi,getPrototypeOf:gi,getOwnPropertyDescriptor:fi}=Object),{freeze:mi,seal:en,create:yi}=Object,{apply:vi,construct:bi}=typeof Reflect<"u"&&Reflect,mi=mi||mt(function(e){return e},"freeze"),en=en||mt(function(e){return e},"seal"),vi=vi||mt(function(e,t,r){return e.apply(t,r)},"apply"),bi=bi||mt(function(e,t){return new e(...t)},"construct"),xi=ni(Array.prototype.forEach),wi=ni(Array.prototype.lastIndexOf),Ti=ni(Array.prototype.pop),ki=ni(Array.prototype.push),Ci=ni(Array.prototype.splice),Si=ni(String.prototype.toLowerCase),Ei=ni(String.prototype.toString),_i=ni(String.prototype.match),Ai=ni(String.prototype.replace),Ri=ni(String.prototype.indexOf),Li=ni(String.prototype.trim),Ni=ni(Object.prototype.hasOwnProperty),Di=ni(RegExp.prototype.test),Ii=ai(TypeError),mt(ni,"unapply"),mt(ai,"unconstruct"),mt(si,"addToSet"),mt(oi,"cleanArray"),mt(li,"clone"),mt(ci,"lookupGetter"),Mi=mi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Oi=mi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pi=mi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$i=mi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bi=mi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Fi=mi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zi=mi(["#text"]),qi=mi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ui=mi(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gi=mi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ji=mi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wi=en(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Yi=en(/<%[\w\W]*|[\w\W]*%>/gm),Vi=en(/\$\{[\w\W]*/gm),Hi=en(/^data-[\-\w.\u00B7-\uFFFF]+$/),Xi=en(/^aria-[\-\w]+$/),Ki=en(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zi=en(/^(?:\w+script|data):/i),Qi=en(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ji=en(/^html$/i),en=en(/^[a-z][.\w]*(-[.\w]+)+$/i),tn=Object.freeze({__proto__:null,ARIA_ATTR:Xi,ATTR_WHITESPACE:Qi,CUSTOM_ELEMENT:en,DATA_ATTR:Hi,DOCTYPE_NAME:Ji,ERB_EXPR:Yi,IS_ALLOWED_URI:Ki,IS_SCRIPT_OR_DATA:Zi,MUSTACHE_EXPR:Wi,TMPLIT_EXPR:Vi}),rn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nn=mt(function(){return"u"<typeof window?null:window},"getGlobal"),an=mt(function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;var r="data-tt-policy-suffix";t="dompurify"+((r=t&&t.hasAttribute(r)?t.getAttribute(r):null)?"#"+r:"");try{return e.createPolicy(t,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn("TrustedTypes policy "+t+" could not be created."),null}},"_createTrustedTypesPolicy"),sn=mt(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),mt(hi,"createDOMPurify"),on=hi()}),cn={};function hn(e){return String(e).replace(jn,e=>Gn[e])}function un(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 dn(e){for(var t=0;t<na.length;t++)for(var r=na[t],i=0;i<r.blocks.length;i++){var n=r.blocks[i];if(e>=n[0]&&e<=n[1])return r.name}return null}function pn(e){for(var t=0;t<aa.length;t+=2)if(aa[t]<=e&&e<=aa[t+1])return!0;return!1}function gn(e,t){va[e]=t}function fn(e,t,r){if(!va[t])throw new Error("Font metrics not found for font: "+t+".");var i=e.charCodeAt(0),n=va[t][i];if(!n&&e[0]in xa&&(i=xa[e[0]].charCodeAt(0),n=va[t][i]),n=!n&&"text"===r&&pn(i)?va[t][77]:n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}function mn(e){var t=5<=e?0:3<=e?1:2;if(!wa[t]){var r,i=wa[t]={cssEmPerMu:ba.quad[t]/18};for(r in ba)ba.hasOwnProperty(r)&&(i[r]=ba[r][t])}return wa[t]}function yn(e){if(e instanceof Fa)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function vn(e){if(e instanceof Oa)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}function t(e,t,r,i,n,a){Wa[e][n]={font:t,group:r,replace:i},a&&i&&(Wa[e][i]=Wa[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;o<t.length;++o)As[t[o]]=s;e&&(n&&(Rs[e]=n),a)&&(Ls[e]=a)}function bn(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;o({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function xn(e,t){return e=Is(["base"],e,t),(t=Is(["strut"])).style.height=K(e.height+e.depth),e.depth&&(t.style.verticalAlign=K(-e.depth)),e.children.unshift(t),e}function wn(e,t){var r,i=null,n=(1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body),Bs(e,t,"root"));2===n.length&&n[1].hasClass("tag")&&(r=n.pop());for(var a,s=[],o=[],l=0;l<n.length;l++)if(o.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var c=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(c=!0);c||(s.push(xn(o,t)),o=[])}else n[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(xn(o,t)),o=[]),s.push(n[l]));return 0<o.length&&s.push(xn(o,t)),i?((a=xn(Bs(i,t,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(e=Is(["katex-html"],s)).setAttribute("aria-hidden","true"),a&&((i=a.children[0]).style.height=K(e.height+e.depth),e.depth)&&(i.style.verticalAlign=K(-e.depth)),e}function Tn(e){return new ya(e)}function kn(e){var t;return!!e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof Ys&&"."===t.text:"mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")&&(t=e.children[0])instanceof Ys&&","===t.text)}function Cn(e,t,r,i,n){return r=1===(e=Ks(e,r)).length&&e[0]instanceof Ws&&Vn.contains(["mrow","mtable"],e[0].type)?e[0]:new C.MathNode("mrow",e),(e=new C.MathNode("annotation",[new C.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new C.MathNode("semantics",[r,e]),(r=new C.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),i&&r.setAttribute("display","block"),Z.makeSpan([n?"katex":"katex-mathml"],[r])}function Sn(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function En(e){var t=_n(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function _n(e){return e&&("atom"===e.type||ja.hasOwnProperty(e.type))?e:null}function An(e,t){var r=Bs(e.body,t,!0);return ho([e.mclass],r,t)}function Rn(e,t){var r,t=Ks(e.body,t);return"minner"===e.mclass?r=new C.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new C.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new C.MathNode("mo",t),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function Ln(e,t,r){var i=po[e];switch(i){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(i,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n=r.callFunction("\\\\cdleft",[t[0]],[]),a=r.callFunction("\\Big",[{type:"atom",text:i,mode:"math",family:"rel"}],[]),s=r.callFunction("\\\\cdright",[t[1]],[]);return r.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[n,a,s]}],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}function Nn(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"!==r)throw new X("Expected \\\\ or \\cr or \\end",e.nextToken);0===t[t.length-1].length&&t.pop();break}e.consume()}for(var i=[],n=[i],a=0;a<t.length;a++){for(var s=t[a],o=go(),l=0;l<s.length;l++)if(fo(s[l])){i.push(o);var c=En(s[l+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(c))){if(!(-1<"<>AV".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<s.length;p++){if(mo(s[p],c)){d=!1,l=p;break}if(fo(s[p]))throw new X("Missing a "+c+" character to complete a CD arrow.",s[p]);h[u].body.push(s[p])}if(d)throw new X("Missing a "+c+" character to complete a CD arrow.",s[l])}}var g=Ln(c,h,e);i.push({type:"styling",body:[g],mode:"math",style:"display"}),o=go()}else o.body.push(s[l]);a%2==0?i.push(o):i.shift(),n.push(i=[])}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}function Dn(e,t){var r=_n(e);if(r&&Vn.contains(Yo,r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function In(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Mn(e){for(var{type:e,names:t,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},o=0;o<t.length;++o)Vo[t[o]]=s;n&&(Rs[e]=n),a&&(Ls[e]=a)}function l(e,t){Ho[e]=t}function On(e){var t=[],r=(e.consumeSpaces(),e.fetch().text);for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}function Pn(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function $n(e,t,r){var{hskipBeforeAndAfter:t,addJot:i,cols:n,arraystretch:a,colSeparationType:s,autoTag:o,singleRow:l,emptySingleRow:c,maxNumCols:h,leqno:u}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)a=1;else if(!(a=parseFloat(d))||a<0)throw new X("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var p=[],g=[p],f=[],m=[],y=null!=o?[]:void 0;function v(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function b(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new qn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!o&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(mt(v,"beginRow"),mt(b,"endRow"),v(),m.push(On(e));;){var x=e.parseExpression(!1,l?"\\end":"\\\\"),w=(e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},r&&(x={type:"styling",mode:e.mode,style:r,body:[x]}),p.push(x),e.fetch().text);if("&"===w){if(h&&p.length===h){if(l||s)throw new X("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===w){b(),1===p.length&&"styling"===x.type&&0===x.body[0].body.length&&(1<g.length||!c)&&g.pop(),m.length<g.length+1&&m.push([]);break}if("\\\\"!==w)throw new X("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume(),x=void 0," "!==e.gullet.future().text&&(x=e.parseSizeGroup(!0)),f.push(x?x.value:null),b(),m.push(On(e)),g.push(p=[]),v()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:a,body:g,cols:n,rowGaps:f,hskipBeforeAndAfter:t,hLinesBeforeRow:m,colSeparationType:s,tags:y,leqno:u}}function Bn(e){return"d"===e.slice(0,1)?"display":"text"}function Fn(e,t,r){for(var i=Bs(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,a=0;a<i.length;a++){var s=i[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(i[a].classes,t.sizingClasses(r)):i[a].classes[s+1]==="reset-size"+t.size&&(i[a].classes[s+1]="reset-size"+r.size),i[a].height*=n,i[a].depth*=n}return Z.makeFragment(i)}(dqe=(e,t)=>{for(var r in t)D(e,r,{get:t[r],enumerable:!0})})(cn,{ParseError:()=>X,SETTINGS_SCHEMA:()=>Hn,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>t,__domTree:()=>ec,__parse:()=>Xl,__renderToDomTree:()=>Zl,__renderToHTMLTree:()=>Ql,__setFontMetrics:()=>gn,default:()=>tc,render:()=>Vl,renderToString:()=>Hl,version:()=>Jl});var zn,qn,X,Un,Gn,jn,Wn,Yn,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,wa,Ta,ka,Ca,Sa,Ea,_a,Aa,Ra,K,La,Na,Da,Ia,Ma,Oa,Pa,$a,Ba,Fa,za,qa,Ua,Ga,ja,Wa,h,u,d,Ya,p,Va,Ha,Xa,Ka,Za,Qa,Ja,es,ts,rs,is,ns,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,vs,bs,xs,ws,Ts,ks,Cs,Ss,Z,Es,_s,As,Rs,Ls,Ns,Ds,Is,Ms,Os,Ps,$s,Bs,Fs,zs,qs,Us,Gs,js,Ws,Ys,C,Vs,Hs,Xs,Ks,Zs,Qs,Js,eo,to,ro,io,no,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,bo,xo,wo,To,ko,Co,So,Eo,_o,Ao,Ro,Lo,No,Do,Io,Mo,Oo,Po,$o,Bo,Fo,zo,qo,Uo,Go,jo,Wo,Yo,Vo,Ho,Xo,Ko,Zo,g,Qo,Jo,el,tl,rl,il,nl,f,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,bl,xl,wl,Tl,kl,Cl,Sl,El,_l,Al,m,Rl,Ll,Nl,Dl,Il,Ml,Ol,Pl,$l,Bl,Fl,zl,ql,Ul,Gl,jl,Wl,Yl,Vl,Hl,Xl,Kl,Zl,Ql,Jl,ec,tc,rc=x(()=>{for(zn=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}},qn=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,zn.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<i?"…"+r.slice(i-15,i):r.slice(0,i))+t+(n+15<r.length?r.slice(n,n+15)+"…":r.slice(n))),(t=new Error(a)).name="ParseError",t.__proto__=s.prototype,null!=(t.position=i)&&null!=n&&(t.length=n-i),t.rawMessage=e,t}}).prototype.__proto__=Error.prototype,ml=mt(function(e,t){return-1!==e.indexOf(t)},"contains"),f=mt(function(e,t){return void 0===e?t:e},"deflt"),Un=/([A-Z])/g,Bl=mt(function(e){return e.replace(Un,"-$1").toLowerCase()},"hyphenate"),Gn={"&":"&",">":">","<":"<",'"':""","'":"'"},jn=/[&><"']/g,mt(hn,"escape"),Wn=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"),g=mt(function(e){return"mathord"===(e=Wn(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),Yn=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),hl=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"),Vn={contains:ml,deflt:f,escape:hn,hyphenate:Bl,getBaseElem:Wn,isCharacterBox:g,protocolFromUrl:hl},Hn={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 <type>"},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 <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 <def>",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 <size>",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 <n>",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 <n>",cliProcessor:mt(e=>"Infinity"===e?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},mt(un,"getDefaultValue"),Xn=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||{},Hn){var r;Hn.hasOwnProperty(t)&&(r=Hn[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:un(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=Vn.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},ml=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 Kn[Zn[this.id]]}sub(){return Kn[Qn[this.id]]}fracNum(){return Kn[Jn[this.id]]}fracDen(){return Kn[ea[this.id]]}cramp(){return Kn[ta[this.id]]}text(){return Kn[ra[this.id]]}isTight(){return 2<=this.size}},Kn=[new ml(0,0,!1),new ml(1,0,!0),new ml(2,1,!1),new ml(3,1,!0),new ml(4,2,!1),new ml(5,2,!0),new ml(6,3,!1),new ml(7,3,!0)],Zn=[4,5,4,5,6,7,6,7],Qn=[5,5,5,5,7,7,7,7],Jn=[2,3,4,5,6,7,6,7],ea=[3,3,5,5,7,7,7,7],ta=[1,1,3,3,5,5,7,7],ra=[0,1,2,3,2,3,2,3],ia={DISPLAY:Kn[0],TEXT:Kn[2],SCRIPT:Kn[4],SCRIPTSCRIPT:Kn[6]},na=[{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(dn,"scriptFromCodepoint"),aa=[],na.forEach(e=>e.blocks.forEach(e=>aa.push(...e))),mt(pn,"supportedCodepoint"),sa=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"),oa=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"),la=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"),ca=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"),ha=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"),ua=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),da=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"),pa=mt(function(e,t,r){t*=1e3;var i="";switch(e){case"sqrtMain":i=sa(t,80);break;case"sqrtSize1":i=oa(t,80);break;case"sqrtSize2":i=la(t,80);break;case"sqrtSize3":i=ca(t,80);break;case"sqrtSize4":i=ha(t,80);break;case"sqrtTall":i=da(t,80,r)}return i},"sqrtPath"),ga=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"),fa={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`},ma=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"),ya=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 Vn.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=mt(e=>e.toText(),"toText");return this.children.map(e).join("")}},va={"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]}},ba={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]},xa={"Å":"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(gn,"setFontMetrics"),mt(fn,"getCharacterMetrics"),wa={},mt(mn,"getGlobalMetrics"),Ta=[[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]],ka=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ca=mt(function(e,t){return t.size<2?e:Ta[e-1][t.size-1]},"sizeAtStyle"),(Sa=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=ka[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:Ca(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:ka[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ca(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=mn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ea={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},_a={ex:!0,em:!0,mu:!0},Aa=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Ea||e in _a||"ex"===e},"validUnit"),Ra=mt(function(e,t){var r;if(e.unit in Ea)r=Ea[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"),La=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),Na=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"),Da=mt(function(e){var t,r,i=document.createElement(e);for(t in i.className=La(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<this.children.length;n++)i.appendChild(this.children[n].toNode());return i},"toNode"),Ia=/[\s"'>/=\x00-\x1f]/,Ma=mt(function(e){var t,r,i="<"+e,n=(this.classes.length&&(i+=' class="'+Vn.escape(La(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(n+=Vn.hyphenate(t)+":"+this.style[t]+";");for(r in n&&(i+=' style="'+Vn.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(Ia.test(r))throw new X("Invalid attribute name '"+r+"'");i+=" "+r+'="'+Vn.escape(this.attributes[r])+'"'}i+=">";for(var a=0;a<this.children.length;a++)i+=this.children[a].toMarkup();return i+"</"+e+">"},"toMarkup"),Oa=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,Na.call(this,e,r,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Vn.contains(this.classes,e)}toNode(){return Da.call(this,"span")}toMarkup(){return Ma.call(this,"span")}},Pa=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,Na.call(this,t,i),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Vn.contains(this.classes,e)}toNode(){return Da.call(this,"a")}toMarkup(){return Ma.call(this,"a")}},$a=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 Vn.contains(this.classes,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='<img src="'+Vn.escape(this.src)+'" alt="'+Vn.escape(this.alt)+'"',r="";for(e in this.style)this.style.hasOwnProperty(e)&&(r+=Vn.hyphenate(e)+":"+this.style[e]+";");return r&&(t+=' style="'+Vn.escape(r)+'"'),t+"'/>"}},Ba={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},Fa=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=dn(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ba[this.text])}hasClass(e){return Vn.contains(this.classes,e)}toNode(){var e,t=document.createTextNode(this.text),r=null;for(e in 0<this.italic&&((r=document.createElement("span")).style.marginRight=K(this.italic)),0<this.classes.length&&((r=r||document.createElement("span")).className=La(this.classes)),this.style)this.style.hasOwnProperty(e)&&(r=r||document.createElement("span"),r.style[e]=this.style[e]);return r?(r.appendChild(t),r):t}toMarkup(){var e,t=!1,r="<span",i=(this.classes.length&&(t=!0,r=(r+=' class="')+Vn.escape(La(this.classes))+'"'),"");for(e in 0<this.italic&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(e)&&(i+=Vn.hyphenate(e)+":"+this.style[e]+";");i&&(t=!0,r+=' style="'+Vn.escape(i)+'"');var n=Vn.escape(this.text);return t?(r+=">")+n+"</span>":n}},za=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<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e,t='<svg xmlns="http://www.w3.org/2000/svg"';for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+Vn.escape(this.attributes[e])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+"</svg>"}},qa=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",fa[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Vn.escape(this.alternate)+'"/>':'<path d="'+Vn.escape(fa[this.pathName])+'"/>'}},Ua=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="<line";for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+Vn.escape(this.attributes[e])+'"');return t+"/>"}},mt(yn,"assertSymbolDomNode"),mt(vn,"assertSpan"),Ga={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ja={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Wa={math:{},text:{}},mt(t,"defineSymbol"),u="text",f="ams",Bl="accent-token",g="bin",hl="close",ml="inner",Ya="mathord",$l="op-token",tl="open",gl="punct",el="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,gl,".","\\ldotp"),t(h,d,gl,"⋅","\\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,hl,"⎱","\\rmoustache",!0),t(h,d,tl,"⎰","\\lmoustache",!0),t(h,d,hl,"⟯","\\rgroup",!0),t(h,d,tl,"⟮","\\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,tl,"┌","\\@ulcorner",!0),t(h,f,hl,"┐","\\@urcorner",!0),t(h,f,tl,"└","\\@llcorner",!0),t(h,f,hl,"┘","\\@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,Ya,"α","\\alpha",!0),t(h,d,Ya,"β","\\beta",!0),t(h,d,Ya,"γ","\\gamma",!0),t(h,d,Ya,"δ","\\delta",!0),t(h,d,Ya,"ϵ","\\epsilon",!0),t(h,d,Ya,"ζ","\\zeta",!0),t(h,d,Ya,"η","\\eta",!0),t(h,d,Ya,"θ","\\theta",!0),t(h,d,Ya,"ι","\\iota",!0),t(h,d,Ya,"κ","\\kappa",!0),t(h,d,Ya,"λ","\\lambda",!0),t(h,d,Ya,"μ","\\mu",!0),t(h,d,Ya,"ν","\\nu",!0),t(h,d,Ya,"ξ","\\xi",!0),t(h,d,Ya,"ο","\\omicron",!0),t(h,d,Ya,"π","\\pi",!0),t(h,d,Ya,"ρ","\\rho",!0),t(h,d,Ya,"σ","\\sigma",!0),t(h,d,Ya,"τ","\\tau",!0),t(h,d,Ya,"υ","\\upsilon",!0),t(h,d,Ya,"ϕ","\\phi",!0),t(h,d,Ya,"χ","\\chi",!0),t(h,d,Ya,"ψ","\\psi",!0),t(h,d,Ya,"ω","\\omega",!0),t(h,d,Ya,"ε","\\varepsilon",!0),t(h,d,Ya,"ϑ","\\vartheta",!0),t(h,d,Ya,"ϖ","\\varpi",!0),t(h,d,Ya,"ϱ","\\varrho",!0),t(h,d,Ya,"ς","\\varsigma",!0),t(h,d,Ya,"φ","\\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,tl,"⟨","\\langle",!0),t(h,d,tl,"∣","\\lvert"),t(h,d,tl,"∥","\\lVert"),t(h,d,hl,"?","?"),t(h,d,hl,"!","!"),t(h,d,hl,"⟩","\\rangle",!0),t(h,d,hl,"∣","\\rvert"),t(h,d,hl,"∥","\\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,el," ","\\ "),t(h,d,el," ","\\space"),t(h,d,el," ","\\nobreakspace"),t(u,d,el," ","\\ "),t(u,d,el," "," "),t(u,d,el," ","\\space"),t(u,d,el," ","\\nobreakspace"),t(h,d,el,null,"\\nobreak"),t(h,d,el,null,"\\allowbreak"),t(h,d,gl,",",","),t(h,d,gl,";",";"),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,tl,"{","\\{"),t(u,d,p,"{","\\{"),t(u,d,p,"{","\\textbraceleft"),t(h,d,hl,"}","\\}"),t(u,d,p,"}","\\}"),t(u,d,p,"}","\\textbraceright"),t(h,d,tl,"{","\\lbrace"),t(h,d,hl,"}","\\rbrace"),t(h,d,tl,"[","\\lbrack",!0),t(u,d,p,"[","\\lbrack",!0),t(h,d,hl,"]","\\rbrack",!0),t(u,d,p,"]","\\rbrack",!0),t(h,d,tl,"(","\\lparen",!0),t(h,d,hl,")","\\rparen",!0),t(u,d,p,"<","\\textless",!0),t(u,d,p,">","\\textgreater",!0),t(h,d,tl,"⌊","\\lfloor",!0),t(h,d,hl,"⌋","\\rfloor",!0),t(h,d,tl,"⌈","\\lceil",!0),t(h,d,hl,"⌉","\\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,$l,"∐","\\coprod"),t(h,d,$l,"⋁","\\bigvee"),t(h,d,$l,"⋀","\\bigwedge"),t(h,d,$l,"⨄","\\biguplus"),t(h,d,$l,"⋂","\\bigcap"),t(h,d,$l,"⋃","\\bigcup"),t(h,d,$l,"∫","\\int"),t(h,d,$l,"∫","\\intop"),t(h,d,$l,"∬","\\iint"),t(h,d,$l,"∭","\\iiint"),t(h,d,$l,"∏","\\prod"),t(h,d,$l,"∑","\\sum"),t(h,d,$l,"⨂","\\bigotimes"),t(h,d,$l,"⨁","\\bigoplus"),t(h,d,$l,"⨀","\\bigodot"),t(h,d,$l,"∮","\\oint"),t(h,d,$l,"∯","\\oiint"),t(h,d,$l,"∰","\\oiiint"),t(h,d,$l,"⨆","\\bigsqcup"),t(h,d,$l,"∫","\\smallint"),t(u,d,ml,"…","\\textellipsis"),t(h,d,ml,"…","\\mathellipsis"),t(u,d,ml,"…","\\ldots",!0),t(h,d,ml,"…","\\ldots",!0),t(h,d,ml,"⋯","\\@cdots",!0),t(h,d,ml,"⋱","\\ddots",!0),t(h,d,p,"⋮","\\varvdots"),t(u,d,p,"⋮","\\varvdots"),t(h,d,Bl,"ˊ","\\acute"),t(h,d,Bl,"ˋ","\\grave"),t(h,d,Bl,"¨","\\ddot"),t(h,d,Bl,"~","\\tilde"),t(h,d,Bl,"ˉ","\\bar"),t(h,d,Bl,"˘","\\breve"),t(h,d,Bl,"ˇ","\\check"),t(h,d,Bl,"^","\\hat"),t(h,d,Bl,"⃗","\\vec"),t(h,d,Bl,"˙","\\dot"),t(h,d,Bl,"˚","\\mathring"),t(h,d,Ya,"","\\@imath"),t(h,d,Ya,"","\\@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,Bl,"ˊ","\\'"),t(u,d,Bl,"ˋ","\\`"),t(u,d,Bl,"ˆ","\\^"),t(u,d,Bl,"˜","\\~"),t(u,d,Bl,"ˉ","\\="),t(u,d,Bl,"˘","\\u"),t(u,d,Bl,"˙","\\."),t(u,d,Bl,"¸","\\c"),t(u,d,Bl,"˚","\\r"),t(u,d,Bl,"ˇ","\\v"),t(u,d,Bl,"¨",'\\"'),t(u,d,Bl,"˝","\\H"),t(u,d,Bl,"◯","\\textcircled"),Va={"--":!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"),Ha='0123456789/@."',Ka=0;Ka<Ha.length;Ka++)Xa=Ha.charAt(Ka),t(h,d,p,Xa,Xa);for(Za='0123456789!@*()-=+";:?/.,',Ja=0;Ja<Za.length;Ja++)Qa=Za.charAt(Ja),t(u,d,p,Qa,Qa);for(es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",rs=0;rs<es.length;rs++)ts=es.charAt(rs),t(h,d,Ya,ts,ts),t(u,d,p,ts,ts);for(t(h,f,p,"C","ℂ"),t(u,f,p,"C","ℂ"),t(h,f,p,"H","ℍ"),t(u,f,p,"H","ℍ"),t(h,f,p,"N","ℕ"),t(u,f,p,"N","ℕ"),t(h,f,p,"P","ℙ"),t(u,f,p,"P","ℙ"),t(h,f,p,"Q","ℚ"),t(u,f,p,"Q","ℚ"),t(h,f,p,"R","ℝ"),t(u,f,p,"R","ℝ"),t(h,f,p,"Z","ℤ"),t(u,f,p,"Z","ℤ"),t(h,d,Ya,"h","ℎ"),t(u,d,Ya,"h","ℎ"),is="",as=0;as<es.length;as++)ns=es.charAt(as),is=String.fromCharCode(55349,56320+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56372+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56424+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56580+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56684+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56736+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56788+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56840+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56944+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),as<26&&(is=String.fromCharCode(55349,56632+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is),is=String.fromCharCode(55349,56476+as),t(h,d,Ya,ns,is),t(u,d,p,ns,is));for(t(h,d,Ya,"k",is="𝕜"),t(u,d,p,"k",is),os=0;os<10;os++)ss=os.toString(),is=String.fromCharCode(55349,57294+os),t(h,d,Ya,ss,is),t(u,d,p,ss,is),is=String.fromCharCode(55349,57314+os),t(h,d,Ya,ss,is),t(u,d,p,ss,is),is=String.fromCharCode(55349,57324+os),t(h,d,Ya,ss,is),t(u,d,p,ss,is),is=String.fromCharCode(55349,57334+os),t(h,d,Ya,ss,is),t(u,d,p,ss,is);for(ls="ÐÞþ",hs=0;hs<ls.length;hs++)cs=ls.charAt(hs),t(h,d,Ya,cs,cs),t(u,d,p,cs,cs);us=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ds=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ps=mt(function(e,t){var r,i=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=i&&i<120484)return r=Math.floor((i-119808)/26),[us[r][2],us[r][t]];if(120782<=i&&i<=120831)return r=Math.floor((i-120782)/10),[ds[r][2],ds[r][t]];if(120485==i||120486==i)return[us[0][2],us[0][t]];if(120486<i&&i<120782)return["",""];throw new X("Unsupported character: "+e)},"wideCharacterFont"),gs=mt(function(e,t,r){return{value:e=Wa[r][e]&&Wa[r][e].replace?Wa[r][e].replace:e,metrics:fn(e,t,r)}},"lookupSymbol"),fs=mt(function(e,t,r,i,n){var a=gs(e,t,r),s=a.metrics;return e=a.value,a=s?(a=s.italic,("text"===r||i&&"mathit"===i.font)&&(a=0),new Fa(e,s.height,s.depth,a,s.skew,s.width,n)):(typeof console<"u"&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),new Fa(e,0,0,0,0,0,n)),i&&(a.maxFontSize=i.sizeMultiplier,i.style.isTight()&&a.classes.push("mtight"),s=i.getColor())&&(a.style.color=s),a},"makeSymbol"),el=mt(function(e,t,r,i){return void 0===i&&(i=[]),"boldsymbol"===r.font&&gs(e,"Main-Bold",t).metrics?fs(e,"Main-Bold",t,r,i.concat(["mathbf"])):"\\"===e||"main"===Wa[t][e].font?fs(e,"Main-Regular",t,r,i):fs(e,"AMS-Regular",t,r,i.concat(["amsrm"]))},"mathsym"),ms=mt(function(e,t,r,i,n){return"textord"!==n&&gs(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),gl=mt(function(e,t,r){var i,n,a=e.mode,s=e.text,o=["mord"],l=(e="math"===a||"text"===a&&t.font)?t.font:t.fontFamily,c="",h="";if(55349===s.charCodeAt(0)&&([c,h]=ps(s,a)),0<c.length)return fs(s,c,a,t,o.concat(h));if(l){if(n="boldsymbol"===l?(i=(c=ms(s,a,t,o,r)).fontName,[c.fontClass]):e?(i=Cs[l].fontName,[l]):(i=ks(l,t.fontWeight,t.fontShape),[l,t.fontWeight,t.fontShape]),gs(s,i,a).metrics)return fs(s,i,a,t,o.concat(n));if(Va.hasOwnProperty(s)&&"Typewriter"===i.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(fs(s[d],i,a,t,o.concat(n)));return ws(u)}}if("mathord"===r)return fs(s,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=Wa[a][s]&&Wa[a][s].font)?(c=ks("amsrm",t.fontWeight,t.fontShape),fs(s,c,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))):"main"!==h&&h?(e=ks(h,t.fontWeight,t.fontShape),fs(s,e,a,t,o.concat(e,t.fontWeight,t.fontShape))):(l=ks("textrm",t.fontWeight,t.fontShape),fs(s,l,a,t,o.concat(t.fontWeight,t.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),ys=mt((e,t)=>{if(La(e.classes)!==La(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;t<e.length-1;t++){var r=e[t],i=e[t+1];r instanceof Fa&&i instanceof Fa&&ys(r,i)&&(r.text+=i.text,r.height=Math.max(r.height,i.height),r.depth=Math.max(r.depth,i.depth),r.italic=i.italic,e.splice(t+1,1),t--)}return e},"tryCombineChars"),vs=mt(function(e){for(var t=0,r=0,i=0,n=0;n<e.children.length;n++){var a=e.children[n];a.height>t&&(t=a.height),r<a.depth&&(r=a.depth),i<a.maxFontSize&&(i=a.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=i},"sizeElementFromChildren"),bs=mt(function(e,t,r,i){return e=new Oa(e,t,r,i),vs(e),e},"makeSpan"),xs=mt((e,t,r,i)=>new Oa(e,t,r,i),"makeSvgSpan"),tl=mt(function(e,t,r){return(e=bs([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),hl=mt(function(e,t,r,i){return e=new Pa(e,t,r,i),vs(e),e},"makeAnchor"),ws=mt(function(e){return e=new ya(e),vs(e),e},"makeFragment"),m=mt(function(e,t){return e instanceof ya?bs([],[e],t):e},"wrapFragment"),Ts=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<t.length;a++){var s=-t[a].shift-n-t[a].elem.depth,o=s-(t[a-1].elem.height+t[a-1].elem.depth);n+=s,r.push({type:"kern",size:o}),r.push(t[a])}return{children:r,depth:i}}var l;if("top"===e.positionType){for(var c=e.positionData,h=0;h<e.children.length;h++){var u=e.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{if("elem"!==(i=e.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-i.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-i.elem.depth}}return{children:e.children,depth:l}},"getVListChildrenAndDepth"),$l=mt(function(e,t){for(var{children:r,depth:e}=Ts(e),i=0,n=0;n<r.length;n++){var a=r[n];"elem"===a.type&&(a=a.elem,i=Math.max(i,a.maxFontSize,a.height))}i+=2;var s=bs(["pstrut"],[]);s.style.height=K(i);for(var o=[],l=e,c=e,h=e,u=0;u<r.length;u++){var d,p,g,f=r[u];"kern"===f.type?h+=f.size:(d=f.elem,g=f.wrapperClasses||[],p=f.wrapperStyle||{},(g=bs(g,[s,d],void 0,p)).style.top=K(-i-h-d.depth),f.marginLeft&&(g.style.marginLeft=f.marginLeft),f.marginRight&&(g.style.marginRight=f.marginRight),o.push(g),h+=d.height+d.depth),l=Math.min(l,h),c=Math.max(c,h)}(e=bs(["vlist"],o)).style.height=K(c);var m=l<0?(y=bs([],[]),(y=bs(["vlist"],[y])).style.height=K(-l),m=bs(["vlist-s"],[new Fa("")]),[bs(["vlist-r"],[e,m]),bs(["vlist-r"],[y])]):[bs(["vlist-r"],[e])],y=bs(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),ml=mt((e,t)=>{var r=bs(["mspace"],[],t),e=Ra(e,t);return r.style.marginRight=K(e),r},"makeGlue"),ks=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"),Cs={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"}},Ss={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Bl=mt(function(e,t){var[e,r,i]=Ss[e],e=new qa(e),e=new za([e],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(e=xs(["overlay"],[e],t)).height=i,e.style.height=K(i),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Cs,makeSymbol:fs,mathsym:el,makeSpan:bs,makeSvgSpan:xs,makeLineSpan:tl,makeAnchor:hl,makeFragment:ws,wrapFragment:m,makeVList:$l,makeOrd:gl,makeGlue:ml,staticSvg:Bl,svgData:Ss,tryCombineChars:g},Es={mord:{mop:f={number:3,unit:"mu"},mbin:el={number:4,unit:"mu"},mrel:tl={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:tl,minner:f},mbin:{mord:el,mop:el,mopen:el,minner:el},mrel:{mord:tl,mop:tl,mopen:tl,minner:tl},mopen:{},mclose:{mop:f,mbin:el,mrel:tl,minner:f},mpunct:{mord:f,mop:f,mrel:tl,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:el,mrel:tl,mopen:f,mpunct:f,minner:f}},_s={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},As={},Rs={},Ls={},mt(o,"defineFunction"),mt(bn,"defineFunctionBuilders"),Ns=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),Ds=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),Is=Z.makeSpan,Ms=["leftmost","mbin","mopen","mrel","mop","mpunct"],Os=["rightmost","mrel","mclose","mpunct"],Ps={display:ia.DISPLAY,text:ia.TEXT,script:ia.SCRIPT,scriptscript:ia.SCRIPTSCRIPT},$s={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Bs=mt(function(e,t,r,i){void 0===i&&(i=[null,null]);for(var n,a,s=[],o=0;o<e.length;o++){var l,c=js(e[o],t);c instanceof ya?(l=c.children,s.push(...l)):s.push(c)}return Z.tryCombineChars(s),r&&(n=t,1===e.length&&("sizing"===(a=e[0]).type?n=t.havingSize(a.size):"styling"===a.type&&(n=t.havingStyle(Ps[a.style]))),a=Is([i[0]||"leftmost"],[],t),i=Is([i[1]||"rightmost"],[],t),Fs(s,(e,t)=>{var r=t.classes[0],i=e.classes[0];"mbin"===r&&Vn.contains(Os,i)?t.classes[0]="mord":"mbin"===i&&Vn.contains(Ms,r)&&(e.classes[0]="mord")},{node:a},i,r="root"===r),Fs(s,(e,t)=>{var t=Us(t),r=Us(e);if(e=t&&r?(e.hasClass("mtight")?_s:Es)[t][r]:null)return Z.makeGlue(e,n)},{node:a},i,r)),s},"buildExpression"),Fs=mt(function e(r,t,i,n,a){n&&r.push(n);for(var s=0;s<r.length;s++){var o,l=r[s],c=zs(l);c?e(c.children,t,i,null,a):((c=!l.hasClass("mspace"))&&(o=t(l,i.node))&&(i.insertAfter?i.insertAfter(o):(r.unshift(o),s++)),c?i.node=l:a&&l.hasClass("newline")&&(i.node=Is(["leftmost"])),i.insertAfter=(t=>e=>{r.splice(t+1,0,e),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),zs=mt(function(e){return e instanceof ya||e instanceof Pa||e instanceof Oa&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),qs=mt(function e(t,r){var i=zs(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"),Us=mt(function(e,t){return e&&(t&&(e=qs(e,t)),$s[e.classes[0]])||null},"getTypeOfDomTree"),Gs=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),Is(t.concat(e))},"makeNullDelimiter"),js=mt(function(e,t,r){if(!e)return Is();var i;if(Rs[e.type])return i=Rs[e.type](e,t),r&&t.size!==r.size&&(i=Is(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(xn,"buildHTMLUnbreakable"),mt(wn,"buildHTML"),mt(Tn,"newDocumentFragment"),Ws=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<this.classes.length&&(t.className=La(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Ys&&this.children[r+1]instanceof Ys){for(var i=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Ys;)i+=this.children[++r].toText();t.appendChild(new Ys(i).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var e,t="<"+this.type;for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=Vn.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+Vn.escape(La(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+("</"+this.type)+">"}toText(){return this.children.map(e=>e.toText()).join("")}},Ys=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Vn.escape(this.toText())}toText(){return this.text}},hl=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?"<mtext>"+this.character+"</mtext>":'<mspace width="'+K(this.width)+'"/>'}toText(){return this.character||" "}},C={MathNode:Ws,TextNode:Ys,SpaceNode:hl,newDocumentFragment:Tn},Vs=mt(function(e,t,r){return!Wa[t][e]||!Wa[t][e].replace||55349===e.charCodeAt(0)||Va.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=Wa[t][e].replace),new C.TextNode(e)},"makeText"),Hs=mt(function(e){return 1===e.length?e[0]:new C.MathNode("mrow",e)},"makeRow"),Xs=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":!Vn.contains(["\\imath","\\jmath"],e=e.text)&&fn(e=Wa[r][e]&&Wa[r][e].replace?Wa[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(kn,"isNumberPunctuation"),Ks=mt(function(e,t,r){var i;if(1===e.length)return i=Qs(e[0],t),r&&i instanceof Ws&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var n,a=[],s=0;s<e.length;s++){var o,l,c=Qs(e[s],t);if(c instanceof Ws&&n instanceof Ws){if("mtext"===c.type&&"mtext"===n.type&&c.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...c.children);continue}if("mn"===c.type&&"mn"===n.type){n.children.push(...c.children);continue}if(kn(c)&&"mn"===n.type){n.children.push(...c.children);continue}"mn"===c.type&&kn(n)?(c.children=[...n.children,...c.children],a.pop()):("msup"===c.type||"msub"===c.type)&&1<=c.children.length&&("mn"===n.type||kn(n))?(o=c.children[0])instanceof Ws&&"mn"===o.type&&(o.children=[...n.children,...o.children],a.pop()):"mi"===n.type&&1===n.children.length&&(o=n.children[0])instanceof Ys&&"̸"===o.text&&("mo"===c.type||"mi"===c.type||"mn"===c.type)&&(l=c.children[0])instanceof Ys&&0<l.text.length&&(l.text=l.text.slice(0,1)+"̸"+l.text.slice(1),a.pop())}a.push(c),n=c}return a},"buildExpression"),Zs=mt(function(e,t,r){return Hs(Ks(e,t,r))},"buildExpressionRow"),Qs=mt(function(e,t){if(!e)return new C.MathNode("mrow");if(Ls[e.type])return Ls[e.type](e,t);throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Cn,"buildMathML"),Js=mt(function(e){return new Sa({style:e.displayMode?ia.DISPLAY:ia.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),eo=mt(function(e,t){var r;return t.displayMode&&(r=["katex-display"],t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Z.makeSpan(r,[e])),e},"displayWrap"),to=mt(function(e,t,r){var i,n=Js(r);return"mathml"===r.output?Cn(e,t,n,r.displayMode,!0):(e="html"===r.output?(i=wn(e,n),Z.makeSpan(["katex"],[i])):(i=Cn(e,t,n,r.displayMode,!1),t=wn(e,n),Z.makeSpan(["katex"],[i,t])),eo(e,r))},"buildTree"),ro=mt(function(e,t,r){return e=wn(e,Js(r)),e=Z.makeSpan(["katex"],[e]),eo(e,r)},"buildHTMLTree"),io={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},m=mt(function(e){return(e=new C.MathNode("mo",[new C.TextNode(io[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e},"mathMLnode"),no={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},ao=mt(function(e){return"ordgroup"===e.type?e.body.length:1},"groupLength"),$l=mt(function(f,m){function e(){var e,t,r=4e5,i=f.label.slice(1);if(Vn.contains(["widehat","widecheck","widetilde","utilde"],i))return t=5<(t=ao(f.base))?"widehat"===i||"widecheck"===i?(a=420,r=2364,e=.42,i+"4"):(a=312,r=2340,e=.34,"tilde4"):(t=[1,1,2,2,3,3][t],"widehat"===i||"widecheck"===i?(r=[0,1062,2364,2364,2364][t],a=[0,239,300,360,420][t],e=[0,.24,.3,.3,.36,.42][t],i+t):(r=[0,600,1033,2339,2340][t],a=[0,260,286,306,312][t],e=[0,.26,.286,.3,.306,.34][t],"tilde"+t)),t=new qa(t),t=new za([t],{width:"100%",height:K(e),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[t],m),minWidth:0,height:e};var n=[],a=no[i],[s,o,l]=a,c=l/1e3,h=s.length;if(1===h)var u=["hide-tail"],d=[a[3]];else if(2===h)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error(`Correct katexImagesData or update code here to support
|
||
`+h+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var p=0;p<h;p++){var g=new qa(s[p]),g=new za([g],{width:"400em",height:K(c),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===h)return{span:g,minWidth:o,height:c};g.style.height=K(c),n.push(g)}return{span:Z.makeSpan(["stretchy"],n,m),minWidth:o,height:c}}mt(e,"buildSvgSpan_");var{span:t,minWidth:r,height:i}=e();return t.height=i,t.style.height=K(i),0<r&&(t.style.minWidth=K(r)),t},"svgSpan"),gl=mt(function(e,t,r,i,n){var a,e=e.height+e.depth+r+i;return/fbox|color|angl/.test(t)?(a=Z.makeSpan(["stretchy",t],[],n),"fbox"===t&&(r=n.color&&n.getColor())&&(a.style.borderColor=r)):(i=[],/^[bx]cancel$/.test(t)&&i.push(new Ua({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&i.push(new Ua({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new za(i,{width:"100%",height:K(e)}),a=Z.makeSvgSpan([],[r],n)),a.height=e,a.style.height=K(e),a},"encloseSpan"),so={encloseSpan:gl,mathMLnode:m,svgSpan:$l},mt(Sn,"assertNodeType"),mt(En,"assertSymbolNodeType"),mt(_n,"checkSymbolNodeType"),oo=mt((e,t)=>{e&&"supsub"===e.type?(o=(r=Sn(e.base,"accent")).base,e.base=o,i=vn(js(e,t)),e.base=r):o=(r=Sn(e,"accent")).base;var r,i,n,a,e=js(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&Vn.isCharacterBox(o)&&(o=Vn.getBaseElem(o),s=yn(js(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=so.svgSpan(r,t),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+K(2*s)+")",marginLeft:K(2*s)}:void 0}]},t)):("\\vec"===r.label?(a=Z.staticSvg("vec",t),n=Z.svgData.vec[1]):((a=yn(a=Z.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,n=a.width,o&&(l+=a.depth)),c=Z.makeSpan(["accent-body"],[a]),(o="\\textcircled"===r.label)&&(c.classes.push("accent-full"),l=e.height),a=s,o||(a-=n/2),c.style.left=K(a),"\\textcircled"===r.label&&(c.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:-l},{type:"elem",elem:c}]},t)),s=Z.makeSpan(["mord","accent"],[c],t);return i?(i.children[0]=s,i.height=Math.max(s.height,i.height),i.classes[0]="mord",i):s},"htmlBuilder$a"),ml=mt((e,t)=>{var r=e.isStretchy?so.mathMLnode(e.label):new C.MathNode("mo",[Vs(e.label,e.mode)]);return(e=new C.MathNode("mover",[Qs(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),lo=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=Ns(t[0]),r=!lo.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:oo,mathmlBuilder:ml}),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:oo,mathmlBuilder:ml}),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=js(e.base,t),i=so.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=so.mathMLnode(e.label);return(e=new C.MathNode("munder",[Qs(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),co=mt(e=>((e=new C.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(js(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(js(e.below,n,t),t)).classes.push(s+"-arrow-pad")),so.svgSpan(e,t)),n=-t.fontMetrics().axisHeight+.5*i.height,s=-t.fontMetrics().axisHeight-.5*i.height-.111;return(.25<a.depth||"\\xleftequilibrium"===e.label)&&(s-=a.depth),(r=r?(e=-t.fontMetrics().axisHeight+r.height+.5*i.height+.111,Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:i,shift:n},{type:"elem",elem:r,shift:e}]},t)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:i,shift:n}]},t)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],t)},mathmlBuilder(e,t){var r,i,n=so.mathMLnode(e.label);return n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body?(r=co(Qs(e.body,t)),e.below?(i=co(Qs(e.below,t)),new C.MathNode("munderover",[n,i,r])):new C.MathNode("mover",[n,r])):e.below?(i=co(Qs(e.below,t)),new C.MathNode("munder",[n,i])):(r=co(),new C.MathNode("mover",[n,r]))}}),ho=Z.makeSpan,mt(An,"htmlBuilder$9"),mt(Rn,"mathmlBuilder$8"),o({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+r.slice(5),body:Ds(t),isCharacterBox:Vn.isCharacterBox(t)}},htmlBuilder:An,mathmlBuilder:Rn}),uo=mt(e=>"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:uo(t[0]),body:Ds(t[1]),isCharacterBox:Vn.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?uo(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Ds(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:Vn.isCharacterBox(i)}},htmlBuilder:An,mathmlBuilder:Rn}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:uo(t[0]),body:Ds(t[0])}},htmlBuilder(e,t){var r=Bs(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=Ks(e.body,t),(t=new C.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),po={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},go=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),fo=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),mo=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(Ln,"cdArrow"),mt(Nn,"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(js(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 C.MathNode("mrow",[Qs(e.label,t)]),(t=new C.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new C.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(js(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new C.MathNode("mrow",[Qs(e.fragment,t)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Sn(t[0],"ordgroup").body,i="",n=0;n<r.length;n++)i+=Sn(r[n],"textord").text;if(t=parseInt(i),isNaN(t))throw new X("\\@char has non-numeric argument "+i);if(t<0||1114111<=t)throw new X("\\@char with invalid code point "+i);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),Bl=mt((e,t)=>(t=Bs(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),g=mt((e,t)=>(t=Ks(e.body,t.withColor(e.color)),(t=new C.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=Sn(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:Ds(t[1])}},htmlBuilder:Bl,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Sn(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:Bl,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&&Sn(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(Ra(e.size,t))),r},mathmlBuilder(e,t){var r=new C.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(Ra(e.size,t))),r}}),yo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},vo=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),bo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),xo=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(yo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=yo[r.text]),Sn(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===yo[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=vo(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),bo(e));return xo(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=vo(e.gullet.popToken()),i=e.gullet.popToken(),n=e.gullet.popToken();return xo(e,r,n,"\\\\globalfuture"===t),e.gullet.pushToken(n),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),wo=mt(function(e,t,r){if(r=fn(Wa.math[e]&&Wa.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),To=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"),ko=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"),Co=mt(function(e,t,r,i,n,a){return e=Z.makeSymbol(e,"Main-Regular",n,i),n=To(e,t,i,a),r&&ko(n,i,t),n},"makeSmallDelim"),So=mt(function(e,t,r,i){return Z.makeSymbol(e,"Size"+t+"-Regular",r,i)},"mathrmSize"),Eo=mt(function(e,t,r,i,n,a){return e=So(e,t,n,i),n=To(Z.makeSpan(["delimsizing","size"+t],[e],i),ia.TEXT,i,a),r&&ko(n,i,ia.TEXT),n},"makeLargeDelim"),_o=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"),Ao=mt(function(e,t,r){var i=(va["Size4-Regular"][e.charCodeAt(0)]?va["Size4-Regular"]:va["Size1-Regular"])[e.charCodeAt(0)][4],e=new qa("inner",ga(e,Math.round(1e3*t))),e=new za([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"),Ro={type:"kern",size:-.008},Lo=["|","\\lvert","\\rvert","\\vert"],No=["\\|","\\lVert","\\rVert","\\Vert"],Do=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"):Vn.contains(Lo,e)?(s="∣",c="vert",h=333):Vn.contains(No,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=wo(u,p,n)).height+e.depth),g=(g=wo(s,p,n)).height+g.depth,f=(f=wo(o,p,n)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=wo(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<c.length?(r=t-e-f,v=Math.round(1e3*t),r=ma(c,Math.round(1e3*r)),c=new qa(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new za([c],{width:r,height:l,viewBox:"0 0 "+h+" "+v}),(h=Z.makeSvgSpan([],[c],i)).height=v/1e3,h.style.width=r,h.style.height=l,g.push({type:"elem",elem:h})):(g.push(_o(o,p,n)),g.push(Ro),null===d?g.push(Ao(s,t-e-f+.016,i)):(g.push(Ao(s,c=(t-e-f-m)/2+.016,i)),g.push(Ro),g.push(_o(d,p,n)),g.push(Ro),g.push(Ao(s,c,i))),g.push(Ro),g.push(_o(u,p,n))),i.havingBaseStyle(ia.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return To(Z.makeSpan(["delimsizing","mult"],[r],v),ia.TEXT,i,a)},"makeStackedDelim"),Io=mt(function(e,t,r,i,n){return i=pa(e,i,r),e=new qa(e,i),i=new za([e],{width:"400em",height:K(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[i],n)},"sqrtSvg"),el=mt(function(e,t){var r,i=t.havingBaseSizing(),n=Uo("\\surd",e*i.sizeMultiplier,zo,i),i=i.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,o=0,l=0,n="small"===n.type?(e<1?i=1:e<1.4&&(i=.7),o=(1+a)/i,(r=Io("sqrtMain",s=(1+a+.08)/i,l=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",.833/i):"large"===n.type?(l=1080*$o[n.size],o=($o[n.size]+a)/i,s=($o[n.size]+a+.08)/i,(r=Io("sqrtSize"+n.size,s,l,a,t)).style.minWidth="1.02em",1/i):(s=e+a+.08,o=e+a,l=Math.floor(1e3*e+a)+80,(r=Io("sqrtTall",s,l,a,t)).style.minWidth="0.742em",1.056);return r.height=o,r.style.height=K(s),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},"makeSqrtImage"),Mo=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Oo=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Po=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],$o=[0,1.2,1.8,2.4,3],tl=mt(function(e,t,r,i,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Vn.contains(Mo,e)||Vn.contains(Po,e))return Eo(e,t,!1,r,i,n);if(Vn.contains(Oo,e))return Do(e,$o[t],!1,r,i,n);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),Bo=[{type:"small",style:ia.SCRIPTSCRIPT},{type:"small",style:ia.SCRIPT},{type:"small",style:ia.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Fo=[{type:"small",style:ia.SCRIPTSCRIPT},{type:"small",style:ia.SCRIPT},{type:"small",style:ia.TEXT},{type:"stack"}],zo=[{type:"small",style:ia.SCRIPTSCRIPT},{type:"small",style:ia.SCRIPT},{type:"small",style:ia.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],qo=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"),Uo=mt(function(e,t,r,i){for(var n=Math.min(2,3-i.style.size);n<r.length&&"stack"!==r[n].type;n++){var a=(a=wo(e,qo(r[n]),"math")).height+a.depth;if("small"===r[n].type&&(a*=i.havingBaseStyle(r[n].style).sizeMultiplier),t<a)return r[n]}return r[r.length-1]},"traverseSequence"),Go=mt(function(e,t,r,i,n,a){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=Vn.contains(Po,e)?Bo:Vn.contains(Mo,e)?zo:Fo;return"small"===(s=Uo(e,t,s,i)).type?Co(e,s.style,r,i,n,a):"large"===s.type?Eo(e,s.size,r,i,n,a):Do(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 Go(e,r,!0,i,n,a)},"makeLeftRightDelim"),jo={sqrtImage:el,sizedDelim:tl,sizeToMaxHeight:$o,customSizedDelim:Go,leftRightDelim:f},Wo={"\\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}},Yo=["(","\\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(Dn,"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=Dn(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:Wo[e.funcName].size,mclass:Wo[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):jo.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(Vs(e.delim,e.mode)),new C.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(jo.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(In,"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:Dn(t[0],e).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=Dn(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),Sn(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)=>{In(e);for(var r,i=Bs(e.body,t,!0,["mopen","mclose"]),n=0,a=0,s=!1,o=0;o<i.length;o++)i[o].isMiddle?s=!0:(n=Math.max(i[o].height,n),a=Math.max(i[o].depth,a));if(n*=t.sizeMultiplier,a*=t.sizeMultiplier,r="."===e.left?Gs(t,["mopen"]):jo.leftRightDelim(e.left,n,a,t,e.mode,["mopen"]),i.unshift(r),s)for(var l=1;l<i.length;l++){var c=i[l].isMiddle;c&&(i[l]=jo.leftRightDelim(c.delim,n,a,c.options,e.mode,[]))}return r="."===e.right?Gs(t,["mclose"]):(r=e.rightColor?t.withColor(e.rightColor):t,jo.leftRightDelim(e.right,n,a,r,e.mode,["mclose"])),i.push(r),Z.makeSpan(["minner"],i,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{In(e);var r,t=Ks(e.body,t);return"."!==e.left&&((r=new C.MathNode("mo",[Vs(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new C.MathNode("mo",[Vs(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),Hs(t)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=Dn(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=Gs(t,[]):(r=jo.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?Vs("|","text"):Vs(e.delim,e.mode),(e=new C.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),hl=mt((e,t)=>{var r,i,n,a,s,o=Z.wrapFragment(js(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=Vn.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=Ra({number:.6,unit:"pt"},t),s=Ra({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=ua(c),n=new za([new qa("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=so.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"),gl=mt((e,t)=>{var r=new C.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[Qs(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":var i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*i+"pt"),r.setAttribute("height","+"+2*i+"pt"),r.setAttribute("lspace",i+"pt"),r.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label&&(i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r},"mathmlBuilder$6"),o({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:i}=e,n=Sn(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:i,backgroundColor:n,body:t[1]}},htmlBuilder:hl,mathmlBuilder:gl}),o({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:i}=e,n=Sn(t[0],"color-token").color,a=Sn(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:i,backgroundColor:a,borderColor:n,body:t[2]}},htmlBuilder:hl,mathmlBuilder:gl}),o({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\fbox",body:t[0]}}}),o({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"enclose",mode:e.mode,label:r,body:t}},htmlBuilder:hl,mathmlBuilder:gl}),o({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\angl",body:t[0]}}}),Vo={},mt(Mn,"defineEnvironment"),Ho={},mt(l,"defineMacro"),mt(On,"getHLines"),Xo=mt(e=>{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(Pn,"getAutoTag"),mt($n,"parseArray"),mt(Bn,"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(ia.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?Ra({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;t<e.length;++t)0<t&&(h+=.25),a.push({pos:h,isDashed:e[t]})}for(mt(u,"setHLinePos"),u(P[0]),I=0;I<e.body.length;++I){for(var d=e.body[I],p=B,g=F,f=(i<d.length&&(i=d.length),new Array(d.length)),m=0;m<d.length;++m){var y=js(d[m],t);g<y.depth&&(g=y.depth),p<y.height&&(p=y.height),f[m]=y}var z=e.rowGaps[I],v=0;z&&0<(v=Ra(z,t))&&(g<(v+=F)&&(g=v),v=0),e.addJot&&(g+=$),f.height=p,f.depth=g,h+=p,f.pos=h,h+=g+v,n[I]=f,u(P[I+1])}var b,x,w=h/2+t.fontMetrics().axisHeight,T=e.cols||[],k=[],C=[];if(e.tags&&e.tags.some(e=>e))for(I=0;I<r;++I){var S=n[I],q=S.pos-w,E=e.tags[I],_=void 0;(_=!0===E?Z.makeSpan(["eqn-num"],[],t):!1===E?Z.makeSpan([],[],t):Z.makeSpan([],Bs(E,t,!0),t)).depth=S.depth,_.height=S.height,C.push({type:"elem",elem:_,shift:q})}for(x=m=0;m<i||x<T.length;++m,++x){for(var A=T[x]||{},U=!0;"separator"===A.type;){if(U||((b=Z.makeSpan(["arraycolsep"],[])).style.width=K(t.fontMetrics().doubleRuleSep),k.push(b)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var R="|"===A.separator?"solid":"dashed",L=Z.makeSpan(["vertical-separator"],[],t);L.style.height=K(h),L.style.borderRightWidth=K(s),L.style.borderRightStyle=R,L.style.margin="0 "+K(-s/2),(R=h-w)&&(L.style.verticalAlign=K(-R)),k.push(L),A=T[++x]||{},U=!1}if(!(i<=m)){for(var N=void 0,D=((0<m||e.hskipBeforeAndAfter)&&0!==(N=Vn.deflt(A.pregap,l))&&((b=Z.makeSpan(["arraycolsep"],[])).style.width=K(N),k.push(b)),[]),I=0;I<r;++I){var G,M=n[I],O=M[m];O&&(G=M.pos-w,O.depth=M.depth,O.height=M.height,D.push({type:"elem",elem:O,shift:G}))}D=Z.makeVList({positionType:"individualShift",children:D},t),D=Z.makeSpan(["col-align-"+(A.align||"c")],[D]),k.push(D),(m<i-1||e.hskipBeforeAndAfter)&&0!==(N=Vn.deflt(A.postgap,l))&&((b=Z.makeSpan(["arraycolsep"],[])).style.width=K(N),k.push(b))}}if(n=Z.makeSpan(["mtable"],k),0<a.length){for(var j=Z.makeLineSpan("hline",t,s),W=Z.makeLineSpan("hdashline",t,s),Y=[{type:"elem",elem:n,shift:0}];0<a.length;){var V=a.pop(),H=V.pos-w;Y.push(V.isDashed?{type:"elem",elem:W,shift:H}:{type:"elem",elem:j,shift:H})}n=Z.makeVList({positionType:"individualShift",children:Y},t)}return 0===C.length?Z.makeSpan(["mord"],[n],t):(c=Z.makeVList({positionType:"individualShift",children:C},t),c=Z.makeSpan(["tag"],[c],t),Z.makeFragment([n,c]))},"htmlBuilder"),Ko={c:"center ",l:"left ",r:"right "},$l=mt(function(e,t){for(var r=[],i=new C.MathNode("mtd",[],["mtr-glue"]),n=new C.MathNode("mtd",[],["mml-eqn-num"]),a=0;a<e.body.length;a++){for(var s=e.body[a],o=[],l=0;l<s.length;l++)o.push(new C.MathNode("mtd",[Qs(s[l],t)]));e.tags&&e.tags[a]&&(o.unshift(i),o.push(i),e.leqno?o.unshift(n):o.push(n)),r.push(new C.MathNode("mtr",o))}var c=new C.MathNode("mtable",r),h=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0),h=(c.setAttribute("rowspacing",K(h)),""),u="";if(e.cols&&0<e.cols.length){var d=e.cols,p="",g=!1,f=0,m=d.length;"separator"===d[0].type&&(h+="top ",f=1),"separator"===d[d.length-1].type&&(h+="bottom ",--m);for(var y=f;y<m;y++)"align"===d[y].type?(u+=Ko[d[y].align],g&&(p+="none "),g=!0):"separator"===d[y].type&&g&&(p+="|"===d[y].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var v=e.cols||[],b="",x=1;x<v.length;x++)b+=x%2?"0em ":"1em ";c.setAttribute("columnspacing",b.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");for(var w="",T=e.hLinesBeforeRow,h=(h+=0<T[0].length?"left ":"")+(0<T[T.length-1].length?"right ":""),k=1;k<T.length-1;k++)w+=0===T[k].length?"none ":T[k][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==h&&(c=new C.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new C.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},"mathmlBuilder"),ml=mt(function(e,t){-1===e.envName.indexOf("ed")&&Xo(e);var n,r=[],i=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,i=$n(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:Pn(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,o={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var l="",c=0;c<t[0].body.length;c++)l+=Sn(t[0].body[c],"textord").text;n=Number(l),s=2*n}var h=!s;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=Sn(e[t],"styling");Sn(r.body[0],"ordgroup").body.unshift(o)}if(h)s<e.length&&(s=e.length);else{var i=e.length/2;if(n<i)throw new X("Too many math in a row: expected "+n+", but got "+i,e[0])}});for(var u=0;u<s;++u){var d="r",p=0;u%2==1?d="l":0<u&&h&&(p=1),r[u]={type:"align",align:d,pregap:p,postgap:0}}return i.colSeparationType=h?"align":"alignat",i},"alignedHandler"),Mn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(_n(t[0])?[t[0]]:Sn(t[0],"ordgroup").body).map(function(e){var t=En(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new X("Unknown column alignment: "+t,e)}),hskipBeforeAndAfter:!0,maxNumCols:t.length},$n(e.parser,t,Bn(e.envName))},htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,-1==="lcr".indexOf(r))throw new X("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),i.cols=[{type:"align",align:r}]}}return n=$n(e.parser,i,Bn(e.envName)),i=Math.max(0,...n.body.map(e=>e.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:$l}),Mn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=$n(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(_n(t[0])?[t[0]]:Sn(t[0],"ordgroup").body).map(function(e){var t=En(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=$n(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new X("{subarray} can contain only one column");return e},htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=$n(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Bn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ml,htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Vn.contains(["gather","gather*"],e.envName)&&Xo(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Pn(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return $n(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ml,htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Xo(e);var t={autoTag:Pn(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return $n(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:$l}),Mn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Xo(e),Nn(e.parser)},htmlBuilder:m,mathmlBuilder:$l}),l("\\nonumber","\\gdef\\@eqnsw{0}"),l("\\notag","\\nonumber"),o({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new X(e.funcName+" valid only within array environment")}}),Zo=Vo,o({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:e,funcName:r}=e,i=t[0];if("ordgroup"!==i.type)throw new X("Invalid environment name",i);for(var n="",a=0;a<i.body.length;++a)n+=Sn(i.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:n,nameGroup:i};if(!Zo.hasOwnProperty(n))throw new X("No such environment: "+n,i);var t=Zo[n],{args:r,optArgs:s}=e.parseArguments("\\begin{"+n+"}",t),o={mode:e.mode,envName:n,parser:e},t=t.handler(o,r,s),o=(e.expect("\\end",!1),e.nextToken);if((r=Sn(e.parseFunction(),"environment")).name!==n)throw new X("Mismatch: \\begin{"+n+"} matched by \\end{"+r.name+"}",o);return t}}),Bl=mt((e,t)=>{var r=e.font,t=t.withFont(r);return js(e.body,t)},"htmlBuilder$5"),g=mt((e,t)=>{var r=e.font,t=t.withFont(r);return Qs(e.body,t)},"mathmlBuilder$4"),Qo={"\\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=Ns(t[0]);return{type:"font",mode:e.mode,font:(r=r in Qo?Qo[r]:r).slice(1),body:t}},"handler"),htmlBuilder:Bl,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=Vn.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:uo(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:Bl,mathmlBuilder:g}),Jo=mt((e,t)=>("display"===e?t=t.id>=ia.SCRIPT.id?t.text():ia.DISPLAY:"text"===e&&t.size===ia.DISPLAY.size?t=ia.TEXT:"script"===e?t=ia.SCRIPT:"scriptscript"===e&&(t=ia.SCRIPTSCRIPT),t),"adjustStyle"),el=mt((e,t)=>{var r,i,n,a,s=Jo(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=js(e.numer,o,t),h=(e.continued&&(h=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm,c.height=c.height<h?h:c.height,c.depth=c.depth<u?u:c.depth),o=t.havingStyle(l),js(e.denom,o,t)),u=e.hasBarLine?(i=(a=e.barSize?(i=Ra(e.barSize,t),Z.makeLineSpan("frac-line",t,i)):Z.makeLineSpan("frac-line",t)).height,a.height):(a=null,i=0,t.fontMetrics().defaultRuleThickness),l=s.size===ia.DISPLAY.size||"display"===e.size?(r=t.fontMetrics().num1,n=0<i?3*u:7*u,t.fontMetrics().denom1):(n=0<i?(r=t.fontMetrics().num2,u):(r=t.fontMetrics().num3,3*u),t.fontMetrics().denom2),u=a?(u=t.fontMetrics().axisHeight,r-c.depth-(u+.5*i)<n&&(r+=n-(r-c.depth-(u+.5*i))),u-.5*i-(h.height-l)<n&&(l+=n-(u-.5*i-(h.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:a,shift:-(u-.5*i)},{type:"elem",elem:c,shift:-r}]},t)):((a=r-c.depth-(h.height-l))<n&&(r+=.5*(n-a),l+=.5*(n-a)),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:c,shift:-r}]},t));return o=t.havingStyle(s),u.height*=o.sizeMultiplier/t.sizeMultiplier,u.depth*=o.sizeMultiplier/t.sizeMultiplier,i=s.size===ia.DISPLAY.size?t.fontMetrics().delim1:(s.size===ia.SCRIPTSCRIPT.size?t.havingStyle(ia.SCRIPT):t).fontMetrics().delim2,n=null==e.leftDelim?Gs(t,["mopen"]):jo.customSizedDelim(e.leftDelim,i,!0,t.havingStyle(s),e.mode,["mopen"]),a=e.continued?Z.makeSpan([]):null==e.rightDelim?Gs(t,["mclose"]):jo.customSizedDelim(e.rightDelim,i,!0,t.havingStyle(s),e.mode,["mclose"]),Z.makeSpan(["mord"].concat(o.sizingClasses(t)),[n,Z.makeSpan(["mfrac"],[u]),a],t)},"htmlBuilder$4"),tl=mt((e,t)=>{var r=new C.MathNode("mfrac",[Qs(e.numer,t),Qs(e.denom,t)]),i=(e.hasBarLine?e.barSize&&(i=Ra(e.barSize,t),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),Jo(e.size,t.style));return i.size!==t.style.size&&(r=new C.MathNode("mstyle",[r]),t=i.size===ia.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(i=[],null!=e.leftDelim&&((t=new C.MathNode("mo",[new C.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),i.push(r),null!=e.rightDelim&&((t=new C.MathNode("mo",[new C.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),Hs(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:el,mathmlBuilder:tl}),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}}}),rl=["display","text","script","scriptscript"],il=mt(function(e){var t=null;return 0<e.length?"."===(t=e)?null:e:t},"delimFromValue"),o({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,e=e.parser,i=t[4],n=t[5],a="atom"===(a=Ns(t[0])).type&&"open"===a.family?il(a.text):null,s="atom"===(s=Ns(t[1])).type&&"close"===s.family?il(s.text):null,o=null,l=!!(l=Sn(t[2],"size")).isBlank||0<(o=l.value).number,c="auto";return"ordgroup"===(t=t[3]).type?0<t.body.length&&(r=Sn(t.body[0],"textord"),c=rl[Number(r.text)]):(t=Sn(t,"textord"),c=rl[Number(t.text)]),{type:"genfrac",mode:e.mode,numer:i,denom:n,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:c}},htmlBuilder:el,mathmlBuilder:tl}),o({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:r}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Sn(t[0],"size").value,token:r}}}),o({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:mt((e,t)=>{var e=e.parser,r=t[0],i=Yn(Sn(t[1],"infix").size),t=t[2],n=0<i.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t,continued:!1,hasBarLine:n,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:el,mathmlBuilder:tl}),nl=mt((e,t)=>{var r,i,n=t.style,n="supsub"===e.type?(r=e.sup?js(e.sup,t.havingStyle(n.sup()),t):js(e.sub,t.havingStyle(n.sub()),t),Sn(e.base,"horizBrace")):Sn(e,"horizBrace"),e=js(n.base,t.havingBaseStyle(ia.DISPLAY)),a=so.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=so.mathMLnode(e.label);return new C.MathNode(e.isOver?"mover":"munder",[Qs(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:nl,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=Sn(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:Ds(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=Bs(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=Zs(e.body,t))instanceof Ws?t:new Ws("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=Sn(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var i=[],n=0;n<r.length;n++){var a=r[n];i.push({type:"textord",mode:"text",text:"~"===a?"\\textasciitilde":a})}return t={type:"text",mode:e.mode,font:"\\texttt",body:i},{type:"href",mode:e.mode,href:r,body:Ds(t)}},"handler")}),o({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){return{type:"hbox",mode:(e=e.parser).mode,body:Ds(t[0])}},htmlBuilder(e,t){return e=Bs(e.body,t,!1),Z.makeFragment(e)},mathmlBuilder(e,t){return new C.MathNode("mrow",Ks(e.body,t))}}),o({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,i=Sn(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<s.length;o++){var l=s[o].split("=");if(2!==l.length)throw new X("Error parsing key-value for \\htmlData");a["data-"+l[0].trim()]=l[1].trim()}n={command:"\\htmlData",attributes:a};break;default:throw new Error("Unrecognized html command")}return e.settings.isTrusted(n)?{type:"html",mode:e.mode,attributes:a,body:Ds(t)}:e.formatUnsupportedCmd(r)},"handler"),htmlBuilder:mt((e,t)=>{var r,i=Bs(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)=>Zs(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:Ds(t[0]),mathml:Ds(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=Bs(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>Zs(e.mathml,t),"mathmlBuilder")}),al=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]},Aa(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=Sn(r[0],"raw").string.split(","),l=0;l<o.length;l++){var c=o[l].split("=");if(2===c.length){var h=c[1].trim();switch(c[0].trim()){case"alt":s=h;break;case"width":i=al(h);break;case"height":n=al(h);break;case"totalheight":a=al(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Sn(t[0],"url").url,""===s&&(s=(s=(s=r).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),e.settings.isTrusted({command:"\\includegraphics",url:r})?{type:"includegraphics",mode:e.mode,alt:s,width:i,height:n,totalheight:a,src:r}:e.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:mt((e,t)=>{var r=Ra(e.height,t),i=0,n=(0<e.totalheight.number&&(i=Ra(e.totalheight,t)-r),0),t=(0<e.width.number&&(n=Ra(e.width,t)),{height:K(r+i)});return 0<n&&(t.width=K(n)),0<i&&(t.verticalAlign=K(-i)),(n=new $a(e.src,e.alt,t)).height=r,n.depth=i,n},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=new C.MathNode("mglyph",[]),i=(r.setAttribute("alt",e.alt),Ra(e.height,t)),n=0;return 0<e.totalheight.number&&(n=Ra(e.totalheight,t)-i,r.setAttribute("valign",K(-n))),r.setAttribute("height",K(i+n)),0<e.width.number&&(i=Ra(e.width,t),r.setAttribute("width",K(i))),r.setAttribute("src",e.src),r},"mathmlBuilder")}),o({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var r,i,{parser:e,funcName:n}=e,t=Sn(t[0],"size");return e.settings.strict&&(r="m"===n[1],i="mu"===t.value.unit,r?(i||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+t.value.unit+" units"),"math"!==e.mode&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):i&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")),{type:"kern",mode:e.mode,dimension:t.value}},htmlBuilder(e,t){return Z.makeGlue(e.dimension,t)},mathmlBuilder(e,t){return e=Ra(e.dimension,t),new C.SpaceNode(e)}}),o({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>{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([],[js(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[js(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 C.MathNode("mpadded",[Qs(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)}}),sl=mt((e,t)=>{switch(t.style.size){case ia.DISPLAY.size:return e.display;case ia.TEXT.size:return e.text;case ia.SCRIPT.size:return e.script;case ia.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:Ds(t[0]),text:Ds(t[1]),script:Ds(t[2]),scriptscript:Ds(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=sl(e,t),e=Bs(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=sl(e,t),Zs(e,t)),"mathmlBuilder")}),ol=mt((e,t,r,i,n,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&Vn.isCharacterBox(r);if(t&&(o={elem:t=js(t,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=js(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"),ll=["\\smallint"],cl=mt((e,t)=>{var r,i,n,a=!1,s=("supsub"===e.type?(r=e.sup,i=e.sub,n=Sn(e.base,"op"),a=!0):n=Sn(e,"op"),!1);if((e=t.style).size===ia.DISPLAY.size&&n.symbol&&!Vn.contains(ll,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<c.length&&(o=l.italic,h=Z.staticSvg(c+"Size"+(s?"2":"1"),t),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},t),n.name="\\"+c,l.classes.unshift("mop"),l.italic=o)}else if(n.body){var h=Bs(n.body,t,!0);1===h.length&&h[0]instanceof Fa?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,t)}else{for(var u=[],d=1;d<n.name.length;d++)u.push(Z.mathsym(n.name[d],n.mode,t));l=Z.makeSpan(["mop"],u,t)}return c=s=0,(l instanceof Fa||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(s=(l.height-l.depth)/2-t.fontMetrics().axisHeight,c=l.italic),a?ol(l,r,i,t,e,c,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),hl=mt((e,t)=>{var r;return e.symbol?(r=new Ws("mo",[Vs(e.name,e.mode)]),Vn.contains(ll,e.name)&&r.setAttribute("largeop","false")):r=e.body?new Ws("mo",Ks(e.body,t)):(r=new Ws("mi",[new Ys(e.name.slice(1))]),t=new Ws("mo",[Vs("","text")]),e.parentIsSupSub?new Ws("mrow",[r,t]):Tn([r,t])),r},"mathmlBuilder$1"),ul={"∏":"\\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=ul[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:cl,mathmlBuilder:hl}),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:Ds(t)}),"handler"),htmlBuilder:cl,mathmlBuilder:hl}),dl={"∫":"\\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:cl,mathmlBuilder:hl}),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:cl,mathmlBuilder:hl}),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=dl[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:cl,mathmlBuilder:hl}),pl=mt((e,t)=>{var r,i,n,a,s=!1;if("supsub"===e.type?(r=e.sup,i=e.sub,n=Sn(e.base,"operatorname"),s=!0):n=Sn(e,"operatorname"),0<n.body.length){for(var e=n.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=Bs(e,t.withFont("mathrm"),!0),l=0;l<o.length;l++){var c=o[l];c instanceof Fa&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,t)}else a=Z.makeSpan(["mop"],[],t);return s?ol(a,r,i,t,t.style,0,0):a},"htmlBuilder$1"),gl=mt((e,t)=>{for(var r=Ks(e.body,t.withFont("mathrm")),i=!0,n=0;n<r.length;n++){var a=r[n];if(!(a instanceof C.SpaceNode))if(a instanceof C.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=a.children[0];1===a.children.length&&s instanceof C.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):i=!1;break;default:i=!1}else i=!1}i&&(t=r.map(e=>e.toText()).join(""),r=[new C.TextNode(t)]),(t=new C.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new C.MathNode("mo",[Vs("","text")]);return e.parentIsSupSub?new C.MathNode("mrow",[t,o]):C.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:Ds(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:pl,mathmlBuilder:gl}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),bn({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(Bs(e.body,t,!1)):Z.makeSpan(["mord"],Bs(e.body,t,!0),t)},mathmlBuilder(e,t){return Zs(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=js(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 C.MathNode("mo",[new C.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new C.MathNode("mover",[Qs(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:Ds(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=Bs(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Ks(e.body,t),new C.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([],[js(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var i=0;i<r.children.length;i++)r.children[i].height=0,r.children[i].depth=0;return r=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Z.makeSpan(["mord"],[r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Ks(Ds(e.body),t),t=new C.MathNode("mphantom",e),(e=new C.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"],[js(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Ks(Ds(e.body),t),t=new C.MathNode("mphantom",e),(e=new C.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=Sn(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=js(e.body,t),e=Ra(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new C.MathNode("mpadded",[Qs(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=Sn(t[0],"size"),t=Sn(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Sn(r,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),i=Ra(e.width,t),n=Ra(e.height,t),e=e.shift?Ra(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=Ra(e.width,t),i=Ra(e.height,t),e=e.shift?Ra(e.shift,t):0,t=t.color&&t.getColor()||"black",n=new C.MathNode("mspace"),t=(n.setAttribute("mathbackground",t),n.setAttribute("width",K(r)),n.setAttribute("height",K(i)),new C.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(Fn,"sizingGroup"),fl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],ml=mt((e,t)=>{var r=t.havingSize(e.size);return Fn(e.body,r,t)},"htmlBuilder"),o({type:"sizing",names:fl,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:fl.indexOf(r)+1,body:e}},"handler"),htmlBuilder:ml,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=Ks(e.body,t),(e=new C.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]&&Sn(r[0],"ordgroup");if(a)for(var s,o=0;o<a.body.length;++o)if("t"===(s=a.body[o].text))i=!0;else{if("b"!==s){n=i=!1;break}n=!0}else n=i=!0;return r=t[0],{type:"smash",mode:e.mode,body:r,smashHeight:i,smashDepth:n}},"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[js(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;return e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Z.makeSpan(["mord"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new C.MathNode("mpadded",[Qs(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=js(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.id<ia.TEXT.id?t.fontMetrics().xHeight:i)/4,n=r.height+r.depth+i+n,{span:n,ruleWidth:a,advanceWidth:s}=jo.sqrtImage(n,t),o=((o=n.height-a)>r.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(ia.SCRIPTSCRIPT),r=js(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 C.MathNode("mroot",[Qs(e,t),Qs(r,t)]):new C.MathNode("msqrt",[Qs(e,t)])}}),yl={display:ia.DISPLAY,text:ia.TEXT,script:ia.SCRIPT,scriptscript:ia.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=yl[e.style],r=t.havingStyle(r).withFont("");return Fn(e.body,r,t)},mathmlBuilder(e,t){var r=yl[e.style],t=t.havingStyle(r),r=Ks(e.body,t),t=new C.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}}),vl=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===ia.DISPLAY.size||r.alwaysHandleSupSub)?cl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===ia.DISPLAY.size||r.limits)?pl:null:"accent"===r.type?Vn.isCharacterBox(r.base)?oo:null:"horizBrace"===r.type&&!e.sub===r.isOver?nl:null:null},"htmlBuilderDelegate"),bn({type:"supsub",htmlBuilder(e,t){if(a=vl(e,t))return a(e,t);var r,i,n,{base:a,sup:s,sub:o}=e,l=js(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&Vn.isCharacterBox(a),o=(s&&(n=t.havingStyle(t.style.sup()),r=js(s,n,t),a||(h=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),i=js(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),n=t.style===ia.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 Fa||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)<e&&(u=e-(h-r.depth)+i.height,0<(o=.8*c.xHeight-(h-r.depth)))&&(h+=o,u-=o);var d=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u,marginRight:a,marginLeft:s},{type:"elem",elem:r,shift:-h,marginRight:a}]},t)}else if(i)u=Math.max(u,c.sub1,i.height-.8*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:i,marginLeft:s,marginRight:a}]},t);else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,n,r.depth+.25*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:a}]},t)}return e=Us(l,"right")||"mord",Z.makeSpan([e],[l,Z.makeSpan(["msupsub"],[d])],t)},mathmlBuilder(e,t){var r,i=!1,n=(e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(i=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),[Qs(e.base,t)]);return e.sub&&n.push(Qs(e.sub,t)),e.sup&&n.push(Qs(e.sup,t)),r=i?r?"mover":"munder":e.sub?e.sup?(i=e.base)&&"op"===i.type&&i.limits&&t.style===ia.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===ia.DISPLAY||i.limits)?"munderover":"msubsup":(r=e.base)&&"op"===r.type&&r.limits&&(t.style===ia.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===ia.DISPLAY)?"munder":"msub":(i=e.base)&&"op"===i.type&&i.limits&&(t.style===ia.DISPLAY||i.alwaysHandleSupSub)||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(i.limits||t.style===ia.DISPLAY)?"mover":"msup",new C.MathNode(r,n)}}),bn({type:"atom",htmlBuilder(e,t){return Z.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new C.MathNode("mo",[Vs(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=Xs(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),bl={mi:"italic",mn:"normal",mtext:"normal"},bn({type:"mathord",htmlBuilder(e,t){return Z.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new C.MathNode("mi",[Vs(e.text,e.mode,t)]);return(e=Xs(e,t)||"italic")!==bl[r.type]&&r.setAttribute("mathvariant",e),r}}),bn({type:"textord",htmlBuilder(e,t){return Z.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Vs(e.text,e.mode,t),t=Xs(e,t)||"normal",e="text"===e.mode?new C.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new C.MathNode("mn",[r]):"\\prime"===e.text?new C.MathNode("mo",[r]):new C.MathNode("mi",[r]);return t!==bl[e.type]&&e.setAttribute("mathvariant",t),e}}),xl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},wl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},bn({type:"spacing",htmlBuilder(e,t){var r,i;if(wl.hasOwnProperty(e.text))return r=wl[e.text].className||"","text"===e.mode?((i=Z.makeOrd(e,t,"textord")).classes.push(r),i):Z.makeSpan(["mspace",r],[Z.mathsym(e.text,e.mode,t)],t);if(xl.hasOwnProperty(e.text))return Z.makeSpan(["mspace",xl[e.text]],[],t);throw new X('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(wl.hasOwnProperty(e.text))return new C.MathNode("mtext",[new C.TextNode(" ")]);if(xl.hasOwnProperty(e.text))return new C.MathNode("mspace");throw new X('Unknown type of space "'+e.text+'"')}}),Tl=mt(()=>{var e=new C.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),bn({type:"tag",mathmlBuilder(e,t){return(e=new C.MathNode("mtable",[new C.MathNode("mtr",[Tl(),new C.MathNode("mtd",[Zs(e.body,t)]),Tl(),new C.MathNode("mtd",[Zs(e.tag,t)])])])).setAttribute("width","100%"),e}}),kl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Cl={"\\textbf":"textbf","\\textmd":"textmd"},Sl={"\\textit":"textit","\\textup":"textup"},El=mt((e,t)=>(e=e.font)?kl[e]?t.withTextFontFamily(kl[e]):Cl[e]?t.withTextFontWeight(Cl[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Sl[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:Ds(t),font:r}},htmlBuilder(e,t){return t=El(e,t),e=Bs(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=El(e,t),Zs(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=js(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 C.MathNode("mo",[new C.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new C.MathNode("munder",[Qs(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=js(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 C.MathNode("mpadded",[Qs(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=_l(e),i=[],n=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),i.push(Z.makeSymbol(s,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(n.sizingClasses(t)),Z.tryCombineChars(i),n)},mathmlBuilder(e,t){return e=new C.TextNode(_l(e)),(e=new C.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),_l=mt(e=>e.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Al=As,Rl=new RegExp("[̀-ͯ]+$"),Ll=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 qn("EOF",new zn(this,t,t));if(null===(i=this.tokenRegex.exec(e))||i.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new qn(e[t],new zn(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 qn(i,new zn(this,t,this.tokenRegex.lastIndex))}},Nl=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<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(e,t,r){if(r=void 0!==r&&r){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][e]=t)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(e)&&(r[e]=this.current[e]);null==t?delete this.current[e]:this.current[e]=t}},Dl=Ho,l("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),l("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),l("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),l("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),l("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),l("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),l("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),Il={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},l("\\char",function(e){var t,r,i=e.popToken(),n="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new X("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(null==(n=Il[i.text])||t<=n)throw new X("Invalid base-"+t+" digit "+i.text);for(;null!=(r=Il[e.future().text])&&r<t;)n=n*t+r,e.popToken()}return"\\@char{"+n+"}"}),Ml=mt((e,t,r,i)=>{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=>Ml(e,!1,!0,!1)),l("\\renewcommand",e=>Ml(e,!0,!1,!1)),l("\\providecommand",e=>Ml(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),Al[r],Wa.math[r],Wa.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}}"),Ol={",":"\\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 Ol?t=Ol[e]:("\\not"===e.slice(0,4)||e in Wa.math&&Vn.contains(["bin","rel"],Wa.math[e].group))&&(t="\\dotsb"),t}),Pl={")":!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 Pl?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(e){return(e=e.future().text)in Pl&&","!==e?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(e){return e.future().text in Pl?"\\@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{"+($l=K(va["Main-Regular"][84][1]-.7*va["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+$l+"}{\\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",(Bl=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",Bl(!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}"),Fl={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},zl=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 Nl(Dl,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ll(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 qn("EOF",r.loc)),this.pushTokens(i),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],i=e&&0<e.length,n=(i||this.consumeSpaces(),this.future()),a=0,s=0;do{if(t=this.popToken(),r.push(t),"{"===t.text)++a;else if("}"===t.text){if(-1==--a)throw new X("Extra }",t)}else if("EOF"===t.text)throw new X("Unexpected end of input in a macro argument, expected '"+(e&&i?e[s]:"}")+"'",t);if(e&&i)if((0===a||1===a&&"{"===e[s])&&t.text===e[s]){if(++s===e.length){r.splice(-s,s);break}}else s=0}while(0!==a||i);return"{"===n.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:n,end:t}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new X("The length of delimiters doesn't match the number of args!");for(var r=t[0],i=0;i<r.length;i++){var n=this.popToken();if(r[i]!==n.text)throw new X("Use of the macro doesn't match its definition",n)}}for(var a=[],s=0;s<e;s++)a.push(this.consumeArg(t&&t[s+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.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 qn(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 Ll(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)||Al.hasOwnProperty(e)||Wa.math.hasOwnProperty(e)||Wa.text.hasOwnProperty(e)||Fl.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Al.hasOwnProperty(e)&&!Al[e].primitive}},ql=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ul=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Gl={"́":{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"}},jl={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(Wl=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 zl(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 qn("}")),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&&Al[i.text]&&Al[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<e.length;a++)if("infix"===e[a].type){if(-1!==n)throw new X("only one infix operator per group",e[a].token);t=e[n=a].replaceWith}return-1!==n&&t?(r=e.slice(0,n),i=e.slice(n+1),r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},i=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},["\\\\abovefrac"===t?this.callFunction(t,[r,e[n],i],[]):this.callFunction(t,[r,i],[])]):e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();do{var i=this.parseGroup(e)}while("internal"===(null==i?void 0:i.type));if(i)return i;throw new X("Expected group after '"+r+"'",t)}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var i={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]}}parseAtom(e){var t,r,i=this.parseGroup("atom",e);if("internal"===i?.type||"text"===this.mode)return i;for(;;){this.consumeSpaces();var n=this.fetch();if("\\limits"===n.text||"\\nolimits"===n.text){if(i&&"op"===i.type){var a="\\limits"===n.text;i.limits=a,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new X("Limit controls must follow a math operator",n);i.alwaysHandleSupSub&&(i.limits="\\limits"===n.text)}this.consume()}else if("^"===n.text){if(t)throw new X("Double superscript",n);t=this.handleSupSubscript("superscript")}else if("_"===n.text){if(r)throw new X("Double subscript",n);r=this.handleSupSubscript("subscript")}else if("'"===n.text){if(t)throw new X("Double superscript",n);var s={type:"textord",mode:this.mode,text:"\\prime"},o=[s];for(this.consume();"'"===this.fetch().text;)o.push(s),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:o}}else{if(!Ul[n.text])break;var l=ql.test(n.text),c=[];for(c.push(new qn(Ul[n.text])),this.consume();;){var h=this.fetch().text;if(!Ul[h]||ql.test(h)!==l)break;c.unshift(new qn(Ul[h])),this.consume()}a=this.subparse(c),l?r={type:"ordgroup",mode:"math",body:a}:t={type:"ordgroup",mode:"math",body:a}}}return t||r?{type:"supsub",mode:this.mode,base:i,sup:t,sub:r}:i}parseFunction(e,t){var r=this.fetch(),i=r.text;if(!(n=Al[i]))return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new X("Got function '"+i+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!n.allowedInText)throw new X("Can't use function '"+i+"' in text mode",r);if("math"===this.mode&&!1===n.allowedInMath)throw new X("Can't use function '"+i+"' in math mode",r);var{args:t,optArgs:n}=this.parseArguments(i,n);return this.callFunction(i,t,n,r,e)}callFunction(e,t,r,i,n){var a=Al[e];if(a&&a.handler)return a.handler({funcName:e,parser:this,token:i,breakOnTokenText:n},t,r);throw new X("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var i=[],n=[],a=0;a<r;a++){var s=t.argTypes&&t.argTypes[a],o=a<t.numOptionalArgs,s=((t.primitive&&null==s||"sqrt"===t.type&&1===a&&null==n[0])&&(s="primitive"),this.parseGroupOfType("argument to '"+e+"'",s,o));if(o)n.push(s);else{if(null==s)throw new X("Null argument, please report this as a bug");i.push(s)}}return{args:i,optArgs:n}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var i=this.parseArgumentGroup(r,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;case"raw":return null!=(i=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(r)throw new X("A primitive argument cannot be optional");if(null==(i=this.parseGroup(e)))throw new X("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new X("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){if(null==(t=this.gullet.scanArgument(t)))return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),t.text=i,t}parseRegexGroup(e,t){for(var r,i=this.fetch(),n=i,a="";"EOF"!==(r=this.fetch()).text&&e.test(a+r.text);)a+=(n=r).text,this.consume();if(""===a)throw new X("Invalid "+t+": '"+i.text+"'",i);return i.range(n,a)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(t)return t=t[0],/^[0-9a-f]{6}$/i.test(t)&&(t="#"+t),{type:"color-token",mode:this.mode,color:t};throw new X("Invalid color: '"+e.text+"'",e)}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(e||0!==t.text.length||(t.text="0pt",r=!0),!(e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text)))throw new X("Invalid size: '"+t.text+"'",t);if(e={number:+(e[1]+e[2]),unit:e[3]},Aa(e))return{type:"size",mode:this.mode,value:e,isBlank:r};throw new X("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),e=this.parseStringGroup("url",e),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var r,i;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),i=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:i},t&&this.switchMode(r),e)}parseGroup(e,t){var r=this.fetch(),i=r.text;if("{"===i||"\\begingroup"===i){this.consume();var n="{"===i?"}":"\\endgroup",a=(this.gullet.beginGroup(),this.parseExpression(!1,n)),s=this.fetch();this.expect(n),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:zn.range(r,s),body:a,semisimple:"\\begingroup"===i||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!Fl.hasOwnProperty(i)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+i,r);n=this.formatUnsupportedCmd(i),this.consume()}return n}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var i=e[r],n=i.text;"-"===n&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:zn.range(i,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:zn.range(i,e[r+1]),text:"--"}),--t)),"'"!==n&&"`"!==n||e[r+1].text!==n||(e.splice(r,2,{type:"textord",mode:"text",loc:zn.range(i,e[r+1]),text:n+n}),--t)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){if(this.consume(),(i=(n="*"===(i=t.slice(5)).charAt(0))?i.slice(1):i).length<2||i.charAt(0)!==i.slice(-1))throw new X(`\\verb assertion failed --
|
||
please report what input caused this bug`);return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:n}}jl.hasOwnProperty(t[0])&&!Wa[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=jl[t[0]]+t.slice(1));var r=Rl.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),Wa[this.mode][t]){this.settings.strict&&"math"===this.mode&&0<=ls.indexOf(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i=Wa[this.mode][t].group,n=zn.range(e),a=Ga.hasOwnProperty(i)?{type:"atom",mode:this.mode,family:i,loc:n,text:t}:{type:i,mode:this.mode,loc:n,text:t}}else{if(!(128<=t.charCodeAt(0)))return null;this.settings.strict&&(pn(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),a={type:"textord",mode:"text",loc:zn.range(e),text:t}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!Gl[o])throw new X("Unknown accent ' "+o+"'",e);var l=Gl[o][this.mode]||Gl[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:zn.range(e),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],Yl=mt(function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new Wl(e,t)).gullet.macros.current["\\df@tag"];var r=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:e.subparse([new qn("\\df@tag")])}]}return r},"parseTree"),Vl=mt(function(e,t,r){t.textContent="",e=Zl(e,r).toNode(),t.appendChild(e)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Vl=mt(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),Hl=mt(function(e,t){return Zl(e,t).toMarkup()},"renderToString"),Xl=mt(function(e,t){return t=new Xn(t),Yl(e,t)},"generateParseTree"),Kl=mt(function(e,t,r){if(!r.throwOnError&&e instanceof X)return(t=Z.makeSpan(["katex-error"],[new Fa(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e},"renderError"),Zl=mt(function(e,t){t=new Xn(t);try{var r=Yl(e,t);return to(r,e,t)}catch(r){return Kl(r,e,t)}},"renderToDomTree"),Ql=mt(function(e,t){t=new Xn(t);try{var r=Yl(e,t);return ro(r,e,t)}catch(r){return Kl(r,e,t)}},"renderToHTMLTree"),tc={version:Jl="0.16.22",render:Vl,renderToString:Hl,ParseError:X,SETTINGS_SCHEMA:Hn,__parse:Xl,__renderToDomTree:Zl,__renderToHTMLTree:Ql,__setFontMetrics:gn,__defineSymbol:t,__defineFunction:o,__defineMacro:l,__domTree:ec={Span:Oa,Anchor:Pa,SymbolNode:Fa,SvgNode:za,PathNode:qa,LineNode:Ua}}});function ic(){let t="data-temp-href-target";on.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),on.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 nc,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,bc,xc,wc,Tc,kc,Cc,Sc,Ec,_c,Ac,L,Rc,Lc,Nc,Dc,Ic,Mc,Oc,Pc=x(()=>{ln(),nc=/<br\s*\/?>/gi,ac=mt(e=>e?gc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),sc=(()=>{let e=!1;return()=>{e||(ic(),e=!0)}})(),mt(ic,"setupDompurifyHooks"),oc=mt(e=>(sc(),on.sanitize(e)),"removeScript"),lc=mt((e,t)=>(!1!==t.flowchart?.htmlLabels&&("antiscript"===(t=t.securityLevel)||"strict"===t?e=oc(e):"loose"!==t&&(e=(e=(e=gc(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=pc(e))),e),"sanitizeMore"),cc=mt((e,t)=>e&&(t.dompurifyConfig?on.sanitize(lc(e,t),t.dompurifyConfig):on.sanitize(lc(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),hc=mt((e,t)=>"string"==typeof e?cc(e,t):e.flat().map(e=>cc(e,t)),"sanitizeTextOrArray"),uc=mt(e=>nc.test(e),"hasBreaks"),dc=mt(e=>e.split(nc),"splitBreaks"),pc=mt(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),gc=mt(e=>e.replace(nc,"#br#"),"breakToPlaceholder"),fc=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"),mc=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),yc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),vc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),bc=mt(function(e){var r,i,n=e.split(/(,)/),a=[];for(let t=0;t<n.length;t++){let e=n[t];","===e&&0<t&&t+1<n.length&&(r=n[t-1],i=n[t+1],wc(r,i))&&(e=r+","+i,t++,a.pop()),a.push(Tc(e))}return a.join("")},"parseGenericTypes"),xc=mt((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),wc=mt((e,t)=>(e=xc(e,"~"),t=xc(t,"~"),1===e&&1===t),"shouldCombineSets"),Tc=mt(e=>{let t=xc(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"),kc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Cc=/\$\$(.*)\$\$/g,Sc=mt(e=>0<(e.match(Cc)?.length??0),"hasKatex"),Ec=mt(async(e,t)=>{var r=document.createElement("div"),e=(r.innerHTML=await Ac(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"),_c=mt(async(e,t)=>{if(!Sc(e))return e;if(!(kc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Cc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(rc(),cn))).default,i=t.forceLegacyMathML||!kc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(nc).map(e=>Sc(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(Cc,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ac=mt(async(e,t)=>cc(await _c(e,t),t),"renderKatexSanitized"),L={getRows:ac,sanitizeText:cc,sanitizeTextOrArray:hc,hasBreaks:uc,splitBreaks:dc,lineBreakRegex:nc,removeScript:oc,getUrl:fc,evaluate:mc,getMax:yc,getMin:vc}}),$c=x(()=>{mr(),ii(),Pc(),e(),Rc={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Lc=new Map,Nc=new Map,Dc=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)Nc.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.');Lc.set(t.name,t.icons)}}},"registerIconPacks"),Ic=mt(async(e,t)=>{var r=A(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=Lc.get(t);if(!i){var n=Nc.get(t);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:t},Lc.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"),Mc=mt(async e=>{try{return await Ic(e),!0}catch{return!1}},"isIconAvailable"),Oc=mt(async(e,t,r)=>{let i;try{i=await Ic(e,t?.fallbackPrefix)}catch(e){M.error(e),i=Rc}return t=_e(Te((e=be(i,t)).body),{...e.attributes,...r}),cc(t,sr())},"getIconSVG")});function Bc(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i,n=Array.from("string"==typeof e?[e]:e),e=(n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,""),n.reduce(function(e,t){return(t=t.match(/\n([\t ]+|(?!\s).)/g))?e.concat(t.map(function(e){return null!=(e=null==(e=e.match(/[\t ]/g))?void 0:e.length)?e:0})):e},[])),a=(e.length&&(i=new RegExp(`
|
||
[ ]{`+Math.min.apply(Math,e)+"}","g"),n=n.map(function(e){return e.replace(i,`
|
||
`)})),n[0]=n[0].replace(/^\r?\n/,""),n[0]);return t.forEach(function(e,t){var r=(i=a.match(/(?:^|\n)( *)$/))?i[1]:"",i=e;"string"==typeof e&&e.includes(`
|
||
`)&&(i=String(e).split(`
|
||
`).map(function(e,t){return 0===t?e:""+r+e}).join(`
|
||
`)),a+=i+n[t+1]}),a}var Fc,zc,qc,Uc,Gc,jc,Wc,Yc,Vc,Hc,Xc,Kc,Zc,Qc,Jc,eh,th,rh,ih,nh=x(()=>{mt(Bc,"dedent")}),ah=x(()=>{Fc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,zc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qc=/\s*%%.*\n/gm}),sh=x(()=>{Uc=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),oh=x(()=>{e(),ah(),sh(),Gc={},jc=mt(function(e,t){e=e.replace(Fc,"").replace(zc,"").replace(qc,`
|
||
`);for(var[r,{detector:i}]of Object.entries(Gc))if(i(e,t))return r;throw new Uc("No diagram type detected matching given configuration for text: "+e)},"detectType"),Wc=mt((...e)=>{for(var{id:t,detector:r,loader:i}of e)Yc(t,r,i)},"registerLazyLoadedDiagrams"),Yc=mt((e,t,r)=>{Gc[e]&&M.warn(`Detector with key ${e} already exists. Overwriting.`),Gc[e]={detector:t,loader:r},M.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),Vc=mt(e=>Gc[e].loader,"getDiagramLoader")}),lh=x(()=>{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],w=[1,39],T=[1,40],k=[1,41],C=[1,42],S=[1,43],E=[1,44],_=[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],D=[1,82],I=[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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:D,77:I,79:M,80:O},{35:86,75:81,76:D,77:I,79:M,80:O},{35:87,75:81,76:D,77:I,79:M,80:O},{35:88,75:81,76:D,77:I,79:M,80:O},{35:89,75:81,76:D,77:I,79:M,80:O},{35:90,75:81,76:D,77:I,79:M,80:O},{35:91,75:81,76:D,77:I,79:M,80:O},{35:92,75:81,76:D,77:I,79:M,80:O},{35:93,75:81,76:D,77:I,79:M,80:O},{35:94,75:81,76:D,77:I,79:M,80:O},{35:95,75:81,76:D,77:I,79:M,80:O},{35:96,75:81,76:D,77:I,79:M,80:O},{35:97,75:81,76:D,77:I,79:M,80:O},{35:98,75:81,76:D,77:I,79:M,80:O},{35:99,75:81,76:D,77:I,79:M,80:O},{35:100,75:81,76:D,77:I,79:M,80:O},{35:101,75:81,76:D,77:I,79:M,80:O},{35:102,75:81,76:D,77:I,79:M,80:O},{35:103,75:81,76:D,77:I,79:M,80:O},{35:104,75:81,76:D,77:I,79:M,80:O},e(P,[2,59]),{35:105,75:81,76:D,77:I,79:M,80:O},{35:106,75:81,76:D,77:I,79:M,80:O},{35:107,75:81,76:D,77:I,79:M,80:O},{35:108,75:81,76:D,77:I,79:M,80:O},{35:109,75:81,76:D,77:I,79:M,80:O},{35:110,75:81,76:D,77:I,79:M,80:O},{35:111,75:81,76:D,77:I,79:M,80:O},{35:112,75:81,76:D,77:I,79:M,80:O},{35:113,75:81,76:D,77:I,79:M,80:O},{35:114,75:81,76:D,77:I,79:M,80:O},{35:115,75:81,76:D,77:I,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:D,77:I,79:M,80:O},{35:120,75:81,76:D,77:I,79:M,80:O},{35:121,75:81,76:D,77:I,79:M,80:O},{35:122,75:81,76:D,77:I,79:M,80:O},{35:123,75:81,76:D,77:I,79:M,80:O},{35:124,75:81,76:D,77:I,79:M,80:O},{35:125,75:81,76:D,77:I,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:w,55:T,56:k,57:C,58:S,59:E,60:_,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:D,77:I,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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,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,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};t.lexer=r,mt($,"Parser"),(Hc=new(($.prototype=t).Parser=$)).parser=Hc,Xc=Hc}),ch=x(()=>{e(),Kc=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),Zc=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"),Qc=mt(function(e,t,r,i){t=Zc(t,r,i),Kc(e,t)},"configureSvgSize"),Jc=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)),Qc(t,a,e,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")}),hh=x(()=>{e(),eh={},th=mt((e,t,r)=>{let i="";return e in eh&&eh[e]?i=eh[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"),rh=mt((e,t)=>{void 0!==t&&(eh[e]=t)},"addStylesForDiagram"),ih=th}),uh={};dqe(uh,{clear:()=>mh,getAccDescription:()=>xh,getAccTitle:()=>vh,getDiagramTitle:()=>Th,setAccDescription:()=>bh,setAccTitle:()=>yh,setDiagramTitle:()=>wh});var dh,ph,gh,fh,mh,yh,vh,bh,xh,wh,Th,kh,Ch,O,Sh,Eh,_h,Ah,Rh,Lh,Nh,Dh,Ih,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,wu,Tu,ku=x(()=>{Pc(),ii(),gh=ph=dh="",fh=mt(e=>cc(e,sr()),"sanitizeText"),mh=mt(()=>{ph=gh=dh=""},"clear"),yh=mt(e=>{dh=fh(e).replace(/^\s+/g,"")},"setAccTitle"),vh=mt(()=>dh,"getAccTitle"),bh=mt(e=>{gh=fh(e).replace(/\n\s+/g,`
|
||
`)},"setAccDescription"),xh=mt(()=>gh,"getAccDescription"),wh=mt(e=>{ph=fh(e)},"setDiagramTitle"),Th=mt(()=>ph,"getDiagramTitle")}),Cu=x(()=>{oh(),e(),ii(),Pc(),ch(),hh(),ku(),kh=M,Ch=De,O=sr,Sh=ar,Eh=Xt,_h=mt(e=>cc(e,O()),"sanitizeText"),Ah=Jc,Rh=mt(()=>uh,"getCommonDb"),Lh={},Nh=mt((e,t,r)=>{Lh[e]&&kh.warn(`Diagram with id ${e} already registered. Overwriting.`),Lh[e]=t,r&&Yc(e,r),rh(e,t.styles),t.injectUtils?.(kh,Ch,O,_h,Ah,Rh(),()=>{})},"registerDiagram"),Dh=mt(e=>{if(e in Lh)return Lh[e];throw new Ih(e)},"getDiagram"),Ih=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Su=x(()=>{Cu(),Pc(),ku(),Mh=[],Oh=[""],Bh=[{alias:Ph="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:$h=""}],zh="",qh=!(Fh=[]),Uh=4,Gh=2,Wh=mt(function(){return jh},"getC4Type"),Yh=mt(function(e){jh=cc(e,O())},"setC4Type"),Vh=mt(function(r,i,n,a,s,o,l,c,h){if(null!=r&&null!=i&&null!=n&&null!=a){let e={},t=Fh.find(e=>e.from===i&&e.to===n);t?e=t:Fh.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=mu()}},"addRel"),Hh=mt(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let e={},t=Mh.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,Mh.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=Ph,e.wrap=mu()}},"addPersonOrSystem"),Xh=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=Mh.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,Mh.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=mu(),e.typeC4Shape={text:r},e.parentBoundary=Ph}},"addContainer"),Kh=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=Mh.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,Mh.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=mu(),e.typeC4Shape={text:r},e.parentBoundary=Ph}},"addComponent"),Zh=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=Bh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Bh.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=Ph,e.wrap=mu(),$h=Ph,Ph=r,Oh.push($h)}},"addPersonOrSystemBoundary"),Qh=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=Bh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Bh.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=Ph,e.wrap=mu(),$h=Ph,Ph=r,Oh.push($h)}},"addContainerBoundary"),Jh=mt(function(r,i,n,a,s,e,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.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=Ph,e.wrap=mu(),$h=Ph,Ph=i,Oh.push($h)}},"addDeploymentNode"),eu=mt(function(){Ph=$h,Oh.pop(),$h=Oh.pop(),Oh.push($h)},"popBoundaryParseStack"),tu=mt(function(e,t,r,i,n,a,s,o,l,c,h){let u=Mh.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=Bh.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"),ru=mt(function(e,t,r,i,n,a,s){var o,l,c=Fh.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"),iu=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&&(Uh=t),1<=i&&(Gh=i)},"updateLayoutConfig"),nu=mt(function(){return Uh},"getC4ShapeInRow"),au=mt(function(){return Gh},"getC4BoundaryInRow"),su=mt(function(){return Ph},"getCurrentBoundaryParse"),ou=mt(function(){return $h},"getParentBoundaryParse"),lu=mt(function(t){return null==t?Mh:Mh.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),cu=mt(function(t){return Mh.find(e=>e.alias===t)},"getC4Shape"),hu=mt(function(e){return Object.keys(lu(e))},"getC4ShapeKeys"),uu=mt(function(t){return null==t?Bh:Bh.filter(e=>e.parentBoundary===t)},"getBoundaries"),du=uu,pu=mt(function(){return Fh},"getRels"),gu=mt(function(){return zh},"getTitle"),fu=mt(function(e){qh=e},"setWrap"),mu=mt(function(){return qh},"autoWrap"),yu=mt(function(){Mh=[],Bh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ph="global",Oh=[$h=""],Oh=[zh=""],qh=!(Fh=[]),Uh=4,Gh=2},"clear"),vu={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},bu={FILLED:0,OPEN:1},xu={LEFTOF:0,RIGHTOF:1,OVER:2},wu=mt(function(e){zh=cc(e,O())},"setTitle"),Tu={addPersonOrSystem:Hh,addPersonOrSystemBoundary:Zh,addContainer:Xh,addContainerBoundary:Qh,addComponent:Kh,addDeploymentNode:Jh,popBoundaryParseStack:eu,addRel:Vh,updateElStyle:tu,updateRelStyle:ru,updateLayoutConfig:iu,autoWrap:mu,setWrap:fu,getC4ShapeArray:lu,getC4Shape:cu,getC4ShapeKeys:hu,getBoundaries:uu,getBoundarys:du,getCurrentBoundaryParse:su,getParentBoundaryParse:ou,getRels:pu,getTitle:gu,getC4Type:Wh,getC4ShapeInRow:nu,getC4BoundaryInRow:au,setAccTitle:yh,getAccTitle:vh,getAccDescription:xh,setAccDescription:bh,getConfig:mt(()=>O().c4,"getConfig"),clear:yu,LINETYPE:vu,ARROWTYPE:bu,PLACEMENT:xu,setTitle:wu,setC4Type:Yh}});function Eu(e,t){return null==e||null==t?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var _u=x(()=>{mt(Eu,"ascending")});function Au(e,t){return null==e||null==t?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var Ru=x(()=>{mt(Au,"descending")});function Lu(r){let a,s,n;function o(e,t,r=0,i=e.length){if(r<i){if(0!==a(t,t))return i;do{var n=r+i>>>1}while(s(e[n],t)<0?r=1+n:i=n,r<i)}return r}function e(e,t,r=0,i=e.length){if(r<i){if(0!==a(t,t))return i;do{var n=r+i>>>1}while(s(e[n],t)<=0?r=1+n:i=n,r<i)}return r}function t(e,t,r=0,i=e.length){return r<(i=o(e,t,r,i-1))&&n(e[i-1],t)>-n(e[i],t)?i-1:i}return n=2!==r.length?(a=Eu,s=mt((e,t)=>Eu(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Eu||r===Au?r:Nu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Nu(){return 0}var Du=x(()=>{_u(),Ru(),mt(Lu,"bisector"),mt(Nu,"zero")});function Iu(e){return null===e?NaN:+e}var Mu,Ou,Pu=x(()=>{mt(Iu,"number")}),$u=x(()=>{_u(),Du(),Pu(),Mu=Lu(Eu).right,Lu(Iu).center,Ou=Mu});function Bu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function Fu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function zu({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function qu(e){return null!==e&&"object"==typeof e?e.valueOf():e}var Uu,Gu=x(()=>{Uu=class extends Map{static{mt(this,"InternMap")}constructor(e,t=qu){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(Bu(this,e))}has(e){return super.has(Bu(this,e))}set(e,t){return super.set(Fu(this,e),t)}delete(e){return super.delete(zu(this,e))}},mt(Bu,"intern_get"),mt(Fu,"intern_set"),mt(zu,"intern_delete"),mt(qu,"keyof")});function ju(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=Hu<=a?10:Xu<=a?5:Ku<=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/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=r&&r<2?ju(e,t,2*r):[o,l,c]}function Wu(e,t,r){if(!(0<(r=+r)))return[];if((e=+e)==(t=+t))return[e];var i=t<e,[n,a,s]=i?ju(t,e,r):ju(e,t,r);if(!(n<=a))return[];var o=a-n+1,l=new Array(o);if(i)if(s<0)for(let e=0;e<o;++e)l[e]=(a-e)/-s;else for(let e=0;e<o;++e)l[e]=(a-e)*s;else if(s<0)for(let e=0;e<o;++e)l[e]=(n+e)/-s;else for(let e=0;e<o;++e)l[e]=(n+e)*s;return l}function Yu(e,t,r){return ju(e=+e,t=+t,r=+r)[2]}function Vu(e,t,r){r=+r;var i=(t=+t)<(e=+e);return(i?-1:1)*((e=i?Yu(t,e,r):Yu(e,t,r))<0?1/-e:e)}var Hu,Xu,Ku,Zu=x(()=>{Hu=Math.sqrt(50),Xu=Math.sqrt(10),Ku=Math.sqrt(2),mt(ju,"tickSpec"),mt(Wu,"ticks"),mt(Yu,"tickIncrement"),mt(Vu,"tickStep")});function Qu(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 Ju=x(()=>{mt(Qu,"max")});function ed(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 td=x(()=>{mt(ed,"min")});function rd(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<n;)a[i]=e+i*r;return a}var id=x(()=>{mt(rd,"range")}),nd=x(()=>{$u(),Du(),Ju(),td(),id(),Zu(),Gu()});function ad(e){return e}var sd=x(()=>{mt(ad,"default")});function od(e){return"translate("+e+",0)"}function ld(e){return"translate(0,"+e+")"}function cd(t){return e=>+t(e)}function hd(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function ud(){return!this.__axis}function dd(p,g){var f=[],m=null,y=null,v=6,b=6,x=3,w=typeof window<"u"&&1<window.devicePixelRatio?0:.5,T=p===fd||4===p?-1:1,k=4===p||2===p?"x":"y",C=p===fd||p===md?od:ld;function t(e){var t=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):ad),i=Math.max(v,0)+x,n=+(a=g.range())[0]+w,a=+a[a.length-1]+w,s=(g.bandwidth?hd:cd)(g.copy(),w),o=e.selection?e.selection():e,l=o.selectAll(".domain").data([null]),c=(t=o.selectAll(".tick").data(t,g).order()).exit(),h=t.enter().append("g").attr("class","tick"),u=t.select("line"),d=t.select("text"),l=l.merge(l.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),t=t.merge(h),u=u.merge(h.append("line").attr("stroke","currentColor").attr(k+"2",T*v)),d=d.merge(h.append("text").attr("fill","currentColor").attr(k,T*i).attr("dy",p===fd?"0em":p===md?"0.71em":"0.32em"));e!==o&&(l=l.transition(e),t=t.transition(e),u=u.transition(e),d=d.transition(e),c=c.transition(e).attr("opacity",1e-6).attr("transform",function(e){return isFinite(e=s(e))?C(e+w):this.getAttribute("transform")}),h.attr("opacity",1e-6).attr("transform",function(e){var t=this.parentNode.__axis;return C((t&&isFinite(t=t(e))?t:s(e))+w)})),c.remove(),l.attr("d",4===p||2===p?b?"M"+T*b+","+n+"H"+w+"V"+a+"H"+T*b:"M"+w+","+n+"V"+a:b?"M"+n+","+T*b+"V"+w+"H"+a+"V"+T*b:"M"+n+","+w+"H"+a),t.attr("opacity",1).attr("transform",function(e){return C(s(e)+w)}),u.attr(k+"2",T*v),d.attr(k,T*i).text(r),o.filter(ud).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===p?"start":4===p?"end":"middle"),o.each(function(){this.__axis=s})}return mt(t,"axis"),t.scale=function(e){return arguments.length?(g=e,t):g},t.ticks=function(){return f=Array.from(arguments),t},t.tickArguments=function(e){return arguments.length?(f=null==e?[]:Array.from(e),t):f.slice()},t.tickValues=function(e){return arguments.length?(m=null==e?null:Array.from(e),t):m&&m.slice()},t.tickFormat=function(e){return arguments.length?(y=e,t):y},t.tickSize=function(e){return arguments.length?(v=b=+e,t):v},t.tickSizeInner=function(e){return arguments.length?(v=+e,t):v},t.tickSizeOuter=function(e){return arguments.length?(b=+e,t):b},t.tickPadding=function(e){return arguments.length?(x=+e,t):x},t.offset=function(e){return arguments.length?(w=+e,t):w},t}function pd(e){return dd(fd,e)}function gd(e){return dd(md,e)}var fd,md,yd=x(()=>{sd(),fd=1,md=3,mt(od,"translateX"),mt(ld,"translateY"),mt(cd,"number"),mt(hd,"center"),mt(ud,"entering"),mt(dd,"axis"),mt(pd,"axisTop"),mt(gd,"axisBottom")}),vd=x(()=>{yd()});function bd(){for(var e,t=0,r=arguments.length,i={};t<r;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new xd(i)}function xd(e){this._=e}function wd(e,i){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");if(0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})}function Td(e,t){for(var r,i=0,n=e.length;i<n;++i)if((r=e[i]).name===t)return r.value}function kd(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Cd,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=r&&e.push({name:t,value:r}),e}var Cd,Sd,Ed,_d,Ad=x(()=>{Cd={value:mt(()=>{},"value")},mt(bd,"dispatch"),mt(xd,"Dispatch"),mt(wd,"parseTypenames"),xd.prototype=bd.prototype={constructor:xd,on:mt(function(e,t){var r,i=this._,n=wd(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<s;)if(r=(e=n[a]).type)i[r]=kd(i[r],e.name,t);else if(null==t)for(r in i)i[r]=kd(i[r],e.name,null);return this}for(;++a<s;)if(r=(r=(e=n[a]).type)&&Td(i[r],e.name))return r},"on"),copy:mt(function(){var e,t={},r=this._;for(e in r)t[e]=r[e].slice();return new xd(t)},"copy"),call:mt(function(e,t){if(0<(r=arguments.length-2))for(var r,i,n=new Array(r),a=0;a<r;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,r=(i=this._[e]).length;a<r;++a)i[a].value.apply(t,n)},"call"),apply:mt(function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)},"apply")},mt(Td,"get"),mt(kd,"set"),Sd=bd}),Rd=x(()=>{Ad()}),Ld=x(()=>{_d={svg:"http://www.w3.org/2000/svg",xhtml:Ed="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 Nd(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),_d.hasOwnProperty(t)?{space:_d[t],local:e}:e}var Dd=x(()=>{Ld(),mt(Nd,"default")});function Id(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Ed&&e.documentElement.namespaceURI===Ed?e.createElement(r):e.createElementNS(t,r)}}function Md(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Od(e){return((e=Nd(e)).local?Md:Id)(e)}var Pd=x(()=>{Dd(),Ld(),mt(Id,"creatorInherit"),mt(Md,"creatorFixed"),mt(Od,"default")});function $d(){}function Bd(e){return null==e?$d:function(){return this.querySelector(e)}}var Fd=x(()=>{mt($d,"none"),mt(Bd,"default")});function zd(e){"function"!=typeof e&&(e=Bd(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a,s,o=t[n],l=o.length,c=i[n]=new Array(l),h=0;h<l;++h)(a=o[h])&&(s=e.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),c[h]=s);return new pg(i,this._parents)}var qd=x(()=>{vg(),Fd(),mt(zd,"default")});function Ud(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var Gd=x(()=>{mt(Ud,"array")});function jd(){return[]}function Wd(e){return null==e?jd:function(){return this.querySelectorAll(e)}}var Yd=x(()=>{mt(jd,"empty"),mt(Wd,"default")});function Vd(e){return function(){return Ud(e.apply(this,arguments))}}function Hd(e){e=("function"==typeof e?Vd:Wd)(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s,o=t[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(i.push(e.call(s,s.__data__,c,o)),n.push(s));return new pg(i,n)}var Xd=x(()=>{vg(),Gd(),Yd(),mt(Vd,"arrayAll"),mt(Hd,"default")});function Kd(e){return function(){return this.matches(e)}}function Zd(t){return function(e){return e.matches(t)}}var Qd=x(()=>{mt(Kd,"default"),mt(Zd,"childMatcher")});function Jd(e){return function(){return rp.call(this.children,e)}}function ep(){return this.firstElementChild}function tp(e){return this.select(null==e?ep:Jd("function"==typeof e?e:Zd(e)))}var rp,ip=x(()=>{Qd(),rp=Array.prototype.find,mt(Jd,"childFind"),mt(ep,"childFirst"),mt(tp,"default")});function np(){return Array.from(this.children)}function ap(e){return function(){return op.call(this.children,e)}}function sp(e){return this.selectAll(null==e?np:ap("function"==typeof e?e:Zd(e)))}var op,lp=x(()=>{Qd(),op=Array.prototype.filter,mt(np,"children"),mt(ap,"childrenFilter"),mt(sp,"default")});function cp(e){"function"!=typeof e&&(e=Kd(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a,s=t[n],o=s.length,l=i[n]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new pg(i,this._parents)}var hp=x(()=>{vg(),Qd(),mt(cp,"default")});function up(e){return new Array(e.length)}var dp=x(()=>{mt(up,"default")});function pp(){return new pg(this._enter||this._groups.map(up),this._parents)}function gp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var fp=x(()=>{dp(),vg(),mt(pp,"default"),mt(gp,"EnterNode"),gp.prototype={constructor:gp,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 mp(e){return function(){return e}}var yp=x(()=>{mt(mp,"default")});function vp(e,t,r,i,n,a){for(var s,o=0,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new gp(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function bp(e,t,r,i,n,a,s){for(var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),p=0;p<h;++p)(o=t[p])&&(d[p]=l=s.call(o,o.__data__,p,t)+"",c.has(l)?n[p]=o:c.set(l,o));for(p=0;p<u;++p)l=s.call(e,a[p],p,a)+"",(o=c.get(l))?((i[p]=o).__data__=a[p],c.delete(l)):r[p]=new gp(e,a[p]);for(p=0;p<h;++p)(o=t[p])&&c.get(d[p])===o&&(n[p]=o)}function xp(e){return e.__data__}function wp(e,t){if(!arguments.length)return Array.from(this,xp);var r=t?bp:vp,i=this._parents,n=this._groups;"function"!=typeof e&&(e=mp(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,p=Tp(e.call(h,h&&h.__data__,c,i)),g=p.length,f=o[c]=new Array(g),m=s[c]=new Array(g);r(h,u,f,m,l[c]=new Array(d),p,t);for(var y,v,b=0,x=0;b<g;++b)if(y=f[b]){for(x<=b&&(x=b+1);!(v=m[x])&&++x<g;);y._next=v||null}}return(s=new pg(s,i))._enter=o,s._exit=l,s}function Tp(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var kp=x(()=>{vg(),fp(),yp(),mt(vp,"bindIndex"),mt(bp,"bindKey"),mt(xp,"datum"),mt(wp,"default"),mt(Tp,"arraylike")});function Cp(){return new pg(this._exit||this._groups.map(up),this._parents)}var Sp=x(()=>{dp(),vg(),mt(Cp,"default")});function Ep(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 _p=x(()=>{mt(Ep,"default")});function Ap(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<n;++s)for(var o,l=t[s],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<i;++s)a[s]=t[s];return new pg(a,this._parents)}var Rp=x(()=>{vg(),mt(Ap,"default")});function Lp(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i,n=e[t],a=n.length-1,s=n[a];0<=--a;)(i=n[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this}var Np=x(()=>{mt(Lp,"default")});function Dp(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||Ip,mt(e,"compareNode");for(var t=this._groups,i=t.length,n=new Array(i),a=0;a<i;++a){for(var s,o=t[a],l=o.length,c=n[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(e)}return new pg(n,this._parents).order()}function Ip(e,t){return e<t?-1:t<e?1:t<=e?0:NaN}var Mp=x(()=>{vg(),mt(Dp,"default"),mt(Ip,"ascending")});function Op(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Pp=x(()=>{mt(Op,"default")});function $p(){return Array.from(this)}var Bp=x(()=>{mt($p,"default")});function Fp(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}var zp=x(()=>{mt(Fp,"default")});function qp(){let e=0;for(var t of this)++e;return e}var Up=x(()=>{mt(qp,"default")});function Gp(){return!this.node()}var jp=x(()=>{mt(Gp,"default")});function Wp(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n,a=t[r],s=0,o=a.length;s<o;++s)(n=a[s])&&e.call(n,n.__data__,s,a);return this}var Yp=x(()=>{mt(Wp,"default")});function Vp(e){return function(){this.removeAttribute(e)}}function Hp(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xp(e,t){return function(){this.setAttribute(e,t)}}function Kp(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Zp(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Qp(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 Jp(e,t){var r,e=Nd(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?Hp:Vp:"function"==typeof t?e.local?Qp:Zp:e.local?Kp:Xp)(e,t))}var e0=x(()=>{Dd(),mt(Vp,"attrRemove"),mt(Hp,"attrRemoveNS"),mt(Xp,"attrConstant"),mt(Kp,"attrConstantNS"),mt(Zp,"attrFunction"),mt(Qp,"attrFunctionNS"),mt(Jp,"default")});function t0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var r0=x(()=>{mt(t0,"default")});function i0(e){return function(){this.style.removeProperty(e)}}function n0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function a0(t,r,i){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function s0(e,t,r){return 1<arguments.length?this.each((null==t?i0:"function"==typeof t?a0:n0)(e,t,r??"")):o0(this.node(),e)}function o0(e,t){return e.style.getPropertyValue(t)||t0(e).getComputedStyle(e,null).getPropertyValue(t)}var l0=x(()=>{r0(),mt(i0,"styleRemove"),mt(n0,"styleConstant"),mt(a0,"styleFunction"),mt(s0,"default"),mt(o0,"styleValue")});function c0(e){return function(){delete this[e]}}function h0(e,t){return function(){this[e]=t}}function u0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function d0(e,t){return 1<arguments.length?this.each((null==t?c0:"function"==typeof t?u0:h0)(e,t)):this.node()[e]}var p0=x(()=>{mt(c0,"propertyRemove"),mt(h0,"propertyConstant"),mt(u0,"propertyFunction"),mt(d0,"default")});function g0(e){return e.trim().split(/^|\s+/)}function f0(e){return e.classList||new m0(e)}function m0(e){this._node=e,this._names=g0(e.getAttribute("class")||"")}function y0(e,t){for(var r=f0(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function v0(e,t){for(var r=f0(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function b0(e){return function(){y0(this,e)}}function x0(e){return function(){v0(this,e)}}function w0(e,t){return function(){(t.apply(this,arguments)?y0:v0)(this,e)}}function T0(e,t){var r=g0(e+"");if(arguments.length<2){for(var i=f0(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof t?w0:t?b0:x0)(r,t))}var k0=x(()=>{mt(g0,"classArray"),mt(f0,"classList"),mt(m0,"ClassList"),m0.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(y0,"classedAdd"),mt(v0,"classedRemove"),mt(b0,"classedTrue"),mt(x0,"classedFalse"),mt(w0,"classedFunction"),mt(T0,"default")});function C0(){this.textContent=""}function S0(e){return function(){this.textContent=e}}function E0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function _0(e){return arguments.length?this.each(null==e?C0:("function"==typeof e?E0:S0)(e)):this.node().textContent}var A0=x(()=>{mt(C0,"textRemove"),mt(S0,"textConstant"),mt(E0,"textFunction"),mt(_0,"default")});function R0(){this.innerHTML=""}function L0(e){return function(){this.innerHTML=e}}function N0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function D0(e){return arguments.length?this.each(null==e?R0:("function"==typeof e?N0:L0)(e)):this.node().innerHTML}var I0=x(()=>{mt(R0,"htmlRemove"),mt(L0,"htmlConstant"),mt(N0,"htmlFunction"),mt(D0,"default")});function M0(){this.nextSibling&&this.parentNode.appendChild(this)}function O0(){return this.each(M0)}var P0=x(()=>{mt(M0,"raise"),mt(O0,"default")});function $0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B0(){return this.each($0)}var F0=x(()=>{mt($0,"lower"),mt(B0,"default")});function z0(e){var t="function"==typeof e?e:Od(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var q0=x(()=>{Pd(),mt(z0,"default")});function U0(){return null}function G0(e,t){var r="function"==typeof e?e:Od(e),i=null==t?U0:"function"==typeof t?t:Bd(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var j0=x(()=>{Pd(),Fd(),mt(U0,"constantNull"),mt(G0,"default")});function W0(){var e=this.parentNode;e&&e.removeChild(this)}function Y0(){return this.each(W0)}var V0=x(()=>{mt(W0,"remove"),mt(Y0,"default")});function H0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function X0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function K0(e){return this.select(e?X0:H0)}var Z0=x(()=>{mt(H0,"selection_cloneShallow"),mt(X0,"selection_cloneDeep"),mt(K0,"default")});function Q0(e){return arguments.length?this.property("__data__",e):this.node().__data__}var J0=x(()=>{mt(Q0,"default")});function eg(t){return function(e){t.call(this,e,this.__data__)}}function tg(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 rg(a){return function(){var e=this.__on;if(e){for(var t,r=0,i=-1,n=e.length;r<n;++r)t=e[r],a.type&&t.type!==a.type||t.name!==a.name?e[++i]=t:this.removeEventListener(t.type,t.listener,t.options);++i?e.length=i:delete this.__on}}}function ig(a,s,o){return function(){var e,t=this.__on,r=eg(s);if(t)for(var i=0,n=t.length;i<n;++i)if((e=t[i]).type===a.type&&e.name===a.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=r,e.options=o),void(e.value=s);this.addEventListener(a.type,r,o),e={type:a.type,name:a.name,value:s,listener:r,options:o},t?t.push(e):this.__on=[e]}}function ng(e,t,r){var i,n,a=tg(e+""),s=a.length;if(!(arguments.length<2)){for(o=t?ig:rg,i=0;i<s;++i)this.each(o(a[i],t,r));return this}var o=this.node().__on;if(o)for(var l,c=0,h=o.length;c<h;++c)for(i=0,l=o[c];i<s;++i)if((n=a[i]).type===l.type&&n.name===l.name)return l.value}var ag=x(()=>{mt(eg,"contextListener"),mt(tg,"parseTypenames"),mt(rg,"onRemove"),mt(ig,"onAdd"),mt(ng,"default")});function sg(e,t,r){var i=t0(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 og(e,t){return function(){return sg(this,e,t)}}function lg(e,t){return function(){return sg(this,e,t.apply(this,arguments))}}function cg(e,t){return this.each(("function"==typeof t?lg:og)(e,t))}var hg=x(()=>{r0(),mt(sg,"dispatchEvent"),mt(og,"dispatchConstant"),mt(lg,"dispatchFunction"),mt(cg,"default")});function*ug(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i,n=e[t],a=0,s=n.length;a<s;++a)(i=n[a])&&(yield i)}var dg=x(()=>{mt(ug,"default")});function pg(e,t){this._groups=e,this._parents=t}function gg(){return new pg([[document.documentElement]],mg)}function fg(){return this}var mg,yg,vg=x(()=>{qd(),Xd(),ip(),lp(),hp(),kp(),fp(),Sp(),_p(),Rp(),Np(),Mp(),Pp(),Bp(),zp(),Up(),jp(),Yp(),e0(),l0(),p0(),k0(),A0(),I0(),P0(),F0(),q0(),j0(),V0(),Z0(),J0(),ag(),hg(),dg(),mg=[null],mt(pg,"Selection"),mt(gg,"selection"),mt(fg,"selection_selection"),pg.prototype=gg.prototype={constructor:pg,select:zd,selectAll:Hd,selectChild:tp,selectChildren:sp,filter:cp,data:wp,enter:pp,exit:Cp,join:Ep,merge:Ap,selection:fg,order:Lp,sort:Dp,call:Op,nodes:$p,node:Fp,size:qp,empty:Gp,each:Wp,attr:Jp,style:s0,property:d0,classed:T0,text:_0,html:D0,raise:O0,lower:B0,append:z0,insert:G0,remove:Y0,clone:K0,datum:Q0,on:ng,dispatch:cg,[Symbol.iterator]:ug},yg=gg});function V(e){return"string"==typeof e?new pg([[document.querySelector(e)]],[document.documentElement]):new pg([[e]],mg)}var bg=x(()=>{vg(),mt(V,"default")}),xg=x(()=>{Qd(),Dd(),bg(),vg(),Fd(),Yd(),l0()}),wg=x(()=>{});function Tg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function kg(e,t){var r,i=Object.create(e.prototype);for(r in t)i[r]=t[r];return i}var Cg=x(()=>{mt(Tg,"default"),mt(kg,"extend")});function Sg(){}function Eg(){return this.rgb().formatHex()}function _g(){return this.rgb().formatHex8()}function Ag(){return Gg(this).formatHsl()}function Rg(){return this.rgb().formatRgb()}function Lg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Qg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ng(t):3===r?new Og(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Dg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Dg(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=Jg.exec(e))?new Og(t[1],t[2],t[3],1):(t=ef.exec(e))?new Og(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=tf.exec(e))?Dg(t[1],t[2],t[3],t[4]):(t=rf.exec(e))?Dg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=nf.exec(e))?Ug(t[1],t[2]/100,t[3]/100,1):(t=af.exec(e))?Ug(t[1],t[2]/100,t[3]/100,t[4]):sf.hasOwnProperty(e)?Ng(sf[e]):"transparent"===e?new Og(NaN,NaN,NaN,0):null}function Ng(e){return new Og(e>>16&255,e>>8&255,255&e,1)}function Dg(e,t,r,i){return new Og(e=i<=0?t=r=NaN:e,t,r,i)}function Ig(e){return(e=e instanceof Sg?e:Lg(e))?new Og((e=e.rgb()).r,e.g,e.b,e.opacity):new Og}function Mg(e,t,r,i){return 1===arguments.length?Ig(e):new Og(e,t,r,i??1)}function Og(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function Pg(){return"#"+qg(this.r)+qg(this.g)+qg(this.b)}function $g(){return"#"+qg(this.r)+qg(this.g)+qg(this.b)+qg(255*(isNaN(this.opacity)?1:this.opacity))}function Bg(){var e=Fg(this.opacity);return(1===e?"rgb(":"rgba(")+zg(this.r)+`, ${zg(this.g)}, `+zg(this.b)+(1===e?")":`, ${e})`)}function Fg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qg(e){return((e=zg(e))<16?"0":"")+e.toString(16)}function Ug(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new Wg(e,t,r,i)}function Gg(e){var t,r,i,n,a,s,o,l;return e instanceof Wg?new Wg(e.h,e.s,e.l,e.opacity):(e=e instanceof Sg?e:Lg(e))?e instanceof Wg?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<i):r===a?(i-t)/o+2:(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=0<l&&l<1?0:s,new Wg(s,o,l,e.opacity)):new Wg}function jg(e,t,r,i){return 1===arguments.length?Gg(e):new Wg(e,t,r,i??1)}function Wg(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function Yg(e){return(e=(e||0)%360)<0?e+360:e}function Vg(e){return Math.max(0,Math.min(1,e||0))}function Hg(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}var Xg,Kg,Zg,Qg,Jg,ef,tf,rf,nf,af,sf,of,lf,cf=x(()=>{Cg(),mt(Sg,"Color"),Xg="\\s*([+-]?\\d+)\\s*",Kg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qg=/^#([0-9a-f]{3,8})$/,Jg=new RegExp(`^rgb\\(${Xg},${Xg},${Xg}\\)$`),ef=new RegExp(`^rgb\\(${Zg},${Zg},${Zg}\\)$`),tf=new RegExp(`^rgba\\(${Xg},${Xg},${Xg},${Kg}\\)$`),rf=new RegExp(`^rgba\\(${Zg},${Zg},${Zg},${Kg}\\)$`),nf=new RegExp(`^hsl\\(${Kg},${Zg},${Zg}\\)$`),af=new RegExp(`^hsla\\(${Kg},${Zg},${Zg},${Kg}\\)$`),sf={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},Tg(Sg,Lg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Eg,formatHex:Eg,formatHex8:_g,formatHsl:Ag,formatRgb:Rg,toString:Rg}),mt(Eg,"color_formatHex"),mt(_g,"color_formatHex8"),mt(Ag,"color_formatHsl"),mt(Rg,"color_formatRgb"),mt(Lg,"color"),mt(Ng,"rgbn"),mt(Dg,"rgba"),mt(Ig,"rgbConvert"),mt(Mg,"rgb"),mt(Og,"Rgb"),Tg(Og,Mg,kg(Sg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Og(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Og(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Og(zg(this.r),zg(this.g),zg(this.b),Fg(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:Pg,formatHex:Pg,formatHex8:$g,formatRgb:Bg,toString:Bg})),mt(Pg,"rgb_formatHex"),mt($g,"rgb_formatHex8"),mt(Bg,"rgb_formatRgb"),mt(Fg,"clampa"),mt(zg,"clampi"),mt(qg,"hex"),mt(Ug,"hsla"),mt(Gg,"hslConvert"),mt(jg,"hsl"),mt(Wg,"Hsl"),Tg(Wg,jg,kg(Sg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Wg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Wg(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 Og(Hg(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),Hg(e,r,t),Hg(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new Wg(Yg(this.h),Vg(this.s),Vg(this.l),Fg(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=Fg(this.opacity);return(1===e?"hsl(":"hsla(")+Yg(this.h)+`, ${100*Vg(this.s)}%, ${100*Vg(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(Yg,"clamph"),mt(Vg,"clampt"),mt(Hg,"hsl2rgb")}),hf=x(()=>{of=Math.PI/180,lf=180/Math.PI});function uf(e){var t,r,i,n,a,s;return e instanceof pf?new pf(e.l,e.a,e.b,e.opacity):e instanceof xf?wf(e):(n=gf(.2225045*(t=yf((e=e instanceof Og?e:Ig(e)).r))+.7168786*(r=yf(e.g))+.0606169*(i=yf(e.b))),t===r&&r===i?a=s=n:(a=gf((.4360747*t+.3850649*r+.1430804*i)/.96422),s=gf((.0139322*t+.0971045*r+.7141733*i)/.82521)),new pf(116*n-16,500*(a-n),200*(n-s),e.opacity))}function df(e,t,r,i){return 1===arguments.length?uf(e):new pf(e,t,r,i??1)}function pf(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function gf(e){return Sf<e?Math.pow(e,1/3):e/Cf+Tf}function ff(e){return kf<e?e*e*e:Cf*(e-Tf)}function mf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yf(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vf(e){var t;return e instanceof xf?new xf(e.h,e.c,e.l,e.opacity):0===(e=e instanceof pf?e:uf(e)).a&&0===e.b?new xf(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity):new xf((t=Math.atan2(e.b,e.a)*lf)<0?360+t:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function bf(e,t,r,i){return 1===arguments.length?vf(e):new xf(e,t,r,i??1)}function xf(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function wf(e){var t;return isNaN(e.h)?new pf(e.l,0,0,e.opacity):(t=e.h*of,new pf(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity))}var Tf,kf,Cf,Sf,Ef=x(()=>{Cg(),cf(),hf(),Tf=4/29,Cf=3*(kf=6/29)*kf,Sf=kf*kf*kf,mt(uf,"labConvert"),mt(df,"lab"),mt(pf,"Lab"),Tg(pf,df,kg(Sg,{brighter(e){return new pf(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new pf(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 Og(mf(3.1338561*(t=.96422*ff(t))-1.6168667*(e=+ff(e))-.4906146*(r=.82521*ff(r))),mf(-.9787684*t+1.9161415*e+.033454*r),mf(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(gf,"xyz2lab"),mt(ff,"lab2xyz"),mt(mf,"lrgb2rgb"),mt(yf,"rgb2lrgb"),mt(vf,"hclConvert"),mt(bf,"hcl"),mt(xf,"Hcl"),mt(wf,"hcl2lab"),Tg(xf,bf,kg(Sg,{brighter(e){return new xf(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new xf(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return wf(this).rgb()}}))}),_f=x(()=>{cf(),Ef()});function Af(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 Rf(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<t?s[t-1]:2*r-i,a=t<o-1?s[t+2]:2*i-r;return Af((e-t/o)*o,n,r,i,a)}}var Lf=x(()=>{mt(Af,"basis"),mt(Rf,"default")});function Nf(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 Af((e-t/n)*n,r,i[t%n],i[(t+1)%n],i[(t+2)%n])}}var Df,If=x(()=>{Lf(),mt(Nf,"default")}),Mf=x(()=>{Df=mt(e=>()=>e,"default")});function Of(t,r){return function(e){return t+e*r}}function Pf(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 $f(e,t){var r=t-e;return r?Of(e,180<r||r<-180?r-360*Math.round(r/360):r):Df(isNaN(e)?t:e)}function Bf(r){return 1==(r=+r)?Ff:function(e,t){return t-e?Pf(e,t,r):Df(isNaN(e)?t:e)}}function Ff(e,t){var r=t-e;return r?Of(e,r):Df(isNaN(e)?t:e)}var zf=x(()=>{Mf(),mt(Of,"linear"),mt(Pf,"exponential"),mt($f,"hue"),mt(Bf,"gamma"),mt(Ff,"nogamma")});function qf(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<r;++s)t=Mg(e[s]),i[s]=t.r||0,n[s]=t.g||0,a[s]=t.b||0;return i=o(i),n=o(n),a=o(a),t.opacity=1,function(e){return t.r=i(e),t.g=n(e),t.b=a(e),t+""}}}var Uf,Gf=x(()=>{_f(),Lf(),If(),zf(),Uf=mt(function e(t){var s=Bf(t);function r(t,e){var r=s((t=Mg(t)).r,(e=Mg(e)).r),i=s(t.g,e.g),n=s(t.b,e.b),a=Ff(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(qf,"rgbSpline"),qf(Rf),qf(Nf)});function jf(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<n;++i)a[i]=t[i]*(1-e)+r[i]*e;return a}}function Wf(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var Yf=x(()=>{mt(jf,"default"),mt(Wf,"isNumberArray")});function Vf(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<i;++s)n[s]=o1(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(e){for(s=0;s<i;++s)a[s]=n[s](e);return a}}var Hf=x(()=>{l1(),mt(Vf,"genericArray")});function Xf(t,r){var i=new Date;return t=+t,r=+r,function(e){return i.setTime(t*(1-e)+r*e),i}}var Kf=x(()=>{mt(Xf,"default")});function Zf(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var Qf=x(()=>{mt(Zf,"default")});function Jf(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]=o1(e[r],t[r]):n[r]=t[r];return function(e){for(r in i)n[r]=i[r](e);return n}}var e1=x(()=>{l1(),mt(Jf,"default")});function t1(e){return function(){return e}}function r1(t){return function(e){return t(e)+""}}function i1(e,i){var t,r,n,a=n1.lastIndex=a1.lastIndex=0,s=-1,o=[],l=[];for(e+="",i+="";(t=n1.exec(e))&&(r=a1.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:Zf(t,r)})),a=a1.lastIndex;return a<i.length&&(n=i.slice(a),o[s]?o[s]+=n:o[++s]=n),o.length<2?l[0]?r1(l[0].x):t1(i):(i=l.length,function(e){for(var t,r=0;r<i;++r)o[(t=l[r]).i]=t.x(e);return o.join("")})}var n1,a1,s1=x(()=>{Qf(),n1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a1=new RegExp(n1.source,"g"),mt(t1,"zero"),mt(r1,"one"),mt(i1,"default")});function o1(e,t){var r=typeof t;return null==t||"boolean"==r?Df(t):("number"==r?Zf:"string"==r?(r=Lg(t))?(t=r,Uf):i1:t instanceof Lg?Uf:t instanceof Date?Xf:Wf(t)?jf:Array.isArray(t)?Vf:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Jf:Zf)(e,t)}var l1=x(()=>{_f(),Gf(),Hf(),Kf(),Qf(),e1(),s1(),Mf(),Yf(),mt(o1,"default")});function c1(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var h1=x(()=>{mt(c1,"default")});function u1(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<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*d1,skewX:Math.atan(l)*d1,scaleX:s,scaleY:o}}var d1,p1,g1=x(()=>{d1=180/Math.PI,p1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(u1,"default")});function f1(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?p1:u1(e.a,e.b,e.c,e.d,e.e,e.f)}function m1(e){return null!=e&&((y1=y1||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=y1.transform.baseVal.consolidate())?u1((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):p1}var y1,v1=x(()=>{g1(),mt(f1,"parseCss"),mt(m1,"parseSvg")});function b1(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:Zf(e,r)},{i:s-2,x:Zf(t,i)})):(r||i)&&n.push("translate("+r+o+i+l)}function s(e,t,r,i){e!==t?(180<e-t?t+=360:180<t-e&&(e+=360),i.push({i:r.push(c(r)+"rotate(",null,n)-2,x:Zf(e,t)})):t&&r.push(c(r)+"rotate("+t+n)}function h(e,t,r,i){e!==t?i.push({i:r.push(c(r)+"skewX(",null,n)-2,x:Zf(e,t)}):t&&r.push(c(r)+"skewX("+t+n)}function u(e,t,r,i,n,a){var s;e!==r||t!==i?(s=n.push(c(n)+"scale(",null,",",null,")"),a.push({i:s-4,x:Zf(e,r)},{i:s-2,x:Zf(t,i)})):1===r&&1===i||n.push(c(n)+"scale("+r+","+i+")")}return mt(c,"pop"),mt(i,"translate"),mt(s,"rotate"),mt(h,"skewX"),mt(u,"scale"),function(e,t){var n=[],a=[];return e=r(e),t=r(t),i(e.translateX,e.translateY,t.translateX,t.translateY,n,a),s(e.rotate,t.rotate,n,a),h(e.skewX,t.skewX,n,a),u(e.scaleX,e.scaleY,t.scaleX,t.scaleY,n,a),function(e){for(var t,r=-1,i=a.length;++r<i;)n[(t=a[r]).i]=t.x(e);return n.join("")}}}var x1,w1,T1=x(()=>{Qf(),v1(),mt(b1,"interpolateTransform"),x1=b1(f1,"px, ","px)","deg)"),w1=b1(m1,", ",")",")")});function k1(s){return function(t,e){var r=s((t=bf(t)).h,(e=bf(e)).h),i=Ff(t.c,e.c),n=Ff(t.l,e.l),a=Ff(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 C1,S1=x(()=>{_f(),zf(),mt(k1,"hcl"),C1=k1($f),k1(Ff)}),E1=x(()=>{l1(),Qf(),h1(),s1(),T1(),Gf(),S1()});function _1(){return G1||(Y1(A1),G1=W1.now()+j1)}function A1(){G1=0}function R1(){this._call=this._time=this._next=null}function L1(e,t,r){var i=new R1;return i.restart(e,t,r),i}function N1(){_1(),++P1;for(var e,t=z1;t;)0<=(e=G1-t._time)&&t._call.call(void 0,e),t=t._next;--P1}function D1(){G1=(U1=W1.now())+j1,P1=$1=0;try{N1()}finally{P1=0,M1(),G1=0}}function I1(){var e=W1.now(),t=e-U1;F1<t&&(j1-=t,U1=e)}function M1(){for(var e,t,r=z1,i=1/0;r;)r=r._call?(i>r._time&&(i=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:z1=t);q1=e,O1(i)}function O1(e){P1||($1=$1&&clearTimeout($1),24<e-G1?(e<1/0&&($1=setTimeout(D1,e-W1.now()-j1)),B1=B1&&clearInterval(B1)):(B1||(U1=W1.now(),B1=setInterval(I1,F1)),P1=1,Y1(D1)))}var P1,$1,B1,F1,z1,q1,U1,G1,j1,W1,Y1,V1=x(()=>{F1=1e3,j1=G1=U1=B1=$1=P1=0,W1="object"==typeof performance&&performance.now?performance:Date,Y1="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(_1,"now"),mt(A1,"clearNow"),mt(R1,"Timer"),R1.prototype=L1.prototype={constructor:R1,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?_1():+r)+(null==t?0:+t),this._next||q1===this||(q1?q1._next=this:z1=this,q1=this),this._call=e,this._time=r,O1()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,O1())},"stop")},mt(L1,"timer"),mt(N1,"timerFlush"),mt(D1,"wake"),mt(I1,"poke"),mt(M1,"nap"),mt(O1,"sleep")});function H1(t,r,e){var i=new R1;return r=null==r?0:+r,i.restart(e=>{i.stop(),t(e+r)},r,e),i}var X1=x(()=>{V1(),mt(H1,"default")}),K1=x(()=>{V1(),X1()});function Z1(e,t,r,i,n,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};tm(e,r,{name:t,index:i,group:n,on:rm,tween:im,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:nm})}function Q1(e,t){if((e=em(e,t)).state>nm)throw new Error("too late; already scheduled");return e}function J1(e,t){if((e=em(e,t)).state>om)throw new Error("too late; already running");return e}function em(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function tm(a,s,o){var l,c=a.__transition;function e(e){o.state=am,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!==am)return d();for(t in c)if(n=c[t],n.name===o.name){if(n.state===om)return H1(h);n.state===lm?(n.state=hm,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete c[t]):+t<s&&(n.state=hm,n.timer.stop(),n.on.call("cancel",a,a.__data__,n.index,n.group),delete c[t])}if(H1(function(){o.state===om&&(o.state=lm,o.timer.restart(u,o.delay,o.time),u(e))}),o.state=sm,o.on.call("start",a,a.__data__,o.index,o.group),o.state===sm){for(o.state=om,l=new Array(i=o.tween.length),t=0,r=-1;t<i;++t)(n=o.tween[t].value.call(a,a.__data__,o.index,o.group))&&(l[++r]=n);l.length=r+1}}function u(e){for(var t=e<o.duration?o.ease.call(null,e/o.duration):(o.timer.restart(d),o.state=cm,1),r=-1,i=l.length;++r<i;)l[r].call(a,t);o.state===cm&&(o.on.call("end",a,a.__data__,o.index,o.group),d())}function d(){for(var e in o.state=hm,o.timer.stop(),delete c[s],c)return;delete a.__transition}(c[s]=o).timer=L1(e,0,o.time),mt(e,"schedule"),mt(h,"start"),mt(u,"tick"),mt(d,"stop")}var rm,im,nm,am,sm,om,lm,cm,hm,um=x(()=>{Rd(),K1(),rm=Sd("start","end","cancel","interrupt"),im=[],nm=0,am=1,sm=2,om=3,lm=4,cm=5,hm=6,mt(Z1,"default"),mt(Q1,"init"),mt(J1,"set"),mt(em,"get"),mt(tm,"create")});function dm(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=sm<r.state&&r.state<cm,r.state=hm,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete a[n]);s&&delete e.__transition}}var pm=x(()=>{um(),mt(dm,"default")});function gm(e){return this.each(function(){dm(this,e)})}var fm=x(()=>{pm(),mt(gm,"default")});function mm(n,a){var s,o;return function(){var e=J1(this,n),t=e.tween;if(t!==s)for(var r=0,i=(o=s=t).length;r<i;++r)if(o[r].name===a){(o=o.slice()).splice(r,1);break}e.tween=o}}function ym(a,s,o){var l,c;if("function"!=typeof o)throw new Error;return function(){var e=J1(this,a),t=e.tween;if(t!==l){c=(l=t).slice();for(var r={name:s,value:o},i=0,n=c.length;i<n;++i)if(c[i].name===s){c[i]=r;break}i===n&&c.push(r)}e.tween=c}}function vm(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i,n=em(this.node(),r).tween,a=0,s=n.length;a<s;++a)if((i=n[a]).name===e)return i.value;return null}return this.each((null==t?mm:ym)(r,e,t))}function bm(e,t,r){var i=e._id;return e.each(function(){var e=J1(this,i);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return em(e,i).value[t]}}var xm=x(()=>{um(),mt(mm,"tweenRemove"),mt(ym,"tweenFunction"),mt(vm,"default"),mt(bm,"tweenValue")});function wm(e,t){var r;return("number"==typeof t?Zf:t instanceof Lg?Uf:(r=Lg(t))?(t=r,Uf):i1)(e,t)}var Tm=x(()=>{_f(),E1(),mt(wm,"default")});function km(e){return function(){this.removeAttribute(e)}}function Cm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Sm(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 Em(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 _m(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 Am(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 Rm(e,t){var r=Nd(e),i="transform"===r?w1:wm;return this.attrTween(e,"function"==typeof t?(r.local?Am:_m)(r,i,bm(this,"attr."+e,t)):null==t?(r.local?Cm:km)(r):(r.local?Em:Sm)(r,i,t))}var Lm=x(()=>{E1(),xg(),xm(),Tm(),mt(km,"attrRemove"),mt(Cm,"attrRemoveNS"),mt(Sm,"attrConstant"),mt(Em,"attrConstantNS"),mt(_m,"attrFunction"),mt(Am,"attrFunctionNS"),mt(Rm,"default")});function Nm(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Dm(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function Im(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Dm(t,e):i}return mt(e,"tween"),e._value=r,e}function Mm(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Nm(t,e):i}return mt(e,"tween"),e._value=r,e}function Om(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=Nd(e),this.tween(r,(e.local?Im:Mm)(e,t))}var Pm=x(()=>{xg(),mt(Nm,"attrInterpolate"),mt(Dm,"attrInterpolateNS"),mt(Im,"attrTweenNS"),mt(Mm,"attrTween"),mt(Om,"default")});function $m(e,t){return function(){Q1(this,e).delay=+t.apply(this,arguments)}}function Bm(e,t){return t=+t,function(){Q1(this,e).delay=t}}function Fm(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?$m:Bm)(t,e)):em(this.node(),t).delay}var zm=x(()=>{um(),mt($m,"delayFunction"),mt(Bm,"delayConstant"),mt(Fm,"default")});function qm(e,t){return function(){J1(this,e).duration=+t.apply(this,arguments)}}function Um(e,t){return t=+t,function(){J1(this,e).duration=t}}function Gm(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?qm:Um)(t,e)):em(this.node(),t).duration}var jm=x(()=>{um(),mt(qm,"durationFunction"),mt(Um,"durationConstant"),mt(Gm,"default")});function Wm(e,t){if("function"!=typeof t)throw new Error;return function(){J1(this,e).ease=t}}function Ym(e){var t=this._id;return arguments.length?this.each(Wm(t,e)):em(this.node(),t).ease}var Vm=x(()=>{um(),mt(Wm,"easeConstant"),mt(Ym,"default")});function Hm(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;J1(this,t).ease=e}}function Xm(e){if("function"!=typeof e)throw new Error;return this.each(Hm(this._id,e))}var Km=x(()=>{um(),mt(Hm,"easeVarying"),mt(Xm,"default")});function Zm(e){"function"!=typeof e&&(e=Kd(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a,s=t[n],o=s.length,l=i[n]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new By(i,this._parents,this._name,this._id)}var Qm=x(()=>{xg(),Gy(),mt(Zm,"default")});function Jm(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<n;++s)for(var o,l=t[s],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<i;++s)a[s]=t[s];return new By(a,this._parents,this._name,this._id)}var ey=x(()=>{Gy(),mt(Jm,"default")});function ty(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 ry(r,i,n){var a,s,o=ty(i)?Q1:J1;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(i,n),e.on=s}}function iy(e,t){var r=this._id;return arguments.length<2?em(this.node(),r).on.on(e):this.each(ry(r,e,t))}var ny=x(()=>{um(),mt(ty,"start"),mt(ry,"onFunction"),mt(iy,"default")});function ay(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function sy(){return this.on("end.remove",ay(this._id))}var oy=x(()=>{mt(ay,"removeFunction"),mt(sy,"default")});function ly(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Bd(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o,l,c=i[s],h=c.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=c[d])&&(l=e.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,Z1(u[d],t,r,d,u,em(o,r)));return new By(a,this._parents,t,r)}var cy=x(()=>{xg(),Gy(),um(),mt(ly,"default")});function hy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Wd(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l,c=i[o],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=e.call(l,l.__data__,u,c),g=em(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Z1(d,t,r,f,p,g);a.push(p),s.push(l)}return new By(a,s,t,r)}var uy=x(()=>{xg(),Gy(),um(),mt(hy,"default")});function dy(){return new py(this._groups,this._parents)}var py,gy=x(()=>{xg(),py=yg.prototype.constructor,mt(dy,"default")});function fy(r,i){var n,a,s;return function(){var e=o0(this,r),t=(this.style.removeProperty(r),o0(this,r));return e===t?null:e===n&&t===a?s:s=i(n=e,a=t)}}function my(e){return function(){this.style.removeProperty(e)}}function yy(t,r,i){var n,a,s=i+"";return function(){var e=o0(this,t);return e===s?null:e===n?a:a=r(n=e,i)}}function vy(i,n,a){var s,o,l;return function(){var e=o0(this,i),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(i),r=t=o0(this,i)),e===r?null:e===s&&r===o?l:(o=r,l=n(s=e,t))}}function by(i,n){var a,s,o,l,c="style."+n,h="end."+c;return function(){var e=J1(this,i),t=e.on,r=null==e.value[c]?l=l||my(n):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function xy(e,t,r){var i="transform"==(e+="")?x1:wm;return null==t?this.styleTween(e,fy(e,i)).on("end.style."+e,my(e)):"function"==typeof t?this.styleTween(e,vy(e,i,bm(this,"style."+e,t))).each(by(this._id,e)):this.styleTween(e,yy(e,i,t),r).on("end.style."+e,null)}var wy=x(()=>{E1(),xg(),um(),xm(),Tm(),mt(fy,"styleNull"),mt(my,"styleRemove"),mt(yy,"styleConstant"),mt(vy,"styleFunction"),mt(by,"styleMaybeRemove"),mt(xy,"default")});function Ty(t,r,i){return function(e){this.style.setProperty(t,r.call(this,e),i)}}function ky(t,r,i){var n,a;function e(){var e=r.apply(this,arguments);return n=e!==a?(a=e)&&Ty(t,e,i):n}return mt(e,"tween"),e._value=r,e}function Cy(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,ky(e,t,r??""))}var Sy=x(()=>{mt(Ty,"styleInterpolate"),mt(ky,"styleTween"),mt(Cy,"default")});function Ey(e){return function(){this.textContent=e}}function _y(t){return function(){var e=t(this);this.textContent=e??""}}function Ay(e){return this.tween("text","function"==typeof e?_y(bm(this,"text",e)):Ey(null==e?"":e+""))}var Ry=x(()=>{xm(),mt(Ey,"textConstant"),mt(_y,"textFunction"),mt(Ay,"default")});function Ly(t){return function(e){this.textContent=t.call(this,e)}}function Ny(t){var r,i;function e(){var e=t.apply(this,arguments);return r=e!==i?(i=e)&&Ly(e):r}return mt(e,"tween"),e._value=t,e}function Dy(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,Ny(e))}var Iy=x(()=>{mt(Ly,"textInterpolate"),mt(Ny,"textTween"),mt(Dy,"default")});function My(){for(var e=this._name,t=this._id,r=++qy,i=this._groups,n=i.length,a=0;a<n;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Z1(s,e,r,c,o,{time:(s=em(s,t)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new By(i,this._parents,e,r)}var Oy=x(()=>{Gy(),um(),mt(My,"default")});function Py(){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=J1(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 $y=x(()=>{um(),mt(Py,"default")});function By(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Fy(e){return yg().transition(e)}function zy(){return++qy}var qy,Uy,Gy=x(()=>{xg(),Lm(),Pm(),zm(),jm(),Vm(),Km(),Qm(),ey(),ny(),oy(),cy(),uy(),gy(),wy(),Sy(),Ry(),Iy(),Oy(),xm(),$y(),qy=0,mt(By,"Transition"),mt(Fy,"transition"),mt(zy,"newId"),Uy=yg.prototype,By.prototype=Fy.prototype={constructor:By,select:ly,selectAll:hy,selectChild:Uy.selectChild,selectChildren:Uy.selectChildren,filter:Zm,merge:Jm,selection:dy,transition:My,call:Uy.call,nodes:Uy.nodes,node:Uy.node,size:Uy.size,empty:Uy.empty,each:Uy.each,on:iy,attr:Rm,attrTween:Om,style:xy,styleTween:Cy,text:Ay,textTween:Dy,remove:sy,tween:vm,delay:Fm,duration:Gm,ease:Ym,easeVarying:Xm,end:Py,[Symbol.iterator]:Uy[Symbol.iterator]}});function jy(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Wy=x(()=>{mt(jy,"cubicInOut")}),Yy=x(()=>{Wy()});function Vy(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 Hy(e){var t,r;e=e instanceof By?(t=e._id,e._name):(t=++qy,(r=Xy).time=_1(),null==e?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Z1(s,e,t,c,o,r||Vy(s,t));return new By(i,this._parents,e,t)}var Xy,Ky=x(()=>{Gy(),um(),Yy(),K1(),Xy={time:null,delay:0,duration:250,ease:jy},mt(Vy,"inherit"),mt(Hy,"default")}),Zy=x(()=>{xg(),fm(),Ky(),yg.prototype.interrupt=gm,yg.prototype.transition=Hy}),Qy=x(()=>{Zy()}),Jy=x(()=>{}),e2=x(()=>{}),t2=x(()=>{});function r2(e){return[+e[0],+e[1]]}function i2(e){return[r2(e[0]),r2(e[1])]}function n2(e){return{type:e}}var a2,s2,o2,l2=x(()=>{Qy(),Jy(),e2(),t2(),{abs:a2,max:s2,min:o2}=Math,mt(r2,"number1"),mt(i2,"number2"),["w","e"].map(n2),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(n2),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(n2),mt(function(e){return null==e?null:i2(e)},"input"),mt(function(e){return e},"output"),mt(n2,"type")}),c2=x(()=>{l2()});function h2(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=arguments[e]+r[e]}function u2(e){var t=Math.floor(e);if(!(0<=t))throw new Error("invalid digits: "+e);if(15<t)return h2;let i=10**t;return function(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=Math.round(arguments[e]*i)/i+r[e]}}function d2(){return new y2}var p2,g2,f2,m2,y2,v2=x(()=>{p2=Math.PI,m2=(g2=2*p2)-(f2=1e-6),mt(h2,"append"),mt(u2,"appendRound"),y2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?h2:u2(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}`:f2<p&&(Math.abs(d*c-h*u)>f2&&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((p2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>f2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${n},${n},0,0,${+(u*o<d*r)},${this._x1=e+i*c},${this._y1=t+i*h}`):this._append`L${this._x1=e},${this._y1=t}`)}arc(e,t,r,i,n,a){if(e=+e,t=+t,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var s=r*Math.cos(i),o=r*Math.sin(i),l=e+s,c=t+o,h=1^a,a=a?i-n:n-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>f2||Math.abs(this._y1-c)>f2)&&this._append`L${l},${c}`,r&&((a=a<0?a%g2+g2:a)>m2?this._append`A${r},${r},0,1,${h},${e-s},${t-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:f2<a&&this._append`A${r},${r},0,${+(p2<=a)},${h},${this._x1=e+r*Math.cos(n)},${this._y1=t+r*Math.sin(n)}`)}rect(e,t,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}},mt(d2,"path"),d2.prototype=y2.prototype}),b2=x(()=>{v2()}),x2=x(()=>{}),w2=x(()=>{}),T2=x(()=>{}),k2=x(()=>{}),C2=x(()=>{}),S2=x(()=>{}),E2=x(()=>{});function _2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function A2(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 R2=x(()=>{mt(_2,"default"),mt(A2,"formatDecimalParts")});function L2(e){return(e=A2(Math.abs(e)))?e[1]:NaN}var N2=x(()=>{R2(),mt(L2,"default")});function D2(o,l){return function(e,t){for(var r=e.length,i=[],n=0,a=o[0],s=0;0<r&&0<a&&(t<s+a+1&&(a=Math.max(1,t-s)),i.push(e.substring(r-=a,r+a)),!((s+=a+1)>t));)a=o[n=(n+1)%o.length];return i.reverse().join(l)}}var I2=x(()=>{mt(D2,"default")});function M2(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var O2=x(()=>{mt(M2,"default")});function P2(e){var t;if(t=B2.exec(e))return new $2({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 $2(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 B2,F2=x(()=>{B2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(P2,"formatSpecifier"),P2.prototype=$2.prototype,mt($2,"FormatSpecifier"),$2.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 z2(e){e:for(var t,r=e.length,i=1,n=-1;i<r;++i)switch(e[i]){case".":n=t=i;break;case"0":0===n&&(n=i),t=i;break;default:if(!+e[i])break e;0<n&&(n=0)}return 0<n?e.slice(0,n)+e.slice(t+1):e}var q2=x(()=>{mt(z2,"default")});function U2(e,t){var r,i,n=A2(e,t);return n?(r=n[0],(n=(n=n[1])-(G2=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1)===(i=r.length)?r:i<n?r+new Array(n-i+1).join("0"):0<n?r.slice(0,n)+"."+r.slice(n):"0."+new Array(1-n).join("0")+A2(e,Math.max(0,t+n-1))[0]):e+""}var G2,j2=x(()=>{R2(),mt(U2,"default")});function W2(e,t){var r;return(t=A2(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 Y2,V2=x(()=>{R2(),mt(W2,"default")}),H2=x(()=>{R2(),j2(),V2(),Y2={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:_2,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)=>W2(100*e,t),"p"),r:W2,s:U2,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function X2(e){return e}var K2=x(()=>{mt(X2,"default")});function Z2(e){var T=void 0===e.grouping||void 0===e.thousands?X2:D2(Q2.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+"",C=void 0===e.numerals?X2:M2(Q2.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",S=void 0===e.minus?"−":e.minus+"",E=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=P2(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"):Y2[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=Y2[y],w=/[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)?E:x(Math.abs(e),f),m&&(e=z2(e)),n=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:S:"-"===u||"("===u?"":u)+n,a=("s"===y?J2[8+G2/3]:"")+a+(s&&"("===u?")":""),w)for(t=-1,r=e.length;++t<r;)if((i=e.charCodeAt(t))<48||57<i){a=(46===i?k+e.slice(t+1):e.slice(t))+a,e=e.slice(0,t);break}}g&&!d&&(e=T(e,1/0));var o=n.length+e.length+a.length,l=o<p?new Array(p-o+1).join(c):"";switch(g&&d&&(e=T(l+e,l.length?p-a.length:1/0),l=""),h){case"<":e=n+e+a+l;break;case"=":e=n+l+e+a;break;case"^":e=l.slice(0,o=l.length>>1)+n+e+a+l.slice(o);break;default:e=l+n+e+a}return C(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=P2(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(L2(t)/3))),i=Math.pow(10,-e),n=J2[8+e/3];return function(e){return r(i*e)+n}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var Q2,J2,ev=x(()=>{N2(),I2(),O2(),F2(),q2(),H2(),j2(),K2(),Q2=Array.prototype.map,J2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(Z2,"default")});function tv(e){return rv=Z2(e),iv=rv.format,nv=rv.formatPrefix,rv}var rv,iv,nv,av=x(()=>{ev(),tv({thousands:",",grouping:[3],currency:["$",""]}),mt(tv,"defaultLocale")});function sv(e){return Math.max(0,-L2(Math.abs(e)))}var ov=x(()=>{N2(),mt(sv,"default")});function lv(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(L2(t)/3)))-L2(Math.abs(e)))}var cv=x(()=>{N2(),mt(lv,"default")});function hv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,L2(t)-L2(e))+1}var uv=x(()=>{N2(),mt(hv,"default")}),dv=x(()=>{av(),F2(),ov(),cv(),uv()}),pv=x(()=>{});function gv(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 fv(){return this.eachAfter(gv)}var mv=x(()=>{mt(gv,"count"),mt(fv,"default")});function yv(e,t){let r=-1;for(var i of this)e.call(t,i,++r,this);return this}var vv=x(()=>{mt(yv,"default")});function bv(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 xv=x(()=>{mt(bv,"default")});function wv(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<n;++i)s.push(r[i]);for(;a=o.pop();)e.call(t,a,++l,this);return this}var Tv=x(()=>{mt(wv,"default")});function kv(e,t){let r=-1;for(var i of this)if(e.call(t,i,++r,this))return i}var Cv=x(()=>{mt(kv,"default")});function Sv(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 Ev=x(()=>{mt(Sv,"default")});function _v(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Av=x(()=>{mt(_v,"default")});function Rv(e){for(var t=this,r=Lv(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 Lv(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 Nv=x(()=>{mt(Rv,"default"),mt(Lv,"leastCommonAncestor")});function Dv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Iv=x(()=>{mt(Dv,"default")});function Mv(){return Array.from(this)}var Ov=x(()=>{mt(Mv,"default")});function Pv(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var $v=x(()=>{mt(Pv,"default")});function Bv(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var Fv=x(()=>{mt(Bv,"default")});function*zv(){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<n;++i)a.push(r[i])}while(a.length)}var qv=x(()=>{mt(zv,"default")});function Uv(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Wv)):void 0===t&&(t=jv);for(var r,i,n,a,s,o=[e=new Hv(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 Hv(n[a])),i.parent=r,i.depth=r.depth+1;return e.eachBefore(Vv)}function Gv(){return Uv(this).eachBefore(Yv)}function jv(e){return e.children}function Wv(e){return Array.isArray(e)?e[1]:null}function Yv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Vv(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function Hv(e){this.data=e,this.depth=this.height=0,this.parent=null}var Xv=x(()=>{mv(),vv(),xv(),Tv(),Cv(),Ev(),Av(),Nv(),Iv(),Ov(),$v(),Fv(),qv(),mt(Uv,"hierarchy"),mt(Gv,"node_copy"),mt(jv,"objectChildren"),mt(Wv,"mapChildren"),mt(Yv,"copyData"),mt(Vv,"computeHeight"),mt(Hv,"Node"),Hv.prototype=Uv.prototype={constructor:Hv,count:fv,each:yv,eachAfter:wv,eachBefore:bv,find:kv,sum:Sv,sort:_v,path:Rv,ancestors:Dv,descendants:Mv,leaves:Pv,links:Bv,copy:Gv,[Symbol.iterator]:zv}});function Kv(e){if("function"!=typeof e)throw new Error;return e}var Zv=x(()=>{mt(Kv,"required")});function Qv(){return 0}function Jv(e){return function(){return e}}var eb=x(()=>{mt(Qv,"constantZero"),mt(Jv,"default")});function tb(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 rb=x(()=>{mt(tb,"default")});function ib(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-t)/e.value;++o<l;)(a=s[o]).y0=r,a.y1=n,a.x0=t,a.x1=t+=a.value*c}var nb=x(()=>{mt(ib,"default")});function ab(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-r)/e.value;++o<l;)(a=s[o]).x0=t,a.x1=i,a.y0=r,a.y1=r+=a.value*c}var sb=x(()=>{mt(ab,"default")});function ob(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,w=v.length,T=t.value;b<w;){for(l=n-r,c=a-i;!(h=v[x++].value)&&x<w;);for(m=(u=d=h)*h*(f=Math.max(c/l,l/c)/(T*e)),g=Math.max(d/m,m/u);x<w;++x){if(h+=o=v[x].value,o<u&&(u=o),d<o&&(d=o),m=h*h*f,g<(p=Math.max(d/m,m/u))){h-=o;break}g=p}y.push(s={value:h,dice:l<c,children:v.slice(b,x)}),s.dice?ib(s,r,i,n,T?i+=c*h/T:a):ab(s,r,i,T?r+=l*h/T:n,a),T-=h,b=x}return y}var lb,cb,hb=x(()=>{nb(),sb(),lb=(1+Math.sqrt(5))/2,mt(ob,"squarifyRatio"),cb=mt(function t(a){function e(e,t,r,i,n){ob(a,e,t,r,i,n)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(lb)});function ub(){var s=cb,t=!1,r=1,i=1,o=[0],l=Qv,c=Qv,h=Qv,u=Qv,d=Qv;function n(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(a),o=[0],t&&e.eachBefore(tb),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<r&&(r=n=(r+n)/2),a<i&&(i=a=(i+a)/2),e.x0=r,e.y0=i,e.x1=n,e.y1=a,e.children&&(t=o[e.depth+1]=l(e)/2,r+=d(e)-t,i+=c(e)-t,(n-=h(e)-t)<r&&(r=n=(r+n)/2),(a-=u(e)-t)<i&&(i=a=(i+a)/2),s(e,r,i,n,a))}return mt(n,"treemap"),mt(a,"positionNode"),n.round=function(e){return arguments.length?(t=!!e,n):t},n.size=function(e){return arguments.length?(r=+e[0],i=+e[1],n):[r,i]},n.tile=function(e){return arguments.length?(s=Kv(e),n):s},n.padding=function(e){return arguments.length?n.paddingInner(e).paddingOuter(e):n.paddingInner()},n.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:Jv(+e),n):l},n.paddingOuter=function(e){return arguments.length?n.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):n.paddingTop()},n.paddingTop=function(e){return arguments.length?(c="function"==typeof e?e:Jv(+e),n):c},n.paddingRight=function(e){return arguments.length?(h="function"==typeof e?e:Jv(+e),n):h},n.paddingBottom=function(e){return arguments.length?(u="function"==typeof e?e:Jv(+e),n):u},n.paddingLeft=function(e){return arguments.length?(d="function"==typeof e?e:Jv(+e),n):d},n}var db=x(()=>{rb(),hb(),Zv(),eb(),mt(ub,"default")}),pb=x(()=>{Xv(),db()}),gb=x(()=>{}),fb=x(()=>{});function mb(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var yb=x(()=>{mt(mb,"initRange")});function vb(){var r=new Uu,i=[],n=[],a=bb;function s(e){let t=r.get(e);if(void 0===t){if(a!==bb)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 Uu;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 vb(i,n).unknown(a)},mb.apply(s,arguments),s}var bb,xb=x(()=>{nd(),yb(),bb=Symbol("implicit"),mt(vb,"ordinal")});function wb(){var n,a,e=vb().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<l,r=t?c:l,i=(n=((i=t?l:c)-r)/Math.max(1,e-u+2*d),h&&(n=Math.floor(n)),r+=(i-r-n*(e-u))*p,a=n*(1-u),h&&(r=Math.round(r),a=Math.round(a)),rd(e).map(function(e){return r+n*e}));return o(t?i.reverse():i)}return delete e.unknown,mt(t,"rescale"),e.domain=function(e){return(arguments.length?(s(e),t):s)()},e.range=function(e){return arguments.length?([l,c]=e,l=+l,c=+c,t()):[l,c]},e.rangeRound=function(e){return[l,c]=e,l=+l,c=+c,h=!0,t()},e.bandwidth=function(){return a},e.step=function(){return n},e.round=function(e){return arguments.length?(h=!!e,t()):h},e.padding=function(e){return arguments.length?(u=Math.min(1,d=+e),t()):u},e.paddingInner=function(e){return arguments.length?(u=Math.min(1,e),t()):u},e.paddingOuter=function(e){return arguments.length?(d=+e,t()):d},e.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),t()):p},e.copy=function(){return wb(s(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},mb.apply(t(),arguments)}var Tb=x(()=>{nd(),yb(),xb(),mt(wb,"band")});function kb(e){return function(){return e}}var Cb=x(()=>{mt(kb,"constants")});function Sb(e){return+e}var Eb=x(()=>{mt(Sb,"number")});function _b(e){return e}function Ab(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:kb(isNaN(r)?NaN:.5)}function Rb(t,r){var e;return r<t&&(e=t,t=r,r=e),function(e){return Math.max(t,Math.min(r,e))}}function Lb(e,t,r){var i=e[0],e=e[1],n=t[0],t=t[1],n=e<i?(i=Ab(e,i),r(t,n)):(i=Ab(i,e),r(n,t));return function(e){return n(i(e))}}function Nb(r,e,t){var i=Math.min(r.length,e.length)-1,n=new Array(i),a=new Array(i),s=-1;for(r[i]<r[0]&&(r=r.slice().reverse(),e=e.slice().reverse());++s<i;)n[s]=Ab(r[s],r[s+1]),a[s]=t(e[s],e[s+1]);return function(e){var t=Ou(r,e,1,i)-1;return a[t](n[t](e))}}function Db(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ib(){var r,i,t,n,a,s,o=Ob,l=Ob,c=o1,h=_b;function u(){var e=Math.min(o.length,l.length);return h!==_b&&(h=Rb(o[0],o[e-1])),n=2<e?Nb:Lb,a=s=null,d}function d(e){return null==e||isNaN(e=+e)?t:(a=a||n(o.map(r),l,c))(r(h(e)))}return mt(u,"rescale"),mt(d,"scale"),d.invert=function(e){return h(i((s=s||n(l,o.map(r),Zf))(e)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Sb),u()):o.slice()},d.range=function(e){return arguments.length?(l=Array.from(e),u()):l.slice()},d.rangeRound=function(e){return l=Array.from(e),c=c1,u()},d.clamp=function(e){return arguments.length?(h=!!e||_b,u()):h!==_b},d.interpolate=function(e){return arguments.length?(c=e,u()):c},d.unknown=function(e){return arguments.length?(t=e,d):t},function(e,t){return r=e,i=t,u()}}function Mb(){return Ib()(_b,_b)}var Ob,Pb=x(()=>{nd(),E1(),Cb(),Eb(),Ob=[0,1],mt(_b,"identity"),mt(Ab,"normalize"),mt(Rb,"clamper"),mt(Lb,"bimap"),mt(Nb,"polymap"),mt(Db,"copy"),mt(Ib,"transformer"),mt(Mb,"continuous")});function $b(e,t,r,i){var n,a=Vu(e,t,r);switch((i=P2(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(n=lv(a,s))||(i.precision=n),nv(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=hv(a,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=sv(a))||(i.precision=n-2*("%"===i.type))}return iv(i)}var Bb=x(()=>{nd(),dv(),mt($b,"tickFormat")});function Fb(c){var h=c.domain;return c.ticks=function(e){var t=h();return Wu(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return $b(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<s&&(r=s,s=o,o=r,r=n,n=a,a=r);0<l--;){if((r=Yu(s,o,e))===t)return i[n]=s,i[a]=o,h(i);if(0<r)s=Math.floor(s/r)*r,o=Math.ceil(o/r)*r;else{if(!(r<0))break;s=Math.ceil(s*r)/r,o=Math.floor(o*r)/r}t=r}return c},c}function zb(){var e=Mb();return e.copy=function(){return Db(e,zb())},mb.apply(e,arguments),Fb(e)}var qb=x(()=>{nd(),Pb(),yb(),Bb(),mt(Fb,"linearish"),mt(zb,"linear")});function Ub(e,t){var r,i=0,n=(e=e.slice()).length-1,a=e[i],s=e[n];return s<a&&(r=i,i=n,n=r,r=a,a=s,s=r),e[i]=t.floor(a),e[n]=t.ceil(s),e}var Gb=x(()=>{mt(Ub,"nice")});function jb(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<r-e?t:r},o.offset=(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),e<t&&0<r)for(;n.push(i=new Date(+e)),s(e,r),a(e),i<e&&e<t;);return n},o.filter=r=>jb(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)=>(Wb.setTime(+e),Yb.setTime(+t),a(Wb),a(Yb),Math.floor(r(Wb,Yb))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0<t?1<t?o.filter(i?e=>i(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var Wb,Yb,Vb,Hb,Xb,Kb,Zb,Qb,Jb,ex,tx,rx=x(()=>{Wb=new Date,Yb=new Date,mt(jb,"timeInterval")}),ix=x(()=>{rx(),(Vb=jb(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?jb(e=>{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):Vb:null)}),nx=x(()=>{rx(),(Hb=jb(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),ax=x(()=>{rx(),(Xb=jb(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,(Kb=jb(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),sx=x(()=>{rx(),(Zb=jb(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,(Qb=jb(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),ox=x(()=>{rx(),(Jb=jb(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,(ex=jb(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(tx=jb(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 lx(t){return jb(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 cx(t){return jb(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 hx,ux,dx,px,gx,fx,mx,yx,vx,bx,xx,wx,Tx,kx,Cx,Sx,Ex,_x,Ax=x(()=>{rx(),mt(lx,"timeWeekday"),hx=lx(0),ux=lx(1),dx=lx(2),px=lx(3),gx=lx(4),fx=lx(5),mx=lx(6),hx.range,ux.range,dx.range,px.range,gx.range,fx.range,mx.range,mt(cx,"utcWeekday"),yx=cx(0),vx=cx(1),bx=cx(2),xx=cx(3),wx=cx(4),Tx=cx(5),kx=cx(6),yx.range,vx.range,bx.range,xx.range,wx.range,Tx.range,kx.range}),Rx=x(()=>{rx(),(Cx=jb(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,(Sx=jb(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}),Lx=x(()=>{rx(),(Ex=jb(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<r?jb(e=>{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,(_x=jb(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<r?jb(e=>{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 Nx(a,e,t,r,i,n){let s=[[Hb,1,1e3],[Hb,5,5e3],[Hb,15,15e3],[Hb,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=t<e;return i&&([e,t]=[t,e]),r=(r=r&&"function"==typeof r.range?r:l(e,t,r))?r.range(e,+t+1):[],i?r.reverse():r}function l(e,t,r){var i=Math.abs(t-e)/r,n=Lu(([,,e])=>e).right(s,i);return n===s.length?a.every(Vu(e/31536e6,t/31536e6,r)):0===n?Vb.every(Math.max(Vu(e,t,r),1)):([e,t]=s[i/s[n-1][2]<s[n][2]/i?n-1:n],e.every(t))}return mt(o,"ticks"),mt(l,"tickInterval"),[o,l]}var Dx,Ix,Mx,Ox,Px=x(()=>{nd(),ix(),nx(),ax(),sx(),ox(),Ax(),Rx(),Lx(),mt(Nx,"ticker"),[Dx,Ix]=Nx(_x,Sx,yx,tx,Qb,Kb),[Mx,Ox]=Nx(Ex,Cx,hx,Jb,Zb,Xb)}),$x=x(()=>{ix(),nx(),ax(),sx(),ox(),Ax(),Rx(),Lx(),Px()});function Bx(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 Fx(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 zx(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function qx(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=jx(t),h=Wx(t),P=jx(r),$=Wx(r),B=jx(s),F=Wx(s),z=jx(o),q=Wx(o),U=jx(l),G=Wx(l),u={a:C,A:S,b:E,B:_,c:null,d:d4,e:d4,f:y4,g:A4,G:L4,H:p4,I:g4,j:f4,L:m4,m:v4,M:b4,p:A,q:R,Q:J4,s:e5,S:x4,u:w4,U:T4,V:C4,w:S4,W:E4,x:null,X:null,y:_4,Y:R4,Z:N4,"%":Q4},d={a:L,A:N,b:D,B:I,c:null,d:D4,e:D4,f:$4,g:H4,G:K4,H:I4,I:M4,j:O4,L:P4,m:B4,M:F4,p:M,q:O,Q:J4,s:e5,S:z4,u:q4,U:U4,V:j4,w:W4,W:Y4,x:null,X:null,y:V4,Y:X4,Z:Z4,"%":Q4},j={a:y,A:v,b:b,B:x,c:w,d:r4,e:r4,f:l4,g:Qx,G:Zx,H:n4,I:n4,j:i4,L:o4,m:t4,M:a4,p:m,q:e4,Q:h4,s:u4,S:s4,u:Vx,U:Hx,V:Xx,w:Yx,W:Kx,x:T,X:k,y:Qx,Y:Zx,Z:Jx,"%":c4};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<o;)37===l.charCodeAt(a)&&(n.push(l.slice(s,a)),null!=(r=t5[t=l.charAt(++a)])?t=l.charAt(++a):r="e"===t?" ":"0",(i=c[t])&&(t=i(e,r)),n.push(t),s=a+1);return n.push(l.slice(s,a)),n.join("")}}function g(n,a){return function(e){var t,r,i=zx(1900,void 0,1);if(f(i,n,e+="",0)!=e.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(!a||"Z"in i||(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||53<i.V)return null;"w"in i||(i.w=1),"Z"in i?(t=4<(r=(t=Fx(zx(i.y,0,1))).getUTCDay())||0===r?vx.ceil(t):vx(t),t=ex.offset(t,7*(i.V-1)),i.y=t.getUTCFullYear(),i.m=t.getUTCMonth(),i.d=t.getUTCDate()+(i.w+6)%7):(t=4<(r=(t=Bx(zx(i.y,0,1))).getDay())||0===r?ux.ceil(t):ux(t),t=Jb.offset(t,7*(i.V-1)),i.y=t.getFullYear(),i.m=t.getMonth(),i.d=t.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?Fx(zx(i.y,0,1)).getUTCDay():Bx(zx(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return("Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Fx):Bx)(i)}}function f(e,t,r,i){for(var n,a,s=0,o=t.length,l=r.length;s<o;){if(l<=i)return-1;if(37===(n=t.charCodeAt(s++))){if(n=t.charAt(s++),!(a=j[n in t5?t.charAt(s++):n])||(i=a(e,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}function m(e,t,r){return(t=c.exec(t.slice(r)))?(e.p=h.get(t[0].toLowerCase()),r+t[0].length):-1}function y(e,t,r){return(t=B.exec(t.slice(r)))?(e.w=F.get(t[0].toLowerCase()),r+t[0].length):-1}function v(e,t,r){return(t=P.exec(t.slice(r)))?(e.w=$.get(t[0].toLowerCase()),r+t[0].length):-1}function b(e,t,r){return(t=U.exec(t.slice(r)))?(e.m=G.get(t[0].toLowerCase()),r+t[0].length):-1}function x(e,t,r){return(t=z.exec(t.slice(r)))?(e.m=q.get(t[0].toLowerCase()),r+t[0].length):-1}function w(e,t,r){return f(e,i,t,r)}function T(e,t,r){return f(e,n,t,r)}function k(e,t,r){return f(e,a,t,r)}function C(e){return s[e.getDay()]}function S(e){return r[e.getDay()]}function E(e){return l[e.getMonth()]}function _(e){return o[e.getMonth()]}function A(e){return t[+(12<=e.getHours())]}function R(e){return 1+~~(e.getMonth()/3)}function L(e){return s[e.getUTCDay()]}function N(e){return r[e.getUTCDay()]}function D(e){return l[e.getUTCMonth()]}function I(e){return o[e.getUTCMonth()]}function M(e){return t[+(12<=e.getUTCHours())]}function O(e){return 1+~~(e.getUTCMonth()/3)}return u.x=p(n,u),u.X=p(a,u),u.c=p(i,u),d.x=p(n,d),d.X=p(a,d),d.c=p(i,d),mt(p,"newFormat"),mt(g,"newParse"),mt(f,"parseSpecifier"),mt(m,"parsePeriod"),mt(y,"parseShortWeekday"),mt(v,"parseWeekday"),mt(b,"parseShortMonth"),mt(x,"parseMonth"),mt(w,"parseLocaleDateTime"),mt(T,"parseLocaleDate"),mt(k,"parseLocaleTime"),mt(C,"formatShortWeekday"),mt(S,"formatWeekday"),mt(E,"formatShortMonth"),mt(_,"formatMonth"),mt(A,"formatPeriod"),mt(R,"formatQuarter"),mt(L,"formatUTCShortWeekday"),mt(N,"formatUTCWeekday"),mt(D,"formatUTCShortMonth"),mt(I,"formatUTCMonth"),mt(M,"formatUTCPeriod"),mt(O,"formatUTCQuarter"),{format:mt(function(e){var t=p(e+="",u);return t.toString=function(){return e},t},"format"),parse:mt(function(e){var t=g(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:mt(function(e){var t=p(e+="",d);return t.toString=function(){return e},t},"utcFormat"),utcParse:mt(function(e){var t=g(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}function Ux(e,t,r){var i=e<0?"-":"",n=(e=(i?-e:e)+"").length;return i+(n<r?new Array(r-n+1).join(t)+e:e)}function Gx(e){return e.replace(n5,"\\$&")}function jx(e){return new RegExp("^(?:"+e.map(Gx).join("|")+")","i")}function Wx(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Yx(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function Vx(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function Hx(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function Xx(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function Kx(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function Zx(e,t,r){return(t=r5.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function Qx(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function Jx(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 e4(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function t4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function r4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function i4(e,t,r){return(t=r5.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function n4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function a4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function s4(e,t,r){return(t=r5.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function o4(e,t,r){return(t=r5.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function l4(e,t,r){return(t=r5.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function c4(e,t,r){return(t=i5.exec(t.slice(r,r+1)))?r+t[0].length:-1}function h4(e,t,r){return(t=r5.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function u4(e,t,r){return(t=r5.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function d4(e,t){return Ux(e.getDate(),t,2)}function p4(e,t){return Ux(e.getHours(),t,2)}function g4(e,t){return Ux(e.getHours()%12||12,t,2)}function f4(e,t){return Ux(1+Jb.count(Ex(e),e),t,3)}function m4(e,t){return Ux(e.getMilliseconds(),t,3)}function y4(e,t){return m4(e,t)+"000"}function v4(e,t){return Ux(e.getMonth()+1,t,2)}function b4(e,t){return Ux(e.getMinutes(),t,2)}function x4(e,t){return Ux(e.getSeconds(),t,2)}function w4(e){return 0===(e=e.getDay())?7:e}function T4(e,t){return Ux(hx.count(Ex(e)-1,e),t,2)}function k4(e){var t=e.getDay();return 4<=t||0===t?gx(e):gx.ceil(e)}function C4(e,t){return e=k4(e),Ux(gx.count(Ex(e),e)+(4===Ex(e).getDay()),t,2)}function S4(e){return e.getDay()}function E4(e,t){return Ux(ux.count(Ex(e)-1,e),t,2)}function _4(e,t){return Ux(e.getFullYear()%100,t,2)}function A4(e,t){return Ux((e=k4(e)).getFullYear()%100,t,2)}function R4(e,t){return Ux(e.getFullYear()%1e4,t,4)}function L4(e,t){var r=e.getDay();return Ux((e=4<=r||0===r?gx(e):gx.ceil(e)).getFullYear()%1e4,t,4)}function N4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+Ux(e/60|0,"0",2)+Ux(e%60,"0",2)}function D4(e,t){return Ux(e.getUTCDate(),t,2)}function I4(e,t){return Ux(e.getUTCHours(),t,2)}function M4(e,t){return Ux(e.getUTCHours()%12||12,t,2)}function O4(e,t){return Ux(1+ex.count(_x(e),e),t,3)}function P4(e,t){return Ux(e.getUTCMilliseconds(),t,3)}function $4(e,t){return P4(e,t)+"000"}function B4(e,t){return Ux(e.getUTCMonth()+1,t,2)}function F4(e,t){return Ux(e.getUTCMinutes(),t,2)}function z4(e,t){return Ux(e.getUTCSeconds(),t,2)}function q4(e){return 0===(e=e.getUTCDay())?7:e}function U4(e,t){return Ux(yx.count(_x(e)-1,e),t,2)}function G4(e){var t=e.getUTCDay();return 4<=t||0===t?wx(e):wx.ceil(e)}function j4(e,t){return e=G4(e),Ux(wx.count(_x(e),e)+(4===_x(e).getUTCDay()),t,2)}function W4(e){return e.getUTCDay()}function Y4(e,t){return Ux(vx.count(_x(e)-1,e),t,2)}function V4(e,t){return Ux(e.getUTCFullYear()%100,t,2)}function H4(e,t){return Ux((e=G4(e)).getUTCFullYear()%100,t,2)}function X4(e,t){return Ux(e.getUTCFullYear()%1e4,t,4)}function K4(e,t){var r=e.getUTCDay();return Ux((e=4<=r||0===r?wx(e):wx.ceil(e)).getUTCFullYear()%1e4,t,4)}function Z4(){return"+0000"}function Q4(){return"%"}function J4(e){return+e}function e5(e){return Math.floor(+e/1e3)}var t5,r5,i5,n5,a5=x(()=>{$x(),mt(Bx,"localDate"),mt(Fx,"utcDate"),mt(zx,"newDate"),mt(qx,"formatLocale"),t5={"-":"",_:" ",0:"0"},r5=/^\s*\d+/,i5=/^%/,n5=/[\\^$*+?|[\]().{}]/g,mt(Ux,"pad"),mt(Gx,"requote"),mt(jx,"formatRe"),mt(Wx,"formatLookup"),mt(Yx,"parseWeekdayNumberSunday"),mt(Vx,"parseWeekdayNumberMonday"),mt(Hx,"parseWeekNumberSunday"),mt(Xx,"parseWeekNumberISO"),mt(Kx,"parseWeekNumberMonday"),mt(Zx,"parseFullYear"),mt(Qx,"parseYear"),mt(Jx,"parseZone"),mt(e4,"parseQuarter"),mt(t4,"parseMonthNumber"),mt(r4,"parseDayOfMonth"),mt(i4,"parseDayOfYear"),mt(n4,"parseHour24"),mt(a4,"parseMinutes"),mt(s4,"parseSeconds"),mt(o4,"parseMilliseconds"),mt(l4,"parseMicroseconds"),mt(c4,"parseLiteralPercent"),mt(h4,"parseUnixTimestamp"),mt(u4,"parseUnixTimestampSeconds"),mt(d4,"formatDayOfMonth"),mt(p4,"formatHour24"),mt(g4,"formatHour12"),mt(f4,"formatDayOfYear"),mt(m4,"formatMilliseconds"),mt(y4,"formatMicroseconds"),mt(v4,"formatMonthNumber"),mt(b4,"formatMinutes"),mt(x4,"formatSeconds"),mt(w4,"formatWeekdayNumberMonday"),mt(T4,"formatWeekNumberSunday"),mt(k4,"dISO"),mt(C4,"formatWeekNumberISO"),mt(S4,"formatWeekdayNumberSunday"),mt(E4,"formatWeekNumberMonday"),mt(_4,"formatYear"),mt(A4,"formatYearISO"),mt(R4,"formatFullYear"),mt(L4,"formatFullYearISO"),mt(N4,"formatZone"),mt(D4,"formatUTCDayOfMonth"),mt(I4,"formatUTCHour24"),mt(M4,"formatUTCHour12"),mt(O4,"formatUTCDayOfYear"),mt(P4,"formatUTCMilliseconds"),mt($4,"formatUTCMicroseconds"),mt(B4,"formatUTCMonthNumber"),mt(F4,"formatUTCMinutes"),mt(z4,"formatUTCSeconds"),mt(q4,"formatUTCWeekdayNumberMonday"),mt(U4,"formatUTCWeekNumberSunday"),mt(G4,"UTCdISO"),mt(j4,"formatUTCWeekNumberISO"),mt(W4,"formatUTCWeekdayNumberSunday"),mt(Y4,"formatUTCWeekNumberMonday"),mt(V4,"formatUTCYear"),mt(H4,"formatUTCYearISO"),mt(X4,"formatUTCFullYear"),mt(K4,"formatUTCFullYearISO"),mt(Z4,"formatUTCZone"),mt(Q4,"formatLiteralPercent"),mt(J4,"formatUnixTimestamp"),mt(e5,"formatUnixTimestampSeconds")});function s5(e){return o5=qx(e),l5=o5.format,o5}var o5,l5,c5=x(()=>{a5(),s5({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(s5,"defaultLocale")}),h5=x(()=>{c5()});function u5(e){return new Date(e)}function d5(e){return e instanceof Date?+e:+new Date(+e)}function p5(r,i,t,n,a,s,o,l,c,h){var u=Mb(),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"),w=h("%Y");function T(e){return(c(e)<e?g:l(e)<e?f:o(e)<e?m:s(e)<e?y:n(e)<e?a(e)<e?v:b:t(e)<e?x:w)(e)}return mt(T,"tickFormat"),u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?p(Array.from(e,d5)):p().map(u5)},u.ticks=function(e){var t=p();return r(t[0],t[t.length-1],e??10)},u.tickFormat=function(e,t){return null==t?T:h(t)},u.nice=function(e){var t=p();return(e=e&&"function"==typeof e.range?e:i(t[0],t[t.length-1],e??10))?p(Ub(t,e)):u},u.copy=function(){return Db(u,p5(r,i,t,n,a,s,o,l,c,h))},u}function g5(){return mb.apply(p5(Mx,Ox,Ex,Cx,hx,Jb,Zb,Xb,Hb,l5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var f5=x(()=>{$x(),h5(),Pb(),yb(),Gb(),mt(u5,"date"),mt(d5,"number"),mt(p5,"calendar"),mt(g5,"time")}),m5=x(()=>{Tb(),qb(),xb(),f5()});function y5(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(6*i,6*++i);return r}var v5,b5=x(()=>{mt(y5,"default")}),x5=x(()=>{b5(),v5=y5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),w5=x(()=>{x5()});function T5(e){return mt(function(){return e},"constant")}var k5=x(()=>{mt(T5,"default")});function C5(e){return 1<e?0:e<-1?M5:Math.acos(e)}function S5(e){return 1<=e?O5:e<=-1?-O5:Math.asin(e)}var E5,_5,A5,R5,L5,N5,D5,I5,M5,O5,P5,$5=x(()=>{E5=Math.abs,_5=Math.atan2,A5=Math.cos,R5=Math.max,L5=Math.min,N5=Math.sin,D5=Math.sqrt,I5=1e-12,O5=(M5=Math.PI)/2,P5=2*M5,mt(C5,"acos"),mt(S5,"asin")});function B5(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 y2(i)}var F5=x(()=>{b2(),mt(B5,"withPath")});function z5(e){return e.innerRadius}function q5(e){return e.outerRadius}function U5(e){return e.startAngle}function G5(e){return e.endAngle}function j5(e){return e&&e.padAngle}function W5(e,t,r,i,n,a,s,o){var l=(o-=a)*(r-=e)-(s-=n)*(i-=t);if(!(l*l<I5))return[e+(l=(s*(t-a)-o*(e-n))/l)*r,t+l*i]}function Y5(e,t,r,i,n,a,s){var o=(s=(s?a:-a)/D5((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)*D5(R5(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 V5(){var A=z5,R=q5,L=T5(0),N=null,D=U5,I=G5,M=j5,O=null,P=B5(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,w,T=+A.apply(this,arguments),k=+R.apply(this,arguments),C=D.apply(this,arguments)-O5,S=I.apply(this,arguments)-O5,E=E5(S-C),_=C<S;if(O=O||(e=P()),k<T&&(t=k,k=T,T=t),I5<k?P5-I5<E?(O.moveTo(k*A5(C),k*N5(C)),O.arc(0,0,k,C,S,!_),I5<T&&(O.moveTo(T*A5(S),T*N5(S)),O.arc(0,0,T,S,C,_))):(i=t=C,n=r=S,s=a=E,h=M.apply(this,arguments)/2,d=I5<h&&(N?+N.apply(this,arguments):D5(T*T+k*k)),w=x=o=L5(E5(k-T)/2,+L.apply(this,arguments)),I5<d&&(u=S5(d/T*N5(h)),d=S5(d/k*N5(h)),(a-=2*u)>I5?(i+=u*=_?1:-1,n-=u):(a=0,i=n=(C+S)/2),(s-=2*d)>I5?(t+=d*=_?1:-1,r-=d):(s=0,t=r=(C+S)/2)),h=k*A5(t),u=k*N5(t),d=T*A5(n),C=T*N5(n),I5<o&&(p=k*A5(r),g=k*N5(r),f=T*A5(i),m=T*N5(i),E<M5)&&((S=W5(h,u,f,m,p,g,d,C))?(E=h-S[0],b=u-S[1],y=p-S[0],v=g-S[1],E=1/N5(C5((E*y+b*v)/(D5(E*E+b*b)*D5(y*y+v*v)))/2),b=D5(S[0]*S[0]+S[1]*S[1]),x=L5(o,(T-b)/(E-1)),w=L5(o,(k-b)/(1+E))):x=w=0),I5<s?I5<w?(l=Y5(f,m,h,u,k,w,_),c=Y5(p,g,d,C,k,w,_),O.moveTo(l.cx+l.x01,l.cy+l.y01),w<o?O.arc(l.cx,l.cy,w,_5(l.y01,l.x01),_5(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,w,_5(l.y01,l.x01),_5(l.y11,l.x11),!_),O.arc(0,0,k,_5(l.cy+l.y11,l.cx+l.x11),_5(c.cy+c.y11,c.cx+c.x11),!_),O.arc(c.cx,c.cy,w,_5(c.y11,c.x11),_5(c.y01,c.x01),!_))):(O.moveTo(h,u),O.arc(0,0,k,t,r,!_)):O.moveTo(h,u),I5<T&&I5<a?I5<x?(l=Y5(d,C,p,g,T,-x,_),c=Y5(h,u,f,m,T,-x,_),O.lineTo(l.cx+l.x01,l.cy+l.y01),x<o?O.arc(l.cx,l.cy,x,_5(l.y01,l.x01),_5(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,x,_5(l.y01,l.x01),_5(l.y11,l.x11),!_),O.arc(0,0,T,_5(l.cy+l.y11,l.cx+l.x11),_5(c.cy+c.y11,c.cx+c.x11),_),O.arc(c.cx,c.cy,x,_5(c.y11,c.x11),_5(c.y01,c.x01),!_))):O.arc(0,0,T,n,i,_):O.lineTo(d,C)):O.moveTo(0,0),O.closePath(),e)return O=null,e+""||null}return mt(t,"arc"),t.centroid=function(){var e=(+A.apply(this,arguments)+ +R.apply(this,arguments))/2,t=(+D.apply(this,arguments)+ +I.apply(this,arguments))/2-M5/2;return[A5(t)*e,N5(t)*e]},t.innerRadius=function(e){return arguments.length?(A="function"==typeof e?e:T5(+e),t):A},t.outerRadius=function(e){return arguments.length?(R="function"==typeof e?e:T5(+e),t):R},t.cornerRadius=function(e){return arguments.length?(L="function"==typeof e?e:T5(+e),t):L},t.padRadius=function(e){return arguments.length?(N=null==e?null:"function"==typeof e?e:T5(+e),t):N},t.startAngle=function(e){return arguments.length?(D="function"==typeof e?e:T5(+e),t):D},t.endAngle=function(e){return arguments.length?(I="function"==typeof e?e:T5(+e),t):I},t.padAngle=function(e){return arguments.length?(M="function"==typeof e?e:T5(+e),t):M},t.context=function(e){return arguments.length?(O=e??null,t):O},t}var H5=x(()=>{k5(),$5(),F5(),mt(z5,"arcInnerRadius"),mt(q5,"arcOuterRadius"),mt(U5,"arcStartAngle"),mt(G5,"arcEndAngle"),mt(j5,"arcPadAngle"),mt(W5,"intersect"),mt(Y5,"cornerTangents"),mt(V5,"default")});function X5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var K5=x(()=>{Array.prototype.slice,mt(X5,"default")});function Z5(e){this._context=e}function Q5(e){return new Z5(e)}var J5=x(()=>{mt(Z5,"Linear"),Z5.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(Q5,"default")});function e3(e){return e[0]}function t3(e){return e[1]}var r3=x(()=>{mt(e3,"x"),mt(t3,"y")});function i3(s,o){var l=T5(!0),c=null,h=Q5,u=null,d=B5(t);function t(e){var t,r,i,n=(e=X5(e)).length,a=!1;for(null==c&&(u=h(i=d())),t=0;t<=n;++t)!(t<n&&l(r=e[t],t,e))===a&&((a=!a)?u.lineStart():u.lineEnd()),a&&u.point(+s(r,t,e),+o(r,t,e));if(i)return u=null,i+""||null}return s="function"==typeof s?s:void 0===s?e3:T5(s),o="function"==typeof o?o:void 0===o?t3:T5(o),mt(t,"line"),t.x=function(e){return arguments.length?(s="function"==typeof e?e:T5(+e),t):s},t.y=function(e){return arguments.length?(o="function"==typeof e?e:T5(+e),t):o},t.defined=function(e){return arguments.length?(l="function"==typeof e?e:T5(!!e),t):l},t.curve=function(e){return arguments.length?(h=e,null!=c&&(u=h(c)),t):h},t.context=function(e){return arguments.length?(null==e?c=u=null:u=h(c=e),t):c},t}var n3=x(()=>{K5(),k5(),J5(),F5(),r3(),mt(i3,"default")});function a3(e,t){return t<e?-1:e<t?1:e<=t?0:NaN}var s3=x(()=>{mt(a3,"default")});function o3(e){return e}var l3=x(()=>{mt(o3,"default")});function c3(){var p=o3,g=a3,f=null,m=T5(0),y=T5(P5),v=T5(0);function t(r){for(var e,t,i,n=(r=X5(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),c=Math.min(P5,Math.max(-P5,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<n;++d)0<(i=o[s[d]=d]=+p(r[d],d,r))&&(a+=i);for(null!=g?s.sort(function(e,t){return g(o[e],o[t])}):null!=f&&s.sort(function(e,t){return f(r[e],r[t])}),d=0,e=a?(c-n*u)/a:0;d<n;++d,l=t)t=s[d],i=o[t],o[t]={data:r[t],index:d,value:i,startAngle:l,endAngle:t=l+(0<i?i*e:0)+u,padAngle:h};return o}return mt(t,"pie"),t.value=function(e){return arguments.length?(p="function"==typeof e?e:T5(+e),t):p},t.sortValues=function(e){return arguments.length?(g=e,f=null,t):g},t.sort=function(e){return arguments.length?(f=e,g=null,t):f},t.startAngle=function(e){return arguments.length?(m="function"==typeof e?e:T5(+e),t):m},t.endAngle=function(e){return arguments.length?(y="function"==typeof e?e:T5(+e),t):y},t.padAngle=function(e){return arguments.length?(v="function"==typeof e?e:T5(+e),t):v},t}var h3=x(()=>{K5(),k5(),s3(),l3(),$5(),mt(c3,"default")});function u3(e){return new p3(e,!0)}function d3(e){return new p3(e,!1)}var p3,g3=x(()=>{p3=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(u3,"bumpX"),mt(d3,"bumpY")});function f3(){}var m3=x(()=>{mt(f3,"default")});function y3(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 v3(e){this._context=e}function b3(e){return new v3(e)}var x3=x(()=>{mt(y3,"point"),mt(v3,"Basis"),v3.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:y3(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:y3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(b3,"default")});function w3(e){this._context=e}function T3(e){return new w3(e)}var k3=x(()=>{m3(),x3(),mt(w3,"BasisClosed"),w3.prototype={areaStart:f3,areaEnd:f3,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:y3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(T3,"default")});function C3(e){this._context=e}function S3(e){return new C3(e)}var E3=x(()=>{x3(),mt(C3,"BasisOpen"),C3.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:y3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(S3,"default")});function _3(e,t){this._basis=new v3(e),this._beta=t}var A3,R3=x(()=>{x3(),mt(_3,"Bundle"),_3.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<r)for(var i,n=e[0],a=t[0],s=e[r]-n,o=t[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*e[l]+(1-this._beta)*(n+(i=l/r)*s),this._beta*t[l]+(1-this._beta)*(a+i*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},A3=mt(function t(r){function e(e){return 1===r?new v3(e):new _3(e,r)}return mt(e,"bundle"),e.beta=function(e){return t(+e)},e},"custom")(.85)});function L3(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function N3(e,t){this._context=e,this._k=(1-t)/6}var D3,I3=x(()=>{mt(L3,"point"),mt(N3,"Cardinal"),N3.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:L3(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:L3(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")},D3=mt(function t(r){function e(e){return new N3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function M3(e,t){this._context=e,this._k=(1-t)/6}var O3,P3=x(()=>{m3(),I3(),mt(M3,"CardinalClosed"),M3.prototype={areaStart:f3,areaEnd:f3,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:L3(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")},O3=mt(function t(r){function e(e){return new M3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function $3(e,t){this._context=e,this._k=(1-t)/6}var B3,F3=x(()=>{I3(),mt($3,"CardinalOpen"),$3.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:L3(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")},B3=mt(function t(r){function e(e){return new $3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function z3(e,t,r){var i,n,a=e._x1,s=e._y1,o=e._x2,l=e._y2;I5<e._l01_a&&(a=(a*(i=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a)-e._x0*e._l12_2a+e._x2*e._l01_2a)/(n=3*e._l01_a*(e._l01_a+e._l12_a)),s=(s*i-e._y0*e._l12_2a+e._y2*e._l01_2a)/n),I5<e._l23_a&&(o=(o*(i=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a)+e._x1*e._l23_2a-t*e._l12_2a)/(n=3*e._l23_a*(e._l23_a+e._l12_a)),l=(l*i+e._y1*e._l23_2a-r*e._l12_2a)/n),e._context.bezierCurveTo(a,s,o,l,e._x2,e._y2)}function q3(e,t){this._context=e,this._alpha=t}var U3,G3=x(()=>{$5(),I3(),mt(z3,"point"),mt(q3,"CatmullRom"),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._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:z3(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")},U3=mt(function t(r){function e(e){return r?new q3(e,r):new N3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function j3(e,t){this._context=e,this._alpha=t}var W3,Y3=x(()=>{P3(),m3(),G3(),mt(j3,"CatmullRomClosed"),j3.prototype={areaStart:f3,areaEnd:f3,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:z3(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")},W3=mt(function t(r){function e(e){return r?new j3(e,r):new M3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function V3(e,t){this._context=e,this._alpha=t}var H3,X3=x(()=>{F3(),G3(),mt(V3,"CatmullRomOpen"),V3.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:z3(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")},H3=mt(function t(r){function e(e){return r?new V3(e,r):new $3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function K3(e){this._context=e}function Z3(e){return new K3(e)}var Q3=x(()=>{m3(),mt(K3,"LinearClosed"),K3.prototype={areaStart:f3,areaEnd:f3,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(Z3,"default")});function J3(e){return e<0?-1:1}function ew(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(J3(n)+J3(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(e))||0}function tw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rw(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 iw(e){this._context=e}function nw(e){this._context=new aw(e)}function aw(e){this._context=e}function sw(e){return new iw(e)}function ow(e){return new nw(e)}var lw=x(()=>{mt(J3,"sign"),mt(ew,"slope3"),mt(tw,"slope2"),mt(rw,"point"),mt(iw,"MonotoneX"),iw.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:rw(this,this._t0,tw(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,rw(this,tw(this,r=ew(this,e,t)),r);break;default:rw(this,this._t0,r=ew(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(nw,"MonotoneY"),(nw.prototype=Object.create(iw.prototype)).point=function(e,t){iw.prototype.point.call(this,t,e)},mt(aw,"ReflectContext"),aw.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(sw,"monotoneX"),mt(ow,"monotoneY")});function cw(e){this._context=e}function hw(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<i-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[i-1]=2,a[i-1]=7,s[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)r=n[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(n[i-1]=s[i-1]/a[i-1],t=i-2;0<=t;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[i-1]=(e[i]+n[i-1])/2,t=0;t<i-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function uw(e){return new cw(e)}var dw=x(()=>{mt(cw,"Natural"),cw.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=hw(e),n=hw(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},mt(hw,"controlPoints"),mt(uw,"default")});function pw(e,t){this._context=e,this._t=t}function gw(e){return new pw(e,.5)}function fw(e){return new pw(e,0)}function mw(e){return new pw(e,1)}var yw=x(()=>{mt(pw,"Step"),pw.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<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,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:var r;this._t<=0?(this._context.lineTo(this._x,t),this._context.lineTo(e,t)):(r=this._x*(1-this._t)+e*this._t,this._context.lineTo(r,this._y),this._context.lineTo(r,t))}this._x=e,this._y=t},"point")},mt(gw,"default"),mt(fw,"stepBefore"),mt(mw,"stepAfter")}),vw=x(()=>{H5(),n3(),h3(),k3(),E3(),x3(),g3(),R3(),P3(),F3(),I3(),Y3(),X3(),G3(),Q3(),J5(),lw(),dw(),yw()}),bw=x(()=>{}),xw=x(()=>{});function ww(e,t,r){this.k=e,this.x=t,this.y=r}function Tw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return kw;return e.__zoom}var kw,Cw,Sw,Ew,_w,Aw,Rw,Lw,Nw,Dw,Iw,Mw,Ow,Pw,$w,Bw,Fw,zw,qw,Uw,Gw,jw,Ww,Yw,Vw,Hw,Xw,Kw,Zw,Qw,Jw,eT,tT=x(()=>{mt(ww,"Transform"),ww.prototype={constructor:ww,scale:mt(function(e){return 1===e?this:new ww(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new ww(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")},kw=new ww(1,0,0),Tw.prototype=ww.prototype,mt(Tw,"transform")}),rT=x(()=>{}),iT=x(()=>{Qy(),bw(),xw(),tT(),rT()}),nT=x(()=>{iT(),tT()}),aT=x(()=>{nd(),vd(),c2(),x2(),_f(),w2(),T2(),Rd(),wg(),k2(),Yy(),C2(),E2(),dv(),pv(),pb(),E1(),b2(),gb(),S2(),fb(),m5(),w5(),xg(),vw(),$x(),h5(),K1(),Qy(),nT()}),sT=oqe(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"}),oT=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=sT();function s(e){return-1<a.relativeFirstCharacters.indexOf(e[0])}function o(e){return e.replace(a.ctrlCharactersRegex,"").replace(a.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function l(e){return URL.canParse(e)}function c(e){try{return decodeURIComponent(e)}catch{return e}}function t(e){if(!e)return a.BLANK_URL;for(var t,r,i,n=c(e.trim());(t=(n=c(n=o(n).replace(a.htmlCtrlEntityRegex,"").replace(a.ctrlCharactersRegex,"").replace(a.whitespaceEscapeCharsRegex,"").trim())).match(a.ctrlCharactersRegex)||n.match(a.htmlEntitiesRegex)||n.match(a.htmlCtrlEntityRegex)||n.match(a.whitespaceEscapeCharsRegex))&&0<t.length;);return(e=n)?!s(e)&&(i=(r=e.trimStart()).match(a.urlSchemeRegex))?(i=i[0].toLowerCase().trim(),a.invalidProtocolRegex.test(i)?a.BLANK_URL:(r=r.replace(/\\/g,"/"),"mailto:"===i||i.includes("://")||"http:"!==i&&"https:"!==i?r:l(r)?((i=new URL(r)).protocol=i.protocol.toLowerCase(),i.hostname=i.hostname.toLowerCase(),i.toString()):a.BLANK_URL)):e:a.BLANK_URL}mt(s,"isRelativeUrlWithoutProtocol"),mt(o,"decodeHtmlCharacters"),mt(l,"isValidUrl"),mt(c,"decodeURI"),mt(t,"sanitizeUrl"),e.sanitizeUrl=t}),lT=x(()=>{Cw=G(oT(),1),Pc(),Sw=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"),Ew=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"},Sw(e,t).lower()},"drawBackgroundRect"),_w=mt((e,t)=>{var r=t.text.replace(nc," "),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"),Aw=mt((e,t,r,i)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,Cw.sanitizeUrl)(i),e.attr("xlink:href",t)},"drawImage"),Rw=mt((e,t,r,i)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,Cw.sanitizeUrl)(i),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),Lw=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Nw=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),cT=x(()=>{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<u.length;e++){var d=e*l-l*(u.length-1)/2,p=t.append("text").attr("x",r+n/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("dy",d).text(u[e]).attr("alignment-baseline","mathematical"),g(p,s)}}function r(e,t,r,i,n,a,s,o){(a=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),l(e,t,r,i,n,0,s,o),g(a,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}Pc(),lT(),Dw=G(oT(),1),Iw=mt(function(e,t){return Sw(e,t)},"drawRect"),Mw=mt(function(e,t,r,i,n,a){(e=e.append("image")).attr("width",t),e.attr("height",r),e.attr("x",i),e.attr("y",n),t=a.startsWith("data:image/png;base64")?a:(0,Dw.sanitizeUrl)(a),e.attr("xlink:href",t)},"drawImage"),Ow=mt((e,t,r)=>{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());Vw(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(),Vw(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"),Pw=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=(Iw(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,Vw(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,Vw(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,Vw(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),$w=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"),Lw());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},Iw(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=Yw(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":Mw(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,Vw(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?Vw(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&&Vw(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,Vw(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),Bw=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"),Fw=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"),zw=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"),qw=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"),Uw=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"),Gw=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"),jw=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"),Ww=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"),Yw=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"),Vw=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},Hw={drawRect:Iw,drawBoundary:Pw,drawC4Shape:$w,drawRels:Ow,drawImage:Mw,insertArrowHead:qw,insertArrowEnd:Uw,insertArrowFilledHead:Gw,insertDynamicNumber:jw,insertArrowCrossHead:Ww,insertDatabaseIcon:Bw,insertComputerIcon:Fw,insertClockIcon:zw}}),hT=x(()=>{Xw="object"==typeof global&&global&&global.Object===Object&&global,Kw=Xw}),uT=x(()=>{hT(),Zw="object"==typeof self&&self&&self.Object===Object&&self,Zw=Kw||Zw||Function("return this")(),Qw=Zw}),dT=x(()=>{uT(),Jw=Qw.Symbol,eT=Jw});function pT(e){var t=fT.call(e,yT),r=e[yT];try{var i=!(e[yT]=void 0)}catch{}var n=mT.call(e);return i&&(t?e[yT]=r:delete e[yT]),n}var gT,fT,mT,yT,vT,bT=x(()=>{dT(),gT=Object.prototype,fT=gT.hasOwnProperty,mT=gT.toString,yT=eT?eT.toStringTag:void 0,mt(pT,"getRawTag"),vT=pT});function xT(e){return TT.call(e)}var wT,TT,kT,CT=x(()=>{wT=Object.prototype,TT=wT.toString,mt(xT,"objectToString"),kT=xT});function ST(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(ET&&ET in Object(e)?vT:kT)(e)}var ET,_T,AT=x(()=>{dT(),bT(),CT(),ET=eT?eT.toStringTag:void 0,mt(ST,"baseGetTag"),_T=ST});function RT(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var LT,NT=x(()=>{mt(RT,"isObject"),LT=RT});function DT(e){return!!LT(e)&&("[object Function]"==(e=_T(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var IT,MT,OT,PT=x(()=>{AT(),NT(),mt(DT,"isFunction"),IT=DT}),$T=x(()=>{uT(),MT=Qw["__core-js_shared__"],OT=MT});function BT(e){return!!FT&&FT in e}var FT,zT,qT=x(()=>{var e;$T(),e=/[^.]+$/.exec(OT&&OT.keys&&OT.keys.IE_PROTO||""),FT=e?"Symbol(src)_1."+e:"",mt(BT,"isMasked"),zT=BT});function UT(e){if(null!=e){try{return jT.call(e)}catch{}try{return e+""}catch{}}return""}var GT,jT,WT,YT=x(()=>{GT=Function.prototype,jT=GT.toString,mt(UT,"toSource"),WT=UT});function VT(e){return!(!LT(e)||zT(e))&&(IT(e)?QT:XT).test(WT(e))}var HT,XT,KT,ZT,QT,JT,e6=x(()=>{PT(),qT(),NT(),YT(),HT=/[\\^$.*+?()[\]{}|]/g,XT=/^\[object .+?Constructor\]$/,KT=Function.prototype,ZT=Object.prototype,KT=KT.toString,ZT=ZT.hasOwnProperty,QT=RegExp("^"+KT.call(ZT).replace(HT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(VT,"baseIsNative"),JT=VT});function t6(e,t){return e?.[t]}var r6,i6=x(()=>{mt(t6,"getValue"),r6=t6});function n6(e,t){return e=r6(e,t),JT(e)?e:void 0}var a6,s6,o6,l6=x(()=>{e6(),i6(),mt(n6,"getNative"),a6=n6}),c6=x(()=>{l6(),s6=a6(Object,"create"),o6=s6});function h6(){this.__data__=o6?o6(null):{},this.size=0}var u6,d6=x(()=>{c6(),mt(h6,"hashClear"),u6=h6});function p6(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var g6,f6=x(()=>{mt(p6,"hashDelete"),g6=p6});function m6(e){var t,r=this.__data__;return o6?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:v6.call(r,e)?r[e]:void 0}var y6,v6,b6,x6=x(()=>{c6(),y6=Object.prototype,v6=y6.hasOwnProperty,mt(m6,"hashGet"),b6=m6});function w6(e){var t=this.__data__;return o6?void 0!==t[e]:k6.call(t,e)}var T6,k6,C6,S6=x(()=>{c6(),T6=Object.prototype,k6=T6.hasOwnProperty,mt(w6,"hashHas"),C6=w6});function E6(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=o6&&void 0===t?"__lodash_hash_undefined__":t,this}var _6,A6=x(()=>{c6(),mt(E6,"hashSet"),_6=E6});function R6(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}var L6,N6=x(()=>{d6(),f6(),x6(),S6(),A6(),mt(R6,"Hash"),R6.prototype.clear=u6,R6.prototype.delete=g6,R6.prototype.get=b6,R6.prototype.has=C6,R6.prototype.set=_6,L6=R6});function D6(){this.__data__=[],this.size=0}var I6,M6=x(()=>{mt(D6,"listCacheClear"),I6=D6});function O6(e,t){return e===t||e!=e&&t!=t}var P6,$6=x(()=>{mt(O6,"eq"),P6=O6});function B6(e,t){for(var r=e.length;r--;)if(P6(e[r][0],t))return r;return-1}var F6,z6=x(()=>{$6(),mt(B6,"assocIndexOf"),F6=B6});function q6(e){var t=this.__data__;return!((e=F6(t,e))<0||(e==t.length-1?t.pop():G6.call(t,e,1),--this.size,0))}var U6,G6,j6,W6=x(()=>{z6(),U6=Array.prototype,G6=U6.splice,mt(q6,"listCacheDelete"),j6=q6});function Y6(e){var t=this.__data__;return(e=F6(t,e))<0?void 0:t[e][1]}var V6,H6=x(()=>{z6(),mt(Y6,"listCacheGet"),V6=Y6});function X6(e){return-1<F6(this.__data__,e)}var K6,Z6=x(()=>{z6(),mt(X6,"listCacheHas"),K6=X6});function Q6(e,t){var r=this.__data__,i=F6(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var J6,ek=x(()=>{z6(),mt(Q6,"listCacheSet"),J6=Q6});function tk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}var rk,ik,nk,ak=x(()=>{M6(),W6(),H6(),Z6(),ek(),mt(tk,"ListCache"),tk.prototype.clear=I6,tk.prototype.delete=j6,tk.prototype.get=V6,tk.prototype.has=K6,tk.prototype.set=J6,rk=tk}),sk=x(()=>{l6(),uT(),ik=a6(Qw,"Map"),nk=ik});function ok(){this.size=0,this.__data__={hash:new L6,map:new(nk||rk),string:new L6}}var lk,ck=x(()=>{N6(),ak(),sk(),mt(ok,"mapCacheClear"),lk=ok});function hk(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var uk,dk=x(()=>{mt(hk,"isKeyable"),uk=hk});function pk(e,t){return e=e.__data__,uk(t)?e["string"==typeof t?"string":"hash"]:e.map}var gk,fk=x(()=>{dk(),mt(pk,"getMapData"),gk=pk});function mk(e){return e=gk(this,e).delete(e),this.size-=e?1:0,e}var yk,vk=x(()=>{fk(),mt(mk,"mapCacheDelete"),yk=mk});function bk(e){return gk(this,e).get(e)}var xk,wk=x(()=>{fk(),mt(bk,"mapCacheGet"),xk=bk});function Tk(e){return gk(this,e).has(e)}var kk,Ck=x(()=>{fk(),mt(Tk,"mapCacheHas"),kk=Tk});function Sk(e,t){var r=gk(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var Ek,_k=x(()=>{fk(),mt(Sk,"mapCacheSet"),Ek=Sk});function Ak(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}var Rk,Lk=x(()=>{ck(),vk(),wk(),Ck(),_k(),mt(Ak,"MapCache"),Ak.prototype.clear=lk,Ak.prototype.delete=yk,Ak.prototype.get=xk,Ak.prototype.has=kk,Ak.prototype.set=Ek,Rk=Ak});function Nk(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(Dk);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(Nk.Cache||Rk),a}var Dk,Ik,Mk=x(()=>{Lk(),Dk="Expected a function",mt(Nk,"memoize"),Nk.Cache=Rk,Ik=Nk});function Ok(){this.__data__=new rk,this.size=0}var Pk,$k=x(()=>{ak(),mt(Ok,"stackClear"),Pk=Ok});function Bk(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var Fk,zk=x(()=>{mt(Bk,"stackDelete"),Fk=Bk});function qk(e){return this.__data__.get(e)}var Uk,Gk=x(()=>{mt(qk,"stackGet"),Uk=qk});function jk(e){return this.__data__.has(e)}var Wk,Yk=x(()=>{mt(jk,"stackHas"),Wk=jk});function Vk(e,t){var r=this.__data__;if(r instanceof rk){var i=r.__data__;if(!nk||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Rk(i)}return r.set(e,t),this.size=r.size,this}var Hk,Xk=x(()=>{ak(),sk(),Lk(),mt(Vk,"stackSet"),Hk=Vk});function Kk(e){e=this.__data__=new rk(e),this.size=e.size}var Zk,Qk,Jk,e7=x(()=>{ak(),$k(),zk(),Gk(),Yk(),Xk(),mt(Kk,"Stack"),Kk.prototype.clear=Pk,Kk.prototype.delete=Fk,Kk.prototype.get=Uk,Kk.prototype.has=Wk,Kk.prototype.set=Hk,Zk=Kk}),t7=x(()=>{l6(),Qk=(()=>{try{var e=a6(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Jk=Qk});function r7(e,t,r){"__proto__"==t&&Jk?Jk(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var i7,n7=x(()=>{t7(),mt(r7,"baseAssignValue"),i7=r7});function a7(e,t,r){(void 0===r||P6(e[t],r))&&(void 0!==r||t in e)||i7(e,t,r)}var s7,o7=x(()=>{n7(),$6(),mt(a7,"assignMergeValue"),s7=a7});function l7(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 c7,h7,u7,d7=x(()=>{mt(l7,"createBaseFor"),c7=l7}),p7=x(()=>{d7(),h7=c7(),u7=h7});function g7(e,t){return t?e.slice():(t=e.length,t=y7?y7(t):new e.constructor(t),e.copy(t),t)}var f7,m7,y7,v7,b7,x7,w7=x(()=>{uT(),f7="object"==typeof exports&&exports&&!exports.nodeType&&exports,m7=(m7=f7&&"object"==typeof module&&module&&!module.nodeType&&module)&&m7.exports===f7?Qw.Buffer:void 0,y7=m7?m7.allocUnsafe:void 0,mt(g7,"cloneBuffer"),v7=g7}),T7=x(()=>{uT(),b7=Qw.Uint8Array,x7=b7});function k7(e){var t=new e.constructor(e.byteLength);return new x7(t).set(new x7(e)),t}var C7,S7=x(()=>{T7(),mt(k7,"cloneArrayBuffer"),C7=k7});function E7(e,t){return t=t?C7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var _7,A7=x(()=>{S7(),mt(E7,"cloneTypedArray"),_7=E7});function R7(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}var L7,N7,D7,I7=x(()=>{mt(R7,"copyArray"),L7=R7}),M7=x(()=>{function t(){}NT(),N7=Object.create,mt(t,"object"),D7=function(e){return LT(e)?N7?N7(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function O7(t,r){return function(e){return t(r(e))}}var P7,$7,B7,F7=x(()=>{mt(O7,"overArg"),P7=O7}),z7=x(()=>{F7(),$7=P7(Object.getPrototypeOf,Object),B7=$7});function q7(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||U7)}var U7,G7,j7=x(()=>{U7=Object.prototype,mt(q7,"isPrototype"),G7=q7});function W7(e){return"function"!=typeof e.constructor||G7(e)?{}:D7(B7(e))}var Y7,V7=x(()=>{M7(),z7(),j7(),mt(W7,"initCloneObject"),Y7=W7});function H7(e){return null!=e&&"object"==typeof e}var X7,K7=x(()=>{mt(H7,"isObjectLike"),X7=H7});function Z7(e){return X7(e)&&"[object Arguments]"==_T(e)}var Q7,J7,eC,tC,rC,iC,nC,aC=x(()=>{AT(),K7(),mt(Z7,"baseIsArguments"),Q7=Z7}),sC=x(()=>{aC(),K7(),tC=Object.prototype,J7=tC.hasOwnProperty,eC=tC.propertyIsEnumerable,tC=Q7(function(){return arguments}())?Q7:function(e){return X7(e)&&J7.call(e,"callee")&&!eC.call(e,"callee")},rC=tC}),oC=x(()=>{iC=Array.isArray,nC=iC});function lC(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}var cC,hC=x(()=>{mt(lC,"isLength"),cC=lC});function uC(e){return null!=e&&cC(e.length)&&!IT(e)}var dC,pC=x(()=>{PT(),hC(),mt(uC,"isArrayLike"),dC=uC});function gC(e){return X7(e)&&dC(e)}var fC,mC=x(()=>{pC(),K7(),mt(gC,"isArrayLikeObject"),fC=gC});function yC(){return!1}var vC,bC,xC,wC,TC=x(()=>{mt(yC,"stubFalse"),vC=yC}),kC=x(()=>{uT(),TC(),xC="object"==typeof exports&&exports&&!exports.nodeType&&exports,bC=(bC=xC&&"object"==typeof module&&module&&!module.nodeType&&module)&&bC.exports===xC?Qw.Buffer:void 0,xC=bC?bC.isBuffer:void 0,wC=xC||vC});function CC(e){return!(!X7(e)||"[object Object]"!=_T(e))&&(null===(e=B7(e))||"function"==typeof(e=AC.call(e,"constructor")&&e.constructor)&&e instanceof e&&_C.call(e)==RC)}var SC,EC,_C,AC,RC,LC,NC=x(()=>{AT(),z7(),K7(),SC=Function.prototype,EC=Object.prototype,_C=SC.toString,AC=EC.hasOwnProperty,RC=_C.call(Object),mt(CC,"isPlainObject"),LC=CC});function DC(e){return X7(e)&&cC(e.length)&&!!IC[_T(e)]}var IC,MC,OC=x(()=>{AT(),hC(),K7(),(IC={})["[object Float32Array]"]=IC["[object Float64Array]"]=IC["[object Int8Array]"]=IC["[object Int16Array]"]=IC["[object Int32Array]"]=IC["[object Uint8Array]"]=IC["[object Uint8ClampedArray]"]=IC["[object Uint16Array]"]=IC["[object Uint32Array]"]=!0,IC["[object Arguments]"]=IC["[object Array]"]=IC["[object ArrayBuffer]"]=IC["[object Boolean]"]=IC["[object DataView]"]=IC["[object Date]"]=IC["[object Error]"]=IC["[object Function]"]=IC["[object Map]"]=IC["[object Number]"]=IC["[object Object]"]=IC["[object RegExp]"]=IC["[object Set]"]=IC["[object String]"]=IC["[object WeakMap]"]=!1,mt(DC,"baseIsTypedArray"),MC=DC});function PC(t){return function(e){return t(e)}}var $C,BC,FC,zC,qC,UC,GC,jC=x(()=>{mt(PC,"baseUnary"),$C=PC}),WC=x(()=>{hT(),zC="object"==typeof exports&&exports&&!exports.nodeType&&exports,BC=zC&&"object"==typeof module&&module&&!module.nodeType&&module,zC=BC&&BC.exports===zC,FC=zC&&Kw.process,zC=(()=>{try{return BC&&BC.require&&BC.require("util").types||FC&&FC.binding&&FC.binding("util")}catch{}})(),qC=zC}),YC=x(()=>{OC(),jC(),WC(),UC=(UC=qC&&qC.isTypedArray)?$C(UC):MC,GC=UC});function VC(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var HC,XC=x(()=>{mt(VC,"safeGet"),HC=VC});function KC(e,t,r){var i=e[t];QC.call(e,t)&&P6(i,r)&&(void 0!==r||t in e)||i7(e,t,r)}var ZC,QC,JC,eS=x(()=>{n7(),$6(),ZC=Object.prototype,QC=ZC.hasOwnProperty,mt(KC,"assignValue"),JC=KC});function tS(e,t,r,i){var n=!r;r=r||{};for(var a=-1,s=t.length;++a<s;){var o=t[a],l=i?i(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),(n?i7:JC)(r,o,l)}return r}var rS,iS=x(()=>{eS(),n7(),mt(tS,"copyObject"),rS=tS});function nS(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var aS,sS=x(()=>{mt(nS,"baseTimes"),aS=nS});function oS(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&lS.test(e))&&-1<e&&e%1==0&&e<t}var lS,cS,hS=x(()=>{lS=/^(?:0|[1-9]\d*)$/,mt(oS,"isIndex"),cS=oS});function uS(e,t){var r,i=nC(e),n=!i&&rC(e),a=!i&&!n&&wC(e),s=!i&&!n&&!a&&GC(e),o=i||n||a||s,l=o?aS(e.length,String):[],c=l.length;for(r in e)!t&&!pS.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||cS(r,c))||l.push(r);return l}var dS,pS,gS,fS=x(()=>{sS(),sC(),oC(),kC(),hS(),YC(),dS=Object.prototype,pS=dS.hasOwnProperty,mt(uS,"arrayLikeKeys"),gS=uS});function mS(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var yS,vS=x(()=>{mt(mS,"nativeKeysIn"),yS=mS});function bS(e){if(!LT(e))return yS(e);var t,r=G7(e),i=[];for(t in e)("constructor"!=t||!r&&wS.call(e,t))&&i.push(t);return i}var xS,wS,TS,kS=x(()=>{NT(),j7(),vS(),xS=Object.prototype,wS=xS.hasOwnProperty,mt(bS,"baseKeysIn"),TS=bS});function CS(e){return dC(e)?gS(e,!0):TS(e)}var SS,ES=x(()=>{fS(),kS(),pC(),mt(CS,"keysIn"),SS=CS});function _S(e){return rS(e,SS(e))}var AS,RS=x(()=>{iS(),ES(),mt(_S,"toPlainObject"),AS=_S});function LS(e,t,r,i,n,a,s){var o,l,c,h=HC(e,r),u=HC(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=nC(u))&&wC(u),c=!o&&!l&&GC(u),d=u,o||l||c?d=nC(h)?h:fC(h)?L7(h):l?v7(u,!(t=!1)):c?_7(u,!(t=!1)):[]:LC(u)||rC(u)?rC(d=h)?d=AS(h):LT(h)&&!IT(h)||(d=Y7(u)):t=!1),t&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),s7(e,r,d)}var NS,DS=x(()=>{o7(),w7(),A7(),I7(),V7(),sC(),oC(),mC(),kC(),PT(),NT(),NC(),YC(),XC(),RS(),mt(LS,"baseMergeDeep"),NS=LS});function IS(i,n,a,s,o){i!==n&&u7(n,function(e,t){var r;o=o||new Zk,LT(e)?NS(i,n,t,a,IS,s,o):(r=s?s(HC(i,t),e,t+"",i,n,o):void 0,s7(i,t,void 0===r?e:r))},SS)}var MS,OS=x(()=>{e7(),o7(),p7(),DS(),NT(),ES(),XC(),mt(IS,"baseMerge"),MS=IS});function PS(e){return e}var $S,BS=x(()=>{mt(PS,"identity"),$S=PS});function FS(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 zS,qS=x(()=>{mt(FS,"apply"),zS=FS});function US(a,s,o){return s=GS(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=GS(e.length-s,0),i=Array(r);++t<r;)i[t]=e[s+t];for(var t=-1,n=Array(s+1);++t<s;)n[t]=e[t];return n[s]=o(i),zS(a,this,n)}}var GS,jS,WS=x(()=>{qS(),GS=Math.max,mt(US,"overRest"),jS=US});function YS(e){return function(){return e}}var VS,HS,XS=x(()=>{mt(YS,"constant"),VS=YS}),KS=x(()=>{XS(),t7(),BS(),HS=Jk?function(e,t){return Jk(e,"toString",{configurable:!0,enumerable:!1,value:VS(t),writable:!0})}:$S});function ZS(r){var i=0,n=0;return function(){var e=QS(),t=16-(e-n);if(n=e,0<t){if(800<=++i)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}var QS,JS,eE,tE,rE=x(()=>{QS=Date.now,mt(ZS,"shortOut"),JS=ZS}),iE=x(()=>{KS(),rE(),eE=JS(HS),tE=eE});function nE(e,t){return tE(jS(e,t,$S),e+"")}var aE,sE=x(()=>{BS(),WS(),iE(),mt(nE,"baseRest"),aE=nE});function oE(e,t,r){var i;return!!LT(r)&&!!("number"==(i=typeof t)?dC(r)&&cS(t,r.length):"string"==i&&t in r)&&P6(r[t],e)}var lE,cE=x(()=>{$6(),pC(),hS(),NT(),mt(oE,"isIterateeCall"),lE=oE});function hE(o){return aE(function(e,t){var r=-1,i=t.length,n=1<i?t[i-1]:void 0,a=2<i?t[2]:void 0,n=3<o.length&&"function"==typeof n?(i--,n):void 0;for(a&&lE(t[0],t[1],a)&&(n=i<3?void 0:n,i=1),e=Object(e);++r<i;){var s=t[r];s&&o(e,s,r,n)}return e})}var uE,dE,pE,gE=x(()=>{sE(),cE(),mt(hE,"createAssigner"),uE=hE}),fE=x(()=>{OS(),gE(),dE=uE(function(e,t,r){MS(e,t,r)}),pE=dE});function mE(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),DE[e]??t):t}function yE(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,LE.sanitizeUrl)(e):e}function vE(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function bE(e){let t,r=0;e.forEach(e=>{r+=vE(e,t),t=e});var i=r/2;return zE(e,i)}function xE(e){return 1===e.length?e[0]:bE(e)}function wE(e,t,r){var r=structuredClone(r),i=(M.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),i=zE(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 TE(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 kE(t){let r="",i="0123456789abcdef",n=i.length;for(let e=0;e<t;e++)r+=i.charAt(Math.floor(Math.random()*n));return r}function CE(e,t){return XE(e,t).height}function SE(e,t){return XE(e,t).width}function EE(e){return"str"in e}function _E(e,t){return pE({},e,t)}function AE(e){return e??null}function RE(e,t){var r=Math.round(e.x),e=Math.round(e.y);return(t=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString())).includes(r.toString())||t.includes(e.toString())}var LE,NE,DE,IE,ME,OE,PE,$E,BE,FE,zE,qE,UE,GE,jE,WE,YE,VE,HE,XE,KE,ZE,QE,JE,e_,t_,r_,i_,n_,a_=x(()=>{LE=G(oT(),1),aT(),Pc(),ri(),e(),oh(),yr(),Mk(),fE(),ah(),NE="",DE={curveBasis:b3,curveBasisClosed:T3,curveBasisOpen:S3,curveBumpX:u3,curveBumpY:d3,curveBundle:A3,curveCardinalClosed:O3,curveCardinalOpen:B3,curveCardinal:D3,curveCatmullRomClosed:W3,curveCatmullRomOpen:H3,curveCatmullRom:U3,curveLinear:Q5,curveLinearClosed:Z3,curveMonotoneX:sw,curveMonotoneY:ow,curveNatural:uw,curveStep:gw,curveStepAfter:mw,curveStepBefore:fw},IE=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ME=mt(function(e,t){var r,i=OE(e,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(e=>e.args),Vt(r),Re(n,[...r])):i.args)return r=jc(e,t),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),OE=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${IE.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=zc.exec(e));)i.index===zc.lastIndex&&zc.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"),PE=mt(function(e){return e.replace(zc,"")},"removeDirectives"),$E=mt(function(e,t){for(var[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray"),mt(mE,"interpolateToCurve"),mt(yE,"formatUrl"),BE=mt((t,...e)=>{let r=t.split("."),i=r.length-1,n=r[i],a=window;for(let e=0;e<i;e++)if(!(a=a[r[e]]))return void M.error(`Function name: ${t} not found in window`);a[n](...e)},"runFunc"),mt(vE,"distance"),mt(bE,"traverseEdge"),mt(xE,"calcLabelPosition"),FE=mt((e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),zE=mt((e,t)=>{let r,i=t;for(var n of e){if(r){var a=vE(n,r);if(0===a)return r;if(a<i)i-=a;else{if((a=i/a)<=0)return r;if(1<=a)return{x:n.x,y:n.y};if(0<a&&a<1)return{x:FE((1-a)*r.x+a*n.x,5),y:FE((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),qE=mt((e,t,r)=>{M.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=zE(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(wE,"calcTerminalLabelPosition"),mt(TE,"getStylesFromArray"),UE=0,GE=mt(()=>(UE++,"id-"+Math.random().toString(36).substr(2,12)+"-"+UE),"generateId"),mt(kE,"makeRandomHex"),jE=mt(e=>kE(e.length),"random"),WE=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"),YE=mt(function(e,t){var r=t.text.replace(L.lineBreakRegex," "),[,i]=e_(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"),VE=Ik((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},o),L.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),c=[],h="";return l.forEach((e,t)=>{var r,i,n=SE(e+" ",o),a=SE(h,o);h=s<n?({hyphenatedStrings:r,remainingWord:i}=HE(e,s,"-",o),c.push(h,...r),i):s<=a+n?(c.push(h),e):[h,e].filter(Boolean).join(" "),t+1===l.length&&c.push(h)}),c.filter(e=>""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),HE=Ik((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=SE(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(CE,"calculateTextHeight"),mt(SE,"calculateTextWidth"),XE=Ik((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};var[,n]=e_(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=WE();if(u.text=c||NE,0===(u=((u=YE(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),KE=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")}},QE=mt(function(e){return ZE=ZE||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ZE.innerHTML=e,unescape(ZE.textContent)},"entityDecode"),mt(EE,"isDetailedError"),JE=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"),e_=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(_E,"cleanAndMerge"),t_={assignWithDepth:Re,wrapLabel:VE,calculateTextHeight:CE,calculateTextWidth:SE,calculateTextDimensions:XE,cleanAndMerge:_E,detectInit:ME,detectDirective:OE,isSubstringInArray:$E,interpolateToCurve:mE,calcLabelPosition:xE,calcCardinalityPosition:qE,calcTerminalLabelPosition:wE,formatUrl:yE,getStylesFromArray:TE,generateId:GE,random:jE,runFunc:BE,entityDecode:QE,insertTitle:JE,isLabelCoordinateInPath:RE,parseFontSize:e_,InitIDGenerator:KE},r_=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"),i_=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),n_=mt((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+e+`_${t}_`+r+(n?"_"+n:""),"getEdgeId"),mt(AE,"handleUndefinedAttr"),mt(RE,"isLabelCoordinateInPath")});function s_(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=VE(t[e].text,n,i),t[e].textLines=t[e].text.split(L.lineBreakRegex).length,t[e].width=n,t[e].height=CE(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(SE(s,i),t[e].width),a=CE(s,i),t[e].height=t[e].height+a}}function o_(t,r,i,e,n){var a,s,o=new p_(n);o.data.widthLimit=i.data.widthLimit/Math.min(u_,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&&d_.wrap,c=m_(d_),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",s_("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+"]",s_("type",s,l,c=m_(d_),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=m_(d_)).fontSize=c.fontSize-2,s_("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%u_==0?(l=i.data.startx+d_.diagramMarginX,i.data.stopy+d_.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+d_.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&&b_(o,t,l,c),r=s.alias,0<(l=n.db.getBoundaries(r)).length&&o_(t,0,o,l,n),"global"!==s.alias&&v_(t,s,o),i.data.stopy=Math.max(o.data.stopy+d_.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+d_.c4ShapeMargin,i.data.stopx),l_=Math.max(l_,i.data.stopx),c_=Math.max(c_,i.data.stopy)}}var l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,b_,x_,w_,T_,k_,C_,S_,E_,__,A_=x(()=>{aT(),cT(),e(),lh(),Pc(),Su(),Cu(),yr(),a_(),ch(),c_=l_=0,h_=4,u_=2,Hc.yy=Tu,d_={},p_=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,g_(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>h_)&&(t=this.nextData.startx+e.margin+d_.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},g_(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},g_=mt(function(e){Re(d_,e),e.fontFamily&&(d_.personFontFamily=d_.systemFontFamily=d_.messageFontFamily=e.fontFamily),e.fontSize&&(d_.personFontSize=d_.systemFontSize=d_.messageFontSize=e.fontSize),e.fontWeight&&(d_.personFontWeight=d_.systemFontWeight=d_.messageFontWeight=e.fontWeight)},"setConf"),f_=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),m_=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),y_=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(s_,"calcC4ShapeTextWH"),v_=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=d_.c4ShapeMargin-35;var r=t.wrap&&d_.wrap,i=m_(d_),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",SE(t.label.text,i));s_("label",t,r,i,n),Hw.drawBoundary(e,t,d_)},"drawBoundary"),b_=mt(function(r,i,n,e){let a=0;for(var s of e){a=0;var o=n[s];switch((s=f_(d_,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=SE("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=d_.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&&d_.wrap,l=d_.width-2*d_.c4ShapePadding,c=f_(d_,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",s_("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+"]",s_("type",o,s,f_(d_,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+"]",s_("techn",o,s,f_(d_,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&&(s_("descr",o,s,f_(d_,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+=d_.c4ShapePadding,o.width=Math.max(o.width||d_.width,t,d_.width),o.height=Math.max(o.height||d_.height,e,d_.height),o.margin=o.margin||d_.c4ShapeMargin,r.insert(o),Hw.drawC4Shape(i,o,d_)}r.bumpLastMargin(d_.c4ShapeMargin)},"drawC4ShapeArray"),x_=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},w_=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<n?d=new x_(r+e.width,o):i==a&&n<r?d=new x_(r,o):r==n&&i<a?d=new x_(s,i+e.height):r==n&&a<i&&(d=new x_(s,i)),n<r&&i<a?d=h<=u?new x_(r,o+h*e.width/2):new x_(s-l/c*e.height/2,i+e.height):r<n&&i<a?d=h<=u?new x_(r+e.width,o+h*e.width/2):new x_(s+l/c*e.height/2,i+e.height):r<n&&a<i?d=h<=u?new x_(r+e.width,o-h*e.width/2):new x_(s+e.height/2*l/c,i):n<r&&a<i&&(d=h<=u?new x_(r,o-e.width/2*h):new x_(s-e.height/2*l/c,i)),d},"getIntersectPoint"),T_=mt(function(e,t){var r={x:0,y:0},i=(r.x=t.x+t.width/2,r.y=t.y+t.height/2,w_(e,r));return r.x=e.x+e.width/2,r.y=e.y+e.height/2,{startPoint:i,endPoint:e=w_(t,r)}},"getIntersectPoints"),k_=mt(function(e,t,r,i){let n=0;for(var a of t){n+=1;var s=a.wrap&&d_.wrap,o=y_(d_);"C4Dynamic"===i.db.getC4Type()&&(a.label.text=n+": "+a.label.text);let e=SE(a.label.text,o);s_("label",a,s,o,e),a.techn&&""!==a.techn.text&&s_("techn",a,s,o,e=SE(a.techn.text,o)),a.descr&&""!==a.descr.text&&s_("descr",a,s,o,e=SE(a.descr.text,o)),s=r(a.from),o=r(a.to),s=T_(s,o),a.startPoint=s.startPoint,a.endPoint=s.endPoint}Hw.drawRels(e,t,d_)},"drawRels"),mt(o_,"drawInsideBoundary"),C_=mt(function(e,t,r,i){d_=O().c4;let n=O().securityLevel,a;"sandbox"===n&&(a=V("#i"+t));var s=V("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o=i.db,o=(i.db.setWrap(d_.wrap),h_=o.getC4ShapeInRow(),u_=o.getC4BoundaryInRow(),M.debug("C:"+JSON.stringify(d_,null,2)),"sandbox"===n?s.select(`[id="${t}"]`):V(`[id="${t}"]`)),s=(Hw.insertComputerIcon(o),Hw.insertDatabaseIcon(o),Hw.insertClockIcon(o),(s=new p_(i)).setData(d_.diagramMarginX,d_.diagramMarginX,d_.diagramMarginY,d_.diagramMarginY),s.data.widthLimit=screen.availWidth,l_=d_.diagramMarginX,c_=d_.diagramMarginY,t=i.db.getTitle(),o_(o,0,s,i.db.getBoundaries(""),i),Hw.insertArrowHead(o),Hw.insertArrowEnd(o),Hw.insertArrowCrossHead(o),Hw.insertArrowFilledHead(o),k_(o,i.db.getRels(),i.db.getC4Shape,i),s.data.stopx=l_,s.data.stopy=c_,(i=s.data).stopy-i.starty+2*d_.diagramMarginY),l=i.stopx-i.startx+2*d_.diagramMarginX,t=(t&&o.append("text").text(t).attr("x",(i.stopx-i.startx)/2-4*d_.diagramMarginX).attr("y",i.starty+d_.diagramMarginY),Qc(o,s,l,d_.useMaxWidth),t?60:0);o.attr("viewBox",i.startx-d_.diagramMarginX+" -"+(d_.diagramMarginY+t)+" "+l+" "+(s+t)),M.debug("models:",i)},"draw"),S_={drawPersonOrSystemArray:b_,drawBoundary:v_,setConf:g_,draw:C_}}),R_=x(()=>{E_=mt(e=>`.person {
|
||
stroke: ${e.personBorder};
|
||
fill: ${e.personBkg};
|
||
}
|
||
`,"getStyles"),__=E_}),L_={};dqe(L_,{diagram:()=>N_});var N_,D_=x(()=>{lh(),Su(),A_(),R_(),N_={parser:Xc,db:Tu,renderer:S_,styles:__,init:mt(({c4:e,wrap:t})=>{S_.setConf(e),Tu.setWrap(t)},"init")}});function I_(e){return"u"<typeof e||null===e}function M_(e){return"object"==typeof e&&null!==e}function O_(e){return Array.isArray(e)?e:I_(e)?[]:[e]}function P_(e,t){var r,i,n,a;if(t)for(r=0,i=(a=Object.keys(t)).length;r<i;r+=1)e[n=a[r]]=t[n];return e}function $_(e,t){for(var r="",i=0;i<t;i+=1)r+=e;return r}function B_(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}function F_(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
||
|
||
`+e.mark.snippet),i+" "+r):i}function z_(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=F_(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function q_(e,t,r,i,n){var a="",s="";return(n=Math.floor(n/2)-1)<i-t&&(t=i-n+(a=" ... ").length),n<r-i&&(r=i+n-(s=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}function U_(e,t){return BA.repeat(" ",t-e.length)+e}function G_(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],a=[],s=-1;r=i.exec(e.buffer);)a.push(r.index),n.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);for(var o,l="",c=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+c+3),u=1;u<=t.linesBefore&&!(s-u<0);u++)o=q_(e.buffer,n[s-u],a[s-u],e.position-(n[s]-n[s-u]),h),l=BA.repeat(" ",t.indent)+U_((e.line-u+1).toString(),c)+" | "+o.str+`
|
||
`+l;for(o=q_(e.buffer,n[s],a[s],e.position,h),l=(l+=BA.repeat(" ",t.indent)+U_((e.line+1).toString(),c)+" | "+o.str+`
|
||
`)+BA.repeat("-",t.indent+c+3+o.pos)+`^
|
||
`,u=1;u<=t.linesAfter&&!(a.length<=s+u);u++)o=q_(e.buffer,n[s+u],a[s+u],e.position-(n[s]-n[s+u]),h),l+=BA.repeat(" ",t.indent)+U_((e.line+u+1).toString(),c)+" | "+o.str+`
|
||
`;return l.replace(/\n$/,"")}function j_(e){var r={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){r[String(e)]=t})}),r}function W_(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===qA.indexOf(e))throw new FA('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=j_(e.styleAliases||null),-1===UA.indexOf(this.kind))throw new FA('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function Y_(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(e,t){e.tag===r.tag&&e.kind===r.kind&&e.multi===r.multi&&(i=t)}),n[i]=r}),n}function V_(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(mt(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function H_(e){return this.extend(e)}function X_(e){var t;return null===e||1===(t=e.length)&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function K_(){return null}function Z_(e){return null===e}function Q_(e){var t;return null!==e&&(4===(t=e.length)&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e))}function J_(e){return"true"===e||"True"===e||"TRUE"===e}function e8(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function t8(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function r8(e){return 48<=e&&e<=55}function i8(e){return 48<=e&&e<=57}function n8(e){if(null===e)return!1;var t,r=e.length,i=0,n=!1;if(!r)return!1;if("0"===(t="-"!==(t=e[i])&&"+"!==t?t:e[++i])){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i<r;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;n=!0}return n&&"_"!==t}if("x"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!t8(e.charCodeAt(i)))return!1;n=!0}return n&&"_"!==t}if("o"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!r8(e.charCodeAt(i)))return!1;n=!0}return n&&"_"!==t}}if("_"===t)return!1;for(;i<r;i++)if("_"!==(t=e[i])){if(!i8(e.charCodeAt(i)))return!1;n=!0}return!(!n||"_"===t)}function a8(e){var t,r=1;if("-"!==(t=(e=-1!==e.indexOf("_")?e.replace(/_/g,""):e)[0])&&"+"!==t||("-"===t&&(r=-1),t=(e=e.slice(1))[0]),"0"===e)return 0;if("0"===t){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function s8(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!BA.isNegativeZero(e)}function o8(e){return!(null===e||!jA.test(e)||"_"===e[e.length-1])}function l8(e){var t="-"===(e=e.replace(/_/g,"").toLowerCase())[0]?-1:1;return".inf"===(e=0<="+-".indexOf(e[0])?e.slice(1):e)?1==t?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:t*parseFloat(e,10)}function c8(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(BA.isNegativeZero(e))return"-0.0";return t=e.toString(10),WA.test(t)?t.replace("e",".e"):t}function h8(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||BA.isNegativeZero(e))}function u8(e){return null!==e&&(null!==VA.exec(e)||null!==HA.exec(e))}function d8(e){var t,r,i,n,a,s=0,o=null,l=VA.exec(e);if(null===(l=null===l?HA.exec(e):l))throw new Error("Date resolve error");if(e=+l[1],t=+l[2]-1,r=+l[3],!l[4])return new Date(Date.UTC(e,t,r));if(i=+l[4],n=+l[5],a=+l[6],l[7]){for(s=l[7].slice(0,3);s.length<3;)s+="0";s=+s}return l[9]&&(o=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9])&&(o=-o),l=new Date(Date.UTC(e,t,r,i,n,a,s)),o&&l.setTime(l.getTime()-o),l}function p8(e){return e.toISOString()}function g8(e){return"<<"===e||null===e}function f8(e){if(null===e)return!1;for(var t,r=0,i=e.length,n=ZA,a=0;a<i;a++)if(!(64<(t=n.indexOf(e.charAt(a))))){if(t<0)return!1;r+=6}return r%8==0}function m8(e){for(var t=e.replace(/[\r\n=]/g,""),r=t.length,i=ZA,n=0,a=[],s=0;s<r;s++)s%4==0&&s&&(a.push(n>>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 y8(e){for(var t,r="",i=0,n=e.length,a=ZA,s=0;s<n;s++)s%3==0&&s&&(r=(r=(r=(r+=a[i>>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 v8(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function b8(e){if(null!==e)for(var t,r,i,n=[],a=e,s=0,o=a.length;s<o;s+=1){if(t=a[s],i=!1,"[object Object]"!==e9.call(t))return!1;for(r in t)if(JA.call(t,r)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==n.indexOf(r))return!1;n.push(r)}return!0}function x8(e){return null!==e?e:[]}function w8(e){if(null!==e)for(var t,r,i=e,n=new Array(i.length),a=0,s=i.length;a<s;a+=1){if(t=i[a],"[object Object]"!==r9.call(t)||1!==(r=Object.keys(t)).length)return!1;n[a]=[r[0],t[r[0]]]}return!0}function T8(e){if(null===e)return[];for(var t,r,i=e,n=new Array(i.length),a=0,s=i.length;a<s;a+=1)t=i[a],r=Object.keys(t),n[a]=[r[0],t[r[0]]];return n}function k8(e){if(null!==e){var t,r=e;for(t in r)if(n9.call(r,t)&&null!==r[t])return!1}return!0}function C8(e){return null!==e?e:{}}function S8(e){return Object.prototype.toString.call(e)}function E8(e){return 10===e||13===e}function _8(e){return 9===e||32===e}function A8(e){return 9===e||32===e||10===e||13===e}function R8(e){return 44===e||91===e||93===e||123===e||125===e}function L8(e){return 48<=e&&e<=57?e-48:97<=(e|=32)&&e<=102?e-97+10:-1}function N8(e){return 120===e?2:117===e?4:85===e?8:0}function D8(e){return 48<=e&&e<=57?e-48:-1}function I8(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?`
|
||
`:118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function M8(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function O8(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s9,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 P8(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=zA(e),new FA(t,e)}function $8(e,t){throw P8(e,t)}function B8(e,t){e.onWarning&&e.onWarning.call(null,P8(e,t))}function F8(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)9===(s=o.charCodeAt(n))||32<=s&&s<=1114111||$8(e,"expected valid JSON character");else f9.test(o)&&$8(e,"the stream contains non-printable characters");e.result+=o}}function z8(e,t,r,i){var n,a,s,o;for(BA.isObject(r)||$8(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(n=Object.keys(r)).length;s<o;s+=1)a=n[s],o9.call(t,a)||(t[a]=r[a],i[a]=!0)}function q8(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(c=0,h=(n=Array.prototype.slice.call(n)).length;c<h;c+=1)Array.isArray(n[c])&&$8(e,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===S8(n[c])&&(n[c]="[object Object]");if("object"==typeof n&&"[object Object]"===S8(n)&&(n="[object Object]"),n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)z8(e,t,a[c],r);else z8(e,t,a,r);else e.json||o9.call(r,n)||!o9.call(t,n)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,$8(e,"duplicated mapping key")),"__proto__"===n?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}function U8(e){var t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):$8(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function G8(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);0!==n;){for(;_8(n);)9===n&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&35===n)for(;10!==(n=e.input.charCodeAt(++e.position))&&13!==n&&0!==n;);if(!E8(n))break;for(U8(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===n;)e.lineIndent++,n=e.input.charCodeAt(++e.position)}return-1!==r&&0!==i&&e.lineIndent<r&&B8(e,"deficient indentation"),i}function j8(e){var t=e.position,r=e.input.charCodeAt(t);return!(45!==r&&46!==r||r!==e.input.charCodeAt(t+1)||r!==e.input.charCodeAt(t+2)||0!==(r=e.input.charCodeAt(t+=3))&&!A8(r))}function W8(e,t){1===t?e.result+=" ":1<t&&(e.result+=BA.repeat(`
|
||
`,t-1))}function Y8(e,t,r){var i,n,a,s,o,l,c,h=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(A8(d)||R8(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(A8(i=e.input.charCodeAt(e.position+1))||r&&R8(i)))return!1;for(e.kind="scalar",e.result="",n=a=e.position,s=!1;0!==d;){if(58===d){if(A8(i=e.input.charCodeAt(e.position+1))||r&&R8(i))break}else if(35===d){if(A8(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&j8(e)||r&&R8(d))break;if(E8(d)){if(o=e.line,l=e.lineStart,c=e.lineIndent,G8(e,!1,-1),t<=e.lineIndent){s=!0,d=e.input.charCodeAt(e.position);continue}e.position=a,e.line=o,e.lineStart=l,e.lineIndent=c;break}}s&&(F8(e,n,a,!1),W8(e,e.line-o),n=a=e.position,s=!1),_8(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return F8(e,n,a,!1),!!e.result||(e.kind=h,e.result=u,!1)}function V8(e,t){var r,i,n=e.input.charCodeAt(e.position);if(39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(F8(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else E8(n)?(F8(e,r,i,!0),W8(e,G8(e,!1,t)),r=i=e.position):e.position===e.lineStart&&j8(e)?$8(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);$8(e,"unexpected end of the stream within a single quoted scalar")}function H8(e,t){var r,i,n,a,s,o=e.input.charCodeAt(e.position);if(34!==o)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return F8(e,r,e.position,!0),e.position++,!0;if(92===o){if(F8(e,r,e.position,!0),E8(o=e.input.charCodeAt(++e.position)))G8(e,!1,t);else if(o<256&&x9[o])e.result+=w9[o],e.position++;else if(0<(s=N8(o))){for(n=s,a=0;0<n;n--)0<=(s=L8(o=e.input.charCodeAt(++e.position)))?a=(a<<4)+s:$8(e,"expected hexadecimal character");e.result+=M8(a),e.position++}else $8(e,"unknown escape sequence");r=i=e.position}else E8(o)?(F8(e,r,i,!0),W8(e,G8(e,!1,t)),r=i=e.position):e.position===e.lineStart&&j8(e)?$8(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}$8(e,"unexpected end of the stream within a double quoted scalar")}function X8(e,t){var r,i,n,a,s,o,l,c,h,u,d,p=!0,g=e.tag,f=e.anchor,m=Object.create(null),y=e.input.charCodeAt(e.position);if(91===y)c=!(s=93),a=[];else{if(123!==y)return!1;s=125,c=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),y=e.input.charCodeAt(++e.position);0!==y;){if(G8(e,!0,t),(y=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=g,e.anchor=f,e.kind=c?"mapping":"sequence",e.result=a,!0;p?44===y&&$8(e,"expected the node content, but found ','"):$8(e,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&A8(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,G8(e,!0,t)),r=e.line,i=e.lineStart,n=e.position,rA(e,t,l9,!1,!0),u=e.tag,h=e.result,G8(e,!0,t),y=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==y||(o=!0,y=e.input.charCodeAt(++e.position),G8(e,!0,t),rA(e,t,l9,!1,!0),d=e.result),c?q8(e,a,m,u,h,d,r,i,n):o?a.push(q8(e,null,m,u,h,d,r,i,n)):a.push(h),G8(e,!0,t),44===(y=e.input.charCodeAt(e.position))?(p=!0,y=e.input.charCodeAt(++e.position)):p=!1}$8(e,"unexpected end of the stream within a flow collection")}function K8(e,t){var r,i,n,a=d9,s=!1,o=!1,l=t,c=0,h=!1,u=e.input.charCodeAt(e.position);if(124===u)i=!1;else{if(62!==u)return!1;i=!0}for(e.kind="scalar",e.result="";0!==u;)if(43===(u=e.input.charCodeAt(++e.position))||45===u)d9===a?a=43===u?g9:p9:$8(e,"repeat of a chomping mode identifier");else{if(!(0<=(n=D8(u))))break;0===n?$8(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?$8(e,"repeat of an indentation width identifier"):(l=t+n-1,o=!0)}if(_8(u)){for(;_8(u=e.input.charCodeAt(++e.position)););if(35===u)for(;!E8(u=e.input.charCodeAt(++e.position))&&0!==u;);}for(;0!==u;){for(U8(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<l)&&32===u;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>l&&(l=e.lineIndent),E8(u))c++;else{if(e.lineIndent<l){a===g9?e.result+=BA.repeat(`
|
||
`,s?1+c:c):a===d9&&s&&(e.result+=`
|
||
`);break}for(i?_8(u)?(h=!0,e.result+=BA.repeat(`
|
||
`,s?1+c:c)):h?(h=!1,e.result+=BA.repeat(`
|
||
`,c+1)):0===c?s&&(e.result+=" "):e.result+=BA.repeat(`
|
||
`,c):e.result+=BA.repeat(`
|
||
`,s?1+c:c),o=s=!0,c=0,r=e.position;!E8(u)&&0!==u;)u=e.input.charCodeAt(++e.position);F8(e,r,e.position,!1)}}return!0}function Z8(e,t){var r,i,n=e.tag,a=e.anchor,s=[],o=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,$8(e,"tab characters must not be used in indentation")),45===i)&&A8(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,G8(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,rA(e,t,h9,!1,!0),s.push(e.result),G8(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==i)$8(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=n,e.anchor=a,e.kind="sequence",e.result=s,!0)}function Q8(e,t,r){var i,n,a,s,o,l,c,h=e.tag,u=e.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,$8(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,63!==c&&58!==c||!A8(i)){if(s=e.line,o=e.lineStart,l=e.position,!rA(e,r,c9,!1,!0))break;if(e.line===a){for(c=e.input.charCodeAt(e.position);_8(c);)c=e.input.charCodeAt(++e.position);if(58===c)A8(c=e.input.charCodeAt(++e.position))||$8(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(q8(e,d,p,g,f,null,s,o,l),g=f=m=null),n=y=!(v=!0),g=e.tag,f=e.result;else{if(!v)return e.tag=h,e.anchor=u,!0;$8(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=h,e.anchor=u,!0;$8(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(q8(e,d,p,g,f,null,s,o,l),g=f=m=null),n=y=v=!0):y?n=!(y=!1):$8(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),rA(e,t,u9,!0,n)&&(y?f=e.result:m=e.result),y||(q8(e,d,p,g,f,m,s,o,l),g=f=m=null),G8(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)$8(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&q8(e,d,p,g,f,null,s,o,l),v&&(e.tag=h,e.anchor=u,e.kind="mapping",e.result=d),v}function J8(e){var t,r,i,n=!1,a=!1,s=e.input.charCodeAt(e.position);if(33!==s)return!1;if(null!==e.tag&&$8(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(n=!0,s=e.input.charCodeAt(++e.position)):33===s?(a=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,n){for(;0!==(s=e.input.charCodeAt(++e.position))&&62!==s;);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):$8(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!A8(s);)33===s&&(a?$8(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),v9.test(r)||$8(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),y9.test(i)&&$8(e,"tag suffix cannot contain flow indicator characters")}i&&!b9.test(i)&&$8(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{$8(e,"tag name is malformed: "+i)}return n?e.tag=i:o9.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:"!"===r?e.tag="!"+i:"!!"===r?e.tag="tag:yaml.org,2002:"+i:$8(e,'undeclared tag handle "'+r+'"'),!0}function eA(e){var t,r=e.input.charCodeAt(e.position);if(38!==r)return!1;for(null!==e.anchor&&$8(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!A8(r)&&!R8(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&$8(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function tA(e){var t,r=e.input.charCodeAt(e.position);if(42!==r)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!A8(r)&&!R8(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&$8(e,"name of an alias node must contain at least one character"),t=e.input.slice(t,e.position),o9.call(e.anchorMap,t)||$8(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],G8(e,!0,-1),!0}function rA(e,t,r,i,n){var a,s,o,l,c,h,u,d=1,p=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=u9===r||h9===r,i&&G8(e,!0,-1)&&(p=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;J8(e)||eA(e);)G8(e,!0,-1)?(p=!0,o=a,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):o=!1;if(o=o&&(p||n),1!==d&&u9!==r||(i=l9===r||c9===r?t:t+1,n=e.position-e.lineStart,1===d?o&&(Z8(e,n)||Q8(e,n,i))||X8(e,i)?g=!0:(s&&K8(e,i)||V8(e,i)||H8(e,i)?g=!0:tA(e)?(g=!0,null===e.tag&&null===e.anchor||$8(e,"alias node should not have any properties")):Y8(e,i,l9===r)&&(g=!0,null===e.tag)&&(e.tag="?"),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=o&&Z8(e,n))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&$8(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((u=e.implicitTypes[l]).resolve(e.result)){e.result=u.construct(e.result),e.tag=u.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(o9.call(e.typeMap[e.kind||"fallback"],e.tag))u=e.typeMap[e.kind||"fallback"][e.tag];else for(u=null,l=0,c=(h=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||$8(e,"unknown tag !<"+e.tag+">"),null!==e.result&&u.kind!==e.kind&&$8(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)):$8(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 iA(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))&&(G8(e,!0,-1),n=e.input.charCodeAt(e.position),!(0<e.lineIndent||37!==n));){for(s=!0,n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!A8(n);)n=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&$8(e,"directive name must not be less than one character in length");0!==n;){for(;_8(n);)n=e.input.charCodeAt(++e.position);if(35===n){for(;0!==(n=e.input.charCodeAt(++e.position))&&!E8(n););break}if(E8(n))break;for(t=e.position;0!==n&&!A8(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==n&&U8(e),o9.call(k9,r)?k9[r](e,r,i):B8(e,'unknown document directive "'+r+'"')}G8(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,G8(e,!0,-1)):s&&$8(e,"directives end mark is expected"),rA(e,e.lineIndent-1,u9,!1,!0),G8(e,!0,-1),e.checkLineBreaks&&m9.test(e.input.slice(a,e.position))&&B8(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&j8(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,G8(e,!0,-1)):e.position<e.length-1&&$8(e,"end of the stream or a document separator is expected")}function nA(e,t){t=t||{};var r=new O8(e=0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+=`
|
||
`),65279===e.charCodeAt(0))?e.slice(1):e,t);for(-1!==(t=e.indexOf("\0"))&&(r.position=t,$8(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)iA(r);return r.documents}function aA(e,t,r){null!==t&&"object"==typeof t&&"u"<typeof r&&(r=t,t=null);var i=nA(e,r);if("function"!=typeof t)return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}function sA(e,t){if(0!==(e=nA(e,t)).length){if(1===e.length)return e[0];throw new FA("expected a single document in the stream, but found more")}}function oA(e,t){var r,i,n,a,s,o,l;if(null===t)return{};for(r={},n=0,a=(i=Object.keys(t)).length;n<a;n+=1)s=i[n],o=String(t[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=e.compiledTypeMap.fallback[s])&&E9.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function lA(e){var t,r,i=e.toString(16).toUpperCase();if(e<=255)t="x",r=2;else if(e<=65535)t="u",r=4;else{if(!(e<=4294967295))throw new FA("code point within a string may not be greater than 0xFFFFFFFF");t="U",r=8}return"\\"+t+BA.repeat("0",r-i.length)+i}function cA(e){this.schema=e.schema||s9,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=BA.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=oA(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?D9:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function hA(e,t){for(var r,i,n=BA.repeat(" ",t),a=0,s="",o=e.length;a<o;)a=-1===(r=e.indexOf(`
|
||
`,a))?(i=e.slice(a),o):(i=e.slice(a,r+1),r+1),i.length&&i!==`
|
||
`&&(s+=n),s+=i;return s}function uA(e,t){return`
|
||
`+BA.repeat(" ",e.indent*t)}function dA(e,t){for(var r=0,i=e.implicitTypes.length;r<i;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function pA(e){return 32===e||9===e}function gA(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==_9||65536<=e&&e<=1114111}function fA(e){return gA(e)&&e!==_9&&13!==e&&e!==A9}function mA(e,t,r){var i=fA(e),n=i&&!pA(e);return(r?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!n)||fA(t)&&!pA(t)&&35===e||58===t&&n}function yA(e){return gA(e)&&e!==_9&&!pA(e)&&45!==e&&63!==e&&58!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&35!==e&&38!==e&&42!==e&&33!==e&&124!==e&&61!==e&&62!==e&&39!==e&&34!==e&&37!==e&&64!==e&&96!==e}function vA(e){return!pA(e)&&58!==e}function bA(e,t){var r=e.charCodeAt(t);return 55296<=r&&r<=56319&&t+1<e.length&&56320<=(e=e.charCodeAt(t+1))&&e<=57343?1024*(r-55296)+e-56320+65536:r}function xA(e){return/^\n* /.test(e)}function wA(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==i,g=-1,f=yA(bA(e,0))&&vA(bA(e,e.length-1));if(t||s)for(l=0;l<e.length;65536<=c?l+=2:l++){if(!gA(c=bA(e,l)))return $9;f=f&&mA(c,h,o),h=c}else{for(l=0;l<e.length;65536<=c?l+=2:l++){if((c=bA(e,l))===A9)u=!0,p&&(d=d||i<l-g-1&&" "!==e[g+1],g=l);else if(!gA(c))return $9;f=f&&mA(c,h,o),h=c}d=d||p&&i<l-g-1&&" "!==e[g+1]}return u||d?9<r&&xA(e)?$9:s?a===D9?$9:M9:d?P9:O9:!f||s||n(e)?a===D9?$9:M9:I9}function TA(n,a,s,o,l){n.dump=(()=>{if(0===a.length)return n.quotingType===D9?'""':"''";if(!n.noCompatMode&&(-1!==L9.indexOf(a)||N9.test(a)))return n.quotingType===D9?'"'+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&&s>=n.flowLevel;function i(e){return dA(n,e)}switch(mt(i,"testAmbiguity"),wA(a,r,n.indent,t,i,n.quotingType,n.forceQuotes&&!o,l)){case I9:return a;case M9:return"'"+a.replace(/'/g,"''")+"'";case O9:return"|"+kA(a,n.indent)+CA(hA(a,e));case P9:return">"+kA(a,n.indent)+CA(hA(SA(a,t),e));case $9:return'"'+_A(a)+'"';default:throw new FA("impossible error: invalid scalar style")}})()}function kA(e,t){var t=xA(e)?String(t):"",r=e[e.length-1]===`
|
||
`;return t+(!r||e[e.length-2]!==`
|
||
`&&e!==`
|
||
`?r?"":"-":"+")+`
|
||
`}function CA(e){return e[e.length-1]===`
|
||
`?e.slice(0,-1):e}function SA(e,t){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=e.indexOf(`
|
||
`))?r:e.length,i.lastIndex=r,EA(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?"":`
|
||
`)+EA(o,t),a=l}return n}function EA(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=a<s?s:i),a=r+1),s=i;return o+=`
|
||
`,e.length-a>t&&a<s?o+=e.slice(a,s)+`
|
||
`+e.slice(s+1):o+=e.slice(a),o.slice(1)}function _A(e){for(var t,r,i="",n=0;n<e.length;65536<=t?n+=2:n++)t=bA(e,n),!(r=R9[t])&&gA(t)?(i+=e[n],65536<=t&&(i+=e[n+1])):i+=r||lA(t);return i}function AA(e,t,r){for(var i,n="",a=e.tag,s=0,o=r.length;s<o;s+=1)i=r[s],e.replacer&&(i=e.replacer.call(r,String(s),i)),(IA(e,t,i,!1,!1)||"u"<typeof i&&IA(e,t,null,!1,!1))&&(""!==n&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=a,e.dump="["+n+"]"}function RA(e,t,r,i){for(var n,a="",s=e.tag,o=0,l=r.length;o<l;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(IA(e,t+1,n,!0,!0,!1,!0)||"u"<typeof n&&IA(e,t+1,null,!0,!0,!1,!0))&&(i&&""===a||(a+=uA(e,t)),e.dump&&A9===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function LA(e,t,r){for(var i,n,a,s="",o=e.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==s&&(a+=", "),e.condenseFlow&&(a+='"'),n=r[i=l[c]],e.replacer&&(n=e.replacer.call(r,i,n)),IA(e,t,i,!1,!1)&&(1024<e.dump.length&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),IA(e,t,n,!1,!1))&&(s+=a+=e.dump);e.tag=o,e.dump="{"+s+"}"}function NA(e,t,r,i){var n,a,s,o,l,c="",h=e.tag,u=Object.keys(r);if(!0===e.sortKeys)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new FA("sortKeys must be a boolean or a function");for(n=0,a=u.length;n<a;n+=1)l="",i&&""===c||(l+=uA(e,t)),s=r[o=u[n]],e.replacer&&(s=e.replacer.call(r,o,s)),IA(e,t+1,o,!0,!0,!0)&&((o=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&A9===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,o&&(l+=uA(e,t)),IA(e,t+1,s,!0,o))&&(e.dump&&A9===e.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=e.dump);e.tag=h,e.dump=c||"{}"}function DA(e,t,r){for(var i,n,a,s=r?e.explicitTypes:e.implicitTypes,o=0,l=s.length;o<l;o+=1)if(((n=s[o]).instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof t&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(a=e.styleMap[n.tag]||n.defaultStyle,"[object Function]"===S9.call(n.represent))i=n.represent(t,a);else{if(!E9.call(n.represent,a))throw new FA("!<"+n.tag+'> tag resolver accepts not "'+a+'" style');i=n.represent[a](t,a)}e.dump=i}return!0}return!1}function IA(e,t,r,i,n,a,s){e.tag=null,e.dump=r,DA(e,r,!1)||DA(e,r,!0);var o,l,c=S9.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<t)&&(n=!1),l&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&l&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===c)i&&0!==Object.keys(e.dump).length?(NA(e,t,e.dump,n),l&&(e.dump="&ref_"+o+e.dump)):(LA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===c)i&&0!==e.dump.length?(e.noArrayIndent&&!s&&0<t?RA(e,t-1,e.dump,n):RA(e,t,e.dump,n),l&&(e.dump="&ref_"+o+e.dump)):(AA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new FA("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&TA(e,e.dump,t,a,h)}null!==e.tag&&"?"!==e.tag&&(r=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),r="!"===e.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",e.dump=r+" "+e.dump)}return!0}function MA(e,t){var r,i,n=[],a=[];for(OA(e,n,a),r=0,i=a.length;r<i;r+=1)t.duplicates.push(n[a[r]]);t.usedDuplicates=new Array(i)}function OA(e,t,r){var i,n,a;if(null!==e&&"object"==typeof e)if(-1!==(n=t.indexOf(e)))-1===r.indexOf(n)&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)OA(e[n],t,r);else for(n=0,a=(i=Object.keys(e)).length;n<a;n+=1)OA(e[i[n]],t,r)}function PA(e,t){return(t=new cA(t=t||{})).noRefs||MA(e,t),t.replacer&&(e=t.replacer.call({"":e},"",e)),IA(t,0,e,!0,!0)?t.dump+`
|
||
`:""}function $A(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var BA,FA,zA,qA,UA,GA,jA,WA,YA,VA,HA,XA,KA,ZA,QA,JA,e9,t9,r9,i9,n9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,b9,x9,w9,T9,k9,C9,S9,E9,_9,A9,R9,L9,N9,D9,I9,M9,O9,P9,$9,B9,F9,z9=x(()=>{for(mt(I_,"isNothing"),mt(M_,"isObject"),mt(O_,"toArray"),mt(P_,"extend"),mt($_,"repeat"),mt(B_,"isNegativeZero"),BA={isNothing:I_,isObject:M_,toArray:O_,repeat:$_,isNegativeZero:B_,extend:P_},mt(F_,"formatError"),mt(z_,"YAMLException$1"),((z_.prototype=Object.create(Error.prototype)).constructor=z_).prototype.toString=mt(function(e){return this.name+": "+F_(this,e)},"toString"),FA=z_,mt(q_,"getLine"),mt(U_,"padStart"),mt(G_,"makeSnippet"),zA=G_,qA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],UA=["scalar","sequence","mapping"],mt(j_,"compileStyleAliases"),mt(W_,"Type$1"),GA=W_,mt(Y_,"compileList"),mt(V_,"compileMap"),mt(H_,"Schema$1"),H_.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof GA)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 FA("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 GA))throw new FA("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new FA("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 FA("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 GA))throw new FA("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(H_.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=Y_(e,"implicit"),e.compiledExplicit=Y_(e,"explicit"),e.compiledTypeMap=V_(e.compiledImplicit,e.compiledExplicit),e},"extend"),YA=H_,C9=new GA("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),XA=new GA("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),KA=new GA("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),YA=new YA({explicit:[C9,XA,KA]}),mt(X_,"resolveYamlNull"),mt(K_,"constructYamlNull"),mt(Z_,"isNull"),C9=new GA("tag:yaml.org,2002:null",{kind:"scalar",resolve:X_,construct:K_,predicate:Z_,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(Q_,"resolveYamlBoolean"),mt(J_,"constructYamlBoolean"),mt(e8,"isBoolean"),XA=new GA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Q_,construct:J_,predicate:e8,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(t8,"isHexCode"),mt(r8,"isOctCode"),mt(i8,"isDecCode"),mt(n8,"resolveYamlInteger"),mt(a8,"constructYamlInteger"),mt(s8,"isInteger"),KA=new GA("tag:yaml.org,2002:int",{kind:"scalar",resolve:n8,construct:a8,predicate:s8,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"]}}),jA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(o8,"resolveYamlFloat"),mt(l8,"constructYamlFloat"),WA=/^[-+]?[0-9]+e/,mt(c8,"representYamlFloat"),mt(h8,"isFloat"),QA=new GA("tag:yaml.org,2002:float",{kind:"scalar",resolve:o8,construct:l8,predicate:h8,represent:c8,defaultStyle:"lowercase"}),YA=YA.extend({implicit:[C9,XA,KA,QA]}),C9=YA,VA=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),HA=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(u8,"resolveYamlTimestamp"),mt(d8,"constructYamlTimestamp"),mt(p8,"representYamlTimestamp"),XA=new GA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:u8,construct:d8,instanceOf:Date,represent:p8}),mt(g8,"resolveYamlMerge"),KA=new GA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:g8}),ZA=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`,mt(f8,"resolveYamlBinary"),mt(m8,"constructYamlBinary"),mt(y8,"representYamlBinary"),mt(v8,"isBinary"),QA=new GA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:f8,construct:m8,predicate:v8,represent:y8}),JA=Object.prototype.hasOwnProperty,e9=Object.prototype.toString,mt(b8,"resolveYamlOmap"),mt(x8,"constructYamlOmap"),t9=new GA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:b8,construct:x8}),r9=Object.prototype.toString,mt(w8,"resolveYamlPairs"),mt(T8,"constructYamlPairs"),i9=new GA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:w8,construct:T8}),n9=Object.prototype.hasOwnProperty,mt(k8,"resolveYamlSet"),mt(C8,"constructYamlSet"),a9=new GA("tag:yaml.org,2002:set",{kind:"mapping",resolve:k8,construct:C8}),s9=C9.extend({implicit:[XA,KA],explicit:[QA,t9,i9,a9]}),o9=Object.prototype.hasOwnProperty,u9=4,d9=l9=1,p9=c9=2,g9=h9=3,f9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m9=/[\x85\u2028\u2029]/,y9=/[,\[\]\{\}]/,v9=/^(?:!|!!|![a-z\-]+!)$/i,b9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(S8,"_class"),mt(E8,"is_EOL"),mt(_8,"is_WHITE_SPACE"),mt(A8,"is_WS_OR_EOL"),mt(R8,"is_FLOW_INDICATOR"),mt(L8,"fromHexCode"),mt(N8,"escapedHexLen"),mt(D8,"fromDecimalCode"),mt(I8,"simpleEscapeSequence"),mt(M8,"charFromCodepoint"),x9=new Array(256),w9=new Array(256),T9=0;T9<256;T9++)x9[T9]=I8(T9)?1:0,w9[T9]=I8(T9);mt(O8,"State$1"),mt(P8,"generateError"),mt($8,"throwError"),mt(B8,"throwWarning"),k9={YAML:mt(function(e,t,r){var i,n;null!==e.version&&$8(e,"duplication of %YAML directive"),1!==r.length&&$8(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&$8(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&$8(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=n<2,1!==n&&2!==n&&B8(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var i;2!==r.length&&$8(e,"TAG directive accepts exactly two arguments"),i=r[1],v9.test(r=r[0])||$8(e,"ill-formed tag handle (first argument) of the TAG directive"),o9.call(e.tagMap,r)&&$8(e,'there is a previously declared suffix for "'+r+'" tag handle'),b9.test(i)||$8(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{$8(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i},"handleTagDirective")},mt(F8,"captureSegment"),mt(z8,"mergeMappings"),mt(q8,"storeMappingPair"),mt(U8,"readLineBreak"),mt(G8,"skipSeparationSpace"),mt(j8,"testDocumentSeparator"),mt(W8,"writeFoldedLines"),mt(Y8,"readPlainScalar"),mt(V8,"readSingleQuotedScalar"),mt(H8,"readDoubleQuotedScalar"),mt(X8,"readFlowCollection"),mt(K8,"readBlockScalar"),mt(Z8,"readBlockSequence"),mt(Q8,"readBlockMapping"),mt(J8,"readTagProperty"),mt(eA,"readAnchorProperty"),mt(tA,"readAlias"),mt(rA,"composeNode"),mt(iA,"readDocument"),mt(nA,"loadDocuments"),mt(aA,"loadAll$1"),mt(sA,"load$1"),C9={loadAll:aA,load:sA},S9=Object.prototype.toString,E9=Object.prototype.hasOwnProperty,_9=65279,A9=10,R9={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"},L9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(oA,"compileStyleMap"),mt(lA,"encodeHex"),D9=2,mt(cA,"State"),mt(hA,"indentString"),mt(uA,"generateNextLine"),mt(dA,"testImplicitResolving"),mt(pA,"isWhitespace"),mt(gA,"isPrintable"),mt(fA,"isNsCharOrWhitespace"),mt(mA,"isPlainSafe"),mt(yA,"isPlainSafeFirst"),mt(vA,"isPlainSafeLast"),mt(bA,"codePointAt"),mt(xA,"needIndentIndicator"),I9=1,M9=2,O9=3,P9=4,$9=5,mt(wA,"chooseScalarStyle"),mt(TA,"writeScalar"),mt(kA,"blockHeader"),mt(CA,"dropEndingNewline"),mt(SA,"foldString"),mt(EA,"foldLine"),mt(_A,"escapeString"),mt(AA,"writeFlowSequence"),mt(RA,"writeBlockSequence"),mt(LA,"writeFlowMapping"),mt(NA,"writeBlockMapping"),mt(DA,"detectType"),mt(IA,"writeNode"),mt(MA,"getDuplicateReferences"),mt(OA,"inspectNode"),mt(PA,"dump$1"),mt($A,"renamed"),B9=YA,F9=C9.load,$A("safeLoad","load"),$A("safeLoadAll","loadAll"),$A("safeDump","dump")});function q9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function U9(e){Q9=e}function G9(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(eR.caret,"$1"),i=i.replace(e,r),n},"replace"),getRegex:mt(()=>new RegExp(i,t),"getRegex")};return n}function j9(e,t){if(t){if(eR.escapeTest.test(e))return e.replace(eR.escapeReplace,SR)}else if(eR.escapeTestNoEncode.test(e))return e.replace(eR.escapeReplaceNoEncode,SR);return e}function W9(e){try{e=encodeURI(e).replace(eR.percentDecode,"%")}catch{return null}return e}function Y9(e,t){let r=e.replace(eR.findPipe,(e,t,r)=>{let i=!1,n=t;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(eR.splitPipe),n=0;if(i[0].trim()||i.shift(),0<i.length&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(eR.slashPipe,"|");return i}function V9(e,t,r){var i=e.length;if(0===i)return"";let n=0;for(;n<i;){var a=e.charAt(i-n-1);if((a!==t||r)&&(a===t||!r))break;n++}return e.slice(0,i-n)}function H9(t,r){if(-1===t.indexOf(r[1]))return-1;let i=0;for(let e=0;e<t.length;e++)if("\\"===t[e])e++;else if(t[e]===r[0])i++;else if(t[e]===r[1]&&--i<0)return e;return 0<i?-2:-1}function X9(e,t,r,i,n){var a=t.href,t=t.title||null,n=e[1].replace(n.other.outputLinkReplace,"$1"),e=(i.state.inLink=!0,{type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:a,title:t,text:n,tokens:i.inlineTokens(n)});return i.state.inLink=!1,e}function K9(e,t,r){if(null===(e=e.match(r.other.indentCodeCompensation)))return t;let i=e[1];return t.split(`
|
||
`).map(e=>{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=i.length)?e.slice(i.length):e}).join(`
|
||
`)}function Z9(e,t){return IR.parse(e,t)}var Q9,J9,eR,tR,rR,iR,nR,aR,sR,oR,lR,cR,hR,uR,dR,pR,gR,fR,mR,yR,vR,bR,xR,wR,TR,kR,CR,SR,ER,_R,AR,RR,LR,NR,DR,IR,MR=x(()=>{mt(q9,"L"),Q9=q9(),mt(U9,"G"),J9={exec:mt(()=>null,"exec")},mt(G9,"h"),eR={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:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,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")},sR=/^(?:[ \t]*(?:\n|$))+/,oR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,iR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,uR=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,aR=/(?:[*+-]|\d{1,9}[.)])/,xR=G9(fR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,aR).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(),fR=G9(fR).replace(/bull/g,aR).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(),vR=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dR=/^[^\n]+/,mR=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rR=G9(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",mR).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),aR=G9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,aR).getRegex(),bR="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",gR=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wR=G9("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",gR).replace("tag",bR).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pR=G9(vR).replace("hr",uR).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bR).getRegex(),tR={blockquote:G9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pR).getRegex(),code:oR,def:rR,fences:iR,heading:nR,hr:uR,html:wR,lheading:xR,list:aR,newline:sR,paragraph:pR,table:J9,text:dR},oR=G9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",uR).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bR).getRegex(),rR={...tR,lheading:fR,table:oR,paragraph:G9(vR).replace("hr",uR).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oR).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bR).getRegex()},iR={...tR,html:G9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gR).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:J9,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:G9(vR).replace("hr",uR).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",xR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nR=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aR=/^( {2,}|\\)\n(?!\s*$)/,sR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pR=/[\p{P}\p{S}]/u,dR=/[\s\p{P}\p{S}]/u,fR=/[^\s\p{P}\p{S}]/u,oR=G9(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dR).getRegex(),bR=/(?!~)[\p{P}\p{S}]/u,vR=/(?!~)[\s\p{P}\p{S}]/u,uR=/(?:[^\s\p{P}\p{S}]|~)/u,xR=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,DR=G9(lR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,pR).getRegex(),lR=G9(lR,"u").replace(/punct/g,bR).getRegex(),cR=G9(hR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,fR).replace(/punctSpace/g,dR).replace(/punct/g,pR).getRegex(),hR=G9(hR,"gu").replace(/notPunctSpace/g,uR).replace(/punctSpace/g,vR).replace(/punct/g,bR).getRegex(),uR=G9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fR).replace(/punctSpace/g,dR).replace(/punct/g,pR).getRegex(),vR=G9(/\\(punct)/,"gu").replace(/punct/g,pR).getRegex(),bR=G9(/^<(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(),fR=G9(gR).replace("(?:--\x3e|$)","--\x3e").getRegex(),dR=G9("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pR=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,gR=G9(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",pR).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fR=G9(/^!?\[(label)\]\[(ref)\]/).replace("label",pR).replace("ref",mR).getRegex(),mR=G9(/^!?\[(ref)\](?:\[\])?/).replace("ref",mR).getRegex(),yR=G9("reflink|nolink(?!\\()","g").replace("reflink",fR).replace("nolink",mR).getRegex(),bR={...vR={_backpedal:J9,anyPunctuation:vR,autolink:bR,blockSkip:xR,br:aR,code:wR,del:J9,emStrongLDelim:DR,emStrongRDelimAst:cR,emStrongRDelimUnd:uR,escape:nR,link:gR,nolink:mR,punctuation:oR,reflink:fR,reflinkSearch:yR,tag:dR,text:sR,url:J9},link:G9(/^!?\[(label)\]\((.*?)\)/).replace("label",pR).getRegex(),reflink:G9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pR).getRegex()},xR={...vR,emStrongRDelimAst:hR,emStrongLDelim:lR,url:G9(/^((?: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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},wR={...xR,br:G9(aR).replace("{2,}","*").getRegex(),text:G9(xR.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},TR={normal:tR,gfm:rR,pedantic:iR},kR={normal:vR,gfm:xR,breaks:wR,pedantic:bR},CR={"&":"&","<":"<",">":">",'"':""","'":"'"},SR=mt(e=>CR[e],"ke"),mt(j9,"w"),mt(W9,"J"),mt(Y9,"V"),mt(V9,"z"),mt(H9,"ge"),mt(X9,"fe"),mt(K9,"Je"),ER=class{static{mt(this,"y")}options;rules;lexer;constructor(e){this.options=e||Q9}space(e){if((e=this.rules.block.newline.exec(e))&&0<e[0].length)return{type:"space",raw:e[0]}}code(e){var t;if(e=this.rules.block.code.exec(e))return t=e[0].replace(this.rules.other.codeRemoveIndent,""),{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:V9(t,`
|
||
`)}}fences(e){var t,r;if(e=this.rules.block.fences.exec(e))return r=K9(t=e[0],e[3]||"",this.rules),{type:"code",raw:t,lang:e[2]&&e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(t){var r;if(t=this.rules.block.heading.exec(t)){let e=t[2].trim();return this.rules.other.endingHash.test(e)&&(r=V9(e,"#"),!this.options.pedantic&&r&&!this.rules.other.endingSpaceChar.test(r)||(e=r.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){if(e=this.rules.block.hr.exec(e))return{type:"hr",raw:V9(e[0],`
|
||
`)}}blockquote(e){if(e=this.rules.block.blockquote.exec(e)){let i=V9(e[0],`
|
||
`).split(`
|
||
`),n="",a="",s=[];for(;0<i.length;){let e=!1,t=[],r;for(r=0;r<i.length;r++)if(this.rules.other.blockquoteStart.test(i[r]))t.push(i[r]),e=!0;else{if(e)break;t.push(i[r])}i=i.slice(r);var o,l=(c=t.join(`
|
||
`)).replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,""),c=(n=n?n+`
|
||
`+c:c,a=a?a+`
|
||
`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===i.length)break;if("code"===(l=s.at(-1))?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+`
|
||
`+i.join(`
|
||
`),h=this.blockquote(h);s[s.length-1]=h,n=n.substring(0,n.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+`
|
||
`+i.join(`
|
||
`),o=this.list(h),s[s.length-1]=o,n=n.substring(0,n.length-l.raw.length)+o.raw,a=a.substring(0,a.length-c.raw.length)+o.raw,i=h.substring(s.at(-1).raw.length).split(`
|
||
`))}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let e=p[1].trim(),t=1<e.length,c={type:"list",raw:"",ordered:t,start:t?+e.slice(0,-1):"",loose:!1,items:[]},h=(e=t?"\\d{1,9}\\"+e.slice(-1):"\\"+e,this.options.pedantic&&(e=t?e:"[*+-]"),this.rules.other.listItemRegex(e)),u=!1;for(;d;){let e=!1,t="",r="";if(!(p=h.exec(d))||this.rules.block.hr.test(d))break;t=p[0],d=d.substring(t.length);let i=p[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".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<c.items.length;e++)this.lexer.state.top=!1,c.items[e].tokens=this.lexer.blockTokens(c.items[e].text,[]),c.loose||(r=0<(r=c.items[e].tokens.filter(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<c.items.length;e++)c.items[e].loose=!0;return c}}}html(e){if(e=this.rules.block.html.exec(e))return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(e){var t,r,i;if(e=this.rules.block.def.exec(e))return t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:t,raw:e[0],href:r,title:i}}table(n){if((n=this.rules.block.table.exec(n))&&this.rules.other.tableDelimiter.test(n[2])){let t=Y9(n[1]),e=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],i={type:"table",raw:n[0],header:[],align:[],rows:[]};if(t.length===e.length){for(var a of e)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let e=0;e<t.length;e++)i.header.push({text:t[e],tokens:this.lexer.inline(t[e]),header:!0,align:i.align[e]});for(var s of r)i.rows.push(Y9(s,i.header.length).map((e,t)=>({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=V9(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else{if(-2===(a=H9(r[2],"()")))return;-1<a&&(i=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,i).trim(),r[3]="")}let e=r[2],t="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(e))&&(e=a[1],t=a[3]):t=r[3]?r[3].slice(1,-1):"",e=e.trim(),X9(r,{href:(e=this.rules.other.startAngleBracket.test(e)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,t){var r;if(r=(r=this.rules.inline.reflink.exec(e))||this.rules.inline.nolink.exec(e))return(e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?X9(r,e,r[0],this.lexer,this.rules):{type:"text",raw:t=r[0].charAt(0),text:t}}emStrong(s,o,e=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!e||this.rules.inline.punctuation.exec(e))){let e=[...l[0]].length-1,t,r,i=e,n=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+e);null!=(l=a.exec(o));){var c,h;if(t=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...t].length,l[3]||l[4])i+=r;else if((l[5]||l[6])&&e%3&&!((e+r)%3))n+=r;else if(!(0<(i-=r)))return r=Math.min(r,r+i+n),c=[...l[0]][0].length,c=s.slice(0,e+l.index+c+r),Math.min(e,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(i){if(i=this.rules.inline.code.exec(i)){let e=i[2].replace(this.rules.other.newLineCharGlobal," "),t=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return t&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:i[0],text:e}}}br(e){if(e=this.rules.inline.br.exec(e))return{type:"br",raw:e[0]}}del(e){if(e=this.rules.inline.del.exec(e))return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let e,t;return t="@"===r[2]?"mailto:"+(e=r[1]):e=r[1],{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var r,i;if(r=this.rules.inline.url.exec(e)){let e,t;if("@"===r[2])e=r[0],t="mailto:"+e;else{for(;i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",i!==r[0];);e=r[0],t="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){var t;if(e=this.rules.inline.text.exec(e))return t=this.lexer.state.inRawBlock,{type:"text",raw:e[0],text:e[0],escaped:t}}},_R=class r{static{mt(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Q9,this.options.tokenizer=this.options.tokenizer||new ER,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},e={other:eR,block:TR.normal,inline:kR.normal},this.options.pedantic?(e.block=TR.pedantic,e.inline=kR.pedantic):this.options.gfm&&(e.block=TR.gfm,this.options.breaks?e.inline=kR.breaks:e.inline=kR.gfm),this.tokenizer.rules=e}static get rules(){return{block:TR,inline:kR}}static lex(e,t){return new r(t).lex(e)}static lexInline(e,t){return new r(t).inlineTokens(e)}lex(e){e=e.replace(eR.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){var t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,r=[],i=!1){for(this.options.pedantic&&(n=n.replace(eR.tabCharGlobal," ").replace(eR.spaceLine,""));n;){let t;if(!this.options.extensions?.block?.some(e=>!!(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<i.length)for(;null!=(t=this.tokenizer.rules.inline.reflinkSearch.exec(e));)i.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(e=e.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(t=this.tokenizer.rules.inline.anyPunctuation.exec(e));)e=e.slice(0,t.index)+"++"+e.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(t=this.tokenizer.rules.inline.blockSkip.exec(e));)e=e.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);e=this.options.hooks?.emStrongMask?.call({lexer:this},e)??e;let a=!1,s="";for(;n;){a||(s=""),a=!1;let t;if(!this.options.extensions?.inline?.some(e=>!!(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}},AR=class{static{mt(this,"P")}options;parser;constructor(e){this.options=e||Q9}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(eR.notSpaceStart)?.[0],e=e.replace(eR.endingNewline,"")+`
|
||
`,t?'<pre><code class="language-'+j9(t)+'">'+(r?e:j9(e,!0))+`</code></pre>
|
||
`:"<pre><code>"+(r?e:j9(e,!0))+`</code></pre>
|
||
`}blockquote({tokens:e}){return`<blockquote>
|
||
${this.parser.parse(e)}</blockquote>
|
||
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
||
`}hr(e){return`<hr>
|
||
`}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){var n=t.items[e];i+=this.listitem(n)}var a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+`>
|
||
`+i+"</"+a+`>
|
||
`}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<e.tokens[0].tokens.length&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+j9(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "),`<li>${t+=this.parser.parse(e.tokens,!!e.loose)}</li>
|
||
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
||
`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){var n=t.rows[e];r="";for(let e=0;e<n.length;e++)r+=this.tablecell(n[e]);i+=this.tablerow({text:r})}return`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+(i=i&&`<tbody>${i}</tbody>`)+`</table>
|
||
`}tablerow({text:e}){return`<tr>
|
||
${e}</tr>
|
||
`}tablecell(e){var t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${j9(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){var r=this.parser.parseInline(r),i=W9(e);if(null===i)return r;let n='<a href="'+(e=i)+'"';return t&&(n+=' title="'+j9(t)+'"'),n+=">"+r+"</a>"}image({href:e,title:t,text:r,tokens:i}){if(i&&(r=this.parser.parseInline(i,this.parser.textRenderer)),null===(i=W9(e)))return j9(r);let n=`<img src="${e=i}" alt="${r}"`;return t&&(n+=` title="${j9(t)}"`),n+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:j9(e.text)}},RR=class{static{mt(this,"$")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},LR=class i{static{mt(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||Q9,this.options.renderer=this.options.renderer||new AR,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new RR}static parse(e,t){return new i(t).parse(e)}static parseInline(e,t){return new i(t).parseInline(e)}parse(i,n=!0){let a="";for(let r=0;r<i.length;r++){var e=i[r];if(this.options.extensions?.renderers?.[e.type]){var t=e,s=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){a+=s||"";continue}}var o=e;switch(o.type){case"space":a+=this.renderer.space(o);continue;case"hr":a+=this.renderer.hr(o);continue;case"heading":a+=this.renderer.heading(o);continue;case"code":a+=this.renderer.code(o);continue;case"table":a+=this.renderer.table(o);continue;case"blockquote":a+=this.renderer.blockquote(o);continue;case"list":a+=this.renderer.list(o);continue;case"html":a+=this.renderer.html(o);continue;case"def":a+=this.renderer.def(o);continue;case"paragraph":a+=this.renderer.paragraph(o);continue;case"text":{let e=o,t=this.renderer.text(e);for(;r+1<i.length&&"text"===i[r+1].type;)e=i[++r],t+=`
|
||
`+this.renderer.text(e);a+=n?this.renderer.paragraph({type:"paragraph",raw:t,text:t,tokens:[{type:"text",raw:t,text:t,escaped:!0}]}):t;continue}default:var l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return a}parseInline(t,r=this.renderer){let i="";for(let e=0;e<t.length;e++){var n=t[e];if(this.options.extensions?.renderers?.[n.type]){var a=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=a||"";continue}}var s=n;switch(s.type){case"escape":i+=r.text(s);break;case"html":i+=r.html(s);break;case"link":i+=r.link(s);break;case"image":i+=r.image(s);break;case"strong":i+=r.strong(s);break;case"em":i+=r.em(s);break;case"codespan":i+=r.codespan(s);break;case"br":i+=r.br(s);break;case"del":i+=r.del(s);break;case"text":i+=r.text(s);break;default:var o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}return i}},NR=class{static{mt(this,"S")}options;block;constructor(e){this.options=e||Q9}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?_R.lex:_R.lexInline}provideParser(){return this.block?LR.parse:LR.parseInline}},DR=class{static{mt(this,"B")}defaults=q9();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=LR;Renderer=AR;TextRenderer=RR;Lexer=_R;Tokenizer=ER;Hooks=NR;constructor(...e){this.use(...e)}walkTokens(e,r){let i=[];for(var n of e)switch(i=i.concat(r.call(this,n)),n.type){case"table":var t,a,s=n;for(t of s.header)i=i.concat(this.walkTokens(t.tokens,r));for(a of s.rows)for(var o of a)i=i.concat(this.walkTokens(o.tokens,r));break;case"list":s=n,i=i.concat(this.walkTokens(s.items,r));break;default:{let t=n;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(e=>{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 AR(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 ER(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 NR;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];NR.passThroughHooks.has(t)?n[e]=e=>this.defaults.async&&NR.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 _R.lex(e,t??this.defaults)}parser(e,t){return LR.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"<typeof r||null===r)return n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&((i.hooks.options=i).hooks.block=o);let a=i.hooks?i.hooks.provideLexer():o?_R.lex:_R.lexInline,s=i.hooks?i.hooks.provideParser():o?LR.parse:LR.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(e=>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="<p>An error occurred:</p><pre>"+j9(e.message+"",!0)+"</pre>",i?Promise.resolve(t):t;if(i)return Promise.reject(e);throw e}}},IR=new DR,mt(Z9,"d"),Z9.options=Z9.setOptions=function(e){return IR.setOptions(e),U9(Z9.defaults=IR.defaults),Z9},Z9.getDefaults=q9,Z9.defaults=Q9,Z9.use=function(...e){return IR.use(...e),U9(Z9.defaults=IR.defaults),Z9},Z9.walkTokens=function(e,t){return IR.walkTokens(e,t)},Z9.parseInline=IR.parseInline,Z9.Parser=LR,Z9.parser=LR.parse,Z9.Renderer=AR,Z9.TextRenderer=RR,Z9.Lexer=_R,Z9.lexer=_R.lex,Z9.Tokenizer=ER,Z9.Hooks=NR,Z9.parse=Z9,_R.lex});function OR(e,{markdownAutoWrap:t}){return e=Bc(e.replace(/<br\/>/g,`
|
||
`).replace(/\n{2,}/g,`
|
||
`)),!1===t?e.replace(/ /g," "):e}function PR(e,t={}){let r=OR(e,t),i=Z9.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 $R(e,{markdownAutoWrap:t}={}){function r(e){return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g," "):e.text.replace(/\n */g,"<br/>"):"strong"===e.type?`<strong>${e.tokens?.map(r).join("")}</strong>`:"em"===e.type?`<em>${e.tokens?.map(r).join("")}</em>`:"paragraph"===e.type?`<p>${e.tokens?.map(r).join("")}</p>`:"space"===e.type?"":"html"===e.type?""+e.text:"escape"===e.type?e.text:(M.warn("Unsupported markdown: "+e.type),e.raw)}return e=Z9.lexer(e),mt(r,"output"),e.map(r).join("")}var BR=x(()=>{MR(),nh(),e(),mt(OR,"preprocessMarkdown"),mt(PR,"markdownToLines"),mt($R,"markdownToHTML")});function FR(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function zR(e,t){return qR(e,[],FR(t.content),t.type)}function qR(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}])?qR(e,s,a,i):(0===t.length&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}]))}function UR(e,t){if(e.some(({content:e})=>e.includes(`
|
||
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return GR(e,t)}function GR(e,t,r=[],i=[]){if(0===e.length)return 0<i.length&&r.push(i),0<r.length?r:[];let n="";" "===e[0].content&&(n=" ",e.shift());var a=e.shift()??{content:" ",type:"normal"},s=[...i];return""!==n&&s.push({content:n,type:"normal"}),s.push(a),t(s)?GR(e,t,r,s):(0<i.length?(r.push(i),e.unshift(a)):a.content&&([s,i]=zR(t,a),r.push([s]),i.content)&&e.unshift(i),GR(e,t,r))}var jR=x(()=>{mt(FR,"splitTextToChars"),mt(zR,"splitWordToFitWidth"),mt(qR,"splitWordToFitWidthRecursion"),mt(UR,"splitLineToFitWidth"),mt(GR,"splitLineToFitWidthRecursion")});function WR(e,t){t&&e.attr("style",t)}async function YR(e,t,r,i,n=!1,a=sr()){(e=e.append("foreignObject")).attr("width",10*r+"px"),e.attr("height",10*r+"px");var s=e.append("xhtml:div"),a=Sc(t.label)?await Ac(t.label.replace(L.lineBreakRegex,`
|
||
`),a):cc(t.label,a),o=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),WR(l,t.labelStyle),l.attr("class",o+" "+i),WR(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),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 VR(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function HR(e,t,r){return ZR(t=VR(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function XR(e,t,r){return ZR(t=VR(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function KR(t,e,r,i=!1){let n=e.append("g"),a=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=mt(e=>HR(n,1.1,e)<=t,"checkWidth");for(c of h(l)?[l]:UR(l,h))ZR(VR(s,o,1.1),c),o++}return(i?(e=s.node().getBBox(),a.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),n):s).node()}function ZR(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 QR(e,n={}){let a=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,i)=>(a.push((async()=>{var e=r+":"+i;return await Mc(e)?await Oc(e,void 0,{class:"label-icon"}):`<i class='${cc(t,n).replace(":"," ")}'></i>`})()),t)),await Promise.all(a));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var JR,eL=x(()=>{aT(),Pc(),e(),BR(),a_(),$c(),jR(),ii(),mt(WR,"applyStyle"),mt(YR,"addHtmlSpan"),mt(VR,"createTspan"),mt(HR,"computeWidthOfText"),mt(XR,"computeDimensionOfText"),mt(KR,"createFormattedText"),mt(ZR,"updateTextContentAndStyles"),mt(QR,"replaceIconSubstring"),JR=mt(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a?(i=$R(t,c),a=await QR(i_(i),c),i=t.replace(/\\\\/g,"\\"),YR(e,{isNode:s,label:Sc(t)?i:a,labelStyle:r.replace("fill:","color:")},o,n,l,c)):(i=KR(o,e,PR(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!t&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),V(i).attr("style",a)):(n=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),V(i).select("rect").attr("style",n.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),V(i).select("text").attr("style",o)),i)),"createText")});function tL(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function rL(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 iL(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<n;e++){var c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}var nL,aL,sL,oL,n=x(()=>{eL(),Cu(),aT(),ti(),Pc(),a_(),nL=mt(async(e,t,r)=>{let i,n=t.useHtmlLabels||mc(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",AE(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],await JR(s,cc(i_(o),O()),{useHtmlLabels:n,width:t.width||O().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img})),c=l.getBBox(),h=(t?.padding??0)/2;if(n){var r=l.children[0],e=V(l),u=r.getElementsByTagName("img");if(u){let i=""===o.replace(/<img[^>]*>/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=(O().fontSize?O():window.getComputedStyle(document.body)).fontSize,[e=Yt.fontSize]=e_(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)})))}c=r.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),aL=mt(async(e,t,r)=>{let i=r.useHtmlLabels||mc(O()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await JR(n,cc(i_(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 mc(O()?.flowchart?.htmlLabels)&&(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"),sL=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),oL=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(tL,"createPathFromPoints"),mt(rL,"generateFullSineWavePoints"),mt(iL,"generateCirclePoints")});function lL(e,t){return e.intersect(t)}var cL,hL=x(()=>{mt(lL,"intersectNode"),cL=lL});function uL(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<n&&(a=-a),Math.abs(t*r*s/o));return{x:n+a,y:e+(t=i.y<e?-t:t)}}var dL,pL=x(()=>{mt(uL,"intersectEllipse"),dL=uL});function gL(e,t,r){return dL(e,t,t,r)}var fL,mL=x(()=>{pL(),mt(gL,"intersectCircle"),fL=gL});function yL(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<o*l||(i=(o=i.y-r.y)*e.x+(l=r.x-i.x)*e.y+(r=i.x*r.y-r.x*i.y),e=o*t.x+l*t.y+r,Math.abs(i)<1e-6&&Math.abs(e)<1e-6&&0<i*e)||0==(t=n*l-o*a)))return i=Math.abs(t/2),{x:(e=a*r-l*s)<0?(e-i)/t:(e+i)/t,y:(e=o*s-n*r)<0?(e-i)/t:(e+i)/t}}function vL(e,t){return 0<e*t}var bL,xL=x(()=>{mt(yL,"intersectLine"),mt(vL,"sameSign"),bL=yL});function wL(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<r.length;e++){var h=r[e],u=r[e<r.length-1?e+1:0];(h=bL(t,i,{x:l+h.x,y:c+h.y},{x:l+u.x,y:c+u.y}))&&a.push(h)}return a.length?(1<a.length&&a.sort(function(e,t){var r=e.x-i.x,e=e.y-i.y,r=Math.sqrt(r*r+e*e),e=t.x-i.x,t=t.y-i.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):t}var TL,kL,CL,H,SL,EL,_L,AL,Q,RL,LL,NL=x(()=>{xL(),mt(wL,"intersectPolygon"),TL=wL}),DL=x(()=>{kL=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"),CL=kL}),IL=x(()=>{hL(),mL(),pL(),NL(),DL(),H={node:cL,circle:fL,ellipse:dL,polygon:TL,rect:CL}}),ML=x(()=>{Cu(),SL=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:O().handDrawnSeed}),"solidStateFill"),EL=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"),AL=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=EL(e).stylesArray,r=[],i=[],n=[],a=[];return t.forEach(e=>{var t=e[0];AL(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"),RL=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:i}=O(),{nodeBorder:r,mainBkg:n}=r,e=EL(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:LL(e.get("stroke-dasharray"))},t)},"userNodeOverrides"),LL=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 OL(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 PL(e,t){return e[0]===t[0]&&e[1]===t[1]}function $L(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)OL(s,a,n);if(r=((t,n)=>{var e,r=[];for(e of p){var i=[...e];PL(i[0],i[i.length-1])||i.push([i[0][0],i[0][1]]),2<i.length&&r.push(i)}var a,s=[],o=(t=Math.max(t,.1),[]);for(a of r)for(let e=0;e<a.length-1;e++){var l,c=a[e],h=a[e+1];c[1]!==h[1]&&(l=Math.min(c[1],h[1]),o.push({ymin:l,ymax:Math.max(c[1],h[1]),x:(l===c[1]?c:h)[0],islope:(h[0]-c[0])/(h[1]-c[1])}))}if(o.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.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;e<o.length&&!(o[e].ymin>i);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)for(let e=0;e<r.length&&!((d=e+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)OL(o,a,-n);{e=a,i=-n;let t=[];r.forEach(e=>t.push(...e)),OL(t,e,i)}}return r}function BL(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),$L(e,n,i,a||1)}function FL(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 zL(e,t){return e.type===t}function qL(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:LN,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:NN,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:DN,text:""},t})(e),a="BOD",s=0,o=n[s];for(;!zL(o,DN);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return qL("M0,0"+e);s++,t=IN[o.text],a=o.text}else zL(o,NN)?t=IN[a]:(s++,t=IN[o.text],a=o.text);if(!(s+t<n.length))throw new Error("Path data ended short");for(let e=s;e<s+t;e++){var l=n[e];if(!zL(l,NN))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof IN[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};i.push(c),s+=t,o=n[s],"m"===(a="M"===a?"L":a)&&(a="l")}return i}function UL(e){let r=0,i=0,t=0,n=0,a=[];for(var{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[r,i]=o,[t,n]=o;break;case"m":r+=o[0],i+=o[1],a.push({key:"M",data:[r,i]}),t=r,n=i;break;case"L":a.push({key:"L",data:[...o]}),[r,i]=o;break;case"l":r+=o[0],i+=o[1],a.push({key:"L",data:[r,i]});break;case"C":a.push({key:"C",data:[...o]}),r=o[4],i=o[5];break;case"c":var l=o.map((e,t)=>t%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 GL(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],w=h[6];0===f||0===m?(n.push({key:"C",data:[s,o,x,w,x,w]}),s=x,o=w):s===x&&o===w||(WL(s,o,x,w,f,m,y,v,b).forEach(function(e){n.push({key:"C",data:e})}),s=x,o=w);break;case"Z":n.push({key:"Z",data:[]}),s=t,o=r}a=i}return n}function jL(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function WL(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]=jL(e,t,-h),[r,i]=jL(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))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(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=WL(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;e<u.length;e+=3){var w=jL(u[e][0],u[e][1],h),T=jL(u[e+1][0],u[e+1][1],h),k=jL(u[e+2][0],u[e+2][1],h);x.push([w[0],w[1],T[0],T[1],k[0],k[1]])}return x}function YL(e,t,r,i,n){return{type:"path",ops:sN(e,t,r,i,n)}}function VL(t,e,r){var i=(t||[]).length;if(2<i){var n=[];for(let e=0;e<i-1;e++)n.push(...sN(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&n.push(...sN(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return 2===i?YL(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function HL(e,t,r,i,n){return VL([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],!0,n)}function XL(e,t){if(e.length){var r="number"==typeof e[0][0]?[e]:e,i=lN(r[0],1+.2*t.roughness,t),n=t.disableMultiStroke?[]:lN(r[0],1.5*(1+.22*t.roughness),rN(t));for(let e=1;e<r.length;e++)if((l=r[e]).length){var a,s,o=lN(l,1+.2*t.roughness,t),l=t.disableMultiStroke?[]:lN(l,1.5*(1+.22*t.roughness),rN(t));for(a of o)"move"!==a.op&&i.push(a);for(s of l)"move"!==s.op&&n.push(s)}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function KL(e,t,r){var i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),i=2*Math.PI/i,e=Math.abs(e/2),t=Math.abs(t/2),n=1-r.curveFitting;return{increment:i,rx:e+=aN(e*n,r),ry:t+=aN(t*n,r)}}function ZL(e,t,r,i){let[n,a]=hN(i.increment,e,t,i.rx,i.ry,1,i.increment*nN(.1,nN(.4,1,r),r),r),s=cN(n,null,r);return r.disableMultiStroke||0===r.roughness||([e]=hN(i.increment,e,t,i.rx,i.ry,1.5,0,r),t=cN(e,null,r),s=s.concat(t)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function QL(e,t,r,i,n,a,s,o,l){r=Math.abs(r/2),i=Math.abs(i/2),r+=aN(.01*r,l),i+=aN(.01*i,l);let c=n,h=a;for(;c<0;)c+=2*Math.PI,h+=2*Math.PI;return h-c>2*Math.PI&&(c=0,h=2*Math.PI),n=2*Math.PI/l.curveStepCount,n=uN(a=Math.min(n/2,(h-c)/2),e,t,r,i,c,h,1,l),l.disableMultiStroke||(a=uN(a,e,t,r,i,c,h,1.5,l),n.push(...a)),s&&(o?n.push(...sN(e,t,e+r*Math.cos(c),t+i*Math.sin(c),l),...sN(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 JL(e,t){let r=GL(UL(qL(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(...sN(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(...dN(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":i.push(...sN(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function eN(e,t){var r,i=[];for(r of e)if(r.length){var n=t.maxRandomnessOffset||0,a=r.length;if(2<a){i.push({op:"move",data:[r[0][0]+aN(n,t),r[0][1]+aN(n,t)]});for(let e=1;e<a;e++)i.push({op:"lineTo",data:[r[e][0]+aN(n,t),r[e][1]+aN(n,t)]})}}return{type:"fillPath",ops:i}}function tN(e,r){return(e=>{let t=r.fillStyle||"hachure";if(!AN[t])switch(t){case"zigzag":AN[t]||(AN[t]=new kN(e));break;case"cross-hatch":AN[t]||(AN[t]=new CN(e));break;case"dots":AN[t]||(AN[t]=new SN(e));break;case"dashed":AN[t]||(AN[t]=new EN(e));break;case"zigzag-line":AN[t]||(AN[t]=new _N(e));break;default:t="hachure",AN[t]||(AN[t]=new TN(e))}return AN[t]})(MN).fillPolygons(e,r)}function rN(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function iN(e){return e.randomizer||(e.randomizer=new RN(e.seed||0)),e.randomizer.next()}function nN(e,t,r,i=1){return r.roughness*i*(iN(r)*(t-e)+e)}function aN(e,t,r=1){return nN(-e,e,t,r)}function sN(e,t,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=oN(e,t,r,i,n,!0,!1);return a?s:(a=oN(e,t,r,i,n,!0,!0),s.concat(a))}function oN(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:500<l?.4:-.0016668*l+1.233334,n.maxRandomnessOffset||0),u=(h=h*h*100>o?l/10:h)/2,d=.2+.2*iN(n),p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=aN(p,n,c),g=aN(g,n,c);var f=[],m=mt(()=>aN(u,n,c),"M"),y=mt(()=>aN(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:aN(h,n,c)),t+(v?0:aN(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 lN(t,r,i){if(!t.length)return[];var n=[];n.push([t[0][0]+aN(r,i),t[0][1]+aN(r,i)]),n.push([t[0][0]+aN(r,i),t[0][1]+aN(r,i)]);for(let e=1;e<t.length;e++)n.push([t[e][0]+aN(r,i),t[e][1]+aN(r,i)]),e===t.length-1&&n.push([t[e][0]+aN(r,i),t[e][1]+aN(r,i)]);return cN(n,null,i)}function cN(t,e,r){var i=t.length,n=[];if(3<i){var a,s=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){var l=t[e];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*t[e+1][0]-o*t[e-1][0])/6,l[1]+(o*t[e+1][1]-o*t[e-1][1])/6],s[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],s[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}e&&2===e.length&&(a=r.maxRandomnessOffset,n.push({op:"lineTo",data:[e[0]+aN(a,r),e[1]+aN(a,r)]}))}else 3===i?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&n.push(...oN(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function hN(t,r,i,n,a,s,e,o){var l=[],c=[];if(0===o.roughness){t/=4,c.push([r+n*Math.cos(-t),i+a*Math.sin(-t)]);for(let e=0;e<=2*Math.PI;e+=t){var h=[r+n*Math.cos(e),i+a*Math.sin(e)];l.push(h),c.push(h)}c.push([r+n*Math.cos(0),i+a*Math.sin(0)]),c.push([r+n*Math.cos(t),i+a*Math.sin(t)])}else{var u=aN(.5,o)-Math.PI/2,d=(c.push([aN(s,o)+r+.9*n*Math.cos(u-t),aN(s,o)+i+.9*a*Math.sin(u-t)]),2*Math.PI+u-.01);for(let e=u;e<d;e+=t){var p=[aN(s,o)+r+n*Math.cos(e),aN(s,o)+i+a*Math.sin(e)];l.push(p),c.push(p)}c.push([aN(s,o)+r+n*Math.cos(u+2*Math.PI+.5*e),aN(s,o)+i+a*Math.sin(u+2*Math.PI+.5*e)]),c.push([aN(s,o)+r+.98*n*Math.cos(u+e),aN(s,o)+i+.98*a*Math.sin(u+e)]),c.push([aN(s,o)+r+.9*n*Math.cos(u+.5*e),aN(s,o)+i+.9*a*Math.sin(u+.5*e)])}return[c,l]}function uN(t,r,i,n,a,s,o,l,c){var s=s+aN(.1,c),h=[];h.push([aN(l,c)+r+.9*n*Math.cos(s-t),aN(l,c)+i+.9*a*Math.sin(s-t)]);for(let e=s;e<=o;e+=t)h.push([aN(l,c)+r+n*Math.cos(e),aN(l,c)+i+a*Math.sin(e)]);return h.push([r+n*Math.cos(o),i+a*Math.sin(o)]),h.push([r+n*Math.cos(o),i+a*Math.sin(o)]),cN(h,null,c)}function dN(t,r,i,n,a,s,o,l){var c,h=[],u=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let e=0;e<d;e++)0===e?h.push({op:"move",data:[o[0],o[1]]}):h.push({op:"move",data:[o[0]+(p?0:aN(u[0],l)),o[1]+(p?0:aN(u[0],l))]}),c=p?[a,s]:[a+aN(u[e],l),s+aN(u[e],l)],h.push({op:"bcurveTo",data:[t+aN(u[e],l),r+aN(u[e],l),i+aN(u[e],l),n+aN(u[e],l),c[0],c[1]]});return h}function pN(e){return[...e]}function gN(t,e=0){var r=t.length;if(r<3)throw new Error("A curve must have at least three points.");var i=[];if(3===r)i.push(pN(t[0]),pN(t[1]),pN(t[2]),pN(t[2]));else{var n=[];n.push(t[0],t[0]);for(let e=1;e<t.length;e++)n.push(t[e]),e===t.length-1&&n.push(t[e]);var a=[],s=1-e;i.push(pN(n[0]));for(let e=1;e+2<n.length;e++){var o=n[e];a[0]=[o[0],o[1]],a[1]=[o[0]+(s*n[e+1][0]-s*n[e-1][0])/6,o[1]+(s*n[e+1][1]-s*n[e-1][1])/6],a[2]=[n[e+1][0]+(s*n[e][0]-s*n[e+2][0])/6,n[e+1][1]+(s*n[e][1]-s*n[e+2][1])/6],a[3]=[n[e+1][0],n[e+1][1]],i.push(a[1],a[2],a[3])}}return i}function fN(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function mN(e,t,r){var i=fN(t,r);return 0===i?fN(e,t):(i=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i,fN(e,yN(t,r,Math.max(0,Math.min(1,i)))))}function yN(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function vN(l,c,e,t){var r,i,n,a,s,o,t=t||[];return(()=>{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,n<s&&(n=s),a<o&&(a=o),n+a})()<e?(r=l[c+0],(!t.length||(o=t[t.length-1],1<Math.sqrt(fN(o,r))))&&t.push(r),t.push(l[c+3])):(i=yN(o=l[c+0],r=l[c+1],.5),s=yN(r,r=l[c+2],.5),n=yN(r,r=l[c+3],.5),a=yN(i,s,.5),s=yN(s,n,.5),vN([o,i,a,o=yN(a,s,.5)],0,e,t),vN([o,s,n,r],0,e,t)),t}function bN(e,t){return xN(e,0,e.length,t)}function xN(t,r,i,e,n){let a=n||[],s=t[r],o=t[i-1],l=0,c=1;for(let e=r+1;e<i-1;++e){var h=mN(t[e],s,o);h>l&&(l=h,c=e)}return Math.sqrt(l)>e?(xN(t,r,c+1,e,a),xN(t,c,i,e,a)):(a.length||a.push(s),a.push(o)),a}function wN(t,r=.15,e){var i=[],n=(t.length-1)/3;for(let e=0;e<n;e++)vN(t,3*e,r,i);return e&&0<e?xN(i,0,i.length,e):i}var TN,kN,CN,SN,EN,_N,AN,RN,LN,NN,DN,IN,MN,ON,PN,$N,BN,FN,zN,qN=x(()=>{mt(OL,"t"),mt(PL,"e"),mt($L,"s"),mt(BL,"n"),TN=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=BL(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(FL,"a"),kN=class extends TN{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=BL(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)FL([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)}}},CN=class extends TN{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}},SN=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=BL(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=FL(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<c;e++){var p=d+h+e*i,g=u-s+2*Math.random()*s,p=p-s+2*Math.random()*s,g=this.helper.ellipse(g,p,n,n,t);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},EN=class{static{mt(this,"c")}constructor(e){this.helper=e}fillPolygons(e,t){return e=BL(e,t),{type:"fillSketch",ops:this.dashedLine(e,t)}}dashedLine(e,c){let h=c.dashOffset<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashOffset,u=c.dashGap<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashGap,d=[];return e.forEach(e=>{let t=FL(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<r;e++){var o=(l=e*(h+u))+h,l=[n[0]+l*Math.cos(s)+i*Math.cos(s),n[1]+l*Math.sin(s)+i*Math.sin(s)],o=[n[0]+o*Math.cos(s)+i*Math.cos(s),n[1]+o*Math.sin(s)+i*Math.sin(s)];d.push(...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],c))}}),d}},_N=class{static{mt(this,"l")}constructor(e){this.helper=e}fillPolygons(e,t){var r=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,i=t.zigzagOffset<0?r:t.zigzagOffset,e=BL(e,t=Object.assign({},t,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(e,i,t)}}zigzagLines(e,c,h){let u=[];return e.forEach(e=>{let t=FL(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<r;e++){var s=2*e*c,o=2*(e+1)*c,l=Math.sqrt(2*Math.pow(c,2)),s=[i[0]+s*Math.cos(a),i[1]+s*Math.sin(a)],o=[i[0]+o*Math.cos(a),i[1]+o*Math.sin(a)],l=[s[0]+l*Math.cos(a+Math.PI/4),s[1]+l*Math.sin(a+Math.PI/4)];u.push(...this.helper.doubleLineOps(s[0],s[1],l[0],l[1],h),...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],h))}}),u}},AN={},RN=class{static{mt(this,"p")}constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},IN={A:7,a:7,C:6,c:6,H:NN=1,h:1,L:DN=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:LN=0,z:0},mt(zL,"k"),mt(qL,"b"),mt(UL,"y"),mt(GL,"m"),mt(jL,"w"),mt(WL,"x"),MN={randOffset:mt(function(e,t){return aN(e,t)},"randOffset"),randOffsetWithRange:mt(function(e,t,r){return nN(e,t,r)},"randOffsetWithRange"),ellipse:mt(function(e,t,r,i,n){return ZL(e,t,n,KL(r,i,n)).opset},"ellipse"),doubleLineOps:mt(function(e,t,r,i,n){return sN(e,t,r,i,n,!0)},"doubleLineOps")},mt(YL,"v"),mt(VL,"S"),mt(HL,"O"),mt(XL,"L"),mt(KL,"T"),mt(ZL,"D"),mt(QL,"A"),mt(JL,"_"),mt(eN,"I"),mt(tN,"C"),mt(rN,"z"),mt(iN,"W"),mt(nN,"E"),mt(aN,"G"),mt(sN,"$"),mt(oN,"R"),mt(lN,"j"),mt(cN,"q"),mt(hN,"F"),mt(uN,"V"),mt(dN,"Z"),mt(pN,"Q"),mt(gN,"H"),mt(fN,"N"),mt(mN,"B"),mt(yN,"J"),mt(vN,"K"),mt(bN,"U"),mt(xN,"X"),mt(wN,"Y"),ON="none",PN=class{static{mt(this,"et")}constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,r){return{shape:e,sets:t||[],options:r||this.defaultOptions}}line(e,t,r,i,n){return n=this._o(n),this._d("line",[YL(e,t,r,i,n)],n)}rectangle(e,t,r,i,n){var a=[],s=HL(e,t,r,i,n=this._o(n));return n.fill&&(r=[[e,t],[e+r,t],[e+r,t+i],[e,t+i]],"solid"===n.fillStyle?a.push(eN([r],n)):a.push(tN([r],n))),n.stroke!==ON&&a.push(s),this._d("rectangle",a,n)}ellipse(e,t,r,i,n){var a=[],i=ZL(e,t,n=this._o(n),r=KL(r,i,n));return n.fill&&("solid"===n.fillStyle?((e=ZL(e,t,n,r).opset).type="fillPath",a.push(e)):a.push(tN([i.estimatedPoints],n))),n.stroke!==ON&&a.push(i.opset),this._d("ellipse",a,n)}circle(e,t,r,i){return(e=this.ellipse(e,t,r,r,i)).shape="circle",e}linearPath(e,t){return t=this._o(t),this._d("linearPath",[VL(e,!1,t)],t)}arc(d,p,g,e,t,r,i=!1,n){var n=this._o(n),a=[],s=QL(d,p,g,e,t,r,i,!0,n);return i&&n.fill&&("solid"===n.fillStyle?(i=Object.assign({},n),(i=QL(d,p,g,e,t,r,i.disableMultiStroke=!0,!1,i)).type="fillPath",a.push(i)):a.push(((e,t,r,i)=>{var n=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=aN(.01*s,i),o+=aN(.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]),tN([u],i)})(e,t,r,n))),n.stroke!==ON&&a.push(s),this._d("arc",a,n)}curve(e,t){var r=this._o(t),t=[],i=XL(e,r);if(r.fill&&r.fill!==ON)if("solid"===r.fillStyle){var n=XL(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(...wN(gN([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...wN(gN(a),10,(1+r.roughness)/2));s.length&&t.push(tN([s],r))}return r.stroke!==ON&&t.push(i),this._d("curve",t,r)}polygon(e,t){var r=[],i=VL(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(eN([e],t)):r.push(tN([e],t))),t.stroke!==ON&&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!==ON,n=r.stroke!==ON,s=((e,t)=>{let r=GL(UL(qL(e))),i=[],n=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&n.push(...wN(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=bN(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=JL(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=JL(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(eN(s,r)):i.push(tN(s,r))),n)&&(a?s.forEach(e=>{i.push(VL(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:ON};break;case"fillPath":e={d:this.opsToPath(t),stroke:ON,strokeWidth:0,fill:i.fill||ON};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||ON,strokeWidth:r,fill:ON}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},$N=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new PN(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}},BN="http://www.w3.org/2000/svg",FN=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new PN(t)}draw(t){var r,e=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(BN,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=n.createElementNS(BN,"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(BN,"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(BN,"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)}},zN={canvas:mt((e,t)=>new $N(e,t),"canvas"),svg:mt((e,t)=>new FN(e,t),"svg"),generator:mt(e=>new PN(e),"generator"),newSeed:mt(()=>PN.newSeed(),"newSeed")}});function UN(e,t){var r=Q(t).labelStyles;t.labelStyle=r;let i=oL(t),n=i,a=(i||(n="anchor"),e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=t.cssStyles,o=zN.svg(a),l=RL(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",AE(s)),sL(t,h),t.intersect=function(e){return M.info("Circle intersect",t,1,e),H.circle(t,1,e)},a}var GN=x(()=>{e(),n(),IL(),ML(),qN(),a_(),mt(UN,"anchor")});function jN(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(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*n*Math.cos(c)*(s?-1:1),g=Math.atan2((t-p)/a,(e-d)/n),f=Math.atan2((i-p)/a,(r-d)/n)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let e=0;e<20;e++){var y=g+e/19*f,v=d+n*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function WN(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await nL(e,t,oL(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),h=t.cssStyles,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...jN(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...jN(s/2,o/2,s/2,-o/2,c,l,!0)],d=zN.svg(n),p=RL(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),tL(u)),f=d.path(g,p),m=n.insert(()=>f,":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)`),sL(t,m),t.intersect=function(e){return H.polygon(t,u,e)},n}var YN=x(()=>{n(),IL(),ML(),qN(),mt(jN,"generateArcPoints"),mt(WN,"bowTieRect")});function VN(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 HN=x(()=>{mt(VN,"insertPolygonShape")});async function XN(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await nL(e,n,oL(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=zN.svg(a),t=RL(n,{}),r=tL(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=VN(a,o,s,h);return r&&u.attr("style",r),sL(n,u),n.intersect=function(e){return H.polygon(n,h,e)},a}var KN=x(()=>{n(),IL(),ML(),qN(),HN(),n(),mt(XN,"card")});function ZN(e,t){var r=Q(t).nodeStyles;t.label="";let i=e.insert("g").attr("class",oL(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=zN.svg(i),l=RL(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),tL(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 QN=x(()=>{IL(),qN(),ML(),n(),mt(ZN,"choice")});async function JN(e,i,t){var{labelStyles:r,nodeStyles:n}=Q(i);i.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await nL(e,i,oL(i)),l=t?.padding??o,c=s.width/2+l,h,u=i.cssStyles;if("handDrawn"===i.look){let e=zN.svg(a),t=RL(i,{}),r=e.circle(0,0,2*c,t);(h=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",AE(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 sL(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 eD=x(()=>{qN(),e(),a_(),IL(),ML(),n(),mt(JN,"circle")});function tD(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 rD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",oL(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=zN.svg(n),l=RL(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=tD(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),sL(t,d),t.intersect=function(e){return M.info("crossedCircle intersect",t,{radius:a,point:e}),H.circle(t,a,e)},n}var iD=x(()=>{e(),n(),ML(),qN(),IL(),mt(tD,"createLine"),mt(rD,"crossedCircle")});function nD(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;e<n;e++){var c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}async function aD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...nD(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...nD(o/2+2*c,-c,c,20,-180,-270),...nD(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...nD(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...nD(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...nD(o/2+.1*o,-c,c,20,-180,-270),...nD(o/2+.1*o,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...nD(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],p=zN.svg(n),g=RL(t,{fill:"none"}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),tL(u).replace("Z","")),m=p.path(f,g),y=tL(d),v=p.path(y,{...g}),b=n.insert("g",":first-child");return b.insert(()=>v,":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))})`),sL(t,b),t.intersect=function(e){return H.polygon(t,d,e)},n}var sD=x(()=>{n(),IL(),ML(),qN(),mt(nD,"generateCirclePoints"),mt(aD,"curlyBraceLeft")});function oD(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;e<n;e++){var c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:h,y:c})}return s}async function lD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...oD(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...oD(o/2+2*c,-c,c,20,-180,-270),...oD(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...oD(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...oD(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...oD(o/2+2*c,-c,c,20,-180,-270),...oD(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...oD(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],p=zN.svg(n),g=RL(t,{fill:"none"}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),tL(u).replace("Z","")),m=p.path(f,g),y=tL(d),v=p.path(y,{...g}),b=n.insert("g",":first-child");return b.insert(()=>v,":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))})`),sL(t,b),t.intersect=function(e){return H.polygon(t,d,e)},n}var cD=x(()=>{n(),IL(),ML(),qN(),mt(oD,"generateCirclePoints"),mt(lD,"curlyBraceRight")});function hD(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;e<n;e++){var c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}async function uD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...hD(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...hD(o/2+2*c,-c,c,20,-180,-270),...hD(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...hD(o/2,l/2,c,20,0,90)],d=[...hD(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...hD(-o/2-c/2,-c,c,20,0,90),...hD(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...hD(-o/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...hD(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...hD(o/2+2*c,-c,c,20,-180,-270),...hD(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...hD(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...hD(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...hD(-o/2-c/2,-c,c,20,0,90),...hD(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...hD(-o/2+c+c/2,l/2,c,30,-180,-270)],g=zN.svg(n),f=RL(t,{fill:"none"}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),tL(u).replace("Z","")),y=g.path(m,f),v=tL(d).replace("Z",""),b=g.path(v,f),x=tL(p),w=g.path(x,{...f}),T=n.insert("g",":first-child");return T.insert(()=>w,":first-child").attr("stroke-opacity",0),T.insert(()=>y,":first-child"),T.insert(()=>b,":first-child"),T.attr("class","text"),h&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.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))})`),sL(t,T),t.intersect=function(e){return H.polygon(t,p,e)},n}var dD=x(()=>{n(),IL(),ML(),qN(),mt(hD,"generateCirclePoints"),mt(uD,"curlyBraces")});async function pD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),l=RL(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},...iL(-u,-h/2,a,50,270,90)],g=tL(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})`),sL(t,m),t.intersect=function(e){return H.polygon(t,p,e)},r}var gD=x(()=>{n(),IL(),ML(),qN(),mt(pD,"curvedTrapezoid")});async function fD(e,a){var{labelStyles:t,nodeStyles:r}=Q(a);a.labelStyle=t;let{shapeSvg:s,bbox:i,label:n}=await nL(e,a,oL(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=zN.svg(s),t=yD(0,0,o,h,l,c),r=vD(0,c,o,h,l,c),i=e.path(t,RL(a,{})),n=e.path(r,RL(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=mD(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",AE(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),sL(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<e&&(e=Math.sqrt(e)),e=c-e,0<t.y-(a.y??0)&&(e=-e),r.y+=e}return r},s}var mD,yD,vD,bD=x(()=>{n(),IL(),ML(),qN(),a_(),mD=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"),yD=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"),vD=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(fD,"cylinder")});async function xD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),h=RL(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))})`),sL(t,p),t.intersect=function(e){return H.rect(t,e)},r}var wD=x(()=>{n(),IL(),ML(),qN(),mt(xD,"dividedRectangle")});async function TD(e,t){var r,{labelStyles:i,nodeStyles:n}=Q(t);t.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:o}=await nL(e,t,oL(t)),l=s.width/2+o+5,c=s.width/2+o,h,u=t.cssStyles;return"handDrawn"===t.look?(i=zN.svg(a),e=RL(t,{roughness:.2,strokeWidth:2.5}),r=RL(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",AE(t.cssClasses)).attr("style",AE(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)),sL(t,h),t.intersect=function(e){return M.info("DoubleCircle intersect",t,l,e),H.circle(t,l,e)},a}var kD=x(()=>{e(),n(),IL(),ML(),qN(),a_(),mt(TD,"doublecircle")});function CD(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=Q(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",oL(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=zN.svg(a),l=r.nodeBorder,c=RL(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<s.length&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",s),n&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",n),sL(t,u),t.intersect=function(e){return M.info("filledCircle intersect",t,{radius:7,point:e}),H.circle(t,7,e)},a}var SD=x(()=>{qN(),e(),IL(),ML(),n(),mt(CD,"filledCircle")});async function ED(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(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=zN.svg(n),p=RL(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),tL(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,sL(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 _D=x(()=>{e(),n(),IL(),ML(),qN(),n(),mt(ED,"flippedTriangle")});function AD(e,t,{dir:r,config:{state:i,themeVariables:n}}){var a=Q(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",oL(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=zN.svg(s),n=RL(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),sL(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 RD=x(()=>{qN(),IL(),ML(),n(),mt(AD,"forkJoin")});async function LD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await nL(e,t,oL(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=zN.svg(n),u=RL(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...iL(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=tL(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),sL(t,f),t.intersect=function(e){return M.info("Pill intersect",t,{radius:l,point:e}),H.polygon(t,d,e)},n}var ND=x(()=>{e(),n(),IL(),ML(),qN(),mt(LD,"halfRoundedRectangle")});async function DD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nL(e,t,oL(t))),n=e.height+(t.padding??0),e=e.width+2.5*(t.padding??0),a=t.cssStyles,s=zN.svg(r),o=RL(t,{}),l=("handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid"),e/2);let c=n/2,h=c/2,u=(l+=l/6)-h,d=[{x:-u,y:-c},{x:0,y:-c},{x:u,y:-c},{x:l,y:0},{x:u,y:c},{x:0,y:c},{x:-u,y:c},{x:-l,y:0}],p=tL(d),g=s.path(p,o),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",a),i&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",i),t.width=e,t.height=n,sL(t,f),t.intersect=function(e){return H.polygon(t,d,e)},r}var ID=x(()=>{n(),IL(),ML(),qN(),mt(DD,"hexagon")});async function MD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),r=(t.label="",t.labelStyle=r,(await nL(e,t,oL(t))).shapeSvg),e=Math.max(30,t?.width??0),n=Math.max(30,t?.height??0),a=t.cssStyles,s=zN.svg(r),o=RL(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=tL(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})`),sL(t,u),t.intersect=function(e){return M.info("Pill intersect",t,{points:l}),H.polygon(t,l,e)},r}var OD=x(()=>{e(),n(),IL(),ML(),qN(),mt(MD,"hourglass")});async function PD(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 nL(e,n,"icon-shape default"),c="t"===n.pos,h=a,u=a,d=t.nodeBorder,p=EL(n).stylesMap,g=-u/2,f=-h/2,m=n.label?8:0,y=zN.svg(s),v=RL(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),w=h+o.height+m,T=y.rectangle(-x/2,-w/2,x,w,{...v,fill:"transparent",stroke:"none"}),k=s.insert(()=>b,":first-child"),C=s.insert(()=>T);return n.icon&&((r=s.append("g")).html(`<g>${await Oc(n.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),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?-w/2:w/2-o.height})`),k.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),sL(n,C),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 $D=x(()=>{qN(),e(),$c(),IL(),ML(),n(),mt(PD,"icon")});async function BD(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 nL(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=EL(t).stylesMap,h=zN.svg(i),u=RL(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(`<g>${await Oc(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);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),w=v+e.height+s,T=h.rectangle(-x/2,-w/2,x,w,{...u,fill:"transparent",stroke:"none"}),k=i.insert(()=>b,":first-child"),C=i.insert(()=>T);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?-w/2:w/2-e.height})`),k.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),sL(t,C),t.intersect=function(e){return M.info("iconSquare intersect",t,e),H.rect(t,e)},i}var FD,zD=x(()=>{qN(),e(),$c(),IL(),ML(),n(),mt(BD,"iconCircle")}),qD=x(()=>{FD=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 UD(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 nL(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=EL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=zN.svg(a),b=RL(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let w=v.path(FD(f,m,u,h,5),b),T=Math.max(u,s.width),k=h+s.height+y,C=v.rectangle(-T/2,-k/2,T,k,{...b,fill:"transparent",stroke:"none"}),S=a.insert(()=>w,":first-child").attr("class","icon-shape2"),E=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`<g>${await Oc(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),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})`),S.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),sL(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-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 GD=x(()=>{qN(),e(),$c(),IL(),ML(),qD(),n(),mt(UD,"iconRounded")});async function jD(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 nL(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=EL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=zN.svg(a),b=RL(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let w=v.path(FD(f,m,u,h,.1),b),T=Math.max(u,s.width),k=h+s.height+y,C=v.rectangle(-T/2,-k/2,T,k,{...b,fill:"transparent",stroke:"none"}),S=a.insert(()=>w,":first-child"),E=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`<g>${await Oc(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),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})`),S.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),sL(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-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 WD=x(()=>{qN(),e(),$c(),IL(),qD(),ML(),n(),mt(jD,"iconSquare")});async function YD(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 nL(e,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=zN.svg(c),y=RL(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,w=m.rectangle(-b/2,-x/2,b,x,{...y,fill:"none",stroke:"none"}),T=c.insert(()=>v,":first-child"),k=c.insert(()=>w);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})`),T.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),sL(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 VD=x(()=>{qN(),e(),IL(),ML(),n(),mt(YD,"imageSquare")});async function HD(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await nL(e,n,oL(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=zN.svg(a),t=RL(n,{}),r=tL(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=VN(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,sL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var XD=x(()=>{n(),IL(),ML(),qN(),HN(),mt(HD,"inv_trapezoid")});async function KD(e,i,t){var{labelStyles:r,nodeStyles:n}=Q(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await nL(e,i,oL(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=zN.svg(a),t=RL(i,{}),r=d||p?e.path(FD(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",AE(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",AE(d)).attr("ry",AE(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return sL(i,u),i.calcIntersect=function(e,t){return H.rect(e,t)},i.intersect=function(e){return H.rect(i,e)},a}var ZD=x(()=>{n(),IL(),qD(),ML(),qN(),a_(),mt(KD,"drawRect")});async function QD(e,t){var{shapeSvg:e,bbox:r,label:i}=await nL(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))})`),sL(t,n),t.intersect=function(e){return H.rect(t,e)},e}var JD=x(()=>{ZD(),n(),IL(),mt(QD,"labelRect")});async function eI(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await nL(e,n,oL(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=zN.svg(a),t=RL(n,{}),r=tL(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=VN(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,sL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var tI=x(()=>{n(),IL(),ML(),qN(),HN(),mt(eI,"lean_left")});async function rI(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await nL(e,n,oL(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=zN.svg(a),t=RL(n,{}),r=tL(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=VN(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,sL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var iI=x(()=>{n(),IL(),ML(),qN(),HN(),mt(rI,"lean_right")});function nI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",oL(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=zN.svg(n),h=RL(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),tL(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})`),sL(t,p),t.intersect=function(e){return M.info("lightningBolt intersect",t,e),H.polygon(t,l,e)},n}var aI=x(()=>{e(),n(),ML(),qN(),IL(),n(),mt(nI,"lightningBolt")});async function sI(e,s){var{labelStyles:t,nodeStyles:r}=Q(s);s.labelStyle=t;let{shapeSvg:o,bbox:i,label:n}=await nL(e,s,oL(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=zN.svg(o),t=lI(0,0,l,u,c,h,d),r=cI(0,h,l,u,c,h),i=RL(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=oI(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",AE(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),sL(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<e&&(e=Math.sqrt(e)),e=h-e,0<t.y-(s.y??0)&&(e=-e),r.y+=e}return r},o}var oI,lI,cI,hI=x(()=>{n(),IL(),ML(),qN(),a_(),oI=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"),lI=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"),cI=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(sI,"linedCylinder")});async function uI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),u=RL(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},...rL(-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))})`),sL(t,g),t.intersect=function(e){return H.polygon(t,d,e)},r}var dI=x(()=>{n(),IL(),qN(),ML(),mt(uI,"linedWaveEdgedRect")});async function pI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(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=zN.svg(n),p=RL(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"),tL(g)),y=d.path(m,p),v=tL(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))})`),sL(t,x),t.intersect=function(e){return H.polygon(t,g,e)},n}var gI=x(()=>{n(),ML(),qN(),IL(),mt(pI,"multiRect")});async function fI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(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=rL(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=zN.svg(n),b=RL(t,{}),x=("handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid"),tL(m)),w=v.path(x,b),T=tL(y),k=v.path(T,b),C=n.insert(()=>w,":first-child");return C.insert(()=>k),C.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",p),i&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",i),C.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))})`),sL(t,C),t.intersect=function(e){return H.polygon(t,m,e)},n}var mI=x(()=>{n(),IL(),qN(),ML(),mt(fI,"multiWaveEdgedRectangle")});async function yI(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=Q(t),{shapeSvg:i,bbox:e,label:a}=(t.labelStyle=i,t.useHtmlLabels||!1!==sr().flowchart?.htmlLabels||(t.centerLabel=!0),await nL(e,t,oL(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=zN.svg(i),r=RL(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))})`),sL(t,p),t.intersect=function(e){return H.rect(t,e)},i}var vI=x(()=>{qN(),IL(),ML(),n(),ii(),mt(yI,"note")});async function bI(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await nL(e,n,oL(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=zN.svg(a),t=RL(n,{}),r=xI(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=VN(a,l,l,c)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&h.attr("style",r),sL(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 xI,wI=x(()=>{n(),IL(),ML(),qN(),HN(),xI=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(bI,"question")});async function TI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(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=zN.svg(n),f=RL(t,{}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),tL(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))})`),sL(t,v),t.intersect=function(e){return H.polygon(t,d,e)},n}var kI=x(()=>{n(),IL(),ML(),qN(),mt(TI,"rect_left_inv_arrow")});function CI(e,t){t&&e.attr("style",t)}async function SI(e){let t=V(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=O(),n=e.label;e.label&&Sc(e.label)&&(n=await Ac(e.label.replace(L.lineBreakRegex,`
|
||
`),i));var a='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(cc(a,i)),CI(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var EI,_I,AI=x(()=>{aT(),Cu(),Pc(),e(),a_(),mt(CI,"applyStyle"),mt(SI,"addHtmlLabel"),EI=mt(async(e,t,r,i)=>{let n=e||"";if("object"==typeof n&&(n=n[0]),mc(O().flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"<br />"),M.info("vertexText"+n),SI({isNode:i,label:i_(n).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),_I=EI});async function RI(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=o.node().appendChild(await _I(c,a.labelStyle,!0,!0)),u={width:0,height:0};mc(O()?.flowchart?.htmlLabels)&&(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=o.node().appendChild(await _I(e.join?e.join("<br/>"):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<n.width?0:-(n.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-d+3)+")");let g=u.width+(a.padding||0),f=u.height+(a.padding||0),m=-u.width/2-d,y=-u.height/2-d,v,b;if("handDrawn"===a.look){let e=zN.svg(s),t=RL(a,{}),r=e.path(FD(m,y,g,f,a.rx||0),t),i=e.line(-u.width/2-d,-u.height/2-d+n.height+d,u.width/2+d,-u.height/2-d+n.height+d,t);b=s.insert(()=>(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 sL(a,v),a.intersect=function(e){return H.rect(a,e)},s}var LI=x(()=>{aT(),Pc(),n(),AI(),IL(),ML(),qN(),Cu(),qD(),e(),mt(RI,"rectWithTitle")});function NI(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(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*n*Math.cos(c)*(s?-1:1),g=Math.atan2((t-p)/a,(e-d)/n),f=Math.atan2((i-p)/a,(r-d)/n)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let e=0;e<20;e++){var y=g+e/19*f,v=d+n*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function DI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nL(e,t,oL(t))),n=t?.padding??0,a=t?.padding??0,n=(t?.width||e.width)+2*n,e=(t?.height||e.height)+2*a,a=t.radius||5,s=t.taper||5,o=t.cssStyles,l=zN.svg(r),c=RL(t,{});t.stroke&&(c.stroke=t.stroke),"handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid");let h=[{x:-n/2+s,y:-e/2},{x:n/2-s,y:-e/2},...NI(n/2-s,-e/2,n/2,-e/2+s,a,a,!0),{x:n/2,y:-e/2+s},{x:n/2,y:e/2-s},...NI(n/2,e/2-s,n/2-s,e/2,a,a,!0),{x:n/2-s,y:e/2},{x:-n/2+s,y:e/2},...NI(-n/2+s,e/2,-n/2,e/2-s,a,a,!0),{x:-n/2,y:e/2-s},{x:-n/2,y:-e/2+s},...NI(-n/2,-e/2+s,-n/2+s,-e/2,a,a,!0)],u=tL(h),d=l.path(u,c),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),o&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",o),i&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",i),sL(t,p),t.intersect=function(e){return H.polygon(t,h,e)},r}var II=x(()=>{n(),IL(),ML(),qN(),mt(NI,"generateArcPoints"),mt(DI,"roundedRect")});async function MI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),u=RL(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",AE(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))})`),sL(t,g),t.intersect=function(e){return H.rect(t,e)},r}var OI=x(()=>{n(),IL(),ML(),qN(),a_(),mt(MI,"shadedProcess")});async function PI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),u=RL(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=tL(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))})`),sL(t,f),t.intersect=function(e){return H.polygon(t,d,e)},r}var $I=x(()=>{n(),IL(),ML(),qN(),mt(PI,"slopedRect")});async function BI(e,t){return KD(e,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??2*(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var FI=x(()=>{ZD(),mt(BI,"squareRect")});async function zI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nL(e,t,oL(t))),n=e.height+t.padding,e=e.width+n/4+t.padding,a=n/2,s=t.cssStyles,o=zN.svg(r),l=RL(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},...iL(-e/2+a,0,a,50,90,270),{x:e/2-a,y:n/2},...iL(e/2-a,0,a,50,270,450)],h=tL(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),sL(t,d),t.intersect=function(e){return H.polygon(t,c,e)},r}var qI=x(()=>{n(),IL(),ML(),qN(),mt(zI,"stadium")});async function UI(e,t){return KD(e,t,{rx:5,ry:5,classes:"flowchart-node"})}var GI=x(()=>{ZD(),mt(UI,"state")});function jI(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=zN.svg(e),l=RL(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),sL(t,d),t.intersect=function(e){return H.circle(t,7,e)},e}var WI=x(()=>{qN(),IL(),ML(),n(),mt(jI,"stateEnd")});function YI(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=zN.svg(n).circle(0,0,14,SL(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 sL(t,a),t.intersect=function(e){return H.circle(t,7,e)},n}var VI=x(()=>{qN(),IL(),ML(),n(),mt(YI,"stateStart")});async function HI(a,s){var{labelStyles:o,nodeStyles:e}=Q(s);s.labelStyle=o;let{shapeSvg:l,bbox:t}=await nL(a,s,oL(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=zN.svg(l),t=RL(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",AE(a)),sL(s,o)}else a=VN(l,c,h,i),e&&a.attr("style",e),sL(s,a);return s.intersect=function(e){return H.polygon(s,i,e)},l}var XI=x(()=>{n(),IL(),ML(),qN(),HN(),a_(),mt(HI,"subroutine")});async function KI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await nL(e,t,oL(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=zN.svg(n),g=RL(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"),tL(f)),v=p.path(y,g),b=tL(m),x=p.path(b,{...g,fillStyle:"solid"}),w=n.insert(()=>x,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),sL(t,w),t.intersect=function(e){return H.polygon(t,f,e)},n}var ZI=x(()=>{n(),ML(),qN(),IL(),mt(KI,"taggedRect")});async function QI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),p=RL(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...rL(-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)},...rL(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=tL(g),b=d.path(v,p),x=tL(y),w=d.path(x,{...p,fillStyle:"solid"}),T=r.insert(()=>w,":first-child");return T.insert(()=>b,":first-child"),T.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.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))})`),sL(t,T),t.intersect=function(e){return H.polygon(t,g,e)},r}var JI=x(()=>{n(),IL(),qN(),ML(),mt(QI,"taggedWaveEdgedRectangle")});async function eM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nL(e,t,oL(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),sL(t,o),t.intersect=function(e){return H.rect(t,e)},r}var tM=x(()=>{n(),IL(),ML(),mt(eM,"text")});async function rM(e,a){var{labelStyles:t,nodeStyles:r}=Q(a);a.labelStyle=t;let{shapeSvg:s,bbox:i,label:n,halfPadding:o}=await nL(e,a,oL(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=zN.svg(s),t=nM(0,0,d,c,u,h),r=aM(0,0,d,c,u,h),i=e.path(t,RL(a,{})),n=e.path(r,RL(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=iM(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",AE(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))})`),sL(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<t.x-(a.x??0)&&(e=-e),r.x+=e}return r},s}var iM,nM,aM,sM=x(()=>{n(),ML(),qN(),IL(),a_(),iM=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"),nM=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"),aM=mt((e,t,r,i,n,a)=>[`M${e+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),mt(rM,"tiltedCylinder")});async function oM(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await nL(e,n,oL(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=zN.svg(a),t=RL(n,{}),r=tL(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=VN(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,sL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var lM=x(()=>{n(),IL(),ML(),qN(),HN(),mt(oM,"trapezoid")});async function cM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),o=RL(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=tL(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),sL(t,u),t.intersect=function(e){return H.polygon(t,l,e)},r}var hM=x(()=>{n(),IL(),ML(),qN(),mt(cM,"trapezoidalPentagon")});async function uM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(t)),o=mc(O().flowchart?.htmlLabels),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=zN.svg(n),g=RL(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),tL(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,sL(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 dM=x(()=>{e(),n(),IL(),ML(),qN(),n(),Pc(),Cu(),mt(uM,"triangle")});async function pM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await nL(e,t,oL(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=zN.svg(r),d=RL(t,{});"handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...rL(-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=tL(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))})`),sL(t,m),t.intersect=function(e){return H.polygon(t,p,e)},r}var gM=x(()=>{n(),IL(),qN(),ML(),mt(pM,"waveEdgedRectangle")});async function fM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await nL(e,t,oL(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=zN.svg(n),p=RL(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:e/2},...rL(-c/2,e/2,c/2,e/2,r,1),{x:c/2,y:-e/2},...rL(c/2,-e/2,-c/2,-e/2,r,-1)],f=tL(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),sL(t,y),t.intersect=function(e){return H.polygon(t,g,e)},n}var mM=x(()=>{n(),IL(),ML(),qN(),mt(fM,"waveRectangle")});async function yM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await nL(e,t,oL(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=zN.svg(n),p=RL(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))})`),sL(t,y),t.intersect=function(e){return H.polygon(t,g,e)},n}var vM=x(()=>{n(),ML(),qN(),IL(),mt(yM,"windowPane")});async function bM(e,t){var r,i=t,n=(i.alias&&(t.label=i.alias),"handDrawn"===t.look&&(A=(A=sr().themeVariables).background,await bM(e,{...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),sr());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:""},SE(t.label,n)+2*A.labelPaddingX<n.er.minEntityWidth&&(t.width=n.er.minEntityWidth),A=await KD(e,t,A),mc(n.htmlLabels)||(C=(_=A.select("text")).node()?.getBBox(),_.attr("transform",`translate(${-C.width/2}, 0)`)),A;n.htmlLabels||(o*=1.25,l*=1.25);let h=oL(t),u=(h=h||"node default",e.insert("g").attr("class",h).attr("id",t.domId||t.id)),d=await xM(u,t.label??"",n,0,0,["name"],s),p=(d.height+=l,0),g=[],f=[],m=0,y=0,v=0,b=0,x=!0,w=!0;for(r of i.attributes){var T=await xM(u,r.type,n,0,p,["attribute-type"],s),P=(m=Math.max(m,T.width+o),await xM(u,r.name,n,0,p,["attribute-name"],s)),$=(y=Math.max(y,P.width+o),await xM(u,r.keys.join(),n,0,p,["attribute-keys"],s)),B=(v=Math.max(v,$.width+o),await xM(u,r.comment,n,0,p,["attribute-comment"],s)),T=(b=Math.max(b,B.width+o),Math.max(T.height,P.height,$.height,B.height)+l);f.push({yOffset:p,rowHeight:T}),p+=T}let k=4;v<=o&&(x=!1,v=0,k--),b<=o&&(w=!1,b=0,k--);var C,F,S,E,_=u.node().getBBox(),A=(0<d.width+2*o-(m+y+v+b)&&(C=d.width+2*o-(m+y+v+b),m+=C/k,y+=C/k,0<v&&(v+=C/k),0<b)&&(b+=C/k),m+y+v+b),R=zN.svg(u),L=RL(t,{});"handDrawn"!==t.look&&(L.roughness=0,L.fillStyle="solid");let z=0,N=(0<f.length&&(z=f.reduce((e,t)=>e+(t?.rowHeight??0),0)),Math.max(_.width+2*o,t?.width||0,A)),D=Math.max((z??0)+d.height,t?.height||0),I=-N/2,M=-D/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(${I+o/2+a}, ${s+M+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(M+l/2)+")"),R.rectangle(I,M,N,D,L)),U=u.insert(()=>q,":first-child").attr("style",a.join("")),G=sr().themeVariables,{rowEven:j,rowOdd:W,nodeBorder:Y}=G;g.push(0);for([F,S]of f.entries()){let e=(F+1)%2==0&&0!==S.yOffset,t=R.rectangle(I,d.height+M+S?.yOffset,N,S?.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(I,d.height+M,N+I,d.height+M,L);u.insert(()=>O).attr("class","divider"),O=R.line(m+I,d.height+M,m+I,D+M,L),u.insert(()=>O).attr("class","divider"),x&&(O=R.line(m+y+I,d.height+M,m+y+I,D+M,L),u.insert(()=>O).attr("class","divider")),w&&(O=R.line(m+y+v+I,d.height+M,m+y+v+I,D+M,L),u.insert(()=>O).attr("class","divider"));for(E of g)O=R.line(I,d.height+M+E,N+I,d.height+M+E,L),u.insert(()=>O).attr("class","divider");return sL(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 xM(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!==bc(t)&&(t=(t=bc(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await JR(e,t,{width:SE(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 mc(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 wM=x(()=>{n(),IL(),ML(),qN(),ZD(),ii(),eL(),Pc(),aT(),a_(),mt(bM,"erBox"),mt(xM,"addText")});async function TM(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",oL(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<t.annotations.length&&(i=t.annotations[0],await kM(o,{text:`«${i}»`},0),u=o.node().getBBox().height),await kM(l=s.insert("g").attr("class","label-group text"),t,0,["font-weight: bolder"]),d=(e=l.node().getBBox()).height,c=s.insert("g").attr("class","members-group text");let m=0;for(g of t.members){var y=await kM(c,g,m,[g.parseClassifier()]);m+=y+a}(p=c.node().getBBox().height)<=0&&(p=n/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(f of t.methods){var b=await kM(h,f,v,[f.parseClassifier()]);v+=b+a}return s.node().getBBox(),null!==o&&(i=o.node().getBBox(),o.attr("transform",`translate(${-i.width/2})`)),l.attr("transform",`translate(${-e.width/2}, ${u})`),s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*n})`),s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*n:2*n)})`),t=s.node().getBBox(),{shapeSvg:s,bbox:t}}async function kM(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=sr(),s="useHtmlLabels"in t?t.useHtmlLabels:mc(a.htmlLabels)??!0,o="",l=(o="text"in t?t.text:t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Sc(o)&&(s=!0),await JR(n,_h(i_(o)),{width:SE(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),c,h=1;if(s){var e=l.children[0],t=V(l),u=(h=e.innerHTML.split("<br>").length,e.innerHTML.includes("</math>")&&(h+=e.innerHTML.split("<mrow>").length-1),e.getElementsByTagName("img"));if(u){let i=""===o.replace(/<img[^>]*>/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 CM=x(()=>{aT(),ii(),n(),a_(),Cu(),eL(),Pc(),mt(TM,"textHelper"),mt(kM,"addText")});async function SM(t,r){let e=O(),s=e.class.padding??12,i=s,o=r.useHtmlLabels??mc(e.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:n}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await TM(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=zN.svg(c),p=RL(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:0<l.members.length&&0===l.methods.length&&(f+=2*i),-g/2),y=-f/2,v=d.rectangle(m-s,y-s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),g+2*s,f+2*s+(u?2*s:0===l.members.length&&0===l.methods.length?-s:0),p),b=c.insert(()=>v,":first-child");b.attr("class","basic label-container");var x=b.node().getBBox(),w=(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),T=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(0<l.members.length||0<l.methods.length||u){let e=d.line(x.x,w+T+y+s,x.x+x.width,w+T+y+s,p);c.insert(()=>e).attr("class","divider").attr("style",t)}if(u||0<l.members.length||0<l.methods.length){let e=d.line(x.x,w+T+k+y+2*i+s,x.x+x.width,w+T+k+y+s+2*i,p);c.insert(()=>e).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||((w=(x=RegExp(/color\s*:\s*([^;]*)/)).exec(t))?(T=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",T)):a&&(k=x.exec(a))&&(t=k[0].replace("color","fill"),c.selectAll("tspan").attr("style",t))),sL(r,b),r.intersect=function(e){return H.rect(r,e)},c}var EM=x(()=>{n(),Cu(),aT(),qN(),ML(),IL(),CM(),Pc(),mt(SM,"classBox")});async function _M(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let n=t,a=t,s="verifyMethod"in t,o=oL(t),l=e.insert("g").attr("class",o).attr("id",t.domId??t.id),c,h=c=s?await AM(l,`<<${n.type}>>`,0,t.labelStyle):await AM(l,"<<Element>>",0,t.labelStyle),u=await AM(l,n.name,h,t.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await AM(l,n.requirementId?"ID: "+n.requirementId:"",h,t.labelStyle),h+=r,e=await AM(l,n.text?"Text: "+n.text:"",h,t.labelStyle),h+=e,r=await AM(l,n.risk?"Risk: "+n.risk:"",h,t.labelStyle),h+=r,await AM(l,n.verifyMethod?"Verification: "+n.verifyMethod:"",h,t.labelStyle)):(e=await AM(l,a.type?"Type: "+a.type:"",h,t.labelStyle),h+=e,await AM(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=zN.svg(l),y=RL(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 sL(t,b),t.intersect=function(e){return H.rect(t,e)},l}async function AM(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 JR(n,_h(i_(t)),{width:SE(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 RM=x(()=>{n(),IL(),ML(),qN(),a_(),Cu(),eL(),aT(),mt(_M,"requirementBox"),mt(AM,"addText")});async function LM(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 nL(e,i,oL(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 aL(h,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await aL(a,"ticket"in i&&i.ticket||"",u);var{label:e,bbox:t}=await aL(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,w=i.cssStyles;if("handDrawn"===i.look){let e=zN.svg(a),t=RL(i,{}),r=b||x?e.path(FD(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",w||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",NM(e)));return sL(i,v),i.height=f,i.intersect=function(e){return H.rect(i,e)},a}var NM,DM=x(()=>{n(),IL(),qD(),ML(),qN(),NM=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(LM,"kanbanItem")});async function IM(e,i){var{labelStyles:n,nodeStyles:t}=Q(i),{shapeSvg:n,bbox:e,halfPadding:r,label:a}=(i.labelStyle=n,await nL(e,i,oL(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=zN.svg(n),t=RL(i,{}),r=e.path(u,t);(h=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",AE(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})`),sL(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 MM=x(()=>{e(),n(),IL(),ML(),qN(),a_(),mt(IM,"bang")});async function OM(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await nL(e,i,oL(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=zN.svg(n),t=RL(i,{}),r=e.path(m,t);(f=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",AE(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})`),sL(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 PM=x(()=>{qN(),e(),a_(),IL(),ML(),n(),mt(OM,"cloud")});async function $M(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await nL(e,t,oL(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()),sL(t,u),t.calcIntersect=function(e,t){return H.rect(e,t)},t.intersect=function(e){return H.rect(t,e)},n}var BM=x(()=>{IL(),ML(),n(),mt($M,"defaultMindmapNode")});async function FM(e,t){return JN(e,t,{padding:t.padding??0})}var zM=x(()=>{eD(),mt(FM,"mindmapCircle")});function qM(e){return e in jM}var UM,GM,jM,WM,YM,VM,HM,XM,KM,ZM,QM,JM,eO,tO,rO,iO=x(()=>{GN(),YN(),KN(),QN(),eD(),iD(),sD(),cD(),dD(),gD(),bD(),wD(),kD(),SD(),_D(),RD(),ND(),ID(),OD(),$D(),zD(),GD(),WD(),VD(),XD(),JD(),tI(),iI(),aI(),hI(),dI(),gI(),mI(),vI(),wI(),kI(),LI(),II(),OI(),$I(),FI(),qI(),GI(),WI(),VI(),XI(),ZI(),JI(),tM(),sM(),lM(),hM(),dM(),gM(),mM(),vM(),wM(),EM(),RM(),DM(),MM(),PM(),BM(),zM(),UM=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BI},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:DI},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:zI},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:HI},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:fD},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:JN},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:IM},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:OM},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:bI},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:DD},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rI},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:eI},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:oM},{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:HD},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:TD},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:eM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:XN},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:MI},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:YI},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:jI},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:AD},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:MD},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:aD},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lD},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:uD},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:nI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:pM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:LD},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:rM},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:sI},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:pD},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xD},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:uM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:yM},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:CD},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ED},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:PI},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fI},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:pI},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:WN},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:rD},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:QI},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:KI},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:fM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:TI},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:uI}],GM=mt(()=>{var e=[...Object.entries({state:UI,choice:ZN,note:yI,rectWithTitle:RI,labelRect:QD,iconSquare:jD,iconCircle:BD,icon:PD,iconRounded:UD,imageSquare:YD,anchor:UN,kanbanItem:LM,mindmapCircle:FM,defaultMindmapNode:$M,classBox:SM,erBox:bM,requirementBox:_M}),...UM.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),jM=GM(),mt(qM,"isValidShape")}),nO=x(()=>{aT(),z9(),Cu(),e(),iO(),a_(),Pc(),ku(),WM=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=yh,this.setAccDescription=bh,this.setDiagramTitle=wh,this.getAccTitle=vh,this.getAccDescription=xh,this.getDiagramTitle=Th,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)}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=F9(t,{schema:B9})),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(!qM(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label),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=e.type),void 0!==r&&(n.type=r.type,n.stroke=r.stroke,n.length=10<r.length?10:r.length),i&&!this.edges.some(e=>e.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=n_(n.start,n.end,{counter:0,prefix:"L"}):n.id=n_(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="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.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<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(e),(i=this.vertices.get(e))&&(i.haveCallback=!0,this.funs.push(()=>{var e=document.querySelector(`[id="${n}"]`);null!==e&&e.addEventListener("click",()=>{t_.runFunc(t,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=t_.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 r=V(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=V("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),V(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=V(e.currentTarget);null!==t.attr("title")&&(e=e.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0))}).on("mouseout",e=>{r.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(),mh()}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<a.length;e++)a[e]=this.lookUpDomId(a[e]);return i=i??"subGraph"+this.subCount,n=this.sanitizeText(n=n||""),this.subCount=this.subCount+1,e={id:i,nodes:a,title:n.trim(),classes:[],dir:t,labelType:r.type},M.info("Adding",e.id,e.nodes,e.dir),e.nodes=this.makeUniq(e,this.subGraphs).nodes,this.subGraphs.push(e),this.subGraphLookup.set(i,e),i}getPosForId(e){for(var[t,r]of this.subGraphs.entries())if(r.id===e)return t;return-1}indexNodes2(e,t){var r=this.subGraphs[t].nodes;if(this.secCount=this.secCount+1,2e3<this.secCount)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let i=0,n=1;for(;i<r.length;){var a=this.getPosForId(r[i]);if(0<=a){if((a=this.indexNodes2(e,a)).result)return{result:!0,count:n+a.count};n+=a.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,0<this.subGraphs.length&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&!(this.firstGraphFlag=!1)}destructStartLink(e){let t=e.trim(),r="arrow_open";switch(t[0]){case"<":r="arrow_point",t=t.slice(1);break;case"x":r="arrow_cross",t=t.slice(1);break;case"o":r="arrow_circle",t=t.slice(1)}let i="normal";return t.includes("=")&&(i="thick"),t.includes(".")&&(i="dotted"),{type:r,stroke:i}}countChar(t,r){let i=r.length,n=0;for(let e=0;e<i;++e)r[e]===t&&++n;return n}destructEndLink(e){let t=e.trim(),r=t.slice(0,-1),i="arrow_open";switch(t.slice(-1)){case"x":i="arrow_cross",t.startsWith("x")&&(i="double_"+i,r=r.slice(1));break;case">":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,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<l.nodes.length&&n.set(l.id,!0);for(o of l.nodes)i.set(o,l.id)}for(let e=r.length-1;0<=e;e--){var c=r[e];t.push({id:c.id,label:c.title,labelStyle:"",parentId:i.get(c.id),padding:8,cssCompiledStyles:this.getCompiledStyles(c.classes),cssClasses:c.classes.join(" "),shape:"rect",dir:c.dir,isGroup:!0,look:a.look})}this.getVertices().forEach(e=>{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:n_(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,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 Eh.flowchart}}}),aO=x(()=>{aT(),YM=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")}),sO=x(()=>{VM=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),oO=x(()=>{Cu(),Pc(),e(),sO(),aT(),qN(),eL(),DL(),AI(),qD(),ML(),HM=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=mc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await JR(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();mc(e.flowchart.htmlLabels)&&(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=zN.svg(u),t=RL(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(FD(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=VM(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 CL(n,e)},{cluster:u,labelBBox:f}},"rect"),XM=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 CL(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),KM=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=i.node().appendChild(await _I(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();mc(e.flowchart.htmlLabels)&&(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,w;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=zN.svg(u),r=a.rx||a.ry?t.path(FD(v,b,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,b,m,y,{seed:s}),i=(w=u.insert(()=>r,":first-child"),t.rectangle(v,x,m,n,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>i)}else(w=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-(mc(e.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return CL(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),ZM=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=mc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await JR(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();mc(e.flowchart.htmlLabels)&&(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=zN.svg(u),t=RL(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(FD(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=VM(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 CL(n,e)},{cluster:u,labelBBox:f}},"kanbanSection"),QM=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=zN.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 CL(r,e)},{cluster:t,labelBBox:{}}},"divider"),JM={rect:HM,squareRect:HM,roundedWithTitle:KM,noteGroup:XM,divider:QM,kanbanSection:ZM},eO=new Map,tO=mt(async(e,t)=>{var r=t.shape||"rect",r=await JM[r](e,t);return eO.set(t.id,r),r},"insertCluster"),rO=mt(()=>{eO=new Map},"clear")});function lO(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=uO(e),t=uO(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 cO,hO,uO,dO,pO,gO,fO,mO=x(()=>{cO={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},hO={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5},mt(lO,"calculateDeltaAndAngle"),uO=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),dO=mt(c=>({x:mt(function(e,t,r){let i=0,n=uO(r[0]).x<uO(r[r.length-1]).x?"left":"right";0===t&&Object.hasOwn(cO,c.arrowTypeStart)?({angle:a,deltaX:s}=lO(r[0],r[1]),i=cO[c.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(cO,c.arrowTypeEnd)&&({angle:a,deltaX:s}=lO(r[r.length-1],r[r.length-2]),i=cO[c.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var t=Math.abs(uO(e).x-uO(r[r.length-1]).x),a=Math.abs(uO(e).y-uO(r[r.length-1]).y),s=Math.abs(uO(e).x-uO(r[0]).x),r=Math.abs(uO(e).y-uO(r[0]).y),o=cO[c.arrowTypeStart],l=cO[c.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="right"==n?-1:1,i-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="right"==n?-1:1,i+=l),uO(e).x+i},"x"),y:mt(function(e,t,r){let i=0,n=uO(r[0]).y<uO(r[r.length-1]).y?"down":"up";0===t&&Object.hasOwn(cO,c.arrowTypeStart)?({angle:a,deltaY:s}=lO(r[0],r[1]),i=cO[c.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(cO,c.arrowTypeEnd)&&({angle:a,deltaY:s}=lO(r[r.length-1],r[r.length-2]),i=cO[c.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var t=Math.abs(uO(e).y-uO(r[r.length-1]).y),a=Math.abs(uO(e).x-uO(r[r.length-1]).x),s=Math.abs(uO(e).y-uO(r[0]).y),r=Math.abs(uO(e).x-uO(r[0]).x),o=cO[c.arrowTypeStart],l=cO[c.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="up"==n?-1:1,i-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="up"==n?-1:1,i+=l),uO(e).y+i},"y")}),"getLineFunctionsWithOffset")}),yO=x(()=>{e(),pO=mt((e,t,r,i,n,a)=>{t.arrowTypeStart&&fO(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&fO(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),gO={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}},fO=mt((e,t,r,i,n,a,s)=>{let o=gO[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 vO(e,t){O().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function bO(t){var r=[],i=[];for(let e=1;e<t.length-1;e++){var n=t[e-1],a=t[e],s=t[e+1];(n.x===a.x&&a.y===s.y&&5<Math.abs(a.x-s.x)&&5<Math.abs(a.y-n.y)||n.y===a.y&&a.x===s.x&&5<Math.abs(a.x-n.x)&&5<Math.abs(a.y-s.y))&&(r.push(a),i.push(e))}return{cornerPoints:r,cornerPointPositions:i}}function xO(t,r){if(t.length<2)return"";let i="",n=t.length;for(let e=0;e<n;e++){var a,s,o,l,c,h=t[e],u=t[e-1],d=t[e+1];0===e?i+=`M${h.x},`+h.y:e===n-1||(c=h.x-u.x,u=h.y-u.y,a=d.x-h.x,d=d.y-h.y,o=Math.hypot(c,u),l=Math.hypot(a,d),o<1e-5)||l<1e-5||(c/=o,u/=o,a/=l,d/=l,s=Math.max(-1,Math.min(1,c*a+u*d)),(s=Math.acos(s))<1e-5)||Math.abs(Math.PI-s)<1e-5?i+=`L${h.x},`+h.y:(s=Math.min(r/Math.sin(s/2),o/2,l/2),o=h.x-c*s,l=h.y-u*s,c=h.x+a*s,u=h.y+d*s,i=(i+=`L${o},`+l)+`Q${h.x},${h.y} ${c},`+u)}return i}function wO(e,t){var r;return e&&t?(r=t.x-e.x,t=t.y-e.y,{angle:Math.atan2(t,r),deltaX:r,deltaY:t}):{angle:0,deltaX:0,deltaY:0}}function TO(e,t){var r,i,n,a=e.map(e=>({...e})),s=(2<=e.length&&cO[t.arrowTypeStart]&&(n=cO[t.arrowTypeStart],s=wO(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&&cO[t.arrowTypeEnd]&&(r=cO[t.arrowTypeEnd],i=e[s-1],n=wO(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 kO,CO,SO,EO,_O,AO,RO,LO,NO,DO,IO,MO,OO,PO,$O,BO,FO,zO,qO,UO,GO,jO,WO,YO,VO,HO,XO,KO,ZO,QO,JO,eP=x(()=>{Cu(),Pc(),e(),eL(),a_(),mO(),sO(),aT(),qN(),AI(),yO(),ML(),kO=new Map,CO=new Map,SO=mt(()=>{kO.clear(),CO.clear()},"clear"),EO=mt(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),_O=mt(async(e,t)=>{var r,i=mc(O().flowchart.htmlLabels),n=Q(t).labelStyles,n=(t.labelStyle=n,await JR(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0,isNode:!1})),a=(M.info("abc82",t,t.labelType),e.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=V(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),kO.set(t.id,a),t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(i=await _I(t.startLabelLeft,EO(t.labelStyle)),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),CO.get(t.id)||CO.set(t.id,{}),CO.get(t.id).startLeft=r,vO(l,t.startLabelLeft)),t.startLabelRight&&(i=await _I(t.startLabelRight,EO(t.labelStyle)),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),CO.get(t.id)||CO.set(t.id,{}),CO.get(t.id).startRight=s,vO(l,t.startLabelRight)),t.endLabelLeft&&(i=await _I(t.endLabelLeft,EO(t.labelStyle)),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),CO.get(t.id)||CO.set(t.id,{}),CO.get(t.id).endLeft=a,vO(l,t.endLabelLeft)),t.endLabelRight&&(r=await _I(t.endLabelRight,EO(t.labelStyle)),i=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),CO.get(t.id)||CO.set(t.id,{}),CO.get(t.id).endRight=s,vO(l,t.endLabelRight)),n},"insertEdgeLabel"),mt(vO,"setTerminalWidth"),AO=mt((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,kO.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=O(),o=VM(o).subGraphTitleTotalMargin;if(i.label){let e=kO.get(i.id),t=i.x,r=i.y;s&&(a=t_.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=CO.get(i.id).startLeft,t=i.x,r=i.y;s&&(n=t_.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=CO.get(i.id).startRight,t=i.x,r=i.y;s&&(a=t_.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=CO.get(i.id).endLeft,t=i.x,r=i.y;s&&(o=t_.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=CO.get(i.id).endRight,t=i.x,r=i.y;s&&(n=t_.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),RO=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"),LO=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.x<i.x?s-r:s+r,l=e.height/2,c=Math.abs(i.y-n.y),h=Math.abs(i.x-n.x),u;if(Math.abs(t-i.y)*s>Math.abs(a-i.x)*l)return e=n.y<i.y?i.y-l-t:t-l-i.y,o=h*e/c,u={x:n.x<i.x?n.x+o:n.x-h+o,y:n.y<i.y?n.y+c-e:n.y-c+e},0===o&&(u.x=i.x,u.y=i.y),0===h&&(u.x=i.x),0===c&&(u.y=i.y),M.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=n.x<i.x?i.x-s-a:a-s-i.x)/h,t=n.x<i.x?n.x+h-o:n.x-h+o,r=n.y<i.y?n.y+e:n.y-e;return M.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=i.x,r=i.y),0===h&&(t=i.x),0===c&&(r=i.y),{x:t,y:r}}},"intersection"),NO=mt((e,i)=>{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),RO(i,e)||s)M.warn("abc88 outside",e,a),a=e,s||n.push(e);else{let t=LO(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(bO,"extractCornerPoints"),DO=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"),IO=mt(function(i){var e=bO(i).cornerPointPositions,n=[];for(let r=0;r<i.length;r++)if(e.includes(r)){var a=i[r-1],s=i[r+1],o=i[r],l=DO(a,o,5),c=DO(s,o,5),h=c.x-l.x,u=c.y-l.y;n.push(l);let e=2*Math.sqrt(2),t={x:o.x,y:o.y};10<Math.abs(s.x-a.x)&&10<=Math.abs(s.y-a.y)?(M.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),t=o.x===l.x?{x:h<0?l.x-5+e:l.x+5-e,y:u<0?l.y-e:l.y+e}:{x:h<0?l.x-e:l.x+e,y:u<0?l.y-5+e:l.y+5-e}):M.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),n.push(t,c)}else n.push(i[r]);return n},"fixCorners"),MO=mt((e,t,r)=>(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),OO=mt(function(i,n,a,e,t,r,s,o=!1){let l=O().handDrawnSeed,c=n.points,h=!1,u=t,d=r;var p,g=[];for(p in n.cssCompiledStyles)AL(p)||g.push(n.cssCompiledStyles[p]);M.debug("UIO intersect check",n.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((c=c.slice(1,n.points.length-1)).unshift(u.intersect(c[0])),M.debug("Last point UIO",n.start,"--\x3e",n.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),t=btoa(JSON.stringify(c)),n.toCluster&&(M.info("to cluster abc88",a.get(n.toCluster)),c=NO(n.points,a.get(n.toCluster).node),h=!0),n.fromCluster&&(M.debug("from cluster abc88",a.get(n.fromCluster),JSON.stringify(c,null,2)),c=NO(c.reverse(),a.get(n.fromCluster).node).reverse(),h=!0),r=c.filter(e=>!Number.isNaN(e.y)),r=IO(r);let f=b3;switch(f=Q5,n.curve){case"linear":f=Q5;break;case"basis":f=b3;break;case"cardinal":f=D3;break;case"bumpX":f=u3;break;case"bumpY":f=d3;break;case"catmullRom":f=U3;break;case"monotoneX":f=sw;break;case"monotoneY":f=ow;break;case"natural":f=uw;break;case"step":f=gw;break;case"stepAfter":f=mw;break;case"stepBefore":f=fw;break;default:f=b3}let{x:m,y}=dO(n),v=i3().x(m).y(y).curve(f),b;switch(n.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(n.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let x,w="rounded"===n.curve?xO(TO(r,n),5):v(r),T=Array.isArray(n.style)?n.style:[n.style],k=T.find(e=>e?.startsWith("stroke:")),C;if("handDrawn"===n.look)o=zN.svg(i),Object.assign([],r),a=o.path(w,{roughness:.3,seed:l}),b+=" transition",o=(x=V(a).select("path").attr("id",n.id).attr("class"," "+b+(n.classes?" "+n.classes:"")).attr("style",T?T.reduce((e,t)=>e+";"+t,""):"")).attr("d"),x.attr("d",o),i.node().appendChild(x.node());else{let e=g.join(";"),t=T?T.reduce((e,t)=>e+t+";",""):"",r="";n.animate&&(r=" edge-animation-fast"),n.animation&&(r=" edge-animation-"+n.animation),a=(e?e+";"+t+";":t)+";"+(T?T.reduce((e,t)=>e+";"+t,""):""),x=i.append("path").attr("d",w).attr("id",n.id).attr("class"," "+b+(n.classes?" "+n.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1],C=!0===n.animate||!!n.animation||e.includes("animation");var a="function"==typeof(o=x.node()).getTotalLength?o.getTotalLength():0,o=hO[n.arrowTypeStart]||0,S=hO[n.arrowTypeEnd]||0;"neo"!==n.look||C||(a=`stroke-dasharray: ${"dotted"===n.pattern||"dashed"===n.pattern?MO(a,o,S):`0 ${o} ${a-o-S} `+S}; stroke-dashoffset: 0;`,x.attr("style",a+x.attr("style")))}x.attr("data-edge",!0),x.attr("data-et","edge"),x.attr("data-id",n.id),x.attr("data-points",t),n.showPoints&&r.forEach(e=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let E="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(E=(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),M.info("arrowTypeStart",n.arrowTypeStart),M.info("arrowTypeEnd",n.arrowTypeEnd),pO(x,n,E,s,e,k),o=Math.floor(c.length/2),S=c[o],a={},(h=!t_.isLabelCoordinateInPath(S,x.attr("d"))||h)&&(a.updatedPath=c),a.originalPath=n.points,a},"insertEdge"),mt(xO,"generateRoundedPath"),mt(wO,"calculateDeltaAndAngle"),mt(TO,"applyMarkerOffsetsToPoints")}),tP=x(()=>{e(),PO=mt((t,e,r,i)=>{e.forEach(e=>{QO[e](t,r,i)})},"insertMarkers"),$O=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"),BO=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"),FO=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("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"),UO=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"),GO=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"),jO=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"),WO=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"),YO=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"),VO=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"),HO=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"),XO=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"),KO=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"),ZO=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"),QO={extension:$O,composition:BO,aggregation:FO,dependency:zO,lollipop:qO,point:UO,circle:GO,cross:jO,barb:WO,only_one:YO,zero_or_one:VO,one_or_more:HO,zero_or_more:XO,requirement_arrow:KO,requirement_contains:ZO},JO=PO});async function rP(t,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?jM[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),iP.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var iP,nP,aP,sP,oP,lP=x(()=>{e(),iO(),iP=new Map,mt(rP,"insertNode"),nP=mt((e,t)=>{iP.set(t.id,e)},"setNodeElem"),aP=mt(()=>{iP.clear()},"clear"),sP=mt(e=>{var t=iP.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")}),cP=x(()=>{ii(),Pc(),e(),oO(),eP(),tP(),lP(),n(),a_(),oP={common:L,getConfig:sr,insertCluster:tO,insertEdge:OO,insertEdgeLabel:_O,insertMarkers:JO,insertNode:rP,interpolateToCurve:mE,labelHelper:nL,log:M,positionEdgeLabel:AO}});function hP(e){return"symbol"==typeof e||X7(e)&&"[object Symbol]"==_T(e)}var uP,dP=x(()=>{AT(),K7(),mt(hP,"isSymbol"),uP=hP});function pP(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}var gP,fP=x(()=>{mt(pP,"arrayMap"),gP=pP});function mP(e){var t;return"string"==typeof e?e:nC(e)?gP(e,mP)+"":uP(e)?bP?bP.call(e):"":"0"==(t=e+"")&&1/e==-yP?"-0":t}var yP,vP,bP,xP,wP=x(()=>{dT(),fP(),oC(),dP(),yP=1/0,vP=eT?eT.prototype:void 0,bP=vP?vP.toString:void 0,mt(mP,"baseToString"),xP=mP});function TP(e){for(var t=e.length;t--&&kP.test(e.charAt(t)););return t}var kP,CP,SP=x(()=>{kP=/\s/,mt(TP,"trimmedEndIndex"),CP=TP});function EP(e){return e&&e.slice(0,CP(e)+1).replace(_P,"")}var _P,AP,RP=x(()=>{SP(),_P=/^\s+/,mt(EP,"baseTrim"),AP=EP});function LP(e){if("number"==typeof e)return e;if(uP(e))return NP;if(LT(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=LT(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=AP(e);var t=IP.test(e);return t||MP.test(e)?OP(e.slice(2),t?2:8):DP.test(e)?NP:+e}var NP,DP,IP,MP,OP,PP,$P=x(()=>{RP(),NT(),dP(),NP=NaN,DP=/^[-+]0x[0-9a-f]+$/i,IP=/^0b[01]+$/i,MP=/^0o[0-7]+$/i,OP=parseInt,mt(LP,"toNumber"),PP=LP});function BP(e){return e?(e=PP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var FP,zP=x(()=>{$P(),mt(BP,"toFinite"),FP=BP});function qP(e){var t=(e=FP(e))%1;return e==e?t?e-t:e:0}var UP,GP,jP,WP=x(()=>{zP(),mt(qP,"toInteger"),UP=qP}),YP=x(()=>{l6(),uT(),GP=a6(Qw,"WeakMap"),jP=GP});function VP(){}var HP,XP=x(()=>{mt(VP,"noop"),HP=VP});function KP(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}var ZP,QP=x(()=>{mt(KP,"arrayEach"),ZP=KP});function JP(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a<n;)if(t(e[a],a,e))return a;return-1}var e$,t$=x(()=>{mt(JP,"baseFindIndex"),e$=JP});function r$(e){return e!=e}var i$,n$=x(()=>{mt(r$,"baseIsNaN"),i$=r$});function a$(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}var s$,o$=x(()=>{mt(a$,"strictIndexOf"),s$=a$});function l$(e,t,r){return t==t?s$(e,t,r):e$(e,i$,r)}var c$,h$=x(()=>{t$(),n$(),o$(),mt(l$,"baseIndexOf"),c$=l$});function u$(e,t){return!(null==e||!e.length)&&-1<c$(e,t,0)}var d$,p$,g$,f$=x(()=>{h$(),mt(u$,"arrayIncludes"),d$=u$}),m$=x(()=>{F7(),p$=P7(Object.keys,Object),g$=p$});function y$(e){if(!G7(e))return g$(e);var t,r=[];for(t in Object(e))b$.call(e,t)&&"constructor"!=t&&r.push(t);return r}var v$,b$,x$,w$=x(()=>{j7(),m$(),v$=Object.prototype,b$=v$.hasOwnProperty,mt(y$,"baseKeys"),x$=y$});function T$(e){return(dC(e)?gS:x$)(e)}var k$,C$,S$,E$,_$=x(()=>{fS(),w$(),pC(),mt(T$,"keys"),k$=T$}),A$=x(()=>{eS(),iS(),gE(),pC(),j7(),_$(),S$=Object.prototype,C$=S$.hasOwnProperty,S$=uE(function(e,t){if(G7(t)||dC(t))rS(t,k$(t),e);else for(var r in t)C$.call(t,r)&&JC(e,r,t[r])}),E$=S$});function R$(e,t){var r;return!nC(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!uP(e))||N$.test(e)||!L$.test(e)||null!=t&&e in Object(t))}var L$,N$,D$,I$=x(()=>{oC(),dP(),L$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N$=/^\w*$/,mt(R$,"isKey"),D$=R$});function M$(e){var t=(e=Ik(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var O$,P$,$$,B$,F$,z$=x(()=>{Mk(),mt(M$,"memoizeCapped"),O$=M$}),q$=x(()=>{z$(),P$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$$=/\\(\\)?/g,B$=O$(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(P$,function(e,t,r,i){n.push(r?i.replace($$,"$1"):t||e)}),n}),F$=B$});function U$(e){return null==e?"":xP(e)}var G$,j$=x(()=>{wP(),mt(U$,"toString"),G$=U$});function W$(e,t){return nC(e)?e:D$(e,t)?[e]:F$(G$(e))}var Y$,V$=x(()=>{oC(),I$(),q$(),j$(),mt(W$,"castPath"),Y$=W$});function H$(e){var t;return"string"==typeof e||uP(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var X$,K$=x(()=>{dP(),mt(H$,"toKey"),X$=H$});function Z$(e,t){for(var r=0,i=(t=Y$(t,e)).length;null!=e&&r<i;)e=e[X$(t[r++])];return r&&r==i?e:void 0}var Q$,J$=x(()=>{V$(),K$(),mt(Z$,"baseGet"),Q$=Z$});function eB(e,t,r){return void 0===(e=null==e?void 0:Q$(e,t))?r:e}var tB,rB=x(()=>{J$(),mt(eB,"get"),tB=eB});function iB(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}var nB,aB=x(()=>{mt(iB,"arrayPush"),nB=iB});function sB(e){return nC(e)||rC(e)||!!(oB&&e&&e[oB])}var oB,lB,cB=x(()=>{dT(),sC(),oC(),oB=eT?eT.isConcatSpreadable:void 0,mt(sB,"isFlattenable"),lB=sB});function hB(e,t,r,i,n){var a=-1,s=e.length;for(r=r||lB,n=n||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?hB(o,t-1,r,i,n):nB(n,o):i||(n[n.length]=o)}return n}var uB,dB=x(()=>{aB(),cB(),mt(hB,"baseFlatten"),uB=hB});function pB(e){return null!=e&&e.length?uB(e,1):[]}var gB,fB=x(()=>{dB(),mt(pB,"flatten"),gB=pB});function mB(e){return tE(jS(e,void 0,gB),e+"")}var yB,vB=x(()=>{fB(),WS(),iE(),mt(mB,"flatRest"),yB=mB});function bB(e,t,r){var i=-1,n=e.length;(r=n<r?n:r)<0&&(r+=n),n=r<(t=t<0?n<-t?0:n+t:t)?0:r-t>>>0,t>>>=0;for(var a=Array(n);++i<n;)a[i]=e[i+t];return a}var xB,wB=x(()=>{mt(bB,"baseSlice"),xB=bB});function TB(e){return kB.test(e)}var kB,CB,SB=x(()=>{kB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt(TB,"hasUnicode"),CB=TB});function EB(e,t,r,i){var n=-1,a=null==e?0:e.length;for(i&&a&&(r=e[++n]);++n<a;)r=t(r,e[n],n,e);return r}var _B,AB=x(()=>{mt(EB,"arrayReduce"),_B=EB});function RB(e,t){return e&&rS(t,k$(t),e)}var LB,NB=x(()=>{iS(),_$(),mt(RB,"baseAssign"),LB=RB});function DB(e,t){return e&&rS(t,SS(t),e)}var IB,MB=x(()=>{iS(),ES(),mt(DB,"baseAssignIn"),IB=DB});function OB(e,t){for(var r=-1,i=null==e?0:e.length,n=0,a=[];++r<i;){var s=e[r];t(s,r,e)&&(a[n++]=s)}return a}var PB,$B=x(()=>{mt(OB,"arrayFilter"),PB=OB});function BB(){return[]}var FB,zB,qB,UB,GB,jB=x(()=>{mt(BB,"stubArray"),FB=BB}),WB=x(()=>{$B(),jB(),zB=Object.prototype,qB=zB.propertyIsEnumerable,GB=(UB=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),PB(UB(t),function(e){return qB.call(t,e)}))}:FB});function YB(e,t){return rS(e,GB(e),t)}var VB,HB,XB,KB=x(()=>{iS(),WB(),mt(YB,"copySymbols"),VB=YB}),ZB=x(()=>{aB(),z7(),WB(),jB(),HB=Object.getOwnPropertySymbols,XB=HB?function(e){for(var t=[];e;)nB(t,GB(e)),e=B7(e);return t}:FB});function QB(e,t){return rS(e,XB(e),t)}var JB,eF=x(()=>{iS(),ZB(),mt(QB,"copySymbolsIn"),JB=QB});function tF(e,t,r){return t=t(e),nC(e)?t:nB(t,r(e))}var rF,iF=x(()=>{aB(),oC(),mt(tF,"baseGetAllKeys"),rF=tF});function nF(e){return rF(e,k$,GB)}var aF,sF=x(()=>{iF(),WB(),_$(),mt(nF,"getAllKeys"),aF=nF});function oF(e){return rF(e,SS,XB)}var lF,cF,hF,uF,dF,pF,gF,fF,mF,yF,vF,bF,xF,wF,TF,kF,CF,SF,EF,_F=x(()=>{iF(),ZB(),ES(),mt(oF,"getAllKeysIn"),lF=oF}),AF=x(()=>{l6(),uT(),cF=a6(Qw,"DataView"),hF=cF}),RF=x(()=>{l6(),uT(),uF=a6(Qw,"Promise"),dF=uF}),LF=x(()=>{l6(),uT(),pF=a6(Qw,"Set"),gF=pF}),NF=x(()=>{AF(),sk(),RF(),LF(),YP(),AT(),YT(),fF="[object Map]",mF="[object Promise]",yF="[object Set]",vF="[object WeakMap]",bF="[object DataView]",xF=WT(hF),wF=WT(nk),TF=WT(dF),kF=WT(gF),CF=WT(jP),SF=_T,(hF&&SF(new hF(new ArrayBuffer(1)))!=bF||nk&&SF(new nk)!=fF||dF&&SF(dF.resolve())!=mF||gF&&SF(new gF)!=yF||jP&&SF(new jP)!=vF)&&(SF=mt(function(e){var t=_T(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?WT(e):"")switch(e){case xF:return bF;case wF:return fF;case TF:return mF;case kF:return yF;case CF:return vF}return t},"getTag")),EF=SF});function DF(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&MF.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var IF,MF,OF,PF=x(()=>{IF=Object.prototype,MF=IF.hasOwnProperty,mt(DF,"initCloneArray"),OF=DF});function $F(e,t){return t=t?C7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var BF,FF=x(()=>{S7(),mt($F,"cloneDataView"),BF=$F});function zF(e){var t=new e.constructor(e.source,qF.exec(e));return t.lastIndex=e.lastIndex,t}var qF,UF,GF=x(()=>{qF=/\w*$/,mt(zF,"cloneRegExp"),UF=zF});function jF(e){return YF?Object(YF.call(e)):{}}var WF,YF,VF,HF=x(()=>{dT(),WF=eT?eT.prototype:void 0,YF=WF?WF.valueOf:void 0,mt(jF,"cloneSymbol"),VF=jF});function XF(e,t,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return C7(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return BF(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 _7(e,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return UF(e);case"[object Set]":return new i;case"[object Symbol]":return VF(e)}}var KF,ZF=x(()=>{S7(),FF(),GF(),HF(),A7(),mt(XF,"initCloneByTag"),KF=XF});function QF(e){return X7(e)&&"[object Map]"==EF(e)}var JF,ez,tz,rz=x(()=>{NF(),K7(),mt(QF,"baseIsMap"),JF=QF}),iz=x(()=>{rz(),jC(),WC(),ez=(ez=qC&&qC.isMap)?$C(ez):JF,tz=ez});function nz(e){return X7(e)&&"[object Set]"==EF(e)}var az,sz,oz,lz=x(()=>{NF(),K7(),mt(nz,"baseIsSet"),az=nz}),cz=x(()=>{lz(),jC(),WC(),sz=(sz=qC&&qC.isSet)?$C(sz):az,oz=sz});function hz(r,i,n,e,t,a){var s,o=i&uz,l=i&dz,c=i&pz;if(void 0===(s=n?t?n(r,e,t,a):n(r):s)){if(!LT(r))return r;if(e=nC(r)){if(s=OF(r),!o)return L7(r,s)}else{var h=EF(r),u=h==fz||h==mz;if(wC(r))return v7(r,o);if(h==yz||h==gz||u&&!t){if(s=l||u?{}:Y7(r),!o)return l?JB(r,IB(s,r)):VB(r,LB(s,r))}else{if(!vz[h])return t?r:{};s=KF(r,h,o)}}if(u=(a=a||new Zk).get(r))return u;a.set(r,s),oz(r)?r.forEach(function(e){s.add(hz(e,i,n,e,r,a))}):tz(r)&&r.forEach(function(e,t){s.set(t,hz(e,i,n,t,r,a))});var d=e?void 0:(c?l?lF:aF:l?SS:k$)(r);ZP(d||r,function(e,t){d&&(e=r[t=e]),JC(s,t,hz(e,i,n,t,r,a))})}return s}var uz,dz,pz,gz,fz,mz,yz,vz,bz,xz=x(()=>{e7(),QP(),eS(),NB(),MB(),w7(),I7(),KB(),eF(),sF(),_F(),NF(),PF(),ZF(),V7(),oC(),kC(),iz(),NT(),cz(),_$(),ES(),uz=1,dz=2,pz=4,fz="[object Function]",mz="[object GeneratorFunction]",yz="[object Object]",(vz={})[gz="[object Arguments]"]=vz["[object Array]"]=vz["[object ArrayBuffer]"]=vz["[object DataView]"]=vz["[object Boolean]"]=vz["[object Date]"]=vz["[object Float32Array]"]=vz["[object Float64Array]"]=vz["[object Int8Array]"]=vz["[object Int16Array]"]=vz["[object Int32Array]"]=vz["[object Map]"]=vz["[object Number]"]=vz[yz]=vz["[object RegExp]"]=vz["[object Set]"]=vz["[object String]"]=vz["[object Symbol]"]=vz["[object Uint8Array]"]=vz["[object Uint8ClampedArray]"]=vz["[object Uint16Array]"]=vz["[object Uint32Array]"]=!0,vz["[object Error]"]=vz[fz]=vz["[object WeakMap]"]=!1,mt(hz,"baseClone"),bz=hz});function wz(e){return bz(e,4)}var Tz,kz=x(()=>{xz(),mt(wz,"clone"),Tz=wz});function Cz(e){return bz(e,5)}var Sz,Ez=x(()=>{xz(),mt(Cz,"cloneDeep"),Sz=Cz});function _z(e){for(var t=-1,r=null==e?0:e.length,i=0,n=[];++t<r;){var a=e[t];a&&(n[i++]=a)}return n}var Az,Rz=x(()=>{mt(_z,"compact"),Az=_z});function Lz(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var Nz,Dz=x(()=>{mt(Lz,"setCacheAdd"),Nz=Lz});function Iz(e){return this.__data__.has(e)}var Mz,Oz=x(()=>{mt(Iz,"setCacheHas"),Mz=Iz});function Pz(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Rk;++t<r;)this.add(e[t])}var $z,Bz=x(()=>{Lk(),Dz(),Oz(),mt(Pz,"SetCache"),Pz.prototype.add=Pz.prototype.push=Nz,Pz.prototype.has=Mz,$z=Pz});function Fz(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}var zz,qz=x(()=>{mt(Fz,"arraySome"),zz=Fz});function Uz(e,t){return e.has(t)}var Gz,jz=x(()=>{mt(Uz,"cacheHas"),Gz=Uz});function Wz(e,t,r,i,n,a){var s=1&r,o=e.length;if(o!=(l=t.length)&&!(s&&o<l))return!1;var l=a.get(e),c=a.get(t);if(l&&c)return l==t&&c==e;var h=-1,u=!0,d=2&r?new $z:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var p,g=e[h],f=t[h];if(void 0!==(p=i?s?i(f,g,h,t,e,a):i(g,f,h,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!zz(t,function(e,t){if(!Gz(d,t)&&(g===e||n(g,e,r,i,a)))return d.push(t)})){u=!1;break}}else if(g!==f&&!n(g,f,r,i,a)){u=!1;break}}return a.delete(e),a.delete(t),u}var Yz,Vz=x(()=>{Bz(),qz(),jz(),mt(Wz,"equalArrays"),Yz=Wz});function Hz(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}var Xz,Kz=x(()=>{mt(Hz,"mapToArray"),Xz=Hz});function Zz(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Qz,Jz=x(()=>{mt(Zz,"setToArray"),Qz=Zz});function eq(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 x7(e),new x7(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return P6(+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=Xz;case"[object Set]":var l,o=o||Qz;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=Yz(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(rq)return rq.call(e)==rq.call(t)}return!1}var tq,rq,iq,nq=x(()=>{dT(),T7(),$6(),Vz(),Kz(),Jz(),tq=eT?eT.prototype:void 0,rq=tq?tq.valueOf:void 0,mt(eq,"equalByTag"),iq=eq});function aq(e,t,r,i,n,a){var s=1&r,o=aF(e),l=o.length;if(l!=aF(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:oq.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<l;){var f,m=e[h=o[c]],y=t[h];if(!(void 0===(f=i?s?i(y,m,h,t,e,a):i(m,y,h,e,t,a):f)?m===y||n(m,y,r,i,a):f)){p=!1;break}g=g||"constructor"==h}return p&&!g&&(u=e.constructor)!=(d=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof u&&u instanceof u&&"function"==typeof d&&d instanceof d)&&(p=!1),a.delete(e),a.delete(t),p}var sq,oq,lq,cq=x(()=>{sF(),sq=Object.prototype,oq=sq.hasOwnProperty,mt(aq,"equalObjects"),lq=aq});function hq(e,t,r,i,n,a){var s=nC(e),o=nC(t),l=s?dq:EF(e),o=o?dq:EF(t),c=(l=l==uq?pq:l)==pq,h=(o=o==uq?pq:o)==pq;if((o=l==o)&&wC(e)){if(!wC(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new Zk,s||GC(e)?Yz(e,t,r,i,n,a):iq(e,t,l,r,i,n,a)):1&r||(s=c&&fq.call(e,"__wrapped__"),l=h&&fq.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new Zk,lq(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new Zk)}var uq,dq,pq,gq,fq,mq,yq=x(()=>{e7(),Vz(),nq(),cq(),NF(),oC(),kC(),YC(),uq="[object Arguments]",dq="[object Array]",pq="[object Object]",gq=Object.prototype,fq=gq.hasOwnProperty,mt(hq,"baseIsEqualDeep"),mq=hq});function vq(e,t,r,i,n){return e===t||(null==e||null==t||!X7(e)&&!X7(t)?e!=e&&t!=t:mq(e,t,r,i,vq,n))}var bq,xq=x(()=>{yq(),K7(),mt(vq,"baseIsEqual"),bq=vq});function wq(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<a;){var l=(o=r[n])[0],c=e[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var u,d=new Zk;if(!(void 0===(u=i?i(c,h,l,e,t,d):u)?bq(h,c,3,i,d):u))return!1}}return!0}var Tq,kq=x(()=>{e7(),xq(),mt(wq,"baseIsMatch"),Tq=wq});function Cq(e){return e==e&&!LT(e)}var Sq,Eq=x(()=>{NT(),mt(Cq,"isStrictComparable"),Sq=Cq});function _q(e){for(var t=k$(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,Sq(n)]}return t}var Aq,Rq=x(()=>{Eq(),_$(),mt(_q,"getMatchData"),Aq=_q});function Lq(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var Nq,Dq=x(()=>{mt(Lq,"matchesStrictComparable"),Nq=Lq});function Iq(t){var r=Aq(t);return 1==r.length&&r[0][2]?Nq(r[0][0],r[0][1]):function(e){return e===t||Tq(e,t,r)}}var Mq,Oq=x(()=>{kq(),Rq(),Dq(),mt(Iq,"baseMatches"),Mq=Iq});function Pq(e,t){return null!=e&&t in Object(e)}var $q,Bq=x(()=>{mt(Pq,"baseHasIn"),$q=Pq});function Fq(e,t,r){for(var i=-1,n=(t=Y$(t,e)).length,a=!1;++i<n;){var s=X$(t[i]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++i!=n?a:!!(n=null==e?0:e.length)&&cC(n)&&cS(s,n)&&(nC(e)||rC(e))}var zq,qq=x(()=>{V$(),sC(),oC(),hS(),hC(),K$(),mt(Fq,"hasPath"),zq=Fq});function Uq(e,t){return null!=e&&zq(e,t,$q)}var Gq,jq=x(()=>{Bq(),qq(),mt(Uq,"hasIn"),Gq=Uq});function Wq(r,i){return D$(r)&&Sq(i)?Nq(X$(r),i):function(e){var t=tB(e,r);return void 0===t&&t===i?Gq(e,r):bq(i,t,3)}}var Yq,Vq=x(()=>{xq(),rB(),jq(),I$(),Eq(),Dq(),K$(),mt(Wq,"baseMatchesProperty"),Yq=Wq});function Hq(t){return function(e){return e?.[t]}}var Xq,Kq=x(()=>{mt(Hq,"baseProperty"),Xq=Hq});function Zq(t){return function(e){return Q$(e,t)}}var Qq,Jq=x(()=>{J$(),mt(Zq,"basePropertyDeep"),Qq=Zq});function eU(e){return D$(e)?Xq(X$(e)):Qq(e)}var tU,rU=x(()=>{Kq(),Jq(),I$(),K$(),mt(eU,"property"),tU=eU});function iU(e){return"function"==typeof e?e:null==e?$S:"object"==typeof e?nC(e)?Yq(e[0],e[1]):Mq(e):tU(e)}var nU,aU=x(()=>{Oq(),Vq(),BS(),oC(),rU(),mt(iU,"baseIteratee"),nU=iU});function sU(e,t,r,i){for(var n=-1,a=null==e?0:e.length;++n<a;){var s=e[n];t(i,s,r(s),e)}return i}var oU,lU=x(()=>{mt(sU,"arrayAggregator"),oU=sU});function cU(e,t){return e&&u7(e,t,k$)}var hU,uU=x(()=>{p7(),_$(),mt(cU,"baseForOwn"),hU=cU});function dU(a,s){return function(e,t){if(null!=e){if(!dC(e))return a(e,t);for(var r=e.length,i=s?r:-1,n=Object(e);(s?i--:++i<r)&&!1!==t(n[i],i,n););}return e}}var pU,gU,fU,mU=x(()=>{pC(),mt(dU,"createBaseEach"),pU=dU}),yU=x(()=>{uU(),mU(),gU=pU(hU),fU=gU});function vU(e,i,n,a){return fU(e,function(e,t,r){i(a,e,n(e),r)}),a}var bU,xU=x(()=>{yU(),mt(vU,"baseAggregator"),bU=vU});function wU(n,a){return function(e,t){var r=nC(e)?oU:bU,i=a?a():{};return r(e,n,nU(t,2),i)}}var TU,kU,CU,SU,EU,_U,AU,RU=x(()=>{lU(),xU(),aU(),oC(),mt(wU,"createAggregator"),TU=wU}),LU=x(()=>{uT(),kU=mt(function(){return Qw.Date.now()},"now"),CU=kU}),NU=x(()=>{sE(),$6(),cE(),ES(),SU=Object.prototype,EU=SU.hasOwnProperty,_U=aE(function(e,t){e=Object(e);var r=-1,i=t.length,n=2<i?t[2]:void 0;for(n&&lE(t[0],t[1],n)&&(i=1);++r<i;)for(var a=t[r],s=SS(a),o=-1,l=s.length;++o<l;){var c=s[o],h=e[c];(void 0===h||P6(h,SU[c])&&!EU.call(e,c))&&(e[c]=a[c])}return e}),AU=_U});function DU(e,t,r){for(var i=-1,n=null==e?0:e.length;++i<n;)if(r(t,e[i]))return!0;return!1}var IU,MU=x(()=>{mt(DU,"arrayIncludesWith"),IU=DU});function OU(e,t,r,i){var n=-1,a=d$,s=!0,o=e.length,l=[],c=t.length;if(o){r&&(t=gP(t,$C(r))),i?(a=IU,s=!1):200<=t.length&&(a=Gz,s=!1,t=new $z(t));e:for(;++n<o;){var h=e[n],u=null==r?h:r(h),h=i||0!==h?h:0;if(s&&u==u){for(var d=c;d--;)if(t[d]===u)continue e;l.push(h)}else a(t,u,i)||l.push(h)}}return l}var PU,$U,BU,FU=x(()=>{Bz(),f$(),MU(),fP(),jC(),jz(),mt(OU,"baseDifference"),PU=OU}),zU=x(()=>{FU(),dB(),sE(),mC(),$U=aE(function(e,t){return fC(e)?PU(e,uB(t,1,fC,!0)):[]}),BU=$U});function qU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var UU,GU=x(()=>{mt(qU,"last"),UU=qU});function jU(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:UP(t),xB(e,t<0?0:t,i)):[]}var WU,YU=x(()=>{wB(),WP(),mt(jU,"drop"),WU=jU});function VU(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:UP(t),xB(e,0,(t=i-t)<0?0:t)):[]}var HU,XU=x(()=>{wB(),WP(),mt(VU,"dropRight"),HU=VU});function KU(e){return"function"==typeof e?e:$S}var ZU,QU=x(()=>{BS(),mt(KU,"castFunction"),ZU=KU});function JU(e,t){return(nC(e)?ZP:fU)(e,ZU(t))}var v,eG=x(()=>{QP(),yU(),QU(),oC(),mt(JU,"forEach"),v=JU}),tG=x(()=>{eG()});function rG(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(!t(e[r],r,e))return!1;return!0}var iG,nG=x(()=>{mt(rG,"arrayEvery"),iG=rG});function aG(e,i){var n=!0;return fU(e,function(e,t,r){return n=!!i(e,t,r)}),n}var sG,oG=x(()=>{yU(),mt(aG,"baseEvery"),sG=aG});function lG(e,t,r){var i=nC(e)?iG:sG;return r&&lE(e,t,r)&&(t=void 0),i(e,nU(t,3))}var cG,hG=x(()=>{nG(),oG(),aU(),oC(),cE(),mt(lG,"every"),cG=lG});function uG(e,i){var n=[];return fU(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}var dG,pG=x(()=>{yU(),mt(uG,"baseFilter"),dG=uG});function gG(e,t){return(nC(e)?PB:dG)(e,nU(t,3))}var fG,mG=x(()=>{$B(),pG(),aU(),oC(),mt(gG,"filter"),fG=gG});function yG(a){return function(e,t,r){var i,n=Object(e);return dC(e)||(i=nU(t,3),e=k$(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 vG,bG=x(()=>{aU(),pC(),_$(),mt(yG,"createFind"),vG=yG});function xG(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:UP(r))<0&&(r=wG(i+r,0)),e$(e,nU(t,3),r)):-1}var wG,TG,kG,CG,SG=x(()=>{t$(),aU(),WP(),wG=Math.max,mt(xG,"findIndex"),TG=xG}),EG=x(()=>{bG(),SG(),kG=vG(TG),CG=kG});function _G(e){return e&&e.length?e[0]:void 0}var AG,RG=x(()=>{mt(_G,"head"),AG=_G}),LG=x(()=>{RG()});function NG(e,i){var n=-1,a=dC(e)?Array(e.length):[];return fU(e,function(e,t,r){a[++n]=i(e,t,r)}),a}var DG,IG=x(()=>{yU(),pC(),mt(NG,"baseMap"),DG=NG});function MG(e,t){return(nC(e)?gP:DG)(e,nU(t,3))}var b,OG=x(()=>{fP(),aU(),IG(),oC(),mt(MG,"map"),b=MG});function PG(e,t){return uB(b(e,t),1)}var $G,BG=x(()=>{dB(),OG(),mt(PG,"flatMap"),$G=PG});function FG(e,t){return null==e?e:u7(e,ZU(t),SS)}var zG,qG=x(()=>{p7(),QU(),ES(),mt(FG,"forIn"),zG=FG});function UG(e,t){return e&&hU(e,ZU(t))}var GG,jG,WG,YG,VG=x(()=>{uU(),QU(),mt(UG,"forOwn"),GG=UG}),HG=x(()=>{n7(),RU(),WG=Object.prototype,jG=WG.hasOwnProperty,WG=TU(function(e,t,r){jG.call(e,r)?e[r].push(t):i7(e,r,[t])}),YG=WG});function XG(e,t){return t<e}var KG,ZG=x(()=>{mt(XG,"baseGt"),KG=XG});function QG(e,t){return null!=e&&ej.call(e,t)}var JG,ej,tj,rj=x(()=>{JG=Object.prototype,ej=JG.hasOwnProperty,mt(QG,"baseHas"),tj=QG});function ij(e,t){return null!=e&&zq(e,t,tj)}var nj,aj=x(()=>{rj(),qq(),mt(ij,"has"),nj=ij});function sj(e){return"string"==typeof e||!nC(e)&&X7(e)&&"[object String]"==_T(e)}var oj,lj=x(()=>{AT(),oC(),K7(),mt(sj,"isString"),oj=sj});function cj(t,e){return gP(e,function(e){return t[e]})}var hj,uj=x(()=>{fP(),mt(cj,"baseValues"),hj=cj});function dj(e){return null==e?[]:hj(e,k$(e))}var pj,gj=x(()=>{uj(),_$(),mt(dj,"values"),pj=dj});function fj(e,t,r,i){return e=dC(e)?e:pj(e),r=r&&!i?UP(r):0,i=e.length,r<0&&(r=mj(i+r,0)),oj(e)?r<=i&&-1<e.indexOf(t,r):!!i&&-1<c$(e,t,r)}var mj,yj,vj=x(()=>{h$(),pC(),lj(),WP(),gj(),mj=Math.max,mt(fj,"includes"),yj=fj});function bj(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:UP(r))<0&&(r=xj(i+r,0)),c$(e,t,r)):-1}var xj,wj,Tj=x(()=>{h$(),WP(),xj=Math.max,mt(bj,"indexOf"),wj=bj});function kj(e){if(null!=e){if(dC(e)&&(nC(e)||"string"==typeof e||"function"==typeof e.splice||wC(e)||GC(e)||rC(e)))return!e.length;var t,r=EF(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(G7(e))return!x$(e).length;for(t in e)if(Sj.call(e,t))return!1}return!0}var Cj,Sj,Ej,_j=x(()=>{w$(),NF(),sC(),oC(),pC(),kC(),j7(),YC(),Cj=Object.prototype,Sj=Cj.hasOwnProperty,mt(kj,"isEmpty"),Ej=kj});function Aj(e){return X7(e)&&"[object RegExp]"==_T(e)}var Rj,Lj,Nj,Dj=x(()=>{AT(),K7(),mt(Aj,"baseIsRegExp"),Rj=Aj}),Ij=x(()=>{Dj(),jC(),WC(),Lj=(Lj=qC&&qC.isRegExp)?$C(Lj):Rj,Nj=Lj});function Mj(e){return void 0===e}var Oj,Pj=x(()=>{mt(Mj,"isUndefined"),Oj=Mj});function $j(e,t){return e<t}var Bj,Fj=x(()=>{mt($j,"baseLt"),Bj=$j});function zj(e,i){var n={};return i=nU(i,3),hU(e,function(e,t,r){i7(n,t,i(e,t,r))}),n}var qj,Uj=x(()=>{n7(),uU(),aU(),mt(zj,"mapValues"),qj=zj});function Gj(e,t,r){for(var i=-1,n=e.length;++i<n;){var a,s,o=e[i],l=t(o);null!=l&&(void 0===a?l==l&&!uP(l):r(l,a))&&(a=l,s=o)}return s}var jj,Wj=x(()=>{dP(),mt(Gj,"baseExtremum"),jj=Gj});function Yj(e){return e&&e.length?jj(e,$S,KG):void 0}var Vj,Hj=x(()=>{Wj(),ZG(),BS(),mt(Yj,"max"),Vj=Yj});function Xj(e){return e&&e.length?jj(e,$S,Bj):void 0}var Kj,Zj=x(()=>{Wj(),Fj(),BS(),mt(Xj,"min"),Kj=Xj});function Qj(e,t){return e&&e.length?jj(e,nU(t,2),Bj):void 0}var Jj,eW=x(()=>{Wj(),aU(),Fj(),mt(Qj,"minBy"),Jj=Qj});function tW(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 rW,iW=x(()=>{mt(tW,"negate"),rW=tW});function nW(e,t,r,i){if(LT(e))for(var n=-1,a=(t=Y$(t,e)).length,s=a-1,o=e;null!=o&&++n<a;){var l,c=X$(t[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=LT(l)?l:cS(t[n+1])?[]:{}),JC(o,c,h),o=o[c]}return e}var aW,sW=x(()=>{eS(),V$(),hS(),NT(),K$(),mt(nW,"baseSet"),aW=nW});function oW(e,t,r){for(var i=-1,n=t.length,a={};++i<n;){var s=t[i],o=Q$(e,s);r(o,s)&&aW(a,Y$(s,e),o)}return a}var lW,cW=x(()=>{J$(),sW(),V$(),mt(oW,"basePickBy"),lW=oW});function hW(e,r){var t;return null==e?{}:(t=gP(lF(e),function(e){return[e]}),r=nU(r),lW(e,t,function(e,t){return r(e,t[0])}))}var uW,dW=x(()=>{fP(),aU(),cW(),_F(),mt(hW,"pickBy"),uW=hW});function pW(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var gW,fW=x(()=>{mt(pW,"baseSortBy"),gW=pW});function mW(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=e==e,a=uP(e),s=void 0!==t,o=null===t,l=t==t,c=uP(t);if(!o&&!c&&!a&&t<e||a&&s&&l&&!o&&!c||i&&s&&l||!r&&l||!n)return 1;if(!i&&!a&&!c&&e<t||c&&r&&n&&!i&&!a||o&&r&&n||!s&&n||!l)return-1}return 0}var yW,vW=x(()=>{dP(),mt(mW,"compareAscending"),yW=mW});function bW(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,s=n.length,o=r.length;++i<s;){var l=yW(n[i],a[i]);if(l)return o<=i?l:l*("desc"==r[i]?-1:1)}return e.index-t.index}var xW,wW=x(()=>{vW(),mt(bW,"compareMultiple"),xW=bW});function TW(e,i,r){i=i.length?gP(i,function(t){return nC(t)?function(e){return Q$(e,1===t.length?t[0]:t)}:t}):[$S];var n=-1,e=(i=gP(i,$C(nU)),DG(e,function(t,e,r){return{criteria:gP(i,function(e){return e(t)}),index:++n,value:t}}));return gW(e,function(e,t){return xW(e,t,r)})}var kW,CW,SW,EW=x(()=>{fP(),J$(),aU(),IG(),fW(),jC(),wW(),BS(),oC(),mt(TW,"baseOrderBy"),kW=TW}),_W=x(()=>{Kq(),CW=Xq("length"),SW=CW});function AW(e){for(var t=PW.lastIndex=0;PW.test(e);)++t;return t}var RW,LW,NW,DW,IW,MW,OW,PW,$W,BW=x(()=>{RW="["+(DW="\\ud800-\\udfff")+"]",LW="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",NW="\\ud83c[\\udffb-\\udfff]",OW="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",MW="[\\ufe0e\\ufe0f]?",IW="(?:\\u200d(?:"+[DW="[^"+DW+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+MW+OW+")*",MW=MW+OW+IW,OW="(?:"+[DW+LW+"?",LW,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",RW].join("|")+")",PW=RegExp(NW+"(?="+NW+")|"+OW+MW,"g"),mt(AW,"unicodeSize"),$W=AW});function FW(e){return(CB(e)?$W:SW)(e)}var zW,qW=x(()=>{_W(),SB(),BW(),mt(FW,"stringSize"),zW=FW});function UW(r,e){return lW(r,e,function(e,t){return Gq(r,t)})}var GW,jW,WW,YW=x(()=>{cW(),jq(),mt(UW,"basePick"),GW=UW}),VW=x(()=>{YW(),vB(),jW=yB(function(e,t){return null==e?{}:GW(e,t)}),WW=jW});function HW(e,t,r,i){for(var n=-1,a=KW(XW((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}var XW,KW,ZW,QW=x(()=>{XW=Math.ceil,KW=Math.max,mt(HW,"baseRange"),ZW=HW});function JW(i){return function(e,t,r){return r&&"number"!=typeof r&&lE(e,t,r)&&(t=r=void 0),e=FP(e),void 0===t?(t=e,e=0):t=FP(t),r=void 0===r?e<t?1:-1:FP(r),ZW(e,t,r,i)}}var eY,tY,rY,iY=x(()=>{QW(),cE(),zP(),mt(JW,"createRange"),eY=JW}),nY=x(()=>{iY(),tY=eY(),rY=tY});function aY(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}var sY,oY=x(()=>{mt(aY,"baseReduce"),sY=aY});function lY(e,t,r){var i=nC(e)?_B:sY,n=arguments.length<3;return i(e,nU(t,4),r,n,fU)}var cY,hY=x(()=>{AB(),yU(),aU(),oY(),oC(),mt(lY,"reduce"),cY=lY});function uY(e,t){return(nC(e)?PB:dG)(e,rW(nU(t,3)))}var dY,pY=x(()=>{$B(),pG(),aU(),oC(),iW(),mt(uY,"reject"),dY=uY});function gY(e){var t;return null==e?0:dC(e)?oj(e)?zW(e):e.length:"[object Map]"==(t=EF(e))||"[object Set]"==t?e.size:x$(e).length}var fY,mY=x(()=>{w$(),NF(),pC(),lj(),qW(),mt(gY,"size"),fY=gY});function yY(e,i){var n;return fU(e,function(e,t,r){return!(n=i(e,t,r))}),!!n}var vY,bY=x(()=>{yU(),mt(yY,"baseSome"),vY=yY});function xY(e,t,r){var i=nC(e)?zz:vY;return r&&lE(e,t,r)&&(t=void 0),i(e,nU(t,3))}var wY,TY,kY,CY,SY,EY=x(()=>{qz(),aU(),bY(),oC(),cE(),mt(xY,"some"),wY=xY}),_Y=x(()=>{dB(),EW(),sE(),cE(),TY=aE(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&lE(e,t[0],t[1])?t=[]:2<r&&lE(t[0],t[1],t[2])&&(t=[t[0]]),kW(e,uB(t,1),[]))}),kY=TY}),AY=x(()=>{LF(),XP(),Jz(),CY=gF&&1/Qz(new gF([,-0]))[1]==1/0?function(e){return new gF(e)}:HP,SY=CY});function RY(e,t,r){var i=-1,n=d$,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=IU;else if(200<=a){var c=t?null:SY(e);if(c)return Qz(c);s=!1,n=Gz,l=new $z}else l=t?[]:o;e:for(;++i<a;){var h=e[i],u=t?t(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),o.push(h)}else n(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var LY,NY,DY,IY=x(()=>{Bz(),f$(),MU(),jz(),AY(),Jz(),mt(RY,"baseUniq"),LY=RY}),MY=x(()=>{dB(),sE(),IY(),mC(),NY=aE(function(e){return LY(uB(e,1,fC,!0))}),DY=NY});function OY(e){return e&&e.length?LY(e):[]}var PY,$Y=x(()=>{IY(),mt(OY,"uniq"),PY=OY});function BY(e,t){return e&&e.length?LY(e,nU(t,2)):[]}var FY,zY=x(()=>{aU(),IY(),mt(BY,"uniqBy"),FY=BY});function qY(e){var t=++UY;return G$(e)+t}var UY,GY,jY=x(()=>{j$(),UY=0,mt(qY,"uniqueId"),GY=qY});function WY(e,t,r){for(var i=-1,n=e.length,a=t.length,s={};++i<n;){var o=i<a?t[i]:void 0;r(s,e[i],o)}return s}var YY,VY=x(()=>{mt(WY,"baseZipObject"),YY=WY});function HY(e,t){return YY(e||[],t||[],JC)}var XY,KY=x(()=>{eS(),VY(),mt(HY,"zipObject"),XY=HY}),ZY=x(()=>{A$(),kz(),Ez(),Rz(),XS(),NU(),zU(),YU(),XU(),tG(),hG(),mG(),EG(),LG(),BG(),fB(),eG(),qG(),VG(),HG(),aj(),BS(),vj(),Tj(),oC(),_j(),PT(),NT(),Ij(),lj(),Pj(),_$(),GU(),OG(),Uj(),Hj(),fE(),Zj(),eW(),XP(),LU(),VW(),dW(),nY(),hY(),pY(),mY(),EY(),_Y(),MY(),$Y(),jY(),gj(),KY()});function QY(e,t){e[t]?e[t]++:e[t]=1}function JY(e,t){--e[t]||delete e[t]}function eV(e,t,r,i){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),t+""+r+""+(Oj(i)?"\0":i)}function tV(e,t,r,i){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),e={v:t,w:r},i&&(e.name=i),e}function rV(e,t){return eV(e,t.v,t.w,t.name)}var iV,nV,aV=x(()=>{ZY(),iV="\0",(nV=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=VS(void 0),this._defaultEdgeLabelFn=VS(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[iV]={}),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 IT(e)||(e=VS(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return k$(this._nodes)}sources(){var t=this;return fG(this.nodes(),function(e){return Ej(t._in[e])})}sinks(){var t=this;return fG(this.nodes(),function(e){return Ej(t._out[e])})}setNodes(e,t){var r=arguments,i=this;return v(e,function(e){1<r.length?i.setNode(e,t):i.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?1<arguments.length&&(this._nodes[e]=t):(this._nodes[e]=1<arguments.length?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=iV,this._children[e]={},this._children[iV][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){var t;return Object.prototype.hasOwnProperty.call(this._nodes,e)&&(t=mt(e=>this.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(k$(this._in[e]),t),delete this._in[e],delete this._preds[e],v(k$(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(Oj(t))t=iV;else{for(var r=t+="";!Oj(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&&(e=this._parent[e])!==iV)return e}children(e){var t;return Oj(e)&&(e=iV),this._isCompound?(t=this._children[e])?k$(t):void 0:e===iV?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return k$(e)}successors(e){if(e=this._sucs[e])return k$(e)}neighbors(e){var t=this.predecessors(e);if(t)return DY(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 IT(e)||(e=VS(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return pj(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return cY(e,function(e,t){return 1<n.length?i.setEdge(e,t,r):i.setEdge(e,t),t}),this}setEdge(){var e,t,r=!1,i=("object"==typeof(i=arguments[0])&&null!==i&&"v"in i?(n=i.v,a=i.w,e=i.name,2===arguments.length&&(t=arguments[1],r=!0)):(n=i,a=arguments[1],e=arguments[3],2<arguments.length&&(t=arguments[2],r=!0)),n=""+n,a=""+a,Oj(e)||(e=""+e),eV(this._isDirected,n,a,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i))r&&(this._edgeLabels[i]=t);else{if(!Oj(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(a),this._edgeLabels[i]=r?t:this._defaultEdgeLabelFn(n,a,e);var n=(r=tV(this._isDirected,n,a,e)).v,a=r.w;Object.freeze(r),this._edgeObjs[i]=r,QY(this._preds[a],n),QY(this._sucs[n],a),this._in[a][i]=r,this._out[n][i]=r,this._edgeCount++}return this}edge(e,t,r){return e=1===arguments.length?rV(this._isDirected,e):eV(this._isDirected,e,t,r),this._edgeLabels[e]}hasEdge(e,t,r){return e=1===arguments.length?rV(this._isDirected,e):eV(this._isDirected,e,t,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,r){var r=1===arguments.length?rV(this._isDirected,arguments[0]):eV(this._isDirected,e,t,r),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],JY(this._preds[t],e),JY(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){if(e=this._in[e])return e=pj(e),t?fG(e,function(e){return e.v===t}):e}outEdges(e,t){if(e=this._out[e])return e=pj(e),t?fG(e,function(e){return e.w===t}):e}nodeEdges(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}}).prototype._nodeCount=0,nV.prototype._edgeCount=0,mt(QY,"incrementOrInitEntry"),mt(JY,"decrementOrRemoveEntry"),mt(eV,"edgeArgsToId"),mt(tV,"edgeArgsToObj"),mt(rV,"edgeObjToId")}),sV=x(()=>{aV()});function oV(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function lV(e,t){if("_next"!==e&&"_prev"!==e)return t}var cV,hV=x(()=>{cV=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 oV(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&oV(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,lV)),r=r._prev;return"["+e.join(", ")+"]"}},mt(oV,"unlink"),mt(lV,"filterOutLinks")});function uV(t,e){return t.nodeCount()<=1?[]:(e=dV((e=gV(t,e||mV)).graph,e.buckets,e.zeroIdx),gB(b(e,function(e){return t.outEdges(e.v,e.w)})))}function dV(e,t,r){for(var i,n=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)pV(e,t,r,i);for(;i=a.dequeue();)pV(e,t,r,i);if(e.nodeCount())for(var o=t.length-2;0<o;--o)if(i=t[o].dequeue()){n=n.concat(pV(e,t,r,i,!0));break}}return n}function pV(i,n,a,e,s){var o=s?[]:void 0;return v(i.inEdges(e.v),function(e){var t=i.edge(e),r=i.node(e.v);s&&o.push({v:e.v,w:e.w}),r.out-=t,fV(n,a,r)}),v(i.outEdges(e.v),function(e){var t=i.edge(e),e=e.w;(e=i.node(e)).in-=t,fV(n,a,e)}),i.removeNode(e.v),o}function gV(e,i){var n=new nV,a=0,s=0,t=(v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var t=n.edge(e.v,e.w)||0,r=i(e);n.setEdge(e.v,e.w,t+r),s=Math.max(s,n.node(e.v).out+=r),a=Math.max(a,n.node(e.w).in+=r)}),rY(s+a+3).map(function(){return new cV})),r=a+1;return v(n.nodes(),function(e){fV(t,r,n.node(e))}),{graph:n,buckets:t,zeroIdx:r}}function fV(e,t,r){(r.out?r.in?e[r.out-r.in+t]:e[e.length-1]:e[0]).enqueue(r)}var mV,yV=x(()=>{ZY(),sV(),hV(),mV=VS(1),mt(uV,"greedyFAS"),mt(dV,"doGreedyFAS"),mt(pV,"removeNode"),mt(gV,"buildState"),mt(fV,"assignBucket")});function vV(r){var e="greedy"===r.graph().acyclicer?uV(r,t(r)):bV(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,GY("rev"))}),mt(t,"weightFn")}function bV(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 xV(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 wV=x(()=>{ZY(),yV(),mt(vV,"run"),mt(bV,"dfsFAS"),mt(xV,"undo")});function TV(e,t,r,i){for(var n;n=GY(i),e.hasNode(n););return r.dummy=t,e.setNode(n,r),n}function kV(i){var n=(new nV).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 CV(t){var r=new nV({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 SV(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 EV(i){var n=b(rY(LV(i)+1),function(){return[]});return v(i.nodes(),function(e){var t=i.node(e),r=t.rank;Oj(r)||(n[r][t.order]=e)}),n}function _V(t){var r=Kj(b(t.nodes(),function(e){return t.node(e).rank}));v(t.nodes(),function(e){e=t.node(e),nj(e,"rank")&&(e.rank-=r)})}function AV(r){var i=Kj(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){Oj(e)&&t%s!=0?--a:a&&v(e,function(e){r.node(e).rank+=a})})}function RV(e,t,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),TV(e,"border",n,t)}function LV(t){return Vj(b(t.nodes(),function(e){if(e=t.node(e).rank,!Oj(e))return e}))}function NV(e,t){var r={lhs:[],rhs:[]};return v(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function DV(e,t){var r=CU();try{return t()}finally{console.log(e+" time: "+(CU()-r)+"ms")}}function IV(e,t){return t()}var MV=x(()=>{ZY(),sV(),mt(TV,"addDummyNode"),mt(kV,"simplify"),mt(CV,"asNonCompoundGraph"),mt(SV,"intersectRect"),mt(EV,"buildLayerMatrix"),mt(_V,"normalizeRanks"),mt(AV,"removeEmptyRanks"),mt(RV,"addBorderNode"),mt(LV,"maxRank"),mt(NV,"partition"),mt(DV,"time"),mt(IV,"notime")});function OV(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<n;++i)PV(a,"borderLeft","_bl",e,r,i),PV(a,"borderRight","_br",e,r,i)}}mt(s,"dfs"),v(a.children(),s)}function PV(e,t,r,i,n,a){var s=n[t][a-1],r=TV(e,"border",{width:0,height:0,rank:a,borderType:t},r);n[t][a]=r,e.setParent(r,i),s&&e.setEdge(s,r,{weight:1})}var $V=x(()=>{ZY(),MV(),mt(OV,"addBorderSegments"),mt(PV,"addBorderNode")});function BV(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||zV(e)}function FV(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||UV(e),"lr"!==t&&"rl"!==t||(jV(e),zV(e))}function zV(t){v(t.nodes(),function(e){qV(t.node(e))}),v(t.edges(),function(e){qV(t.edge(e))})}function qV(e){var t=e.width;e.width=e.height,e.height=t}function UV(t){v(t.nodes(),function(e){GV(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,GV),Object.prototype.hasOwnProperty.call(e,"y")&&GV(e)})}function GV(e){e.y=-e.y}function jV(t){v(t.nodes(),function(e){WV(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,WV),Object.prototype.hasOwnProperty.call(e,"x")&&WV(e)})}function WV(e){var t=e.x;e.x=e.y,e.y=t}var YV=x(()=>{ZY(),mt(BV,"adjust"),mt(FV,"undo"),mt(zV,"swapWidthHeight"),mt(qV,"swapWidthHeightOne"),mt(UV,"reverseY"),mt(GV,"reverseYOne"),mt(jV,"swapXY"),mt(WV,"swapXYOne")});function VV(t){t.graph().dummyChains=[],v(t.edges(),function(e){HV(t,e)})}function HV(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<a;++u,++i)o.points=[],c=TV(e,"edge",h={width:0,height:0,edgeLabel:o,edgeObj:t,rank:i},"_d"),i===l&&(h.width=o.width,h.height=o.height,h.dummy="edge-label",h.labelpos=o.labelpos),e.setEdge(r,c,{weight:o.weight},s),0===u&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,n,{weight:o.weight},s)}}function XV(n){v(n.graph().dummyChains,function(e){var t,r=n.node(e),i=r.edgeLabel;for(n.setEdge(r.edgeObj,i);r.dummy;)t=n.successors(e)[0],n.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),r=n.node(e=t)})}var KV=x(()=>{ZY(),MV(),mt(VV,"run"),mt(HV,"normalizeEdge"),mt(XV,"undo")});function ZV(r){var i={};function n(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(i,e)?t.rank:(i[e]=!0,(e=Kj(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 QV(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var JV=x(()=>{ZY(),mt(ZV,"longestPath"),mt(QV,"slack")});function eH(e){var t,r=new nV({directed:!1}),i=e.nodes()[0],n=e.nodeCount();for(r.setNode(i,{});tH(r,e)<n;)t=rH(r,e),t=r.hasNode(t.v)?QV(e,t):-QV(e,t),iH(r,e,t);return r}function tH(i,n){function a(r){v(n.nodeEdges(r),function(e){var t=e.v,t=r===t?e.w:t;i.hasNode(t)||QV(n,e)||(i.setNode(t,{}),i.setEdge(r,t,{}),a(t))})}return mt(a,"dfs"),v(i.nodes(),a),i.nodeCount()}function rH(t,r){return Jj(r.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return QV(r,e)})}function iH(e,t,r){v(e.nodes(),function(e){t.node(e).rank+=r})}var nH=x(()=>{ZY(),sV(),JV(),mt(eH,"feasibleTree"),mt(tH,"tightTree"),mt(rH,"findMinSlackEdge"),mt(iH,"shiftRanks")}),aH=x(()=>{}),sH=x(()=>{}),oH=x(()=>{ZY(),sH(),VS(1)}),lH=x(()=>{oH()}),cH=x(()=>{}),hH=x(()=>{cH()}),uH=x(()=>{ZY(),VS(1)});function dH(t){var r={},i={},n=[];function a(e){if(Object.prototype.hasOwnProperty.call(i,e))throw new pH;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),fY(r)!==t.nodeCount())throw new pH;return n}function pH(){}var gH=x(()=>{ZY(),dH.CycleException=pH,mt(dH,"topsort"),mt(pH,"CycleException"),pH.prototype=new Error}),fH=x(()=>{gH()});function mH(t,e,r){nC(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);yH(t,e,"post"===r,a,i,n)}),n}function yH(t,e,r,i,n,a){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r||a.push(e),v(n(e),function(e){yH(t,e,r,i,n,a)}),r&&a.push(e))}var vH=x(()=>{ZY(),mt(mH,"dfs"),mt(yH,"doDfs")});function bH(e,t){return mH(e,t,"post")}var xH=x(()=>{vH(),mt(bH,"postorder")});function wH(e,t){return mH(e,t,"pre")}var TH=x(()=>{vH(),mt(wH,"preorder")}),kH=x(()=>{sH(),aV()}),CH=x(()=>{aH(),oH(),lH(),hH(),uH(),fH(),xH(),TH(),kH(),cH(),gH()});function SH(e){ZV(e=kV(e));var t,r=eH(e);for(RH(r),EH(r,e);t=NH(r);)IH(r,e,t,DH(r,e,t))}function EH(t,r){var e=(e=bH(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=AH(e,t,r)}function AH(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,OH(i,a,r))&&(e=i.edge(a,r).cutvalue,l+=t?-e:e)}),l}function RH(e,t){arguments.length<2&&(t=e.nodes()[0]),LH(e,{},1,t)}function LH(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=LH(t,r,i,e,n))}),s.low=a,s.lim=i++,e?s.parent=e:delete s.parent,i}function NH(t){return CG(t.edges(),function(e){return t.edge(e).cutvalue<0})}function DH(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),fG(r.edges(),function(e){return s===PH(0,t.node(e.v),a)&&s!==PH(0,t.node(e.w),a)}));return Jj(n,function(e){return QV(r,e)})}function IH(e,t,r,i){var n=r.v;e.removeEdge(n,r.w),e.setEdge(i.v,i.w,{}),RH(e),EH(e,t),MH(e,t)}function MH(n,a){var e=CG(n.nodes(),function(e){return!a.node(e).parent}),e=(e=wH(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 OH(e,t,r){return e.hasEdge(t,r)}function PH(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var $H=x(()=>{ZY(),CH(),MV(),nH(),JV(),SH.initLowLimValues=RH,SH.initCutValues=EH,SH.calcCutValue=AH,SH.leaveEdge=NH,SH.enterEdge=DH,SH.exchangeEdges=IH,mt(SH,"networkSimplex"),mt(EH,"initCutValues"),mt(_H,"assignCutValue"),mt(AH,"calcCutValue"),mt(RH,"initLowLimValues"),mt(LH,"dfsAssignLowLim"),mt(NH,"leaveEdge"),mt(DH,"enterEdge"),mt(IH,"exchangeEdges"),mt(MH,"updateRanks"),mt(OH,"isTreeEdge"),mt(PH,"isDescendant")});function BH(e){switch(e.graph().ranker){case"network-simplex":zH(e);break;case"tight-tree":FH(e);break;case"longest-path":qH(e);break;default:zH(e)}}function FH(e){ZV(e),eH(e)}function zH(e){SH(e)}var qH,UH=x(()=>{nH(),$H(),JV(),mt(BH,"rank"),qH=ZV,mt(FH,"tightTreeRanker"),mt(zH,"networkSimplexRanker")});function GH(t){var r=TV(t,"root",{},"_root"),i=WH(t),n=Vj(pj(i))-1,a=2*n+1,s=(t.graph().nestingRoot=r,v(t.edges(),function(e){t.edge(e).minlen*=a}),YH(t)+1);v(t.children(),function(e){jH(t,r,a,s,n,i,e)}),t.graph().nodeRankFactor=a}function jH(n,a,s,o,l,c,h){var u,d,e,t=n.children(h);t.length?(u=RV(n,"_bt"),d=RV(n,"_bb"),e=n.node(h),n.setParent(u,h),e.borderTop=u,n.setParent(d,h),e.borderBottom=d,v(t,function(e){jH(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 WH(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 YH(r){return cY(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function VH(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 HH=x(()=>{ZY(),MV(),mt(GH,"run"),mt(jH,"dfs"),mt(WH,"treeDepths"),mt(YH,"sumWeights"),mt(VH,"cleanup")});function XH(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 KH=x(()=>{ZY(),mt(XH,"addSubgraphConstraints")});function ZH(n,r,a){var s=QH(n),o=new nV({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=Oj(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 QH(e){for(var t;e.hasNode(t=GY("_root")););return t}var JH=x(()=>{ZY(),sV(),mt(ZH,"buildLayerGraph"),mt(QH,"createRootNode")});function eX(e,t){for(var r=0,i=1;i<t.length;++i)r+=tX(e,t[i-1],t[i]);return r}function tX(t,e,r){for(var i=XY(r,b(r,function(e,t){return t})),e=gB(b(e,function(e){return kY(b(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),"pos")})),n=1;n<r.length;)n<<=1;var a=2*n-1,s=(--n,b(new Array(a),function(){return 0})),o=0;return v(e.forEach(function(e){var t=e.pos+n;s[t]+=e.weight;for(var r=0;0<t;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;o+=e.weight*r})),o}var rX=x(()=>{ZY(),mt(eX,"crossCount"),mt(tX,"twoLayerCrossCount")});function iX(r){var i={},e=fG(r.nodes(),function(e){return!r.children(e).length}),t=Vj(b(e,function(e){return r.node(e).rank})),n=b(rY(t+1),function(){return[]});function a(e){var t;nj(i,e)||(i[e]=!0,t=r.node(e),n[t.rank].push(e),v(r.successors(e),a))}return mt(a,"dfs"),t=kY(e,function(e){return r.node(e).rank}),v(t,a),n}var nX=x(()=>{ZY(),mt(iX,"initOrder")});function aX(i,e){return b(e,function(e){var t=i.inEdges(e);return t.length?{v:e,barycenter:(t=cY(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 sX=x(()=>{ZY(),mt(aX,"barycenter")});function oX(e,t){var i={};return v(e,function(e,t){t=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},Oj(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(t.edges(),function(e){var t=i[e.v],r=i[e.w];Oj(t)||Oj(r)||(r.indegree++,t.out.push(i[e.w]))}),lX(fG(i,function(e){return!e.indegree}))}function lX(r){var e=[];function t(t){return function(e){e.merged||(Oj(e.barycenter)||Oj(t.barycenter)||e.barycenter>=t.barycenter)&&cX(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(fG(e,function(e){return!e.merged}),function(e){return WW(e,["vs","i","barycenter","weight"])})}function cX(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 hX=x(()=>{ZY(),mt(oX,"resolveConflicts"),mt(lX,"doResolveConflicts"),mt(cX,"mergeEntries")});function uX(e,t){var r=(e=NV(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,i=kY(e.rhs,function(e){return-e.i}),n=[],a=0,s=0,o=0,e=(r.sort(pX(!!t)),o=dX(n,i,o),v(r,function(e){o+=e.vs.length,n.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=dX(n,i,o)}),{vs:gB(n)});return s&&(e.barycenter=a/s,e.weight=s),e}function dX(e,t,r){for(var i;t.length&&(i=UU(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function pX(r){return function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i}}var gX=x(()=>{ZY(),MV(),mt(uX,"sort"),mt(dX,"consumeUnsortable"),mt(pX,"compareWithBias")});function fX(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=fG(a,function(e){return e!==s&&e!==o})),aX(r,a));return v(e,function(e){var t;r.children(e.v).length&&(t=fX(r,e.v,i,n),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&yX(e,t)}),mX(a=oX(e,i),l),e=uX(a,n),s&&(e.vs=gB([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 mX(e,t){v(e,function(e){e.vs=gB(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function yX(e,t){Oj(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 vX=x(()=>{ZY(),sX(),hX(),gX(),mt(fX,"sortSubgraph"),mt(mX,"expandSubgraphs"),mt(yX,"mergeBarycenters")});function bX(e){var t=LV(e),r=xX(e,rY(1,t+1),"inEdges"),i=xX(e,rY(t-1,-1,-1),"outEdges");TX(e,iX(e));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){wX(s%2?r:i,2<=s%4);var l,c=eX(e,l=EV(e));c<a&&(o=0,n=Sz(l),a=c)}TX(e,n)}function xX(t,e,r){return b(e,function(e){return ZH(t,e,r)})}function wX(e,t){var i=new nV;v(e,function(r){var e=r.graph().root,e=fX(r,e,i,t);v(e.vs,function(e,t){r.node(e).order=t}),XH(r,i,e.vs)})}function TX(r,e){v(e,function(e){v(e,function(e,t){r.node(e).order=t})})}var kX=x(()=>{ZY(),sV(),MV(),KH(),JH(),rX(),nX(),vX(),mt(bX,"order"),mt(xX,"buildLayerGraphs"),mt(wX,"sweepLayerGraphs"),mt(TX,"assignOrder")});function CX(c){var h=EX(c);v(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,i=SX(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).maxRank<t.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<n.length-1&&c.node(o=n[s+1]).minRank<=t.rank;)s++;o=n[s]}c.setParent(e,o),e=c.successors(e)[0]}})}function SX(e,t,r,i){for(var n,a=[],s=[],o=Math.min(t[r].low,t[i].low),l=Math.max(t[r].lim,t[i].lim),c=r;c=e.parent(c),a.push(c),c&&(t[c].low>o||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 EX(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=x(()=>{ZY(),mt(CX,"parentDummyChains"),mt(SX,"findPath"),mt(EX,"postorder")});function AX(c,e){var h={};function t(e,i){var a=0,s=0,o=e.length,l=UU(i);return v(i,function(e,t){var r=LX(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;!(r<a||n<r)||t.dummy&&c.node(i).dummy||NX(h,e,i)})}),s=t+1,a=n)}),i}return mt(t,"visitLayer"),cY(e,t),h}function RX(o,e){var s={};function l(t,e,r,i,n){var a;v(rY(e,r),function(e){a=t[e],o.node(a).dummy&&v(o.predecessors(a),function(e){var t=o.node(e);t.dummy&&(t.order<i||t.order>n)&&NX(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"),cY(e,t),s}function LX(t,e){if(t.node(e).dummy)return CG(t.predecessors(e),function(e){return t.node(e).dummy})}function NX(e,t,r){r<t&&(i=t,t=r,r=i),Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function DX(e,t,r){var i;return r<t&&(i=t,t=r,r=i),!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function IX(e,t,o,l){var c={},h={},u={};return v(t,function(e){v(e,function(e,t){u[h[c[e]=e]=e]=t})}),v(t,function(e){var s=-1;v(e,function(e){var t=l(e);if(t.length)for(var r=((t=kY(t,function(e){return u[e]})).length-1)/2,i=Math.floor(r),n=Math.ceil(r);i<=n;++i){var a=t[i];h[e]===e&&s<u[a]&&!DX(o,e,a)&&(h[a]=e,h[e]=c[e]=c[a],s=u[a])}})}),{root:c,align:h}}function MX(i,e,t,r,n){var a={},s=OX(i,e,t,n),o=n?"borderLeft":"borderRight";function l(e,t){for(var r=s.nodes(),i=r.pop(),n={};i;)n[i]?e(i):(n[i]=!0,r.push(i),r=r.concat(t(i))),i=r.pop()}function c(e){a[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+s.edge(t))},0)}function h(e){var t=s.outEdges(e).reduce(function(e,t){return Math.min(e,a[t.w]-s.edge(t))},Number.POSITIVE_INFINITY),r=i.node(e);t!==Number.POSITIVE_INFINITY&&r.borderType!==o&&(a[e]=Math.max(a[e],t))}return mt(l,"iterate"),mt(c,"pass1"),mt(h,"pass2"),l(c,s.predecessors.bind(s)),l(h,s.successors.bind(s)),v(r,function(e){a[e]=a[t[e]]}),a}function OX(a,e,s,t){var o=new nV,r=a.graph(),l=zX(r.nodesep,r.edgesep,t);return v(e,function(e){var n;v(e,function(e){var t,r,i=s[e];o.setNode(i),n&&(t=s[n],r=o.edge(t,i),o.setEdge(t,i,Math.max(l(a,e,n),r||0))),n=e})}),o}function PX(n,e){return Jj(pj(e),function(e){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return zG(e,function(e,t){t=qX(n,t)/2,r=Math.max(e+t,r),i=Math.min(e-t,i)}),r-i})}function $X(s,o){var e=pj(o),l=Kj(e),c=Vj(e);v(["u","d"],function(a){v(["l","r"],function(e){var t,r,i=a+e,n=s[i];n!==o&&(t=pj(n),r="l"===e?l-Kj(t):c-Vj(t))&&(s[i]=qj(n,function(e){return e+r}))})})}function BX(r,i){return qj(r.ul,function(e,t){return i?r[i.toLowerCase()][t]:((t=kY(b(r,t)))[1]+t[2])/2})}function FX(i){var n,e=EV(i),a=pE(AX(i,e),RX(i,e)),s={},t=(v(["u","d"],function(r){n="u"===r?e:pj(e).reverse(),v(["l","r"],function(e){"r"===e&&(n=b(n,function(e){return pj(e).reverse()}));var t=("u"===r?i.predecessors:i.successors).bind(i),t=IX(0,n,a,t),t=MX(i,n,t.root,t.align,"r"===e);"r"===e&&(t=qj(t,function(e){return-e})),s[r+e]=t})}),PX(i,s));return $X(s,t),BX(s,i.graph().align)}function zX(s,o,l){return function(e,t,r){var i,n=e.node(t),a=e.node(r),t=0;if(t+=n.width/2,Object.prototype.hasOwnProperty.call(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":i=-n.width/2;break;case"r":i=n.width/2}if(i&&(t+=l?i:-i),i=0,t=(t=(t+=(n.dummy?o:s)/2)+(a.dummy?o:s)/2)+a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":i=a.width/2;break;case"r":i=-a.width/2}return i&&(t+=l?i:-i),i=0,t}}function qX(e,t){return e.node(t).width}var UX=x(()=>{ZY(),sV(),MV(),mt(AX,"findType1Conflicts"),mt(RX,"findType2Conflicts"),mt(LX,"findOtherInnerSegmentNode"),mt(NX,"addConflict"),mt(DX,"hasConflict"),mt(IX,"verticalAlignment"),mt(MX,"horizontalCompaction"),mt(OX,"buildBlockGraph"),mt(PX,"findSmallestWidthAlignment"),mt($X,"alignCoordinates"),mt(BX,"balance"),mt(FX,"positionX"),mt(zX,"sep"),mt(qX,"width")});function GX(r){jX(r=CV(r)),GG(FX(r),function(e,t){r.node(t).x=e})}function jX(r){var e=EV(r),i=r.graph().ranksep,n=0;v(e,function(e){var t=Vj(b(e,function(e){return r.node(e).height}));v(e,function(e){r.node(e).y=n+t/2}),n+=t+i})}var WX=x(()=>{ZY(),MV(),UX(),mt(GX,"position"),mt(jX,"positionY")});function YX(t,e){var r=e&&e.debugTiming?DV:IV;r("layout",()=>{var e=r(" buildLayoutGraph",()=>XX(t));r(" runLayout",()=>VX(e,r)),r(" updateInputGraph",()=>HX(t,e))})}function VX(e,t){t(" makeSpaceForEdgeLabels",()=>KX(e)),t(" removeSelfEdges",()=>aK(e)),t(" acyclic",()=>vV(e)),t(" nestingGraph.run",()=>GH(e)),t(" rank",()=>BH(CV(e))),t(" injectEdgeLabelProxies",()=>ZX(e)),t(" removeEmptyRanks",()=>AV(e)),t(" nestingGraph.cleanup",()=>VH(e)),t(" normalizeRanks",()=>_V(e)),t(" assignRankMinMax",()=>QX(e)),t(" removeEdgeLabelProxies",()=>JX(e)),t(" normalize.run",()=>VV(e)),t(" parentDummyChains",()=>CX(e)),t(" addBorderSegments",()=>OV(e)),t(" order",()=>bX(e)),t(" insertSelfEdges",()=>sK(e)),t(" adjustCoordinateSystem",()=>BV(e)),t(" position",()=>GX(e)),t(" positionSelfEdges",()=>oK(e)),t(" removeBorderNodes",()=>nK(e)),t(" normalize.undo",()=>XV(e)),t(" fixupEdgeLabelCoords",()=>rK(e)),t(" undoCoordinateSystem",()=>FV(e)),t(" translateGraph",()=>eK(e)),t(" assignNodeIntersects",()=>tK(e)),t(" reversePoints",()=>iK(e)),t(" acyclic.undo",()=>xV(e))}function HX(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 XX(r){var i=new nV({multigraph:!0,compound:!0}),e=cK(r.graph());return i.setGraph(pE({},uK,lK(e,hK),WW(e,dK))),v(r.nodes(),function(e){var t=cK(r.node(e));i.setNode(e,AU(lK(t,pK),gK)),i.setParent(e,r.parent(e))}),v(r.edges(),function(e){var t=cK(r.edge(e));i.setEdge(e,pE({},mK,lK(t,fK),WW(t,yK)))}),i}function KX(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 ZX(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},TV(r,"edge-proxy",t,"_ep"))})}function QX(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=Vj(r,e.maxRank))}),t.graph().maxRank=r}function JX(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 eK(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 tK(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(SV(i,t)),r.points.push(SV(e,n))})}function rK(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 iK(t){v(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function nK(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(UU(e.borderLeft)),n=a.node(UU(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 aK(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 sK(n){var e=EV(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){TV(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 oK(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 lK(e,t){return qj(WW(e,t),Number)}function cK(e){var r={};return v(e,function(e,t){r[t.toLowerCase()]=e}),r}var hK,uK,dK,pK,gK,fK,mK,yK,vK=x(()=>{ZY(),sV(),$V(),YV(),wV(),KV(),UH(),HH(),kX(),_X(),WX(),MV(),mt(YX,"layout"),mt(VX,"runLayout"),mt(HX,"updateInputGraph"),hK=["nodesep","edgesep","ranksep","marginx","marginy"],uK={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},dK=["acyclicer","ranker","rankdir","align"],pK=["width","height"],gK={width:0,height:0},fK=["minlen","weight","width","height","labeloffset"],mK={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},yK=["labelpos"],mt(XX,"buildLayoutGraph"),mt(KX,"makeSpaceForEdgeLabels"),mt(ZX,"injectEdgeLabelProxies"),mt(QX,"assignRankMinMax"),mt(JX,"removeEdgeLabelProxies"),mt(eK,"translateGraph"),mt(tK,"assignNodeIntersects"),mt(rK,"fixupEdgeLabelCoords"),mt(iK,"reversePointsForReversedEdges"),mt(nK,"removeBorderNodes"),mt(aK,"removeSelfEdges"),mt(sK,"insertSelfEdges"),mt(oK,"positionSelfEdges"),mt(lK,"selectNumberAttrs"),mt(cK,"canonicalize")}),bK=x(()=>{wV(),vK(),KV(),UH()});function xK(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:wK(e),edges:TK(e)};return Oj(e.graph())||(t.value=Tz(e.graph())),t}function wK(i){return b(i.nodes(),function(e){var t=i.node(e),r=i.parent(e),e={v:e};return Oj(t)||(e.value=t),Oj(r)||(e.parent=r),e})}function TK(i){return b(i.edges(),function(e){var t=i.edge(e),r={v:e.v,w:e.w};return Oj(e.name)||(r.name=e.name),Oj(t)||(r.value=t),r})}var kK,CK,SK,EK,_K,AK,RK,LK,NK,DK,IK,MK,OK,PK,$K,BK=x(()=>{ZY(),aV(),mt(xK,"write"),mt(wK,"writeNodes"),mt(TK,"writeEdges")}),FK=x(()=>{e(),sV(),BK(),kK=new Map,CK=new Map,SK=new Map,EK=mt(()=>{CK.clear(),SK.clear(),kK.clear()},"clear"),_K=mt((e,t)=>{var r=CK.get(t)||[];return M.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),AK=mt((e,t)=>{var r=CK.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"),RK=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<i.children(e).length?RK(e,i,n,a):(t=i.node(e),M.info("cp ",e," to ",a," with parent ",r),n.setNode(e,t),a!==i.parent(e)&&(M.warn("Setting parent",e,i.parent(e)),n.setParent(e,i.parent(e))),r!==a&&e!==r?(M.debug("Setting parent",e,r),n.setParent(e,r)):(M.info("In copy ",r,"root",a,"data",i.node(r),a),M.debug("Not Setting parent for node=",e,"cluster!==rootId",r!==a,"node!==clusterId",e!==r)),t=i.edges(e),M.debug("Copying Edges",t),t.forEach(e=>{M.info("Edge",e);var t=i.edge(e.v,e.w,e.name);M.info("Edge data",t,a);try{AK(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"),LK=mt((e,t)=>{let r=t.children(e),i=[...r];for(var n of r)SK.set(n,e),i=[...i,...LK(n,t)];return i},"extractDescendants"),NK=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"),DK=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=DK(i,t,r),o=NK(t,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),IK=mt(e=>kK.has(e)&&kK.get(e).externalConnections&&kK.has(e)?kK.get(e).id:e,"getAnchorId"),MK=mt((a,e)=>{if(!a||10<e)M.debug("Opting out, no graph ");else{M.debug("Opting in, graph "),a.nodes().forEach(function(e){0<a.children(e).length&&(M.warn("Cluster identified",e," Replacement id in edges: ",DK(e,a,e)),CK.set(e,LK(e,a)),kK.set(e,{id:DK(e,a,e),clusterData:a.node(e)}))}),a.nodes().forEach(function(t){var e=a.children(t),r=a.edges();0<e.length?(M.debug("Cluster identified",t,CK),r.forEach(e=>{_K(e.v,t)^_K(e.w,t)&&(M.warn("Edge: ",e," leaves cluster ",t),M.warn("Descendants of XXX ",t,": ",CK.get(t)),kK.get(t).externalConnections=!0)})):M.debug("Not a cluster ",t,CK)});for(var t of kK.keys()){var r=kK.get(t).id;(r=a.parent(r))!==t&&kK.has(r)&&!kK.get(r).externalConnections&&(kK.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",kK,"ids:",e.v,e.w,"Translating: ",kK.get(e.v)," --- ",kK.get(e.w)),(kK.get(e.v)||kK.get(e.w))&&(M.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=IK(e.v),r=IK(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(i=a.parent(t),kK.get(i).externalConnections=!0,n.fromCluster=e.v),r!==e.w&&(i=a.parent(r),kK.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",xK(a)),OK(a,0),M.trace(kK)}},"adjustClustersAndEdges"),OK=mt((r,i)=>{if(M.warn("extractor - ",i,xK(r),r.children("D")),10<i)M.error("Bailing out");else{let e=r.nodes(),t=!1;for(var n of e)n=r.children(n),t=t||0<n.length;if(t){M.debug("Nodes = ",e,i);for(var a of e)if(M.debug("Extracting node",a,kK,kK.has(a)&&!kK.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",i),kK.has(a))if(!kK.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){M.warn("Cluster without external connections, without a parent and with children",a,i);let e="TB"===r.graph().rankdir?"LR":"TB";kK.get(a)?.clusterData?.dir&&(e=kK.get(a).clusterData.dir,M.warn("Fixing dir",kK.get(a).clusterData.dir,e));var s=new nV({multigraph:!0,compound:!0}).setGraph({rankdir:e,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M.warn("Old graph before copy",xK(r)),RK(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:kK.get(a).clusterData,label:kK.get(a).label,graph:s}),M.warn("New graph after copy node: (",a,")",xK(s)),M.debug("Old graph after copy",xK(r))}else M.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!kK.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),i),M.debug(kK);else M.debug("Not a cluster",a,i);e=r.nodes(),M.warn("New list of nodes",e);for(var o of e){var l=r.node(o);M.warn(" Now next level",o,l),l?.clusterNode&&OK(l.graph,i+1)}}else M.debug("Done, no node has children",r.nodes())}},"extractor"),PK=mt((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=PK(t,e),r=[...r,...e]}),r},"sorter"),$K=mt(e=>PK(e,e.children()),"sortNodesByHierarchy")}),zK={};dqe(zK,{render:()=>UK});var qK,UK,GK=x(()=>{bK(),BK(),sV(),tP(),n(),FK(),lP(),oO(),eP(),e(),sO(),Cu(),qK=mt(async(e,n,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",xK(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<n.edges().length&&M.info("Recursive edges",n.edge(n.edges()[0])),e.insert("g").attr("class","clusters")),h=e.insert("g").attr("class","edgePaths"),r=e.insert("g").attr("class","edgeLabels"),u=e.insert("g").attr("class","nodes"),d=(await Promise.all(n.nodes().map(async function(e){var t,r,i=n.node(e);void 0!==o&&(t=JSON.parse(JSON.stringify(o.clusterData)),M.trace(`Setting data for parent cluster XXX
|
||
Node.id = `,e,`
|
||
data=`,t.height,`
|
||
Parent cluster`,o.height),n.setNode(o.id,t),n.parent(e)||(M.trace("Setting parent",e,o.id),n.setParent(e,o.id,t))),M.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i?.clusterNode?(M.info("Cluster identified XBX",e,i.width,n.node(e)),{ranksep:t,nodesep:r}=n.graph(),i.graph.setGraph({...i.graph.graph(),ranksep:t+25,nodesep:r}),r=(t=await qK(u,i.graph,a,s,n.node(e),l)).elem,sL(i,r),i.diff=t.diff||0,M.info("New compound node after recursive render XAX",e,"width",i.width,"height",i.height),nP(r,i)):0<n.children(e).length?(M.trace("Cluster - the non recursive path XBX",e,i.id,i,i.width,"Graph:",n),M.trace(DK(i.id,n)),kK.set(i.id,{id:DK(i.id,n),node:i})):(M.trace("Node - the non recursive path XAX",e,u,n.node(e),c),await rP(u,n.node(e),{config:l,dir:c}))})),await mt(async()=>{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",kK,"ids:",e.v,e.w,"Translating: ",kK.get(e.v),kK.get(e.w)),await _O(r,t)});await Promise.all(e)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(xK(n))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),YX(n),M.info("Graph after layout:",JSON.stringify(xK(n))),0),p=VM(l).subGraphTitleTotalMargin;return await Promise.all($K(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)),kK.get(r.id).node=r,sP(r)):0<n.children(e).length?(M.info("A pure cluster node XBX1",e,r.id,r.x,r.y,r.width,r.height,n.parent(e)),r.height+=p,n.node(r.parentId),e=r?.padding/2||0,t=r?.labelBBox?.height||0,M.debug("OffsetY",t-e||0,"labelHeight",t,"halfPadding",e),await tO(i,r),kK.get(r.id).node=r):(t=n.node(r.parentId),r.y+=p/2,M.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",t,t?.offsetY,r),sP(r))})),n.edges().forEach(function(e){var t=n.edge(e),r=(M.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),n.node(e.v)),e=n.node(e.w),r=OO(h,t,kK,a,r,e,s);AO(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"),UK=mt(async(e,t)=>{let l=new nV({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");JO(r,e.markers,e.type,e.diagramId),aP(),SO(),rO(),EK(),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+"-cyc<lic-special-2")):l.setEdge(e.start,e.end,{...e},e.id)}),M.warn("Graph at first:",JSON.stringify(xK(l))),MK(l),M.warn("Graph after XAX:",JSON.stringify(xK(l))),t=O(),await qK(r,l,e.type,e.diagramId,void 0,t)},"render")});function jK(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function WK(e){if(Array.isArray(e))return e}function YK(e){if(Array.isArray(e))return jK(e)}function VK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HK(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,aZ(i.key),i)}}function XK(e,t,r){return t&&HK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KK(e,t){var r,i,n,a,s=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(s)return n=!(i=!0),{s:mt(function(){s=s.call(e)},"s"),n:mt(function(){var e=s.next();return i=e.done,e},"n"),e:mt(function(e){n=!0,r=e},"e"),f:mt(function(){try{i||null==s.return||s.return()}finally{if(n)throw r}},"f")};if(Array.isArray(e)||(s=oZ(e))||t)return s&&(e=s),a=0,{s:t=mt(function(){},"F"),n:mt(function(){return a>=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 ZK(e,t,r){return(t=aZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QK(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function JK(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 eZ(){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 tZ(){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 rZ(e,t){return WK(e)||JK(e,t)||oZ(e,t)||eZ()}function iZ(e){return YK(e)||QK(e)||oZ(e)||tZ()}function nZ(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 aZ(e){return"symbol"==typeof(e=nZ(e,"string"))?e:e+""}function sZ(e){return(sZ="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 oZ(e,t){var r;if(e)return"string"==typeof e?jK(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)?jK(e,t):void 0}function lZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cZ(){return ote||(ote=1,mt(e,"isObject"),ste=e),ste;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function hZ(){var e;return cte||(cte=1,e="object"==typeof ate&&ate&&ate.Object===Object&&ate,lte=e),lte}function uZ(){var e,t;return ute||(ute=1,t=hZ(),e="object"==typeof self&&self&&self.Object===Object&&self,t=t||e||Function("return this")(),hte=t),hte}function dZ(){var e,t;return pte||(pte=1,e=uZ(),t=mt(function(){return e.Date.now()},"now"),dte=t),dte}function pZ(){var r;return fte||(fte=1,r=/\s/,mt(e,"trimmedEndIndex"),gte=e),gte;function e(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}function gZ(){var t,r;return yte||(yte=1,t=pZ(),r=/^\s+/,mt(e,"baseTrim"),mte=e),mte;function e(e){return e&&e.slice(0,t(e)+1).replace(r,"")}}function fZ(){var e;return bte||(bte=1,e=uZ().Symbol,vte=e),vte}function mZ(){var e,t,a,s,o;return wte||(wte=1,e=fZ(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0,mt(r,"getRawTag"),xte=r),xte;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 yZ(){var t;return kte||(kte=1,t=Object.prototype.toString,mt(e,"objectToString"),Tte=e),Tte;function e(e){return t.call(e)}}function vZ(){var e,t,r,i;return Ste||(Ste=1,e=fZ(),t=mZ(),r=yZ(),i=e?e.toStringTag:void 0,mt(n,"baseGetTag"),Cte=n),Cte;function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(i&&i in Object(e)?t:r)(e)}}function bZ(){return _te||(_te=1,mt(e,"isObjectLike"),Ete=e),Ete;function e(e){return null!=e&&"object"==typeof e}}function xZ(){var t,r;return Rte||(Rte=1,t=vZ(),r=bZ(),mt(e,"isSymbol"),Ate=e),Ate;function e(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==t(e)}}function wZ(){var r,i,n,a,s,o,l;return Nte||(Nte=1,r=gZ(),i=cZ(),n=xZ(),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,mt(e,"toNumber"),Lte=e),Lte;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 TZ(){var T,k,C,S,E;return Ite||(Ite=1,T=cZ(),k=dZ(),C=wZ(),S=Math.max,E=Math.min,mt(e,"debounce"),Dte=e),Dte;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?E(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 w(){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=C(r)||0,T(e)&&(t=!!e.leading,u="maxWait"in e,s=u?S(C(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(w,"debounced"),w.cancel=b,w.flush=x,w}}function kZ(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 CZ(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=kZ(e.x,e.y,i,e=(t.y1+t.y2)/2,r),{x:(r=Kte(t.x,t.y,i,e,n,a)).x,y:r.y})}function SZ(){return Cre||(Cre=1,s=Tre,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<t?-1:t<e?1:0},"defaultCmp"),f=mt(function(e,t,r,i,n){var a;if(null==n&&(n=d),(r=null==r?0:r)<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);r<i;)n(t,e[a=l((r+i)/2)])<0?i=a:r=a+1;return[].splice.apply(e,[r,r-r].concat(t)),t},"insort"),t=mt(function(e,t,r){return null==r&&(r=d),e.push(t),h(e,0,e.length-1,r)},"heappush"),g=mt(function(e,t){var r,i;return null==t&&(t=d),r=e.pop(),e.length?(i=e[0],e[0]=r,u(e,0,t)):i=r,i},"heappop"),r=mt(function(e,t,r){var i;return null==r&&(r=d),i=e[0],e[0]=t,u(e,0,r),i},"heapreplace"),c=mt(function(e,t,r){var i;return null==r&&(r=d),e.length&&r(e[0],t)<0&&(t=(i=[e[0],t])[0],e[0]=i[1],u(e,0,r)),t},"heappushpop"),p=mt(function(r,e){var t,i,n,a,s,o;for(null==e&&(e=d),s=[],i=0,n=(a=function(){o=[];for(var e=0,t=l(r.length/2);0<=t?e<t:t<e;0<=t?e++:e--)o.push(e);return o}.apply(this).reverse()).length;i<n;i++)t=a[i],s.push(u(r,t,e));return s},"heapify"),n=mt(function(e,t,r){if(null==r&&(r=d),-1!==(t=e.indexOf(t)))return h(e,0,t,r),u(e,t,r)},"updateItem"),e=mt(function(e,t,r){var i,n,a,s,o;if(null==r&&(r=d),!(n=e.slice(0,t)).length)return n;for(p(n,r),a=0,s=(o=e.slice(t)).length;a<s;a++)i=o[a],c(n,i,r);return n.sort(r).reverse()},"nlargest"),i=mt(function(e,t,r){var i,n,a,s,o,l,c,h,u;if(null==r&&(r=d),10*t<=e.length){if((a=e.slice(0,t).sort(r)).length)for(n=a[a.length-1],s=0,l=(c=e.slice(t)).length;s<l;s++)r(i=c[s],n)<0&&(f(a,i,0,null,r),a.pop(),n=a[a.length-1]);return a}for(p(e,r),u=[],o=0,h=m(t,e.length);0<=h?o<h:h<o;0<=h?++o:--o)u.push(g(e,r));return u},"nsmallest"),h=mt(function(e,t,r,i){var n,a,s;for(null==i&&(i=d),n=e[r];t<r&&i(n,a=e[s=r-1>>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<n;)(s=i+1)<n&&!(r(e[i],e[s])<0)&&(i=s),e[t]=e[i],i=2*(t=i)+1;return e[t]=a,h(e,o,t,r)},"_siftup"),a.push=t,a.pop=g,a.replace=r,a.pushpop=c,a.heapify=p,a.updateItem=n,a.nlargest=e,a.nsmallest=i,mt(a,"Heap"),a.prototype.push=function(e){return t(this.nodes,e,this.cmp)},a.prototype.pop=function(){return g(this.nodes,this.cmp)},a.prototype.peek=function(){return this.nodes[0]},a.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},a.prototype.replace=function(e){return r(this.nodes,e,this.cmp)},a.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},a.prototype.heapify=function(){return p(this.nodes,this.cmp)},a.prototype.updateItem=function(e){return n(this.nodes,e,this.cmp)},a.prototype.clear=function(){return this.nodes=[]},a.prototype.empty=function(){return 0===this.nodes.length},a.prototype.size=function(){return this.nodes.length},a.prototype.clone=function(){var e=new a;return e.nodes=this.nodes.slice(0),e},a.prototype.toArray=function(){return this.nodes.slice(0)},a.prototype.insert=a.prototype.push,a.prototype.top=a.prototype.peek,a.prototype.front=a.prototype.peek,a.prototype.has=a.prototype.contains,a.prototype.copy=a.prototype.clone,s.exports=a}.call(kre)),Tre.exports;var s}function EZ(){return Ere||(Ere=1,Sre=SZ()),Sre}function _Z(e,r){if(e.length<3)throw new Error("Need at least 3 vertices");var a=mt(function(e,t){return{x:e.x+t.x,y:e.y+t.y}},"add"),s=mt(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},"sub"),o=mt(function(e,t){return{x:e.x*t,y:e.y*t}},"scale"),l=mt(function(e,t){return e.x*t.y-e.y*t.x},"cross"),t=mt(function(e){var t=die(e.x,e.y);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},"normalize"),i=mt(function(e){for(var t=0,r=0;r<e.length;r++){var i=e[r],n=e[(r+1)%e.length];t+=i.x*n.y-n.x*i.y}return t/2},"signedArea"),n=mt(function(e,t,r,i){var t=s(t,e),i=s(i,r),n=l(t,i);return Math.abs(n)<1e-9?a(e,o(t,.5)):(r=l(s(r,e),i)/n,a(e,o(t,r)))},"intersectLines"),c=e.map(function(e){return{x:e.x,y:e.y}});i(c)<0&&c.reverse();for(var h=c.length,u=[],d=0;d<h;d++){var p=c[d],g=c[(d+1)%h],p=t({x:(g=s(g,p)).y,y:-g.x});u.push(p)}for(var f=u.map(function(e,t){return{p1:a(c[t],o(e,r)),p2:a(c[(t+1)%h],o(e,r))}}),m=[],y=0;y<h;y++){var v=f[(y-1+h)%h],b=f[y],v=n(v.p1,v.p2,b.p1,b.p2);m.push(v)}return m}function AZ(e,t,r,i,n,a){var e=_Z(Lie(e,t,r,i,n),a),s=eie();return e.forEach(function(e){return nie(s,e.x,e.y)}),s}function RZ(e,t){function r(e){for(var t=[],r=0;r<e.length;r++){var i=-(n={x:(n=e[(r+1)%e.length]).x-(i=e[r]).x,y:n.y-i.y}).y,n=n.x,a=Math.sqrt(i*i+n*n);t.push({x:i/a,y:n/a})}return t}function i(e,t){var r,i=1/0,n=-1/0,a=KK(e);try{for(a.s();!(r=a.n()).done;)var s=r.value,o=s.x*t.x+s.y*t.y,i=Math.min(i,o),n=Math.max(n,o)}catch(e){a.e(e)}finally{a.f()}return{min:i,max:n}}function n(e,t){return!(e.max<t.min||t.max<e.min)}mt(r,"getAxes"),mt(i,"project"),mt(n,"overlaps");var a,s=KK([].concat(iZ(r(e)),iZ(r(t))));try{for(s.s();!(a=s.n()).done;){var o=a.value;if(!n(i(e,o),i(t,o)))return!1}}catch(e){s.e(e)}finally{s.f()}return!0}function LZ(e,t,r,i,n,a){var s=Cee(e)?e:une[e]||une.euclidean;return 0===t&&Cee(e)?s(n,a):s(t,r,i,n,a)}function NZ(){var e;return Zne||(Zne=1,e=Array.isArray,Kne=e),Kne}function DZ(){var i,n,a,s;return Jne||(Jne=1,i=NZ(),n=xZ(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,mt(e,"isKey"),Qne=e),Qne;function e(e,t){var r;return!i(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!n(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t))}}function IZ(){var t,r;return tae||(tae=1,t=vZ(),r=cZ(),mt(e,"isFunction"),eae=e),eae;function e(e){return!!r(e)&&("[object Function]"==(e=t(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}}function MZ(){var e;return iae||(iae=1,e=uZ()["__core-js_shared__"],rae=e),rae}function OZ(){var t,e;return aae||(aae=1,e=MZ(),t=(e=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",mt(r,"isMasked"),nae=r),nae;function r(e){return!!t&&t in e}}function PZ(){var t;return oae||(oae=1,t=Function.prototype.toString,mt(e,"toSource"),sae=e),sae;function e(e){if(null!=e){try{return t.call(e)}catch{}try{return e+""}catch{}}return""}}function $Z(){var t,r,i,n,a,e,s,o;return cae||(cae=1,t=IZ(),r=OZ(),i=cZ(),n=PZ(),a=/^\[object .+?Constructor\]$/,e=Function.prototype,s=Object.prototype,e=e.toString,s=s.hasOwnProperty,o=RegExp("^"+e.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(l,"baseIsNative"),lae=l),lae;function l(e){return!(!i(e)||r(e))&&(t(e)?o:a).test(n(e))}}function BZ(){return uae||(uae=1,mt(e,"getValue"),hae=e),hae;function e(e,t){return e?.[t]}}function FZ(){var r,i;return pae||(pae=1,r=$Z(),i=BZ(),mt(e,"getNative"),dae=e),dae;function e(e,t){return e=i(e,t),r(e)?e:void 0}}function zZ(){var e;return fae||(fae=1,e=FZ()(Object,"create"),gae=e),gae}function qZ(){var e;return yae||(yae=1,e=zZ(),mt(t,"hashClear"),mae=t),mae;function t(){this.__data__=e?e(null):{},this.size=0}}function UZ(){return bae||(bae=1,mt(e,"hashDelete"),vae=e),vae;function e(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}}function GZ(){var i,n;return wae||(wae=1,i=zZ(),n=Object.prototype.hasOwnProperty,mt(e,"hashGet"),xae=e),xae;function e(e){var t,r=this.__data__;return i?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:n.call(r,e)?r[e]:void 0}}function jZ(){var r,i;return kae||(kae=1,r=zZ(),i=Object.prototype.hasOwnProperty,mt(e,"hashHas"),Tae=e),Tae;function e(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}}function WZ(){var i;return Sae||(Sae=1,i=zZ(),mt(e,"hashSet"),Cae=e),Cae;function e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}}function YZ(){var e,t,r,i,n;return _ae||(_ae=1,e=qZ(),t=UZ(),r=GZ(),i=jZ(),n=WZ(),mt(a,"Hash"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,Eae=a),Eae;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}}function VZ(){return Rae||(Rae=1,mt(e,"listCacheClear"),Aae=e),Aae;function e(){this.__data__=[],this.size=0}}function HZ(){return Nae||(Nae=1,mt(e,"eq"),Lae=e),Lae;function e(e,t){return e===t||e!=e&&t!=t}}function XZ(){var i;return Iae||(Iae=1,i=HZ(),mt(e,"assocIndexOf"),Dae=e),Dae;function e(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}}function KZ(){var r,i;return Oae||(Oae=1,r=XZ(),i=Array.prototype.splice,mt(e,"listCacheDelete"),Mae=e),Mae;function e(e){var t=this.__data__;return!((e=r(t,e))<0||(e==t.length-1?t.pop():i.call(t,e,1),--this.size,0))}}function ZZ(){var r;return $ae||($ae=1,r=XZ(),mt(e,"listCacheGet"),Pae=e),Pae;function e(e){var t=this.__data__;return(e=r(t,e))<0?void 0:t[e][1]}}function QZ(){var t;return Fae||(Fae=1,t=XZ(),mt(e,"listCacheHas"),Bae=e),Bae;function e(e){return-1<t(this.__data__,e)}}function JZ(){var n;return qae||(qae=1,n=XZ(),mt(e,"listCacheSet"),zae=e),zae;function e(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}}function eQ(){var e,t,r,i,n;return Gae||(Gae=1,e=VZ(),t=KZ(),r=ZZ(),i=QZ(),n=JZ(),mt(a,"ListCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,Uae=a),Uae;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}}function tQ(){var e;return Wae||(Wae=1,e=FZ()(uZ(),"Map"),jae=e),jae}function rQ(){var e,t,r;return Vae||(Vae=1,e=YZ(),t=eQ(),r=tQ(),mt(i,"mapCacheClear"),Yae=i),Yae;function i(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}function iQ(){return Xae||(Xae=1,mt(e,"isKeyable"),Hae=e),Hae;function e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}}function nQ(){var r;return Zae||(Zae=1,r=iQ(),mt(e,"getMapData"),Kae=e),Kae;function e(e,t){return e=e.__data__,r(t)?e["string"==typeof t?"string":"hash"]:e.map}}function aQ(){var t;return Jae||(Jae=1,t=nQ(),mt(e,"mapCacheDelete"),Qae=e),Qae;function e(e){return e=t(this,e).delete(e),this.size-=e?1:0,e}}function sQ(){var t;return tse||(tse=1,t=nQ(),mt(e,"mapCacheGet"),ese=e),ese;function e(e){return t(this,e).get(e)}}function oQ(){var t;return ise||(ise=1,t=nQ(),mt(e,"mapCacheHas"),rse=e),rse;function e(e){return t(this,e).has(e)}}function lQ(){var n;return ase||(ase=1,n=nQ(),mt(e,"mapCacheSet"),nse=e),nse;function e(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}}function cQ(){var e,t,r,i,n;return ose||(ose=1,e=rQ(),t=aQ(),r=sQ(),i=oQ(),n=lQ(),mt(a,"MapCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,sse=a),sse;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}}function hQ(){var e;return cse||(cse=1,e=cQ(),mt(t,"memoize"),t.Cache=e,lse=t),lse;function t(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");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(t.Cache||e),a}}function uQ(){var r;return use||(use=1,r=hQ(),mt(e,"memoizeCapped"),hse=e),hse;function e(e){var t=(e=r(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}}function dQ(){var t,a,e;return pse||(pse=1,e=uQ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,e=e(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(t,function(e,t,r,i){n.push(r?i.replace(a,"$1"):t||e)}),n}),dse=e),dse}function pQ(){return fse||(fse=1,mt(e,"arrayMap"),gse=e),gse;function e(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}}function gQ(){var r,i,n,e,a;return yse||(yse=1,e=fZ(),r=pQ(),i=NZ(),n=xZ(),e=e?e.prototype:void 0,a=e?e.toString:void 0,mt(s,"baseToString"),mse=s),mse;function s(e){var t;return"string"==typeof e?e:i(e)?r(e,s)+"":n(e)?a?a.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function fQ(){var t;return bse||(bse=1,t=gQ(),mt(e,"toString"),vse=e),vse;function e(e){return null==e?"":t(e)}}function mQ(){var r,i,n,a;return wse||(wse=1,r=NZ(),i=DZ(),n=dQ(),a=fQ(),mt(e,"castPath"),xse=e),xse;function e(e,t){return r(e)?e:i(e,t)?[e]:n(a(e))}}function yQ(){var r;return kse||(kse=1,r=xZ(),mt(e,"toKey"),Tse=e),Tse;function e(e){var t;return"string"==typeof e||r(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function vQ(){var n,a;return Sse||(Sse=1,n=mQ(),a=yQ(),mt(e,"baseGet"),Cse=e),Cse;function e(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[a(t[r++])];return r&&r==i?e:void 0}}function bQ(){var i;return _se||(_se=1,i=vQ(),mt(e,"get"),Ese=e),Ese;function e(e,t,r){return void 0===(e=null==e?void 0:i(e,t))?r:e}}function xQ(){var t,e;return Lse||(Lse=1,t=FZ(),e=(()=>{try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Rse=e),Rse}function wQ(){var i;return Dse||(Dse=1,i=xQ(),mt(e,"baseAssignValue"),Nse=e),Nse;function e(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}function TQ(){var n,a,s;return Mse||(Mse=1,n=wQ(),a=HZ(),s=Object.prototype.hasOwnProperty,mt(e,"assignValue"),Ise=e),Ise;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 kQ(){var i;return Pse||(Pse=1,i=/^(?:0|[1-9]\d*)$/,mt(e,"isIndex"),Ose=e),Ose;function e(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&i.test(e))&&-1<e&&e%1==0&&e<t}}function CQ(){var u,d,p,g,f;return Bse||(Bse=1,u=TQ(),d=mQ(),p=kQ(),g=cZ(),f=yQ(),mt(e,"baseSet"),$se=e),$se;function e(e,t,r,i){if(g(e))for(var n=-1,a=(t=d(t,e)).length,s=a-1,o=e;null!=o&&++n<a;){var l,c=f(t[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=g(l)?l:p(t[n+1])?[]:{}),u(o,c,h),o=o[c]}return e}}function SQ(){var i;return zse||(zse=1,i=CQ(),mt(e,"set"),Fse=e),Fse;function e(e,t,r){return null==e?e:i(e,t,r)}}function EQ(){return Gse||(Gse=1,mt(e,"copyArray"),Use=e),Use;function e(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}}function _Q(){var t,r,i,n,a,s,o;return Wse||(Wse=1,t=pQ(),r=EQ(),i=NZ(),n=xZ(),a=dQ(),s=yQ(),o=fQ(),mt(e,"toPath"),jse=e),jse;function e(e){return i(e)?t(e,s):n(e)?[e]:r(a(o(e)))}}function AQ(e,t,r,i){for(var n=[],a=new xre,s=e.cy().hasCompoundNodes(),o=0;o<e.length;o++){var l=e[o];r?n.push(l):s&&i(n,a,l)}for(;0<n.length;){var c=n.shift();t(c),a.add(c.id()),s&&i(n,a,c)}return e}function RQ(e,t,r){if(r.isParent())for(var i=r._private.children,n=0;n<i.length;n++){var a=i[n];t.has(a.id())||e.push(a)}}function LQ(e,t,r){r.isChild()&&(r=r._private.parent,t.has(r.id())||e.push(r))}function NQ(e,t,r){LQ(e,t,r),RQ(e,t,r)}function DQ(s){return function(e){if(void 0===e&&(e=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var t=0,r=this[0],i=r._private.edges,n=0;n<i.length;n++){var a=i[n];!e&&a.isLoop()||(t+=s(r,a))}return t}}}function IQ(a,s){return function(e){for(var t,r=this.nodes(),i=0;i<r.length;i++){var n=r[i][a](e);void 0===n||void 0!==t&&!s(n,t)||(t=n)}return t}}function MQ(){return!1}function OQ(){return!0}function PQ(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:qoe,t=1<arguments.length?arguments[1]:void 0,r=0;r<zoe.length;r++){var i=zoe[r];this[i]=e[i]||Foe[i]}this.context=t||this.context,this.listeners=[],this.emitting=0}function $Q(e,t,r){var i,n=r._private;return null==(i=(n=n.styleCache=n.styleCache||[])[e])?n[e]=t(r):i}function BQ(t,r){return t=Vte(t),mt(function(e){return $Q(t,r,e)},"cachedStyleFunction")}function FQ(t,r){t=Vte(t);var i=mt(function(e){return r.call(e)},"selfFn");return mt(function(){var e=this[0];if(e)return $Q(t,i,e)},"cachedPrototypeStyleFunction")}function zQ(e,t){var r=e._private.data.parent?e.parents():null;if(r)for(var i=0;i<r.length;i++)if(!t(r[i]))return!1;return!0}function qQ(e){var i=e.ok,n=e.edgeOkViaNode||e.ok,a=e.parentOk||e.ok;return function(){var e,t,r=this.cy();return!r.styleEnabled()||(e=this[0],r=r.hasCompoundNodes(),e?(t=e._private,!!i(e)&&(e.isNode()?!r||zQ(e,a):(e=t.source,t=t.target,n(e)&&(!r||zQ(e,n))&&(e===t||n(t)&&(!r||zQ(t,n)))))):void 0)}}function UQ(l){return function(){var e=[];if(2===(t=arguments).length)this.on(l.event,t[0],t[1]);else if(1===t.length&&Cee(t[0]))this.on(l.event,t[0]);else if(0===t.length||1===t.length&&See(t[0])){for(var t=1===t.length?t[0]:null,r=0;r<this.length;r++){var i=this[r],n=!l.ableField||i._private[l.ableField],a=i._private[l.field]!=l.value;if(l.overrideAble){var s=l.overrideAble(i);if(void 0!==s&&!(n=s))return this}n&&(i._private[l.field]=l.value,a)&&e.push(i)}var o=this.spawn(e);o.updateStyle(),o.emit(l.event),t&&o.emit(t)}return this}}function GQ(r){Zoe[r.field]=function(){var e=this[0];if(e){if(r.overrideField){var t=r.overrideField(e);if(void 0!==t)return t}return e._private[r.field]}},Zoe[r.on]=UQ({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Zoe[r.off]=UQ({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function jQ(n){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r]._private[n.attr];i&&t.push(i)}return this.spawn(t,!0).filter(e)},"sourceImpl")}function WQ(h){return mt(function(e){var t=[],r=this._private.cy,i=h||{};kee(e)&&(e=r.$(e));for(var n=0;n<e.length;n++)for(var a=e[n]._private.edges,s=0;s<a.length;s++){var o=a[s],l=o._private.data,c=this.hasElementWithId(l.source)&&e.hasElementWithId(l.target),l=e.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!c&&!l||(i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!c||i.thisIsTgt&&!l)||t.push(o)}return this.spawn(t,!0)},"edgesWithImpl")}function YQ(f){return f=Kee({},{codirected:!1},f),mt(function(e){for(var t=[],r=this.edges(),i=f,n=0;n<r.length;n++)for(var a=r[n]._private,s=a.source,o=s._private.data.id,l=a.data.target,c=s._private.edges,h=0;h<c.length;h++){var u=c[h],d=(p=u._private.data).target,p=p.source,g=d===l&&p===o;(i.codirected&&g||!i.codirected&&(g||o===d&&l===p))&&t.push(u)}return this.spawn(t,!0).filter(e)},"parallelEdgesImpl")}function VQ(s,t,o,r){var e=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var i=0;i<4;++i)if("number"!=typeof arguments[i]||isNaN(arguments[i])||!isFinite(arguments[i]))return!1;s=Math.min(s,1),o=Math.min(o,1),s=Math.max(s,0),o=Math.max(o,0);var a=new(e?Float32Array:Array)(11);function n(e,t){return 1-3*t+3*e}function l(e,t,r){return((n(t,r)*e+(3*r-6*t))*e+3*t)*e}function c(e,t,r){return 3*n(t,r)*e*e+2*(3*r-6*t)*e+3*t}function h(e,t){for(var r=0;r<4;++r){var i=c(t,s,o);if(0===i)return t;t-=(l(t,s,o)-e)/i}return t}function u(){for(var e=0;e<11;++e)a[e]=l(.1*e,s,o)}function d(e,t,r){for(var i,n,a=0;0<(i=l(n=t+(r-t)/2,s,o)-e)?r=n:t=n,1e-7<Math.abs(i)&&++a<10;);return n}function p(e){for(var t=0,r=1;10!==r&&a[r]<=e;++r)t+=.1;var i=t+(e-a[--r])/(a[r+1]-a[r])*.1,n=c(i,s,o);return.001<=n?h(e,i):0===n?i:d(e,t,t+.1)}mt(n,"A"),mt(function(e,t){return 3*t-6*e},"B"),mt(function(e){return 3*e},"C"),mt(l,"calcBezier"),mt(c,"getSlope"),mt(h,"newtonRaphsonIterate"),mt(u,"calcSampleValues"),mt(d,"binarySubdivide"),mt(p,"getTForX");var g=!1;function f(){g=!0,s===t&&o===r||u()}mt(f,"precompute"),(e=mt(function(e){return g||f(),s===t&&o===r?e:0===e?0:1===e?1:l(p(e),t,r)},"f")).getControlPoints=function(){return[{x:s,y:t},{x:o,y:r}]};var m="generateBezier("+[s,t,o,r]+")";return e.toString=function(){return m},e}function HQ(e,t,r,i,n){return 1===i||t===r?r:(n=n(t,r,i),null!=e&&((e.roundValue||e.color)&&(n=Math.round(n)),void 0!==e.min&&(n=Math.max(n,e.min)),void 0!==e.max)?Math.min(n,e.max):n)}function XQ(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function KQ(e,t,r,i,n){var a=null!=n?n.type:null,s=(r<0?r=0:1<r&&(r=1),XQ(e,n)),o=XQ(t,n);if(he(s)&&he(o))return HQ(a,s,o,r,i);if(See(s)&&See(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];null!=h&&null!=u?(h=HQ(a,h,u,r,i),l.push(h)):l.push(u)}return l}}function ZQ(e,t,r,i){var n=!i,a=e._private,s=t._private,t=s.easing,o=s.startTime,l=(i?e:e.cy()).style(),c=(s.easingImpl||(null==t?s.easingImpl=tle.linear:(t=kee(t)?l.parse("transition-timing-function",t).value:t,0<(t=kee(t)?(u=t,[]):(u=t[1],t.slice(2).map(function(e){return+e}))).length?("spring"===u&&t.push(s.duration),s.easingImpl=tle[u].apply(null,t)):s.easingImpl=tle[u])),s.easingImpl),h=0===s.duration?1:(r-o)/s.duration;if((h=s.applying?s.progress:h)<0?h=0:1<h&&(h=1),null==s.delay){var t=s.startPosition,o=((u=s.position)&&n&&!e.locked()&&(r={},QQ(t.x,u.x)&&(r.x=KQ(t.x,u.x,h,c)),QQ(t.y,u.y)&&(r.y=KQ(t.y,u.y,h,c)),e.position(r)),s.startPan),t=s.pan,u=a.pan,u=((r=null!=t&&i)&&(QQ(o.x,t.x)&&(u.x=KQ(o.x,t.x,h,c)),QQ(o.y,t.y)&&(u.y=KQ(o.y,t.y,h,c)),e.emit("pan")),s.startZoom),d=((t=null!=(o=s.zoom)&&i)&&(QQ(u,o)&&(a.zoom=Jre(a.minZoom,KQ(u,o,h,c),a.maxZoom)),e.emit("zoom")),(r||t)&&e.emit("viewport"),s.style);if(d&&0<d.length&&n){for(var p=0;p<d.length;p++){var g=(m=d[p]).name,f=s.startStyle[g],m=KQ(f,m,h,c,l.properties[f.name]);l.overrideBypass(e,g,m)}e.emit("style")}}return s.progress=h}function QQ(e,t){return!(null==e||null==t||!(he(e)&&he(t)||e&&t))}function JQ(e,t,r,i){(t=t._private).started=!0,t.startTime=r-t.progress*t.duration}function eJ(h,e){var t=e._private.aniEles,u=[];function r(e,t){var r,i=(n=e._private).animation.current,n=n.animation.queue,a=!1;0===i.length&&(r=n.shift())&&i.push(r);for(var s=mt(function(e){for(var t=e.length-1;0<=t;t--)(0,e[t])();e.splice(0,e.length)},"callbacks"),o=i.length-1;0<=o;o--){var l=i[o],c=l._private;c.stopped?(i.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.frames)):(c.playing||c.applying)&&(c.playing&&c.applying&&(c.applying=!1),c.started||JQ(0,l,h),ZQ(e,l,h,t),c.applying&&(c.applying=!1),s(c.frames),null!=c.step&&c.step(h),l.completed()&&(i.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.completes)),a=!0)}return t||0!==i.length||0!==n.length||u.push(e),a}mt(r,"stepOne");for(var i=!1,n=0;n<t.length;n++)var a=r(t[n]),i=i||a;var s=r(e,!0);(i||s)&&(0<t.length?e.notify("draw",t):e.notify("draw")),t.unmerge(u),e.emit("step")}function tJ(e){this.options=Kee({},hle,ule,e)}function rJ(e){this.options=Kee({},gle,e)}function iJ(e){this.options=Kee({},fle,e)}function nJ(e){this.options=Kee({},yle,e);var n=(this.options.layout=this).options.eles.nodes(),e=this.options.eles.edges().filter(function(e){var t=e.source().data("id"),r=e.target().data("id"),e=n.some(function(e){return e.data("id")===t}),i=n.some(function(e){return e.data("id")===r});return!e||!i});this.options.eles=this.options.eles.not(e)}function aJ(e){this.options=Kee({},$le,e)}function sJ(e){this.options=Kee({},Ble,e)}function oJ(e){this.options=Kee({},Fle,e)}function lJ(e){this.options=Kee({},zle,e)}function cJ(e){this.options=e,this.notifications=0}function hJ(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function uJ(e,t,r,i){return 0===i||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(sce(e,t,r,i,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:Ule,cy:Gle,radius:Xle,startX:Jle,startY:ece,stopX:tce,stopY:rce,startAngle:jle.ang+Math.PI/2*Yle,endAngle:Wle.ang-Math.PI/2*Yle,counterClockwise:Vle})}function dJ(e){var t=[];if(null!=e){for(var r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}}function pJ(e,t,r){for(var i=mt(function(e,t,r,i){return Kre(e,t,r,i)},"qbezierAt$1"),n=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];n.push({x:i(r[0],r[2],r[4],s),y:i(r[1],r[3],r[5],s)})}}function gJ(e,t){for(var r=0;r<t.length;r++){var i=t[r];e.lineTo(i.x,i.y)}}function fJ(e,t,r){for(var i,n=0;n<t.length;n++){var a=t[n];0===n&&(i=a),e.lineTo(a.x,a.y)}e.quadraticCurveTo(r.x,r.y,i.x,i.y)}function mJ(e,t,r){e.beginPath&&e.beginPath();for(var i=t,n=0;n<i.length;n++){var a=i[n];e.lineTo(a.x,a.y)}var s=r,t=r[0];for(e.moveTo(t.x,t.y),n=1;n<s.length;n++)a=s[n],e.lineTo(a.x,a.y);e.closePath&&e.closePath()}function yJ(e,t,r,i,n){e.beginPath&&e.beginPath(),e.arc(r,i,n,0,2*Math.PI,!1);var a=t,r=a[0];e.moveTo(r.x,r.y);for(var s=0;s<a.length;s++){var o=a[s];e.lineTo(o.x,o.y)}e.closePath&&e.closePath()}function vJ(e,t,r,i){e.arc(t,r,i,0,2*Math.PI,!1)}function bJ(e,t,r,i,n){var a=Math.min(i,n)/2,t=t+i/2,i=r+n/2;e.beginPath(),e.arc(t,i,a,0,2*Math.PI),e.closePath()}function xJ(e,t,r,i,n){var a=Math.min(5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,i/2,n/2);e.beginPath(),e.moveTo(t+a,r),e.lineTo(t+i-a,r),e.quadraticCurveTo(t+i,r,t+i,r+a),e.lineTo(t+i,r+n-a),e.quadraticCurveTo(t+i,r+n,t+i-a,r+n),e.lineTo(t+a,r+n),e.quadraticCurveTo(t,r+n,t,r+n-a),e.lineTo(t,r+a),e.quadraticCurveTo(t,r,t+a,r),e.closePath()}function wJ(e,t,r){if(t=e.createShader(t),e.shaderSource(t,r),e.compileShader(t),e.getShaderParameter(t,e.COMPILE_STATUS))return t;throw new Error(e.getShaderInfoLog(t))}function TJ(e,t,r){var t=wJ(e,e.VERTEX_SHADER,t),r=wJ(e,e.FRAGMENT_SHADER,r),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS))return i;throw new Error("Could not initialize shaders")}function kJ(e,t,r){var i=e.makeOffscreenCanvas(t,r=void 0===r?t:r),n=i.context=i.getContext("2d");return i.clear=function(){return n.clearRect(0,0,i.width,i.height)},i.clear(),i}function CJ(e){var t=e.pixelRatio;return{zoom:e.cy.zoom()*t,pan:{x:(e=e.cy.pan()).x*t,y:e.y*t}}}function SJ(e){var t=e.pixelRatio;return e.cy.zoom()*t}function EJ(e,t,r,i,n){return i=i*r+t.x,n=n*r+t.y,[i,Math.round(e.canvasHeight-n)]}function _J(e){return"solid"===e.pstyle("background-fill").value&&"none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)}function AJ(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function RJ(e,t,r){var i=e[0]/255,n=e[1]/255,e=e[2]/255;return(r=r||new Array(4))[0]=i*t,r[1]=n*t,r[2]=e*t,r[3]=t,r}function LJ(e,t){return(t=t||new Array(4))[0]=(e>>0&255)/255,t[1]=(e>>8&255)/255,t[2]=(e>>16&255)/255,t[3]=(e>>24&255)/255,t}function NJ(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function DJ(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 IJ(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 MJ(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function OJ(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 PJ(e,t,r,i){var n=(t=rZ(IJ(e,t),2))[0],i=MJ(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 $J(t,e,r,i){var n=(r=rZ(IJ(t,r),3))[0],a=r[1],r=r[2],s=MJ(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<e;h++)c[h]=OJ(t,a,s,o,n,h);return l.dataArray=s,l.stride=o,l.size=n,l.getView=function(e){return c[e]},l.setPoint=function(e,t,r){(e=c[e])[0]=t,e[1]=r},l.bufferSubData=function(e){t.bindBuffer(t.ARRAY_BUFFER,l),e?t.bufferSubData(t.ARRAY_BUFFER,0,s,0,e*n):t.bufferSubData(t.ARRAY_BUFFER,0,s)},l}function BJ(e,t,r){for(var i=new Float32Array(9*t),n=new Array(t),a=0;a<t;a++)n[a]=new Float32Array(i.buffer,9*a*4,9);var s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,i.byteLength,e.DYNAMIC_DRAW);for(var o=0;o<3;o++){var l=r+o;e.enableVertexAttribArray(l),e.vertexAttribPointer(l,3,e.FLOAT,!1,36,12*o),e.vertexAttribDivisor(l,1)}return e.bindBuffer(e.ARRAY_BUFFER,null),s.getMatrixView=function(e){return n[e]},s.setData=function(e,t){n[t].set(e,0)},s.bufferSubData=function(){e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferSubData(e.ARRAY_BUFFER,0,i)},s}function FJ(r){var e=r.createFramebuffer(),i=(r.bindFramebuffer(r.FRAMEBUFFER,e),r.createTexture());return r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),r.bindFramebuffer(r.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(e,t){r.bindTexture(r.TEXTURE_2D,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null)},e}function zJ(){var e=new zce(9);return zce!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function qJ(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function UJ(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=r[0],d=r[1],p=r[2],g=r[3],f=r[4],m=r[5],y=r[6],v=r[7],r=r[8];return e[0]=u*i+d*s+p*c,e[1]=u*n+d*o+p*h,e[2]=u*a+d*l+p*t,e[3]=g*i+f*s+m*c,e[4]=g*n+f*o+m*h,e[5]=g*a+f*l+m*t,e[6]=y*i+v*s+r*c,e[7]=y*n+v*o+r*h,e[8]=y*a+v*l+r*t,e}function GJ(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=r[0],r=r[1];return e[0]=i,e[1]=n,e[2]=a,e[3]=s,e[4]=o,e[5]=l,e[6]=u*i+r*s+c,e[7]=u*n+r*o+h,e[8]=u*a+r*l+t,e}function jJ(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=Math.sin(r),r=Math.cos(r);return e[0]=r*i+u*s,e[1]=r*n+u*o,e[2]=r*a+u*l,e[3]=r*s-u*i,e[4]=r*o-u*n,e[5]=r*l-u*a,e[6]=c,e[7]=h,e[8]=t,e}function WJ(e,t,r){var i=r[0],r=r[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function YJ(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function VJ(e,t){return e.intersection?e.intersection(t):new Set(iZ(e).filter(function(e){return t.has(e)}))}function HJ(e){return e=(e=e.cy.container())&&e.style&&e.style.backgroundColor||"white",tte(e)}function XJ(e,t){return e=e._private.rscratch,yre(e,"labelWrapCachedLines",t)||[]}function KJ(n){var r=n.render,t=(n.render=function(e){e=e||{};var t=n.cy;n.webgl&&(7.99<t.zoom()?(ZJ(n),r.call(n,e)):(QJ(n),oee(n,e,Wce.SCREEN)))},n.matchCanvasSize),e=(n.matchCanvasSize=function(e){t.call(n,e),n.pickingFrameBuffer.setFramebufferAttachmentSizes(n.canvasWidth,n.canvasHeight),n.pickingFrameBuffer.needsDraw=!0},n.findNearestElements=function(e,t,r,i){return aee(n,e,t)},n.invalidateCachedZSortedEles),i=(n.invalidateCachedZSortedEles=function(){e.call(n),n.pickingFrameBuffer.needsDraw=!0},n.notify);n.notify=function(e,t){i.call(n,e,t),"viewport"===e||"bounds"===e?n.pickingFrameBuffer.needsDraw=!0:"background"===e&&n.drawing.invalidate(t,{type:"node-body"})}}function ZJ(e){(e=e.data.contexts[e.WEBGL]).clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function QJ(t){var e=mt(function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()},"clear");e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function JJ(e){var t=e.canvasWidth,r=e.canvasHeight,i=(e=CJ(e)).pan,e=e.zoom,n=zJ();return GJ(n,n,[i.x,i.y]),WJ(n,n,[e,e]),YJ(i=zJ(),t,r),UJ(e=zJ(),i,n),e}function eee(e,t){var r=e.canvasWidth,i=e.canvasHeight,n=(e=CJ(e)).pan,e=e.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,i),t.translate(n.x,n.y),t.scale(e,e)}function tee(t,e){t.drawSelectionRectangle(e,function(e){return eee(t,e)})}function ree(e){var t=e.data.contexts[e.NODE];t.save(),eee(e,t),t.strokeStyle="rgba(0, 0, 0, 0.3)",t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function iee(u){var e=mt(function(e,t,r){for(var e=e.atlasManager.getAtlasCollection(t),i=u.data.contexts[u.NODE],n=e.atlases,a=0;a<n.length;a++){var s,o,l,c,h=n[a].canvas;h&&(s=h.width,o=h.height,l=s*a,c=h.height*r,i.save(),i.scale(.4,.4),i.drawImage(h,l,c),i.strokeStyle="black",i.rect(l,c,s,o),i.stroke(),i.restore())}},"draw");e(u.drawing,"node",0),e(u.drawing,"label",1)}function nee(e,t,r,i,n){var a=CJ(e),t=(a=rZ(EJ(e,a.pan,a.zoom,t,r),2))[0]-3,r=a[1]-3,s=((a=e.data.contexts[e.WEBGL]).bindFramebuffer(a.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(a.viewport(0,0,a.canvas.width,a.canvas.height),oee(e,null,Wce.PICKING),e.pickingFrameBuffer.needsDraw=!1),new Uint8Array(144));a.readPixels(t,r,6,6,a.RGBA,a.UNSIGNED_BYTE,s),a.bindFramebuffer(a.FRAMEBUFFER,null);for(var o=new Set,l=0;l<36;l++){var c=NJ(s.slice(4*l,4*l+4))-1;0<=c&&o.add(c)}return o}function aee(e,t,r){var i,n,a,t=nee(e,t,r),s=e.getCachedZSortedEles(),o=KK(t);try{for(o.s();!(a=o.n()).done;){var l=s[a.value];if(!i&&l.isNode()&&(i=l),!n&&l.isEdge()&&(n=l),i&&n)break}}catch(e){o.e(e)}finally{o.f()}return[i,n].filter(Boolean)}function see(e,t,r){e=e.drawing,t+=1,r.isNode()?(e.drawNode(r,t,"node-underlay"),e.drawNode(r,t,"node-body"),e.drawTexture(r,t,"label"),e.drawNode(r,t,"node-overlay")):(e.drawEdgeLine(r,t),e.drawEdgeArrow(r,t,"source"),e.drawEdgeArrow(r,t,"target"),e.drawTexture(r,t,"label"),e.drawTexture(r,t,"edge-source-label"),e.drawTexture(r,t,"edge-target-label"))}function oee(e,t,r){e.webglDebug&&(c=performance.now());var i=e.drawing,n=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&tee(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var t=e.data.contexts[e.WEBGL],t=(r.screen?(t.clearColor(0,0,0,0),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)):t.disable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.viewport(0,0,t.canvas.width,t.canvas.height),JJ(e)),a=e.getCachedZSortedEles(),n=a.length;if(i.startFrame(t,r),r.screen){for(var s=0;s<a.nondrag.length;s++)see(e,s,a.nondrag[s]);for(var o=0;o<a.drag.length;o++)see(e,o,a.drag[o])}else if(r.picking)for(var l=0;l<a.length;l++)see(e,l,a[l]);i.endFrame(),r.screen&&e.webglDebugShowAtlases&&(ree(e),iee(e)),e.data.canvasNeedsRedraw[e.NODE]=!1,e.data.canvasNeedsRedraw[e.DRAG]=!1}if(e.webglDebug){var t=performance.now(),t=Math.ceil(t-c),c=i.getDebugInfo(),n=["".concat(n," elements"),"".concat(c.totalInstances," instances"),"".concat(c.batchCount," batches"),"".concat(c.totalAtlases," atlases"),"".concat(c.wrappedCount," wrapped textures"),"".concat(c.simpleCount," simple shapes")].join(", ");console.log("WebGL (".concat(r.name,") - frame time ").concat(t,"ms")),console.log("Totals:"),console.log(" ".concat(n)),console.log("Texture Atlases Used:");var h,u=KK(c.atlasInfo);try{for(u.s();!(h=u.n()).done;){var d=h.value;console.log(" ".concat(d.type,": ").concat(d.keyCount," keys, ").concat(d.atlasCount," atlases"))}}catch(e){u.e(e)}finally{u.f()}console.log("")}e.data.gc&&(console.log("Garbage Collect!"),e.data.gc=!1,i.gc())}function lee(e,t){for(var r=atob(e),e=new ArrayBuffer(r.length),i=new Uint8Array(e),n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return new Blob([e],{type:t})}function cee(e){var t=e.indexOf(",");return e.substr(t+1)}function hee(e,i,n){var t=mt(function(){return i.toDataURL(n,e.quality)},"getB64Uri");switch(e.output){case"blob-promise":return new Hne(function(t,r){try{i.toBlob(function(e){null!=e?t(e):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},n,e.quality)}catch(e){r(e)}});case"blob":return lee(cee(t()),n);case"base64":return cee(t());default:return t()}}function uee(e){var a=this,t=a.cy.window().document,r=(e.webgl&&(ohe.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(ohe.CANVAS_LAYERS),contexts:new Array(ohe.CANVAS_LAYERS),canvasNeedsRedraw:new Array(ohe.CANVAS_LAYERS),bufferCanvases:new Array(ohe.BUFFER_COUNT),bufferContexts:new Array(ohe.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),i="rgba(0,0,0,0)",n=(a.data.canvasContainer=t.createElement("div"),a.data.canvasContainer.style),s=(a.data.canvasContainer.style[r]=i,n.position="relative",n.zIndex="0",n.overflow="hidden",(n=e.cy.container()).appendChild(a.data.canvasContainer),n.style[r]=i,{"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"});zee()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<ohe.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=t.createElement("canvas"),c=ohe.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(c),a.data.contexts[o]||are("Could not create canvas of type "+c),Object.keys(s).forEach(function(e){l.style[e]=s[e]}),l.style.position="absolute",l.setAttribute("data-id","layer"+o),l.style.zIndex=String(ohe.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[ohe.NODE].setAttribute("data-id","layer"+ohe.NODE+"-node"),a.data.canvases[ohe.SELECT_BOX].setAttribute("data-id","layer"+ohe.SELECT_BOX+"-selectbox"),a.data.canvases[ohe.DRAG].setAttribute("data-id","layer"+ohe.DRAG+"-drag"),a.data.canvases[ohe.WEBGL]&&a.data.canvases[ohe.WEBGL].setAttribute("data-id","layer"+ohe.WEBGL+"-webgl"),o=0;o<ohe.BUFFER_COUNT;o++)a.data.bufferCanvases[o]=t.createElement("canvas"),a.data.bufferContexts[o]=a.data.bufferCanvases[o].getContext("2d"),a.data.bufferCanvases[o].style.position="absolute",a.data.bufferCanvases[o].setAttribute("data-id","buffer"+o),a.data.bufferCanvases[o].style.zIndex=String(-o-1),a.data.bufferCanvases[o].style.visibility="hidden";a.pathsEnabled=!0;var h=eie(),P=mt(function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},"getBoxCenter"),u=mt(function(e){return{x:-e.w/2,y:-e.h/2}},"getCenterOffset"),n=mt(function(e){return!((e=e[0]._private).oldBackgroundTimestamp===e.backgroundTimestamp)},"backgroundTimestampHasChanged"),r=mt(function(e){return e[0]._private.nodeKey},"getStyleKey"),i=mt(function(e){return e[0]._private.labelStyleKey},"getLabelKey"),d=mt(function(e){return e[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),p=mt(function(e){return e[0]._private.targetLabelStyleKey},"getTargetLabelKey"),g=mt(function(e,t,r,i,n){return a.drawElement(e,t,r,!1,!1,n)},"drawElement"),f=mt(function(e,t,r,i,n){return a.drawElementText(e,t,r,i,"main",n)},"drawLabel"),m=mt(function(e,t,r,i,n){return a.drawElementText(e,t,r,i,"source",n)},"drawSourceLabel"),y=mt(function(e,t,r,i,n){return a.drawElementText(e,t,r,i,"target",n)},"drawTargetLabel"),v=mt(function(e){return e.boundingBox(),e[0]._private.bodyBounds},"getElementBox"),b=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.main||h},"getLabelBox"),x=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.source||h},"getSourceLabelBox"),w=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.target||h},"getTargetLabelBox"),T=mt(function(e,t){return t},"isLabelVisibleAtScale"),k=mt(function(e){return P(v(e))},"getElementRotationPoint"),C=mt(function(e,t,r){return{x:t.x+r.pstyle((e=e?e+"-":"")+"text-margin-x").pfValue,y:t.y+r.pstyle(e+"text-margin-y").pfValue}},"addTextMargin"),S=mt(function(e,t,r){return{x:(e=e[0]._private.rscratch)[t],y:e[r]}},"getRsPt"),E=mt(function(e){return C("",S(e,"labelX","labelY"),e)},"getLabelRotationPoint"),_=mt(function(e){return C("source",S(e,"sourceLabelX","sourceLabelY"),e)},"getSourceLabelRotationPoint"),A=mt(function(e){return C("target",S(e,"targetLabelX","targetLabelY"),e)},"getTargetLabelRotationPoint"),R=mt(function(e){return u(v(e))},"getElementRotationOffset"),L=mt(function(e){return u(x(e))},"getSourceLabelRotationOffset"),N=mt(function(e){return u(w(e))},"getTargetLabelRotationOffset"),D=mt(function(e){var t=b(e),r=u(b(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":r.x=-t.w-(t.leftPad||0);break;case"right":r.x=-(t.rightPad||0)}switch(e.pstyle("text-valign").value){case"top":r.y=-t.h-(t.topPad||0);break;case"bottom":r.y=-(t.botPad||0)}}return r},"getLabelRotationOffset"),I=a.data.eleTxrCache=new bce(a,{getKey:r,doesEleInvalidateKey:n,drawElement:g,getBoundingBox:v,getRotationPoint:k,getRotationOffset:R,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),M=a.data.lblTxrCache=new bce(a,{getKey:i,drawElement:f,getBoundingBox:b,getRotationPoint:E,getRotationOffset:D,isVisible:T}),O=a.data.slbTxrCache=new bce(a,{getKey:d,drawElement:m,getBoundingBox:x,getRotationPoint:_,getRotationOffset:L,isVisible:T}),$=a.data.tlbTxrCache=new bce(a,{getKey:p,drawElement:y,getBoundingBox:w,getRotationPoint:A,getRotationOffset:N,isVisible:T}),B=a.data.lyrTxrCache=new xce(a),n=(a.onUpdateEleCalcs(mt(function(e,t){I.invalidateElements(t),M.invalidateElements(t),O.invalidateElements(t),$.invalidateElements(t),B.invalidateElements(t);for(var r=0;r<t.length;r++){var i=t[r]._private;i.oldBackgroundTimestamp=i.backgroundTimestamp}},"invalidateTextureCaches")),mt(function(e){for(var t=0;t<e.length;t++)B.enqueueElementRefinement(e[t].ele)},"refineInLayers"));I.onDequeue(n),M.onDequeue(n),O.onDequeue(n),$.onDequeue(n),e.webgl&&a.initWebgl(e,{getStyleKey:r,getLabelKey:i,getSourceLabelKey:d,getTargetLabelKey:p,drawElement:g,drawLabel:f,drawSourceLabel:m,drawTargetLabel:y,getElementBox:v,getLabelBox:b,getSourceLabelBox:x,getTargetLabelBox:w,getElementRotationPoint:k,getElementRotationOffset:R,getLabelRotationPoint:E,getSourceLabelRotationPoint:_,getTargetLabelRotationPoint:A,getLabelRotationOffset:D,getSourceLabelRotationOffset:L,getTargetLabelRotationOffset:N})}function dee(t,r,i){var e=i,n=mt(function(e){ore("Can not register `"+r+"` for `"+t+"` since `"+e+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===t){if(lle.prototype[r])return n(r);lle.prototype[r]=i}else if("collection"===t){if(Qoe.prototype[r])return n(r);Qoe.prototype[r]=i}else if("layout"===t){for(var a=(g=mt(function(e){this.options=e,i.call(this,e),Eee(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},"Layout")).prototype=Object.create(i.prototype),s=[],o=0;o<s.length;o++){var l=s[o];a[l]=a[l]||function(){return this}}a.start&&!a.run?a.run=function(){return this.start(),this}:!a.start&&a.run&&(a.start=function(){return this.run(),this});var c=i.prototype.stop,h=(a.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var r=0;r<t.length;r++)t[r].stop()}return c?c.call(this):this.emit("layoutstop"),this},a.destroy||(a.destroy=function(){return this}),a.cy=function(){return this._private.cy},mt(function(e){return e._private.cy},"getCy")),u={addEventFields:mt(function(e,t){t.layout=e,t.cy=h(e),t.target=e},"addEventFields"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return h(e)},"parent")};Kee(a,{createEmitter:mt(function(){return this._private.emitter=new PQ(u,this),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t){return this.emitter().on(e,t),this},"on"),one:mt(function(e,t){return this.emitter().one(e,t),this},"one"),once:mt(function(e,t){return this.emitter().one(e,t),this},"once"),removeListener:mt(function(e,t){return this.emitter().removeListener(e,t),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:mt(function(e,t){return this.emitter().emit(e,t),this},"emit")}),Vse.eventAliasesOn(a),e=g}else if("renderer"===t&&"null"!==r&&"base"!==r){var d,p,g,f=pee("renderer","base"),m=f.prototype,y=i,v=i.prototype,b=(g=mt(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var x=m[d];if(null!=v[d])return n(d);b[d]=x}for(p in v)b[p]=v[p];m.clientFunctions.forEach(function(e){b[e]=b[e]||function(){are("Renderer does not implement `renderer."+e+"()` on its prototype")}}),e=g}else if("__proto__"===t||"constructor"===t||"prototype"===t)return are(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return ite({map:hhe,keys:[t,r],value:e})}function pee(e,t){return nte({map:hhe,keys:[e,t]})}function gee(e,t,r,i,n){return ite({map:uhe,keys:[e,t,r,i],value:n})}function fee(e,t,r,i){return nte({map:uhe,keys:[e,t,r,i]})}var mee,yee,vee,bee,xee,wee,Tee,kee,Cee,See,Eee,_ee,he,Aee,Ree,Lee,Nee,Dee,Iee,Mee,Oee,Pee,$ee,Bee,Fee,zee,qee,Uee,Gee,jee,Wee,Yee,Vee,Hee,Xee,Kee,Zee,Qee,Jee,ete,tte,rte,ite,nte,ate,ste,ote,lte,cte,hte,ute,dte,pte,gte,fte,mte,yte,vte,bte,xte,wte,Tte,kte,Cte,Ste,Ete,_te,Ate,Rte,Lte,Nte,Dte,Ite,Mte,Ote,Pte,$te,Bte,Fte,zte,qte,Ute,Gte,jte,Wte,Yte,Vte,Hte,Xte,Kte,Zte,Qte,Jte,ere,tre,rre,ire,nre,are,sre,ore,lre,cre,hre,ure,dre,pre,gre,fre,mre,yre,vre,bre,xre,wre,Tre,kre,Cre,Sre,Ere,_re,Are,Rre,Lre,Nre,Dre,Ire,Mre,Ore,Pre,$re,Bre,Fre,zre,qre,Ure,Gre,jre,Wre,Yre,Vre,Hre,Xre,Kre,Zre,Qre,Jre,eie,tie,rie,iie,nie,aie,sie,oie,lie,cie,hie,uie,die,pie,gie,fie,mie,yie,vie,bie,xie,wie,Tie,kie,Cie,Sie,Eie,_ie,Aie,Rie,Lie,Nie,Die,Iie,Mie,Oie,Pie,$ie,Bie,Fie,zie,qie,Uie,Gie,jie,Wie,Yie,Vie,Hie,Xie,Kie,Zie,Qie,Jie,ene,tne,rne,ine,nne,ane,sne,one,lne,cne,hne,une,dne,pne,gne,fne,mne,yne,vne,bne,xne,wne,Tne,kne,Cne,Sne,Ene,_ne,Ane,Rne,Lne,Nne,Dne,Ine,Mne,One,Pne,$ne,Bne,Fne,zne,qne,Une,Gne,jne,Wne,Yne,Vne,Hne,Xne,Kne,Zne,Qne,Jne,eae,tae,rae,iae,nae,aae,sae,oae,lae,cae,hae,uae,dae,pae,gae,fae,mae,yae,vae,bae,xae,wae,Tae,kae,Cae,Sae,Eae,_ae,Aae,Rae,Lae,Nae,Dae,Iae,Mae,Oae,Pae,$ae,Bae,Fae,zae,qae,Uae,Gae,jae,Wae,Yae,Vae,Hae,Xae,Kae,Zae,Qae,Jae,ese,tse,rse,ise,nse,ase,sse,ose,lse,cse,hse,use,dse,pse,gse,fse,mse,yse,vse,bse,xse,wse,Tse,kse,Cse,Sse,Ese,_se,Ase,Rse,Lse,Nse,Dse,Ise,Mse,Ose,Pse,$se,Bse,Fse,zse,qse,Use,Gse,jse,Wse,Yse,Vse,Hse,Xse,Kse,Zse,Qse,Jse,eoe,toe,roe,ioe,noe,aoe,soe,ooe,loe,coe,hoe,uoe,doe,poe,goe,foe,moe,yoe,voe,boe,xoe,woe,Toe,koe,Coe,Soe,Eoe,_oe,Aoe,Roe,Loe,Noe,Doe,Ioe,Moe,Ooe,Poe,$oe,Boe,Foe,zoe,qoe,Uoe,Goe,joe,Woe,Yoe,Voe,Hoe,Xoe,Koe,Zoe,Qoe,Joe,ele,tle,rle,ile,nle,ale,sle,ole,lle,cle,hle,ule,dle,ple,gle,fle,mle,yle,vle,ble,xle,wle,Tle,kle,Cle,Sle,Ele,_le,Ale,Rle,Lle,Nle,Dle,Ile,Mle,Ole,Ple,$le,Ble,Fle,zle,qle,Ule,Gle,jle,Wle,Yle,Vle,Hle,Xle,Kle,Zle,Qle,Jle,ece,tce,rce,ice,nce,ace,sce,oce,lce,cce,hce,uce,dce,pce,gce,fce,J,mce,yce,vce,bce,xce,wce,Tce,kce,Cce,Sce,Ece,_ce,Ace,Rce,Lce,Nce,Dce,Ice,Mce,Oce,Pce,$ce,Bce,Fce,zce,qce,Uce,Gce,jce,Wce,Yce,Vce,Hce,Xce,Kce,Zce,Qce,Jce,ehe,the,rhe,ihe,nhe,ahe,she,ohe,lhe,che,hhe,uhe,dhe,phe,ghe,fhe,mhe=x(()=>{function i(e){if(VK(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<t.length;r++)this.add(t[r])}function e(){VK(this,e),this._obj={}}mt(jK,"_arrayLikeToArray"),mt(WK,"_arrayWithHoles"),mt(YK,"_arrayWithoutHoles"),mt(VK,"_classCallCheck"),mt(HK,"_defineProperties"),mt(XK,"_createClass"),mt(KK,"_createForOfIteratorHelper"),mt(ZK,"_defineProperty$1"),mt(QK,"_iterableToArray"),mt(JK,"_iterableToArrayLimit"),mt(eZ,"_nonIterableRest"),mt(tZ,"_nonIterableSpread"),mt(rZ,"_slicedToArray"),mt(iZ,"_toConsumableArray"),mt(nZ,"_toPrimitive"),mt(aZ,"_toPropertyKey"),mt(sZ,"_typeof"),mt(oZ,"_unsupportedIterableToArray"),mee="u"<typeof window?null:window,yee=mee?mee.navigator:null,mee&&mee.document,vee=sZ(""),bee=sZ({}),xee=sZ(function(){}),wee="u"<typeof HTMLElement?"undefined":sZ(HTMLElement),Tee=mt(function(e){return e&&e.instanceString&&Cee(e.instanceString)?e.instanceString():null},"instanceStr"),kee=mt(function(e){return null!=e&&sZ(e)==vee},"string"),Cee=mt(function(e){return null!=e&&sZ(e)===xee},"fn"),See=mt(function(e){return!Lee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},"array"),Eee=mt(function(e){return null!=e&&sZ(e)===bee&&!See(e)&&e.constructor===Object},"plainObject"),_ee=mt(function(e){return null!=e&&sZ(e)===bee},"object"),he=mt(function(e){return null!=e&&sZ(e)===sZ(1)&&!isNaN(e)},"number"),Aee=mt(function(e){return he(e)&&Math.floor(e)===e},"integer"),Ree=mt(function(e){if("undefined"!==wee)return null!=e&&e instanceof HTMLElement},"htmlElement"),Lee=mt(function(e){return Nee(e)||Dee(e)},"elementOrCollection"),Nee=mt(function(e){return"collection"===Tee(e)&&e._private.single},"element"),Dee=mt(function(e){return"collection"===Tee(e)&&!e._private.single},"collection"),Iee=mt(function(e){return"core"===Tee(e)},"core"),Mee=mt(function(e){return"stylesheet"===Tee(e)},"stylesheet"),Oee=mt(function(e){return"event"===Tee(e)},"event"),Pee=mt(function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},"emptyString"),$ee=mt(function(e){return!("u"<typeof HTMLElement)&&e instanceof HTMLElement},"domElement"),Bee=mt(function(e){return Eee(e)&&he(e.x1)&&he(e.x2)&&he(e.y1)&&he(e.y2)},"boundingBox"),Fee=mt(function(e){return _ee(e)&&Cee(e.then)},"promise"),zee=mt(function(){return yee&&yee.userAgent.match(/msie|trident|edge/i)},"ms"),qee=mt(function(i,n){n=n||mt(function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")},"keyFn");var a=mt(function(){var e=arguments,t=n.apply(this,e),r=a.cache;return r[t]||(r[t]=i.apply(this,e))},"memoizedFn");return a.cache={},a},"memoize"),Uee=qee(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Gee=qee(function(e){return e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),jee=qee(function(e,t){return e+t[0].toUpperCase()+t.substring(1)},function(e,t){return e+"$"+t}),Wee=mt(function(e){return Pee(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Yee=mt(function(e,t){return e.slice(-1*t.length)===t},"endsWith"),Vee="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Hee=mt(function(e,t){return e<t?-1:t<e?1:0},"ascending"),Xee=mt(function(e,t){return-1*Hee(e,t)},"descending"),Kee=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r<t.length;r++){var i=t[r];if(null!=i)for(var n=Object.keys(i),a=0;a<n.length;a++){var s=n[a];e[s]=i[s]}}return e},Zee=mt(function(e){var t,r;if((4===e.length||7===e.length)&&"#"===e[0])return e=4===e.length?(t=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)):(t=parseInt(e[1]+e[2],16),r=parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16)),[t,r,e]},"hex2tuple"),Qee=mt(function(e){var t,r,i,n,a,s,o;function l(e,t,r){return r<0&&(r+=1),1<r&&--r,r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(mt(l,"hue2rgb"),e=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e)){if((t=parseInt(e[1]))<0?t=(360- -1*t%360)%360:360<t&&(t%=360),t/=360,(r=parseFloat(e[2]))<0||100<r||(r/=100,(n=parseFloat(e[3]))<0)||100<n||(n/=100,void 0!==(i=e[4])&&((i=parseFloat(i))<0||1<i)))return;0===r?a=s=o=Math.round(255*n):(n=2*n-(e=n<.5?n*(1+r):n+r-n*r),a=Math.round(255*l(n,e,t+1/3)),s=Math.round(255*l(n,e,t)),o=Math.round(255*l(n,e,t-1/3))),r=[a,s,o,i]}return r},"hsl2tuple"),Jee=mt(function(e){var t=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(t){for(var r=[],i=[],n=1;n<=3;n++){var a=t[n];if("%"===a[a.length-1]&&(i[n]=!0),a=parseFloat(a),(a=i[n]?a/100*255:a)<0||255<a)return;r.push(Math.floor(a))}if((i[1]||i[2]||i[3])&&!(i[1]&&i[2]&&i[3]))return;if(void 0!==(e=t[4])){if((e=parseFloat(e))<0||1<e)return;r.push(e)}}return r},"rgb2tuple"),ete=mt(function(e){return rte[e.toLowerCase()]},"colorname2tuple"),tte=mt(function(e){return(See(e)?e:null)||ete(e)||Zee(e)||Jee(e)||Qee(e)},"color2tuple"),rte={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ite=mt(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n<i;n++){var a=r[n];if(Eee(a))throw Error("Tried to set map with object key");n<r.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},"setMap"),nte=mt(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n<i;n++){var a=r[n];if(Eee(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},"getMap"),ate=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mt(lZ,"getDefaultExportFromCjs"),mt(cZ,"requireIsObject"),mt(hZ,"require_freeGlobal"),mt(uZ,"require_root"),mt(dZ,"requireNow"),mt(pZ,"require_trimmedEndIndex"),mt(gZ,"require_baseTrim"),mt(fZ,"require_Symbol"),mt(mZ,"require_getRawTag"),mt(yZ,"require_objectToString"),mt(vZ,"require_baseGetTag"),mt(bZ,"requireIsObjectLike"),mt(xZ,"requireIsSymbol"),mt(wZ,"requireToNumber"),mt(TZ,"requireDebounce"),tre=TZ(),Mte=lZ(tre),Ote=mee?mee.performance:null,Pte=Ote&&Ote.now?function(){return Ote.now()}:function(){return Date.now()},$te=(()=>{if(mee){if(mee.requestAnimationFrame)return function(e){mee.requestAnimationFrame(e)};if(mee.mozRequestAnimationFrame)return function(e){mee.mozRequestAnimationFrame(e)};if(mee.webkitRequestAnimationFrame)return function(e){mee.webkitRequestAnimationFrame(e)};if(mee.msRequestAnimationFrame)return function(e){mee.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Pte())},1e3/60)}})(),Bte=mt(function(e){return $te(e)},"requestAnimationFrame"),Fte=Pte,zte=mt(function(e){for(var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261;!(t=e.next()).done;)r=65599*r+t.value|0;return r},"hashIterableInts"),qte=mt(function(e){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+e|0},"hashInt"),Ute=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(t<<5)+t+e|0},"hashIntAlt"),Gte=mt(function(e,t){return 2097152*e+t},"combineHashes"),jte=mt(function(e){return 2097152*e[0]+e[1]},"combineHashesArray"),Wte=mt(function(e,t){return[qte(e[0],t[0]),Ute(e[1],t[1])]},"hashArrays"),Yte=mt(function(e,t){var r={value:0,done:!1},i=0,n=e.length,a={next:mt(function(){return i<n?r.value=e[i++]:r.done=!0,r},"next")};return zte(a,t)},"hashIntsArray"),Vte=mt(function(e,t){var r={value:0,done:!1},i=0,n=e.length,a={next:mt(function(){return i<n?r.value=e.charCodeAt(i++):r.done=!0,r},"next")};return zte(a,t)},"hashString"),Hte=mt(function(){return Xte(arguments)},"hashStrings"),Xte=mt(function(e){for(var t=0;t<e.length;t++)var r=e[t],i=0===t?Vte(r):Vte(r,i);return i},"hashStringsArray"),mt(kZ,"rotatePoint"),Kte=mt(function(e,t,r,i,n,a){return{x:(e-r)*n+r,y:(t-i)*a+i}},"movePointByBoxAspect"),mt(CZ,"rotatePosAndSkewByBox"),Zte=!0,Qte=null!=console.warn,Jte=null!=console.trace,ere=Number.MAX_SAFE_INTEGER||9007199254740991,tre=mt(function(){return!0},"trueify"),rre=mt(function(){return!1},"falsify"),ire=mt(function(){return 0},"zeroify"),nre=mt(function(){},"noop"),are=mt(function(e){throw new Error(e)},"error"),sre=mt(function(e){if(void 0===e)return Zte;Zte=!!e},"warnings"),ore=mt(function(e){sre()&&(Qte?console.warn(e):(console.log(e),Jte&&console.trace()))},"warn"),lre=mt(function(e){return Kee({},e)},"clone"),cre=mt(function(e){return null==e?e:See(e)?e.slice():Eee(e)?lre(e):e},"copy"),hre=mt(function(e){return e.slice()},"copyArray"),ure=mt(function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},"uuid"),dre={},pre=mt(function(){return dre},"staticEmptyObject"),she=mt(function(a){var s=Object.keys(a);return function(e){for(var t={},r=0;r<s.length;r++){var i=s[r],n=e?.[i];t[i]=void 0===n?a[i]:n}return t}},"defaults"),gre=mt(function(e,t,r){for(var i=e.length-1;0<=i;i--)e[i]===t&&e.splice(i,1)},"removeFromArray"),fre=mt(function(e){e.splice(0,e.length)},"clearArray"),mre=mt(function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},"push"),yre=mt(function(e,t,r){return e[t=r?jee(r,t):t]},"getPrefixedProperty"),vre=mt(function(e,t,r,i){e[t=r?jee(r,t):t]=i},"setPrefixedProperty"),mt(e,"ObjectMap"),$ce=XK(e,[{key:"set",value:mt(function(e,t){return this._obj[e]=t,this},"set")},{key:"delete",value:mt(function(e){return this._obj[e]=void 0,this},"_delete")},{key:"clear",value:mt(function(){this._obj={}},"clear")},{key:"has",value:mt(function(e){return void 0!==this._obj[e]},"has")},{key:"get",value:mt(function(e){return this._obj[e]},"get")}]),bre=typeof Map<"u"?Map:$ce,mt(i,"ObjectSet"),$ce=XK(i,[{key:"instanceString",value:mt(function(){return"set"},"instanceString")},{key:"add",value:mt(function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)},"add")},{key:"delete",value:mt(function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)},"_delete")},{key:"clear",value:mt(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:mt(function(e){return 1===this._obj[e]},"has")},{key:"toArray",value:mt(function(){var t=this;return Object.keys(this._obj).filter(function(e){return t.has(e)})},"toArray")},{key:"forEach",value:mt(function(e,t){return this.toArray().forEach(e,t)},"forEach")}]),xre="undefined"!==("u"<typeof Set?"undefined":sZ(Set))?Set:$ce,wre=mt(function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&Iee(e)){var i=t.group;if("nodes"!==(i=null==i?t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes":i)&&"edges"!==i)are("An element must be of type `nodes` or `edges`; you specified `"+i+"`");else{this.length=1;var n,a=(this[0]=this)._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===i:!!t.pannable,active:!1,classes:new xre,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}},s=(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition&&(i=t.renderedPosition,n=e.pan(),e=e.zoom(),a.position={x:(i.x-n.x)/e,y:(i.y-n.y)/e}),[]);See(t.classes)?s=t.classes:kee(t.classes)&&(s=t.classes.split(/\s+/));for(var o=0,l=s.length;o<l;o++){var c=s[o];c&&""!==c&&a.classes.add(c)}this.createEmitter(),void 0!==r&&!r||this.restore(),(i=t.style||t.css)&&(ore("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(i))}}else are("An element must have a core reference and parameters set")},"Element"),($ce={breadthFirstSearch:($ce=mt(function(k){return k={bfs:k.bfs||!k.dfs,dfs:k.dfs||!k.bfs},mt(function(e,u,d){Eee(e)&&!Lee(e)&&(e=(t=e).roots||t.root,u=t.visit,d=t.directed),d=2!==arguments.length||Cee(u)?d:u,u=Cee(u)?u:function(){};for(var p,t=this._private.cy,r=e=kee(e)?this.filter(e):e,g=[],f=[],m={},y={},v={},b=0,e=this.byGroup(),x=e.nodes,w=e.edges,i=0;i<r.length;i++){var n=r[i],a=n.id();n.isNode()&&(g.unshift(n),k.bfs&&(v[a]=!0,f.push(n)),y[a]=0)}for(var s,o=mt(function(){var t=k.bfs?g.shift():g.pop(),e=t.id();if(k.dfs){if(v[e])return 0;v[e]=!0,f.push(t)}var r=y[e],i=m[e],n=null!=i?i.source():null,a=null!=i?i.target():null,a=null==i?void 0:(t.same(n)?a:n)[0];if(!0===(n=u(t,i,a,b++,r)))return p=t,1;if(!1===n)return 1;for(var s=t.connectedEdges().filter(function(e){return(!d||e.source().same(t))&&w.has(e)}),o=0;o<s.length;o++){var l=s[o],c=l.connectedNodes().filter(function(e){return!e.same(t)&&x.has(e)}),h=c.id();0===c.length||v[h]||(c=c[0],g.push(c),k.bfs&&(v[h]=!0,f.push(c)),m[h]=l,y[h]=y[e]+1)}},"_loop");0!==g.length&&(0===(s=o())||1!==s););for(var l=t.collection(),c=0;c<f.length;c++){var h=f[c],T=m[h.id()];null!=T&&l.push(T),l.push(h)}return{path:t.collection(l),found:t.collection(p)}},"searchFn")},"defineSearch"))({bfs:!0}),depthFirstSearch:$ce({dfs:!0})}).bfs=$ce.breadthFirstSearch,$ce.dfs=$ce.depthFirstSearch,kre=(Tre={exports:{}}).exports,mt(SZ,"requireHeap$1"),mt(EZ,"requireHeap"),ghe=EZ(),_re=lZ(ghe),Are=she({root:null,weight:mt(function(e){return 1},"weight"),directed:!1}),ghe={dijkstra:mt(function(e){Eee(e)||(e={root:(t=arguments)[0],weight:t[1],directed:t[2]});var t=Are(e),e=t.root,l=t.directed,a=this,c=t.weight,r=(kee(e)?this.filter(e):e)[0],i={},s={},n={},o=(t=this.byGroup()).nodes,h=t.edges;h.unmergeBy(function(e){return e.isLoop()});for(var u=mt(function(e){return i[e.id()]},"getDist"),d=mt(function(e,t){i[e.id()]=t,p.updateItem(e)},"setDist"),p=new _re(function(e,t){return u(e)-u(t)}),g=0;g<o.length;g++){var f=o[g];i[f.id()]=f.same(r)?0:1/0,p.push(f)}for(var m=mt(function(e,t){for(var r,i=(l?e.edgesTo(t):e.edgesWith(t)).intersect(h),n=1/0,a=0;a<i.length;a++){var s=i[a],o=c(s);(o<n||!r)&&(n=o,r=s)}return{edge:r,dist:n}},"distBetween");0<p.size();){var y=p.pop(),v=u(y),b=y.id();if((n[b]=v)!==1/0)for(var x=y.neighborhood().intersect(o),w=0;w<x.length;w++){var T=x[w],k=T.id(),C=m(y,T),S=v+C.dist;S<u(T)&&(d(T,S),s[k]={node:y,edge:C.edge})}}return{distanceTo:mt(function(e){return e=(kee(e)?o.filter(e):e)[0],n[e.id()]},"distanceTo"),pathTo:mt(function(e){var t=[],r=e=(kee(e)?o.filter(e):e)[0],i=r.id();if(0<e.length)for(t.unshift(e);s[i];){var n=s[i];t.unshift(n.edge),t.unshift(n.node),i=(r=n.node).id()}return a.spawn(t)},"pathTo")}},"dijkstra")},Bce={kruskal:mt(function(r){r=r||function(e){return 1};for(var e=(t=this.byGroup()).nodes,t=t.edges,i=e.length,n=new Array(i),a=e,s=mt(function(e){for(var t=0;t<n.length;t++)if(n[t].has(e))return t},"findSetIndex"),o=0;o<i;o++)n[o]=this.spawn(e[o]);for(var l=t.sort(function(e,t){return r(e)-r(t)}),c=0;c<l.length;c++){var h=l[c],u=h.source()[0],d=h.target()[0],u=s(u),d=s(d),p=n[u],g=n[d];u!==d&&(a.merge(h),p.merge(g),n.splice(d,1))}return a},"kruskal")},Rre=she({root:null,goal:null,weight:mt(function(e){return 1},"weight"),heuristic:mt(function(e){return 0},"heuristic"),directed:!1}),Oce={aStar:mt(function(e){var t,r,i=this.cy(),n=(e=Rre(e)).root,a=e.goal,s=e.heuristic,o=e.directed,l=e.weight,n=i.collection(n)[0],a=i.collection(a)[0],e=n.id(),c=a.id(),h={},u={},d={},p=new _re(function(e,t){return u[e.id()]-u[t.id()]}),g=new xre,f={},m={},y=mt(function(e,t){p.push(e),g.add(t)},"addToOpenSet"),v=mt(function(){t=p.pop(),r=t.id(),g.delete(r)},"popFromOpenSet"),b=mt(function(e){return g.has(e)},"isInOpenSet");y(n,e),h[e]=0,u[e]=s(n);for(var x=0;0<p.size();){if(v(),x++,r===c){for(var w=[],T=a,k=c,C=m[k];w.unshift(T),null!=C&&w.unshift(C),null!=(T=f[k]);)C=m[k=T.id()];return{found:!0,distance:h[r],path:this.spawn(w),steps:x}}d[r]=!0;for(var S=t._private.edges,E=0;E<S.length;E++){var _,A,R,L=S[E];!this.hasElementWithId(L.id())||o&&L.data("source")!==r||(_=L.source(),A=L.target(),A=(_=_.id()!==r?_:A).id(),this.hasElementWithId(A)&&!d[A]&&(R=h[r]+l(L),b(A)?R<h[A]&&(u[A]=(h[A]=R)+s(_),f[A]=t,m[A]=L):(u[A]=(h[A]=R)+s(_),y(_,A),f[A]=t,m[A]=L)))}}return{found:!1,distance:void 0,path:void 0,steps:x}},"aStar")},Lre=she({weight:mt(function(e){return 1},"weight"),directed:!1}),qle={floydWarshall:mt(function(e){for(var s=this.cy(),t=(e=Lre(e)).weight,r=e.directed,i=t,n=(e=this.byGroup()).nodes,a=e.edges,o=n.length,l=o*o,c=mt(function(e){return n.indexOf(e)},"indexOf"),h=mt(function(e){return n[e]},"atIndex"),u=new Array(l),d=0;d<l;d++){var p=d%o;u[d]=(d-p)/o==p?0:1/0}for(var g=new Array(l),f=new Array(l),m=0;m<a.length;m++){var y,v,b=a[m],x=b.source()[0],w=b.target()[0];x!==w&&(x=c(x),w=c(w),v=x*o+w,y=i(b),u[v]>y&&(u[v]=y,g[v]=w,f[v]=b),r||(v=w*o+x,!r&&u[v]>y&&(u[v]=y,g[v]=x,f[v]=b)))}for(var T=0;T<o;T++)for(var k=0;k<o;k++)for(var C=k*o+T,S=0;S<o;S++){var E=k*o+S,_=T*o+S;u[C]+u[_]<u[E]&&(u[E]=u[C]+u[_],g[E]=g[C])}var A=mt(function(e){return(kee(e)?s.filter(e):e)[0]},"getArgEle"),R=mt(function(e){return c(A(e))},"indexOfArgEle");return{distance:mt(function(e,t){return e=R(e),t=R(t),u[e*o+t]},"distance"),path:mt(function(e,t){var r=R(e),i=R(t),e=h(r);if(r===i)return e.collection();if(null==g[r*o+i])return s.collection();var n,a=s.collection();for(a.merge(e);r!==i;)r=g[(n=r)*o+i],n=f[n*o+r],a.merge(n),a.merge(h(r));return a},"path")}},"floydWarshall")},Nre=she({weight:mt(function(e){return 1},"weight"),directed:!1,root:null}),Sce={bellmanFord:mt(function(e){var P=this,t=(m=Nre(e)).weight,r=m.directed,s=m.root,i=t,o=this,n=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new bre,u=!1,d=[],s=n.collection(s)[0];a.unmergeBy(function(e){return e.isLoop()});for(var p=a.length,g=mt(function(e){var t=h.get(e.id());return t||(t={},h.set(e.id(),t)),t},"getInfo"),f=mt(function(e){return(kee(e)?n.$(e):e)[0]},"getNodeFromTo"),t=mt(function(e){return g(f(e)).dist},"distanceTo"),m=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s,r=[],i=f(e);;){if(null==i)return P.spawn();var n=(a=g(i)).edge,a=a.pred;if(r.unshift(i[0]),i.same(t)&&0<r.length)break;null!=n&&r.unshift(n),i=a}return o.spawn(r)},"pathTo"),y=0;y<c;y++){var v=l[y],b=g(v);v.same(s)?b.dist=0:b.dist=1/0,b.pred=null,b.edge=null}for(var x=!1,$=mt(function(e,t,r,i,n,a){(a=i.dist+a)<n.dist&&!r.same(i.edge)&&(n.dist=a,n.pred=e,n.edge=r,x=!0)},"checkForEdgeReplacement"),B=1;B<c;B++){for(var x=!1,w=0;w<p;w++){var T=a[w],k=T.source(),C=T.target(),F=i(T),z=g(k),q=g(C);$(k,C,T,z,q,F),r||$(C,k,T,q,z,F)}if(!x)break}if(x)for(var U=[],S=0;S<p;S++){var G=(E=a[S]).source(),j=E.target(),E=i(E),_=g(G).dist,A=g(j).dist;if(_+E<A||!r&&A+E<_){if(u||(ore("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===e.findNegativeWeightCycles)break;var R=[];_+E<A&&R.push(G),!r&&A+E<_&&R.push(j);for(var W=R.length,L=0;L<W;L++){var N=R[L],D=[N];D.push(g(N).edge);for(var I=g(N).pred;-1===D.indexOf(I);)D.push(I),D.push(g(I).edge),I=g(I).pred;for(var Y=(D=D.slice(D.indexOf(I)))[0].id(),M=0,O=2;O<D.length;O+=2)D[O].id()<Y&&(Y=D[O].id(),M=O);(D=D.slice(M).concat(D.slice(0,M))).push(D[0]),N=D.map(function(e){return e.id()}).join(","),-1===U.indexOf(N)&&(d.push(o.spawn(D)),U.push(N))}}}return{distanceTo:t,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},Dre=Math.sqrt(2),Ire=mt(function(e,t,r){0===r.length&&are("Karger-Stein must be run on a connected (sub)graph");for(var i=t[(e=r[e])[1]],n=t[e[2]],a=r,s=a.length-1;0<=s;s--){var o=(l=a[s])[1],l=l[2];(t[o]===i&&t[l]===n||t[o]===n&&t[l]===i)&&a.splice(s,1)}for(var c=0;c<a.length;c++){var h=a[c];h[1]===n?(a[c]=h.slice(),a[c][1]=i):h[2]===n&&(a[c]=h.slice(),a[c][2]=i)}for(var u=0;u<t.length;u++)t[u]===n&&(t[u]=i);return a},"collapse"),Mre=mt(function(e,t,r,i){for(;i<r;){var n=Math.floor(Math.random()*t.length);t=Ire(n,e,t),r--}return t},"contractUntil"),Dce={kargerStein:mt(function(){var r=this,e=this.byGroup(),t=e.nodes,i=e.edges,n=(i.unmergeBy(function(e){return e.isLoop()}),t.length),a=i.length,s=Math.ceil(Math.pow(Math.log(n)/Math.LN2,2)),o=Math.floor(n/Dre);if(!(n<2)){for(var l=[],c=0;c<a;c++){var h=i[c];l.push([c,t.indexOf(h.source()),t.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(n),g=new Array(n),f=new Array(n),m=mt(function(e,t){for(var r=0;r<n;r++)t[r]=e[r]},"copyNodesMap"),y=0;y<=s;y++){for(var v=0;v<n;v++)g[v]=v;var b=(x=Mre(g,l.slice(),n,o)).slice(),x=(m(g,f),Mre(g,x,o,2)),b=Mre(f,b,o,2);x.length<=b.length&&x.length<u?(u=x.length,d=x,m(g,p)):b.length<=x.length&&b.length<u&&(u=b.length,d=b,m(f,p))}for(var w=this.spawn(d.map(function(e){return i[e[0]]})),T=this.spawn(),k=this.spawn(),C=p[0],S=0;S<p.length;S++){var E=p[S],_=t[S];(E===C?T:k).merge(_)}return e=[(e=mt(function(e){var t=r.spawn();return e.forEach(function(e){t.merge(e),e.connectedEdges().forEach(function(e){r.contains(e)&&!w.contains(e)&&t.merge(e)})}),t},"constructComponent"))(T),e(k)],{cut:w,components:e,partition1:T,partition2:k}}are("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},Ore=mt(function(e){return{x:e.x,y:e.y}},"copyPosition"),Pre=mt(function(e,t,r){return{x:e.x*t+r.x,y:e.y*t+r.y}},"modelToRenderedPosition"),$re=mt(function(e,t,r){return{x:(e.x-r.x)/t,y:(e.y-r.y)/t}},"renderedToModelPosition"),Bre=mt(function(e){return{x:e[0],y:e[1]}},"array2point"),Fre=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=1/0,n=t;n<r;n++){var a=e[n];isFinite(a)&&(i=Math.min(a,i))}return i},"min"),zre=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=-1/0,n=t;n<r;n++){var a=e[n];isFinite(a)&&(i=Math.max(a,i))}return i},"max"),qre=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=0,n=0,a=t;a<r;a++){var s=e[a];isFinite(s)&&(i+=s,n++)}return i/n},"mean"),Ure=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];i?e=e.slice(t,r):(r<e.length&&e.splice(r,e.length-r),0<t&&e.splice(0,t));for(var s=0,o=e.length-1;0<=o;o--){var l=e[o];a?isFinite(l)||(e[o]=-1/0,s++):e.splice(o,1)}return n&&e.sort(function(e,t){return e-t}),i=e.length,r=Math.floor(i/2),i%2!=0?e[r+1+s]:(e[r-1+s]+e[r+s])/2},"median"),Gre=mt(function(e){return Math.PI*e/180},"deg2rad"),jre=mt(function(e,t){return Math.atan2(t,e)-Math.PI/2},"getAngleFromDisp"),Wre=Math.log2||function(e){return Math.log(e)/Math.log(2)},Yre=mt(function(e){return 0<e?1:e<0?-1:0},"signum"),Vre=mt(function(e,t){return Math.sqrt(Hre(e,t))},"dist"),Hre=mt(function(e,t){var r=t.x-e.x;return r*r+(t=t.y-e.y)*t},"sqdist"),Xre=mt(function(e){for(var t=e.length,r=0,i=0;i<t;i++)r+=e[i];for(var n=0;n<t;n++)e[n]=e[n]/r;return e},"inPlaceSumNormalize"),Kre=mt(function(e,t,r,i){return(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*r},"qbezierAt"),Zre=mt(function(e,t,r,i){return{x:Kre(e.x,t.x,r.x,i),y:Kre(e.y,t.y,r.y,i)}},"qbezierPtAt"),Qre=mt(function(e,t,r,i){var n=t.x-e.x,a=t.y-e.y,t=Vre(e,t);return r=r??0,{x:e.x+n/t*(i=i??r*t),y:e.y+a/t*i}},"lineAt"),Jre=mt(function(e,t,r){return Math.max(e,Math.min(r,t))},"bound"),eie=mt(function(e){return null==e?{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0}:null!=e.x1&&null!=e.y1?null!=e.x2&&null!=e.y2&&e.x2>=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"),tie=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),rie=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"),iie=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"),nie=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"),aie=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),sie=mt(function(e){var t,r,i,n,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?t=r=i=n=a[0]:2===a.length?(t=i=a[0],n=r=a[1]):4===a.length&&(t=(a=rZ(a,4))[0],r=a[1],i=a[2],n=a[3]),e.x1-=n,e.x2+=r,e.y1-=t,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),oie=mt(function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),lie=mt(function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),cie=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),hie=mt(function(e,t){return cie(e,t.x,t.y)},"pointInBoundingBox"),uie=mt(function(e,t){return cie(e,t.x1,t.y1)&&cie(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),die=null!=(Zce=Math.hypot)?Zce:function(e,t){return Math.sqrt(e*e+t*t)},mt(_Z,"inflatePolygon"),mt(AZ,"miterBox"),pie=mt(function(e,t,r,i,n,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?$ie(n,a):l,n=n/2,a=a/2,c=(l=Math.min(l,n,a))!==n,h=l!==a;if(c){var u=i-a-s;if(0<(u=Rie(e,t,r,i,r-n+l-s,u,r+n-l+s,u,!1)).length)return u}return h&&0<(u=Rie(e,t,r,i,o=r+n+s,i-a+l-s,o,i+a-l+s,!1)).length||c&&0<(u=Rie(e,t,r,i,r-n+l-s,o=i+a+s,r+n-l+s,o,!1)).length||h&&0<(u=Rie(e,t,r,i,c=r-n-s,i-a+l-s,c,i+a-l+s,!1)).length?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||0<(c=_ie(e,t,r,i,u=r+n-l,o=i-a+l,l+s)).length&&c[0]>=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"),gie=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"),fie=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!(e<c||r<e||t<s||n<t)},"inBezierVicinity"),mie=mt(function(e,t,r,i){return(i=t*t-4*e*(r-=i))<0?[]:[(-t+(r=Math.sqrt(i)))/(i=2*e),(-t-r)/i]},"solveQuadratic"),yie=mt(function(e,t,r,i,n){var a,s,o;i=-27*(i/=e=0===e?1e-5:e)+(t/=e)*(9*(r/=e)-t*t*2),r=(e=(3*r-t*t)/9)*e*e+(i/=54)*i,t/=3,(n[1]=0)<r?(a=(a=i+Math.sqrt(r))<0?-Math.pow(-a,1/3):Math.pow(a,1/3),s=(s=i-Math.sqrt(r))<0?-Math.pow(-s,1/3):Math.pow(s,1/3),n[0]=-t+a+s,n[4]=n[2]=-(t+=(a+s)/2),t=Math.sqrt(3)*(-s+a)/2,n[3]=t,n[5]=-t):(n[5]=n[3]=0)==r?(o=i<0?-Math.pow(-i,1/3):Math.pow(i,1/3),n[0]=2*o-t,n[4]=n[2]=-(o+t)):(e=-e,s=Math.acos(i/Math.sqrt(e*e*e)),o=2*Math.sqrt(e),n[0]=-t+o*Math.cos(s/3),n[2]=-t+o*Math.cos((s+2*Math.PI)/3),n[4]=-t+o*Math.cos((s+4*Math.PI)/3))},"solveCubic"),vie=mt(function(e,t,r,i,n,a,s,o){var l=[];yie(+r*r-4*r*n+2*r*s+4*n*n-4*n*s+s*s+i*i-4*i*a+2*i*o+4*a*a-4*a*o+o*o,9*r*n-3*r*r-3*r*s-6*n*n+3*n*s+9*i*a-3*i*i-3*i*o-6*a*a+3*a*o,3*r*r-6*r*n+r*s-r*e+2*n*n+2*n*e-s*e+3*i*i-6*i*a+i*o-i*t+2*a*a+2*a*t-o*t,+r*n-r*r+r*e-n*e+i*a-i*i+i*t-a*t,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&0<=l[h]&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p=-1,g=0;g<c.length;g++)d=Math.pow(1-c[g],2)*r+2*(1-c[g])*c[g]*n+c[g]*c[g]*s,u=Math.pow(1-c[g],2)*i+2*(1-c[g])*c[g]*a+c[g]*c[g]*o,d=Math.pow(d-e,2)+Math.pow(u-t,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),bie=mt(function(e,t,r,i,n,a){var s=[e-r,t-i],i=(r=[n-r,a-i])[0]*r[0]+r[1]*r[1],o=s[0]*s[0]+s[1]*s[1],r=(s=s[0]*r[0]+s[1]*r[1])*s/i;return s<0?o:i<r?(e-n)*(e-n)+(t-a)*(t-a):o-r},"sqdistToFiniteLine"),xie=mt(function(e,t,r){for(var i,n,a,s,o=0,l=0;l<r.length/2;l++)if(n=r[2*l+1],s=l+1<r.length/2?(a=r[2*(l+1)],r[2*(l+1)+1]):(a=r[2*(l+1-r.length/2)],r[2*(l+1-r.length/2)+1]),(i=r[2*l])!=e||a!=e){if(!(e<=i&&a<=e||i<=e&&e<=a))continue;t<(e-i)/(a-i)*(s-n)+n&&o++}return o%2!=0},"pointInsidePolygonPoints"),wie=mt(function(e,t,r,i,n,a,s,o,l){var c=new Array(r.length);null!=o[0]?(h=Math.atan(o[1]/o[0]),o[0]<0?h+=Math.PI/2:h=-h-Math.PI/2):h=o;for(var h,u=Math.cos(-h),d=Math.sin(-h),p=0;p<c.length/2;p++)c[2*p]=a/2*(r[2*p]*u-r[2*p+1]*d),c[2*p+1]=s/2*(r[2*p+1]*u+r[2*p]*d),c[2*p]+=i,c[2*p+1]+=n;return h=0<l?(o=Cie(c,-l),kie(o)):c,xie(e,t,h)},"pointInsidePolygon"),Tie=mt(function(e,t,r,i,n,a,s,o){for(var l=new Array(2*r.length),c=0;c<o.length;c++){var h=o[c];if(l[4*c+0]=h.startX,l[4*c+1]=h.startY,l[4*c+2]=h.stopX,l[4*c+3]=h.stopY,Math.pow(h.cx-e,2)+Math.pow(h.cy-t,2)<=Math.pow(h.radius,2))return!0}return xie(e,t,l)},"pointInsideRoundPolygon"),kie=mt(function(e){for(var t,r,i,n=new Array(e.length/2),a=0;a<e.length/4;a++){var s=a<e.length/4-1?(t=e[4*(a+1)],r=e[4*(a+1)+1],i=e[4*(a+1)+2],e[4*(a+1)+3]):(t=e[0],r=e[1],i=e[2],e[3]),s=Rie(e[4*a],e[4*a+1],e[4*a+2],e[4*a+3],t,r,i,s,!0);n[2*a]=s[0],n[2*a+1]=s[1]}return n},"joinLines"),Cie=mt(function(e,t){for(var r,i=new Array(2*e.length),n=0;n<e.length/2;n++){var a,s,o,l=(o=n<e.length/2-1?(r=e[2*(n+1)],e[2*(n+1)+1]):(r=e[0],e[1]))-(s=e[2*n+1]),c=-(r-(a=e[2*n])),h=Math.sqrt(l*l+c*c),c=c/h;i[4*n]=a+(l/=h)*t,i[4*n+1]=s+c*t,i[4*n+2]=r+l*t,i[4*n+3]=o+c*t}return i},"expandPolygon"),Sie=mt(function(e,t,r,i,n,a){var s=r-e,o=i-t;return s/=n,o/=a,(a=(n=Math.sqrt(s*s+o*o))-1)<0?[]:[(r-e)*(s=a/n)+e,(i-t)*s+t]},"intersectLineEllipse"),Eie=mt(function(e,t,r,i,n,a,s){return(e=(e-n)/(r/2+s))*e+(t=(t-a)/(i/2+s))*t<=1},"checkInEllipse"),_ie=mt(function(e,t,r,i,n,a,s){return r=[r-e,i-t],i=[e-n,t-a],n=r[0]*r[0]+r[1]*r[1],(i=(a=2*(i[0]*r[0]+i[1]*r[1]))*a-4*n*(i[0]*i[0]+i[1]*i[1]-s*s))<0||(s=(-a+Math.sqrt(i))/(2*n),a=(-a-Math.sqrt(i))/(2*n),i=Math.min(s,a),n=Math.max(s,a),s=[],0<=i&&i<=1&&s.push(i),0<=n&&n<=1&&s.push(n),0===s.length)?[]:(a=s[0]*r[0]+e,i=s[0]*r[1]+t,1<s.length&&s[0]!=s[1]?[a,i,s[1]*r[0]+e,s[1]*r[1]+t]:[a,i])},"intersectLineCircle"),Aie=mt(function(e,t,r){return t<=e&&e<=r||r<=e&&e<=t?e:e<=t&&t<=r||r<=t&&t<=e?t:r},"midOfThree"),Rie=mt(function(e,t,r,i,n,a,s,o,l){var c=e-n,h=r-e,u=s-n,d=i-t,p=o-a,g=u*(f=t-a)-p*c,f=h*f-d*c;return 0!=(c=p*h-u*d)?(p=f/c,-.001<=(u=g/c)&&u<=1.001&&-.001<=p&&p<=1.001||l?[e+u*h,t+u*d]:[]):0==g||0==f?Aie(e,r,s)===s?[s,o]:Aie(e,r,n)===n?[n,a]:Aie(n,s,r)===r?[r,i]:[]:[]},"finiteLinesIntersect"),Lie=mt(function(e,t,r,i,n){var a=[],s=i/2,o=n/2,l=t,c=r;a.push({x:l+s*e[0],y:c+o*e[1]});for(var h=1;h<e.length/2;h++)a.push({x:l+s*e[2*h],y:c+o*e[2*h+1]});return a},"transformPoints"),Nie=mt(function(e,t,r,i,n,a,s,o){var l=[],c=new Array(r.length);if(null!=a){for(var h,u=0;u<c.length/2;u++)c[2*u]=r[2*u]*a+i,c[2*u+1]=r[2*u+1]*s+n;h=0<o?(o=Cie(c,-o),kie(o)):c}else h=r;for(var d,p,g,f,m=0;m<h.length/2;m++)d=h[2*m],p=h[2*m+1],f=m<h.length/2-1?(g=h[2*(m+1)],h[2*(m+1)+1]):(g=h[0],h[1]),0!==(d=Rie(e,t,i,n,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),Die=mt(function(r,i,e,n,a,t,s,o,l){var c,h=[],u=new Array(2*e.length);l.forEach(function(e,t){0===t?(u[u.length-2]=e.startX,u[u.length-1]=e.startY):(u[4*t-2]=e.startX,u[4*t-1]=e.startY),u[4*t]=e.stopX,u[4*t+1]=e.stopY,0!==(c=_ie(r,i,n,a,e.cx,e.cy,e.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=Rie(r,i,n,a,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&h.push(c[0],c[1]);if(2<h.length){for(var p=[h[0],h[1]],g=Math.pow(p[0]-r,2)+Math.pow(p[1]-i,2),f=1;f<h.length/2;f++){var m=Math.pow(h[2*f]-r,2)+Math.pow(h[2*f+1]-i,2);m<=g&&(p[0]=h[2*f],p[1]=h[2*f+1],g=m)}return p}return h},"roundPolygonIntersectLine"),Iie=mt(function(e,t,r){var e=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=(i-r)/i;return[t[0]+(r=r<0?1e-5:r)*e[0],t[1]+r*e[1]]},"shortenIntersection"),Mie=mt(function(e,t){return e=Pie(e,t),Oie(e)},"generateUnitNgonPointsFitToSquare"),Oie=mt(function(e){for(var t,r,i=e.length/2,n=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<i;l++)t=e[2*l],r=e[2*l+1],n=Math.min(n,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);for(var c=2/(s-n),h=2/(o-a),u=0;u<i;u++)t=e[2*u]=e[2*u]*c,r=e[2*u+1]=e[2*u+1]*h,n=Math.min(n,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);if(a<-1)for(var d=0;d<i;d++)r=e[2*d+1]=e[2*d+1]+(-1-a);return e},"fitPolygonToSquare"),Pie=mt(function(e,t){var r=1/e*2*Math.PI,i=e%2==0?Math.PI/2+r/2:Math.PI/2;i+=t;for(var n,a=new Array(2*e),s=0;s<e;s++)n=s*r+i,a[2*s]=Math.cos(n),a[2*s+1]=Math.sin(-n);return a},"generateUnitNgonPoints"),$ie=mt(function(e,t){return Math.min(e/4,t/4,8)},"getRoundRectangleRadius"),Bie=mt(function(e,t){return Math.min(e/10,t/10,8)},"getRoundPolygonRadius"),Fie=mt(function(){return 8},"getCutRectangleCornerLength"),zie=mt(function(e,t,r){return[e-2*t+r,2*(t-e),e]},"bezierPtsToQuadCoeff"),qie=mt(function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),mt(RZ,"satPolygonIntersection"),Uie=she({dampingFactor:.8,precision:1e-6,iterations:200,weight:mt(function(e){return 1},"weight")}),Zce={pageRank:mt(function(e){for(var t=(e=Uie(e)).dampingFactor,r=e.precision,i=e.iterations,n=e.weight,a=this._private.cy,s=(e=this.byGroup()).nodes,o=e.edges,l=s.length,c=o.length,h=new Array(l*l),u=new Array(l),d=(1-t)/l,p=0;p<l;p++){for(var g=0;g<l;g++)h[p*l+g]=0;u[p]=0}for(var f=0;f<c;f++){var m=o[f],y=m.data("source"),v=m.data("target");y!==v&&(y=s.indexOfId(y),v=s.indexOfId(v),m=n(m),h[v*l+y]+=m,u[y]+=m)}for(var b=1/l+d,x=0;x<l;x++)if(0===u[x])for(var w=0;w<l;w++)h[w*l+x]=b;else for(var T=0;T<l;T++){var k=T*l+x;h[k]=h[k]/u[x]+d}for(var C=new Array(l),S=new Array(l),E=0;E<l;E++)C[E]=1;for(var _=0;_<i;_++){for(var A=0;A<l;A++)S[A]=0;for(var R=0;R<l;R++)for(var L=0;L<l;L++)S[R]+=h[R*l+L]*C[L];Xre(S);for(var N=C,C=S,S=N,D=0,I=0;I<l;I++){var M=N[I]-C[I];D+=M*M}if(D<r)break}return{rank:mt(function(e){return e=a.collection(e)[0],C[s.indexOf(e)]},"rank")}},"pageRank")},Gie=she({root:null,weight:mt(function(e){return 1},"weight"),directed:!1,alpha:0}),(nhe={degreeCentralityNormalized:mt(function(e){e=Gie(e);var t=this.cy(),r=this.nodes(),i=r.length;if(e.directed){for(var n={},a={},s=0,o=0,l=0;l<i;l++){var c=(h=r[l]).id(),h=(e.root=h,this.degreeCentrality(e));s<h.indegree&&(s=h.indegree),o<h.outdegree&&(o=h.outdegree),n[c]=h.indegree,a[c]=h.outdegree}return{indegree:mt(function(e){return 0==s?0:(kee(e)&&(e=t.filter(e)),n[e.id()]/s)},"indegree"),outdegree:mt(function(e){return 0===o?0:(kee(e)&&(e=t.filter(e)),a[e.id()]/o)},"outdegree")}}for(var u={},d=0,p=0;p<i;p++){var g=r[p],f=(e.root=g,this.degreeCentrality(e));d<f.degree&&(d=f.degree),u[g.id()]=f.degree}return{degree:mt(function(e){return 0===d?0:(kee(e)&&(e=t.filter(e)),u[e.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:mt(function(e){e=Gie(e);var t=this.cy(),r=this,i=e.root,n=e.weight,a=e.directed,e=e.alpha,i=t.collection(i)[0];if(a){for(var s=(t=i.connectedEdges()).filter(function(e){return e.target().same(i)&&r.has(e)}),o=t.filter(function(e){return e.source().same(i)&&r.has(e)}),a=s.length,t=o.length,l=0,c=0,h=0;h<s.length;h++)l+=n(s[h]);for(var u=0;u<o.length;u++)c+=n(o[u]);return{indegree:Math.pow(a,1-e)*Math.pow(l,e),outdegree:Math.pow(t,1-e)*Math.pow(c,e)}}for(var d=i.connectedEdges().intersection(r),a=d.length,p=0,g=0;g<d.length;g++)p+=n(d[g]);return{degree:Math.pow(a,1-e)*Math.pow(p,e)}},"degreeCentrality")}).dc=nhe.degreeCentrality,nhe.dcn=nhe.degreeCentralityNormalised=nhe.degreeCentralityNormalized,jie=she({harmonic:!0,weight:mt(function(){return 1},"weight"),directed:!1,root:null}),(J={closenessCentralityNormalized:mt(function(e){for(var t=(e=jie(e)).harmonic,r=e.weight,e=e.directed,i=this.cy(),n={},a=0,s=this.nodes(),o=this.floydWarshall({weight:r,directed:e}),l=0;l<s.length;l++){for(var c,h=0,u=s[l],d=0;d<s.length;d++)l!==d&&(c=o.distance(u,s[d]),h+=t?1/c:c);a<(h=t?h:1/h)&&(a=h),n[u.id()]=h}return{closeness:mt(function(e){return 0==a?0:(e=(kee(e)?i.filter(e)[0]:e).id(),n[e]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:mt(function(e){for(var t=(e=jie(e)).root,r=e.weight,i=e.directed,n=e.harmonic,t=this.filter(t)[0],a=this.dijkstra({root:t,weight:r,directed:i}),s=0,o=this.nodes(),l=0;l<o.length;l++){var c=o[l];c.same(t)||(c=a.distanceTo(c),s+=n?1/c:c)}return n?s:1/s},"closenessCentrality")}).cc=J.closenessCentrality,J.ccn=J.closenessCentralityNormalised=J.closenessCentralityNormalized,Wie=she({weight:null,directed:!1}),(gce={betweennessCentrality:mt(function(e){for(var t=(e=Wie(e)).directed,x=e.weight,w=null!=x,T=this.cy(),k=this.nodes(),C={},r={},i=0,S={set:mt(function(e,t){i<(r[e]=t)&&(i=t)},"set"),get:mt(function(e){return r[e]},"get")},n=0;n<k.length;n++){var a=k[n],s=a.id();C[s]=(t?a.outgoers():a.openNeighborhood()).nodes(),S.set(s,0)}for(var o=mt(function(){for(var e=k[E].id(),t=[],r={},i={},n={},a=new _re(function(e,t){return n[e]-n[t]}),s=0;s<k.length;s++){var o=k[s].id();r[o]=[],n[o]=1/(i[o]=0)}for(i[e]=1,n[e]=0,a.push(e);!a.empty();){var l=a.pop();if(t.push(l),w)for(var c=0;c<C[l].length;c++){var h=C[l][c],u=(0<(d=T.getElementById(l)).edgesTo(h).length?d.edgesTo(h):h.edgesTo(d))[0],d=x(u),h=h.id();n[l]+d<n[h]&&(n[h]=n[l]+d,a.nodes.indexOf(h)<0?a.push(h):a.updateItem(h),i[h]=0,r[h]=[]),n[h]==n[l]+d&&(i[h]=i[h]+i[l],r[h].push(l))}else for(var p=0;p<C[l].length;p++){var g=C[l][p].id();n[g]==1/0&&(a.push(g),n[g]=n[l]+1),n[g]==n[l]+1&&(i[g]=i[g]+i[l],r[g].push(l))}}for(var f={},m=0;m<k.length;m++)f[k[m].id()]=0;for(;0<t.length;){for(var y=t.pop(),v=0;v<r[y].length;v++){var b=r[y][v];f[b]=f[b]+i[b]/i[y]*(1+f[y])}y!=k[E].id()&&S.set(y,S.get(y)+f[y])}},"_loop"),E=0;E<k.length;E++)o();return(e={betweenness:mt(function(e){return e=T.collection(e).id(),S.get(e)},"betweenness"),betweennessNormalized:mt(function(e){return 0==i?0:(e=T.collection(e).id(),S.get(e)/i)},"betweennessNormalized")}).betweennessNormalised=e.betweennessNormalized,e},"betweennessCentrality")}).bc=gce.betweennessCentrality,Yie=she({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),Vie=mt(function(e){return Yie(e)},"setOptions"),Hie=mt(function(e,t){for(var r=0,i=0;i<t.length;i++)r+=t[i](e);return r},"getSimilarity"),Xie=mt(function(e,t,r){for(var i=0;i<t;i++)e[i*t+i]=r},"addLoops"),Kie=mt(function(e,t){for(var r=0;r<t;r++){for(var i=0,n=0;n<t;n++)i+=e[n*t+r];for(var a=0;a<t;a++)e[a*t+r]=e[a*t+r]/i}},"normalize"),Zie=mt(function(e,t,r){for(var i=new Array(r*r),n=0;n<r;n++){for(var a=0;a<r;a++)i[n*r+a]=0;for(var s=0;s<r;s++)for(var o=0;o<r;o++)i[n*r+o]+=e[n*r+s]*t[s*r+o]}return i},"mmult"),Qie=mt(function(e,t,r){for(var i=e.slice(0),n=1;n<r;n++)e=Zie(e,i,t);return e},"expand"),Jie=mt(function(e,t,r){for(var i=new Array(t*t),n=0;n<t*t;n++)i[n]=Math.pow(e[n],r);return Kie(i,t),i},"inflate"),ene=mt(function(e,t,r,i){for(var n=0;n<r;n++)if(Math.round(e[n]*Math.pow(10,i))/Math.pow(10,i)!=Math.round(t[n]*Math.pow(10,i))/Math.pow(10,i))return!1;return!0},"hasConverged"),tne=mt(function(e,t,r,i){for(var n=[],a=0;a<t;a++){for(var s=[],o=0;o<t;o++)0<Math.round(1e3*e[a*t+o])/1e3&&s.push(r[o]);0!==s.length&&n.push(i.collection(s))}return n},"assign"),rne=mt(function(e,t){for(var r=0;r<e.length;r++)if(!t[r]||e[r].id()!==t[r].id())return!1;return!0},"isDuplicate"),ine=mt(function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e.length;r++)t!=r&&rne(e[t],e[r])&&e.splice(r,1);return e},"removeDuplicates"),Pce={markovClustering:Pce=mt(function(e){for(var t=this.nodes(),r=this.edges(),i=this.cy(),n=Vie(e),a={},s=0;s<t.length;s++)a[t[s].id()]=s;for(var o,l=t.length,c=l*l,h=new Array(c),u=0;u<c;u++)h[u]=0;for(var d=0;d<r.length;d++){var p=a[(f=r[d]).source().id()],g=a[f.target().id()],f=Hie(f,n.attributes);h[p*l+g]+=f,h[g*l+p]+=f}Xie(h,l,n.multFactor),Kie(h,l);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,o=Qie(h,l,n.expandFactor),h=Jie(o,l,n.inflateFactor),ene(h,o,c,4)||(m=!0),y++;return e=tne(h,l,t,i),ine(e)},"markovClustering"),mcl:Pce},nne=mt(function(e){return e},"identity"),ane=mt(function(e,t){return Math.abs(t-e)},"absDiff"),sne=mt(function(e,t,r){return e+ane(t,r)},"addAbsDiff"),one=mt(function(e,t,r){return e+Math.pow(r-t,2)},"addSquaredDiff"),lne=mt(function(e){return Math.sqrt(e)},"sqrt"),cne=mt(function(e,t,r){return Math.max(e,ane(t,r))},"maxAbsDiff"),hne=mt(function(e,t,r,i,n){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:nne,s=i,o=0;o<e;o++)s=n(s,t(o),r(o));return a(s)},"getDistance"),(une={euclidean:mt(function(e,t,r){return 2<=e?hne(e,t,r,0,one,lne):hne(e,t,r,0,sne)},"euclidean"),squaredEuclidean:mt(function(e,t,r){return hne(e,t,r,0,one)},"squaredEuclidean"),manhattan:mt(function(e,t,r){return hne(e,t,r,0,sne)},"manhattan"),max:mt(function(e,t,r){return hne(e,t,r,-1/0,cne)},"max")})["squared-euclidean"]=une.squaredEuclidean,une.squaredeuclidean=une.squaredEuclidean,mt(LZ,"clusteringDistance"),dne=she({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),pne=mt(function(e){return dne(e)},"setOptions"),gne=mt(function(e,t,r,i,n){var n="kMedoids"!==n?function(e){return r[e]}:function(e){return i[e](r)},a=mt(function(e){return i[e](t)},"getQ");return LZ(e,i.length,n,a,r,t)},"getDist"),fne=mt(function(e,t,r){for(var i=r.length,n=new Array(i),a=new Array(i),s=new Array(t),o=null,l=0;l<i;l++)n[l]=e.min(r[l]).value,a[l]=e.max(r[l]).value;for(var c=0;c<t;c++){for(var o=[],h=0;h<i;h++)o[h]=Math.random()*(a[h]-n[h])+n[h];s[c]=o}return s},"randomCentroids"),mne=mt(function(e,t,r,i,n){for(var a=1/0,s=0,o=0;o<t.length;o++){var l=gne(r,e,t[o],i,n);l<a&&(a=l,s=o)}return s},"classify"),yne=mt(function(e,t,r){for(var i=[],n=null,a=0;a<t.length;a++)r[(n=t[a]).id()]===e&&i.push(n);return i},"buildCluster"),vne=mt(function(e,t,r){return Math.abs(t-e)<=r},"haveValuesConverged"),bne=mt(function(e,t,r){for(var i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)if(r<Math.abs(e[i][n]-t[i][n]))return!1;return!0},"haveMatricesConverged"),xne=mt(function(e,t,r){for(var i=0;i<r;i++)if(e===t[i])return!0;return!1},"seenBefore"),wne=mt(function(e,t){var r=new Array(t);if(e.length<50)for(var i=0;i<t;i++){for(var n=e[Math.floor(Math.random()*e.length)];xne(n,r,i);)n=e[Math.floor(Math.random()*e.length)];r[i]=n}else for(var a=0;a<t;a++)r[a]=e[Math.floor(Math.random()*e.length)];return r},"randomMedoids"),Tne=mt(function(e,t,r){for(var i=0,n=0;n<t.length;n++)i+=gne("manhattan",t[n],e,r,"kMedoids");return i},"findCost"),Mce=mt(function(e){for(var t=this.cy(),r=this.nodes(),i=null,n=pne(e),a=new Array(n.k),s={},o=n.testMode?"number"==typeof n.testCentroids?(n.testCentroids,fne(r,n.k,n.attributes)):"object"===sZ(n.testCentroids)?n.testCentroids:fne(r,n.k,n.attributes):fne(r,n.k,n.attributes),l=!0,c=0;l&&c<n.maxIterations;){for(var h=0;h<r.length;h++)s[(i=r[h]).id()]=mne(i,o,n.distance,n.attributes,"kMeans");for(var l=!1,u=0;u<n.k;u++){var d=yne(u,r,s);if(0!==d.length){for(var p=n.attributes.length,g=o[u],f=new Array(p),m=new Array(p),y=0;y<p;y++){for(var v=m[y]=0;v<d.length;v++)i=d[v],m[y]+=n.attributes[y](i);f[y]=m[y]/d.length,vne(f[y],g[y],n.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=t.collection(d)}}c++}return a},"kMeans"),Ice=mt(function(e){var t,r,i=this.cy(),n=this.nodes(),a=null,s=pne(e),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(t="object"===sZ(s.testCentroids)?s.testCentroids:wne(n,s.k)):t=wne(n,s.k);for(var h=!0,u=0;h&&u<s.maxIterations;){for(var d=0;d<n.length;d++)l[(a=n[d]).id()]=mne(a,t,s.distance,s.attributes,"kMedoids");for(var h=!1,p=0;p<t.length;p++){var g=yne(p,n,l);if(0!==g.length){c[p]=Tne(t[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=Tne(g[f],g,s.attributes))<c[p]&&(c[p]=r,t[p]=g[f],h=!0);o[p]=i.collection(g)}}u++}return o},"kMedoids"),kne=mt(function(e,t,r,i,n){for(var a=0;a<t.length;a++)for(var s=0;s<e.length;s++)i[a][s]=Math.pow(r[a][s],n.m);for(var o=0;o<e.length;o++)for(var l=0;l<n.attributes.length;l++){for(var c=0,h=0,u=0;u<t.length;u++)c+=i[u][o]*n.attributes[l](t[u]),h+=i[u][o];e[o][l]=c/h}},"updateCentroids"),Cne=mt(function(e,t,r,i,n){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var s,o,l=2/(n.m-1),c=0;c<r.length;c++)for(var h=0;h<i.length;h++){for(var u=0,d=0;d<r.length;d++)s=gne(n.distance,i[h],r[c],n.attributes,"cmeans"),o=gne(n.distance,i[h],r[d],n.attributes,"cmeans"),u+=Math.pow(s/o,l);e[h][c]=1/u}},"updateMembership"),Sne=mt(function(e,t,r,i){for(var n=new Array(r.k),a=0;a<n.length;a++)n[a]=[];for(var s=0;s<t.length;s++){for(var o=-1/0,l=-1,c=0;c<t[0].length;c++)t[s][c]>o&&(o=t[s][c],l=c);n[l].push(e[s])}for(var h=0;h<n.length;h++)n[h]=i.collection(n[h]);return n},"assign"),che=mt(function(e){for(var t=this.cy(),r=this.nodes(),i=pne(e),n=new Array(r.length),a=0;a<r.length;a++)n[a]=new Array(i.k);for(var s=new Array(r.length),o=0;o<r.length;o++)s[o]=new Array(i.k);for(var l=0;l<r.length;l++){for(var c=0,h=0;h<i.k;h++)s[l][h]=Math.random(),c+=s[l][h];for(var u=0;u<i.k;u++)s[l][u]=s[l][u]/c}for(var d=new Array(i.k),p=0;p<i.k;p++)d[p]=new Array(i.attributes.length);for(var g=new Array(r.length),f=0;f<r.length;f++)g[f]=new Array(i.k);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,kne(d,r,s,g,i),Cne(s,n,d,r,i),bne(s,n,i.sensitivityThreshold)||(m=!0),y++;return{clusters:Sne(r,s,i,t),degreeOfMembership:s}},"fuzzyCMeans"),Ene=she({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(Mce={kMeans:Mce,kMedoids:Ice,fuzzyCMeans:che,fcm:che}),dendrogramDepth:0,attributes:[]}),_ne={single:"min",complete:"max"},Ane=mt(function(e){var e=Ene(e),t=_ne[e.linkage];return null!=t&&(e.linkage=t),e},"setOptions"),Rne=mt(function(e,t,r,i,n){for(var a,s=0,o=1/0,l=n.attributes,c=mt(function(t,r){return LZ(n.distance,l.length,function(e){return l[e](t)},function(e){return l[e](r)},t,r)},"getDist"),h=0;h<e.length;h++){var u=e[h].key,d=r[u][i[u]];d<o&&(s=u,o=d)}if("threshold"===n.mode&&o>=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;m<e.length;m++){var y=e[m];p.key===y.key?a=1/0:"min"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]<r[g.key][y.key]&&(a=r[g.key][y.key])):a="mean"===n.linkage?(r[p.key][y.key]*p.size+r[g.key][y.key]*g.size)/(p.size+g.size):"dendrogram"===n.mode?c(y.value,p.value):c(y.value[0],p.value[0]),r[p.key][y.key]=r[y.key][p.key]=a}for(var v=0;v<e.length;v++){var b=e[v].key;if(i[b]===p.key||i[b]===g.key){for(var x=b,w=0;w<e.length;w++){var T=e[w].key;r[b][T]<r[b][x]&&(x=T)}i[b]=x}e[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),Lne=mt(function(e,t,r){e&&(e.value?t.push(e.value):(e.left&&Lne(e.left,t),e.right&&Lne(e.right,t)))},"getAllChildren"),Nne=mt(function(e,t){var r,i,n;return e?e.left&&e.right?(r=Nne(e.left,t),i=Nne(e.right,t),n=t.add({group:"nodes",data:{id:r+","+i}}),t.add({group:"edges",data:{source:r,target:n.id()}}),t.add({group:"edges",data:{source:i,target:n.id()}}),n.id()):e.value?e.value.id():void 0:""},"buildDendrogram"),Dne=mt(function(e,t,r){var i,n,a;return e?(i=[],n=[],0===t?(e.left&&Lne(e.left,i),e.right&&Lne(e.right,n),a=i.concat(n),[r.collection(a)]):1===t?e.value?[r.collection(e.value)]:(e.left&&Lne(e.left,i),e.right&&Lne(e.right,n),[r.collection(i),r.collection(n)]):e.value?[r.collection(e.value)]:(e.left&&(i=Dne(e.left,t-1,r)),e.right&&(n=Dne(e.right,t-1,r)),i.concat(n))):[]},"buildClustersFromTree"),Ice=mt(function(e){for(var r=this.cy(),t=this.nodes(),i=Ane(e),n=i.attributes,a=mt(function(t,r){return LZ(i.distance,n.length,function(e){return n[e](t)},function(e){return n[e](r)},t,r)},"getDist"),s=[],o=[],l=[],c=[],h=0;h<t.length;h++){var u={value:"dendrogram"===i.mode?t[h]:[t[h]],key:h,index:h};c[h]=s[h]=u,o[h]=[],l[h]=0}for(var d=0;d<s.length;d++)for(var p=0;p<=d;p++){var g="dendrogram"===i.mode?d===p?1/0:a(s[d].value,s[p].value):d===p?1/0:a(s[d].value[0],s[p].value[0]);o[d][p]=g,(o[p][d]=g)<o[d][l[d]]&&(l[d]=p)}for(var f,m=Rne(s,c,o,l,i);m;)m=Rne(s,c,o,l,i);return"dendrogram"===i.mode?(f=Dne(s[0],i.dendrogramDepth,r),i.addDendrogram&&Nne(s[0],r)):(f=new Array(s.length),s.forEach(function(e,t){e.key=e.index=null,f[t]=r.collection(e.value)})),f},"hierarchicalClustering"),che={hierarchicalClustering:Ice,hca:Ice},Ine=she({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Mne=mt(function(e){var t=e.damping,r=e.preference;return.5<=t&&t<1||are("Damping must range on [0.5, 1). Got: ".concat(t)),(t=["median","mean","min","max"]).some(function(e){return e===r})||he(r)||are("Preference must be one of [".concat(t.map(function(e){return"'".concat(e,"'")}).join(", "),"] or a number. Got: ").concat(r)),Ine(e)},"setOptions"),One=mt(function(e,t,r,i){var n=mt(function(e,t){return i[t](e)},"attr");return-LZ(e,i.length,function(e){return n(t,e)},function(e){return n(r,e)},t,r)},"getSimilarity"),Pne=mt(function(e,t){return"median"===t?Ure(e):"mean"===t?qre(e):"min"===t?Fre(e):"max"===t?zre(e):t},"getPreference"),$ne=mt(function(e,t,r){for(var i=[],n=0;n<e;n++)0<t[n*e+n]+r[n*e+n]&&i.push(n);return i},"findExemplars"),Bne=mt(function(e,t,r){for(var i=[],n=0;n<e;n++){for(var a=-1,s=-1/0,o=0;o<r.length;o++){var l=r[o];t[n*e+l]>s&&(s=t[n*e+(a=l)])}0<a&&i.push(a)}for(var c=0;c<r.length;c++)i[r[c]]=r[c];return i},"assignClusters"),Fne=mt(function(e,t,r){for(var i=Bne(e,t,r),n=0;n<r.length;n++){for(var a=[],s=0;s<i.length;s++)i[s]===r[n]&&a.push(s);for(var o=-1,l=-1/0,c=0;c<a.length;c++){for(var h=0,u=0;u<a.length;u++)h+=t[a[u]*e+a[c]];l<h&&(o=c,l=h)}r[n]=a[o]}return Bne(e,t,r)},"assign"),Ice=mt(function(P){for(var $=this.cy(),e=this.nodes(),t=Mne(P),B={},r=0;r<e.length;r++)B[e[r].id()]=r;for(var i,n=(i=e.length)*i,a=new Array(n),s=0;s<n;s++)a[s]=-1/0;for(var o=0;o<i;o++)for(var l=0;l<i;l++)o!==l&&(a[o*i+l]=One(t.distance,e[o],e[l],t.attributes));for(var F=Pne(a,t.preference),c=0;c<i;c++)a[c*i+c]=F;for(var h=new Array(n),u=0;u<n;u++)h[u]=0;for(var d=new Array(n),p=0;p<n;p++)d[p]=0;for(var g=new Array(i),f=new Array(i),m=new Array(i),y=0;y<i;y++)g[y]=0,f[y]=0,m[y]=0;for(var v,b=new Array(i*t.minIterations),z=0;z<b.length;z++)b[z]=0;for(v=0;v<t.maxIterations;v++){for(var x=0;x<i;x++){for(var w,T=-1/0,k=-1/0,C=-1,S=0;S<i;S++)g[S]=h[x*i+S],T<=(w=d[x*i+S]+a[x*i+S])?(k=T,T=w,C=S):k<w&&(k=w);for(var E=0;E<i;E++)h[x*i+E]=(1-t.damping)*(a[x*i+E]-T)+t.damping*g[E];h[x*i+C]=(1-t.damping)*(a[x*i+C]-k)+t.damping*g[C]}for(var _=0;_<i;_++){for(var A=0,R=0;R<i;R++)g[R]=d[R*i+_],f[R]=Math.max(0,h[R*i+_]),A+=f[R];A-=f[_],f[_]=h[_*i+_],A+=f[_];for(var L=0;L<i;L++)d[L*i+_]=(1-t.damping)*Math.min(0,A-f[L])+t.damping*g[L];d[_*i+_]=(1-t.damping)*(A-f[_])+t.damping*g[_]}for(var q=0,N=0;N<i;N++){var U=0<d[N*i+N]+h[N*i+N]?1:0;q+=b[v%t.minIterations*i+N]=U}if(0<q&&(v>=t.minIterations-1||v==t.maxIterations-1)){for(var G=0,D=0;D<i;D++){for(var j=m[D]=0;j<t.minIterations;j++)m[D]+=b[j*i+D];0!==m[D]&&m[D]!==t.minIterations||G++}if(G===i)break}}for(var I=$ne(i,h,d),W=Fne(i,a,I),Y={},V=0;V<I.length;V++)Y[I[V]]=[];for(var M=0;M<e.length;M++){var H=W[B[e[M].id()]];null!=H&&Y[H].push(e[M])}for(var X=new Array(I.length),O=0;O<I.length;O++)X[O]=$.collection(Y[I[O]]);return X},"affinityPropagation"),zne=she({root:void 0,directed:!(Ice={affinityPropagation:Ice,ap:Ice})}),kce={hierholzer:mt(function(e){Eee(e)||(e={root:(r=arguments)[0],directed:r[1]});var a,s,t,r=zne(e),e=r.root,o=r.directed,l=!1,c=(e&&(t=(kee(e)?this.filter(e):e)[0].id()),{}),h={},i=(o?this.forEach(function(e){var t,r,i,n=e.id();e.isNode()?(r=e.indegree(!0),i=(t=e.outdegree(!0))-r,1==(r-=t)?a?l=!0:a=n:1==i?s?l=!0:s=n:(1<i||1<r)&&(l=!0),c[n]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[n].push(e.id())})):h[n]=[void 0,e.target().id()]}):this.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(a?s?l=!0:s=t:a=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):h[t]=[e.source().id(),e.target().id()]}),{found:!1,trail:void 0});if(!l){if(s&&a)if(o){if(t&&s!=t)return i;t=s}else{if(t&&s!=t&&a!=t)return i;t=t||s}else t=t||this[0].id();for(var n,u=mt(function(e){for(var t,r,i,n=e,a=[e];c[n].length;)t=c[n].shift(),r=h[t][0],n!=(i=h[t][1])?(c[i]=c[i].filter(function(e){return e!=t}),n=i):o||n==r||(c[r]=c[r].filter(function(e){return e!=t}),n=r),a.unshift(t),a.unshift(n);return a},"walk"),d=[],p=[],p=u(t);1!=p.length;)0==c[p[0]].length?(d.unshift(this.getElementById(p.shift())),d.unshift(this.getElementById(p.shift()))):p=u(p.shift()).concat(p);for(n in d.unshift(this.getElementById(p.shift())),c)if(c[n].length)return i;i.found=!0,i.trail=this.spawn(d,!0)}return i},"hierholzer")},ahe={hopcroftTarjanBiconnected:ahe=mt(function(){var s=this,o={},l=0,c=0,h=[],u=[],d={},p=mt(function(e,t){for(var r=u.length-1,i=[],n=s.spawn();u[r].x!=e||u[r].y!=t;)i.push(u.pop().edge),r--;i.push(u.pop().edge),i.forEach(function(e){var t=e.connectedNodes().intersection(s);n.merge(e),t.forEach(function(e){var t=e.id(),r=e.connectedEdges().intersection(s);n.merge(e),o[t].cutVertex?n.merge(r.filter(function(e){return e.isLoop()})):n.merge(r)})}),h.push(n)},"buildComponent"),g=mt(function(t,r,i){t===i&&(c+=1),o[r]={id:l,low:l++,cutVertex:!1};var n,a,e=s.getElementById(r).connectedEdges().intersection(s);0===e.size()?h.push(s.spawn(s.getElementById(r))):e.forEach(function(e){a=e.source().id(),n=e.target().id(),(n=a===r?n:a)!==i&&(a=e.id(),d[a]||(d[a]=!0,u.push({x:r,y:n,edge:e})),n in o?o[r].low=Math.min(o[r].low,o[n].id):(g(t,n,r),o[r].low=Math.min(o[r].low,o[n].low),o[r].id<=o[n].low&&(o[r].cutVertex=!0,p(r,n))))})},"biconnectedSearch"),e=(s.forEach(function(e){!e.isNode()||(e=e.id())in o||(c=0,g(e,e),o[e].cutVertex=1<c)}),Object.keys(o).filter(function(e){return o[e].cutVertex}).map(function(e){return s.getElementById(e)}));return{cut:s.spawn(e),components:h}},"hopcroftTarjanBiconnected"),htbc:ahe,htb:ahe,hopcroftTarjanBiconnectedComponents:ahe},Hce=mt(function(){var n=this,a={},s=0,o=[],l=[],c=n.spawn(n),h=mt(function(t){if(l.push(t),a[t]={index:s,low:s++,explored:!1},n.getElementById(t).connectedEdges().intersection(n).forEach(function(e){(e=e.target().id())!==t&&(e in a||h(e),a[e].explored||(a[t].low=Math.min(a[t].low,a[e].low)))}),a[t].index===a[t].low){for(var e=n.spawn();;){var r=l.pop();if(e.merge(n.getElementById(r)),a[r].low=a[t].index,a[r].explored=!0,r===t)break}var i=e.edgesWith(e),i=e.merge(i);o.push(i),c=c.difference(i)}},"stronglyConnectedSearch");return n.forEach(function(e){!e.isNode()||(e=e.id())in a||h(e)}),{cut:c,components:o}},"tarjanStronglyConnected"),qne={},[$ce,ghe,Bce,Oce,qle,Sce,Dce,Zce,nhe,J,gce,Pce,Mce,che,Ice,kce,ahe,{tarjanStronglyConnected:Hce,tsc:Hce,tscc:Hce,tarjanStronglyConnectedComponents:Hce}].forEach(function(e){Kee(qne,e)}),(Une=mt(function(e){if(!(this instanceof Une))return new Une(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api")).prototype={fulfill:mt(function(e){return Gne(this,1,"fulfillValue",e)},"fulfill"),reject:mt(function(e){return Gne(this,2,"rejectReason",e)},"reject"),then:mt(function(e,t){var r=new Une;return this.onFulfilled.push(Yne(e,r,"fulfill")),this.onRejected.push(Yne(t,r,"reject")),jne(this),r.proxy},"then")},Gne=mt(function(e,t,r,i){return 0===e.state&&(e.state=t,e[r]=i,jne(e)),e},"deliver"),jne=mt(function(e){1===e.state?Wne(e,"onFulfilled",e.fulfillValue):2===e.state&&Wne(e,"onRejected",e.rejectReason)},"execute"),Wne=mt(function(e,t,r){var i;0!==e[t].length&&(i=e[t],e[t]=[],e=mt(function(){for(var e=0;e<i.length;e++)i[e](r)},"func"),"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0))},"execute_handlers"),Yne=mt(function(r,i,n){return function(e){if("function"!=typeof r)i[n].call(i,e);else{var t;try{t=r(e)}catch(e){return void i.reject(e)}Vne(i,t)}}},"resolver"),Vne=mt(function(t,r){if(t===r||t.proxy===r)t.reject(new TypeError("cannot resolve promise with itself"));else{var e;if("object"===sZ(r)&&null!==r||"function"==typeof r)try{e=r.then}catch(e){return void t.reject(e)}if("function"==typeof e){var i=!1;try{e.call(r,function(e){i||(i=!0,e===r?t.reject(new TypeError("circular thenable chain")):Vne(t,e))},function(e){i||(i=!0,t.reject(e))})}catch(e){i||t.reject(e)}}else t.fulfill(r)}},"resolve"),Une.all=function(o){return new Une(function(r,i){for(var n=new Array(o.length),a=0,s=mt(function(e,t){n[e]=t,++a===o.length&&r(n)},"fulfill"),e=0;e<o.length;e++)(t=>{var e=o[t];null!=e&&null!=e.then?e.then(function(e){s(t,e)},function(e){i(e)}):s(t,e)})(e)})},Une.resolve=function(r){return new Une(function(e,t){e(r)})},Une.reject=function(r){return new Une(function(e,t){t(r)})},Hne=typeof Promise<"u"?Promise:Une,Xne=mt(function(e,t,r){var i=Iee(e),n=!i;(t=this._private=Kee({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&&Cee(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"),$ce=Xne.prototype,Kee($ce,{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),Lee(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<i.style.length;r++){var n=i.style[r],a=n.name,s=i.startStyle[a];i.startStyle[a]=n,i.style[r]=s}return e&&this.play(),this},"reverse"),promise:mt(function(e){var r,t=this._private;switch(e){case"frame":r=t.frames;break;default:case"complete":case"completed":r=t.completes}return new Hne(function(e,t){r.push(function(){e()})})},"promise")}),$ce.complete=$ce.completed,$ce.run=$ce.play,$ce.running=$ce.playing,ghe={animated:mt(function(){return mt(function(){var e=void 0!==this.length?this:[this];return!!(this._private.cy||this).styleEnabled()&&((e=e[0])?0<e._private.animation.current.length:void 0)},"animatedImpl")},"animated"),clearQueue:mt(function(){return mt(function(){var e=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled())for(var t=0;t<e.length;t++)e[t]._private.animation.queue=[];return this},"clearQueueImpl")},"clearQueue"),delay:mt(function(){return mt(function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this},"delayImpl")},"delay"),delayAnimation:mt(function(){return mt(function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this},"delayAnimationImpl")},"delayAnimation"),animation:mt(function(){return mt(function(e,t){var r=void 0!==this.length,i=r?this:[this],n=this._private.cy||this,a=!(r=!r);if(!n.styleEnabled())return this;var s=n.style();if(e=Kee({},e,t),!(t=0===Object.keys(e).length)){switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}a&&(e.style=s.getPropsList(e.style||e.css),e.css=void 0),a&&null!=e.renderedPosition&&(t=e.renderedPosition,s=n.pan(),a=n.zoom(),e.position=$re(t,a,s)),r&&null!=e.panBy&&(t=e.panBy,a=n.pan(),e.pan={x:a.x+t.x,y:a.y+t.y}),s=e.center||e.centre,r&&null!=s&&null!=(a=n.getCenterPan(s.eles,e.zoom))&&(e.pan=a),r&&null!=e.fit&&(t=e.fit,null!=(s=n.getFitViewport(t.eles||t.boundingBox,t.padding)))&&(e.pan=s.pan,e.zoom=s.zoom),r&&Eee(e.zoom)&&(null!=(a=n.getZoomedViewport(e.zoom))?(a.zoomed&&(e.zoom=a.zoom),a.panned&&(e.pan=a.pan)):e.zoom=null)}return new Xne(i[0],e)},"animationImpl")},"animation"),animate:mt(function(){return mt(function(e,t){var r=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled()){t&&(e=Kee({},e,t));for(var i=0;i<r.length;i++){var n=r[i],a=n.animated()&&(void 0===e.queue||e.queue);n.animation(e,a?{queue:!0}:void 0).play()}}return this},"animateImpl")},"animate"),stop:mt(function(){return mt(function(e,t){var r=void 0!==this.length?this:[this],i=this._private.cy||this;if(i.styleEnabled()){for(var n=0;n<r.length;n++){for(var a=r[n]._private,s=a.animation.current,o=0;o<s.length;o++){var l=s[o]._private;t&&(l.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}i.notify("draw")}return this},"stopImpl")},"stop")},mt(NZ,"requireIsArray"),mt(DZ,"require_isKey"),mt(IZ,"requireIsFunction"),mt(MZ,"require_coreJsData"),mt(OZ,"require_isMasked"),mt(PZ,"require_toSource"),mt($Z,"require_baseIsNative"),mt(BZ,"require_getValue"),mt(FZ,"require_getNative"),mt(zZ,"require_nativeCreate"),mt(qZ,"require_hashClear"),mt(UZ,"require_hashDelete"),mt(GZ,"require_hashGet"),mt(jZ,"require_hashHas"),mt(WZ,"require_hashSet"),mt(YZ,"require_Hash"),mt(VZ,"require_listCacheClear"),mt(HZ,"requireEq"),mt(XZ,"require_assocIndexOf"),mt(KZ,"require_listCacheDelete"),mt(ZZ,"require_listCacheGet"),mt(QZ,"require_listCacheHas"),mt(JZ,"require_listCacheSet"),mt(eQ,"require_ListCache"),mt(tQ,"require_Map"),mt(rQ,"require_mapCacheClear"),mt(iQ,"require_isKeyable"),mt(nQ,"require_getMapData"),mt(aQ,"require_mapCacheDelete"),mt(sQ,"require_mapCacheGet"),mt(oQ,"require_mapCacheHas"),mt(lQ,"require_mapCacheSet"),mt(cQ,"require_MapCache"),mt(hQ,"requireMemoize"),mt(uQ,"require_memoizeCapped"),mt(dQ,"require_stringToPath"),mt(pQ,"require_arrayMap"),mt(gQ,"require_baseToString"),mt(fQ,"requireToString"),mt(mQ,"require_castPath"),mt(yQ,"require_toKey"),mt(vQ,"require_baseGet"),mt(bQ,"requireGet"),Bce=bQ(),Ase=lZ(Bce),mt(xQ,"require_defineProperty"),mt(wQ,"require_baseAssignValue"),mt(TQ,"require_assignValue"),mt(kQ,"require_isIndex"),mt(CQ,"require_baseSet"),mt(SQ,"requireSet"),Oce=SQ(),qse=lZ(Oce),mt(EQ,"require_copyArray"),mt(_Q,"requireToPath"),qle=_Q(),Yse=lZ(qle),Sce={data:mt(function(x){var e={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:mt(function(e){},"beforeGet"),beforeSet:mt(function(e,t){},"beforeSet"),onSet:mt(function(e){},"onSet"),canSet:mt(function(e){return!0},"canSet")};return x=Kee({},e,x),mt(function(e,t){var r,i=x,n=this,a=void 0!==n.length,s=a?n:[n],o=a?n[0]:n;if(kee(e)){var l,c=-1!==e.indexOf(".")&&Yse(e);if(i.allowGetting&&void 0===t)return o&&(i.beforeGet(o),l=c&&void 0===o._private[i.field][e]?Ase(o._private[i.field],c):o._private[i.field][e]),l;if(i.allowSetting&&void 0!==t&&!i.immutableKeys[e]){a=ZK({},e,t),i.beforeSet(n,a);for(var h=0,u=s.length;h<u;h++){var d=s[h];i.canSet(d)&&(c&&void 0===o._private[i.field][e]?qse(d._private[i.field],c,t):d._private[i.field][e]=t)}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}}else if(i.allowSetting&&Eee(e)){var p=e,g=Object.keys(p);i.beforeSet(n,p);for(var f=0;f<g.length;f++){var m,y=p[m=g[f]];if(!i.immutableKeys[m])for(var v=0;v<s.length;v++){var b=s[v];i.canSet(b)&&(b._private[i.field][m]=y)}}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}else if(i.allowBinding&&Cee(e))n.on(i.bindingEvent,e);else if(i.allowGetting&&void 0===e)return o&&(i.beforeGet(o),r=o._private[i.field]),r;return n},"dataImpl")},"data"),removeData:mt(function(f){return f=Kee({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),mt(function(e){var t=f,r=void 0!==this.length?this:[this];if(kee(e)){for(var i=e.split(/\s+/),n=i.length,a=0;a<n;a++){var s=i[a];if(!Pee(s)&&!t.immutableKeys[s])for(var o=0,l=r.length;o<l;o++)r[o]._private[t.field][s]=void 0}t.triggerEvent&&this[t.triggerFnName](t.event)}else if(void 0===e){for(var c=0,h=r.length;c<h;c++)for(var u=r[c]._private[t.field],d=Object.keys(u),p=0;p<d.length;p++){var g=d[p];t.immutableKeys[g]||(u[g]=void 0)}t.triggerEvent&&this[t.triggerFnName](t.event)}return this},"removeDataImpl")},"removeData")},Dce={eventAliasesOn:mt(function(e){e.addListener=e.listen=e.bind=e.on,e.unlisten=e.unbind=e.off=e.removeListener,e.trigger=e.emit,e.pon=e.promiseOn=function(e,t){var n=this,a=Array.prototype.slice.call(arguments,0);return new Hne(function(t,e){var r=mt(function(e){n.off.apply(n,i),t(e)},"callback"),i=(r=a.concat([r])).concat([]);n.on.apply(n,r)})}},"eventAliasesOn")},Vse={},[ghe,Sce,Dce].forEach(function(e){Kee(Vse,e)}),Zce={animate:Vse.animate(),animation:Vse.animation(),animated:Vse.animated(),clearQueue:Vse.clearQueue(),delay:Vse.delay(),delayAnimation:Vse.delayAnimation(),stop:Vse.stop()},(nhe={classes:mt(function(e){var t;if(void 0===e)return t=[],this[0]._private.classes.forEach(function(e){return t.push(e)}),t;See(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],i=new xre(e),n=0;n<this.length;n++){for(var a=this[n],s=a._private,o=s.classes,l=!1,c=0;c<e.length;c++){var h=e[c];if(!o.has(h)){l=!0;break}}(l=l||o.size!==e.length)&&(s.classes=i,r.push(a))}return 0<r.length&&this.spawn(r).updateStyle().emit("class"),this},"classes"),addClass:mt(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:mt(function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},"hasClass"),toggleClass:mt(function(e,t){See(e)||(e=e.match(/\S+/g)||[]);for(var r=void 0===t,i=[],n=0,a=this.length;n<a;n++)for(var s=this[n],o=s._private.classes,l=!1,c=0;c<e.length;c++){var h=e[c],u=o.has(h),d=!1;t||r&&!u?(o.add(h),d=!0):(!t||r&&u)&&(o.delete(h),d=!0),!l&&d&&(i.push(s),l=!0)}return 0<i.length&&this.spawn(i).updateStyle().emit("class"),this},"toggleClass"),removeClass:mt(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:mt(function(e,t){var r=this;if(null==t)t=250;else if(0===t)return r;return r.addClass(e),setTimeout(function(){r.removeClass(e)},t),r},"flashClass")}).className=nhe.classNames=nhe.classes,(Hse={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Vee,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+Hse.metaChar+"))+",Hse.className="(?:[\\w-]|(?:\\\\"+Hse.metaChar+"))+",Hse.value=Hse.string+"|"+Hse.number,Hse.id=Hse.variable;for(var t,r=Hse.comparatorOp.split("|"),n=0;n<r.length;n++)t=r[n],Hse.comparatorOp+="|@"+t;for(r=Hse.comparatorOp.split("|"),n=0;n<r.length;n++)0<=(t=r[n]).indexOf("!")||"="===t||(Hse.comparatorOp+="|\\!"+t);function o(e){return-e.tension*e.x-e.friction*e.v}function l(e,t,r){return{dx:(r={x:e.x+r.dx*t,v:e.v+r.dv*t,tension:e.tension,friction:e.friction}).v,dv:o(r)}}function h(e,t){var r=l(e,.5*t,s={dx:e.v,dv:o(e)}),i=l(e,.5*t,r),n=l(e,t,i),a=1/6*(s.dx+2*(r.dx+i.dx)+n.dx),s=1/6*(s.dv+2*(r.dv+i.dv)+n.dv);return e.x=e.x+a*t,e.v=e.v+s*t,e}Xse=mt(function(){return{checks:[]}},"newQuery"),Kse={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Zse=[{selector:":selected",matches:mt(function(e){return e.selected()},"matches")},{selector:":unselected",matches:mt(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:mt(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:mt(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:mt(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:mt(function(e){return!e.locked()},"matches")},{selector:":visible",matches:mt(function(e){return e.visible()},"matches")},{selector:":hidden",matches:mt(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:mt(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:mt(function(e){return e.grabbed()},"matches")},{selector:":free",matches:mt(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:mt(function(e){return e.removed()},"matches")},{selector:":inside",matches:mt(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:mt(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:mt(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:mt(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:mt(function(e){return!e.animated()},"matches")},{selector:":parent",matches:mt(function(e){return e.isParent()},"matches")},{selector:":childless",matches:mt(function(e){return e.isChildless()},"matches")},{selector:":child",matches:mt(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:mt(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:mt(function(e){return e.isChild()},"matches")},{selector:":compound",matches:mt(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:mt(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:mt(function(e){return e.isSimple()},"matches")},{selector:":active",matches:mt(function(e){return e.active()},"matches")},{selector:":inactive",matches:mt(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:mt(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:mt(function(e){return!e.backgrounding()},"matches")}].sort(function(e,t){return Xee(e.selector,t.selector)}),Qse=(()=>{for(var e,t={},r=0;r<Zse.length;r++)t[(e=Zse[r]).selector]=e.matches;return t})(),Jse=mt(function(e,t){return Qse[e](t)},"stateSelectorMatches"),J="("+Zse.map(function(e){return e.selector}).join("|")+")",eoe=mt(function(e){return e.replace(new RegExp("\\\\("+Hse.metaChar+")","g"),function(e,t){return t})},"cleanMetaChars"),toe=mt(function(e,t,r){e[e.length-1]=r},"replaceLastQuery"),(roe=[{name:"group",query:!0,regex:"("+Hse.group+")",populate:mt(function(e,t,r){r=rZ(r,1)[0],t.checks.push({type:Kse.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:J,populate:mt(function(e,t,r){r=rZ(r,1)[0],t.checks.push({type:Kse.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+Hse.id+")",populate:mt(function(e,t,r){r=rZ(r,1)[0],t.checks.push({type:Kse.ID,value:eoe(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+Hse.className+")",populate:mt(function(e,t,r){r=rZ(r,1)[0],t.checks.push({type:Kse.CLASS,value:eoe(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Hse.variable+")\\s*\\]",populate:mt(function(e,t,r){r=rZ(r,1)[0],t.checks.push({type:Kse.DATA_EXIST,field:eoe(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Hse.variable+")\\s*("+Hse.comparatorOp+")\\s*("+Hse.value+")\\s*\\]",populate:mt(function(e,t,r){var i=(r=rZ(r,3))[0],n=r[1],r=r[2],r=null!=new RegExp("^"+Hse.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);t.checks.push({type:Kse.DATA_COMPARE,field:eoe(i),operator:n,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Hse.boolOp+")\\s*("+Hse.variable+")\\s*\\]",populate:mt(function(e,t,r){var i=(r=rZ(r,2))[0];t.checks.push({type:Kse.DATA_BOOL,field:eoe(r[1]),operator:i})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Hse.meta+")\\s*("+Hse.comparatorOp+")\\s*("+Hse.number+")\\s*\\]\\]",populate:mt(function(e,t,r){var i=(r=rZ(r,3))[0],n=r[1],r=r[2];t.checks.push({type:Kse.META_COMPARE,field:eoe(i),operator:n,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:Hse.separator,populate:mt(function(e,t){var r=e.currentSubject,i=e.edgeCount,n=e.compoundCount,a=e[e.length-1];return null!=r&&(a.subject=r,e.currentSubject=null),a.edgeCount=i,a.compoundCount=n,e.edgeCount=0,e.compoundCount=0,e[e.length++]=Xse()},"populate")},{name:"directedEdge",separator:!0,regex:Hse.directedEdge,populate:mt(function(e,t){var r,i,n;return null==e.currentSubject?(i=Xse(),r=t,n=Xse(),i.checks.push({type:Kse.DIRECTED_EDGE,source:r,target:n}),toe(e,t,i)):(r=Xse(),i=t,n=Xse(),r.checks.push({type:Kse.NODE_SOURCE,source:i,target:n}),toe(e,t,r)),e.edgeCount++,n},"populate")},{name:"undirectedEdge",separator:!0,regex:Hse.undirectedEdge,populate:mt(function(e,t){var r,i,n;return null==e.currentSubject?(i=Xse(),r=t,n=Xse(),i.checks.push({type:Kse.UNDIRECTED_EDGE,nodes:[r,n]}),toe(e,t,i),e.edgeCount++):(r=Xse(),i=t,n=Xse(),r.checks.push({type:Kse.NODE_NEIGHBOR,node:i,neighbor:n}),toe(e,t,r)),n},"populate")},{name:"child",separator:!0,regex:Hse.child,populate:mt(function(e,t){var r,i,n,a,s,o;return null==e.currentSubject?(o=Xse(),a=Xse(),r=e[e.length-1],o.checks.push({type:Kse.CHILD,parent:r,child:a}),toe(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Xse(),o=e[e.length-1],a=Xse(),i=Xse(),n=Xse(),s=Xse(),r.checks.push({type:Kse.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=t.checks,t.checks=[{type:Kse.TRUE}],s.checks.push({type:Kse.TRUE}),a.checks.push({type:Kse.PARENT,parent:s,child:n}),toe(e,o,r),e.currentSubject=i,e.compoundCount++,n):(a=Xse(),s=Xse(),o=[{type:Kse.PARENT,parent:a,child:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:Hse.descendant,populate:mt(function(e,t){var r,i,n,a,s,o;return null==e.currentSubject?(o=Xse(),a=Xse(),r=e[e.length-1],o.checks.push({type:Kse.DESCENDANT,ancestor:r,descendant:a}),toe(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Xse(),o=e[e.length-1],a=Xse(),i=Xse(),n=Xse(),s=Xse(),r.checks.push({type:Kse.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=t.checks,t.checks=[{type:Kse.TRUE}],s.checks.push({type:Kse.TRUE}),a.checks.push({type:Kse.ANCESTOR,ancestor:s,descendant:n}),toe(e,o,r),e.currentSubject=i,e.compoundCount++,n):(a=Xse(),s=Xse(),o=[{type:Kse.ANCESTOR,ancestor:a,descendant:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:Hse.subject,populate:mt(function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return ore("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t,(e=null==(t=e[e.length-1].checks[0])?null:t.type)===Kse.DIRECTED_EDGE?t.type=Kse.NODE_TARGET:e===Kse.UNDIRECTED_EDGE&&(t.type=Kse.NODE_NEIGHBOR,t.node=t.nodes[1],t.neighbor=t.nodes[0],t.nodes=null)},"populate")}]).forEach(function(e){return e.regexObj=new RegExp("^"+e.regex)}),ioe=mt(function(e){for(var t=0;t<roe.length;t++){var r=(o=roe[t]).name,i=e.match(o.regexObj);if(null!=i){var n=i,a=o,s=r,o=i[0];e=e.substring(o.length);break}}return{expr:a,match:n,name:s,remaining:e}},"consumeExpr"),noe=mt(function(e){var t=e.match(/^\s+/);return t&&(t=t[0],e=e.substring(t.length)),e},"consumeWhitespace"),gce=mt(function(e){var t=this,r=t.inputText=e,i=t[0]=Xse();for(t.length=1,r=noe(r);;){var n=ioe(r);if(null==n.expr)return ore("The selector `"+e+"`is invalid"),!1;var a=n.match.slice(1);if(!1===(a=n.expr.populate(t,i,a)))return!1;if(null!=a&&(i=a),(r=n.remaining).match(/^\s*$/))break}var s=t[t.length-1];null!=t.currentSubject&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var o=0;o<t.length;o++){var l=t[o];if(0<l.compoundCount&&0<l.edgeCount)return ore("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return ore("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&ore("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),Pce=mt(function(){if(null!=this.toStringCache)return this.toStringCache;for(var o=mt(function(e){return e??""},"clean"),l=mt(function(e){return kee(e)?'"'+e+'"':o(e)},"cleanVal"),c=mt(function(e){return" "+e+" "},"space"),a=mt(function(e,t){var r=e.type,i=e.value;switch(r){case Kse.GROUP:return(n=o(i)).substring(0,n.length-1);case Kse.DATA_COMPARE:return"["+e.field+c(o(e.operator))+l(i)+"]";case Kse.DATA_BOOL:var n=e.operator,a=e.field;return"["+o(n)+a+"]";case Kse.DATA_EXIST:return"["+e.field+"]";case Kse.META_COMPARE:return n=e.operator,"[["+e.field+c(o(n))+l(i)+"]]";case Kse.STATE:return i;case Kse.ID:return"#"+i;case Kse.CLASS:return"."+i;case Kse.PARENT:case Kse.CHILD:return h(e.parent,t)+c(">")+h(e.child,t);case Kse.ANCESTOR:case Kse.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case Kse.COMPOUND_SPLIT:var a=h(e.left,t),n=h(e.subject,t),s=h(e.right,t);return a+(0<a.length?" ":"")+n+s;case Kse.TRUE:return""}},"checkToString"),h=mt(function(i,n){return i.checks.reduce(function(e,t,r){return e+(n===i&&0===r?"$":"")+a(t,n)},"")},"queryToString"),e="",t=0;t<this.length;t++){var r=this[t];e+=h(r,r.subject),1<this.length&&t<this.length-1&&(e+=", ")}return this.toStringCache=e},"toString"),Mce={parse:gce,toString:Pce},aoe=mt(function(e,t,r){var i,n,a,s=kee(e),o=he(e),l=kee(r),c=!1,h=!1,u=!1;switch(0<=t.indexOf("!")&&(t=t.replace("!",""),h=!0),0<=t.indexOf("@")&&(t=t.replace("@",""),c=!0),(s||l||c)&&(n=s||o?""+e:"",a=""+r),c&&(e=n=n.toLowerCase(),r=a=a.toLowerCase()),t){case"*=":i=0<=n.indexOf(a);break;case"$=":i=0<=n.indexOf(a,n.length-a.length);break;case"^=":i=0===n.indexOf(a);break;case"=":i=e===r;break;case">":u=!0,i=r<e;break;case">=":u=!0,i=r<=e;break;case"<":u=!0,i=e<r;break;case"<=":u=!0,i=e<=r;break;default:i=!1}return!h||null==e&&u?i:!i},"valCmp"),soe=mt(function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}},"boolCmp"),ooe=mt(function(e){return void 0!==e},"existCmp"),loe=mt(function(e,t){return e.data(t)},"data"),coe=mt(function(e,t){return e[t]()},"meta"),hoe=[],uoe=mt(function(e,t){return e.checks.every(function(e){return hoe[e.type](e,t)})},"matches"),hoe[Kse.GROUP]=function(e,t){return"*"===(e=e.value)||e===t.group()},hoe[Kse.STATE]=function(e,t){return e=e.value,Jse(e,t)},hoe[Kse.ID]=function(e,t){return e=e.value,t.id()===e},hoe[Kse.CLASS]=function(e,t){return e=e.value,t.hasClass(e)},hoe[Kse.META_COMPARE]=function(e,t){var r=e.field,i=e.operator,e=e.value;return aoe(coe(t,r),i,e)},hoe[Kse.DATA_COMPARE]=function(e,t){var r=e.field,i=e.operator,e=e.value;return aoe(loe(t,r),i,e)},hoe[Kse.DATA_BOOL]=function(e,t){var r=e.field,e=e.operator;return soe(loe(t,r),e)},hoe[Kse.DATA_EXIST]=function(e,t){return e=e.field,ooe(loe(t,e))},hoe[Kse.UNDIRECTED_EDGE]=function(e,t){var r=e.nodes[0],e=e.nodes[1],i=t.source(),t=t.target();return uoe(r,i)&&uoe(e,t)||uoe(e,i)&&uoe(r,t)},hoe[Kse.NODE_NEIGHBOR]=function(t,e){return uoe(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&uoe(t.neighbor,e)})},hoe[Kse.DIRECTED_EDGE]=function(e,t){return uoe(e.source,t.source())&&uoe(e.target,t.target())},hoe[Kse.NODE_SOURCE]=function(t,e){return uoe(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&uoe(t.target,e)})},hoe[Kse.NODE_TARGET]=function(t,e){return uoe(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&uoe(t.source,e)})},hoe[Kse.CHILD]=function(e,t){return uoe(e.child,t)&&uoe(e.parent,t.parent())},hoe[Kse.PARENT]=function(t,e){return uoe(t.parent,e)&&e.children().some(function(e){return uoe(t.child,e)})},hoe[Kse.DESCENDANT]=function(t,e){return uoe(t.descendant,e)&&e.ancestors().some(function(e){return uoe(t.ancestor,e)})},hoe[Kse.ANCESTOR]=function(t,e){return uoe(t.ancestor,e)&&e.descendants().some(function(e){return uoe(t.descendant,e)})},hoe[Kse.COMPOUND_SPLIT]=function(e,t){return uoe(e.subject,t)&&uoe(e.left,t)&&uoe(e.right,t)},hoe[Kse.TRUE]=function(){return!0},hoe[Kse.COLLECTION]=function(e,t){return e.value.has(t)},hoe[Kse.FILTER]=function(e,t){return(0,e.value)(t)},che=mt(function(e){var t,i=this;return 1===i.length&&1===i[0].checks.length&&i[0].checks[0].type===Kse.ID?e.getElementById(i[0].checks[0].value).collection():(t=mt(function(e){for(var t=0;t<i.length;t++){var r=i[t];if(uoe(r,e))return!0}return!1},"selectorFunction"),null==i.text()&&(t=mt(function(){return!0},"selectorFunction")),e.filter(t))},"filter"),Ice=mt(function(e){for(var t=0;t<this.length;t++){var r=this[t];if(uoe(r,e))return!0}return!1},"matches"),kce={matches:Ice,filter:che},doe=mt(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||kee(e)&&e.match(/^\s*$/)||(Lee(e)?this.addQuery({checks:[{type:Kse.COLLECTION,value:e.collection()}]}):Cee(e)?this.addQuery({checks:[{type:Kse.FILTER,value:e}]}):kee(e)?this.parse(e)||(this.invalid=!0):are("A selector must be created from a string; found "))},"Selector"),poe=doe.prototype,[Mce,kce].forEach(function(e){return Kee(poe,e)}),poe.text=function(){return this.inputText},poe.size=function(){return this.length},poe.eq=function(e){return this[e]},poe.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},poe.addQuery=function(e){this[this.length++]=e},poe.selector=poe.toString,(ahe={allAre:mt(function(e){var t=new doe(e);return this.every(function(e){return t.matches(e)})},"allAre"),is:mt(function(e){var t=new doe(e);return this.some(function(e){return t.matches(e)})},"is"),some:mt(function(e,t){for(var r=0;r<this.length;r++)if(t?e.apply(t,[this[r],r,this]):e(this[r],r,this))return!0;return!1},"some"),every:mt(function(e,t){for(var r=0;r<this.length;r++)if(!(t?e.apply(t,[this[r],r,this]):e(this[r],r,this)))return!1;return!0},"every"),same:mt(function(t){if(this===t)return!0;t=this.cy().collection(t);var e=this.length;return e===t.length&&(1===e?this[0]===t[0]:this.every(function(e){return t.hasElementWithId(e.id())}))},"same"),anySame:mt(function(t){return t=this.cy().collection(t),this.some(function(e){return t.hasElementWithId(e.id())})},"anySame"),allAreNeighbors:mt(function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every(function(e){return t.hasElementWithId(e.id())})},"allAreNeighbors"),contains:mt(function(e){e=this.cy().collection(e);var t=this;return e.every(function(e){return t.hasElementWithId(e.id())})},"contains")}).allAreNeighbours=ahe.allAreNeighbors,ahe.has=ahe.contains,ahe.equal=ahe.equals=ahe.same,Hce=mt(function(s,o){return mt(function(e,t,r,i){var n,a=e;return null==a?n="":Lee(a)&&1===a.length&&(n=a.id()),1===this.length&&n?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[n=Vte(n)]||(a[n]=s.call(this,e,t,r,i)):s.call(this,e,t,r,i)},"traversalCache")},"cache"),$ce={parent:mt(function(e){var t=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var i=0;i<this.length;i++){var n=this[i]._private.parent;n&&t.push(n)}return this.spawn(t,!0).filter(e)},"parent"),parents:mt(function(e){for(var t=[],r=this.parent();r.nonempty();){for(var i=0;i<r.length;i++){var n=r[i];t.push(n)}r=r.parent()}return this.spawn(t,!0).filter(e)},"parents"),commonAncestors:mt(function(e){for(var t=0;t<this.length;t++)var r=this[t].parents(),i=(i=i||r).intersect(r);return i.filter(e)},"commonAncestors"),orphans:mt(function(e){return this.stdFilter(function(e){return e.isOrphan()}).filter(e)},"orphans"),nonorphans:mt(function(e){return this.stdFilter(function(e){return e.isChild()}).filter(e)},"nonorphans"),children:Hce(function(e){for(var t=[],r=0;r<this.length;r++)for(var i=this[r]._private.children,n=0;n<i.length;n++)t.push(i[n]);return this.spawn(t,!0).filter(e)},"children"),siblings:mt(function(e){return this.parent().children().not(this).filter(e)},"siblings"),isParent:mt(function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},"isParent"),isChildless:mt(function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},"isChildless"),isChild:mt(function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},"isChild"),isOrphan:mt(function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},"isOrphan"),descendants:mt(function(e){var i=[];function n(e){for(var t=0;t<e.length;t++){var r=e[t];i.push(r),r.children().nonempty()&&n(r.children())}}return mt(n,"add"),n(this.children()),this.spawn(i,!0).filter(e)},"descendants")},mt(AQ,"forEachCompound"),mt(RQ,"addChildren"),$ce.forEachDown=function(e){return AQ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],RQ)},mt(LQ,"addParent"),$ce.forEachUp=function(e){return AQ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],LQ)},mt(NQ,"addParentAndChildren"),$ce.forEachUpAndDown=function(e){return AQ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],NQ)},$ce.ancestors=$ce.parents,(Oce=Bce={data:Vse.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Vse.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Vse.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Vse.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Vse.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Vse.removeData({field:"rscratch",triggerEvent:!1}),id:mt(function(){var e=this[0];if(e)return e._private.data.id},"id")}).attr=Oce.data,Oce.removeAttr=Oce.removeData,qle=Bce,ghe={},mt(DQ,"defineDegreeFunction"),Kee(ghe,{degree:DQ(function(e,t){return t.source().same(t.target())?2:1}),indegree:DQ(function(e,t){return t.target().same(e)?1:0}),outdegree:DQ(function(e,t){return t.source().same(e)?1:0})}),mt(IQ,"defineDegreeBoundsFunction"),Kee(ghe,{minDegree:IQ("degree",function(e,t){return e<t}),maxDegree:IQ("degree",function(e,t){return t<e}),minIndegree:IQ("indegree",function(e,t){return e<t}),maxIndegree:IQ("indegree",function(e,t){return t<e}),minOutdegree:IQ("outdegree",function(e,t){return e<t}),maxOutdegree:IQ("outdegree",function(e,t){return t<e})}),Kee(ghe,{totalDegree:mt(function(e){for(var t=0,r=this.nodes(),i=0;i<r.length;i++)t+=r[i].degree(e);return t},"totalDegree")}),goe=mt(function(e,t,r){for(var i=0;i<e.length;i++){var n,a=e[i];a.locked()||(n=a._private.position,n={x:null!=t.x?t.x-n.x:0,y:null!=t.y?t.y-n.y:0},!a.isParent()||0===n.x&&0===n.y||a.children().shift(n,r),a.dirtyBoundingBoxCache())}},"beforePositionSet"),Sce={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:mt(function(e){e.updateCompoundBounds()},"beforeGet"),beforeSet:mt(function(e,t){goe(e,t,!1)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:mt(function(e){return!e.locked()},"canSet")},(J=Dce={position:Vse.data(Sce),silentPosition:Vse.data(Kee({},Sce,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:mt(function(e,t){goe(e,t,!0)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:mt(function(e,t){if(Eee(e))t?this.silentPosition(e):this.position(e);else if(Cee(e)){var r=e;(e=this.cy()).startBatch();for(var i=0;i<this.length;i++){var n,a=this[i];(n=r(a,i))&&(t?a.silentPosition(n):a.position(n))}e.endBatch()}return this},"positions"),silentPositions:mt(function(e){return this.positions(e,!0)},"silentPositions"),shift:mt(function(e,t,r){var i;if(Eee(e)?(i={x:he(e.x)?e.x:0,y:he(e.y)?e.y:0},r=t):kee(e)&&he(t)&&((i={x:0,y:0})[e]=t),null!=i){var n=this.cy();n.startBatch();for(var a=0;a<this.length;a++){var s,o=this[a];n.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this)||(s={x:(s=o.position()).x+i.x,y:s.y+i.y},r?o.silentPosition(s):o.position(s))}n.endBatch()}return this},"shift"),silentShift:mt(function(e,t){return Eee(e)?this.shift(e,!0):kee(e)&&he(t)&&this.shift(e,t,!0),this},"silentShift"),renderedPosition:mt(function(e,t){var r=this[0],i=(s=this.cy()).zoom(),n=s.pan(),a=Eee(e)?e:void 0,s=void 0!==a||void 0!==t&&kee(e);if(r&&r.isNode()){if(!s)return r=r.position(),a=Pre(r,i,n),void 0===e?a:a[e];for(var o=0;o<this.length;o++){var l=this[o];void 0!==t?l.position(e,(t-n[e])/i):void 0!==a&&l.position($re(a,i,n))}}else if(!s)return;return this},"renderedPosition"),relativePosition:mt(function(e,t){var r,i=this[0],n=this.cy(),a=Eee(e)?e:void 0,s=void 0!==a||void 0!==t&&kee(e),o=n.hasCompoundNodes();if(i&&i.isNode()){if(!s)return n=i.position(),(r=(i=o?i.parent():null)&&0<i.length)&&(i=i[0]),r=r?i.position():{x:0,y:0},a={x:n.x-r.x,y:n.y-r.y},void 0===e?a:a[e];for(var l=0;l<this.length;l++){var c=this[l],h=o?c.parent():null,u=((u=h&&0<h.length)&&(h=h[0]),u?h.position():{x:0,y:0});void 0!==t?c.position(e,t+u[e]):void 0!==a&&c.position({x:a.x+u.x,y:a.y+u.y})}}else if(!s)return;return this},"relativePosition")}).modelPosition=J.point=J.position,J.modelPositions=J.points=J.positions,J.renderedPoint=J.renderedPosition,J.relativePoint=J.relativePosition,gce=Dce,Ice=Pce={renderedBoundingBox:function(e){var e=this.boundingBox(e),t=(r=this.cy()).zoom(),r=r.pan(),i=e.x1*t+r.x,n=e.x2*t+r.x,a=e.y1*t+r.y;return{x1:i,x2:n,y1:a,y2:e=e.y2*t+r.y,w:n-i,h:e-a}},dirtyCompoundBoundsCache:function(){var r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()&&this.forEachUp(function(e){var t;e.isParent()&&((t=e._private).compoundBoundsClean=!1,t.bbCache=null,r||e.emitAndNotify("bounds"))}),this},updateCompoundBounds:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(t.styleEnabled()&&t.hasCompoundNodes()&&(e||!t.batching())){mt(a,"update");for(var r=0;r<this.length;r++){var i=this[r],n=i._private;n.compoundBoundsClean&&!e||(a(i),t.batching())||(n.compoundBoundsClean=!0)}}return this;function a(e){var t,r,i,n,a,s,o,l;function c(e,t,r){var i=0,n=0,a=t+r;return 0<e&&0<a&&(i=t/a*e,n=r/a*e),{biasDiff:i,biasComplementDiff:n}}function h(e,t,r,i){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(i){case"width":return 0<e?r.pfValue*e:0;case"height":return 0<t?r.pfValue*t:0;case"average":return 0<e&&0<t?r.pfValue*(e+t)/2:0;case"min":return 0<e&&0<t?t<e?r.pfValue*t:r.pfValue*e:0;case"max":return 0<e&&0<t?t<e?r.pfValue*e:r.pfValue*t:0;default:return 0}}e.isParent()&&(t=e._private,i=e.children(),n="include"===e.pstyle("compound-sizing-wrt-labels").value,r={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=i.boundingBox({includeLabels:n,includeOverlays:!1,useCache:!1}),n=t.position,0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=n.x-i.w/2,i.x2=n.x+i.w/2,i.y1=n.y-i.h/2,i.y2=n.y+i.h/2),mt(c,"computeBiasValues"),mt(h,"computePaddingValues"),s=r.width.left.value,"px"===r.width.left.units&&0<r.width.val&&(s=100*s/r.width.val),a=r.width.right.value,"px"===r.width.right.units&&0<r.width.val&&(a=100*a/r.width.val),l=r.height.top.value,"px"===r.height.top.units&&0<r.height.val&&(l=100*l/r.height.val),o=r.height.bottom.value,"px"===r.height.bottom.units&&0<r.height.val&&(o=100*o/r.height.val),a=(s=c(r.width.val-i.w,s,a)).biasDiff,s=s.biasComplementDiff,o=(l=c(r.height.val-i.h,l,o)).biasDiff,l=l.biasComplementDiff,t.autoPadding=h(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,r.width.val),n.x=(-a+i.x1+i.x2+s)/2,t.autoHeight=Math.max(i.h,r.height.val),n.y=(-o+i.y1+i.y2+l)/2)}}},foe=mt(function(e){return e===1/0||e===-1/0?0:e},"noninf"),moe=mt(function(e,t,r,i,n){i-t!=0&&n-r!=0&&null!=t&&null!=r&&null!=i&&null!=n&&(e.x1=t<e.x1?t:e.x1,e.x2=e.x2<i?i:e.x2,e.y1=r<e.y1?r:e.y1,e.y2=e.y2<n?n:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),yoe=mt(function(e,t){return null==t?e:moe(e,t.x1,t.y1,t.x2,t.y2)},"updateBoundsFromBox"),voe=mt(function(e,t,r){return yre(e,t,r)},"prefixedProperty"),boe=mt(function(e,t,r){var i,n,a,s;t.cy().headless()||(i=(a=(s=t._private).rstyle).arrowWidth/2,"none"!==t.pstyle(r+"-arrow-shape").value&&(t="source"===r?(n=a.srcX,a.srcY):"target"===r?(n=a.tgtX,a.tgtY):(n=a.midX,a.midY),(s=(a=s.arrowBounds=s.arrowBounds||{})[r]=a[r]||{}).x1=n-i,s.y1=t-i,s.x2=n+i,s.y2=t+i,s.w=s.x2-s.x1,s.h=s.y2-s.y1,aie(s,1),moe(e,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),xoe=mt(function(e,t,r){if(!t.cy().headless()){var i=t._private,n=i.rstyle;if(t.pstyle((p=r?r+"-":"")+"label").strValue){var a=t.pstyle("text-halign"),s=t.pstyle("text-valign"),o=voe(n,"labelWidth",r),l=voe(n,"labelHeight",r),c=voe(n,"labelX",r),h=voe(n,"labelY",r),n=t.pstyle(p+"text-margin-x").pfValue,u=t.pstyle(p+"text-margin-y").pfValue,d=t.isEdge(),p=t.pstyle(p+"text-rotation"),g=t.pstyle("text-outline-width").pfValue,f=t.pstyle("text-border-width").pfValue/2,t=t.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,b=m/2;if(d)C=c-v,S=c+v,E=h-b,_=h+b;else{switch(a.value){case"left":C=c-y,S=c;break;case"center":C=c-v,S=c+v;break;case"right":S=(C=c)+y}switch(s.value){case"top":E=h-m,_=h;break;case"center":E=h-b,_=h+b;break;case"bottom":_=(E=h)+m}}if(C+=l=n-Math.max(g,f)-t-2,S+=o=n+Math.max(g,f)+t+2,E+=n=u-Math.max(g,f)-t-2,_+=u=u+Math.max(g,f)+t+2,(t=(f=i.labelBounds)[g=r||"main"]=f[g]||{}).x1=C,t.y1=E,t.x2=S,t.y2=_,t.w=S-C,t.h=_-E,t.leftPad=l,t.rightPad=o,t.topPad=n,t.botPad=u,l=d&&"autorotate"===p.strValue,o=null!=p.pfValue&&0!==p.pfValue,l||o){var n=l?voe(i.rstyle,"labelAngle",r):p.pfValue,x=Math.cos(n),w=Math.sin(n),T=(C+S)/2,k=(E+_)/2;if(!d){switch(a.value){case"left":T=S;break;case"right":T=C}switch(s.value){case"top":k=_;break;case"bottom":k=E}}var u=(t=mt(function(e,t){return{x:(e-=T)*x-(t-=k)*w+T,y:e*w+t*x+k}},"rotate"))(C,E),o=t(C,_),l=t(S,E),r=t(S,_),C=Math.min(u.x,o.x,l.x,r.x),S=Math.max(u.x,o.x,l.x,r.x),E=Math.min(u.y,o.y,l.y,r.y),_=Math.max(u.y,o.y,l.y,r.y)}(n=f[p=g+"Rot"]=f[p]||{}).x1=C,n.y1=E,n.x2=S,n.y2=_,n.w=S-C,n.h=_-E,moe(e,C,E,S,_),moe(i.labelBounds.all,C,E,S,_)}return e}},"updateBoundsFromLabel"),woe=mt(function(e,t){var r,i;t.cy().headless()||(r=t.pstyle("outline-opacity").value,i=t.pstyle("outline-width").value+t.pstyle("outline-offset").value,Toe(e,t,r,i,"outside",i/2))},"updateBoundsFromOutline"),Toe=mt(function(e,t,r,i,n,a){var s,o,l;0===r||i<=0||"inside"===n||(r=t.cy(),o=t.pstyle("shape").value,r=r.renderer().nodeShapes[o],s=(o=t.position()).x,o=o.y,l=t.width(),t=t.height(),r.hasMiterBounds?("center"===n&&(i/=2),n=r.miterBounds(s,o,l,t,i),yoe(e,n)):null!=a&&0<a&&sie(e,[a,a,a,a]))},"updateBoundsFromMiter"),koe=mt(function(e,t){var r,i,n;t.cy().headless()||(r=t.pstyle("border-opacity").value,i=t.pstyle("border-width").pfValue,n=t.pstyle("border-position").value,Toe(e,t,r,i,n))},"updateBoundsFromMiterBorder"),Coe=mt(function(e,t){var r=(i=e._private.cy).styleEnabled(),i=i.headless(),n=eie(),a=e._private,s=e.isNode(),o=e.isEdge(),l=a.rstyle,c=s&&r?e.pstyle("bounds-expansion").pfValue:[0],h=mt(function(e){return"none"!==e.pstyle("display").value},"isDisplayed");if(h=!r||h(e)&&(!o||h(e.source())&&h(e.target()))){var u=0,d=(r&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(u=e.pstyle("overlay-padding").value),0),u=(r&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(d=e.pstyle("underlay-padding").value),Math.max(u,d)),p=0;if(r&&(p=e.pstyle("width").pfValue/2),s&&t.includeNodes){var s=(d=e.position()).x,d=d.y,g=e.outerWidth()/2,f=e.outerHeight()/2;moe(n,y=s-g,b=d-f,v=s+g,x=d+f),r&&woe(n,e),r&&t.includeOutlines&&!i&&woe(n,e),r&&koe(n,e)}else if(o&&t.includeEdges)if(r&&!i){var m,s=e.pstyle("curve-style").strValue,y=Math.min(l.srcX,l.midX,l.tgtX),v=Math.max(l.srcX,l.midX,l.tgtX),b=Math.min(l.srcY,l.midY,l.tgtY),x=Math.max(l.srcY,l.midY,l.tgtY);if(moe(n,y-=p,b-=p,v+=p,x+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,b=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(x=g[1].y)<b&&(f=b,b=x,x=f),moe(n,y-p,b-p,v+p,x+p));else if("bezier"===s||"unbundled-bezier"===s||Yee(s,"segments")||Yee(s,"taxi")){switch(s){case"bezier":case"unbundled-bezier":m=l.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":m=l.linePts}if(null!=m)for(var w=0;w<m.length;w++){var T=m[w],y=T.x-p;moe(n,y,b=T.y-p,v=T.x+p,x=T.y+p)}}}else i=e.source().position(),d=e.target().position(),y=i.x,v=d.x,b=i.y,v<y&&(g=y,y=v,v=g),(x=d.y)<b&&(f=b,b=x,x=f),moe(n,y-=p,b-=p,v+=p,x+=p);r&&t.includeEdges&&o&&(boe(n,e,"mid-source"),boe(n,e,"mid-target"),boe(n,e,"source"),boe(n,e,"target")),r&&"yes"===e.pstyle("ghost").value&&(s=e.pstyle("ghost-offset-x").pfValue,i=e.pstyle("ghost-offset-y").pfValue,moe(n,n.x1+s,n.y1+i,n.x2+s,n.y2+i)),g=a.bodyBounds=a.bodyBounds||{},oie(g,n),sie(g,c),aie(g,1),r&&(y=n.x1,v=n.x2,b=n.y1,x=n.y2,moe(n,y-u,b-u,v+u,x+u)),d=a.overlayBounds=a.overlayBounds||{},oie(d,n),sie(d,c),aie(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?rie(f.all):f.all=eie(),r&&t.includeLabels&&(t.includeMainLabels&&xoe(n,e,null),o)&&(t.includeSourceLabels&&xoe(n,e,"source"),t.includeTargetLabels)&&xoe(n,e,"target")}return n.x1=foe(n.x1),n.y1=foe(n.y1),n.x2=foe(n.x2),n.y2=foe(n.y2),n.w=foe(n.x2-n.x1),n.h=foe(n.y2-n.y1),0<n.w&&0<n.h&&h&&(sie(n,c),aie(n,1)),n},"boundingBoxImpl"),Soe=mt(function(e){var t=0,r=mt(function(e){return(e?1:0)<<t++},"tf"),i=0;return(i+=r(e.incudeNodes))+r(e.includeEdges)+r(e.includeLabels)+r(e.includeMainLabels)+r(e.includeSourceLabels)+r(e.includeTargetLabels)+r(e.includeOverlays)+r(e.includeOutlines)},"getKey"),Eoe=mt(function(e){var t,r,i=mt(function(e){return Math.round(e)},"r");return e.isEdge()?(r=e.source().position(),t=e.target().position(),Yte([i(r.x),i(r.y),i(t.x),i(t.y)])):(r=e.position(),Yte([i(r.x),i(r.y)]))},"getBoundingBoxPosKey"),_oe=mt(function(e,t){var r,i=e._private,n=e.isEdge(),a=(null==t?Roe:Soe(t))===Roe;return null==i.bbCache?(r=Coe(e,Aoe),i.bbCache=r,i.bbCachePosKey=Eoe(e)):r=i.bbCache,a||(a=e.isNode(),r=eie(),(t.includeNodes&&a||t.includeEdges&&!a)&&(t.includeOverlays?yoe(r,i.overlayBounds):yoe(r,i.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!n||t.includeSourceLabels&&t.includeTargetLabels)?yoe(r,i.labelBounds.all):(t.includeMainLabels&&yoe(r,i.labelBounds.mainRot),t.includeSourceLabels&&yoe(r,i.labelBounds.sourceRot),t.includeTargetLabels&&yoe(r,i.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),Roe=Soe(Aoe={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),Loe=she(Aoe),Pce.boundingBox=function(e){var t=void 0===e||void 0===e.useCache||!0===e.useCache,r=qee(function(e){var t=e._private;return null==t.bbCache||t.styleDirty||t.bbCachePosKey!==Eoe(e)},function(e){return e.id()});if(t&&1===this.length&&!r(this[0]))e=void 0===e?Aoe:Loe(e),i=_oe(this[0],e);else{var i=eie(),n=Loe(e=e||Aoe),e=this.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),e&&this.recalculateRenderedStyle(t),this.updateCompoundBounds(!t);for(var a=0;a<this.length;a++){var s=this[a];r(s)&&s.dirtyBoundingBoxCache(),yoe(i,_oe(s,n))}}return i.x1=foe(i.x1),i.y1=foe(i.y1),i.x2=foe(i.x2),i.y2=foe(i.y2),i.w=foe(i.x2-i.x1),i.h=foe(i.y2-i.y1),i},Pce.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Pce.boundingBoxAt=function(r){var e,t=this.nodes(),i=this.cy(),n=i.hasCompoundNodes(),a=i.collection(),s=(n&&(a=t.filter(function(e){return e.isParent()}),t=t.not(a)),Eee(r)&&(e=r,r=mt(function(){return e},"fn")),mt(function(e,t){return e._private.bbAtOldPos=r(e,t)},"storeOldPos")),o=mt(function(e){return e._private.bbAtOldPos},"getOldPos"),s=(i.startBatch(),t.forEach(s).silentPositions(r),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),tie(this.boundingBox({useCache:!1})));return t.silentPositions(o),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),i.endBatch(),s},Ice.boundingbox=Ice.bb=Ice.boundingBox,Ice.renderedBoundingbox=Ice.renderedBoundingBox,che=Pce,Noe=Mce={},(kce=mt(function(i){i.uppercaseName=Wee(i.name),i.autoName="auto"+i.uppercaseName,i.labelName="label"+i.uppercaseName,i.outerName="outer"+i.uppercaseName,i.uppercaseOuterName=Wee(i.outerName),Noe[i.name]=mt(function(){var e=this[0],t=e._private,r=t.cy._private.styleEnabled;if(e)return r?e.isParent()?(e.updateCompoundBounds(),t[i.autoName]||0):"label"!==(r=e.pstyle(i.name)).strValue?r.pfValue:(e.recalculateRenderedStyle(),t.rstyle[i.labelName]||0):1},"dimImpl"),Noe["outer"+i.uppercaseName]=mt(function(){var e=this[0],t=e._private.cy._private.styleEnabled;if(e)return t?e[i.name]()+("center"===(t=e.pstyle("border-position").value)?e.pstyle("border-width").pfValue:"outside"===t?2*e.pstyle("border-width").pfValue:0)+2*e.padding():1},"outerDimImpl"),Noe["rendered"+i.uppercaseName]=mt(function(){var e=this[0];if(e)return e[i.name]()*this.cy().zoom()},"renderedDimImpl"),Noe["rendered"+i.uppercaseOuterName]=mt(function(){var e=this[0];if(e)return e[i.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),kce({name:"height"}),Mce.padding=function(){var e=this[0],t=e._private;return e.isParent()&&(e.updateCompoundBounds(),void 0!==t.autoPadding)?t.autoPadding:e.pstyle("padding").pfValue},Mce.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},Mce.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()},Oce=Mce,Doe=mt(function(e,t){if(e.isEdge()&&e.takesUpSpace())return t(e)},"ifEdge"),Ioe=mt(function(e,t){var r;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),Pre(t(e),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),Moe=mt(function(e,t){var r,i,n;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),i=r.pan(),n=r.zoom(),t(e).map(function(e){return Pre(e,n,i)})},"ifEdgeRenderedPositions"),Bce=mt(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),Sce=mt(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),J=mt(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),Dce=mt(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),Ice=mt(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),Ooe={controlPoints:{get:Bce,mult:!0},segmentPoints:{get:Sce,mult:!0},sourceEndpoint:{get:J},targetEndpoint:{get:Dce},midpoint:{get:Ice}},Poe=mt(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),Pce=Object.keys(Ooe).reduce(function(e,t){var r=Ooe[t],i=Poe(t);return e[t]=function(){return Doe(this,r.get)},r.mult?e[i]=function(){return Moe(this,r.get)}:e[i]=function(){return Ioe(this,r.get)},e},{}),kce=Kee({},gce,che,Oce,Pce),$oe=mt(function(e,t){this.recycle(e,t)},"Event"),mt(MQ,"returnFalse"),mt(OQ,"returnTrue"),$oe.prototype={instanceString:mt(function(){return"event"},"instanceString"),recycle:mt(function(e,t){var r,i;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=MQ,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?OQ:MQ):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=(null!=t.type?t:this).type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition&&(t=this.position,r=this.cy.zoom(),i=this.cy.pan(),this.renderedPosition={x:t.x*r+i.x,y:t.y*r+i.y}),this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:mt(function(){this.isDefaultPrevented=OQ;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:mt(function(){this.isPropagationStopped=OQ;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:mt(function(){this.isImmediatePropagationStopped=OQ,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:MQ,isPropagationStopped:MQ,isImmediatePropagationStopped:MQ},Boe=/^([^.]+)(\.(?:[^.]+))?$/,Foe={qualifierCompare:mt(function(e,t){return e===t},"qualifierCompare"),eventMatches:mt(function(){return!0},"eventMatches"),addEventFields:mt(function(){},"addEventFields"),callbackContext:mt(function(e){return e},"callbackContext"),beforeEmit:mt(function(){},"beforeEmit"),afterEmit:mt(function(){},"afterEmit"),bubble:mt(function(){return!1},"bubble"),parent:mt(function(){return null},"parent"),context:null},zoe=Object.keys(Foe),qoe={},mt(PQ,"Emitter"),Mce=PQ.prototype,Uoe=mt(function(e,t,r,i,n,a,s){Cee(i)&&(n=i,i=null),s&&(a=null==a?s:Kee({},a,s));for(var o=See(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!Pee(c)){var h=c.match(Boe);if(h&&!1===t(e,c,h[1],h[2]||null,i,n,a))break}}},"forEachEvent"),Goe=mt(function(e,t){return e.addEventFields(e.context,t),new $oe(t.type,t)},"makeEventObj"),joe=mt(function(e,t,r){if(Oee(r))t(e,r);else if(Eee(r))t(e,Goe(e,r));else for(var i=See(r)?r:r.split(/\s+/),n=0;n<i.length;n++){var a,s=i[n];Pee(s)||(s=s.match(Boe))&&(a=s[1],s=s[2]||null,t(e,Goe(e,{type:a,namespace:s,target:e.context})))}},"forEachEventObj"),Mce.on=Mce.addListener=function(e,t,r,i,n){return Uoe(this,function(e,t,r,i,n,a,s){Cee(a)&&e.listeners.push({event:t,callback:a,type:r,namespace:i,qualifier:n,conf:s})},e,t,r,i,n),this},Mce.one=function(e,t,r,i){return this.on(e,t,r,i,{one:!0})},Mce.removeListener=Mce.off=function(l,e,t,r){var i=this;0!==this.emitting&&(this.listeners=hre(this.listeners));for(var c=this.listeners,n=mt(function(s){var o=c[s];Uoe(i,function(e,t,r,i,n,a){if((o.type===r||"*"===l)&&(!i&&".*"!==o.namespace||o.namespace===i)&&(!n||e.qualifierCompare(o.qualifier,n))&&(!a||o.callback===a))return c.splice(s,1),!1},l,e,t,r)},"_loop"),a=c.length-1;0<=a;a--)n(a);return this},Mce.removeAllListeners=function(){return this.removeListener("*")},Mce.emit=Mce.trigger=function(e,s,t){var o=this.listeners,r=o.length;return this.emitting++,See(s)||(s=[s]),joe(this,function(i,n){null!=t&&(o=[{event:n.event,type:n.type,namespace:n.namespace,callback:t}],r=o.length);for(var e=mt(function(){var e,t,r=o[a];r.type!==n.type||r.namespace&&r.namespace!==n.namespace&&".*"!==r.namespace||!i.eventMatches(i.context,r,n)||(e=[n],null!=s&&mre(e,s),i.beforeEmit(i.context,r,n),r.conf&&r.conf.one&&(i.listeners=i.listeners.filter(function(e){return e!==r})),t=i.callbackContext(i.context,r,n),t=r.callback.apply(t,e),i.afterEmit(i.context,r,n),!1===t&&(n.stopPropagation(),n.preventDefault()))},"_loop2"),a=0;a<r;a++)e();i.bubble(i.context)&&!n.isPropagationStopped()&&i.parent(i.context).emit(n,s)},e),this.emitting--,this},Woe={qualifierCompare:mt(function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},"qualifierCompare"),eventMatches:mt(function(e,t,r){return null==(t=t.qualifier)||e!==r.target&&Nee(r.target)&&t.matches(r.target)},"eventMatches"),addEventFields:mt(function(e,t){t.cy=e.cy(),t.target=e},"addEventFields"),callbackContext:mt(function(e,t,r){return null!=t.qualifier?r.target:e},"callbackContext"),beforeEmit:mt(function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},"beforeEmit"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return e.isChild()?e.parent():e.cy()},"parent")},Yoe=mt(function(e){return kee(e)?new doe(e):e},"argSelector"),Bce={createEmitter:mt(function(){for(var e=0;e<this.length;e++){var t=this[e],r=t._private;r.emitter||(r.emitter=new PQ(Woe,t))}return this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){for(var i=Yoe(t),n=0;n<this.length;n++)this[n].emitter().on(e,i,r);return this},"on"),removeListener:mt(function(e,t,r){for(var i=Yoe(t),n=0;n<this.length;n++)this[n].emitter().removeListener(e,i,r);return this},"removeListener"),removeAllListeners:mt(function(){for(var e=0;e<this.length;e++)this[e].emitter().removeAllListeners();return this},"removeAllListeners"),one:mt(function(e,t,r){for(var i=Yoe(t),n=0;n<this.length;n++)this[n].emitter().one(e,i,r);return this},"one"),once:mt(function(e,t,r){for(var i=Yoe(t),n=0;n<this.length;n++)this[n].emitter().on(e,i,r,{once:!0,onceCollection:this})},"once"),emit:mt(function(e,t){for(var r=0;r<this.length;r++)this[r].emitter().emit(e,t);return this},"emit"),emitAndNotify:mt(function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this},"emitAndNotify")},Vse.eventAliasesOn(Bce),Sce={nodes:mt(function(e){return this.filter(function(e){return e.isNode()}).filter(e)},"nodes"),edges:mt(function(e){return this.filter(function(e){return e.isEdge()}).filter(e)},"edges"),byGroup:mt(function(){for(var e=this.spawn(),t=this.spawn(),r=0;r<this.length;r++){var i=this[r];(i.isNode()?e:t).push(i)}return{nodes:e,edges:t}},"byGroup"),filter:mt(function(e,t){if(void 0===e)return this;if(kee(e)||Lee(e))return new doe(e).filter(this);if(Cee(e)){for(var r=this.spawn(),i=0;i<this.length;i++){var n=this[i];(t?e.apply(t,[n,i,this]):e(n,i,this))&&r.push(n)}return r}return this.spawn()},"filter"),not:mt(function(e){if(e){kee(e)&&(e=this.filter(e));for(var t=this.spawn(),r=0;r<this.length;r++){var i=this[r];e.has(i)||t.push(i)}return t}return this},"not"),absoluteComplement:mt(function(){return this.cy().mutableElements().not(this)},"absoluteComplement"),intersect:mt(function(e){if(kee(e))return this.filter(e);for(var t=this.spawn(),r=this.length<e.length,i=r?this:e,n=r?e:this,a=0;a<i.length;a++){var s=i[a];n.has(s)&&t.push(s)}return t},"intersect"),xor:mt(function(e){var t=this._private.cy,a=(kee(e)&&(e=t.$(e)),this.spawn()),t=e;return(e=mt(function(e,t){for(var r=0;r<e.length;r++){var i=e[r],n=i._private.data.id;t.hasElementWithId(n)||a.push(i)}},"add"))(this,t),e(t,this),a},"xor"),diff:mt(function(e){var t=this._private.cy,t=(kee(e)&&(e=t.$(e)),this.spawn()),r=this.spawn(),s=this.spawn(),i=mt(function(e,t,r){for(var i=0;i<e.length;i++){var n=e[i],a=n._private.data.id;t.hasElementWithId(a)?s.merge(n):r.push(n)}},"add");return i(this,e,t),i(e,this,r),{left:t,right:r,both:s}},"diff"),add:mt(function(e){var t,r=this._private.cy;if(!e)return this;kee(e)&&(t=e,e=r.mutableElements().filter(t));for(var i=this.spawnSelf(),n=0;n<e.length;n++){var a=e[n];this.has(a)||i.push(a)}return i},"add"),merge:mt(function(e){var t,r=this._private,i=r.cy;if(e){kee(e)&&(t=e,e=i.mutableElements().filter(t));for(var n=r.map,a=0;a<e.length;a++){var s,o=e[a],l=o._private.data.id;n.has(l)||(s=this.length++,this[s]=o,n.set(l,{ele:o,index:s}))}}return this},"merge"),unmergeAt:mt(function(e){var t,r,i=this[e].id(),n=this._private.map,i=(this[e]=void 0,n.delete(i),e===this.length-1);return 1<this.length&&!i&&(r=(t=this[i=this.length-1])._private.data.id,this[i]=void 0,this[e]=t,n.set(r,{ele:t,index:e})),this.length--,this},"unmergeAt"),unmergeOne:mt(function(e){e=e[0];var t=this._private,e=e._private.data.id;return(t=t.map.get(e))&&(e=t.index,this.unmergeAt(e)),this},"unmergeOne"),unmerge:mt(function(e){var t,r=this._private.cy;if(e){kee(e)&&(t=e,e=r.mutableElements().filter(t));for(var i=0;i<e.length;i++)this.unmergeOne(e[i])}return this},"unmerge"),unmergeBy:mt(function(e){for(var t=this.length-1;0<=t;t--)e(this[t])&&this.unmergeAt(t);return this},"unmergeBy"),map:mt(function(e,t){for(var r=[],i=0;i<this.length;i++){var n=this[i],n=t?e.apply(t,[n,i,this]):e(n,i,this);r.push(n)}return r},"map"),reduce:mt(function(e,t){for(var r=t,i=0;i<this.length;i++)r=e(r,this[i],i,this);return r},"reduce"),max:mt(function(e,t){for(var r,i=-1/0,n=0;n<this.length;n++){var a=this[n],s=t?e.apply(t,[a,n,this]):e(a,n,this);i<s&&(i=s,r=a)}return{value:i,ele:r}},"max"),min:mt(function(e,t){for(var r,i=1/0,n=0;n<this.length;n++){var a=this[n],s=t?e.apply(t,[a,n,this]):e(a,n,this);s<i&&(i=s,r=a)}return{value:i,ele:r}},"min")},(J=Sce).u=J["|"]=J["+"]=J.union=J.or=J.add,J["\\"]=J["!"]=J["-"]=J.difference=J.relativeComplement=J.subtract=J.not,J.n=J["&"]=J["."]=J.and=J.intersection=J.intersect,J["^"]=J["(+)"]=J["(-)"]=J.symmetricDifference=J.symdiff=J.xor,J.fnFilter=J.filterFn=J.stdFilter=J.filter,J.complement=J.abscomp=J.absoluteComplement,Dce={isNode:mt(function(){return"nodes"===this.group()},"isNode"),isEdge:mt(function(){return"edges"===this.group()},"isEdge"),isLoop:mt(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:mt(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:mt(function(){var e=this[0];if(e)return e._private.group},"group")},Voe=mt(function(e,t){var r=e.cy().hasCompoundNodes();function i(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?r?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?ere:0}mt(i,"getDepth");var n=i(e)-i(t);return 0!=n||(mt(a,"getEleDepth"),0!=(n=a(e)-a(t)))||0!=(n=e.pstyle("z-index").value-t.pstyle("z-index").value)?n:e.poolIndex()-t.poolIndex();function a(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}},"zIndexSort"),(Hoe={forEach:mt(function(e,t){if(Cee(e))for(var r=this.length,i=0;i<r;i++){var n=this[i];if(!1===(t?e.apply(t,[n,i,this]):e(n,i,this)))break}return this},"forEach"),toArray:mt(function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},"toArray"),slice:mt(function(e,t){var r=[],i=this.length;(t=null==t?i:t)<0&&(t=i+t);for(var n=e=(e=null==e?0:e)<0?i+e:e;0<=n&&n<t&&n<i;n++)r.push(this[n]);return this.spawn(r)},"slice"),size:mt(function(){return this.length},"size"),eq:mt(function(e){return this[e]||this.spawn()},"eq"),first:mt(function(){return this[0]||this.spawn()},"first"),last:mt(function(){return this[this.length-1]||this.spawn()},"last"),empty:mt(function(){return 0===this.length},"empty"),nonempty:mt(function(){return!this.empty()},"nonempty"),sort:mt(function(e){return Cee(e)?(e=this.toArray().sort(e),this.spawn(e)):this},"sort"),sortByZIndex:mt(function(){return this.sort(Voe)},"sortByZIndex"),zDepth:mt(function(){var e,t,r=this[0];if(r)return"nodes"===(t=r._private).group?(e=t.data.parent?r.parents().size():0,r.isParent()?e:ere-1):(r=t.source,e=t.target,t=r.zDepth(),r=e.zDepth(),Math.max(t,r,0))},"zDepth")}).each=Hoe.forEach,mt(function(){"undefined"!=("u"<typeof Symbol?"undefined":sZ(Symbol))&&"undefined"!=sZ(Symbol.iterator)&&(Hoe[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},r=0,i=this.length;return ZK({next:mt(function(){return r<i?t.value=e[r++]:(t.value=void 0,t.done=!0),t},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),Xoe=she({nodeDimensionsIncludeLabels:!1}),(Ice={layoutDimensions:mt(function(e){return e=Xoe(e),0!==(e=this.takesUpSpace()?e.nodeDimensionsIncludeLabels?{w:(e=this.boundingBox()).w,h:e.h}:{w:this.outerWidth(),h:this.outerHeight()}:{w:0,h:0}).w&&0!==e.h||(e.w=e.h=1),e},"layoutDimensions"),layoutPositions:mt(function(e,i,t){var n=this.nodes().filter(function(e){return!e.isParent()}),r=this.cy(),a=i.eles,s=mt(function(e){return e.id()},"getMemoizeKey"),o=qee(t,s),l=(e.emit({type:"layoutstart",layout:e}),e.animations=[],mt(function(e,t,r){var i=t.x1+t.w/2,t=t.y1+t.h/2;return{x:i+(r.x-i)*e,y:t+(r.y-t)*e}},"calculateSpacing")),c=i.spacingFactor&&1!==i.spacingFactor,h=mt(function(){if(!c)return null;for(var e=eie(),t=0;t<n.length;t++){var r=n[t],r=o(r,t);nie(e,r.x,r.y)}return e},"spacingBb")(),u=qee(function(e,t){var r,t=o(e,t);return c&&(r=Math.abs(i.spacingFactor),t=l(r,h,t)),null!=i.transform?i.transform(e,t):t},s);if(i.animate){for(var d=0;d<n.length;d++){var p,g=n[d],f=u(g,d);null==i.animateFilter||i.animateFilter(g,d)?(p=g.animation({position:f,duration:i.animationDuration,easing:i.animationEasing}),e.animations.push(p)):g.position(f)}i.fit?(t=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:i.padding},duration:i.animationDuration,easing:i.animationEasing}),e.animations.push(t)):void 0!==i.zoom&&void 0!==i.pan&&(s=r.animation({zoom:i.zoom,pan:i.pan,duration:i.animationDuration,easing:i.animationEasing}),e.animations.push(s)),e.animations.forEach(function(e){return e.play()}),e.one("layoutready",i.ready),e.emit({type:"layoutready",layout:e}),Hne.all(e.animations.map(function(e){return e.promise()})).then(function(){e.one("layoutstop",i.stop),e.emit({type:"layoutstop",layout:e})})}else n.positions(u),i.fit&&r.fit(i.eles,i.padding),null!=i.zoom&&r.zoom(i.zoom),i.pan&&r.pan(i.pan),e.one("layoutready",i.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",i.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:mt(function(e){return this.cy().makeLayout(Kee({},e,{eles:this}))},"layout")}).createLayout=Ice.makeLayout=Ice.layout,mt($Q,"styleCache"),mt(BQ,"cacheStyleFunction"),mt(FQ,"cachePrototypeStyleFunction"),gce={recalculateRenderedStyle:mt(function(e){var t=(r=this.cy()).renderer(),r=r.styleEnabled();return t&&r&&t.recalculateRenderedStyle(this,e),this},"recalculateRenderedStyle"),dirtyStyleCache:mt(function(){var e=this.cy(),t=mt(function(e){return e._private.styleCache=null},"dirty");return e.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(t)):this.forEach(function(e){t(e),e.connectedEdges().forEach(t)}),this},"dirtyStyleCache"),updateStyle:mt(function(e){var t,r=this._private.cy;return r.styleEnabled()&&(r.batching()?r._private.batchStyleEles.merge(this):(t=this,e=!(!e&&void 0!==e),r=t=r.hasCompoundNodes()?this.spawnSelf().merge(this.descendants()).merge(this.parents()):t,e?r.emitAndNotify("style"):r.emit("style"),t.forEach(function(e){return e._private.styleDirty=!0}))),this},"updateStyle"),cleanStyle:mt(function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var r=this[t];r._private.styleDirty&&(r._private.styleDirty=!1,e.style().apply(r))}},"cleanStyle"),parsedStyle:mt(function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this[0],i=r.cy();if(i.styleEnabled()&&r)return r._private.styleDirty&&(r._private.styleDirty=!1,i.style().apply(r)),r._private.style[e]??(t?i.style().getDefaultProperty(e):null)},"parsedStyle"),numericStyle:mt(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return void 0!==(t=t.pstyle(e)).pfValue?t.pfValue:t.value},"numericStyle"),numericStyleUnits:mt(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},"numericStyleUnits"),renderedStyle:mt(function(e){var t,r=this.cy();return r.styleEnabled()?(t=this[0])?r.style().getRenderedStyle(t,e):void 0:this},"renderedStyle"),style:mt(function(e,t){if((i=this.cy()).styleEnabled()){var r,i=i.style();if(Eee(e))i.applyBypass(this,e,!1),this.emitAndNotify("style");else if(kee(e)){if(void 0===t)return(r=this[0])?i.getStylePropertyValue(r,e):void 0;i.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e)return(r=this[0])?i.getRawStyle(r):void 0}return this},"style"),removeStyle:mt(function(e){var t=this.cy();if(t.styleEnabled()){var r=t.style();if(void 0===e)for(var i=0;i<this.length;i++){var n=this[i];r.removeAllBypasses(n,!1)}else{e=e.split(/\s+/);for(var a=0;a<this.length;a++){var s=this[a];r.removeBypasses(s,e,!1)}}this.emitAndNotify("style")}return this},"removeStyle"),show:mt(function(){return this.css("display","element"),this},"show"),hide:mt(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:mt(function(){if(!(e=this.cy()).styleEnabled())return 1;var e=e.hasCompoundNodes(),t=this[0];if(t){var r=t._private,i=t.pstyle("opacity").value;if(e){var n=r.data.parent?t.parents():null;if(n)for(var a=0;a<n.length;a++)i*=n[a].pstyle("opacity").value}return i}},"effectiveOpacity"),transparent:mt(function(){var e,t;return!!this.cy().styleEnabled()&&(t=(e=this[0]).cy().hasCompoundNodes(),e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0)},"transparent"),backgrounding:mt(function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding},"backgrounding")},mt(zQ,"checkCompound"),mt(qQ,"defineDerivedStateFunction"),Koe=BQ("eleTakesUpSpace",function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}),gce.takesUpSpace=FQ("takesUpSpace",qQ({ok:Koe})),che=BQ("eleInteractive",function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Koe(e)}),Oce=BQ("parentInteractive",function(e){return"visible"===e.pstyle("visibility").value&&Koe(e)}),gce.interactive=FQ("interactive",qQ({ok:che,parentOk:Oce,edgeOkViaNode:Koe})),gce.noninteractive=function(){var e=this[0];if(e)return!e.interactive()},Pce=BQ("eleVisible",function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Koe(e)}),Mce=Koe,gce.visible=FQ("visible",qQ({ok:Pce,edgeOkViaNode:Mce})),gce.hidden=function(){var e=this[0];if(e)return!e.visible()},gce.isBundledBezier=FQ("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),gce.bypass=gce.css=gce.style,gce.renderedCss=gce.renderedStyle,gce.removeBypass=gce.removeCss=gce.removeStyle,gce.pstyle=gce.parsedStyle,Zoe={},mt(UQ,"defineSwitchFunction"),mt(GQ,"defineSwitchSet"),GQ({field:"locked",overrideField:mt(function(e){return!!e.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),GQ({field:"grabbable",overrideField:mt(function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),GQ({field:"selected",ableField:"selectable",overrideAble:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),GQ({field:"selectable",overrideField:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),Zoe.deselect=Zoe.unselect,Zoe.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},GQ({field:"active",on:"activate",off:"unactivate"}),GQ({field:"pannable",on:"panify",off:"unpanify"}),Zoe.inactive=function(){var e=this[0];if(e)return!e._private.active},J={},che=mt(function(c){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode()){for(var n=!1,a=i.connectedEdges(),s=0;s<a.length;s++){var o=(l=a[s]).source(),l=l.target();if(c.noIncomingEdges&&l===i&&o!==i||c.noOutgoingEdges&&o===i&&l!==i){n=!0;break}}n||t.push(i)}}return this.spawn(t,!0).filter(e)},"dagExtremityImpl")},"defineDagExtremity"),Oce=mt(function(c){return function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var n=i.connectedEdges(),a=0;a<n.length;a++){var s=n[a],o=s.source(),l=s.target();c.outgoing&&o===i?(t.push(s),t.push(l)):c.incoming&&l===i&&(t.push(s),t.push(o))}}return this.spawn(t,!0).filter(e)}},"defineDagOneHop"),Pce=mt(function(c){return function(e){for(var t=this,r=[],i={};;){var n=c.outgoing?t.outgoers():t.incomers();if(0===n.length)break;for(var a=!1,s=0;s<n.length;s++){var o=n[s],l=o.id();i[l]||(i[l]=!0,r.push(o),a=!0)}if(!a)break;t=n}return this.spawn(r,!0).filter(e)}},"defineDagAllHops"),J.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},Kee(J,{roots:che({noIncomingEdges:!0}),leaves:che({noOutgoingEdges:!0}),outgoers:Hce(Oce({outgoing:!0}),"outgoers"),successors:Pce({outgoing:!0}),incomers:Hce(Oce({incoming:!0}),"incomers"),predecessors:Pce({})}),Kee(J,{neighborhood:Hce(function(e){for(var t=[],r=this.nodes(),i=0;i<r.length;i++)for(var n=r[i],a=n.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),c=o.target();0<(c=n===l?c:l).length&&t.push(c[0]),t.push(o[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:mt(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:mt(function(e){return this.neighborhood(e)},"openNeighborhood")}),J.neighbourhood=J.neighborhood,J.closedNeighbourhood=J.closedNeighborhood,J.openNeighbourhood=J.openNeighborhood,Kee(J,{source:Hce(mt(function(e){var t,r=this[0];return(t=r?r._private.source||r.cy().collection():t)&&e?t.filter(e):t},"sourceImpl"),"source"),target:Hce(mt(function(e){var t,r=this[0];return(t=r?r._private.target||r.cy().collection():t)&&e?t.filter(e):t},"targetImpl"),"target"),sources:jQ({attr:"source"}),targets:jQ({attr:"target"})}),mt(jQ,"defineSourceFunction"),Kee(J,{edgesWith:Hce(WQ(),"edgesWith"),edgesTo:Hce(WQ({thisIsSrc:!0}),"edgesTo")}),mt(WQ,"defineEdgesWithFunction"),Kee(J,{connectedEdges:Hce(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var n=i._private.edges,a=0;a<n.length;a++){var s=n[a];t.push(s)}}return this.spawn(t,!0).filter(e)},"connectedEdges"),connectedNodes:Hce(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,!0).filter(e)},"connectedNodes"),parallelEdges:Hce(YQ(),"parallelEdges"),codirectedEdges:Hce(YQ({codirected:!0}),"codirectedEdges")}),mt(YQ,"defineParallelEdgesFunction"),Kee(J,{components:mt(function(e){var r=this,i=r.cy(),n=i.collection(),a=(null==e?r:e).nodes(),s=[],o=(null!=e&&a.empty()&&(a=e.sources()),mt(function(e,t){n.merge(e),a.unmerge(e),t.merge(e)},"visitInComponent"));if(a.empty())return r.spawn();for(var t=mt(function(){var t=i.collection(),e=(s.push(t),a[0]);o(e,t),r.bfs({directed:!1,roots:e,visit:mt(function(e){return o(e,t)},"visit")}),t.forEach(function(e){e.connectedEdges().forEach(function(e){r.has(e)&&t.has(e.source())&&t.has(e.target())&&t.merge(e)})})},"_loop");t(),0<a.length;);return s},"components"),component:mt(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")}),J.componentsOf=J.components,Qoe=mt(function(e,t){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===e)are("A collection must have a reference to the core");else{var n=new bre,a=!1;if(t){if(0<t.length&&Eee(t[0])&&!Nee(t[0])){for(var a=!0,s=[],o=new xre,l=0,c=t.length;l<c;l++){var h=t[l],u=(null==h.data&&(h.data={}),h.data);if(null==u.id)u.id=ure();else if(e.hasElementWithId(u.id)||o.has(u.id))continue;h=new wre(e,h,!1),s.push(h),o.add(u.id)}t=s}}else t=[];for(var d=this.length=0,p=t.length;d<p;d++){var g,f=t[d][0];null!=f&&(g=f._private.data.id,r&&n.has(g)||(r&&n.set(g,{index:this.length,ele:f}),this[this.length]=f,this.length++))}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:mt(function(){for(var e=this.lazyMap=new bre,t=this.eles,r=0;r<t.length;r++){var i=t[r];e.set(i.id(),{index:r,ele:i})}},"rebuildMap")},r&&(this._private.map=n),a&&!i&&this.restore()}},"Collection"),(Joe=wre.prototype=Qoe.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},Joe.spawn=function(e,t){return new Qoe(this.cy(),e,t)},Joe.spawnSelf=function(){return this.spawn(this)},Joe.cy=function(){return this._private.cy},Joe.renderer=function(){return this._private.cy.renderer()},Joe.element=function(){return this[0]},Joe.collection=function(){return Dee(this)?this:new Qoe(this._private.cy,[this])},Joe.unique=function(){return new Qoe(this._private.cy,this,!0)},Joe.hasElementWithId=function(e){return this._private.map.has(e=""+e)},Joe.getElementById=function(e){var t=this._private.cy;return(e=this._private.map.get(e=""+e))?e.ele:new Qoe(t)},Joe.$id=Joe.getElementById,Joe.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},Joe.indexOf=function(e){return e=e[0]._private.data.id,this._private.map.get(e).index},Joe.indexOfId=function(e){return this._private.map.get(e=""+e).index},Joe.json=function(n){var a,e,t,r,i,s,o,l,c=this.element(),h=this.cy();return null==c&&n?this:null!=c?(a=c._private,Eee(n)?(h.startBatch(),n.data&&(c.data(n.data),e=a.data,c.isEdge()?(s=!1,t={},r=n.data.source,i=n.data.target,null!=r&&r!=e.source&&(t.source=""+r,s=!0),null!=i&&i!=e.target&&(t.target=""+i,s=!0),s&&(c=c.move(t))):(r="parent"in n.data,i=n.data.parent,!r||null==i&&null==e.parent||i==e.parent||(c=c.move({parent:i=null!=(i=void 0===i?null:i)?""+i:i})))),n.position&&c.position(n.position),(s=mt(function(e,t,r){var i=n[e];null!=i&&i!==a[e]&&(i?c[t]():c[r]())},"checkSwitch"))("removed","remove","restore"),s("selected","select","unselect"),s("selectable","selectify","unselectify"),s("locked","lock","unlock"),s("grabbable","grabify","ungrabify"),s("pannable","panify","unpanify"),null!=n.classes&&c.classes(n.classes),h.endBatch(),this):void 0===n?((o={data:cre(a.data),position:cre(a.position),group:a.group,removed:a.removed,selected:a.selected,selectable:a.selectable,locked:a.locked,grabbable:a.grabbable,pannable:a.pannable,classes:null}).classes="",l=0,a.classes.forEach(function(e){return o.classes+=0==l++?e:" "+e}),o):void 0):void 0},Joe.jsons=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t].json();e.push(r)}return e},Joe.clone=function(){for(var e=this.cy(),t=[],r=0;r<this.length;r++){var i=this[r].json(),i=new wre(e,i,!1);t.push(i)}return new Qoe(e,t)},Joe.copy=Joe.clone,Joe.restore=function(){for(var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this.cy(),i=r._private,n=[],a=[],s=0,o=this.length;s<o;s++){var l=this[s];t&&!l.removed()||(l.isNode()?n:a).push(l)}for(var c=n.concat(a),h=mt(function(){c.splice(u,1),u--},"removeFromElements"),u=0;u<c.length;u++){var d=c[u],p=d._private,g=p.data;if(d.clearTraversalCache(),t||p.removed)if(void 0===g.id)g.id=ure();else if(he(g.id))g.id=""+g.id;else{if(Pee(g.id)||!kee(g.id)){are("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){are("Can not create second element with ID `"+g.id+"`"),h();continue}}var f=g.id;if(d.isNode()&&(null==(m=p.position).x&&(m.x=0),null==m.y)&&(m.y=0),d.isEdge()){for(var m=d,y=["source","target"],v=y.length,b=!1,x=0;x<v;x++){var w=y[x],T=g[w];null==(T=he(T)?g[w]=""+g[w]:T)||""===T?(are("Can not create edge `"+f+"` with unspecified "+w),b=!0):r.hasElementWithId(T)||(are("Can not create edge `"+f+"` with nonexistant "+w+" `"+T+"`"),b=!0)}if(b){h();continue}var k=r.getElementById(g.source),C=r.getElementById(g.target);(k.same(C)?k:(k._private.edges.push(m),C))._private.edges.push(m),m._private.source=k,m._private.target=C}p.map=new bre,p.map.set(f,{ele:d,index:0}),p.removed=!1,t&&r.addToPool(d)}for(var S=0;S<n.length;S++){var E=n[S],_=E._private.data,A=(he(_.parent)&&(_.parent=""+_.parent),_.parent);if(null!=A||E._private.parent)if((A=E._private.parent?r.collection().merge(E._private.parent):r.getElementById(A)).empty())_.parent=void 0;else if(A[0].removed())ore("Node added with missing parent, reference to parent removed"),_.parent=void 0,E._private.parent=null;else{for(var R=!1,L=A;!L.empty();){if(E.same(L)){R=!0,_.parent=void 0;break}L=L.parent()}R||(A[0]._private.children.push(E),E._private.parent=A[0],i.hasCompoundNodes=!0)}}if(0<c.length){for(var N=c.length===this.length?this:new Qoe(r,c),D=0;D<N.length;D++){var I=N[D];I.isNode()||(I.parallelEdges().clearTraversalCache(),I.source().clearTraversalCache(),I.target().clearTraversalCache())}(i.hasCompoundNodes?r.collection().merge(N).merge(N.connectedNodes()).merge(N.parent()):N).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e),e?N.emitAndNotify("add"):t&&N.emit("add")}return this},Joe.removed=function(){var e=this[0];return e&&e._private.removed},Joe.inside=function(){var e=this[0];return e&&!e._private.removed},Joe.remove=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=[],n={},t=this._private.cy;function a(e){for(var t=e._private.edges,r=0;r<t.length;r++)o(t[r])}function s(e){for(var t=e._private.children,r=0;r<t.length;r++)o(t[r])}function o(e){var t=n[e.id()];r&&e.removed()||t||(n[e.id()]=!0,e.isNode()?(i.push(e),a(e),s(e)):i.unshift(e))}mt(a,"addConnectedEdges"),mt(s,"addChildren"),mt(o,"add");for(var l=0,c=this.length;l<c;l++)o(this[l]);function h(e,t){var r=e._private.edges;gre(r,t),e.clearTraversalCache()}function u(e){e.clearTraversalCache()}mt(h,"removeEdgeRef"),mt(u,"removeParallelRef");var d=[];function p(e,t){t=t[0];var r=(e=e[0])._private.children,i=e.id();gre(r,t),t._private.parent=null,d.ids[i]||(d.ids[i]=!0,d.push(e))}d.ids={},mt(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&t.removeFromPool(i);for(var g=0;g<i.length;g++){var f=i[g];if(f.isEdge()){var m=f.source()[0],y=f.target()[0];h(m,f),h(y,f);for(var v=f.parallelEdges(),b=0;b<v.length;b++){var x=v[b];u(x),x.isBundledBezier()&&x.dirtyBoundingBoxCache()}}else 0!==(m=f.parent()).length&&p(m,f);r&&(f._private.removed=!0)}var w=t._private.elements;t._private.hasCompoundNodes=!1;for(var T=0;T<w.length;T++)if(w[T].isParent()){t._private.hasCompoundNodes=!0;break}var k=new Qoe(this.cy(),i);0<k.size()&&(e?k.emitAndNotify("remove"):r&&k.emit("remove"));for(var C=0;C<d.length;C++){var S=d[C];r&&S.removed()||S.updateStyle()}return k},Joe.move=function(e){var i,n,a,s,o,t=this._private.cy,l=this,r=mt(function(e){return null==e?e:""+e},"toString");return void 0!==e.source||void 0!==e.target?(i=r(e.source),n=r(e.target),a=null!=i&&t.hasElementWithId(i),s=null!=n&&t.hasElementWithId(n),(a||s)&&(t.batch(function(){l.remove(!1,!1),l.emitAndNotify("moveout");for(var e=0;e<l.length;e++){var t=l[e],r=t._private.data;t.isEdge()&&(a&&(r.source=i),s)&&(r.target=n)}l.restore(!1,!1)}),l.emitAndNotify("move"))):void 0===e.parent||null!==(r=r(e.parent))&&!t.hasElementWithId(r)||(o=null===r?void 0:r,t.batch(function(){var e=l.remove(!1,!1);e.emitAndNotify("moveout");for(var t=0;t<l.length;t++){var r=l[t],i=r._private.data;r.isNode()&&(i.parent=o)}e.restore(!1,!1)}),l.emitAndNotify("move")),this},[qne,Zce,nhe,ahe,$ce,qle,ghe,kce,Bce,Sce,Dce,Hoe,Ice,gce,Zoe,J].forEach(function(e){Kee(Joe,e)}),Mce={add:mt(function(e){if(Lee(e)){var t=e;if(t._private.cy===this)a=t.restore();else{for(var r=[],i=0;i<t.length;i++){var n=t[i];r.push(n.json())}a=new Qoe(this,r)}}else if(See(e))var a=new Qoe(this,e);else if(Eee(e)&&(See(e.nodes)||See(e.edges))){for(var s=e,o=[],l=["nodes","edges"],c=0,h=l.length;c<h;c++){var u=l[c],d=s[u];if(See(d))for(var p=0,g=d.length;p<g;p++){var f=Kee({group:u},d[p]);o.push(f)}}a=new Qoe(this,o)}else a=new wre(this,e).collection();return a},"add"),remove:mt(function(e){var t;return Lee(e)||kee(e)&&(t=e,e=this.$(t)),e.remove()},"remove")},mt(VQ,"generateCubicBezier"),mt(o,"springAccelerationForState"),mt(l,"springEvaluateStateWithDerivative"),mt(h,"springIntegrateState"),ele=mt(function e(t,r,i){var n,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,o.tension=t,o.friction=r,a=(n=null!==i)?(c=e(t,r))/i*.016:.016;s=h(s||o,a),l.push(1+s.x),c+=16,1e-4<Math.abs(s.x)&&1e-4<Math.abs(s.v););return n?function(e){return l[e*(l.length-1)|0]}:c},"springRK4Factory"),che=mt(function(e,t,r,i){var n=VQ(e,t,r,i);return function(e,t,r){return e+(t-e)*n(r)}},"cubicBezier"),tle={linear:mt(function(e,t,r){return e+(t-e)*r},"linear"),ease:che(.25,.1,.25,1),"ease-in":che(.42,0,1,1),"ease-out":che(0,0,.58,1),"ease-in-out":che(.42,0,.58,1),"ease-in-sine":che(.47,0,.745,.715),"ease-out-sine":che(.39,.575,.565,1),"ease-in-out-sine":che(.445,.05,.55,.95),"ease-in-quad":che(.55,.085,.68,.53),"ease-out-quad":che(.25,.46,.45,.94),"ease-in-out-quad":che(.455,.03,.515,.955),"ease-in-cubic":che(.55,.055,.675,.19),"ease-out-cubic":che(.215,.61,.355,1),"ease-in-out-cubic":che(.645,.045,.355,1),"ease-in-quart":che(.895,.03,.685,.22),"ease-out-quart":che(.165,.84,.44,1),"ease-in-out-quart":che(.77,0,.175,1),"ease-in-quint":che(.755,.05,.855,.06),"ease-out-quint":che(.23,1,.32,1),"ease-in-out-quint":che(.86,0,.07,1),"ease-in-expo":che(.95,.05,.795,.035),"ease-out-expo":che(.19,1,.22,1),"ease-in-out-expo":che(1,0,0,1),"ease-in-circ":che(.6,.04,.98,.335),"ease-out-circ":che(.075,.82,.165,1),"ease-in-out-circ":che(.785,.135,.15,.86),spring:mt(function(e,t,r){var i;return 0===r?tle.linear:(i=ele(e,t,r),function(e,t,r){return e+(t-e)*i(r)})},"spring"),"cubic-bezier":che},mt(HQ,"getEasedValue"),mt(XQ,"getValue"),mt(KQ,"ease"),mt(ZQ,"step$1"),mt(QQ,"valid"),mt(JQ,"startAnimation"),mt(eJ,"stepAll"),Oce={animate:Vse.animate(),animation:Vse.animation(),animated:Vse.animated(),clearQueue:Vse.clearQueue(),delay:Vse.delay(),delayAnimation:Vse.delayAnimation(),stop:Vse.stop(),addToAnimationPool:mt(function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:mt(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:mt(function(){var e,r=this;function t(){r._private.animationsRunning&&Bte(mt(function(e){eJ(e,r),t()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(mt(t,"headlessStep"),(e=r.renderer())&&e.beforeRender?e.beforeRender(mt(function(e,t){eJ(t,r)},"rendererAnimationStep"),e.beforeRenderPriorities.animations):t())},"startAnimationLoop")},rle={qualifierCompare:mt(function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},"qualifierCompare"),eventMatches:mt(function(e,t,r){return null==(t=t.qualifier)||e!==r.target&&Nee(r.target)&&t.matches(r.target)},"eventMatches"),addEventFields:mt(function(e,t){t.cy=e,t.target=e},"addEventFields"),callbackContext:mt(function(e,t,r){return null!=t.qualifier?r.target:e},"callbackContext")},ile=mt(function(e){return kee(e)?new doe(e):e},"argSelector"),Pce={createEmitter:mt(function(){var e=this._private;return e.emitter||(e.emitter=new PQ(rle,this)),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){return this.emitter().on(e,ile(t),r),this},"on"),removeListener:mt(function(e,t,r){return this.emitter().removeListener(e,ile(t),r),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:mt(function(e,t,r){return this.emitter().one(e,ile(t),r),this},"one"),once:mt(function(e,t,r){return this.emitter().one(e,ile(t),r),this},"once"),emit:mt(function(e,t){return this.emitter().emit(e,t),this},"emit"),emitAndNotify:mt(function(e,t){return this.emit(e),this.notify(e,t),this},"emitAndNotify")},Vse.eventAliasesOn(Pce),(Hce={png:mt(function(e){return this._private.renderer.png(e=e||{})},"png"),jpg:mt(function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)},"jpg")}).jpeg=Hce.jpg,(Zce={layout:mt(function(e){if(null==e)are("Layout options must be specified to make a layout");else if(null==e.name)are("A `name` must be specified to make a layout");else{var t,r=e.name,i=this.extension("layout",r);if(null!=i)return t=kee(e.eles)?this.$(e.eles):null!=e.eles?e.eles:this.$(),new i(Kee({},e,{cy:this,eles:t}));are("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=Zce.makeLayout=Zce.layout,nhe={notify:mt(function(e,t){var r,i=this._private;this.batching()?(i.batchNotifications=i.batchNotifications||{},r=i.batchNotifications[e]=i.batchNotifications[e]||this.collection(),null!=t&&r.merge(t)):i.notificationsEnabled&&(r=this.renderer(),!this.destroyed())&&r&&r.notify(e,t)},"notify"),notifications:mt(function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},"notifications"),noNotifications:mt(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:mt(function(){return 0<this._private.batchCount},"batching"),startBatch:mt(function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:mt(function(){var r,i=this._private;return 0!==i.batchCount&&(i.batchCount--,0===i.batchCount)&&(i.batchStyleEles.updateStyle(),r=this.renderer(),Object.keys(i.batchNotifications).forEach(function(e){var t=i.batchNotifications[e];t.empty()?r.notify(e):r.notify(e,t)})),this},"endBatch"),batch:mt(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:mt(function(n){var a=this;return this.batch(function(){for(var e=Object.keys(n),t=0;t<e.length;t++){var r=e[t],i=n[r];a.getElementById(r).data(i)}})},"batchData")},nle=she({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),(ahe={renderTo:mt(function(e,t,r,i){return this._private.renderer.renderTo(e,t,r,i),this},"renderTo"),renderer:mt(function(){return this._private.renderer},"renderer"),forceRender:mt(function(){return this.notify("draw"),this},"forceRender"),resize:mt(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:mt(function(e){var t=this.extension("renderer",e.name);null==t?are("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==e.wheelSensitivity&&ore("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."),((e=nle(e)).cy=this)._private.renderer=new t(e),this.notify("init"))},"initRenderer"),destroyRenderer:mt(function(){this.notify("destroy");var e=this.container();if(e)for(e._cyreg=null;0<e.childNodes.length;)e.removeChild(e.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach(function(e){(e=e._private).rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},"destroyRenderer"),onRender:mt(function(e){return this.on("render",e)},"onRender"),offRender:mt(function(e){return this.off("render",e)},"offRender")}).invalidateDimensions=ahe.resize,($ce={collection:mt(function(e,t){return kee(e)?this.$(e):Lee(e)?e.collection():See(e)?new Qoe(this,e,(t=t||{}).unique,t.removed):new Qoe(this)},"collection"),nodes:mt(function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},"nodes"),edges:mt(function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},"edges"),$:mt(function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},"$"),mutableElements:mt(function(){return this._private.elements},"mutableElements")}).elements=$ce.filter=$ce.$,qle={apply:function(e){for(var t=this._private.cy.collection(),r=0;r<e.length;r++){var i,n=e[r],a=this.getContextMeta(n);a.empty||(i=this.getContextStyle(a),a=this.applyContextStyle(a,i,n),n._private.appliedInitStyle?this.updateTransitions(n,a.diffProps):n._private.appliedInitStyle=!0,this.updateStyleHints(n)&&t.push(n))}return t},getPropertiesDiff:function(e,t){var r=this._private.propDiffs=this._private.propDiffs||{},i=e+"-"+t,n=r[i];if(n)return n;for(var a=[],s={},o=0;o<this.length;o++){var l=this[o],c="t"===e[o],h="t"===t[o],u=0<l.mappedProperties.length;if((c=c!=h)||h&&u){var d=void 0;c&&u||c?d=l.properties:u&&(d=l.mappedProperties);for(var p=0;p<d.length;p++){for(var g=d[p],f=g.name,m=!1,y=o+1;y<this.length;y++){var v=this[y];if("t"===t[y]&&(m=null!=v.properties[g.name]))break}s[f]||m||(s[f]=!0,a.push(f))}}}return r[i]=a},getContextMeta:function(e){for(var t="",r=e._private.styleCxtKey||"",i=0;i<this.length;i++){var n=this[i];t+=n.selector&&n.selector.matches(e)?"t":"f"}return r=this.getPropertiesDiff(r,t),{key:e._private.styleCxtKey=t,diffPropNames:r,empty:0===r.length}},getContextStyle:function(e){var t=e.key;if((e=this._private.contextStyles=this._private.contextStyles||{})[t])return e[t];for(var r={_private:{key:t}},i=0;i<this.length;i++){var n=this[i];if("t"===t[i])for(var a=0;a<n.properties.length;a++){var s=n.properties[a];r[s.name]=s}}return e[t]=r},applyContextStyle:function(e,t,r){for(var i=e.diffPropNames,n={},a=this.types,s=0;s<i.length;s++){var o=i[s],l=t[o],c=r.pstyle(o);if(!l){if(!c)continue;l=c.bypass?{name:o,deleteBypassed:!0}:{name:o,delete:!0}}if(c!==l){if(l.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===l.value){var h=c.mapping;if((h.fnValue=l.value(r))===h.prevFnValue)continue}h=n[o]={prev:c},this.applyParsedProperty(r,l),h.next=r.pstyle(o),h.next&&h.next.bypass&&(h.next=h.next.bypassed)}}return{diffProps:n}},updateStyleHints:function(e){var r=e._private,i=this,t=(i.propertyGroupNames,i.propertyGroupKeys),n=mt(function(e,t,r){return i.getPropertiesHash(e,t,r)},"propHash"),a=r.styleKey;if(e.removed())return!1;for(var s="nodes"===r.group,o=e._private.style,l=Object.keys(o),c=0;c<t.length;c++){var h=t[c];r.styleKeys[h]=[9261,5381]}for(var u=mt(function(e,t){return r.styleKeys[t][0]=qte(e,r.styleKeys[t][0])},"updateGrKey1"),d=mt(function(e,t){return r.styleKeys[t][1]=Ute(e,r.styleKeys[t][1])},"updateGrKey2"),p=mt(function(e,t){u(e,t),d(e,t)},"updateGrKey"),g=mt(function(e,t){for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);u(i,t),d(i,t)}},"updateGrKeyWStr"),f=mt(function(e){return-128<e&&e<128&&Math.floor(e)!==e?2e9-(1024*e|0):e},"cleanNum"),m=0;m<l.length;m++){var y,v,b,x,w,T=l[m],k=o[T];null!=k&&(y=(T=this.properties[T]).type,v=T.groupKey,b=void 0,null!=T.hashOverride?b=T.hashOverride(e,k):null!=k.pfValue&&(b=k.pfValue),T=null==T.enums?k.value:null,x=null!=b,w=k.units,!y.number||!x&&null==T||y.multiple?g(k.strValue,v):(p(f(x?b:T),v),x||null==w||g(w,v)))}for(var C=[9261,5381],S=0;S<t.length;S++){var E=t[S],E=r.styleKeys[E];C[0]=qte(E[0],C[0]),C[1]=Ute(E[1],C[1])}r.styleKey=Gte(C[0],C[1]);var _=r.styleKeys,A=(r.labelDimsKey=jte(_.labelDimensions),n(e,["label"],_.labelDimensions));return r.labelKey=jte(A),r.labelStyleKey=jte(Wte(_.commonLabel,A)),s||(A=n(e,["source-label"],_.labelDimensions),r.sourceLabelKey=jte(A),r.sourceLabelStyleKey=jte(Wte(_.commonLabel,A)),A=n(e,["target-label"],_.labelDimensions),r.targetLabelKey=jte(A),r.targetLabelStyleKey=jte(Wte(_.commonLabel,A))),s&&(s=[(n=r.styleKeys).nodeBody,n.nodeBorder,n.nodeOutline,n.backgroundImage,n.compound,_=n.pie,A=n.stripe].filter(function(e){return null!=e}).reduce(Wte,[9261,5381]),r.nodeKey=jte(s),r.hasPie=null!=_&&9261!==_[0]&&5381!==_[1],r.hasStripe=null!=A&&9261!==A[0]&&5381!==A[1]),a!==r.styleKey},clearStyleHints:function(e){(e=e._private).styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},applyParsedProperty:function(r,e){var i=this,n=e,t=r._private.style,a=i.types,s=i.properties[n.name].type,o=n.bypass,l=t[n.name],c=l&&l.bypass,h=r._private,u="mapping",d=mt(function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},"getVal"),p=mt(function(){var e=d(l),t=d(n);i.checkTriggers(r,n.name,e,t)},"checkTriggers");if((n="curve-style"===e.name&&r.isEdge()&&("bezier"!==e.value&&r.isLoop()||"haystack"===e.value&&(r.source().isParent()||r.target().isParent()))?e=this.parse(e.name,"bezier",o):n).delete)t[n.name]=void 0;else{if(n.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,p(),!0):(p(),!0);if(n.deleteBypass)return l?!!l.bypass&&(t[n.name]=l.bypassed,p(),!0):(p(),!0);var g=mt(function(){ore("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")},"printMappingErr");switch(n.mapped){case a.mapData:for(var f=n.field.split("."),m=h.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!he(m))return ore("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var v=n.fieldMax-n.fieldMin;if((v=0==v?0:(m-n.fieldMin)/v)<0?v=0:1<v&&(v=1),s.color)var b=n.valueMin[0],x=n.valueMax[0],w=n.valueMin[1],T=n.valueMax[1],k=n.valueMin[2],C=n.valueMax[2],S=null==n.valueMin[3]?1:n.valueMin[3],E=null==n.valueMax[3]?1:n.valueMax[3],x=[Math.round(b+(x-b)*v),Math.round(w+(T-w)*v),Math.round(k+(C-k)*v),Math.round(S+(E-S)*v)],b={bypass:n.bypass,name:n.name,value:x,strValue:"rgb("+x[0]+", "+x[1]+", "+x[2]+")"};else{if(!s.number)return!1;T=n.valueMin+(n.valueMax-n.valueMin)*v,b=this.parse(n.name,T,n.bypass,u)}if(!b)return g(),!1;b.mapping=n,n=b;break;case a.data:for(var _=n.field.split("."),A=h.data,R=0;R<_.length&&A;R++)A=A[_[R]];if(!(b=null!=A?this.parse(n.name,A,n.bypass,u):b))return g(),!1;b.mapping=n,n=b;break;case a.fn:if(w=n.value,C=null!=n.fnValue?n.fnValue:w(r),null==(n.prevFnValue=C))return ore("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(b=this.parse(n.name,C,n.bypass,u)))return ore("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+r.id()+"` is invalid)"),!1;b.mapping=cre(n),n=b;break;case void 0:break;default:return!1}o?(n.bypassed=c?l.bypassed:l,t[n.name]=n):c?l.bypassed=n:t[n.name]=n}return p(),!0},cleanElements:function(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(this.clearStyleHints(i),i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),t)for(var n=i._private.style,a=Object.keys(n),s=0;s<a.length;s++){var o=a[s],l=n[o];null!=l&&(l.bypass?l.bypassed=null:n[o]=null)}else i._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(t,e){var r=this,i=t._private,n=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(0<n.length&&0<a){for(var o={},l=!1,c=0;c<n.length;c++){var h,u,d=n[c],p=t.pstyle(d),g=e[d];g&&(h=g.prev,g=null!=g.next?g.next:p,p=!1,u=void 0,h)&&(he(h.pfValue)&&he(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):he(h.value)&&he(g.value)?(p=g.value-h.value,u=h.value+1e-6*p):See(h.value)&&See(g.value)&&(p=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],u=h.strValue),p)&&(o[d]=g.strValue,this.applyBypass(t,d,u),l=!0)}l&&(i.transitioning=!0,new Hne(function(e){0<s?t.delayAnimation(s).play().promise().then(e):e()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),i.transitioning=!1}))}else i.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),i.transitioning=!1)},checkTrigger:function(e,t,r,i,n,a){n=n(t=this.properties[t]),e.removed()||null!=n&&n(r,i,e)&&a(t)},checkZOrderTrigger:function(e,t,r,i){var n=this;this.checkTrigger(e,t,r,i,function(e){return e.triggersZOrder},function(){n._private.cy.notify("zorder",e)})},checkBoundsTrigger:function(t,e,r,i){this.checkTrigger(t,e,r,i,function(e){return e.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},checkConnectedEdgesBoundsTrigger:function(t,e,r,i){this.checkTrigger(t,e,r,i,function(e){return e.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},checkParallelEdgesBoundsTrigger:function(t,e,r,i){this.checkTrigger(t,e,r,i,function(e){return e.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},checkTriggers:function(e,t,r,i){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,i),this.checkBoundsTrigger(e,t,r,i),this.checkConnectedEdgesBoundsTrigger(e,t,r,i),this.checkParallelEdgesBoundsTrigger(e,t,r,i)}},ghe={applyBypass:function(e,t,r,i){var n=[];if("*"===t||"**"===t){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var s=this.properties[a].name;(s=this.parse(s,r,!0))&&n.push(s)}}else if(kee(t)){var o=this.parse(t,r,!0);o&&n.push(o)}else{if(!Eee(t))return!1;var l=t;i=r;for(var c=Object.keys(l),h=0;h<c.length;h++){var u=c[h],d=l[u];void 0!==(d=void 0===d?l[Gee(u)]:d)&&(u=this.parse(u,d,!0))&&n.push(u)}}if(0===n.length)return!1;for(var p=!1,g=0;g<e.length;g++){for(var f=e[g],m={},y=void 0,v=0;v<n.length;v++){var b,x=n[v];i&&(b=f.pstyle(x.name),y=m[x.name]={prev:b}),p=this.applyParsedProperty(f,cre(x))||p,i&&(y.next=f.pstyle(x.name))}p&&this.updateStyleHints(f),i&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(e,t,r){t=Uee(t);for(var i=0;i<e.length;i++){var n=e[i],a=n._private.style[t],s=(o=this.properties[t].type).color,o=o.mutiple,l=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=r,null!=a.pfValue&&(a.pfValue=r),a.strValue=s?"rgb("+r.join(",")+")":o?r.join(" "):""+r,this.updateStyleHints(n)):this.applyBypass(n,t,r),this.checkTriggers(n,t,l,r)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,r){for(var i=0;i<e.length;i++){for(var n=e[i],a={},s=0;s<t.length;s++){var o=t[s],l=this.properties[o],c=n.pstyle(l.name);c&&c.bypass&&(o=this.parse(o,"",!0),c=a[l.name]={prev:c},this.applyParsedProperty(n,o),c.next=n.pstyle(l.name))}this.updateStyleHints(n),r&&this.updateTransitions(n,a,!0)}}},kce={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy,r=t.container();if((t=t.window())&&r&&t.getComputedStyle)return t.getComputedStyle(r).getPropertyValue(e)}},(Bce={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){if(e=e[0]){for(var r={},i=0;i<this.properties.length;i++){var n=this.properties[i],a=this.getStylePropertyValue(e,n.name,t);null!=a&&(r[n.name]=a,r[Gee(n.name)]=a)}return r}},getIndexedStyle:function(e,t,r,i){return e.pstyle(t)[r][i]??e.cy().style().getDefaultProperty(t)[r][0]},getStylePropertyValue:function(e,t,r){if(e=e[0]){var i=(t=(t=this.properties[t]).alias?t.pointsTo:t).type;if(t=e.pstyle(t.name)){var n,a,s,o=t.value,l=t.units,t=t.strValue;if(r&&i.number&&null!=o&&he(o))return n=e.cy().zoom(),a=mt(function(e){return e*n},"getRenderedValue"),s=mt(function(e,t){return a(e)+t},"getValueStringWithUnits"),((r=See(o))?l.every(function(e){return null!=e}):null!=l)?r?o.map(function(e,t){return s(e,l[t])}).join(" "):s(o,l):r?o.map(function(e){return kee(e)?e:""+a(e)}).join(" "):""+a(o);if(null!=t)return t}return null}},getAnimationStartStyle:function(e,t){for(var r={},i=0;i<t.length;i++){var n=t[i].name,a=e.pstyle(n);(a=void 0!==a?Eee(a)?this.parse(n,a.strValue):this.parse(n,a):a)&&(r[n]=a)}return r},getPropsList:function(e){var t=[],r=e,i=this.properties;if(r)for(var n=Object.keys(r),a=0;a<n.length;a++){var s=r[o=n[a]],o=i[o]||i[Uee(o)];(o=this.parse(o.name,s))&&t.push(o)}return t},getNonDefaultPropertiesHash:function(e,t,r){for(var i,n,a,s,o=r.slice(),l=0;l<t.length;l++)if(null!=(i=e.pstyle(t[l],!1)))if(null!=i.pfValue)o[0]=qte(a,o[0]),o[1]=Ute(a,o[1]);else for(n=i.strValue,s=0;s<n.length;s++)a=n.charCodeAt(s),o[0]=qte(a,o[0]),o[1]=Ute(a,o[1]);return o}}).getPropertiesHash=Bce.getNonDefaultPropertiesHash,Sce={appendFromJson:function(e){for(var t=0;t<e.length;t++){var r=e[t],i=r.selector,n=r.style||r.css,a=Object.keys(n);this.selector(i);for(var s=0;s<a.length;s++){var o=a[s],l=n[o];this.css(o,l)}}return this},fromJson:function(e){return this.resetToDefault(),this.appendFromJson(e),this},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var r=this[t],i=r.selector,n=r.properties,a={},s=0;s<n.length;s++){var o=n[s];a[o.name]=o.strValue}e.push({selector:i?i.toString():"core",style:a})}return e}},Dce={appendFromString:function(e){var t=""+e;function r(){t=t.length>a.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){ore("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 doe(s).invalid)ore("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*$)/))){ore("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}):ore("Skipping property: Invalid property definition in: "+u):ore("Skipping property: Invalid property name in: "+u),i()}if(l){r();break}this.selector(s);for(var g=0;g<h.length;g++){var f=h[g];this.css(f.name,f.val)}}r()}return this},fromString:function(e){return this.resetToDefault(),this.appendFromString(e),this}},ale={};var a=Vee,s=mt(function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),c=mt(function(e){var t=a+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+e+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+a+")\\s*\\,\\s*("+a+")\\s*,\\s*("+t+")\\s*\\,\\s*("+t+")\\)$"},"mapData"),u=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"],s=(ale.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:s("data")},layoutData:{mapping:!0,regex:s("layoutData")},scratch:{mapping:!0,regex:s("scratch")},mapData:{mapping:!0,regex:c("mapData")},mapLayoutData:{mapping:!0,regex:c("mapLayoutData")},mapScratch:{mapping:!0,regex:c("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:u,singleRegexMatchValue:!0},urls:{regexes:u,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:mt(function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return kee(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:mt(function(e){return 1===(e=e.length)||2===e||4===e},"validate")}},{zeroNonZero:mt(function(e,t){return(null==e||null==t)&&e!==t||0==e&&0!=t||0!=e&&0==t},"zeroNonZero"),any:mt(function(e,t){return e!=t},"any"),emptyNonEmpty:mt(function(e,t){return e=Pee(e),t=Pee(t),e&&!t||!e&&t},"emptyNonEmpty")}),d=ale.types,c=[{name:"label",type:d.text,triggersBounds:s.any,triggersZOrder:s.emptyNonEmpty},{name:"text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any}],u=[{name:"source-label",type:d.text,triggersBounds:s.any},{name:"source-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"source-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-offset",type:d.size,triggersBounds:s.any}],p=[{name:"target-label",type:d.text,triggersBounds:s.any},{name:"target-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"target-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-offset",type:d.size,triggersBounds:s.any}],g=[{name:"font-family",type:d.fontFamily,triggersBounds:s.any},{name:"font-style",type:d.fontStyle,triggersBounds:s.any},{name:"font-weight",type:d.fontWeight,triggersBounds:s.any},{name:"font-size",type:d.size,triggersBounds:s.any},{name:"text-transform",type:d.textTransform,triggersBounds:s.any},{name:"text-wrap",type:d.textWrap,triggersBounds:s.any},{name:"text-overflow-wrap",type:d.textOverflowWrap,triggersBounds:s.any},{name:"text-max-width",type:d.size,triggersBounds:s.any},{name:"text-outline-width",type:d.size,triggersBounds:s.any},{name:"line-height",type:d.positiveNumber,triggersBounds:s.any}],f=[{name:"text-valign",type:d.valign,triggersBounds:s.any},{name:"text-halign",type:d.halign,triggersBounds:s.any},{name:"color",type:d.color},{name:"text-outline-color",type:d.color},{name:"text-outline-opacity",type:d.zeroOneNumber},{name:"text-background-color",type:d.color},{name:"text-background-opacity",type:d.zeroOneNumber},{name:"text-background-padding",type:d.size,triggersBounds:s.any},{name:"text-border-opacity",type:d.zeroOneNumber},{name:"text-border-color",type:d.color},{name:"text-border-width",type:d.size,triggersBounds:s.any},{name:"text-border-style",type:d.borderStyle,triggersBounds:s.any},{name:"text-background-shape",type:d.textBackgroundShape,triggersBounds:s.any},{name:"text-justification",type:d.justification},{name:"box-select-labels",type:d.bool,triggersBounds:s.any}],m=[{name:"events",type:d.bool,triggersZOrder:s.any},{name:"text-events",type:d.bool,triggersZOrder:s.any},{name:"box-selection",type:d.boxSelection,triggersZOrder:s.any}],y=[{name:"display",type:d.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:s.any,triggersBoundsOfParallelEdges:mt(function(e,t,r){return e!==t&&"bezier"===r.pstyle("curve-style").value},"triggersBoundsOfParallelEdges")},{name:"visibility",type:d.visibility,triggersZOrder:s.any},{name:"opacity",type:d.zeroOneNumber,triggersZOrder:s.zeroNonZero},{name:"text-opacity",type:d.zeroOneNumber},{name:"min-zoomed-font-size",type:d.size},{name:"z-compound-depth",type:d.zCompoundDepth,triggersZOrder:s.any},{name:"z-index-compare",type:d.zIndexCompare,triggersZOrder:s.any},{name:"z-index",type:d.number,triggersZOrder:s.any}],P=[{name:"overlay-padding",type:d.size,triggersBounds:s.any},{name:"overlay-color",type:d.color},{name:"overlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"overlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"overlay-corner-radius",type:d.cornerRadius}],$=[{name:"underlay-padding",type:d.size,triggersBounds:s.any},{name:"underlay-color",type:d.color},{name:"underlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"underlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"underlay-corner-radius",type:d.cornerRadius}],B=[{name:"transition-property",type:d.propList},{name:"transition-duration",type:d.time},{name:"transition-delay",type:d.time},{name:"transition-timing-function",type:d.easing}],v=mt(function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},"nodeSizeHashOverride"),v=[{name:"height",type:d.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"width",type:d.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"shape",type:d.nodeShape,triggersBounds:s.any},{name:"shape-polygon-points",type:d.polygonPointList,triggersBounds:s.any},{name:"corner-radius",type:d.cornerRadius},{name:"background-color",type:d.color},{name:"background-fill",type:d.fill},{name:"background-opacity",type:d.zeroOneNumber},{name:"background-blacken",type:d.nOneOneNumber},{name:"background-gradient-stop-colors",type:d.colors},{name:"background-gradient-stop-positions",type:d.percentages},{name:"background-gradient-direction",type:d.gradientDirection},{name:"padding",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"padding-relative-to",type:d.paddingRelativeTo,triggersBounds:s.any},{name:"bounds-expansion",type:d.boundsExpansion,triggersBounds:s.any}],F=[{name:"border-color",type:d.color},{name:"border-opacity",type:d.zeroOneNumber},{name:"border-width",type:d.size,triggersBounds:s.any},{name:"border-style",type:d.borderStyle},{name:"border-cap",type:d.lineCap},{name:"border-join",type:d.lineJoin},{name:"border-dash-pattern",type:d.numbers},{name:"border-dash-offset",type:d.number},{name:"border-position",type:d.linePosition}],z=[{name:"outline-color",type:d.color},{name:"outline-opacity",type:d.zeroOneNumber},{name:"outline-width",type:d.size,triggersBounds:s.any},{name:"outline-style",type:d.borderStyle},{name:"outline-offset",type:d.size,triggersBounds:s.any}],q=[{name:"background-image",type:d.urls},{name:"background-image-crossorigin",type:d.bgCrossOrigin},{name:"background-image-opacity",type:d.zeroOneNumbers},{name:"background-image-containment",type:d.bgContainment},{name:"background-image-smoothing",type:d.bools},{name:"background-position-x",type:d.bgPos},{name:"background-position-y",type:d.bgPos},{name:"background-width-relative-to",type:d.bgRelativeTo},{name:"background-height-relative-to",type:d.bgRelativeTo},{name:"background-repeat",type:d.bgRepeat},{name:"background-fit",type:d.bgFit},{name:"background-clip",type:d.bgClip},{name:"background-width",type:d.bgWH},{name:"background-height",type:d.bgWH},{name:"background-offset-x",type:d.bgPos},{name:"background-offset-y",type:d.bgPos}],U=[{name:"position",type:d.position,triggersBounds:s.any},{name:"compound-sizing-wrt-labels",type:d.compoundIncludeLabels,triggersBounds:s.any},{name:"min-width",type:d.size,triggersBounds:s.any},{name:"min-width-bias-left",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-width-bias-right",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height",type:d.size,triggersBounds:s.any},{name:"min-height-bias-top",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height-bias-bottom",type:d.sizeMaybePercent,triggersBounds:s.any}],G=[{name:"line-style",type:d.lineStyle},{name:"line-color",type:d.color},{name:"line-fill",type:d.fill},{name:"line-cap",type:d.lineCap},{name:"line-opacity",type:d.zeroOneNumber},{name:"line-dash-pattern",type:d.numbers},{name:"line-dash-offset",type:d.number},{name:"line-outline-width",type:d.size},{name:"line-outline-color",type:d.color},{name:"line-gradient-stop-colors",type:d.colors},{name:"line-gradient-stop-positions",type:d.percentages},{name:"curve-style",type:d.curveStyle,triggersBounds:s.any,triggersBoundsOfParallelEdges:mt(function(e,t){return e!==t&&("bezier"===e||"bezier"===t)},"triggersBoundsOfParallelEdges")},{name:"haystack-radius",type:d.zeroOneNumber,triggersBounds:s.any},{name:"source-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"target-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"control-point-step-size",type:d.size,triggersBounds:s.any},{name:"control-point-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"control-point-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"segment-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-radii",type:d.numbers,triggersBounds:s.any},{name:"radius-type",type:d.radiusType,triggersBounds:s.any},{name:"taxi-turn",type:d.bidirectionalSizeMaybePercent,triggersBounds:s.any},{name:"taxi-turn-min-distance",type:d.size,triggersBounds:s.any},{name:"taxi-direction",type:d.axisDirection,triggersBounds:s.any},{name:"taxi-radius",type:d.number,triggersBounds:s.any},{name:"edge-distances",type:d.edgeDistances,triggersBounds:s.any},{name:"arrow-scale",type:d.positiveNumber,triggersBounds:s.any},{name:"loop-direction",type:d.angle,triggersBounds:s.any},{name:"loop-sweep",type:d.angle,triggersBounds:s.any},{name:"source-distance-from-node",type:d.size,triggersBounds:s.any},{name:"target-distance-from-node",type:d.size,triggersBounds:s.any}],j=[{name:"ghost",type:d.bool,triggersBounds:s.any},{name:"ghost-offset-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-offset-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-opacity",type:d.zeroOneNumber}],W=[{name:"selection-box-color",type:d.color},{name:"selection-box-opacity",type:d.zeroOneNumber},{name:"selection-box-border-color",type:d.color},{name:"selection-box-border-width",type:d.size},{name:"active-bg-color",type:d.color},{name:"active-bg-opacity",type:d.zeroOneNumber},{name:"active-bg-size",type:d.size},{name:"outside-texture-bg-color",type:d.color},{name:"outside-texture-bg-opacity",type:d.zeroOneNumber}],b=[];ale.pieBackgroundN=16,b.push({name:"pie-size",type:d.sizeMaybePercent}),b.push({name:"pie-hole",type:d.sizeMaybePercent}),b.push({name:"pie-start-angle",type:d.angle});for(var x=1;x<=ale.pieBackgroundN;x++)b.push({name:"pie-"+x+"-background-color",type:d.color}),b.push({name:"pie-"+x+"-background-size",type:d.percent}),b.push({name:"pie-"+x+"-background-opacity",type:d.zeroOneNumber});var w=[];ale.stripeBackgroundN=16,w.push({name:"stripe-size",type:d.sizeMaybePercent}),w.push({name:"stripe-direction",type:d.axisDirectionPrimary});for(var T=1;T<=ale.stripeBackgroundN;T++)w.push({name:"stripe-"+T+"-background-color",type:d.color}),w.push({name:"stripe-"+T+"-background-size",type:d.percent}),w.push({name:"stripe-"+T+"-background-opacity",type:d.zeroOneNumber});var k=[],Y=ale.arrowPrefixes=["source","mid-source","target","mid-target"],C=([{name:"arrow-shape",type:d.arrowShape,triggersBounds:s.any},{name:"arrow-color",type:d.color},{name:"arrow-fill",type:d.arrowFill},{name:"arrow-width",type:d.arrowWidth}].forEach(function(t){Y.forEach(function(e){e=e+"-"+t.name,k.push({name:e,type:t.type,triggersBounds:t.triggersBounds})})},{}),ale.properties=[].concat(m,B,y,P,$,j,f,g,c,u,p,v,F,z,q,b,w,U,G,k,W)),S=ale.propertyGroups={behavior:m,transition:B,visibility:y,overlay:P,underlay:$,ghost:j,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:v,nodeBorder:F,nodeOutline:z,backgroundImage:q,pie:b,stripe:w,compound:U,edgeLine:G,edgeArrow:k,core:W},V=ale.propertyGroupNames={},H=((ale.propertyGroupKeys=Object.keys(S)).forEach(function(t){V[t]=S[t].map(function(e){return e.name}),S[t].forEach(function(e){return e.groupKey=t})}),ale.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}]);ale.propertyNames=C.map(function(e){return e.name});for(var E=0;E<C.length;E++){var X=C[E];C[X.name]=X}for(var _=0;_<H.length;_++){var A=H[_],R=C[A.pointsTo];C.push(R={name:A.name,alias:!0,pointsTo:R}),C[A.name]=R}function L(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:rre;VK(this,L),this.idsByKey=new bre,this.keyForId=new bre,this.cachesByLvl=new bre,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}function N(e,t,r,i){VK(this,N),this.r=e,this.texSize=t,this.texRows=r,this.createTextureCanvas=i,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}function D(e,t,r,i){VK(this,D),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=t,this.texRows=r,this.texHeight=Math.floor(t/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(e,t,t),this.scratch=i(e,t,this.texHeight,"scratch")}function I(e,t,r){VK(this,I),this.r=e,this.gl=t,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=kJ,this.atlasManager=new Gce(e,r),this.batchManager=new jce(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Wce.SCREEN),this.pickingProgram=this._createShaderProgram(Wce.PICKING),this.vao=this._createVAO()}function M(e){VK(this,M),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}function O(e,t){VK(this,O),this.r=e,this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}for(ale.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},ale.getDefaultProperties=function(){var e=this._private;if(null==e.defaultProperties){for(var t=Kee({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(e,t){for(var r=1;r<=ale.pieBackgroundN;r++){var i=t.name.replace("{{i}}",r),n=t.value;e[i]=n}return e},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(e,t){for(var r=1;r<=ale.stripeBackgroundN;r++){var i=t.name.replace("{{i}}",r),n=t.value;e[i]=n}return e},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(t,r){return ale.arrowPrefixes.forEach(function(e){e=e+"-"+r.name,t[e]=r.value}),t},{})),r={},i=0;i<this.properties.length;i++){var n,a=this.properties[i];a.pointsTo||(n=t[a=a.name],n=this.parse(a,n),r[a]=n)}e.defaultProperties=r}return e.defaultProperties},ale.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length},Ice={parse:function(e,t,r,i){var n,a,s;return Cee(t)?this.parseImplWarn(e,t,r,i):(n=Hte(e,""+t,r?"t":"f","mapping"===i||!0===i||!1===i||null==i?"dontcare":i),s=(s=(a=this.propCache=this.propCache||[])[n])||(a[n]=this.parseImplWarn(e,t,r,i)),(r||"mapping"===i)&&(s=cre(s))&&(s.value=cre(s.value)),s)},parseImplWarn:function(e,t,r,i){return(r=this.parseImpl(e,t,r,i))||null==t||ore("The style property `".concat(e,": ").concat(t,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==t||ore("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(t,r,i,e){t=Uee(t);var n=this.properties[t],a=r,s=this.types;if(!n||void 0===r)return null;n.alias&&(n=n.pointsTo,t=n.name);var o=kee(r),l=(o&&(r=r.trim()),n.type);if(!l)return null;if(i&&(""===r||null===r))return{name:t,value:r,bypass:!0,deleteBypass:!0};if(Cee(r))return{name:t,value:r,strValue:"fn",mapped:s.fn,bypass:i};if(!(!o||e||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(n=new RegExp(s.data.regex).exec(r)))return!i&&(x=s.data,{name:t,value:n,strValue:""+r,mapped:x,field:n[1],bypass:i});if(10<=r.length&&"m"===r[0]&&(x=new RegExp(s.mapData.regex).exec(r))){if(i||l.multiple)return!1;if(n=s.mapData,!l.color&&!l.number)return!1;if(!(s=this.parse(t,x[4]))||s.mapped)return!1;if(!(w=this.parse(t,x[5]))||w.mapped)return!1;if(s.pfValue===w.pfValue||s.strValue===w.strValue)return ore("`"+t+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+s.strValue+"`"),this.parse(t,s.strValue);if(l.color){var c=s.value,h=w.value;if(!(c[0]!==h[0]||c[1]!==h[1]||c[2]!==h[2]||c[3]!==h[3]&&(null!=c[3]&&1!==c[3]||null!=h[3]&&1!==h[3])))return!1}return{name:t,value:x,strValue:""+r,mapped:n,field:x[1],fieldMin:parseFloat(x[2]),fieldMax:parseFloat(x[3]),valueMin:s.value,valueMax:w.value,bypass:i}}}if(l.multiple&&"multiple"!==e){var u=o?r.split(/\s+/):See(r)?r:[r];if(l.evenMultiple&&u.length%2!=0)return null;for(var d=[],p=[],g=[],f="",m=!1,y=0;y<u.length;y++){var v=this.parse(t,u[y],i,"multiple"),m=m||kee(v.value);d.push(v.value),g.push(null!=v.pfValue?v.pfValue:v.value),p.push(v.units),f+=(0<y?" ":"")+v.strValue}return l.validate&&!l.validate(d,p)?null:l.singleEnum&&m?1===d.length&&kee(d[0])?{name:t,value:d[0],strValue:d[0],bypass:i}:null:{name:t,value:d,pfValue:g,strValue:f,bypass:i,units:p}}var b,x,c=mt(function(){for(var e=0;e<l.enums.length;e++)if(l.enums[e]===r)return{name:t,value:r,strValue:""+r,bypass:i};return null},"checkEnums");if(l.number)return h="px",l.units&&(b=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(o?(n="px|em"+(l.allowPercent?"|\\%":""),b&&(n=b),(x=r.match("^("+Vee+")("+n+")?$"))&&(r=x[1],b=x[2]||h)):b&&!l.implicitUnits||(b=h)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,c()):l.integer&&!Aee(r)||void 0!==l.min&&(r<l.min||l.strictMin&&r===l.min)||void 0!==l.max&&(r>l.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:Gre(r)),"%"===b&&(s.pfValue=r/100),s);if(l.propList){var w,T=[];if("none"!=(w=""+r)){for(var k=w.split(/\s*,\s*|\s+/),C=0;C<k.length;C++){var S=k[C].trim();this.properties[S]?T.push(S):ore("`"+S+"` is not a valid property name")}if(0===T.length)return null}return{name:t,value:T,strValue:0===T.length?"none":T.join(" "),bypass:i}}if(l.color)return(e=tte(r))?{name:t,value:e,pfValue:e,strValue:"rgb("+e[0]+","+e[1]+","+e[2]+")",bypass:i}:null;if(l.regex||l.regexes){if(l.enums&&(o=c()))return o;for(var E=l.regexes||[l.regex],_=0;_<E.length;_++){var A=new RegExp(E[_]).exec(r);if(A)return{name:t,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:i}}return null}return l.string?{name:t,value:""+r,strValue:""+r,bypass:i}:l.enums?c():null}},sle=mt(function(e){if(!(this instanceof sle))return new sle(e);Iee(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):are("A style must have a core reference")},"Style"),(ole=sle.prototype).instanceString=function(){return"style"},ole.clear=function(){for(var e=this._private,t=e.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach(function(e){(e=e[0]._private).styleDirty=!0,e.appliedInitStyle=!1}),this},ole.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},ole.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},ole.selector=function(e){var e="core"===e?null:new doe(e),t=this.length++;return this[t]={selector:e,properties:[],mappedProperties:[],index:t},this},ole.css=function(){var e=arguments;if(1===e.length)for(var t=e[0],r=0;r<this.properties.length;r++){var i=this.properties[r],n=t[i.name];void 0!==(n=void 0===n?t[Gee(i.name)]:n)&&this.cssRule(i.name,n)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},ole.style=ole.css,ole.cssRule=function(e,t){return(e=this.parse(e,t))&&(this[t=this.length-1].properties.push(e),(this[t].properties[e.name]=e).name.match(/pie-(\d+)-background-size/)&&e.value&&(this._private.hasPie=!0),e.name.match(/stripe-(\d+)-background-size/)&&e.value&&(this._private.hasStripe=!0),e.mapped&&this[t].mappedProperties.push(e),!this[t].selector)&&(this._private.coreStyle[e.name]=e),this},ole.append=function(e){return Mee(e)?e.appendToStyle(this):See(e)?this.appendFromJson(e):kee(e)&&this.appendFromString(e),this},sle.fromJson=function(e,t){return(e=new sle(e)).fromJson(t),e},sle.fromString=function(e,t){return new sle(e).fromString(t)},[qle,ghe,kce,Bce,Sce,Dce,ale,Ice].forEach(function(e){Kee(ole,e)}),sle.types=ole.types,sle.properties=ole.properties,sle.propertyGroups=ole.propertyGroups,sle.propertyGroupNames=ole.propertyGroupNames,sle.propertyGroupKeys=ole.propertyGroupKeys,gce={style:mt(function(e){return e&&this.setStyle(e).update(),this._private.style},"style"),setStyle:mt(function(e){var t=this._private;return Mee(e)?t.style=e.generateStyle(this):See(e)?t.style=sle.fromJson(this,e):kee(e)?t.style=sle.fromString(this,e):t.style=sle(this),t.style},"setStyle"),updateStyle:mt(function(){this.mutableElements().updateStyle()},"updateStyle")},(J={autolock:mt(function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},"autolock"),autoungrabify:mt(function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},"autoungrabify"),autounselectify:mt(function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},"autounselectify"),selectionType:mt(function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},"selectionType"),panningEnabled:mt(function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},"panningEnabled"),userPanningEnabled:mt(function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},"userPanningEnabled"),zoomingEnabled:mt(function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},"zoomingEnabled"),userZoomingEnabled:mt(function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},"userZoomingEnabled"),boxSelectionEnabled:mt(function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},"boxSelectionEnabled"),pan:mt(function(){var e,t,r,i=arguments,n=this._private.pan;switch(i.length){case 0:return n;case 1:if(kee(i[0]))return n[e=i[0]];if(Eee(i[0])){if(!this._private.panningEnabled)return this;t=(r=i[0]).x,r=r.y,he(t)&&(n.x=t),he(r)&&(n.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;t=i[1],"x"!==(e=i[0])&&"y"!==e||!he(t)||(n[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:mt(function(e,t){var r,i,n=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(n.length){case 1:Eee(e)&&(r=(i=n[0]).x,i=i.y,he(r)&&(a.x+=r),he(i)&&(a.y+=i),this.emit("pan viewport"));break;case 2:r=t,"x"!==(i=e)&&"y"!==i||!he(r)||(a[i]+=r),this.emit("pan viewport")}this.notify("viewport")}return this},"panBy"),gc:mt(function(){this.notify("gc")},"gc"),fit:mt(function(e,t){return(e=this.getFitViewport(e,t))&&((t=this._private).zoom=e.zoom,t.pan=e.pan,this.emit("pan zoom viewport"),this.notify("viewport")),this},"fit"),getFitViewport:mt(function(e,t){if(he(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(kee(e)?(i=e,e=this.$(i)):Bee(e)?((r={x1:(i=e).x1,y1:i.y1,x2:i.x2,y2:i.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1):Lee(e)||(e=this.mutableElements()),!Lee(e)||!e.empty())){var r=r||e.boundingBox(),i=this.width(),e=this.height();if(t=he(t)?t:0,!isNaN(i)&&!isNaN(e)&&0<i&&0<e&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:t=(t=(t=Math.min((i-2*t)/r.w,(e-2*t)/r.h))>this._private.maxZoom?this._private.maxZoom:t)<this._private.minZoom?this._private.minZoom:t,pan:{x:(i-t*(r.x1+r.x2))/2,y:(e-t*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:mt(function(e,t){var r,i=this._private;return null==t&&(e=(r=e).min,t=r.max),he(e)&&he(t)&&e<=t?(i.minZoom=e,i.maxZoom=t):he(e)&&void 0===t&&e<=i.maxZoom?i.minZoom=e:he(t)&&void 0===e&&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:Eee(e)&&(r=e.level,null!=e.position?t=Pre(e.position,a,n):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!i.panningEnabled&&(s=!0),r=(r=r>i.maxZoom?i.maxZoom:r)<i.minZoom?i.minZoom:r,!s&&he(r)&&r!==a&&(null==t||he(t.x)&&he(t.y))?null!=t?{zoomed:!0,panned:!0,zoom:e=r,pan:{x:-e/a*(t.x-n.x)+t.x,y:-e/a*(t.y-n.y)+t.y}}:{zoomed:!0,panned:!1,zoom:r,pan:n}:null},"getZoomedViewport"),zoom:mt(function(e){var t;return void 0===e?this._private.zoom:(e=this.getZoomedViewport(e),t=this._private,null!=e&&e.zoomed&&(t.zoom=e.zoom,e.panned&&(t.pan.x=e.pan.x,t.pan.y=e.pan.y),this.emit("zoom"+(e.panned?" pan":"")+" viewport"),this.notify("viewport")),this)},"zoom"),viewport:mt(function(e){var t=this._private,r=!0,i=!0,n=[],a=!1,s=!1;return e&&(he(e.zoom)||(r=!1),Eee(e.pan)||(i=!1),r||i)&&(r&&((r=e.zoom)<t.minZoom||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<n.length)&&(n.push("viewport"),this.emit(n.join(" ")),this.notify("viewport")),this},"viewport"),center:mt(function(e){return(e=this.getCenterPan(e))&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:mt(function(e,t){var r,i;if(this._private.panningEnabled&&(kee(e)?(r=e,e=this.mutableElements().filter(r)):Lee(e)||(e=this.mutableElements()),0!==e.length))return r=e.boundingBox(),e=this.width(),i=this.height(),{x:(e-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}},"getCenterPan"),reset:mt(function(){return this._private.panningEnabled&&this._private.zoomingEnabled&&this.viewport({pan:{x:0,y:0},zoom:1}),this},"reset"),invalidateSize:mt(function(){this._private.sizeCache=null},"invalidateSize"),size:mt(function(){var t,e=this._private,r=e.container;return e.sizeCache=e.sizeCache||(r?(t=this.window().getComputedStyle(r),e=mt(function(e){return parseFloat(t.getPropertyValue(e))},"val"),{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},"size"),width:mt(function(){return this.size().width},"width"),height:mt(function(){return this.size().height},"height"),extent:mt(function(){var e=this._private.pan,t=this._private.zoom,r=this.renderedExtent();return(r={x1:(r.x1-e.x)/t,x2:(r.x2-e.x)/t,y1:(r.y1-e.y)/t,y2:(r.y2-e.y)/t}).w=r.x2-r.x1,r.h=r.y2-r.y1,r},"extent"),renderedExtent:mt(function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},"renderedExtent"),multiClickDebounceTime:mt(function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime},"multiClickDebounceTime")}).centre=J.center,J.autolockNodes=J.autolock,J.autoungrabifyNodes=J.autoungrabify,(che={data:Vse.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Vse.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Vse.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Vse.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=che.data,che.removeAttr=che.removeData,lle=mt(function(e){var n=this,r=(o=(o=(e=Kee({},e)).container)&&!Ree(o)&&Ree(o[0])?o[0]:o)?o._cyreg:null,i=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),t=(o&&(o._cyreg=r),r.cy=n,void 0!==mee&&void 0!==o&&!e.headless),a=e,e=(a.layout=Kee({name:t?"grid":"null"},a.layout),a.renderer=Kee({name:t?"canvas":"null"},a.renderer),mt(function(e,t,r){return void 0!==t?t:void 0!==r?r:e},"defVal")),s=this._private={container:o,ready:!1,options:a,elements:new Qoe(this),listeners:[],aniEles:new Qoe(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:e(!0,a.zoomingEnabled),userZoomingEnabled:e(!0,a.userZoomingEnabled),panningEnabled:e(!0,a.panningEnabled),userPanningEnabled:e(!0,a.userPanningEnabled),boxSelectionEnabled:e(!0,a.boxSelectionEnabled),autolock:e(!1,a.autolock,a.autolockNodes),autoungrabify:e(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:e(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?t:a.styleEnabled,zoom:he(a.zoom)?a.zoom:1,pan:{x:Eee(a.pan)&&he(a.pan.x)?a.pan.x:0,y:Eee(a.pan)&&he(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:e(250,a.multiClickDebounceTime)},o=(this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),mt(function(e,t){if(e.some(Fee))return Hne.all(e).then(t);t(e)},"loadExtData")),t=(s.styleEnabled&&n.setStyle([]),Kee({},a,a.renderer)),l=(n.initRenderer(t),mt(function(e,t,r){n.notifications(!1);var i=n.mutableElements();0<i.length&&i.remove(),null!=e&&(Eee(e)||See(e))&&n.add(e),n.one("layoutready",function(e){n.notifications(!0),n.emit(e),n.one("load",t),n.emitAndNotify("load")}).one("layoutstop",function(){n.one("done",r),n.emit("done")}),(i=Kee({},n._private.options.layout)).eles=n.elements(),n.layout(i).run()},"setElesAndLayout"));o([a.style,a.elements],function(e){var t=e[0],e=e[1];s.styleEnabled&&n.style().append(t),l(e,function(){n.startAnimationLoop(),s.ready=!0,Cee(a.ready)&&n.on("ready",a.ready);for(var e=0;e<i.length;e++){var t=i[e];n.on("ready",t)}r&&(r.readies=[]),n.emit("ready")},a.done)})},"Core"),cle=lle.prototype,Kee(cle,{instanceString:mt(function(){return"core"},"instanceString"),isReady:mt(function(){return this._private.ready},"isReady"),destroyed:mt(function(){return this._private.destroyed},"destroyed"),ready:mt(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},"ready"),destroy:mt(function(){if(!this.destroyed())return this.stopAnimationLoop(),this.destroyRenderer(),this.emit("destroy"),this._private.destroyed=!0,this},"destroy"),hasElementWithId:mt(function(e){return this._private.elements.hasElementWithId(e)},"hasElementWithId"),getElementById:mt(function(e){return this._private.elements.getElementById(e)},"getElementById"),hasCompoundNodes:mt(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:mt(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:mt(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:mt(function(e){return this._private.elements.merge(e),this},"addToPool"),removeFromPool:mt(function(e){return this._private.elements.unmerge(e),this},"removeFromPool"),container:mt(function(){return this._private.container||null},"container"),window:mt(function(){var e;return null!=this._private.container&&void 0!==(e=this._private.container.ownerDocument)&&null!=e&&e.defaultView||mee},"window"),mount:mt(function(e){var t,r;if(null!=e)return r=(t=this._private).options,!Ree(e)&&Ree(e[0])&&(e=e[0]),this.stopAnimationLoop(),this.destroyRenderer(),t.container=e,t.styleEnabled=!0,this.invalidateSize(),this.initRenderer(Kee({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),this.startAnimationLoop(),this.style(r.style),this.emit("mount"),this},"mount"),unmount:mt(function(){return this.stopAnimationLoop(),this.destroyRenderer(),this.initRenderer({name:"null"}),this.emit("unmount"),this},"unmount"),options:mt(function(){return cre(this._private.options)},"options"),json:mt(function(e){var r,h=this,t=h._private,i=h.mutableElements(),n=mt(function(e){return h.getElementById(e.id())},"getFreshRef");if(Eee(e)){if(h.startBatch(),e.elements){var u={},a=mt(function(e,t){for(var r=[],i=[],n=0;n<e.length;n++){var a,s,o=e[n];o.data.id?(a=""+o.data.id,s=h.getElementById(a),u[a]=!0,0!==s.length?i.push({ele:s,json:o}):(t&&(o.group=t),r.push(o))):ore("cy.json() cannot handle elements without an ID attribute")}h.add(r);for(var l=0;l<i.length;l++){var c=i[l];c.ele.json(c.json)}},"updateEles");if(See(e.elements))a(e.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],c=e.elements[l];See(c)&&a(c,l)}var d=h.collection();i.filter(function(e){return!u[e.id()]}).forEach(function(e){e.isParent()?d.merge(e):e.remove()}),d.forEach(function(e){return e.children().move({parent:null})}),d.forEach(function(e){return n(e).remove()})}e.style&&h.style(e.style),null!=e.zoom&&e.zoom!==t.zoom&&h.zoom(e.zoom),!e.pan||e.pan.x===t.pan.x&&e.pan.y===t.pan.y||h.pan(e.pan),e.data&&h.data(e.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<p.length;g++){var f=p[g];null!=e[f]&&h[f](e[f])}return h.endBatch(),this}return r={},e?r.elements=this.elements().map(function(e){return e.json()}):(r.elements={},i.forEach(function(e){var t=e.group();r.elements[t]||(r.elements[t]=[]),r.elements[t].push(e.json())})),this._private.styleEnabled&&(r.style=h.style().json()),r.data=cre(h.data()),i=t.options,r.zoomingEnabled=t.zoomingEnabled,r.userZoomingEnabled=t.userZoomingEnabled,r.zoom=t.zoom,r.minZoom=t.minZoom,r.maxZoom=t.maxZoom,r.panningEnabled=t.panningEnabled,r.userPanningEnabled=t.userPanningEnabled,r.pan=cre(t.pan),r.boxSelectionEnabled=t.boxSelectionEnabled,r.renderer=cre(i.renderer),r.hideEdgesOnViewport=i.hideEdgesOnViewport,r.textureOnViewport=i.textureOnViewport,r.wheelSensitivity=i.wheelSensitivity,r.motionBlur=i.motionBlur,r.multiClickDebounceTime=i.multiClickDebounceTime,r},"json")}),cle.$id=cle.getElementById,[Mce,Oce,Pce,Hce,Zce,nhe,ahe,$ce,gce,J,che].forEach(function(e){Kee(cle,e)}),hle={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},ule={maximal:!1,acyclic:!1},dle=mt(function(e){return e.scratch("breadthfirst")},"getInfo"),ple=mt(function(e,t){return e.scratch("breadthfirst",t)},"setInfo"),mt(tJ,"BreadthFirstLayout"),gle={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(tJ.prototype.run=function(){var l=this.options,e=l.cy,c=l.eles,h=c.nodes().filter(function(e){return e.isChildless()}),t=c,r=l.directed,P=l.acyclic||l.maximal||0<l.maximalAdjustments,n=!!l.boundingBox,a=eie(n?l.boundingBox:structuredClone(e.extent()));if(Lee(l.roots))d=l.roots;else if(See(l.roots)){for(var i=[],s=0;s<l.roots.length;s++){var o=l.roots[s],o=e.getElementById(o);i.push(o)}d=e.collection(i)}else if(kee(l.roots))d=e.$(l.roots);else if(r)d=h.roots();else for(var u=c.components(),d=e.collection(),$=mt(function(){var t=(e=u[p]).maxDegree(!1),e=e.filter(function(e){return e.degree(!1)===t});d=d.add(e)},"_loop"),p=0;p<u.length;p++)$();var g=[],f={},m=mt(function(e,t){null==g[t]&&(g[t]=[]);var r=g[t].length;g[t].push(e),ple(e,{index:r,depth:t})},"addToDepth"),B=mt(function(e,t){var r=dle(e),i=r.depth;g[i][r.index]=null,e.isChildless()&&m(e,t)},"changeDepth");t.bfs({roots:d,directed:l.directed,visit:mt(function(e,t,r,i,n){var a=(e=e[0]).id();e.isChildless()&&m(e,n),f[a]=!0},"visit")});for(var y=[],v=0;v<h.length;v++){var b=h[v];f[b.id()]||y.push(b)}var x=mt(function(e){for(var t=g[e],r=0;r<t.length;r++){var i=t[r];null==i?(t.splice(r,1),r--):ple(i,{depth:e,index:r})}},"assignDepthsAt"),F=mt(function(e,t){for(var r=dle(e),i=e.incomers().filter(function(e){return e.isNode()&&c.has(e)}),n=-1,a=e.id(),s=0;s<i.length;s++)var o=i[s],o=dle(o),n=Math.max(n,o.depth);return r.depth<=n&&(!l.acyclic&&t[a]?null:(B(e,r=n+1),t[a]=r,!0))},"adjustMaximally");if(r&&P){var w=[],z={},q=mt(function(e){return w.push(e)},"enqueue"),U=mt(function(){return w.shift()},"dequeue");for(h.forEach(function(e){return w.push(e)});0<w.length;){var T=U(),k=F(T,z);if(k)T.outgoers().filter(function(e){return e.isNode()&&c.has(e)}).forEach(q);else if(null===k){ore("Detected double maximal shift for node `"+T.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var C=0;if(l.avoidOverlap)for(var S=0;S<h.length;S++)var E=h[S].layoutDimensions(l),G=E.w,C=Math.max(C,G,E.h);var _={},A=mt(function(e){if(_[e.id()])return _[e.id()];for(var t=dle(e).depth,r=e.neighborhood(),i=0,n=0,a=0;a<r.length;a++){var s,o,l=r[a];l.isEdge()||l.isParent()||!h.has(l)||null!=(l=dle(l))&&(s=l.index,l=l.depth,null!=s)&&null!=l&&(o=g[l].length,l<t)&&(i+=s/o,n++)}return i/=n=Math.max(1,n),0===n&&(i=0),_[e.id()]=i},"getWeightedPercent"),j=mt(function(e,t){var r=A(e)-A(t);return 0==r?Hee(e.id(),t.id()):r},"sortFn");void 0!==l.depthSort&&(j=l.depthSort);for(var R=g.length,L=0;L<R;L++)g[L].sort(j),x(L);for(var N=[],D=0;D<y.length;D++)N.push(y[D]);t=mt(function(){for(var e=0;e<R;e++)x(e)},"assignDepths"),N.length&&(g.unshift(N),R=g.length,t());for(var W=0,I=0;I<R;I++)W=Math.max(g[I].length,W);var Y=a.x1+a.w/2,V=a.y1+a.h/2,M=h.reduce(function(e,t){return t=t.boundingBox({includeLabels:l.nodeDimensionsIncludeLabels}),{w:-1===e.w?t.w:(e.w+t.w)/2,h:-1===e.h?t.h:(e.h+t.h)/2}},{w:-1,h:-1}),H=Math.max(1===R?0:n?(a.h-2*l.padding-M.h)/(R-1):(a.h-2*l.padding-M.h)/(R+1),C),X=g.reduce(function(e,t){return Math.max(e,t.length)},0),K=mt(function(e){var t,r,i=(e=dle(e)).depth,e=e.index;return l.circle?(t=Math.min(a.w/2/R,a.h/2/R),t=(t=Math.max(t,C))*i+t-(0<R&&g[0].length<=3?t/2:0),r=2*Math.PI/g[i].length*e,0===i&&1===g[0].length&&(t=1),{x:Y+t*Math.cos(r),y:V+t*Math.sin(r)}):(t=g[i].length,r=Math.max(1===t?0:n?(a.w-2*l.padding-M.w)/((l.grid?X:t)-1):(a.w-2*l.padding-M.w)/((l.grid?X:t)+1),C),{x:Y+(e+1-(t+1)/2)*r,y:V+(i+1-(R+1)/2)*H})},"getPositionTopBottom"),O={downward:0,leftward:90,upward:180,rightward:-90},r=(-1===Object.keys(O).indexOf(l.direction)&&are("Invalid direction '".concat(l.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(O).join(", "))),mt(function(e){return CZ(K(e),a,O[l.direction])},"getPosition"));return c.nodes().layoutPositions(this,l,r),this}),spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(rJ,"CircleLayout"),fle={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(rJ.prototype.run=function(){var i=e=this.options,e=e.cy,t=i.eles,n=void 0!==i.counterclockwise?!i.counterclockwise:i.clockwise,r=t.nodes().not(":parent");i.sort&&(r=r.sort(i.sort));for(var a,s=(e=eie(i.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()})).x1+e.w/2,o=e.y1+e.h/2,l=(void 0===i.sweep?2*Math.PI-2*Math.PI/r.length:i.sweep)/Math.max(1,r.length-1),c=0,h=0;h<r.length;h++)var u=r[h].layoutDimensions(i),d=u.w,c=Math.max(c,d,u.h);a=he(i.radius)?i.radius:r.length<=1?0:Math.min(e.h,e.w)/2-c,1<r.length&&i.avoidOverlap&&(c*=1.75,e=Math.cos(l)-Math.cos(0),p=Math.sin(l)-Math.sin(0),e=Math.sqrt(c*c/(e*e+p*p)),a=Math.max(e,a));var p=mt(function(e,t){var t=i.startAngle+t*l*(n?1:-1),r=a*Math.cos(t),t=a*Math.sin(t);return{x:s+r,y:o+t}},"getPos");return t.nodes().layoutPositions(this,i,p),this}),minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:mt(function(e){return e.degree()},"concentric"),levelWidth:mt(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(iJ,"ConcentricLayout"),iJ.prototype.run=function(){for(var e=r=this.options,t=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=r.cy,i=e.eles,n=i.nodes().not(":parent"),a=(r=eie(e.boundingBox||{x1:0,y1:0,w:r.width(),h:r.height()})).x1+r.w/2,s=r.y1+r.h/2,o=[],l=0,c=0;c<n.length;c++){var h=n[c],u=e.concentric(h);o.push({value:u,node:h}),h._private.scratch.concentric=u}n.updateStyle();for(var d=0;d<n.length;d++)var p=n[d].layoutDimensions(e),l=Math.max(l,p.w,p.h);o.sort(function(e,t){return t.value-e.value});for(var P=e.levelWidth(n),g=[[]],f=g[0],m=0;m<o.length;m++){var y=o[m];0<f.length&&P<=Math.abs(f[0].value-y.value)&&g.push(f=[]),f.push(y)}var v,b=l+e.minNodeSpacing;e.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-b,b=Math.min(b,r/(g.length+v?1:0)));for(var x=0,w=0;w<g.length;w++){var T,k=g[w],C=void 0===e.sweep?2*Math.PI-2*Math.PI/k.length:e.sweep,C=k.dTheta=C/Math.max(1,k.length-1);1<k.length&&e.avoidOverlap&&(T=Math.cos(C)-Math.cos(0),C=Math.sin(C)-Math.sin(0),T=Math.sqrt(b*b/(T*T+C*C)),x=Math.max(T,x)),k.r=x,x+=b}if(e.equidistant){for(var S=0,E=0,_=0;_<g.length;_++)var $=g[_].r-E,S=Math.max(S,$);for(var E=0,A=0;A<g.length;A++){var R=g[A];0===A&&(E=R.r),R.r=E,E+=S}}for(var L={},N=0;N<g.length;N++)for(var D=g[N],B=D.dTheta,I=D.r,M=0;M<D.length;M++){var F=D[M],O=e.startAngle+(t?1:-1)*B*M,O={x:a+I*Math.cos(O),y:s+I*Math.sin(O)};L[F.node.id()]=O}return i.nodes().layoutPositions(this,e,function(e){return e=e.id(),L[e]}),this},yle={ready:mt(function(){},"ready"),stop:mt(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:mt(function(e){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:mt(function(e){return 32},"idealEdgeLength"),edgeElasticity:mt(function(e){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},mt(nJ,"CoseLayout"),nJ.prototype.run=function(){var r=this.options,e=r.cy,i=this,n=(!(i.stopped=!1)!==r.animate&&!1!==r.animate||i.emit({type:"layoutstart",layout:i}),mle=!0===r.debug,vle(e,i,r)),t=(mle&&(void 0)(n),r.randomize&&wle(n),Fte()),a=mt(function(){kle(n,e,r),!0===r.fit&&e.fit(r.padding)},"refresh"),s=mt(function(e){return!(i.stopped||e>=r.numIter||(Cle(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},"mainLoop"),o=mt(function(){var e,t;!0===r.animate||!1===r.animate?(a(),i.one("layoutstop",r.stop),i.emit({type:"layoutstop",layout:i})):(e=r.eles.nodes(),t=Tle(n,r,e),e.layoutPositions(i,r,t))},"done"),l=0,c=!0;if(!0===r.animate){var h=mt(function(){for(var e=0;c&&e<r.refresh;)c=s(l),l++,e++;c?(Fte()-t>=r.animationThreshold&&a(),Bte(h)):(Ple(n,r),o())},"frame");h()}else{for(;c;)c=s(l),l++;Ple(n,r),o()}return this},nJ.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},nJ.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},vle=mt(function(e,t,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=eie(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;c<o.length;c++)for(var h=o[c],u=0;u<h.length;u++)l[h[u].id()]=c;for(c=0;c<s.nodeSize;c++){var d=(y=n[c]).layoutDimensions(r);(N={}).isLocked=y.locked(),N.id=y.data("id"),N.parentId=y.data("parent"),N.cmptId=l[y.id()],N.children=[],N.positionX=y.position("x"),N.positionY=y.position("y"),N.offsetX=0,N.offsetY=0,N.height=d.w,N.width=d.h,N.maxX=N.positionX+N.width/2,N.minX=N.positionX-N.width/2,N.maxY=N.positionY+N.height/2,N.minY=N.positionY-N.height/2,N.padLeft=parseFloat(y.style("padding")),N.padRight=parseFloat(y.style("padding")),N.padTop=parseFloat(y.style("padding")),N.padBottom=parseFloat(y.style("padding")),N.nodeRepulsion=Cee(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,s.layoutNodes.push(N),s.idToIndex[N.id]=c}for(var p=[],g=0,f=-1,m=[],c=0;c<s.nodeSize;c++){var y,v=(y=s.layoutNodes[c]).parentId;(null!=v?s.layoutNodes[s.idToIndex[v]].children:(p[++f]=y.id,m)).push(y.id)}for(s.graphSet.push(m);g<=f;){var b=p[g++],b=s.idToIndex[b],x=s.layoutNodes[b].children;if(0<x.length)for(s.graphSet.push(x),c=0;c<x.length;c++)p[++f]=x[c]}for(c=0;c<s.graphSet.length;c++)for(var w=s.graphSet[c],u=0;u<w.length;u++){var T=s.idToIndex[w[u]];s.indexToGraph[T]=c}for(c=0;c<s.edgeSize;c++){var k=i[c],C={},S=(C.id=k.data("id"),C.sourceId=k.data("source"),C.targetId=k.data("target"),Cee(r.idealEdgeLength)?r.idealEdgeLength(k):r.idealEdgeLength),k=Cee(r.edgeElasticity)?r.edgeElasticity(k):r.edgeElasticity,E=s.idToIndex[C.sourceId],_=s.idToIndex[C.targetId];if(s.indexToGraph[E]!=s.indexToGraph[_]){for(var A=ble(C.sourceId,C.targetId,s),R=s.graphSet[A],L=0,N=s.layoutNodes[E];-1===R.indexOf(N.id);)N=s.layoutNodes[s.idToIndex[N.parentId]],L++;for(N=s.layoutNodes[_];-1===R.indexOf(N.id);)N=s.layoutNodes[s.idToIndex[N.parentId]],L++;S*=L*r.nestingFactor}C.idealLength=S,C.elasticity=k,s.layoutEdges.push(C)}return s},"createLayoutInfo"),ble=mt(function(e,t,r){return(e=xle(e,t,0,r)).count<2?0:e.graph},"findLCA"),xle=mt(function(e,t,r,i){var n=i.graphSet[r];if(-1<n.indexOf(e)&&-1<n.indexOf(t))return{count:2,graph:r};for(var a=0,s=0;s<n.length;s++){var o=n[s],o=i.idToIndex[o];if(0!==(o=i.layoutNodes[o].children).length&&(o=i.indexToGraph[i.idToIndex[o[0]]],0!==(o=xle(e,t,o,i)).count)){if(1!==o.count)return o;if(2==++a)break}}return{count:a,graph:r}},"findLCA_aux"),wle=mt(function(e,t){for(var r=e.clientWidth,i=e.clientHeight,n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*i)}},"randomizePositions"),Tle=mt(function(n,a,e){var s=n.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(e.forEach(function(e){e=n.layoutNodes[n.idToIndex[e.data("id")]],o.x1=Math.min(o.x1,e.positionX),o.x2=Math.max(o.x2,e.positionX),o.y1=Math.min(o.y1,e.positionY),o.y2=Math.max(o.y2,e.positionY)}),o.w=o.x2-o.x1,o.h=o.y2-o.y1),function(e,t){var r,i,e=n.layoutNodes[n.idToIndex[e.data("id")]];return a.boundingBox?(r=0===o.w?.5:(e.positionX-o.x1)/o.w,i=0===o.h?.5:(e.positionY-o.y1)/o.h,{x:s.x1+r*s.w,y:s.y1+i*s.h}):{x:e.positionX,y:e.positionY}}},"getScaleInBoundsFn"),kle=mt(function(e,t,r){var i=r.layout,n=r.eles.nodes(),a=Tle(e,r,n);n.positions(a),!0!==e.ready&&(e.ready=!0,i.one("layoutready",r.ready),i.emit({type:"layoutready",layout:this}))},"refreshPositions"),Cle=mt(function(e,t,r){Sle(e,t),Lle(e),Nle(e,t),Dle(e),Ile(e)},"step"),Sle=mt(function(e,t){for(var r=0;r<e.graphSet.length;r++)for(var i=e.graphSet[r],n=i.length,a=0;a<n;a++)for(var s=e.layoutNodes[e.idToIndex[i[a]]],o=a+1;o<n;o++){var l=e.layoutNodes[e.idToIndex[i[o]]];_le(s,l,e,t)}},"calculateNodeForces"),Ele=mt(function(e){return 2*e*Math.random()-1},"randomDistance"),_le=mt(function(e,t,r,i){var n,a,s,o;e.cmptId!==t.cmptId&&!r.isCompound||(r=t.positionX-e.positionX,n=t.positionY-e.positionY,0===r&&0===n&&(r=Ele(1),n=Ele(1)),o=0<(o=Ale(e,t,r,n))?(s=i.nodeOverlap*o)*r/(a=Math.sqrt(r*r+n*n)):(i=Rle(e,r,n),o=(r=(o=Rle(t,-1*r,-1*n)).x-i.x)*r+(n=o.y-i.y)*n,a=Math.sqrt(o),(s=(e.nodeRepulsion+t.nodeRepulsion)/o)*r/a),i=s*n/a,e.isLocked||(e.offsetX-=o,e.offsetY-=i),t.isLocked)||(t.offsetX+=o,t.offsetY+=i)},"nodeRepulsion"),Ale=mt(function(e,t,r,i){return r=0<r?e.maxX-t.minX:t.maxX-e.minX,i=0<i?e.maxY-t.minY:t.maxY-e.minY,0<=r&&0<=i?Math.sqrt(r*r+i*i):0},"nodesOverlap"),Rle=mt(function(e,t,r){var i=e.positionX,n=e.positionY,a=e.height||1,s=r/t,o=a/(e=e.width||1),l={};return 0===t&&0<r||0===t&&r<0?(l.x=i,l.y=n+a/2):0<t&&-1*o<=s&&s<=o?(l.x=i+e/2,l.y=n+e*r/2/t):t<0&&-1*o<=s&&s<=o?(l.x=i-e/2,l.y=n-e*r/2/t):0<r&&(s<=-1*o||o<=s)?(l.x=i+a*t/2/r,l.y=n+a/2):r<0&&(s<=-1*o||o<=s)&&(l.x=i-a*t/2/r,l.y=n-a/2),l},"findClippingPoint"),Lle=mt(function(e,t){for(var r=0;r<e.edgeSize;r++){var i,n,a=e.layoutEdges[r],s=e.idToIndex[a.sourceId],s=e.layoutNodes[s],o=e.idToIndex[a.targetId],l=(o=e.layoutNodes[o]).positionX-s.positionX,c=o.positionY-s.positionY;0==l&&0==c||(i=Rle(s,l,c),c=(l=Rle(o,-1*l,-1*c)).x-i.x,l=l.y-i.y,i=Math.sqrt(c*c+l*l),a=Math.pow(a.idealLength-i,2)/a.elasticity,c=0!==i?(n=a*c/i,a*l/i):n=0,s.isLocked||(s.offsetX+=n,s.offsetY+=c),o.isLocked)||(o.offsetX-=n,o.offsetY-=c)}},"calculateEdgeForces"),Nle=mt(function(e,t){if(0!==t.gravity)for(var r=0;r<e.graphSet.length;r++)for(var i,n,a=e.graphSet[r],s=a.length,o=0===r?(n=e.clientHeight/2,e.clientWidth/2):(i=e.layoutNodes[e.idToIndex[a[0]]],n=(i=e.layoutNodes[e.idToIndex[i.parentId]]).positionX,i.positionY),l=0;l<s;l++){var c,h,u,d=e.layoutNodes[e.idToIndex[a[l]]];d.isLocked||(h=n-d.positionX,u=o-d.positionY,1<(c=Math.sqrt(h*h+u*u))&&(h=t.gravity*h/c,u=t.gravity*u/c,d.offsetX+=h,d.offsetY+=u))}},"calculateGravityForces"),Dle=mt(function(e,t){var r=[],i=0,n=-1;for(r.push.apply(r,e.graphSet[0]),n+=e.graphSet[0].length;i<=n;){var a=r[i++],a=e.idToIndex[a],s=(a=e.layoutNodes[a]).children;if(0<s.length&&!a.isLocked){for(var o=a.offsetX,l=a.offsetY,c=0;c<s.length;c++){var h=e.layoutNodes[e.idToIndex[s[c]]];h.offsetX+=o,h.offsetY+=l,r[++n]=s[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),Ile=mt(function(e,t){for(var r=0;r<e.nodeSize;r++)0<(n=e.layoutNodes[r]).children.length&&(n.maxX=void 0,n.minX=void 0,n.maxY=void 0,n.minY=void 0);for(var i,r=0;r<e.nodeSize;r++)0<(n=e.layoutNodes[r]).children.length||n.isLocked||(i=Mle(n.offsetX,n.offsetY,e.temperature),n.positionX+=i.x,n.positionY+=i.y,n.offsetX=0,n.offsetY=0,n.minX=n.positionX-n.width,n.maxX=n.positionX+n.width,n.minY=n.positionY-n.height,n.maxY=n.positionY+n.height,Ole(n,e));for(var n,r=0;r<e.nodeSize;r++)0<(n=e.layoutNodes[r]).children.length&&!n.isLocked&&(n.positionX=(n.maxX+n.minX)/2,n.positionY=(n.maxY+n.minY)/2,n.width=n.maxX-n.minX,n.height=n.maxY-n.minY)},"updatePositions"),Mle=mt(function(e,t,r){var i=Math.sqrt(e*e+t*t);return r<i?{x:r*e/i,y:r*t/i}:{x:e,y:t}},"limitForce"),Ole=mt(function(e,t){if(null!=(r=e.parentId)){var r,i=!1;if((null==(r=t.layoutNodes[t.idToIndex[r]]).maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i)return Ole(r,t)}},"updateAncestryBoundaries"),Ple=mt(function(e,t){for(var r=e.layoutNodes,i=[],n=0;n<r.length;n++){var a=r[n],s=a.cmptId;(i[s]=i[s]||[]).push(a)}for(var o=0,n=0;n<i.length;n++)if(h=i[n]){h.x1=1/0,h.x2=-1/0,h.y1=1/0,h.y2=-1/0;for(var l=0;l<h.length;l++){var c=h[l];h.x1=Math.min(h.x1,c.positionX-c.width/2),h.x2=Math.max(h.x2,c.positionX+c.width/2),h.y1=Math.min(h.y1,c.positionY-c.height/2),h.y2=Math.max(h.y2,c.positionY+c.height/2)}h.w=h.x2-h.x1,h.h=h.y2-h.y1,o+=h.w*h.h}i.sort(function(e,t){return t.w*t.h-e.w*e.h});for(var h,u=0,d=0,p=0,g=0,f=Math.sqrt(o)*e.clientWidth/e.clientHeight,n=0;n<i.length;n++)if(h=i[n]){for(l=0;l<h.length;l++)(c=h[l]).isLocked||(c.positionX+=u-h.x1,c.positionY+=d-h.y1);u+=h.w+t.componentSpacing,p+=h.w+t.componentSpacing,g=Math.max(g,h.h),f<p&&(d+=g+t.componentSpacing,g=p=u=0)}},"separateComponents"),$le={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:mt(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(aJ,"GridLayout"),aJ.prototype.run=function(){var e=t=this.options,t=t.cy,r=(c=e.eles).nodes().not(":parent"),n=(e.sort&&(r=r.sort(e.sort)),eie(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}));if(0===n.h||0===n.w)c.nodes().layoutPositions(this,e,function(e){return{x:n.x1,y:n.y1}});else{var i=r.size(),t=Math.sqrt(i*n.h/n.w),a=Math.round(t),s=Math.round(n.w/n.h*t),o=mt(function(e){if(null==e)return Math.min(a,s);Math.min(a,s)==a?a=e:s=e},"small"),l=mt(function(e){if(null==e)return Math.max(a,s);Math.max(a,s)==a?a=e:s=e},"large"),c=e.rows,t=null!=e.cols?e.cols:e.columns;if(null!=c&&null!=t)a=c,s=t;else if(null!=c&&null==t)a=c,s=Math.ceil(i/a);else if(null==c&&null!=t)s=t,a=Math.ceil(i/s);else if(i<s*a)i<=((c=o())-1)*(t=l())?o(c-1):i<=(t-1)*c&&l(t-1);else for(;s*a<i;){var h=o(),u=l();i<=(u+1)*h?l(u+1):o(h+1)}var d=n.w/s,p=n.h/a;if(e.condense&&(p=d=0),e.avoidOverlap)for(var g=0;g<r.length;g++){null!=(f=(m=r[g])._private.position).x&&null!=f.y||(f.x=0,f.y=0);var f=m.layoutDimensions(e),m=e.avoidOverlapPadding,y=f.w+m,f=f.h+m,d=Math.max(d,y),p=Math.max(p,f)}for(var v={},b=mt(function(e,t){return!!v["c-"+e+"-"+t]},"used"),x=mt(function(e,t){v["c-"+e+"-"+t]=!0},"use"),w=0,T=0,k=mt(function(){s<=++T&&(T=0,w++)},"moveToNextCell"),C={},S=0;S<r.length;S++){var E=r[S],_=e.position(E);if(_&&(void 0!==_.row||void 0!==_.col)){var A={row:_.row,col:_.col};if(void 0===A.col)for(A.col=0;b(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;b(A.row,A.col);)A.row++;C[E.id()]=A,x(A.row,A.col)}}c=mt(function(e,t){var r,i;if(e.locked()||e.isParent())return!1;if(e=C[e.id()])r=e.col*d+d/2+n.x1,i=e.row*p+p/2+n.y1;else{for(;b(w,T);)k();r=T*d+d/2+n.x1,i=w*p+p/2+n.y1,x(w,T),k()}return{x:r,y:i}},"getPos"),r.layoutPositions(this,e,c)}return this},Ble={ready:mt(function(){},"ready"),stop:mt(function(){},"stop")},mt(sJ,"NullLayout"),sJ.prototype.run=function(){var e=this.options,t=e.eles;return this.emit("layoutstart"),t.nodes().positions(function(){return{x:0,y:0}}),this.one("layoutready",e.ready),this.emit("layoutready"),this.one("layoutstop",e.stop),this.emit("layoutstop"),this},Fle={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(sJ.prototype.stop=function(){return this}),animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(oJ,"PresetLayout"),zle={fit:!0,padding:30,boundingBox:void 0,animate:!(oJ.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=Cee(t.positions);function i(e){return null==t.positions?Ore(e.position()):r?t.positions(e):t.positions[e._private.data.id]??null}return mt(i,"getPosition"),e.layoutPositions(this,t,function(e,t){var r=i(e);return!e.locked()&&null!=r&&r}),this}),animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(lJ,"RandomLayout"),lJ.prototype.run=function(){var e=this.options,t=e.cy,r=e.eles,i=eie(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),t=mt(function(e,t){return{x:i.x1+Math.round(Math.random()*i.w),y:i.y1+Math.round(Math.random()*i.h)}},"getPos");return r.nodes().layoutPositions(this,e,t),this},qle=[{name:"breadthfirst",impl:tJ},{name:"circle",impl:rJ},{name:"concentric",impl:iJ},{name:"cose",impl:nJ},{name:"grid",impl:aJ},{name:"null",impl:sJ},{name:"preset",impl:oJ},{name:"random",impl:lJ}],mt(cJ,"NullRenderer"),ghe=mt(function(){},"noop"),kce=mt(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),cJ.prototype={recalculateRenderedStyle:ghe,notify:mt(function(){this.notifications++},"notify"),init:ghe,isHeadless:mt(function(){return!0},"isHeadless"),png:kce,jpg:kce},Bce={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},o=this,i=mt(function(e,t,r,i,n,a,s){return n.x-r/2-s<=e&&e<=n.x+r/2+s&&n.y-r/2-s<=t&&t<=n.y+r/2+s},"bbCollide"),l=mt(function(e,t,r,i,n){var a=e*Math.cos(i)-t*Math.sin(i),e=e*Math.sin(i)+t*Math.cos(i);return{x:a*r+n.x,y:e*r+n.y}},"transform"),c=mt(function(e,t,r,i){for(var n=[],a=0;a<e.length;a+=2)n.push(l(e[a],e[a+1],t,r,i));return n},"transformPoints"),h=mt(function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];t.push(i.x,i.y)}return t},"pointsToArr"),n=mt(function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},"standardGap"),e=mt(function(e,t){kee(t)&&(t=r[t]),r[e]=Kee({name:e,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:mt(function(e,t,r,i,n,a){return r=h(c(this.points,r+2*a,i,n)),xie(e,t,r)},"collide"),roughCollide:i,draw:mt(function(e,t,r,i){t=c(this.points,t,r,i),o.arrowShapeImpl("polygon")(e,t)},"draw"),spacing:mt(function(e){return 0},"spacing"),gap:n},t)},"defineArrowShape");e("none",{collide:rre,roughCollide:rre,draw:nre,spacing:ire,gap:ire}),e("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),e("arrow","triangle"),e("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:i,draw:mt(function(e,t,r,i,n){var a=c(this.points,t,r,i),s=this.controlPoint,s=l(s[0],s[1],t,r,i);o.arrowShapeImpl(this.name)(e,a,s)},"draw"),gap:mt(function(e){return.8*n(e)},"gap")}),e("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:mt(function(e,t,r,i,n,a,s){var o=h(c(this.points,r+2*s,i,n)),r=h(c(this.pointsTee,r+2*s,i,n));return xie(e,t,o)||xie(e,t,r)},"collide"),draw:mt(function(e,t,r,i,n){var a=c(this.points,t,r,i),t=c(this.pointsTee,t,r,i);o.arrowShapeImpl(this.name)(e,a,t)},"draw")}),e("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:mt(function(e,t,r,i,n,a,s){var o=n,o=Math.pow(o.x-e,2)+Math.pow(o.y-t,2)<=Math.pow((r+2*s)*this.radius,2),r=h(c(this.points,r+2*s,i,n));return xie(e,t,r)||o},"collide"),draw:mt(function(e,t,r,i,n){r=c(this.pointsTr,t,r,i),o.arrowShapeImpl(this.name)(e,r,i.x,i.y,this.radius*t)},"draw"),spacing:mt(function(e){return o.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius},"spacing")}),e("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:mt(function(e,t){var r=this.baseCrossLinePts.slice(),t=t/e;return r[3]=r[3]-t,r[5]=r[5]-t,r},"crossLinePts"),collide:mt(function(e,t,r,i,n,a,s){var o=h(c(this.points,r+2*s,i,n)),a=h(c(this.crossLinePts(r,a),r+2*s,i,n));return xie(e,t,o)||xie(e,t,a)},"collide"),draw:mt(function(e,t,r,i,n){var a=c(this.points,t,r,i),n=c(this.crossLinePts(t,n),t,r,i);o.arrowShapeImpl(this.name)(e,a,n)},"draw")}),e("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:mt(function(e){return.525*n(e)},"gap")}),e("circle",{radius:.15,collide:mt(function(e,t,r,i,n,a,s){return Math.pow(n.x-e,2)+Math.pow(n.y-t,2)<=Math.pow((r+2*s)*this.radius,2)},"collide"),draw:mt(function(e,t,r,i,n){o.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*t)},"draw"),spacing:mt(function(e){return o.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius},"spacing")}),e("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:mt(function(e){return 1},"spacing"),gap:mt(function(e){return 1},"gap")}),e("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),e("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:mt(function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value},"gap")}),e("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:mt(function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value},"gap")})}},Sce={projectIntoViewport:function(e,t){var r=this.cy,i=(a=this.findContainerClientCoords())[0],n=a[1],a=a[4],s=r.pan(),r=r.zoom();return[((e-i)/a-s.x)/r,((t-n)/a-s.y)/r]},findContainerClientCoords:function(){var t,e,r,i,n,a,s,o,l,c,h;return this.containerBB||(h=(o=this.container).getBoundingClientRect(),t=this.cy.window().getComputedStyle(o),e=(s=mt(function(e){return parseFloat(t.getPropertyValue(e))},"styleValue"))("padding-left"),r=s("padding-right"),i=s("padding-top"),n=s("padding-bottom"),c=s("border-left-width"),l=s("border-right-width"),a=s("border-top-width"),s("border-bottom-width"),s=o.clientWidth,o=o.clientHeight,l=h.width/(s+(c+l)),c=h.left+e+c,h=h.top+i+a,this.containerBB=[c,h,s-(e+r),o-(i+n),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,r,i){return this.findNearestElements(e,t,r,i)[0]},findNearestElements:function(y,v,e,t){var i,n,b=this,x=this,r=x.getCachedZSortedEles(),w=[],a=x.cy.zoom(),T=x.cy.hasCompoundNodes(),k=(t?24:8)/a,l=(t?8:2)/a,g=(t?8:2)/a,s=1/0;function C(e,t){if(e.isNode()){if(n)return;n=e,w.push(e)}if(e.isEdge()&&(null==t||t<s))if(i){if(i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var r=0;r<w.length;r++)if(w[r].isEdge()){w[r]=e,i=e,s=t??s;break}}else w.push(e),i=e,s=t??s}function S(e){var t=e.outerWidth()+2*l,r=e.outerHeight()+2*l,i=t/2,n=r/2,a=e.position(),s="auto"===e.pstyle("corner-radius").value?"auto":e.pstyle("corner-radius").pfValue,o=e._private.rscratch;if(a.x-i<=y&&y<=a.x+i&&a.y-n<=v&&v<=a.y+n&&x.nodeShapes[b.getNodeShape(e)].checkPoint(y,v,0,t,r,a.x,a.y,s,o))return C(e,0),!0}function o(e){var t,r=e._private,i=r.rscratch,n=e.pstyle("width").pfValue,a=e.pstyle("arrow-scale").value,s=(l=n/2+k)*l,o=2*l,l=r.source,c=r.target;if("segments"===i.edgeType||"straight"===i.edgeType||"haystack"===i.edgeType){for(var h=i.allpts,u=0;u+3<h.length;u+=2)if(gie(y,v,h[u],h[u+1],h[u+2],h[u+3],o)&&s>(t=bie(y,v,h[u],h[u+1],h[u+2],h[u+3])))return C(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<i.allpts.length;u+=4)if(fie(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],o)&&s>(t=vie(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return C(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<p.length;u++){var g=p[u],f=x.arrowShapes[e.pstyle(g.name+"-arrow-shape").value],m=e.pstyle("width").pfValue;if(f.roughCollide(y,v,d,g.angle,{x:g.x,y:g.y},m,k)&&f.collide(y,v,d,g.angle,{x:g.x,y:g.y},m,k))return C(e),!0}T&&0<w.length&&(S(l),S(c))}function f(e,t,r){return yre(e,t,r)}function c(e,t){var r=e._private,i=g,n=t?t+"-":"",a=(e.boundingBox(),r.labelBounds[t||"main"]),s=e.pstyle(n+"label").value;if("yes"===e.pstyle("text-events").strValue&&s){var o=f(r.rscratch,"labelX",t),l=f(r.rscratch,"labelY",t),s=f(r.rscratch,"labelAngle",t),r=e.pstyle(n+"text-margin-x").pfValue,t=e.pstyle(n+"text-margin-y").pfValue,n=a.x1-i-r,c=a.x2+i-r,h=a.y1-i-t,i=a.y2+i-t;if(s){var u=Math.cos(s),d=Math.sin(s),p=(s=mt(function(e,t){return{x:(e-=o)*u-(t-=l)*d+o,y:e*d+t*u+l}},"rotate"))(n,h),n=s(n,i),h=s(c,h),s=s(c,i),c=[p.x+r,p.y+t,h.x+r,h.y+t,s.x+r,s.y+t,n.x+r,n.y+t];if(xie(y,v,c))return C(e),!0}else if(cie(a,y,v))return C(e),!0}}e&&(r=r.interactive),mt(C,"addEle"),mt(S,"checkNode"),mt(o,"checkEdge"),mt(f,"preprop"),mt(c,"checkLabel");for(var h=r.length-1;0<=h;h--){var u=r[h];u.isNode()?S(u)||c(u):o(u)||c(u)||c(u,"source")||c(u,"target")}return w},getAllInBox:function(e,t,r,i){var n=this.getCachedZSortedEles().interactive,u=2/this.cy.zoom(),a=[],s=Math.min(e,r),o=Math.max(e,r),l=Math.min(t,i),c=Math.max(t,i),h=eie({x1:e=s,y1:t=l,x2:r=o,y2:i=c}),d=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[d[0],d[1]],[d[1],d[2]],[d[2],d[3]],[d[3],d[0]]];function g(e,t,r){return yre(e,t,r)}function f(e,t){var r,i,n,a,s,o,l=e._private,c=u,h=(e.boundingBox(),l.labelBounds.main);return h?(r=g(l.rscratch,"labelX",t),i=g(l.rscratch,"labelY",t),l=g(l.rscratch,"labelAngle",t),t=e.pstyle("text-margin-x").pfValue,e=e.pstyle("text-margin-y").pfValue,n=h.x1-c-t,t=h.x2+c-t,a=h.y1-c-e,h=h.y2+c-e,l?(s=Math.cos(l),o=Math.sin(l),[(c=mt(function(e,t){return{x:(e-=r)*s-(t-=i)*o+r,y:e*o+t*s+i}},"rotate"))(n,a),c(t,a),c(t,h),c(n,h)]):[{x:n,y:a},{x:t,y:a},{x:t,y:h},{x:n,y:h}]):null}function m(e,t,r,i){function n(e,t,r){return(r.y-e.y)*(t.x-e.x)>(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;y<n.length;y++){var v=n[y];if(v.isNode()){var b=v,x="yes"===b.pstyle("text-events").strValue,w=b.pstyle("box-selection").strValue,T="yes"===b.pstyle("box-select-labels").strValue;"none"!==w&&(S=b.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:("overlap"===w||T)&&x}),"contain"===w?(C=!1,T&&x&&(T=f(b))&&RZ(T,d)&&(a.push(b),C=!0),!C&&uie(h,S)&&a.push(b)):"overlap"===w&&lie(h,S)&&(RZ([{x:(x=b.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1})).x1,y:x.y1},{x:x.x2,y:x.y1},{x:x.x2,y:x.y2},{x:x.x1,y:x.y2}],d)||(T=f(b))&&RZ(T,d))&&a.push(b))}else{var k=v,C=k._private,w=C.rscratch,S=k.pstyle("box-selection").strValue;if("none"!==S)if("contain"===S){if((null==w.startX||null==w.startY||cie(h,w.startX,w.startY))&&(null==w.endX||null==w.endY||cie(h,w.endX,w.endY)))if("bezier"===w.edgeType||"multibezier"===w.edgeType||"self"===w.edgeType||"compound"===w.edgeType||"segments"===w.edgeType||"haystack"===w.edgeType){for(var E=C.rstyle.bezierPts||C.rstyle.linePts||C.rstyle.haystackPts,_=!0,A=0;A<E.length;A++)if(!hie(h,E[A])){_=!1;break}_&&a.push(k)}else"straight"===w.edgeType&&a.push(k)}else if("overlap"===S){var R=!1;if(null!=w.startX&&null!=w.startY&&null!=w.endX&&null!=w.endY&&(cie(h,w.startX,w.startY)||cie(h,w.endX,w.endY)))a.push(k),R=!0;else if(!R&&"haystack"===w.edgeType)for(var L=C.rstyle.haystackPts,N=0;N<L.length;N++)if(hie(h,L[N])){a.push(k),R=!0;break}if(!R){var D=C.rstyle.bezierPts||C.rstyle.linePts||C.rstyle.haystackPts;if((D=(!D||D.length<2)&&"straight"===w.edgeType&&null!=w.startX&&null!=w.startY&&null!=w.endX&&null!=w.endY?[{x:w.startX,y:w.startY},{x:w.endX,y:w.endY}]:D)&&!(D.length<2))for(var I=0;I<D.length-1;I++){for(var P=D[I],$=D[I+1],M=0;M<p.length;M++){var O=rZ(p[M],2);if(m(P,$,O[0],O[1])){a.push(k),R=!0;break}}if(R)break}}}}}return a}},(Dce={calculateArrowAngles:function(e){var t,r,i,n,a,s,o,l,c,h,u,d,p,g,f="haystack"===(e=e._private.rscratch).edgeType,m="bezier"===e.edgeType,y="multibezier"===e.edgeType,v="segments"===e.edgeType,b="compound"===e.edgeType,x="self"===e.edgeType,w=f?(d=e.haystackPts[0],g=e.haystackPts[1],t=e.haystackPts[2],e.haystackPts[3]):(d=e.arrowStartX,g=e.arrowStartY,t=e.arrowEndX,e.arrowEndY),T=(T=e.midX,k=e.midY,i=v?(r=d-e.segpts[0],g-e.segpts[1]):y||b||x||m?(p=e.allpts,r=d-Kre(p[0],p[2],p[4],.1),g-Kre(p[1],p[3],p[5],.1)):(r=d-T,g-k),e.srcArrowAngle=jre(r,i),e.midX),k=e.midY;f&&(T=(d+t)/2,k=(g+w)/2),r=t-d,i=w-g,v?i=(p=e.allpts).length/2%2==0?(n=(u=p.length/2)-2,r=p[u]-p[n],p[u+1]-p[n+1]):e.isRound?(r=e.midVector[1],-e.midVector[0]):(n=(u=p.length/2-1)-2,r=p[u]-p[n],p[u+1]-p[n+1]):(y||b||x)&&(p=e.allpts,f=e.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=Kre(p[c],p[l],p[h],0),s=Kre(p[c+1],p[l+1],p[h+1],0),o=Kre(p[c],p[l],p[h],1e-4),Kre(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=Kre(p[c=l-2],p[l],p[h],.4999),s=Kre(p[c+1],p[l+1],p[h+1],.4999),o=Kre(p[c],p[l],p[h],.5),Kre(p[c+1],p[l+1],p[h+1],.5)),r=o-a,i=f-s),e.midtgtArrowAngle=jre(r,i),e.midDispX=r,e.midDispY=i,r*=-1,i*=-1,v&&(p=e.allpts).length/2%2!=0&&!e.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),i=-(p[d+1]-p[u+1])),e.midsrcArrowAngle=jre(r,i),i=v?(r=t-e.segpts[e.segpts.length-2],w-e.segpts[e.segpts.length-1]):y||b||x||m?(g=(p=e.allpts).length,r=t-Kre(p[g-6],p[g-4],p[g-2],.9),w-Kre(p[g-5],p[g-3],p[g-1],.9)):(r=t-T,w-k),e.tgtArrowAngle=jre(r,i)}}).getArrowWidth=Dce.getArrowHeight=function(e,t){var r,i=this.arrowWidthCache=this.arrowWidthCache||{};return i[e+", "+t]||(r=Math.max(Math.pow(13.37*e,.9),29)*t,i[e+", "+t]=r)},jle={},Wle={},nce=mt(function(e,t,r){r.x=t.x-e.x,r.y=t.y-e.y,r.len=Math.sqrt(r.x*r.x+r.y*r.y),r.nx=r.x/r.len,r.ny=r.y/r.len,r.ang=Math.atan2(r.ny,r.nx)},"asVec"),ace=mt(function(e,t){t.x=-1*e.x,t.y=-1*e.y,t.nx=-1*e.nx,t.ny=-1*e.ny,t.ang=0<e.ang?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),sce=mt(function(e,t,r,i,n){e!==ice?nce(t,e,jle):ace(Wle,jle),nce(t,r,Wle),Qle=jle.nx*Wle.ny-jle.ny*Wle.nx,Hle=jle.nx*Wle.nx-jle.ny*-Wle.ny,Qle=Math.asin(Math.max(-1,Math.min(1,Qle))),Math.abs(Qle)<1e-6?(Ule=t.x,Gle=t.y,Xle=Zle=0):(Vle=!(Yle=1),Hle<0?Qle<0?Qle=Math.PI+Qle:(Qle=Math.PI-Qle,Yle=-1,Vle=!0):0<Qle&&(Yle=-1,Vle=!0),Zle=void 0!==t.radius?t.radius:i,Hle=Qle/2,Qle=Math.min(jle.len/2,Wle.len/2),Xle=n?(Kle=Math.abs(Math.cos(Hle)*Zle/Math.sin(Hle)),Qle<Kle?(Kle=Qle,Math.abs(Kle*Math.sin(Hle)/Math.cos(Hle))):Zle):(Kle=Math.min(Qle,Zle),Math.abs(Kle*Math.sin(Hle)/Math.cos(Hle))),tce=t.x+Wle.nx*Kle,rce=t.y+Wle.ny*Kle,Ule=tce-Wle.ny*Xle*Yle,Gle=rce+Wle.nx*Xle*Yle,Jle=t.x+jle.nx*Kle,ece=t.y+jle.ny*Kle,ice=t)},"calcCornerArc"),mt(hJ,"drawPreparedRoundCorner"),mt(uJ,"getRoundCorner"),oce=Math.sqrt(.02),Ice={findMidptPtsEtc:function(e,t){var r,i,n,a,s,o,l=t.posPts,c=t.intersectionPts,h=t.vectorNormInverse,u=e.pstyle("source-endpoint"),d=e.pstyle("target-endpoint"),p=null!=u.units&&null!=d.units,g=mt(function(e,t,r,i){return i-=t,t=r-e,{x:-i/(r=Math.sqrt(t*t+i*i)),y:t/r}},"recalcVectorNormInverse");switch(e.pstyle("edge-distances").value){case"node-position":o=l;break;case"intersection":o=c;break;case"endpoints":o=p?(s={x1:r=(i=rZ(this.manualEndptToPx(e.source()[0],u),2))[0],y1:i=i[1],x2:n=(a=rZ(this.manualEndptToPx(e.target()[0],d),2))[0],y2:a=a[1]},h=g(r,i,n,a),s):(ore("Edge ".concat(e.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),c)}return{midptPts:o,vectorNormInverse:h}},findHaystackPoints:function(e){for(var t=0;t<e.length;t++){var r=e[t],i=(a=r._private).rscratch,n=(i.haystack||(n=2*Math.random()*Math.PI,i.source={x:Math.cos(n),y:Math.sin(n)},n=2*Math.random()*Math.PI,i.target={x:Math.cos(n),y:Math.sin(n)}),a.source),a=a.target,s=n.position(),o=a.position(),l=n.width(),c=a.width(),h=n.height(),a=a.height(),u=r.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*l*u+s.x,i.source.y*h*u+s.y,i.target.x*c*u+o.x,i.target.y*a*u+o.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},findSegmentsPoints:function(e,t){var r=e._private.rscratch,i=e.pstyle("segment-weights"),n=e.pstyle("segment-distances"),a=e.pstyle("segment-radii"),s=e.pstyle("radius-type"),o=Math.min(i.pfValue.length,n.pfValue.length),l=a.pfValue[a.pfValue.length-1],c=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<o;h++){var u=i.pfValue[h],d=n.pfValue[h],p=1-u,g=this.findMidptPtsEtc(e,t),f=g.midptPts,m=f.x1*p+f.x2*u;r.segpts.push(m+(g=g.vectorNormInverse).x*d,f.y1*p+f.y2*u+g.y*d),r.radii.push(void 0!==a.pfValue[h]?a.pfValue[h]:l),r.isArcRadius.push("arc-radius"===(void 0!==s.pfValue[h]?s.pfValue[h]:c))}},findLoopPoints:function(e,t,r,i){var n=e._private.rscratch,a=t.dirCounts,t=t.srcPos,s=(s=e.pstyle("control-point-distances"))?s.pfValue[0]:void 0,o=e.pstyle("loop-direction").pfValue,l=e.pstyle("loop-sweep").pfValue,e=e.pstyle("control-point-step-size").pfValue;n.edgeType="self",i&&(r=0,e=s),s=(i=o-Math.PI/2)-l/2,i+=l/2,r=void 0===a[o=o+"_"+l]?a[o]=0:++a[o],n.ctrlpts=[t.x+1.4*Math.cos(s)*e*(r/3+1),t.y+1.4*Math.sin(s)*e*(r/3+1),t.x+1.4*Math.cos(i)*e*(r/3+1),t.y+1.4*Math.sin(i)*e*(r/3+1)]},findCompoundLoopPoints:function(e,t,r,i){var n=e._private.rscratch,a=(n.edgeType="compound",t.srcPos),s=t.tgtPos,o=t.srcW,l=t.srcH,c=t.tgtW,t=t.tgtH,h=e.pstyle("control-point-step-size").pfValue,e=(e=e.pstyle("control-point-distances"))?e.pfValue[0]:void 0,i=(i&&(r=0,h=e),{x:a.x-o/2,y:a.y-l/2}),e={x:s.x-c/2,y:s.y-t/2},a={x:Math.min(i.x,e.x),y:Math.min(i.y,e.y)},l=Math.max(.5,Math.log(.01*o)),s=Math.max(.5,Math.log(.01*c));n.ctrlpts=[a.x,a.y-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*l,a.x-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*s,a.y]},findStraightEdgePoints:function(e){e._private.rscratch.edgeType="straight"},findBezierPoints:function(e,t,r,i,n){var a=e._private.rscratch,s=e.pstyle("control-point-step-size").pfValue,o=e.pstyle("control-point-distances"),l=e.pstyle("control-point-weights"),c=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,u=l.value[0],d=i;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var g=(.5-t.eles.length/2+r)*s*(n?-1:1),f=Yre(g),f=(d&&(h=o?o.pfValue[p]:s,u=l.value[p]),void 0!==(m=i?h:void 0!==h?f*h:void 0)?m:g),m=1-u,g=u,y=this.findMidptPtsEtc(e,t),v=y.midptPts,b=v.x1*m+v.x2*g;a.ctrlpts.push(b+(y=y.vectorNormInverse).x*f,v.y1*m+v.y2*g+y.y*f)}},findTaxiPoints:function(e,t){var r=e._private.rscratch,i=(r.edgeType="segments","vertical"),n="horizontal",a=t.posPts,s=t.srcW,o=t.srcH,l=t.tgtW,t=t.tgtH,c="node-position"!==e.pstyle("edge-distances").value,h=e.pstyle("taxi-direction").value,u=h,d=e.pstyle("taxi-turn"),p="%"===d.units,g=(d=d.pfValue)<0,f=e.pstyle("taxi-turn-min-distance").pfValue,m=c?(s+l)/2:0,y=c?(o+t)/2:0,v=a.x2-a.x1,b=a.y2-a.y1,m=(x=mt(function(e,t){return 0<e?Math.max(e-t,0):Math.min(e+t,0)},"subDWH"))(v,m),x=x(b,y),y=!1,w=("auto"===u?h=Math.abs(m)>Math.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=Yre(h=n?b:v),x=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0<h||"leftward"===u&&0<h||"rightward"===u&&h<0)||(w=(i*=-1)*Math.abs(w),x=!0),m=p?(d<0?1+d:d)*w:(d<0?w:0)+d*i,g=(y=mt(function(e){return Math.abs(e)<f||Math.abs(e)>=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-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,w,T,k,C=e._private.rscratch;"bezier"===C.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(C.startX)||!he(C.startY),f=!he(C.arrowStartX)||!he(C.arrowStartY),c=!he(C.endX)||!he(C.endY),h=!he(C.arrowEndX)||!he(C.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=(w=Vre({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.startX,y:C.startY}))<u,p=(d=Vre({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.endX,y:C.endY}))<u,g=!1,(y||f||x)&&(g=!0,y=C.ctrlpts[0]-m.x,f=C.ctrlpts[1]-m.y,T=y/(y=Math.sqrt(y*y+f*f)),f/=y,y=Math.max(i,n),y={x:C.ctrlpts[0]+2*T*y,y:C.ctrlpts[1]+2*f*y},k=k.intersectLine(m.x,m.y,i,n,y.x,y.y,0,v,b),x?(C.ctrlpts[0]=C.ctrlpts[0]+T*(u-w),C.ctrlpts[1]=C.ctrlpts[1]+f*(u-w)):(C.ctrlpts[0]=k[0]+T*u,C.ctrlpts[1]=k[1]+f*u)),(c||h||p)&&(g=!0,m=C.ctrlpts[0]-r.x,y=C.ctrlpts[1]-r.y,b=m/(v=Math.sqrt(m*m+y*y)),x=y/v,w=Math.max(i,n),T={x:C.ctrlpts[0]+2*b*w,y:C.ctrlpts[1]+2*x*w},k=o.intersectLine(r.x,r.y,a,s,T.x,T.y,0,l,t),p?(C.ctrlpts[0]=C.ctrlpts[0]+b*(u-d),C.ctrlpts[1]=C.ctrlpts[1]+x*(u-d)):(C.ctrlpts[0]=k[0]+b*u,C.ctrlpts[1]=k[1]+x*u)),g)&&this.findEndpoints(e)},storeAllpts:function(e){var t,r,i,n,a=e._private.rscratch;if("multibezier"===a.edgeType||"bezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType){a.allpts=[],a.allpts.push(a.startX,a.startY);for(var s,o=0;o+1<a.ctrlpts.length;o+=2)a.allpts.push(a.ctrlpts[o],a.ctrlpts[o+1]),o+3<a.ctrlpts.length&&a.allpts.push((a.ctrlpts[o]+a.ctrlpts[o+2])/2,(a.ctrlpts[o+1]+a.ctrlpts[o+3])/2);a.allpts.push(a.endX,a.endY),a.ctrlpts.length/2%2==0?(s=a.allpts.length/2-1,a.midX=a.allpts[s],a.midY=a.allpts[s+1]):(s=a.allpts.length/2-3,a.midX=Kre(a.allpts[s],a.allpts[s+2],a.allpts[s+4],.5),a.midY=Kre(a.allpts[s+1],a.allpts[s+3],a.allpts[s+5],.5))}else if("straight"===a.edgeType)a.allpts=[a.startX,a.startY,a.endX,a.endY],a.midX=(a.startX+a.endX+a.arrowStartX+a.arrowEndX)/4,a.midY=(a.startY+a.endY+a.arrowStartY+a.arrowEndY)/4;else if("segments"===a.edgeType){if(a.allpts=[],a.allpts.push(a.startX,a.startY),a.allpts.push.apply(a.allpts,a.segpts),a.allpts.push(a.endX,a.endY),a.isRound){a.roundCorners=[];for(var l=2;l+3<a.allpts.length;l+=2){var c=a.radii[l/2-1],h=a.isArcRadius[l/2-1];a.roundCorners.push(uJ({x:a.allpts[l-2],y:a.allpts[l-1]},{x:a.allpts[l],y:a.allpts[l+1],radius:c},{x:a.allpts[l+2],y:a.allpts[l+3]},c,h))}}a.segpts.length%4==0?(e=a.segpts.length/2,a.midX=(a.segpts[s=e-2]+a.segpts[e])/2,a.midY=(a.segpts[1+s]+a.segpts[1+e])/2):(s=a.segpts.length/2-1,a.isRound?(e={x:a.segpts[s],y:a.segpts[1+s]},0===(t=a.roundCorners[s/2]).radius?(r=a.segpts[2+s],n=a.segpts[3+s],a.midX=e.x,a.midY=e.y,a.midVector=[e.y-n,r-e.x]):(n=[e.x-t.cx,e.y-t.cy],i=t.radius/Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2)),n=n.map(function(e){return e*i}),a.midX=t.cx+n[0],a.midY=t.cy+n[1],a.midVector=n)):(a.midX=a.segpts[s],a.midY=a.segpts[1+s]))}},checkForInvalidEdgeWarning:function(e){var t=e[0]._private.rscratch;t.nodesOverlap||he(t.startX)&&he(t.startY)&&he(t.endX)&&he(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,ore("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},findEdgeControlPoints:function(e){var I=this;if(e&&0!==e.length){for(var M=this,O=M.cy.hasCompoundNodes(),P=new bre,$=mt(function(e,t){return[].concat(iZ(e),[t?1:0]).join("-")},"getKey"),B=[],t=[],r=0;r<e.length;r++){var i,n,a,s=e[r],o=s._private,l=s.pstyle("curve-style").value;!s.removed()&&s.takesUpSpace()&&("haystack"===l?t.push(s):(i="unbundled-bezier"===l||Yee(l,"segments")||"straight"===l||"straight-triangle"===l||Yee(l,"taxi"),l="unbundled-bezier"===l||"bezier"===l,n=o.source,o=o.target,n=[n.poolIndex(),o.poolIndex()].sort(),o=$(n,i),null==(a=P.get(o))&&(a={eles:[]},B.push({pairId:n,edgeIsUnbundled:i}),P.set(o,a)),a.eles.push(s),i&&(a.hasUnbundled=!0),l&&(a.hasBezier=!0)))}for(var c=mt(function(){var e=B[F],t=e.pairId,t=$(t,e.edgeIsUnbundled),r=P.get(t),i=(r.hasUnbundled||(e=r.eles[0].parallelEdges().filter(function(e){return e.isBundledBezier()}),fre(r.eles),e.forEach(function(e){return r.eles.push(e)}),r.eles.sort(function(e,t){return e.poolIndex()-t.poolIndex()})),(t=r.eles[0]).source()),n=t.target(),a=(i.poolIndex()>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[I.getNodeShape(i)],d=r.tgtShape=M.nodeShapes[I.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<r.eles.length;y++){var v,b,x,w,T,k,C,S,E,_=r.eles[y],A=_[0]._private.rscratch,R=_.pstyle("curve-style").value,L="unbundled-bezier"===R||Yee(R,"segments")||Yee(R,"taxi"),N=!i.same(_.source()),D=(r.calculatedIntersection||i===n||!r.hasBezier&&!r.hasUnbundled||(r.calculatedIntersection=!0,D=u.intersectLine(a.x,a.y,o,l,s.x,s.y,0,p,m),v=r.srcIntn=D,b=d.intersectLine(s.x,s.y,c,h,a.x,a.y,0,g,f),x=r.tgtIntn=b,w=r.intersectionPts={x1:D[0],x2:b[0],y1:D[1],y2:b[1]},T=r.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},S=b[1]-D[1],C=b[0]-D[0],k=Math.sqrt(C*C+S*S),he(k)&&oce<=k||(k=Math.sqrt(Math.max(C*C,.01)+Math.max(S*S,.01))),C=r.vector={x:C,y:S},E={x:-(S=r.vectorNorm={x:C.x/k,y:C.y/k}).y,y:S.x},r.nodesOverlap=!he(k)||d.checkPoint(D[0],D[1],0,c,h,s.x,s.y,g,f)||u.checkPoint(b[0],b[1],0,o,l,a.x,a.y,p,m),r.vectorNormInverse=E,k={nodesOverlap:r.nodesOverlap,dirCounts:r.dirCounts,calculatedIntersection:!0,hasBezier:r.hasBezier,hasUnbundled:r.hasUnbundled,eles:r.eles,srcPos:s,srcRs:f,tgtPos:a,tgtRs:m,srcW:c,srcH:h,tgtW:o,tgtH:l,srcIntn:x,tgtIntn:v,srcShape:d,tgtShape:u,posPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},intersectionPts:{x1:w.x2,y1:w.y2,x2:w.x1,y2:w.y1},vector:{x:-C.x,y:-C.y},vectorNorm:{x:-S.x,y:-S.y},vectorNormInverse:{x:-E.x,y:-E.y}}),N?k:r);A.nodesOverlap=D.nodesOverlap,A.srcIntn=D.srcIntn,A.tgtIntn=D.tgtIntn,A.isRound=R.startsWith("round"),O&&(i.isParent()||i.isChild()||n.isParent()||n.isChild())&&(i.parents().anySame(n)||n.parents().anySame(i)||i.same(n)&&i.isParent())?I.findCompoundLoopPoints(_,D,y,L):i===n?I.findLoopPoints(_,D,y,L):R.endsWith("segments")?I.findSegmentsPoints(_,D):R.endsWith("taxi")?I.findTaxiPoints(_,D):"straight"===R||!L&&r.eles.length%2==1&&y===Math.floor(r.eles.length/2)?I.findStraightEdgePoints(_):I.findBezierPoints(_,D,y,L,N),I.findEndpoints(_),I.tryToCorrectInvalidPoints(_,D),I.checkForInvalidEdgeWarning(_),I.storeAllpts(_),I.storeEdgeProjections(_),I.calculateArrowAngles(_),I.recalculateEdgeLabelProjections(_),I.calculateLabelAngles(_)}},"_loop"),F=0;F<B.length;F++)c();this.findHaystackPoints(t)}}},mt(dJ,"getPts"),Ice.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"segments"===t.edgeType)return dJ(t.segpts)},Ice.getControlPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"bezier"===(e=t.edgeType)||"multibezier"===e||"self"===e||"compound"===e)return dJ(t.ctrlpts)},Ice.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}},Mce={manualEndptToPx:function(e,t){var r,i=e.position(),n=e.outerWidth(),a=e.outerHeight(),s=e._private.rscratch;return 2===t.value.length?(r=[t.pfValue[0],t.pfValue[1]],"%"===t.units[0]&&(r[0]=r[0]*n),"%"===t.units[1]&&(r[1]=r[1]*a),r[0]+=i.x,r[1]+=i.y,r):(r=t.pfValue[0],r=-Math.PI/2+r,t=2*Math.max(n,a),r=[i.x+Math.cos(r)*t,i.y+Math.sin(r)*t],this.nodeShapes[this.getNodeShape(e)].intersectLine(i.x,i.y,n,a,r[0],r[1],0,"auto"===e.pstyle("corner-radius").value?"auto":e.pstyle("corner-radius").pfValue,s))},findEndpoints:function(e){var t,r=e.source()[0],i=e.target()[0],n=r.position(),a=i.position(),s=e.pstyle("target-arrow-shape").value,o=e.pstyle("source-arrow-shape").value,l=e.pstyle("target-distance-from-node").pfValue,c=e.pstyle("source-distance-from-node").pfValue,h=r._private.rscratch,u=i._private.rscratch,d=e.pstyle("curve-style").value,p=e._private.rscratch,g=p.edgeType,d=Yee(d,"taxi"),f="self"===g||"compound"===g,m="bezier"===g||"multibezier"===g||f,y="bezier"!==g,v="straight"===g||"segments"===g,g="segments"===g,b=m||y||v,f=f||d,d=e.pstyle("source-endpoint"),x=f?"outside-to-node":d.value,w="auto"===r.pstyle("corner-radius").value?"auto":r.pstyle("corner-radius").pfValue,T=e.pstyle("target-endpoint"),f=f?"outside-to-node":T.value,k="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue;p.srcManEndpt=d;var C,S,E,_,A=null!=(A=2===(null==(p.tgtManEndpt=T)||null==(A=T.pfValue)?void 0:A.length)?T.pfValue:null)?A:[0,0],R=null!=(R=2===(null==d||null==(R=d.pfValue)?void 0:R.length)?d.pfValue:null)?R:[0,0],i=(m?(m=[p.ctrlpts[0],p.ctrlpts[1]],_=y?[p.ctrlpts[p.ctrlpts.length-2],p.ctrlpts[p.ctrlpts.length-1]]:m,S=m):v&&(y=g?p.segpts.slice(0,2):[a.x+A[0],a.y+A[1]],_=g?p.segpts.slice(p.segpts.length-2):[n.x+R[0],n.y+R[1]],S=y),"inside-to-node"===f?t=[a.x,a.y]:T.units?t=this.manualEndptToPx(i,T):"outside-to-line"===f?t=p.tgtIntn:("outside-to-node"===f||"outside-to-node-or-label"===f?E=_:"outside-to-line"!==f&&"outside-to-line-or-label"!==f||(E=[n.x,n.y]),t=this.nodeShapes[this.getNodeShape(i)].intersectLine(a.x,a.y,i.outerWidth(),i.outerHeight(),E[0],E[1],0,k,u),"outside-to-node-or-label"!==f&&"outside-to-line-or-label"!==f||(v=(m=i._private.rscratch).labelWidth,A=m.labelX,g=m.labelY,R=v/2,y=m.labelHeight/2,"top"===(T=i.pstyle("text-valign").value)?g-=y:"bottom"===T&&(g+=y),"left"===(k=i.pstyle("text-halign").value)?A-=R:"right"===k&&(A+=R),0<(u=Nie(E[0],E[1],[A-R,g-y,A+R,g-y,A+R,g+y,A-R,g+y],a.x,a.y)).length&&(v=Hre(f=n,Bre(t)),(m=Hre(f,Bre(u)))<(T=v)&&(t=u,T=m),2<u.length)&&Hre(f,{x:u[2],y:u[3]})<T&&(t=[u[2],u[3]]))),Iie(t,_,this.arrowShapes[s].spacing(e)+l)),k=Iie(t,_,this.arrowShapes[s].gap(e)+l),k=(p.endX=k[0],p.endY=k[1],p.arrowEndX=i[0],p.arrowEndY=i[1],"inside-to-node"===x?t=[n.x,n.y]:d.units?t=this.manualEndptToPx(r,d):"outside-to-line"===x?t=p.srcIntn:("outside-to-node"===x||"outside-to-node-or-label"===x?C=S:"outside-to-line"!==x&&"outside-to-line-or-label"!==x||(C=[a.x,a.y]),t=this.nodeShapes[this.getNodeShape(r)].intersectLine(n.x,n.y,r.outerWidth(),r.outerHeight(),C[0],C[1],0,w,h),"outside-to-node-or-label"!==x&&"outside-to-line-or-label"!==x||(A=(E=r._private.rscratch).labelWidth,R=E.labelX,g=E.labelY,y=A/2,v=E.labelHeight/2,"top"===(m=r.pstyle("text-valign").value)?g-=v:"bottom"===m&&(g+=v),"left"===(f=r.pstyle("text-halign").value)?R-=y:"right"===f&&(R+=y),0<(T=Nie(C[0],C[1],[R-y,g-v,R+y,g-v,R+y,g+v,R-y,g+v],n.x,n.y)).length&&(_=Hre(u=a,Bre(t)),(s=Hre(u,Bre(T)))<(l=_)&&(t=[T[0],T[1]],l=s),2<T.length)&&Hre(u,{x:T[2],y:T[3]})<l&&(t=[T[2],T[3]]))),Iie(t,S,this.arrowShapes[o].spacing(e)+c)),i=Iie(t,S,this.arrowShapes[o].gap(e)+c);p.startX=i[0],p.startY=i[1],p.arrowStartX=k[0],p.arrowStartY=k[1],b&&(he(p.startX)&&he(p.startY)&&he(p.endX)&&he(p.endY)?p.badLine=!1:p.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(e),t.edgeType)?{x:t.arrowStartX,y:t.arrowStartY}:{x:t.haystackPts[0],y:t.haystackPts[1]}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(e),t.edgeType)?{x:t.arrowEndX,y:t.arrowEndY}:{x:t.haystackPts[2],y:t.haystackPts[3]}}},Oce={},mt(pJ,"pushBezierPts"),Oce.storeEdgeProjections=function(e){var t=e._private,r=t.rscratch,i=r.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i){t.rstyle.bezierPts=[];for(var n=0;n+5<r.allpts.length;n+=4)pJ(this,e,r.allpts.slice(n,n+6))}else if("segments"===i)for(var a=t.rstyle.linePts=[],n=0;n+1<r.allpts.length;n+=2)a.push({x:r.allpts[n],y:r.allpts[n+1]});else"haystack"===i&&(i=r.haystackPts,t.rstyle.haystackPts=[{x:i[0],y:i[1]},{x:i[2],y:i[3]}]);t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},Oce.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)},Pce={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!Pee(t)){var r,i,t=e._private,n=e.width(),a=e.height(),s=e.padding(),o=e.position(),l=e.pstyle("text-halign").strValue,c=e.pstyle("text-valign").strValue,h=t.rscratch,t=t.rstyle;switch(l){case"left":r=o.x-n/2-s;break;case"right":r=o.x+n/2+s;break;default:r=o.x}switch(c){case"top":i=o.y-a/2-s;break;case"bottom":i=o.y+a/2+s;break;default:i=o.y}h.labelX=r,h.labelY=i,t.labelX=r,t.labelY=i,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},lce=mt(function(e,t){return t=Math.atan(t/e),0===e&&t<0&&(t*=-1),t},"lineAngleFromDelta"),cce=mt(function(e,t){var r=t.x-e.x;return lce(r,t.y-e.y)},"lineAngle"),hce=mt(function(e,t,r,i){var n=Jre(0,i-.001,1),i=Jre(0,i+.001,1),n=Zre(e,t,r,n),e=Zre(e,t,r,i);return cce(n,e)},"bezierAngle"),Pce.recalculateEdgeLabelProjections=function(C){var S,E,_,e,d=C._private,A=d.rscratch,p=this,R={mid:C.pstyle("label").strValue,source:C.pstyle("source-label").strValue,target:C.pstyle("target-label").strValue};(R.mid||R.source||R.target)&&(S={x:A.midX,y:A.midY},(E=mt(function(e,t,r){vre(d.rscratch,e,t,r),vre(d.rstyle,e,t,r)},"setRs"))("labelX",null,S.x),E("labelY",null,S.y),e=lce(A.midDispX,A.midDispY),E("labelAutoAngle",null,e),_=mt(function(){if(_.cache)return _.cache;for(var e=[],t=0;t+5<A.allpts.length;t+=4){var r={x:A.allpts[t],y:A.allpts[t+1]},i={x:A.allpts[t+2],y:A.allpts[t+3]},n={x:A.allpts[t+4],y:A.allpts[t+5]};e.push({p0:r,p1:i,p2:n,startDist:0,length:0,segments:[]})}var a=d.rstyle.bezierPts,s=p.bezierProjPcts.length;function o(e,t,r,i,n){var a=Vre(t,r),s=e.segments[e.segments.length-1],t={p0:t,p1:r,t0:i,t1:n,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(t),e.length+=a}mt(o,"addSegment");for(var l=0;l<e.length;l++){var c=e[l],h=e[l-1];h&&(c.startDist=h.startDist+h.length),o(c,c.p0,a[l*s],0,p.bezierProjPcts[0]);for(var u=0;u<s-1;u++)o(c,a[l*s+u],a[l*s+u+1],p.bezierProjPcts[u],p.bezierProjPcts[u+1]);o(c,a[l*s+s-1],c.p2,p.bezierProjPcts[s-1],1)}return _.cache=e},"createControlPointInfo"),(e=mt(function(e){var t,r="source"===e;if(R[e]){var i=C.pstyle(e+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var n,a=_(),s=0,o=0,l=0;l<a.length;l++){for(var c=a[r?l:a.length-1-l],h=0;h<c.segments.length;h++){var u=c.segments[r?h:c.segments.length-1-h],d=l===a.length-1&&h===c.segments.length-1,s=o;if(i<=(o+=u.length)||d){n={cp:c,segment:u};break}}if(n)break}var p=n.cp,g=(i-s)/(m=n.segment).length,f=m.t1-m.t0,m=r?m.t0+f*g:m.t1-f*g,m=Jre(0,m,1);S=Zre(p.p0,p.p1,p.p2,m),t=hce(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,b,x,w=0,T=A.allpts.length,k=0;k+3<T&&(x=r?(b={x:A.allpts[k],y:A.allpts[k+1]},{x:A.allpts[k+2],y:A.allpts[k+3]}):(b={x:A.allpts[T-2-k],y:A.allpts[T-1-k]},{x:A.allpts[T-4-k],y:A.allpts[T-3-k]}),v=w,!(i<=(w+=y=Vre(b,x))));k+=2);f=Jre(0,(i-v)/y,1),S=Qre(b,x,f),t=cce(b,x)}E("labelX",e,S.x),E("labelY",e,S.y),E("labelAutoAngle",e,t)}},"calculateEndProjection"))("source"),e("target"),this.applyLabelDimensions(C))},Pce.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Pce.applyPrefixedLabelDimensions=function(e,t){var r,i,n,a=e._private,s=this.getLabelText(e,t),o=Vte(s,e._private.labelDimsKey);yre(a.rscratch,"prefixedLabelDimsKey",t)!==o&&(vre(a.rscratch,"prefixedLabelDimsKey",t,o),o=this.calculateLabelDimensions(e,s),s=e.pstyle("line-height").pfValue,e=e.pstyle("text-wrap").strValue,r=yre(a.rscratch,"labelWrapCachedLines",t)||[],e="wrap"!==e?1:Math.max(r.length,1),i=(r=o.height/e)*s,n=o.width,o=o.height+(e-1)*(s-1)*r,vre(a.rstyle,"labelWidth",t,n),vre(a.rscratch,"labelWidth",t,n),vre(a.rstyle,"labelHeight",t,o),vre(a.rscratch,"labelHeight",t,o),vre(a.rscratch,"labelLineHeight",t,i))},Pce.getLabelText=function(e,r){var i=e._private,t=e.pstyle((r?r+"-":"")+"label").strValue,n=e.pstyle("text-transform").value,a=mt(function(e,t){return t?(vre(i.rscratch,e,r,t),t):yre(i.rscratch,e,r)},"rscratch");if(!t)return"";if("none"!=n&&("uppercase"==n?t=t.toUpperCase():"lowercase"==n&&(t=t.toLowerCase())),"wrap"===(n=e.pstyle("text-wrap").value)){var s=a("labelKey");if(null!=s&&a("labelWrapKey")===s)return a("labelWrapCachedText");for(var o=t.split(`
|
||
`),l=e.pstyle("text-max-width").pfValue,c="anywhere"===e.pstyle("text-overflow-wrap").value,h=[],u=/[\s\u200b]+|$/g,d=0;d<o.length;d++){var p=o[d],g=this.calculateLabelDimensions(e,p).width;if(c&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=KK(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var b=f.value,x=b[0],w=p.substring(y,b.index),y=b.index+x.length,T=0===m.length?w:m+w+x;this.calculateLabelDimensions(e,T).width<=l?m+=w+x:(m&&h.push(m),m=w+x)}}catch(e){v.e(e)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),t=a("labelWrapCachedText",h.join(`
|
||
`)),a("labelWrapKey",s)}else if("ellipsis"===n){var k=e.pstyle("text-max-width").pfValue,C="",S=!1;if(this.calculateLabelDimensions(e,t).width<k)return t;for(var E=0;E<t.length&&!(k<this.calculateLabelDimensions(e,C+t[E]+"…").width);E++)C+=t[E],E===t.length-1&&(S=!0);return S||(C+="…"),C}return t},Pce.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},Pce.calculateLabelDimensions=function(e,t){var r=this.cy.window().document,i=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue,a=e.pstyle("font-family").strValue,e=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,o=this.labelCalcCanvasContext;s||(s=this.labelCalcCanvas=r.createElement("canvas"),o=this.labelCalcCanvasContext=s.getContext("2d"),(r=s.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),o.font="".concat(i," ").concat(e," ").concat(n,"px ").concat(a);for(var l=0,c=0,h=t.split(`
|
||
`),u=0;u<h.length;u++){var d=h[u],d=o.measureText(d),d=Math.ceil(d.width),p=n,l=Math.max(d,l);c+=p}return{width:l+=0,height:c+=0}},Pce.calculateLabelAngle=function(e,t){var r=e._private.rscratch,i=e.isEdge();return"none"===(t=(e=e.pstyle((t?t+"-":"")+"text-rotation")).strValue)?0:i&&"autorotate"===t?r.labelAutoAngle:"autorotate"===t?0:e.pfValue},uce=!(Pce.calculateLabelAngles=function(e){var t=e.isEdge(),r=e._private.rscratch;r.labelAngle=this.calculateLabelAngle(e),t&&(r.sourceLabelAngle=this.calculateLabelAngle(e,"source"),r.targetLabelAngle=this.calculateLabelAngle(e,"target"))}),dce={},[Sce,Dce,Ice,Mce,Oce,Pce,{getNodeShape:function(e){var t=e.pstyle("shape").value;return"cutrectangle"===t&&(e.width()<28||e.height()<28)?(uce||(ore("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),uce=!0),"rectangle"):e.isParent()?"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle":"polygon"===t?(e=e.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(e).name):t}},{registerCalculationListeners:function(){var s=this.cy,o=s.collection(),l=this,c=mt(function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(o.merge(e),t)for(var r=0;r<e.length;r++){var i=e[r]._private.rstyle;i.clean=!1,i.cleanConnected=!1}},"enqueue"),e=(l.binder(s).on("bounds.* dirty.*",mt(function(e){e=e.target,c(e)},"onDirtyBounds")).on("style.* background.*",mt(function(e){e=e.target,c(e,!1)},"onDirtyStyle")),mt(function(e){if(e){var t=l.onUpdateEleCalcsFns;o.cleanStyle();for(var r=0;r<o.length;r++){var i=o[r],n=i._private.rstyle;i.isNode()&&!n.cleanConnected&&(c(i.connectedEdges()),n.cleanConnected=!0)}if(t)for(var a=0;a<t.length;a++)(0,t[a])(e,o);l.recalculateRenderedStyle(o),o=s.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){e(!0)},l.beforeRender(e,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var r=mt(function(e){return e._private.rstyle.cleanConnected},"isCleanConnected");if(0!==e.length){var i=[],n=[];if(!this.destroyed){void 0===t&&(t=!0);for(var a=0;a<e.length;a++){var s=e[a],o=s._private,l=o.rstyle;!s.isEdge()||r(s.source())&&r(s.target())||(l.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(e){return!e._private.rstyle.clean&&e.isBundledBezier()})&&(l.clean=!1),t&&l.clean||s.removed()||"none"===s.pstyle("display").value||(("nodes"===o.group?n:i).push(s),l.clean=!0)}for(var c=0;c<n.length;c++){var h=n[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(i);for(var p=0;p<i.length;p++){var g=i[p]._private,f=g.rstyle;f.srcX=(g=g.rscratch).arrowStartX,f.srcY=g.arrowStartY,f.tgtX=g.arrowEndX,f.tgtY=g.arrowEndY,f.midX=g.midX,f.midY=g.midY,f.labelAngle=g.labelAngle,f.sourceLabelAngle=g.sourceLabelAngle,f.targetLabelAngle=g.targetLabelAngle}}}}},{updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],r=0;r<e.length;r++){var i=(n=e[r])._private.rscratch;(n.grabbed()&&!n.isParent()?t:i.inDragLayer?e.drag:e.nondrag).push(n)}for(r=0;r<t.length;r++){var n=t[r];e.drag.push(n)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){var t;return e||!this.cachedZSortedEles?((t=this.cy.mutableElements().toArray()).sort(Voe),t.interactive=t.filter(function(e){return e.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()):t=this.cachedZSortedEles,t}}].forEach(function(e){Kee(dce,e)}),Hce={getCachedImage:function(e,t,r){var i,n=this.imageCache=this.imageCache||{},a=n[e];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((i=(a=n[e]=n[e]||{}).image=new Image).addEventListener("load",r),i.addEventListener("error",function(){i.error=!0}),"data:"!==e.substring(0,"data:".length).toLowerCase()&&(i.crossOrigin=t="null"===t?null:t),i.src=e,i)}},Zce={registerBinding:function(e,t,r,i){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(e)){for(var a=[],s=0;s<e.length;s++){var o,l=e[s];void 0!==l&&(o=this.binder(l),a.push(o.on.apply(o,n)))}return a}return(o=this.binder(e)).on.apply(o,n)},binder:function(n){var a=this,e=a.cy.window(),s=n===e||n===e.document||n===e.document.body||$ee(n);if(null==a.supportsPassiveEvents){var t=!1;try{var r=Object.defineProperty({},"passive",{get:mt(function(){return t=!0},"get")});e.addEventListener("test",null,r)}catch{}a.supportsPassiveEvents=t}return{on:e=mt(function(e,t,r){var i=Array.prototype.slice.call(arguments);return s&&a.supportsPassiveEvents&&(i[2]={capture:r??!1,passive:!1,once:!1}),a.bindings.push({target:n,args:i}),(n.addEventListener||n.on).apply(n,i),this},"on"),addEventListener:e,addListener:e,bind:e}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var h,u,d,c,N=this,e=N.cy.window(),p=mt(function(e){return e.selected()},"isSelected"),T=mt(function(e){if((e=e.getRootNode())&&11===e.nodeType&&void 0!==e.host)return e},"getShadowRoot"),D=mt(function(e,t,r,i){null==e&&(e=N.cy);for(var n=0;n<t.length;n++)e.emit({originalEvent:r,type:t[n],position:i})},"triggerEvents"),b=mt(function(e){return e.shiftKey||e.metaKey||e.ctrlKey},"isMultSelKeyDown"),W=mt(function(e,t){var r=!0;if(N.cy.hasCompoundNodes()&&e&&e.pannable()){for(var i=0;t&&i<t.length;i++)if((e=t[i]).isNode()&&e.isParent()&&!e.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),k=mt(function(e){e[0]._private.grabbed=!0},"setGrabbed"),C=mt(function(e){e[0]._private.grabbed=!1},"setFreed"),i=mt(function(e){e[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),S=mt(function(e){e[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),E=mt(function(e){e[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),_=mt(function(e){e[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),n=mt(function(e,t){(t=t.addToList).has(e)||!e.grabbable()||e.locked()||(t.merge(e),k(e))},"addToDragList"),A=mt(function(e,t){!e.cy().hasCompoundNodes()||null==t.inDragLayer&&null==t.addToList||(e=e.descendants(),t.inDragLayer&&(e.forEach(i),e.connectedEdges().forEach(i)),t.addToList&&n(e,t))},"addDescendantsToDrag"),I=mt(function(e,t){t=t||{};var r=e.cy().hasCompoundNodes();t.inDragLayer&&(e.forEach(i),e.neighborhood().stdFilter(function(e){return!r||e.isEdge()}).forEach(i)),t.addToList&&e.forEach(function(e){n(e,t)}),A(e,t),L(e,{inDragLayer:t.inDragLayer}),N.updateCachedGrabbedEles()},"addNodesToDrag"),R=I,M=mt(function(e){e&&(N.getCachedZSortedEles().forEach(function(e){C(e),S(e),_(e)}),N.updateCachedGrabbedEles())},"freeDraggedElements"),L=mt(function(e,t){var r;null==t.inDragLayer&&null==t.addToList||!e.cy().hasCompoundNodes()||(r=e.ancestors().orphans()).same(e)||(e=(r=r.descendants().spawnSelf().merge(r).unmerge(e).unmerge(e.descendants())).connectedEdges(),t.inDragLayer&&(e.forEach(i),r.forEach(i)),t.addToList&&r.forEach(function(e){n(e,t)}))},"updateAncestorsInDragLayer"),Y=mt(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),t=typeof MutationObserver<"u",V=typeof ResizeObserver<"u",r=(t?(N.removeObserver=new MutationObserver(function(e){for(var t=0;t<e.length;t++){var r=e[t].removedNodes;if(r)for(var i=0;i<r.length;i++)if(r[i]===N.container){N.destroy();break}}}),N.container.parentNode&&N.removeObserver.observe(N.container.parentNode,{childList:!0})):N.registerBinding(N.container,"DOMNodeRemoved",function(e){N.destroy()}),Mte(function(){N.cy.resize()},100)),t=(t&&(N.styleObserver=new MutationObserver(r),N.styleObserver.observe(N.container,{attributes:!0})),N.registerBinding(e,"resize",r),V&&(N.resizeObserver=new ResizeObserver(r),N.resizeObserver.observe(N.container)),mt(function(e,t){for(;null!=e;)t(e),e=e.parentNode},"forEachUp")),a=mt(function(){N.invalidateContainerClientCoordsCache()},"invalidateCoords"),H=(t(N.container,function(e){N.registerBinding(e,"transitionend",a),N.registerBinding(e,"animationend",a),N.registerBinding(e,"scroll",a)}),N.registerBinding(N.container,"contextmenu",function(e){e.preventDefault()}),mt(function(){return 0!==N.selection[4]},"inBoxSelection")),O=mt(function(e){for(var t=N.findContainerClientCoords(),r=t[0],i=t[1],n=t[2],a=t[3],s=e.touches||[e],o=!1,l=0;l<s.length;l++){var c=s[l];if(r<=c.clientX&&c.clientX<=r+n&&i<=c.clientY&&c.clientY<=i+a){o=!0;break}}if(!o)return!1;for(var h=N.container,u=e.target.parentNode,d=!1;u;){if(u===h){d=!0;break}u=u.parentNode}return!!d},"eventInContainer"),V=(N.registerBinding(N.container,"mousedown",mt(function(t){var e,r,i,n,a,s,o,l,c,h;!O(t)||1===N.hoverData.which&&1!==t.which||(t.preventDefault(),Y(),N.hoverData.capture=!0,N.hoverData.which=t.which,e=N.cy,r=N.projectIntoViewport((o=[t.clientX,t.clientY])[0],o[1]),i=N.selection,a=(n=N.findNearestElements(r[0],r[1],!0,!1))[0],c=N.dragData.possibleDragElements,N.hoverData.mdownPos=r,N.hoverData.mdownGPos=o,s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),o=mt(function(){N.hoverData.tapholdCancelled=!1,clearTimeout(N.hoverData.tapholdTimeout),N.hoverData.tapholdTimeout=setTimeout(function(){N.hoverData.tapholdCancelled||(N.hoverData.down||e).emit(s("taphold"))},N.tapholdDuration)},"checkForTaphold"),3==t.which?(N.hoverData.cxtStarted=!0,l={originalEvent:t,type:"cxttapstart",position:{x:r[0],y:r[1]}},a?(a.activate(),a.emit(l),N.hoverData.down=a):e.emit(l),N.hoverData.downTime=(new Date).getTime(),N.hoverData.cxtDragged=!1):1==t.which&&(a&&a.activate(),null!=a&&N.nodeIsGrabbable(a)&&(l=mt(function(e){e.emit(s("grab"))},"triggerGrab"),E(a),a.selected()?(c=N.dragData.possibleDragElements=e.collection(),h=e.$(function(e){return e.isNode()&&e.selected()&&N.nodeIsGrabbable(e)}),I(h,{addToList:c}),a.emit(s("grabon")),h.forEach(l)):(c=N.dragData.possibleDragElements=e.collection(),R(a,{addToList:c}),a.emit(s("grabon")).emit(s("grab"))),N.redrawHint("eles",!0),N.redrawHint("drag",!0)),N.hoverData.down=a,N.hoverData.downs=n,N.hoverData.downTime=(new Date).getTime(),D(a,["mousedown","tapstart","vmousedown"],t,{x:r[0],y:r[1]}),null==a?(i[4]=1,N.data.bgActivePosistion={x:r[0],y:r[1]},N.redrawHint("select",!0),N.redraw()):a.pannable()&&(i[4]=1),o()),i[0]=i[2]=r[0],i[1]=i[3]=r[1])},"mousedownHandler"),!1),T(N.container)),g=(N.registerBinding([e,V],"mousemove",mt(function(t){if(N.hoverData.capture||O(t)){var e,r,i,n=!1,a=N.cy,s=a.zoom(),o=[t.clientX,t.clientY],l=N.projectIntoViewport(o[0],o[1]),c=N.hoverData.mdownPos,h=N.hoverData.mdownGPos,u=N.selection,d=null,p=(N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.selecting||(d=N.findNearestElement(l[0],l[1],!0,!1)),N.hoverData.last),g=N.hoverData.down,f=[l[0]-u[2],l[1]-u[3]],m=N.dragData.possibleDragElements,h=(h&&(e=o[0]-h[0],o=o[1]-h[1],N.hoverData.isOverThresholdDrag=e=e*e+o*o>=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,D(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&&D(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&D(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||I(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=Bre(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&&(D(l,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(D(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,D(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(h=setTimeout(function(){u||D(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.length&&N.redrawHint("eles",!0),N.dragData.possibleDragElements=n=e.collection()),l!=a||N.dragData.didDrag||N.hoverData.selecting||null==l||!l._private.selectable||(N.hoverData.dragging||("additive"===e.selectionType()||c?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):c||(e.$(p).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),N.redrawHint("eles",!0)),N.hoverData.selecting&&(o=e.collection(N.getAllInBox(i[0],i[1],i[2],i[3])),N.redrawHint("select",!0),0<o.length&&N.redrawHint("eles",!0),e.emit(s("boxend")),l=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),"additive"===e.selectionType()||c||e.$(p).unmerge(o).unselect(),o.emit(s("box")).stdFilter(l).select().emit(s("boxselect")),N.redraw()),N.hoverData.dragging&&(N.hoverData.dragging=!1,N.redrawHint("select",!0),N.redrawHint("eles",!0),N.redraw()),i[4]||(N.redrawHint("drag",!0),N.redrawHint("eles",!0),c=a&&a.grabbed(),M(n),c&&(a.emit(s("freeon")),n.emit(s("free")),N.dragData.didDrag)&&(a.emit(s("dragfreeon")),n.emit(s("dragfree"))))),i[4]=0,N.hoverData.down=null,N.hoverData.cxtStarted=!1,N.hoverData.draggingEles=!1,N.hoverData.selecting=!1,N.hoverData.isOverThresholdDrag=!1,N.dragData.didDrag=!1,N.hoverData.dragged=!1,N.hoverData.dragDelta=[],N.hoverData.mdownPos=null,N.hoverData.mdownGPos=null,N.hoverData.which=null)},"mouseupHandler"),!1),[]),f=1e5,X=mt(function(e,t){for(var r=0;r<e.length;r++)if(e[r]%t!=0)return!1;return!0},"allAreDivisibleBy"),K=mt(function(e){for(var t=Math.abs(e[0]),r=1;r<e.length;r++)if(Math.abs(e[r])!==t)return!1;return!0},"allAreSameMagnitude"),Z=mt(function(e){var t,r,i,n=!1,a=e.deltaY;if(null==a&&(null!=e.wheelDeltaY?a=e.wheelDeltaY/4:null!=e.wheelDelta&&(a=e.wheelDelta/4)),0!==a){if(null==c)if(4<=g.length){var s,o=g;if((c=X(o,5))||(s=Math.abs(o[0]),c=K(o)&&5<s),c)for(var l=0;l<o.length;l++)f=Math.min(Math.abs(o[l]),f)}else g.push(a),n=!0;else c&&(f=Math.min(Math.abs(a),f));N.scrollingPage||(r=(s=N.cy).zoom(),i=s.pan(),r=[(t=N.projectIntoViewport(e.clientX,e.clientY))[0]*r+i.x,t[1]*r+i.y],N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.cxtStarted||H()?e.preventDefault():s.panningEnabled()&&s.userPanningEnabled()&&s.zoomingEnabled()&&s.userZoomingEnabled()&&(e.preventDefault(),N.data.wheelZooming=!0,clearTimeout(N.data.wheelTimeout),N.data.wheelTimeout=setTimeout(function(){N.data.wheelZooming=!1,N.redrawHint("eles",!0),N.redraw()},150),i=(a=n&&5<Math.abs(a)?5*Yre(a):a)/-250,c&&(i=i/f*3),i*=N.wheelSensitivity,1===e.deltaMode&&(i*=33),n=s.zoom()*Math.pow(10,i),"gesturechange"===e.type&&(n=N.gestureStartZoom*e.scale),s.zoom({level:n,renderedPosition:{x:r[0],y:r[1]}}),s.emit({type:"gesturechange"===e.type?"pinchzoom":"scrollzoom",originalEvent:e,position:{x:t[0],y:t[1]}})))}},"wheelHandler");N.registerBinding(N.container,"wheel",Z,!0),N.registerBinding(e,"scroll",mt(function(e){N.scrollingPage=!0,clearTimeout(N.scrollingPageTimeout),N.scrollingPageTimeout=setTimeout(function(){N.scrollingPage=!1},250)},"scrollHandler"),!0),N.registerBinding(N.container,"gesturestart",mt(function(e){N.gestureStartZoom=N.cy.zoom(),N.hasTouchStarted||e.preventDefault()},"gestureStartHandler"),!0),N.registerBinding(N.container,"gesturechange",function(e){N.hasTouchStarted||Z(e)},!0),N.registerBinding(N.container,"mouseout",mt(function(e){var t=N.projectIntoViewport(e.clientX,e.clientY);N.cy.emit({originalEvent:e,type:"mouseout",position:{x:t[0],y:t[1]}})},"mouseOutHandler"),!1),N.registerBinding(N.container,"mouseover",mt(function(e){var t=N.projectIntoViewport(e.clientX,e.clientY);N.cy.emit({originalEvent:e,type:"mouseover",position:{x:t[0],y:t[1]}})},"mouseOverHandler"),!1);var P,$,B,F,z,q,U,G,j,m,y,Q,J,ee,te,re,v,x,w,s,ie,ne,ae,se,oe,o,l,le=mt(function(e,t,r,i){return Math.sqrt((r-e)*(r-e)+(i-t)*(i-t))},"distance"),ce=mt(function(e,t,r,i){return(r-e)*(r-e)+(i-t)*(i-t)},"distanceSq");N.registerBinding(N.container,"touchstart",J=mt(function(t){if(N.hasTouchStarted=!0,O(t)){Y(),N.touchData.capture=!0,N.data.bgActivePosistion=void 0;var e,r,i=N.cy,n=N.touchData.now,a=N.touchData.earlier,s=(t.touches[0]&&(e=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=e[0],n[1]=e[1]),t.touches[1]&&(e=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=e[0],n[3]=e[1]),t.touches[2]&&(e=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=e[0],n[5]=e[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:n[0],y:n[1]}}},"makeEvent"));if(t.touches[1]){N.touchData.singleTouchMoved=!0,M(N.dragData.touchDragEles);var o=N.findContainerClientCoords(),o=(G=o[0],j=o[1],m=o[2],y=o[3],P=t.touches[0].clientX-G,$=t.touches[0].clientY-j,B=t.touches[1].clientX-G,F=t.touches[1].clientY-j,Q=0<=P&&P<=m&&0<=B&&B<=m&&0<=$&&$<=y&&0<=F&&F<=y,i.pan()),l=i.zoom();if(z=le(P,$,B,F),q=ce(P,$,B,F),U=[((m=[(P+B)/2,($+F)/2])[0]-o.x)/l,(m[1]-o.y)/l],q<4e4&&!t.touches[2])return o=N.findNearestElement(n[0],n[1],!0,!0),l=N.findNearestElement(n[2],n[3],!0,!0),o&&o.isNode()?(o.activate().emit(s("cxttapstart")),N.touchData.start=o):l&&l.isNode()?(l.activate().emit(s("cxttapstart")),N.touchData.start=l):i.emit(s("cxttapstart")),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxt=!0,N.touchData.cxtDragged=!1,N.data.bgActivePosistion=void 0,void N.redraw()}if(t.touches[2]?i.boxSelectionEnabled()&&t.preventDefault():t.touches[1]||t.touches[0]&&(null!=(l=(o=N.findNearestElements(n[0],n[1],!0,!0))[0])&&(l.activate(),N.touchData.start=l,N.touchData.starts=o,N.nodeIsGrabbable(l))&&(o=N.dragData.touchDragEles=i.collection(),N.redrawHint("eles",!(r=null)),N.redrawHint("drag",!0),l.selected()?(r=i.$(function(e){return e.selected()&&N.nodeIsGrabbable(e)}),I(r,{addToList:o})):R(l,{addToList:o}),E(l),l.emit(s("grabon")),r?r.forEach(function(e){e.emit(s("grab"))}):l.emit(s("grab"))),D(l,["touchstart","tapstart","vmousedown"],t,{x:n[0],y:n[1]}),null==l&&(N.data.bgActivePosistion={x:e[0],y:e[1]},N.redrawHint("select",!0),N.redraw()),N.touchData.singleTouchMoved=!1,N.touchData.singleTouchStartTime=+new Date,clearTimeout(N.touchData.tapholdTimeout),N.touchData.tapholdTimeout=setTimeout(function(){!1!==N.touchData.singleTouchMoved||N.pinching||N.touchData.selecting||D(N.touchData.start,["taphold"],t,{x:n[0],y:n[1]})},N.tapholdDuration)),1<=t.touches.length){for(var c=N.touchData.startPosition=[null,null,null,null,null,null],h=0;h<n.length;h++)c[h]=a[h]=n[h];i=t.touches[0],N.touchData.startGPosition=[i.clientX,i.clientY]}}},"touchstartHandler"),!1),N.registerBinding(e,"touchmove",ee=mt(function(t){var e=N.touchData.capture;if(e||O(t)){var r=N.selection,i=N.cy,n=N.touchData.now,a=N.touchData.earlier,s=i.zoom(),o=(t.touches[0]&&(A=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=A[0],n[1]=A[1]),t.touches[1]&&(A=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=A[0],n[3]=A[1]),t.touches[2]&&(A=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=A[0],n[5]=A[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:n[0],y:n[1]}}},"makeEvent")),l=N.touchData.startGPosition;if(e&&t.touches[0]&&l){for(var c=[],h=0;h<n.length;h++)c[h]=n[h]-a[h];var u=t.touches[0].clientX-l[0],d=t.touches[0].clientY-l[1],p=u*u+d*d>=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-G,w=t.touches[0].clientY-j,T=t.touches[1].clientX-G,k=t.touches[1].clientY-j,2.25<=(l=ce(x,w,T,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),C=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var m=0;m<C.length;m++){var y=C[m]._private;y.grabbed=!1,y.rscratch.inDragLayer=!1}}var v,b,l=N.touchData.start,x=t.touches[0].clientX-G,w=t.touches[0].clientY-j,T=t.touches[1].clientX-G,k=t.touches[1].clientY-j,r=(g=le(x,w,T,k))/z;Q&&(b=(x-P+(T-B))/2,E=(w-$+(k-F))/2,r=(L=i.zoom())*r,S=i.pan(),R=U[0]*L+S.x,v=U[1]*L+S.y,b={x:-r/L*(R-S.x-b)+R,y:-r/L*(v-S.y-E)+v},l&&l.active()&&(C=N.dragData.touchDragEles,M(C),N.redrawHint("drag",!0),N.redrawHint("eles",!0),l.unactivate().emit(o("freeon")),C.emit(o("free")),N.dragData.didDrag)&&(l.emit(o("dragfreeon")),C.emit(o("dragfree"))),i.viewport({zoom:r,pan:b,cancelOnFailedZoom:!0}),i.emit(o("pinchzoom")),z=g,P=x,$=w,B=T,F=k,N.pinching=!0),t.touches[0]&&(A=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=A[0],n[1]=A[1]),t.touches[1]&&(A=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=A[0],n[3]=A[1]),t.touches[2]&&(A=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=A[0],n[5]=A[1])}else if(t.touches[0]&&!N.touchData.didSelect){var C,S,E,_,A,R=N.touchData.start,L=N.touchData.last;if(N.hoverData.draggingEles||N.swipePanning||(f=N.findNearestElement(n[0],n[1],!0,!0)),e&&null!=R&&t.preventDefault(),e&&null!=R&&N.nodeIsDraggable(R)&&(p?(C=N.dragData.touchDragEles,(S=!N.dragData.didDrag)&&I(C,{inDragLayer:!0}),N.dragData.didDrag=!0,E={x:0,y:0},he(c[0])&&he(c[1])&&(E.x+=c[0],E.y+=c[1],S)&&(N.redrawHint("eles",!0),(_=N.touchData.dragDelta)&&he(_[0])&&he(_[1])&&(E.x+=_[0],E.y+=_[1])),N.hoverData.draggingEles=!0,C.silentShift(E).emit(o("position")).emit(o("drag")),N.redrawHint("drag",!0),N.touchData.startPosition[0]==a[0]&&N.touchData.startPosition[1]==a[1]&&N.redrawHint("eles",!0),N.redraw()):0===(_=N.touchData.dragDelta=N.touchData.dragDelta||[]).length?(_.push(c[0]),_.push(c[1])):(_[0]+=c[0],_[1]+=c[1])),D(R||f,["touchmove","tapdrag","vmousemove"],t,{x:n[0],y:n[1]}),R&&R.grabbed()||f==L||(L&&L.emit(o("tapdragout")),!f)||f.emit(o("tapdragover")),N.touchData.last=f,e)for(m=0;m<n.length;m++)n[m]&&N.touchData.startPosition[m]&&p&&(N.touchData.singleTouchMoved=!0);e&&(null==R||R.pannable())&&i.panningEnabled()&&i.userPanningEnabled()&&(W(R,N.touchData.starts)&&(t.preventDefault(),N.data.bgActivePosistion||(N.data.bgActivePosistion=Bre(N.touchData.startPosition)),N.swipePanning?(i.panBy({x:c[0]*s,y:c[1]*s}),i.emit(o("dragpan"))):p&&(N.swipePanning=!0,i.panBy({x:u*s,y:d*s}),i.emit(o("dragpan")),R)&&(R.unactivate(),N.redrawHint("select",!0),N.touchData.start=null)),A=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=A[0],n[1]=A[1])}for(h=0;h<n.length;h++)a[h]=n[h];e&&0<t.touches.length&&!N.hoverData.draggingEles&&!N.swipePanning&&null!=N.data.bgActivePosistion&&(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),N.redraw())}},"touchmoveHandler"),!1),N.registerBinding(e,"touchcancel",te=mt(function(e){var t=N.touchData.start;N.touchData.capture=!1,t&&t.unactivate()},"touchcancelHandler")),N.registerBinding(e,"touchend",re=mt(function(t){var e=N.touchData.start;if(N.touchData.capture){0===t.touches.length&&(N.touchData.capture=!1),t.preventDefault();var r,i=N.selection,n=(N.swipePanning=!1,N.hoverData.draggingEles=!1,N.cy),a=n.zoom(),s=N.touchData.now,o=N.touchData.earlier,l=(t.touches[0]&&(l=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),s[0]=l[0],s[1]=l[1]),t.touches[1]&&(l=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),s[2]=l[0],s[3]=l[1]),t.touches[2]&&(l=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),s[4]=l[0],s[5]=l[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:s[0],y:s[1]}}},"makeEvent"));if(e&&e.unactivate(),N.touchData.cxt)r=l("cxttapend"),(e||n).emit(r),N.touchData.cxtDragged||(r=l("cxttap"),(e||n).emit(r)),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxt=!1,N.touchData.start=null,N.redraw();else{!t.touches[2]&&n.boxSelectionEnabled()&&N.touchData.selecting&&(N.touchData.selecting=!1,r=n.collection(N.getAllInBox(i[0],i[1],i[2],i[3])),i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,N.redrawHint("select",!0),n.emit(l("boxend")),i=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),r.emit(l("box")).stdFilter(i).select().emit(l("boxselect")),r.nonempty()&&N.redrawHint("eles",!0),N.redraw()),e?.unactivate(),t.touches[2]?(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0)):t.touches[1]||t.touches[0]||(t.touches[0],N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),i=N.dragData.touchDragEles,null!=e?(r=e._private.grabbed,M(i),N.redrawHint("drag",!0),N.redrawHint("eles",!0),r&&(e.emit(l("freeon")),i.emit(l("free")),N.dragData.didDrag)&&(e.emit(l("dragfreeon")),i.emit(l("dragfree"))),D(e,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]}),e.unactivate(),N.touchData.start=null):(r=N.findNearestElement(s[0],s[1],!0,!0),D(r,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]})),r=((i=N.touchData.startPosition[0]-s[0])*i+(l=N.touchData.startPosition[1]-s[1])*l)*a*a,N.touchData.singleTouchMoved||(e||n.$(":selected").unselect(["tapunselect"]),D(e,["tap","vclick"],t,{x:s[0],y:s[1]}),v=!1,t.timeStamp-w<=n.multiClickDebounceTime()?(x&&clearTimeout(x),v=!0,w=null,D(e,["dbltap","vdblclick"],t,{x:s[0],y:s[1]})):(x=setTimeout(function(){v||D(e,["onetap","voneclick"],t,{x:s[0],y:s[1]})},n.multiClickDebounceTime()),w=t.timeStamp)),null!=e&&!N.dragData.didDrag&&e._private.selectable&&r<N.touchTapThreshold2&&!N.pinching&&("single"===n.selectionType()?(n.$(p).unmerge(e).unselect(["tapunselect"]),e.select(["tapselect"])):e.selected()?e.unselect(["tapunselect"]):e.select(["tapselect"]),N.redrawHint("eles",!0)),N.touchData.singleTouchMoved=!0);for(var c=0;c<s.length;c++)o[c]=s[c];N.dragData.didDrag=!1,0===t.touches.length&&(N.touchData.dragDelta=[],N.touchData.startPosition=[null,null,null,null,null,null],N.touchData.startGPosition=null,N.touchData.didSelect=!1),t.touches.length<2&&(1===t.touches.length&&(N.touchData.startGPosition=[t.touches[0].clientX,t.touches[0].clientY]),N.pinching=!1,N.redrawHint("eles",!0),N.redraw())}}},"touchendHandler"),!1),"u"<typeof TouchEvent&&(s=[],ie=mt(function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},"makeTouch"),ne=mt(function(e){return{event:e,touch:ie(e)}},"makePointer"),ae=mt(function(e){s.push(ne(e))},"addPointer"),se=mt(function(e){for(var t=0;t<s.length;t++)if(s[t].event.pointerId===e.pointerId)return void s.splice(t,1)},"removePointer"),oe=mt(function(t){var e=s.filter(function(e){return e.event.pointerId===t.pointerId})[0];e.event=t,e.touch=ie(t)},"updatePointer"),o=mt(function(e){e.touches=s.map(function(e){return e.touch})},"addTouchesToEvent"),l=mt(function(e){return"mouse"===e.pointerType||4===e.pointerType},"pointerIsMouse"),N.registerBinding(N.container,"pointerdown",function(e){l(e)||(e.preventDefault(),ae(e),o(e),J(e))}),N.registerBinding(N.container,"pointerup",function(e){l(e)||(se(e),o(e),re(e))}),N.registerBinding(N.container,"pointercancel",function(e){l(e)||(se(e),o(e),te(e))}),N.registerBinding(N.container,"pointermove",function(e){l(e)||(e.preventDefault(),oe(e),o(e),ee(e))}))}},nhe={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl("polygon",e,t,r,i,n,this.points)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return Nie(n,a,this.points,e,t,r/2,i/2,s)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return wie(e,t,this.points,a,s,i,n,[0,-1],r)},"checkPoint"),hasMiterBounds:"rectangle"!==e,miterBounds:mt(function(e,t,r,i,n,a){return AZ(this.points,e,t,r,i,n)},"miterBounds")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return Sie(n,a,e,t,r/2+s,i/2+s)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return Eie(e,t,i,n,a,s,r)},"checkPoint")}},generateRoundPolygon:function(e,m){return this.nodeShapes[e]={renderer:this,name:e,points:m,getOrCreateCorners:mt(function(e,t,r,i,n,a,s){if(void 0===a[s]||a[s+"-cx"]!==e||a[s+"-cy"]!==t){a[s]=new Array(m.length/2),a[s+"-cx"]=e,a[s+"-cy"]=t;var o=r/2,l=i/2;n="auto"===n?Bie(r,i):n;for(var c=new Array(m.length/2),h=0;h<m.length/2;h++)c[h]={x:e+o*m[2*h],y:t+l*m[2*h+1]};for(var u,d,p=c.length,g=c[p-1],f=0;f<p;f++)u=c[f%p],d=c[(f+1)%p],a[s][f]=uJ(g,u,d,n),g=u}return a[s]},"getOrCreateCorners"),draw:mt(function(e,t,r,i,n,a,s){this.renderer.nodeShapeImpl("round-polygon",e,t,r,i,n,this.points,this.getOrCreateCorners(t,r,i,n,a,s,"drawCorners"))},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o,l){return Die(n,a,this.points,e,t,r,i,s,this.getOrCreateCorners(e,t,r,i,o,l,"corners"))},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o,l){return Tie(e,t,this.points,a,s,i,n,this.getOrCreateCorners(a,s,i,n,o,l,"corners"))},"checkPoint")}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Mie(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return pie(n,a,e,t,r,i,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l=i/2,c=n/2,h=(o="auto"===o?$ie(i,n):o,2*(o=Math.min(l,c,o)));return!!(wie(e,t,this.points,a,s,i,n-h,[0,-1],r)||wie(e,t,this.points,a,s,i-h,n,[0,-1],r)||Eie(e,t,h,h,a-l+o,s-c+o,r)||Eie(e,t,h,h,a+l-o,s-c+o,r)||Eie(e,t,h,h,a+l-o,s+c-o,r)||Eie(e,t,h,h,a-l+o,s+c-o,r))},"checkPoint")}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:Fie(),points:Mie(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n,null,a)},"draw"),generateCutTrianglePts:mt(function(e,t,r,i,n){var a=r-(e/=2),r=r+e;return{topLeft:[a,(e=i-(t/=2))+(n="auto"===n?this.cornerLength:n),a+n,e,a+n,e+n],topRight:[r-n,e,r,e+n,r-n,e+n],bottomRight:[r,(i+=t)-n,r-n,i,r-n,i-n],bottomLeft:[a+n,i,a,i-n,a+n,i-n]}},"generateCutTrianglePts"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return r=this.generateCutTrianglePts(r+2*s,i+2*s,e,t,o),i=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),Nie(n,a,i,e,t)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return o="auto"===o?this.cornerLength:o,!(!wie(e,t,this.points,a,s,i,n-2*o,[0,-1],r)&&!wie(e,t,this.points,a,s,i-2*o,n,[0,-1],r))||(o=this.generateCutTrianglePts(i,n,a,s),xie(e,t,o.topLeft))||xie(e,t,o.topRight)||xie(e,t,o.bottomRight)||xie(e,t,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Mie(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return r=this.generateBarrelBezierPts(r+2*s,i+2*s,e,t),i=mt(function(e){var t=Zre({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),r=Zre({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),i=Zre({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,r.x,r.y,i.x,i.y,e[4],e[5]]},"approximateBarrelCurvePts"),s=[].concat(i(r.topLeft),i(r.topRight),i(r.bottomRight),i(r.bottomLeft)),Nie(n,a,s,e,t)},"intersectLine"),generateBarrelBezierPts:mt(function(e,t,r,i){var n=t/2,a=r-(s=e/2),r=r+s,s=i-n,i=i+n,t=(n=qie(e,t)).heightOffset,o=n.widthOffset;return(e={topLeft:[a,s+t,a+(n=n.ctrlPtOffsetPct*e),s,a+o,s],topRight:[r-o,s,r-n,s,r,s+t],bottomRight:[r,i-t,r-n,i,r-o,i],bottomLeft:[a+o,i,a+n,i,a,i-t]}).topLeft.isTop=!0,e.topRight.isTop=!0,e.bottomLeft.isBottom=!0,e.bottomRight.isBottom=!0,e},"generateBarrelBezierPts"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l=(c=qie(i,n)).heightOffset,c=c.widthOffset;if(wie(e,t,this.points,a,s,i,n-2*l,[0,-1],r)||wie(e,t,this.points,a,s,i-2*c,n,[0,-1],r))return!0;for(var h=this.generateBarrelBezierPts(i,n,a,s),u=mt(function(e,t,r){var i=r[4],n=r[2],a=r[0],s=r[5],r=r[1],o=Math.min(i,a),l=Math.max(i,a),c=Math.min(s,r),s=Math.max(s,r);return o<=e&&e<=l&&c<=t&&t<=s&&(r=zie(i,n,a),0<(o=mie(r[0],r[1],r[2],e).filter(function(e){return 0<=e&&e<=1})).length)?o[0]:null},"getCurveT"),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]],f=u(e,t,g);if(null!=f){var m=g[5],y=g[3],v=g[1],m=Kre(m,y,v,f);if(g.isTop&&m<=t||g.isBottom&&t<=m)return!0}}return!1},"checkPoint")}},generateBottomRoundrectangle:function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Mie(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){var l=t-(i/2+s);return 0<(l=Rie(n,a,e,t,e-(r/2+s),l,e+(r/2+s),l,!1)).length?l:pie(n,a,e,t,r,i,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l,c,h=2*(o="auto"===o?$ie(i,n):o);return!(!wie(e,t,this.points,a,s,i,n-h,[0,-1],r)&&!wie(e,t,this.points,a,s,i-h,n,[0,-1],r)&&!(xie(e,t,[a-(l=i/2+2*r),s-(c=n/2+2*r),a-l,s,a+l,s,a+l,s-c])||Eie(e,t,h,h,a+i/2-o,s+n/2-o,r)||Eie(e,t,h,h,a-i/2+o,s+n/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var e=this.nodeShapes={},r=this,t=(this.generateEllipse(),this.generatePolygon("triangle",Mie(3,0)),this.generateRoundPolygon("round-triangle",Mie(3,0)),this.generatePolygon("rectangle",Mie(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),i=(this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t),this.generatePolygon("pentagon",Mie(5,0)),this.generateRoundPolygon("round-pentagon",Mie(5,0)),this.generatePolygon("hexagon",Mie(6,0)),this.generateRoundPolygon("round-hexagon",Mie(6,0)),this.generatePolygon("heptagon",Mie(7,0)),this.generateRoundPolygon("round-heptagon",Mie(7,0)),this.generatePolygon("octagon",Mie(8,0)),this.generateRoundPolygon("round-octagon",Mie(8,0)),new Array(20)),n=Pie(5,0),a=Pie(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<a.length/2;o++)a[2*o]*=s,a[2*o+1]*=s;for(o=0;o<5;o++)i[4*o]=n[2*o],i[4*o+1]=n[2*o+1],i[4*o+2]=a[2*o],i[4*o+3]=a[2*o+1];i=Oie(i),this.generatePolygon("star",i),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]),this.generatePolygon("tag",t=[-1,-1,.25,-1,1,0,.25,1,-1,1]),this.generateRoundPolygon("round-tag",t),e.makePolygon=function(e){var t="polygon-"+e.join("$");return this[t]||r.generatePolygon(t,e)}}},ahe={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||pre(),void 0===this.averageRedrawTime&&(this.averageRedrawTime=0),void 0===this.lastRedrawTime&&(this.lastRedrawTime=0),void 0===this.lastDrawTime&&(this.lastDrawTime=0),this.requestedFrame=!0,this.renderOptions=e},beforeRender:function(e,t){var r;this.destroyed||(null==t&&are("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:e,priority:t}),r.sort(function(e,t){return t.priority-e.priority}))}},pce=mt(function(e,t,r){for(var i=e.beforeRenderCallbacks,n=0;n<i.length;n++)i[n].fn(t,r)},"beforeRenderCallbacks"),ahe.startRenderLoop=function(){var i,n=this,a=n.cy;n.renderLoopStarted||(n.renderLoopStarted=!0,i=mt(function(e){var t,r;n.destroyed||(a.batching()||(n.requestedFrame&&!n.skipFrame?(pce(n,!0,e),t=Fte(),n.render(n.renderOptions),r=n.lastDrawTime=Fte(),void 0===n.averageRedrawTime&&(n.averageRedrawTime=r-t),void 0===n.redrawCount&&(n.redrawCount=0),n.redrawCount++,void 0===n.redrawTotalTime&&(n.redrawTotalTime=0),n.redrawTotalTime+=r-=t,n.lastRedrawTime=r,n.averageRedrawTime=n.averageRedrawTime/2+r/2,n.requestedFrame=!1):pce(n,!1,e)),n.skipFrame=!1,Bte(i))},"renderFn"),Bte(i))},$ce=mt(function(e){this.init(e)},"BaseRenderer"),(fce=(gce=$ce).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],fce.init=function(e){var t,r,i,n,a=this,s=(a.options=e,a.cy=e.cy,a.container=e.cy.container()),o=a.cy.window();o&&(r=(t=o.document).head,i="__________cytoscape_container",n=null!=t.getElementById("__________cytoscape_stylesheet"),s.className.indexOf(i)<0&&(s.className=(s.className||"")+" "+i),n||((n=t.createElement("style")).id="__________cytoscape_stylesheet",n.textContent="."+i+" { position: relative; }",r.insertBefore(n,r.children[0])),"static"===o.getComputedStyle(s).getPropertyValue("position"))&&ore("A Cytoscape container has style position:static and so can not use UI extensions properly"),a.selection=[void 0,void 0,void 0,void 0,0],a.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],a.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},a.dragData={possibleDragElements:[]},a.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},a.redraws=0,a.showFps=e.showFps,a.debug=e.debug,a.webgl=e.webgl,a.hideEdgesOnViewport=e.hideEdgesOnViewport,a.textureOnViewport=e.textureOnViewport,a.wheelSensitivity=e.wheelSensitivity,a.motionBlurEnabled=e.motionBlur,a.forcedPixelRatio=he(e.pixelRatio)?e.pixelRatio:null,a.motionBlur=e.motionBlur,a.motionBlurOpacity=e.motionBlurOpacity,a.motionBlurTransparency=1-a.motionBlurOpacity,a.motionBlurPxRatio=1,a.mbPxRBlurry=1,a.minMbLowQualFrames=4,a.fullQualityMb=!1,a.clearedForMotionBlur=[],a.desktopTapThreshold=e.desktopTapThreshold,a.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,a.touchTapThreshold=e.touchTapThreshold,a.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,a.tapholdDuration=500,a.bindings=[],a.beforeRenderCallbacks=[],a.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},a.registerNodeShapes(),a.registerArrowShapes(),a.registerCalculationListeners()},fce.notify=function(e,t){var r=this,i=r.cy;this.destroyed||("init"===e?r.load():"destroy"===e?r.destroy():(("add"===e||"remove"===e||"move"===e&&i.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&r.invalidateCachedZSortedEles(),"viewport"===e&&r.redrawHint("select",!0),"gc"===e&&r.redrawHint("gc",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()))},fce.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var r=e.bindings[t],i=r.target;(i.off||i.removeEventListener).apply(i,r.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch{}},fce.isHeadless=function(){return!1},[Bce,dce,Hce,Zce,nhe,ahe].forEach(function(e){Kee(fce,e)}),J={setupDequeueing:mt(function(f){return mt(function(){var d,e,t,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=Mte(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),e=mt(function(e,t){var r=Fte(),i=g.averageRedrawTime,n=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(e||g.flushRenderedStyleQueue();;){var l=(c=Fte())-r,c=c-t;if(n<1e3/60){if(c>=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<h.length))break;for(var u=0;u<h.length;u++)a.push(h[u])}0<a.length&&(f.onDeqd(p,a),!e)&&f.shouldRedraw(p,a,o,s)&&d()},"dequeue"),t=f.priority||nre,g.beforeRender(e,t(p)))},"setupDequeueingImpl")},"setupDequeueing")},mt(L,"ElementTextureCacheLookup"),mce=XK(L,[{key:"getIdsFor",value:mt(function(e){null==e&&are("Can not get id list for null key");var t=this.idsByKey,r=this.idsByKey.get(e);return r||(r=new xre,t.set(e,r)),r},"getIdsFor")},{key:"addIdForKey",value:mt(function(e,t){null!=e&&this.getIdsFor(e).add(t)},"addIdForKey")},{key:"deleteIdForKey",value:mt(function(e,t){null!=e&&this.getIdsFor(e).delete(t)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:mt(function(e){return null==e?0:this.getIdsFor(e).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:mt(function(e){var t=e.id(),r=this.keyForId.get(t),e=this.getKey(e);this.deleteIdForKey(r,t),this.addIdForKey(e,t),this.keyForId.set(t,e)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:mt(function(e){var e=e.id(),t=this.keyForId.get(e);this.deleteIdForKey(t,e),this.keyForId.delete(e)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:mt(function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)},"keyHasChangedFor")},{key:"isInvalid",value:mt(function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)},"isInvalid")},{key:"getCachesAt",value:mt(function(e){var t=this.cachesByLvl,r=this.lvls,i=t.get(e);return i||(i=new bre,t.set(e,i),r.push(e)),i},"getCachesAt")},{key:"getCache",value:mt(function(e,t){return this.getCachesAt(t).get(e)},"getCache")},{key:"get",value:mt(function(e,t){var r=this.getKey(e);return null!=(r=this.getCache(r,t))&&this.updateKeyMappingFor(e),r},"get")},{key:"getForCachedKey",value:mt(function(e,t){return e=this.keyForId.get(e.id()),this.getCache(e,t)},"getForCachedKey")},{key:"hasCache",value:mt(function(e,t){return this.getCachesAt(t).has(e)},"hasCache")},{key:"has",value:mt(function(e,t){return e=this.getKey(e),this.hasCache(e,t)},"has")},{key:"setCache",value:mt(function(e,t,r){r.key=e,this.getCachesAt(t).set(e,r)},"setCache")},{key:"set",value:mt(function(e,t,r){var i=this.getKey(e);this.setCache(i,t,r),this.updateKeyMappingFor(e)},"set")},{key:"deleteCache",value:mt(function(e,t){this.getCachesAt(t).delete(e)},"deleteCache")},{key:"delete",value:mt(function(e,t){e=this.getKey(e),this.deleteCache(e,t)},"_delete")},{key:"invalidateKey",value:mt(function(t){var r=this;this.lvls.forEach(function(e){return r.deleteCache(t,e)})},"invalidateKey")},{key:"invalidate",value:mt(function(e){var t=e.id(),t=this.keyForId.get(t);return this.deleteKeyMappingFor(e),(e=this.doesEleInvalidateKey(e))&&this.invalidateKey(t),e||0===this.getNumberOfIdsForKey(t)},"invalidate")}]),yce={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},vce=she({getKey:null,doesEleInvalidateKey:rre,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:tre,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),bce=mt(function(e,t){this.renderer=e,this.onDequeues=[],e=vce(t),Kee(this,e),this.lookup=new mce(e.getKey,e.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(che=bce.prototype).reasons=yce,che.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},che.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},che.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new _re(function(e,t){return t.reqs-e.reqs})},che.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},che.getElement=function(e,t,r,i,n){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if((i=null==i?Math.ceil(Wre(o*r)):i)<-4)i=-4;else if(7.99<=o||3<i)return null;var o=Math.pow(2,i),c=t.h*o,h=t.w*o,u=s.eleTextBiggerThanMin(e,o);if(!this.isVisible(e,u))return null;if((s=l.get(e,i))&&s.invalidated&&(s.invalidated=!1,s.texture.invalidatedWidth-=s.width),!s){var d=c<=25?25:c<=50?50:50*Math.ceil(c/50);if(1024<c||1024<h)return null;var p=(m=a.getTextureQueue(d))[m.length-2],g=mt(function(){return a.recycleTexture(d,h)||a.addTexture(d,h)},"addNewTxr");(p=(p=p||m[m.length-1])||g()).width-p.usedWidth<h&&(p=g());for(var f,m=mt(function(e){return e&&e.scaledLabelShown===u},"scalableFrom"),g=n&&n===yce.dequeue,y=n&&n===yce.highQuality,n=n&&n===yce.downscale,v=i+1;v<=3;v++){var b=l.get(e,v);if(b){f=b;break}}var x,w=f&&f.level===i+1?f:null,T=mt(function(){p.context.drawImage(w.texture.canvas,w.x,0,w.width,w.height,p.usedWidth,0,h,c)},"downscale");if(p.context.setTransform(1,0,0,1,0,0),p.context.clearRect(p.usedWidth,0,h,d),m(w))T();else if(m(f)){if(!y)return a.queueElement(e,f.level-1),f;for(var k=f.level;i<k;k--)w=a.getElement(e,t,r,k,yce.downscale);T()}else{if(!g&&!y&&!n)for(var C=i-1;-4<=C;C--){var S=l.get(e,C);if(S){x=S;break}}if(m(x))return a.queueElement(e,i),x;p.context.translate(p.usedWidth,0),p.context.scale(o,o),this.drawElement(p.context,e,t,u,!1),p.context.scale(1/o,1/o),p.context.translate(-p.usedWidth,0)}s={x:p.usedWidth,texture:p,level:i,scale:o,width:h,height:c,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+h),p.eleCaches.push(s),l.set(e,i,s),a.checkTextureFullness(p)}return s},che.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},che.invalidateElement=function(e){var t=this.lookup,r=[];if(t.isInvalid(e)){for(var i=-4;i<=3;i++){var n=t.getForCachedKey(e,i);n&&r.push(n)}if(t.invalidate(e))for(var a=0;a<r.length;a++){var s=r[a],o=s.texture;o.invalidatedWidth+=s.width,s.invalidated=!0,this.checkTextureUtility(o)}this.removeFromQueue(e)}},che.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},che.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8<e.usedWidth/e.width&&10<=e.fullnessChecks?gre(t,e):e.fullnessChecks++},che.retireTexture=function(e){var t=e.height,r=this.getTextureQueue(t),i=this.lookup;gre(r,e),e.retired=!0;for(var n=e.eleCaches,a=0;a<n.length;a++){var s=n[a];i.deleteCache(s.key,s.level)}fre(n),this.getRetiredTextureQueue(t).push(e)},che.addTexture=function(e,t){var r={};return this.getTextureQueue(e).push(r),r.eleCaches=[],r.height=e,r.width=Math.max(1024,t),r.usedWidth=0,r.invalidatedWidth=0,r.fullnessChecks=0,r.canvas=this.renderer.makeOffscreenCanvas(r.width,r.height),r.context=r.canvas.getContext("2d"),r},che.recycleTexture=function(e,t){for(var r=this.getTextureQueue(e),i=this.getRetiredTextureQueue(e),n=0;n<i.length;n++){var a=i[n];if(a.width>=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,fre(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),gre(i,a),r.push(a),a}},che.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)},che.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),i=[],n=this.lookup,a=0;a<1&&0<t.size();a++){var s=t.pop(),o=s.key,l=s.eles[0],c=n.hasCache(l,s.level);r[o]=null,c||(i.push(s),o=this.getBoundingBox(l),this.getElement(l,o,e,s.level,yce.dequeue))}return i},che.removeFromQueue=function(e){var t=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),n=r[i];null!=n&&(1===n.eles.length?(n.reqs=ere,t.updateItem(n),t.pop(),r[i]=null):n.eles.unmerge(e))},che.onDequeue=function(e){this.onDequeues.push(e)},che.offDequeue=function(e){gre(this.onDequeues,e)},che.setupDequeueing=J.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t,r){return e.dequeue(t,r)},"deq"),onDeqd:mt(function(e,t){for(var r=0;r<e.onDequeues.length;r++)(0,e.onDequeues[r])(t)},"onDeqd"),shouldRedraw:mt(function(e,t,r,i){for(var n=0;n<t.length;n++)for(var a=t[n].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(lie(o,i))return!0}return!1},"shouldRedraw"),priority:mt(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),xce=mt(function(e){var r=this,t=(e=r.renderer=e).cy,t=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Fte()-500,r.skipping=!1,r.eleTxrDeqs=t.collection(),r.scheduleElementRefinement=Mte(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},50),e.beforeRender(function(e,t){t-r.lastInvalidationTime<=250?r.skipping=!0:r.skipping=!1},e.beforeRenderPriorities.lyrTxrSkip),mt(function(e,t){return t.reqs-e.reqs},"qSort"));r.layersQueue=new _re(t),r.setupDequeueing()},"LayeredTextureCache"),ghe=xce.prototype,wce=0,Tce=Math.pow(2,53)-1,ghe.makeLayer=function(e,t){var r=Math.pow(2,t),i=Math.ceil(e.w*r),n=Math.ceil(e.h*r),a=this.renderer.makeOffscreenCanvas(i,n),t=(e={id:wce=++wce%Tce,bb:e,level:t,width:i,height:n,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,i=-e.bb.x1,n=-e.bb.y1;return t.scale(r,r),t.translate(i,n),e},ghe.getLayers=function(n,e,a){var s=this,t=s.renderer.cy.zoom(),r=s.firstGet;if(s.firstGet=!1,null==a)if((a=Math.ceil(Wre(t*e)))<-4)a=-4;else if(3.99<=t||2<a)return null;s.validateLayersElesOrdering(a,n);var o,l,c=s.layersByLevel,h=Math.pow(2,a),u=c[a]=c[a]||[],t=s.levelIsComplete(a,n),i=mt(function(){var r=mt(function(e){if(s.validateLayersElesOrdering(e,n),s.levelIsComplete(e,n))return l=c[e],!0},"canUseAsTmpLvl"),e=mt(function(e){if(!l)for(var t=a+e;-4<=t&&t<=2&&!r(t);t+=e);},"checkLvls");e(1),e(-1);for(var t=u.length-1;0<=t;t--){var i=u[t];i.invalid&&gre(u,i)}},"checkTempLevels");if(t)return u;i();var d=mt(function(){if(!o){o=eie();for(var e=0;e<n.length;e++)iie(o,n[e].boundingBox())}return o},"getBb"),p=mt(function(e){var t=(e=e||{}).after,r=(d(),Math.ceil(o.w*h)),i=Math.ceil(o.h*h);return 32767<r||32767<i||16e6<r*i?null:(r=s.makeLayer(o,a),null!=t?(i=u.indexOf(t)+1,u.splice(i,0,r)):void 0!==e.insert&&!e.insert||u.unshift(r),r)},"makeLayer");if(s.skipping&&!r)return null;for(var g=null,f=+n.length,m=!r,y=0;y<n.length;y++){var v=n[y],b=v._private.rscratch,x=(b=b.imgLayerCaches=b.imgLayerCaches||{})[a];if(x)g=x;else{if((!g||g.eles.length>=f||!uie(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)},ghe.getEleLevelForLayerLevel=function(e,t){return e},ghe.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))},ghe.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var i=0,n=0;n<r.length;n++){var a=r[n];if(0<a.reqs||a.invalid)return!1;i+=a.eles.length}return i===t.length},ghe.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var i=0;i<r.length;i++){for(var n=r[i],a=-1,s=0;s<t.length;s++)if(n.eles[0]===t[s]){a=s;break}if(a<0)this.invalidateLayer(n);else for(var o=a,s=0;s<n.eles.length;s++)if(n.eles[s]!==t[o+s]){this.invalidateLayer(n);break}}},ghe.updateElementsInLayers=function(e,t){for(var r=Nee(e[0]),i=0;i<e.length;i++)for(var n=r?null:e[i],a=r?e[i]:e[i].ele,s=a._private.rscratch,o=s.imgLayerCaches=s.imgLayerCaches||{},l=-4;l<=2;l++){var c=o[l];!c||n&&this.getEleLevelForLayerLevel(c.level)!==n.level||t(c,a,n)}},ghe.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var r=this.layersByLevel[t];if(r&&0<r.length){e=!0;break}}return e},ghe.invalidateElements=function(e){var i=this;0!==e.length&&(i.lastInvalidationTime=Fte(),0!==e.length)&&i.haveLayers()&&i.updateElementsInLayers(e,mt(function(e,t,r){i.invalidateLayer(e)},"invalAssocLayers"))},ghe.invalidateLayer=function(e){if(this.lastInvalidationTime=Fte(),!e.invalid){var t=e.level,r=e.eles,i=this.layersByLevel[t];gre(i,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var n=0;n<r.length;n++){var a=r[n]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},ghe.refineElementTextures=function(e){var a=this;a.updateElementsInLayers(e,mt(function(e,t,r){var i=e.replacement;if(i||((i=e.replacement=a.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var n=0;n<i.eles.length;n++)a.queueLayer(i,i.eles[n])},"refineEachEle"))},ghe.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},ghe.queueLayer=function(e,t){var r=this.layersQueue,i=e.elesQueue,n=i.hasId=i.hasId||{};if(!e.replacement){if(t){if(n[t.id()])return;i.push(t),n[t.id()]=!0}e.reqs?(e.reqs++,r.updateItem(e)):(e.reqs=1,r.push(e))}},ghe.dequeue=function(e){for(var t=this.layersQueue,r=[],i=0;i<1&&0!==t.size();){var n,a=t.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?t.pop():((n=a.elesQueue.shift())&&(this.drawEleInLayer(a,n,a.level,e),i++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(t.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},ghe.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],r=e.replaces,i=t.indexOf(r);if(!(i<0||r.invalid)){t[i]=e;for(var n=0;n<e.eles.length;n++){var a=e.eles[n]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[e.level]=e)}this.requestRedraw()}},ghe.requestRedraw=Mte(function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()},100),ghe.setupDequeueing=J.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t){return e.dequeue(t)},"deq"),onDeqd:nre,shouldRedraw:tre,priority:mt(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),kce={},mt(gJ,"polygon"),mt(fJ,"triangleBackcurve"),mt(mJ,"triangleTee"),mt(yJ,"circleTriangle"),mt(vJ,"circle$1"),kce.arrowShapeImpl=function(e){return(Cce=Cce||{polygon:gJ,"triangle-backcurve":fJ,"triangle-tee":mJ,"circle-triangle":yJ,"triangle-cross":mJ,circle:vJ})[e]},Sce={drawElement:function(e,t,r,i,n,a){t.isNode()?this.drawNode(e,t,r,i,n,a):this.drawEdge(e,t,r,i,n,a)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawElementUnderlay:function(e,t){t.isNode()?this.drawNodeUnderlay(e,t):this.drawEdgeUnderlay(e,t)},drawCachedElementPortion:function(e,t,r,i,n,a,s,o){var l,c,h,u,d,p,g,f=r.getBoundingBox(t);0!==f.w&&0!==f.h&&(null!=(i=r.getElement(t,f,i,n,a))?0!==(n=o(this,t))&&(a=s(this,t),o=f.x1,s=f.y1,l=f.w,f=f.h,p=0!==a?(h=(u=r.getRotationPoint(t)).x,e.translate(h,u=u.y),e.rotate(a),(c=this.getImgSmoothing(e))||this.setImgSmoothing(e,!0),d=(p=r.getRotationOffset(t)).x,p.y):(d=o,s),1!==n&&(g=e.globalAlpha,e.globalAlpha=g*n),e.drawImage(i.texture.canvas,i.x,0,i.width,i.height,d,p,l,f),1!==n&&(e.globalAlpha=g),0!==a)&&(e.rotate(-a),e.translate(-h,-u),c||this.setImgSmoothing(e,!1)):r.drawElement(e,t))}},Ece=mt(function(){return 0},"getZeroRotation"),_ce=mt(function(e,t){return e.getTextAngle(t,null)},"getLabelRotation"),Ace=mt(function(e,t){return e.getTextAngle(t,"source")},"getSourceLabelRotation"),Rce=mt(function(e,t){return e.getTextAngle(t,"target")},"getTargetLabelRotation"),Lce=mt(function(e,t){return t.effectiveOpacity()},"getOpacity"),Nce=mt(function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()},"getTextOpacity"),Sce.drawCachedElement=function(e,t,r,i,n,a){var s=(c=this.data).eleTxrCache,o=c.lblTxrCache,l=c.slbTxrCache,c=c.tlbTxrCache,h=t.boundingBox(),a=!0===a?s.reasons.highQuality:null;0===h.w||0===h.h||!t.visible()||i&&!lie(h,i)||(h=t.isEdge(),i=t.element()._private.rscratch.badLine,this.drawElementUnderlay(e,t),this.drawCachedElementPortion(e,t,s,r,n,a,Ece,Lce),h&&i||this.drawCachedElementPortion(e,t,o,r,n,a,_ce,Nce),h&&!i&&(this.drawCachedElementPortion(e,t,l,r,n,a,Ace,Nce),this.drawCachedElementPortion(e,t,c,r,n,a,Rce,Nce)),this.drawElementOverlay(e,t))},Sce.drawElements=function(e,t){for(var r=0;r<t.length;r++)this.drawElement(e,t[r])},Sce.drawCachedElements=function(e,t,r,i){for(var n=0;n<t.length;n++)this.drawCachedElement(e,t[n],r,i)},Sce.drawCachedNodes=function(e,t,r,i){for(var n=0;n<t.length;n++){var a=t[n];a.isNode()&&this.drawCachedElement(e,a,r,i)}},Sce.drawLayeredElements=function(e,t,r,i){var n=this.data.lyrTxrCache.getLayers(t,r);if(n)for(var a=0;a<n.length;a++){var s=n[a],o=s.bb;0!==o.w&&0!==o.h&&e.drawImage(s.canvas,o.x1,o.y1,o.w,o.h)}else this.drawCachedElements(e,t,r,i)},Dce={drawEdge:function(t,r,e){var i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,b,x=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],w=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],T=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],k=this,C=r._private.rscratch;T&&!r.visible()||C.badLine||null==C.allpts||isNaN(C.allpts[0])||(e&&t.translate(-(i=e).x1,-i.y1),d=T?r.pstyle("opacity").value:1,T=T?r.pstyle("line-opacity").value:1,n=r.pstyle("curve-style").value,a=r.pstyle("line-style").value,s=r.pstyle("width").pfValue,o=r.pstyle("line-cap").value,l=r.pstyle("line-outline-width").value,c=r.pstyle("line-outline-color").value,u=h=d*T,d=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;"straight-triangle"===n?(k.eleStrokeStyle(t,r,e),k.drawEdgeTrianglePath(r,t,C.allpts)):(t.lineWidth=s,t.lineCap=o,k.eleStrokeStyle(t,r,e),k.drawEdgePath(r,t,C.allpts,a),t.lineCap="butt")},"drawLine"),T=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;t.lineWidth=s+l,t.lineCap=o,0<l?(k.colorStrokeStyle(t,c[0],c[1],c[2],e),"straight-triangle"===n?k.drawEdgeTrianglePath(r,t,C.allpts):(k.drawEdgePath(r,t,C.allpts,a),t.lineCap="butt")):t.lineCap="butt"},"drawLineOutline"),p=mt(function(){w&&k.drawEdgeOverlay(t,r)},"drawOverlay"),g=mt(function(){w&&k.drawEdgeUnderlay(t,r)},"drawUnderlay"),f=mt(function(){k.drawArrowheads(t,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=mt(function(){k.drawElementText(t,r,null,x)},"drawText"),t.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,b=r.pstyle("ghost-opacity").value,b*=h,t.translate(y,v),d(b),f(b),t.translate(-y,-v)):T(),g(),d(),f(),p(),m(),e&&t.translate(i.x1,i.y1))}},Ice=mt(function(o){if(["overlay","underlay"].includes(o))return function(e,t){var r,i,n,a,s;t.visible()&&0!==(r=t.pstyle("".concat(o,"-opacity")).value)&&(i=this.usePaths(),n=t._private.rscratch,a=2*t.pstyle("".concat(o,"-padding")).pfValue,s=t.pstyle("".concat(o,"-color")).value,e.lineWidth=a,"self"!==n.edgeType||i?e.lineCap="round":e.lineCap="butt",this.colorStrokeStyle(e,s[0],s[1],s[2],r),this.drawEdgePath(t,e,n.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),Dce.drawEdgeOverlay=Ice("overlay"),Dce.drawEdgeUnderlay=Ice("underlay"),Dce.drawEdgePath=function(e,t,r,i){var n,a=e._private.rscratch,s=t,o=!1,l=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,h=e.pstyle("line-dash-offset").pfValue;if(l&&(e=r.join("$"),a.pathCacheKey&&a.pathCacheKey===e?(n=t=a.pathCache,o=!0):(n=t=new Path2D,a.pathCacheKey=e,a.pathCache=n)),s.setLineDash)switch(i){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=h;break;case"solid":s.setLineDash([])}if(!o&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var u=2;u+3<r.length;u+=4)t.quadraticCurveTo(r[u],r[u+1],r[u+2],r[u+3]);break;case"straight":case"haystack":for(var d=2;d+1<r.length;d+=2)t.lineTo(r[d],r[d+1]);break;case"segments":if(a.isRound){var p,g=KK(a.roundCorners);try{for(g.s();!(p=g.n()).done;)hJ(t,p.value)}catch(e){g.e(e)}finally{g.f()}t.lineTo(r[r.length-2],r[r.length-1])}else for(var f=2;f+1<r.length;f+=2)t.lineTo(r[f],r[f+1])}t=s,l?t.stroke(n):t.stroke(),t.setLineDash&&t.setLineDash([])},Dce.drawEdgeTrianglePath=function(e,t,r){t.fillStyle=t.strokeStyle;for(var i=e.pstyle("width").pfValue,n=0;n+1<r.length;n+=2){var a=[r[n+2]-r[n],r[n+3]-r[n+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[(a=[a[1]/s,-a[0]/s])[0]*i/2,a[1]*i/2];t.beginPath(),t.moveTo(r[n]-s[0],r[n+1]-s[1]),t.lineTo(r[n]+s[0],r[n+1]+s[1]),t.lineTo(r[n+2],r[n+3]),t.closePath(),t.fill()}},Dce.drawArrowheads=function(e,t,r){var i=t._private.rscratch,n="haystack"===i.edgeType;n||this.drawArrowhead(e,t,"source",i.arrowStartX,i.arrowStartY,i.srcArrowAngle,r),this.drawArrowhead(e,t,"mid-target",i.midX,i.midY,i.midtgtArrowAngle,r),this.drawArrowhead(e,t,"mid-source",i.midX,i.midY,i.midsrcArrowAngle,r),n||this.drawArrowhead(e,t,"target",i.arrowEndX,i.arrowEndY,i.tgtArrowAngle,r)},Dce.drawArrowhead=function(e,t,r,i,n,a,s){var o,l,c,h,u,d,p;isNaN(i)||null==i||isNaN(n)||null==n||isNaN(a)||null==a||"none"!==(o=t.pstyle(r+"-arrow-shape").value)&&(l="hollow"===t.pstyle(r+"-arrow-fill").value?"both":"filled",c=t.pstyle(r+"-arrow-fill").value,h=t.pstyle("width").pfValue,u="match-line"===(p=t.pstyle(r+"-arrow-width")).value?h:p.pfValue,"%"===p.units&&(u*=h),p=t.pstyle("opacity").value,d=e.globalCompositeOperation,1===(s=void 0===s?p:s)&&"hollow"!==c||(e.globalCompositeOperation="destination-out",this.colorFillStyle(e,255,255,255,1),this.colorStrokeStyle(e,255,255,255,1),this.drawArrowShape(t,e,l,h,o,u,i,n,a),e.globalCompositeOperation=d),p=t.pstyle(r+"-arrow-color").value,this.colorFillStyle(e,p[0],p[1],p[2],s),this.colorStrokeStyle(e,p[0],p[1],p[2],s),this.drawArrowShape(t,e,c,h,o,u,i,n,a))},Dce.drawArrowShape=function(e,t,r,i,n,a,s,o,l){var c,h,u,d=this.usePaths()&&"triangle-cross"!==n,p=!1,g=t,f={x:s,y:o},e=e.pstyle("arrow-scale").value,e=this.getArrowWidth(i,e),m=this.arrowShapes[n];d&&(null!=(u=(h=this.arrowPathCache=this.arrowPathCache||[])[n=Vte(n)])?(c=t=u,p=!0):(c=t=new Path2D,h[n]=c)),p||(t.beginPath&&t.beginPath(),d?m.draw(t,1,0,{x:0,y:0},1):m.draw(t,e,l,f,i),t.closePath&&t.closePath()),t=g,d&&(t.translate(s,o),t.rotate(l),t.scale(e,e)),"filled"!==r&&"both"!==r||(d?t.fill(c):t.fill()),"hollow"!==r&&"both"!==r||(t.lineWidth=a/(d?e:1),t.lineJoin="miter",d?t.stroke(c):t.stroke()),d&&(t.scale(1/e,1/e),t.rotate(-l),t.translate(-s,-o))},Mce={safeDrawImage:function(e,t,r,i,n,a,s,o,l,c){if(!(n<=0||a<=0||l<=0||c<=0))try{e.drawImage(t,r,i,n,a,s,o,l,c)}catch(e){ore(e)}},drawInscribedImage:function(e,t,r,i,n){var a,s,o,l=(c=r.position()).x,c=c.y,h=r.cy().style(),u=(h=h.getIndexedStyle.bind(h))(r,"background-fit","value",i),d=h(r,"background-repeat","value",i),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===h(r,"background-width-relative-to","value",i)?0:f),g=g+("inner"===h(r,"background-height-relative-to","value",i)?0:f),f=r._private.rscratch,m="node"===h(r,"background-clip","value",i),n=h(r,"background-image-opacity","value",i)*n,y=h(r,"background-image-smoothing","value",i),v=r.pstyle("corner-radius").value,b=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),t.width||t.cachedW),x=t.height||t.cachedH,w=(null!=b&&null!=x||(document.body.appendChild(t),b=t.cachedW=t.width||t.offsetWidth,x=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t)),b),T=x;"auto"!==h(r,"background-width","value",i)&&(w="%"===h(r,"background-width","units",i)?h(r,"background-width","pfValue",i)*p:h(r,"background-width","pfValue",i)),"auto"!==h(r,"background-height","value",i)&&(T="%"===h(r,"background-height","units",i)?h(r,"background-height","pfValue",i)*g:h(r,"background-height","pfValue",i)),0!==w&&0!==T&&("contain"===u?(w*=a=Math.min(p/w,g/T),T*=a):"cover"===u&&(w*=a=Math.max(p/w,g/T),T*=a),u=l-p/2,a=h(r,"background-position-x","units",i),s=h(r,"background-position-x","pfValue",i),u+="%"===a?(p-w)*s:s,a=h(r,"background-offset-x","units",i),s=h(r,"background-offset-x","pfValue",i),u+="%"===a?(p-w)*s:s,a=c-g/2,s=h(r,"background-position-y","units",i),o=h(r,"background-position-y","pfValue",i),a+="%"===s?(g-T)*o:o,s=h(r,"background-offset-y","units",i),o=h(r,"background-offset-y","pfValue",i),a+="%"===s?(g-T)*o:o,f.pathCache&&(u-=l,a-=c,c=l=0),h=e.globalAlpha,e.globalAlpha=n,i=this.getImgSmoothing(e),s=!1,"no"===y&&i?(this.setImgSmoothing(e,!1),s=!0):"yes"!==y||i||(this.setImgSmoothing(e,!0),s=!0),"no-repeat"===d?(m&&(e.save(),f.pathCache?e.clip(f.pathCache):(this.nodeShapes[this.getNodeShape(r)].draw(e,l,c,p,g,v,f),e.clip())),this.safeDrawImage(e,t,0,0,b,x,u,a,w,T),m&&e.restore()):(o=e.createPattern(t,d),e.fillStyle=o,this.nodeShapes[this.getNodeShape(r)].draw(e,l,c,p,g,v,f),e.translate(u,a),e.fill(),e.translate(-u,-a)),e.globalAlpha=h,s)&&this.setImgSmoothing(e,i)}},Oce={eleTextBiggerThanMin:function(e,t){var r,i;return t||(i=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Wre(i*r)),t=Math.pow(2,i)),!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,r,i,n){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==i){if(a&&!this.eleTextBiggerThanMin(t))return}else if(!1===i)return;if(t.isNode()){if(!(i=t.pstyle("label"))||!i.value)return;i=this.getLabelJustification(t),e.textAlign=i}else{var i=t.element()._private.rscratch.badLine,s=t.pstyle("label"),o=t.pstyle("source-label"),l=t.pstyle("target-label");if(i||(!s||!s.value)&&(!o||!o.value)&&(!l||!l.value))return;e.textAlign="center"}e.textBaseline="bottom";var c,i=!r;r&&e.translate(-(c=r).x1,-c.y1),null==n?(this.drawText(e,t,null,i,a),t.isEdge()&&(this.drawText(e,t,"source",i,a),this.drawText(e,t,"target",i,a))):this.drawText(e,t,n,i,a),r&&e.translate(c.x1,c.y1)},getFontCache:function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((t=this.fontCaches[r]).context===e)return t;return this.fontCaches.push(t={context:e}),t},setupTextStyle:function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],i=t.pstyle("font-style").strValue,n=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,r=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,o=t.pstyle("text-outline-opacity").value*r,l=t.pstyle("color").value,t=t.pstyle("text-outline-color").value;e.font=i+" "+s+" "+n+" "+a,e.lineJoin="round",this.colorFillStyle(e,l[0],l[1],l[2],r),this.colorStrokeStyle(e,t[0],t[1],t[2],o)}},mt(bJ,"circle"),mt(xJ,"roundRect"),Oce.getTextAngle=function(e,t){var r=e._private.rscratch,i=e.pstyle((t?t+"-":"")+"text-rotation");return"autorotate"===i.strValue?(r=yre(r,"labelAngle",t),e.isEdge()?r:0):"none"===i.strValue?0:i.pfValue},Oce.drawText=function(e,t,r){var i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=t._private.rscratch,a=(u=!(4<arguments.length&&void 0!==arguments[4])||arguments[4])?t.effectiveOpacity():1;if(!u||0!==a&&0!==t.pstyle("text-opacity").value){var s,o,l=yre(n,"labelX",r="main"===r?null:r),c=yre(n,"labelY",r),h=this.getLabelText(t,r);if(null!=h&&""!==h&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(e,t,u);var u=r?r+"-":"",d=yre(n,"labelWidth",r),p=yre(n,"labelHeight",r),g=t.pstyle(u+"text-margin-x").pfValue,u=t.pstyle(u+"text-margin-y").pfValue,f=t.isEdge(),m=t.pstyle("text-halign").value,y=t.pstyle("text-valign").value;switch(f&&(y=m="center"),l+=g,c+=u,0!==(f=i?this.getTextAngle(t,r):0)&&(s=l,o=c,e.translate(s,o),e.rotate(f),c=l=0),y){case"top":break;case"center":c+=p/2;break;case"bottom":c+=p}var g=t.pstyle("text-background-opacity").value,u=t.pstyle("text-border-opacity").value,v=t.pstyle("text-border-width").pfValue,i=t.pstyle("text-background-padding").pfValue,b="round-rectangle"===(x=t.pstyle("text-background-shape").strValue)||"roundrectangle"===x,x="circle"===x;if(0<g||0<v&&0<u){var w=e.fillStyle,T=e.strokeStyle,O=e.lineWidth,k=t.pstyle("text-background-color").value,C=t.pstyle("text-border-color").value,S=t.pstyle("text-border-style").value,E=0<g,_=0<v&&0<u,A=l-i;switch(m){case"left":A-=d;break;case"center":A-=d/2}var R=c-p-i,L=d+2*i,i=p+2*i;if(E&&(e.fillStyle="rgba(".concat(k[0],",").concat(k[1],",").concat(k[2],",").concat(g*a,")")),_&&(e.strokeStyle="rgba(".concat(C[0],",").concat(C[1],",").concat(C[2],",").concat(u*a,")"),e.lineWidth=v,e.setLineDash))switch(S){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=v/4,e.setLineDash([]);break;default:e.setLineDash([])}b?(e.beginPath(),xJ(e,A,R,L,i,2)):x?(e.beginPath(),bJ(e,A,R,L,i)):(e.beginPath(),e.rect(A,R,L,i)),E&&e.fill(),_&&e.stroke(),_&&"double"===S&&(k=v/2,e.beginPath(),b?xJ(e,A+k,R+k,L-2*k,i-2*k,2):e.rect(A+k,R+k,L-2*k,i-2*k),e.stroke()),e.fillStyle=w,e.strokeStyle=T,e.lineWidth=O,e.setLineDash&&e.setLineDash([])}var N=2*t.pstyle("text-outline-width").pfValue;if(0<N&&(e.lineWidth=N),"wrap"===t.pstyle("text-wrap").value){var D=yre(n,"labelWrapCachedLines",r),I=yre(n,"labelLineHeight",r),g=d/2;switch("auto"!==(C=this.getLabelJustification(t))&&("left"===m?"left"===C?l+=-d:"center"===C&&(l+=-g):"center"===m?"left"===C?l+=-g:"right"===C&&(l+=g):"right"===m&&("center"===C?l+=g:"right"===C&&(l+=d))),y){case"top":c-=(D.length-1)*I;break;case"center":case"bottom":c-=(D.length-1)*I}for(var M=0;M<D.length;M++)0<N&&e.strokeText(D[M],l,c),e.fillText(D[M],l,c),c+=I}else 0<N&&e.strokeText(h,l,c),e.fillText(h,l,c);0!==f&&(e.rotate(-f),e.translate(-s,-o))}}},Pce={drawNode:function(k,C,e){var O=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],t=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],S=this,s=C._private,o=s.rscratch,E=C.position();if(he(E.x)&&he(E.y)&&(!r||C.visible())){var i,l=r?C.effectiveOpacity():1,_=S.usePaths(),n=!1,r=C.padding(),A=C.width()+2*r,R=C.height()+2*r;e&&k.translate(-(i=e).x1,-i.y1);for(var a=C.pstyle("background-image").value,c=new Array(a.length),h=new Array(a.length),P=0,u=0;u<a.length;u++){var $,d=a[u];(c[u]=null!=d&&"none"!==d)&&($=C.cy().style().getIndexedStyle(C,"background-image-crossorigin","value",u),P++,h[u]=S.getCachedImage(d,$,function(){s.backgroundTimestamp=Date.now(),C.emitAndNotify("background")}))}var p,g,f,m,y,v=C.pstyle("background-blacken").value,L=C.pstyle("border-width").pfValue,B=C.pstyle("background-opacity").value*l,b=C.pstyle("border-color").value,F=C.pstyle("border-style").value,z=C.pstyle("border-join").value,q=C.pstyle("border-cap").value,N=C.pstyle("border-position").value,U=C.pstyle("border-dash-pattern").pfValue,G=C.pstyle("border-dash-offset").pfValue,j=C.pstyle("border-opacity").value*l,D=C.pstyle("outline-width").pfValue,x=C.pstyle("outline-color").value,W=C.pstyle("outline-style").value,Y=C.pstyle("outline-opacity").value*l,I=C.pstyle("outline-offset").value,M=C.pstyle("corner-radius").value,r=("auto"!==M&&(M=C.pstyle("corner-radius").pfValue),mt(function(){S.eleFillStyle(k,C,0<arguments.length&&void 0!==arguments[0]?arguments[0]:B)},"setupShapeColor")),V=mt(function(){S.colorStrokeStyle(k,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:j)},"setupBorderColor"),H=mt(function(){S.colorStrokeStyle(k,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:Y)},"setupOutlineColor"),X=mt(function(e,t,r,i){var n,a=S.nodePathCache=S.nodePathCache||[],i=Hte("polygon"===r?r+","+i.join(","):r,""+t,""+e,""+M),t=!1;return null!=(r=a[i])?(t=!0,o.pathCache=n=r):(n=new Path2D,a[i]=o.pathCache=n),{path:n,cacheHit:t}},"getPath"),w=C.pstyle("shape").strValue,T=C.pstyle("shape-polygon-points").pfValue,T=(_&&(k.translate(E.x,E.y),w=X(A,R,w,T),p=w.path,n=w.cacheHit),mt(function(){var e;n||(e=_?{x:0,y:0}:E,S.nodeShapes[S.getNodeShape(C)].draw(p||k,e.x,e.y,A,R,M,o)),_?k.fill(p):k.fill()},"drawShape")),w=mt(function(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l,t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=s.backgrounding,i=0,n=0;n<h.length;n++){var a=C.cy().style().getIndexedStyle(C,"background-image-containment","value",n);t&&"over"===a||!t&&"inside"===a?i++:c[n]&&h[n].complete&&!h[n].error&&(i++,S.drawInscribedImage(k,h[n],C,n,e))}s.backgrounding=i!==P,r!==s.backgrounding&&C.updateStyle(!1)},"drawImages"),K=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;S.hasPie(C)&&(S.drawPie(k,C,t),e)&&(_||S.nodeShapes[S.getNodeShape(C)].draw(k,E.x,E.y,A,R,M,o))},"drawPie"),Z=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;S.hasStripe(C)&&(k.save(),_?k.clip(o.pathCache):(S.nodeShapes[S.getNodeShape(C)].draw(k,E.x,E.y,A,R,M,o),k.clip()),S.drawStripe(k,C,t),k.restore(),e)&&(_||S.nodeShapes[S.getNodeShape(C)].draw(k,E.x,E.y,A,R,M,o))},"drawStripe"),Q=mt(function(){var e=0<v?0:255;0!==v&&(S.colorFillStyle(k,e,e,e,(0<v?v:-v)*(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l)),_?k.fill(p):k.fill())},"darken"),J=mt(function(){if(0<L){if(k.lineWidth=L,k.lineCap=q,k.lineJoin=z,k.setLineDash)switch(F){case"dotted":k.setLineDash([1,1]);break;case"dashed":k.setLineDash(U),k.lineDashOffset=G;break;case"solid":case"double":k.setLineDash([])}var e;"center"!==N?(k.save(),k.lineWidth*=2,"inside"===N?_?k.clip(p):k.clip():((e=new Path2D).rect(-A/2-L,-R/2-L,A+2*L,R+2*L),e.addPath(p),k.clip(e,"evenodd")),_?k.stroke(p):k.stroke(),k.restore()):_?k.stroke(p):k.stroke(),"double"===F&&(k.lineWidth=L/3,e=k.globalCompositeOperation,k.globalCompositeOperation="destination-out",_?k.stroke(p):k.stroke(),k.globalCompositeOperation=e),k.setLineDash&&k.setLineDash([])}},"drawBorder"),ee=mt(function(){if(0<D){if(k.lineWidth=D,k.lineCap="butt",k.setLineDash)switch(W){case"dotted":k.setLineDash([1,1]);break;case"dashed":k.setLineDash([4,2]);break;case"solid":case"double":k.setLineDash([])}var e,t=E,r=(_&&(t={x:0,y:0}),S.getNodeShape(C)),i="inside"===N?0:L,n=("outside"===N&&(i*=2),(A+i+(D+I))/A),a=(R+i+(D+I))/R,s=A*n,o=R*a,l=S.nodeShapes[r].points;if(_&&(e=X(s,o,r,l).path),"ellipse"===r)S.drawEllipsePath(e||k,t.x,t.y,s,o);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(r)){var c=0,h=0,u=0;"round-diamond"===r?c=1.4*(i+I+D):"round-heptagon"===r?(c=1.075*(i+I+D),u=-(i/2+I+D)/35):"round-hexagon"===r?c=1.12*(i+I+D):"round-pentagon"===r?(c=1.13*(i+I+D),u=-(i/2+I+D)/15):"round-tag"===r?(c=1.12*(i+I+D),h=.07*(i/2+D+I)):"round-triangle"===r&&(c=(i+I+D)*(Math.PI/2),u=-(i+I/2+D)/Math.PI),0!==c&&(s=A*(n=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(o=R*(a=(R+c)/R)));for(var d=s/2,p=o/2,g=(M="auto"===M?Bie(s,o):M)+(i+D+I)/2,f=new Array(l.length/2),m=new Array(l.length/2),y=0;y<l.length/2;y++)f[y]={x:t.x+h+d*l[2*y],y:t.y+u+p*l[2*y+1]};for(var v,b,x=f.length,w=f[x-1],T=0;T<x;T++)v=f[T%x],b=f[(T+1)%x],m[T]=uJ(w,v,b,g),w=v;S.drawRoundPolygonPath(e||k,t.x+h,t.y+u,A*n,R*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(M="auto"===M?$ie(s,o):M,S.drawRoundRectanglePath(e||k,t.x,t.y,s,o,M+(i+D+I)/2)):["cutrectangle","cut-rectangle"].includes(r)?(M="auto"===M?Fie():M,S.drawCutRectanglePath(e||k,t.x,t.y,s,o,null,M+(i+D+I)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(M="auto"===M?$ie(s,o):M,S.drawBottomRoundRectanglePath(e||k,t.x,t.y,s,o,M+(i+D+I)/2)):"barrel"===r?S.drawBarrelPath(e||k,t.x,t.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?kie(Cie(l,(i+D+I)/A)):kie(Cie(l,-(i+D+I)/A)),S.drawPolygonPath(e||k,t.x,t.y,A,R,l));_?k.stroke(e):k.stroke(),"double"===W&&(k.lineWidth=i/3,c=k.globalCompositeOperation,k.globalCompositeOperation="destination-out",_?k.stroke(e):k.stroke(),k.globalCompositeOperation=c),k.setLineDash&&k.setLineDash([])}},"drawOutline"),te=mt(function(){t&&S.drawNodeOverlay(k,C,E,A,R)},"drawOverlay"),re=mt(function(){t&&S.drawNodeUnderlay(k,C,E,A,R)},"drawUnderlay"),ie=mt(function(){S.drawElementText(k,C,null,O)},"drawText");"yes"===C.pstyle("ghost").value&&(g=C.pstyle("ghost-offset-x").pfValue,f=C.pstyle("ghost-offset-y").pfValue,y=(m=C.pstyle("ghost-opacity").value)*l,k.translate(g,f),H(),ee(),r(m*B),T(),w(y,!0),V(m*j),J(),K(0!==v||0!==L),Z(0!==v||0!==L),w(y,!1),Q(y),k.translate(-g,-f)),_&&k.translate(-E.x,-E.y),re(),_&&k.translate(E.x,E.y),H(),ee(),r(),T(),w(l,!0),V(),J(),K(0!==v||0!==L),Z(0!==v||0!==L),w(l,!1),Q(),_&&k.translate(-E.x,-E.y),ie(),te(),e&&k.translate(i.x1,i.y1)}}},$ce=mt(function(u){if(["overlay","underlay"].includes(u))return function(e,t,r,i,n){var a,s,o,l,c,h;t.visible()&&(a=t.pstyle("".concat(u,"-padding")).pfValue,s=t.pstyle("".concat(u,"-opacity")).value,o=t.pstyle("".concat(u,"-color")).value,l=t.pstyle("".concat(u,"-shape")).value,c=t.pstyle("".concat(u,"-corner-radius")).value,0<s)&&(r=r||t.position(),null!=i&&null!=n||(h=t.padding(),i=t.width()+2*h,n=t.height()+2*h),this.colorFillStyle(e,o[0],o[1],o[2],s),this.nodeShapes[l].draw(e,r.x,r.y,i+2*a,n+2*a,c),e.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),Pce.drawNodeOverlay=$ce("overlay"),Pce.drawNodeUnderlay=$ce("underlay"),Pce.hasPie=function(e){return(e=e[0])._private.hasPie},Pce.hasStripe=function(e){return(e=e[0])._private.hasStripe},Pce.drawPie=function(e,t,r,i){t=t[0],i=i||t.position();var n,a=t.cy().style(),s=t.pstyle("pie-size"),o=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,c=i.x,h=i.y,i=t.width(),u=t.height(),d=Math.min(i,u)/2,p=0;if(this.usePaths()&&(h=c=0),"%"===s.units?d*=s.pfValue:void 0!==s.pfValue&&(d=s.pfValue/2),"%"===o.units?n=d*o.pfValue:void 0!==o.pfValue&&(n=o.pfValue/2),!(d<=n))for(var g=1;g<=a.pieBackgroundN;g++){var f=t.pstyle("pie-"+g+"-background-size").value,m=t.pstyle("pie-"+g+"-background-color").value,y=t.pstyle("pie-"+g+"-background-opacity").value*r,v=f/100,b=(1<v+p&&(v=1-p),1.5*Math.PI+2*Math.PI*p),x=(b+=l)+2*Math.PI*v;0===f||1<=p||1<p+v||(0===n?(e.beginPath(),e.moveTo(c,h),e.arc(c,h,d,b,x)):(e.beginPath(),e.arc(c,h,d,b,x),e.arc(c,h,n,x,b,!0)),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),p+=v)}},Pce.drawStripe=function(e,t,r,i){t=t[0],i=i||t.position();var n=t.cy().style(),a=i.x,s=i.y,i=t.width(),o=t.height(),l=0,c=this.usePaths(),h=(e.save(),t.pstyle("stripe-direction").value),u=t.pstyle("stripe-size");switch(h){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var d=i,p=o;"%"===u.units?(d*=u.pfValue,p*=u.pfValue):void 0!==u.pfValue&&(d=u.pfValue,p=u.pfValue),c&&(s=a=0),s-=d/2,a-=p/2;for(var g=1;g<=n.stripeBackgroundN;g++){var f=t.pstyle("stripe-"+g+"-background-size").value,m=t.pstyle("stripe-"+g+"-background-color").value,y=t.pstyle("stripe-"+g+"-background-opacity").value*r,v=f/100;1<v+l&&(v=1-l),0===f||1<=l||1<l+v||(e.beginPath(),e.rect(a,s+p*l,d,p*v),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),l+=v)}e.restore()},Bce={getPixelRatio:function(){var e,t=this.data.contexts[0];return null!=this.forcedPixelRatio?this.forcedPixelRatio:(e=this.cy.window(),t=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,(e.devicePixelRatio||1)/t)},paintCache:function(e){for(var t,r=this.paintCaches=this.paintCaches||[],i=!0,n=0;n<r.length;n++)if((t=r[n]).context===e){i=!1;break}return i&&r.push(t={context:e}),t},createGradientStyleFor:function(e,t,r,i,n){var a=this.usePaths(),s=r.pstyle(t+"-gradient-stop-colors").value,o=r.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===i)i=r.isEdge()?(t=r.sourceEndpoint(),i=r.targetEndpoint(),l=r.midpoint(),t=Vre(t,l),Vre(i,l)):(l=a?{x:0,y:0}:r.position(),t=r.paddedWidth(),r.paddedHeight()),c=e.createRadialGradient(l.x,l.y,0,l.x,l.y,Math.max(t,i));else if(r.isEdge())var l=r.sourceEndpoint(),t=r.targetEndpoint(),c=e.createLinearGradient(l.x,l.y,t.x,t.y);else{var h=a?{x:0,y:0}:r.position(),u=r.paddedWidth()/2,d=r.paddedHeight()/2;switch(r.pstyle("background-gradient-direction").value){case"to-bottom":c=e.createLinearGradient(h.x,h.y-d,h.x,h.y+d);break;case"to-top":c=e.createLinearGradient(h.x,h.y+d,h.x,h.y-d);break;case"to-left":c=e.createLinearGradient(h.x+u,h.y,h.x-u,h.y);break;case"to-right":c=e.createLinearGradient(h.x-u,h.y,h.x+u,h.y);break;case"to-bottom-right":case"to-right-bottom":c=e.createLinearGradient(h.x-u,h.y-d,h.x+u,h.y+d);break;case"to-top-right":case"to-right-top":c=e.createLinearGradient(h.x-u,h.y+d,h.x+u,h.y-d);break;case"to-bottom-left":case"to-left-bottom":c=e.createLinearGradient(h.x+u,h.y-d,h.x-u,h.y+d);break;case"to-top-left":case"to-left-top":c=e.createLinearGradient(h.x+u,h.y+d,h.x-u,h.y-d)}}if(!c)return null;for(var p=o.length===s.length,g=s.length,f=0;f<g;f++)c.addColorStop(p?o[f]:f/(g-1),"rgba("+s[f][0]+","+s[f][1]+","+s[f][2]+","+n+")");return c},gradientFillStyle:function(e,t,r,i){if(!(t=this.createGradientStyleFor(e,"background",t,r,i)))return null;e.fillStyle=t},colorFillStyle:function(e,t,r,i,n){e.fillStyle="rgba("+t+","+r+","+i+","+n+")"},eleFillStyle:function(e,t,r){var i=t.pstyle("background-fill").value;"linear-gradient"===i||"radial-gradient"===i?this.gradientFillStyle(e,t,i,r):(i=t.pstyle("background-color").value,this.colorFillStyle(e,i[0],i[1],i[2],r))},gradientStrokeStyle:function(e,t,r,i){if(!(t=this.createGradientStyleFor(e,"line",t,r,i)))return null;e.strokeStyle=t},colorStrokeStyle:function(e,t,r,i,n){e.strokeStyle="rgba("+t+","+r+","+i+","+n+")"},eleStrokeStyle:function(e,t,r){var i=t.pstyle("line-fill").value;"linear-gradient"===i||"radial-gradient"===i?this.gradientStrokeStyle(e,t,i,r):(i=t.pstyle("line-color").value,this.colorStrokeStyle(e,i[0],i[1],i[2],r))},matchCanvasSize:function(e){var t,r=this,i=r.data,n=(s=r.findContainerClientCoords())[2],a=s[3],s=r.getPixelRatio(),o=r.motionBlurPxRatio,l=n*(s=e!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]&&e!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]?s:o),c=a*s;if(l!==r.canvasWidth||c!==r.canvasHeight){r.fontCaches=null,(e=i.canvasContainer).style.width=n+"px",e.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(t=i.canvases[h]).width=l,t.height=c,t.style.width=n+"px",t.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(t=i.bufferCanvases[h]).width=l,t.height=c,t.style.width=n+"px",t.style.height=a+"px";s<=(r.textureMult=1)&&(t=i.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,t.width=l*r.textureMult,t.height=c*r.textureMult),r.canvasWidth=l,r.canvasHeight=c,r.pixelRatio=s}},renderTo:function(e,t,r,i){this.render({forcedContext:e,forcedZoom:t,forcedPan:r,drawAllLayers:!0,forcedPxRatio:i})},clearCanvas:function(){var t=this,e=t.data;function r(e){e.clearRect(0,0,t.canvasWidth,t.canvasHeight)}mt(r,"clear"),r(e.contexts[t.NODE]),r(e.contexts[t.DRAG])},render:function(e){var s=this,t=(e=e||pre(),s.cy),o=e.forcedContext,l=e.drawAllLayers,r=e.drawOnlyNodeLayer,c=e.forcedZoom,h=e.forcedPan,i=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,u=s.data,n=u.canvasNeedsRedraw,a=s.textureOnViewport&&!o&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),d=(void 0!==e.motionBlur?e:s).motionBlur,p=s.motionBlurPxRatio,g=t.hasCompoundNodes(),f=s.hoverData.draggingEles,m=!(!s.hoverData.selecting&&!s.touchData.selecting),y=d=d&&!o&&s.motionBlurEnabled&&!m,m=(o||(s.prevPxRatio!==i&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=i),!o&&s.motionBlurTimeout&&clearTimeout(s.motionBlurTimeout),d&&(null==s.mbFrames&&(s.mbFrames=0),s.mbFrames++,s.mbFrames<3&&(y=!1),s.mbFrames>s.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(),w={x:x.x,y:x.y},T={zoom:v,pan:{x:x.x,y:x.y}},k=(void 0===(k=s.prevViewport)||T.zoom!==k.zoom||T.pan.x!==k.pan.x||T.pan.y!==k.pan.y||f&&!g||(s.motionBlurPxRatio=1),b*=i,(w=h||w).x*=i,w.y*=i,s.getCachedZSortedEles());function C(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 S(e,t){var r,i,n,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,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?C(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(C,"mbclear"),mt(S,"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}),(T=s.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-T.pan.x)/T.zoom,y:(0-T.pan.y)/T.zoom}),n[s.DRAG]=!1,n[s.NODE]=!1,E=u.contexts[s.NODE],g=s.textureCache.texture,T=s.textureCache.viewport,E.setTransform(1,0,0,1,0,0),d?C(E,0,0,T.width,T.height):E.clearRect(0,0,T.width,T.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(E,f[0],f[1],f[2],m),E.fillRect(0,0,T.width,T.height),v=t.zoom(),S(E,!1),E.clearRect(T.mpan.x,T.mpan.y,T.width/T.zoom/i,T.height/T.zoom/i),E.drawImage(g,T.mpan.x,T.mpan.y,T.width/T.zoom/i,T.height/T.zoom/i)):s.textureOnViewport&&!o&&(s.textureCache=null);var E,_,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])&&(_=d&&!m[s.NODE]&&1!==p,S(E=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(E,k.nondrag,i,f):s.drawLayeredElements(E,k.nondrag,i,f),s.debug&&s.drawDebugPoints(E,k.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,S(E=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(E,k.drag,i,f):s.drawCachedElements(E,k.drag,i,f),s.debug&&s.drawDebugPoints(E,k.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(e,S),d&&1!==p&&(r=u.contexts[s.NODE],_=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):C(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,_,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=T,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)&&(s.strokeStyle="rgba("+n.core("selection-box-border-color").value[0]+","+n.core("selection-box-border-color").value[1]+","+n.core("selection-box-border-color").value[2]+","+n.core("selection-box-opacity").value+")",s.strokeRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1])),a.bgActivePosistion&&!i.hoverData.selecting&&(r=i.cy.zoom(),e=a.bgActivePosistion,s.fillStyle="rgba("+n.core("active-bg-color").value[0]+","+n.core("active-bg-color").value[1]+","+n.core("active-bg-color").value[2]+","+n.core("active-bg-opacity").value+")",s.beginPath(),s.arc(e.x,e.y,n.core("active-bg-size").pfValue/r,0,2*Math.PI),s.fill()),t=i.lastRedrawTime,i.showFps&&t&&(e="1 frame = "+(t=Math.round(t))+" ms = "+(a=Math.round(1e3/t))+" fps",s.setTransform(1,0,0,1,0,0),s.fillStyle="rgba(255, 0, 0, 0.75)",s.strokeStyle="rgba(255, 0, 0, 0.75)",s.font="30px Arial",Fce||(n=s.measureText(e),Fce=n.actualBoundingBoxAscent),s.fillText(e,0,Fce),s.strokeRect(0,Fce+10,250,20),s.fillRect(0,Fce+10,250*Math.min(a/60,1),20)),o||(l[i.SELECT_BOX]=!1))}},mt(wJ,"compileShader"),mt(TJ,"createProgram"),mt(kJ,"createTextureCanvas"),mt(CJ,"getEffectivePanZoom"),mt(SJ,"getEffectiveZoom"),mt(EJ,"modelToRenderedPosition"),mt(_J,"isSimpleShape"),mt(AJ,"arrayEqual"),mt(RJ,"toWebGLColor"),mt(LJ,"indexToVec4"),mt(NJ,"vec4ToIndex"),mt(DJ,"createTexture"),mt(IJ,"getTypeInfo"),mt(MJ,"createTypedArray"),mt(OJ,"createTypedArrayView"),mt(PJ,"createBufferStaticDraw"),mt($J,"createBufferDynamicDraw"),mt(BJ,"create3x3MatrixBufferDynamicDraw"),mt(FJ,"createPickingFrameBuffer"),zce=typeof Float32Array<"u"?Float32Array:Array,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),mt(zJ,"create"),mt(qJ,"identity"),mt(UJ,"multiply"),mt(GJ,"translate"),mt(jJ,"rotate"),mt(WJ,"scale"),mt(YJ,"projection"),mt(D,"Atlas"),qce=XK(D,[{key:"lock",value:mt(function(){this.locked=!0},"lock")},{key:"getKeys",value:mt(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:mt(function(e){var t=e.w,e=e.h,r=this.texHeight,i=this.texSize,n=t*(r/=e),a=e*r;return i<n&&(n=t*(r=i/t),a=e*r),{scale:r,texW:n,texH:a}},"getScale")},{key:"draw",value:mt(function(e,i,n){var l=this;if(this.locked)throw new Error("can't draw, atlas is locked");var c=this.texSize,t=this.texRows,h=this.texHeight,a=(r=this.getScale(i)).scale,u=r.texW,d=r.texH,p=mt(function(e,t){var r;n&&t&&(t=t.context,r=e.x,e=h*e.row,t.save(),t.translate(r,e),t.scale(a,a),n(t,i),t.restore())},"drawAt"),g=[null,null],r=mt(function(){p(l.freePointer,l.canvas),g[0]={x:l.freePointer.x,y:l.freePointer.row*h,w:u,h:d},g[1]={x:l.freePointer.x+u,y:l.freePointer.row*h,w:0,h:d},l.freePointer.x+=u,l.freePointer.x==c&&(l.freePointer.x=0,l.freePointer.row++)},"drawNormal"),s=mt(function(){var e=l.scratch,t=l.canvas,r=(e.clear(),p({x:0,row:0},e),c-l.freePointer.x),i=u-r,n=h,a=l.freePointer.x,s=l.freePointer.row*h,o=r;t.context.drawImage(e,0,0,o,n,a,s,o,n),g[0]={x:a,y:s,w:o,h:d},a=(l.freePointer.row+1)*h,s=i,t&&t.context.drawImage(e,r,0,s,n,0,a,s,n),g[1]={x:0,y:a,w:s,h:d},l.freePointer.x=i,l.freePointer.row++},"drawWrapped"),o=mt(function(){l.freePointer.x=0,l.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+u<=c)r();else{if(this.freePointer.row>=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<r-1)},"canFit")},{key:"bufferIfNeeded",value:mt(function(e){this.texture||(this.texture=DJ(e,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked)&&(this.canvas=null,this.scratch=null)},"bufferIfNeeded")},{key:"dispose",value:mt(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0},"dispose")}]),mt(N,"AtlasCollection"),Uce=XK(N,[{key:"getKeys",value:mt(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"_createAtlas",value:mt(function(){var e=this.r,t=this.texSize,r=this.texRows,i=this.createTextureCanvas;return new qce(e,t,r,i)},"_createAtlas")},{key:"_getScratchCanvas",value:mt(function(){var e,t,r,i;return this.scratch||(e=this.r,t=this.texSize,i=this.texRows,r=this.createTextureCanvas,i=Math.floor(t/i),this.scratch=r(e,t,i,"scratch")),this.scratch},"_getScratchCanvas")},{key:"draw",value:mt(function(e,t,r){var i=this.styleKeyToAtlas.get(e);return i||((i=this.atlases[this.atlases.length-1])&&i.canFit(t)||(i&&i.lock(),i=this._createAtlas(),this.atlases.push(i)),i.draw(e,t,r),this.styleKeyToAtlas.set(e,i)),i},"draw")},{key:"getAtlas",value:mt(function(e){return this.styleKeyToAtlas.get(e)},"getAtlas")},{key:"hasAtlas",value:mt(function(e){return this.styleKeyToAtlas.has(e)},"hasAtlas")},{key:"markKeyForGC",value:mt(function(e){this.markedKeys.add(e)},"markKeyForGC")},{key:"gc",value:mt(function(){var c=this,h=this.markedKeys;if(0===h.size)console.log("nothing to garbage collect");else{var u,d=[],p=new Map,g=null,e=KK(this.atlases);try{var t=mt(function(){var t=u.value,e=t.getKeys(),r=VJ(h,e);if(0===r.size)return d.push(t),e.forEach(function(e){return p.set(e,t)}),1;g||(g=c._createAtlas(),d.push(g));var i,n=KK(e);try{for(n.s();!(i=n.n()).done;){var a,s,o,l=i.value;r.has(l)||(s=(a=rZ(t.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g.lock(),g=c._createAtlas(),d.push(g)),t.canvas&&(c._copyTextureToNewAtlas(l,t,g),p.set(l,g)))}}catch(e){n.e(e)}finally{n.f()}t.dispose()},"_loop");for(e.s();!(u=e.n()).done;)t()}catch(t){e.e(t)}finally{e.f()}this.atlases=d,this.styleKeyToAtlas=p,this.markedKeys=new Set}},"gc")},{key:"_copyTextureToNewAtlas",value:mt(function(e,t,r){var i,n,a,s=rZ(t.getOffsets(e),2),o=s[0];0===(s=s[1]).w?r.draw(e,o,function(e){e.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h)}):((i=this._getScratchCanvas()).clear(),i.context.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),i.context.drawImage(t.canvas,s.x,s.y,s.w,s.h,o.w,0,s.w,s.h),n=o.w+s.w,a=o.h,r.draw(e,{w:n,h:a},function(e){e.drawImage(i,0,0,n,a,0,0,n,a)}))},"_copyTextureToNewAtlas")},{key:"getCounts",value:mt(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}]),mt(VJ,"intersection"),mt(O,"AtlasManager"),Gce=XK(O,[{key:"getAtlasSize",value:mt(function(){return this.atlasSize},"getAtlasSize")},{key:"addAtlasCollection",value:mt(function(e,t){var r=(i=this.globalOptions).webglTexSize,t=t.texRows,i=this._cacheScratchCanvas(i.createTextureCanvas),r=new Uce(this.r,r,t,i);this.collections.set(e,r)},"addAtlasCollection")},{key:"addRenderType",value:mt(function(e,t){var r=t.collection;if(!this.collections.has(r))throw new Error("invalid atlas collection name '".concat(r,"'"));r=this.collections.get(r),r=Kee({type:e,atlasCollection:r},t),this.renderTypes.set(e,r)},"addRenderType")},{key:"getRenderTypeOpts",value:mt(function(e){return this.renderTypes.get(e)},"getRenderTypeOpts")},{key:"getAtlasCollection",value:mt(function(e){return this.collections.get(e)},"getAtlasCollection")},{key:"_cacheScratchCanvas",value:mt(function(n){var a=-1,s=-1,o=null;return function(e,t,r,i){return i?o=o&&t==a&&r==s?o:n(e,a=t,s=r):n(e,t,r)}},"_cacheScratchCanvas")},{key:"_key",value:mt(function(e,t){return"".concat(e,"-").concat(t)},"_key")},{key:"invalidate",value:mt(function(e){var t,n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,a=void 0!==i&&i,s=void 0===(i=r.filterEle)?function(){return!0}:i,o=void 0===(i=r.filterType)?function(){return!0}:i,l=!1,c=!1,h=KK(e);try{for(h.s();!(t=h.n()).done;){var u=t.value;if(s(u)){var d,p=KK(this.renderTypes.values());try{var g=mt(function(){var t,e,r=d.value,i=r.type;o(i)&&(t=n.collections.get(r.collection),e=r.getKey(u),e=Array.isArray(e)?e:[e],a?(e.forEach(function(e){return t.markKeyForGC(e)}),c=!0):(r=r.getID?r.getID(u):u.id(),i=n._key(i,r),void 0===(r=n.typeAndIdToKey.get(i))||AJ(e,r)||(l=!0,n.typeAndIdToKey.delete(i),r.forEach(function(e){return t.markKeyForGC(e)}))))},"_loop2");for(p.s();!(d=p.n()).done;)g()}catch(e){p.e(e)}finally{p.f()}}}}catch(e){h.e(e)}finally{h.f()}return c&&(this.gc(),l=!1),l},"invalidate")},{key:"gc",value:mt(function(){var e,t=KK(this.collections.values());try{for(t.s();!(e=t.n()).done;)e.value.gc()}catch(e){t.e(e)}finally{t.f()}},"gc")},{key:"getOrCreateAtlas",value:mt(function(t,e,r,i){var n,a=this.renderTypes.get(e),s=this.collections.get(a.collection),o=!1,s=s.draw(i,r,function(e){a.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,r.w,r.h),e.clip(),a.drawElement(e,t,r,!0,!0),e.restore()):a.drawElement(e,t,r,!0,!0),o=!0});return o&&(n=a.getID?a.getID(t):t.id(),e=this._key(e,n),this.typeAndIdToKey.has(e)?this.typeAndIdToKey.get(e).push(i):this.typeAndIdToKey.set(e,[i])),s},"getOrCreateAtlas")},{key:"getAtlasInfo",value:mt(function(n,a){var s=this,o=this.renderTypes.get(a),e=o.getKey(n);return(Array.isArray(e)?e:[e]).map(function(e){var t=o.getBoundingBox(n,e),r=s.getOrCreateAtlas(n,a,t,e),i=(e=rZ(r.getOffsets(e),2))[0];return{atlas:r,tex:i,tex1:i,tex2:e[1],bb:t}})},"getAtlasInfo")},{key:"getDebugInfo",value:mt(function(){var e,t=[],r=KK(this.collections);try{for(r.s();!(e=r.n()).done;){var i=rZ(e.value,2),n=i[0],a=i[1].getCounts(),s=a.keyCount;t.push({type:n,keyCount:s,atlasCount:a.atlasCount})}}catch(e){r.e(e)}finally{r.f()}return t},"getDebugInfo")}]),mt(M,"AtlasBatchManager"),jce=XK(M,[{key:"getMaxAtlasesPerBatch",value:mt(function(){return this.maxAtlasesPerBatch},"getMaxAtlasesPerBatch")},{key:"getAtlasSize",value:mt(function(){return this.atlasSize},"getAtlasSize")},{key:"getIndexArray",value:mt(function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})},"getIndexArray")},{key:"startBatch",value:mt(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:mt(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:mt(function(){return this.batchAtlases},"getAtlases")},{key:"canAddToCurrentBatch",value:mt(function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)},"canAddToCurrentBatch")},{key:"getAtlasIndexForBatch",value:mt(function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t},"getAtlasIndexForBatch")}]),Wce={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Yce={IGNORE:1,USE_BB:2},mt(I,"ElementDrawingWebGL"),Vce=XK(I,[{key:"addAtlasCollection",value:mt(function(e,t){this.atlasManager.addAtlasCollection(e,t)},"addAtlasCollection")},{key:"addTextureAtlasRenderType",value:mt(function(e,t){this.atlasManager.addRenderType(e,t)},"addTextureAtlasRenderType")},{key:"addSimpleShapeRenderType",value:mt(function(e,t){this.simpleShapeOptions.set(e,t)},"addSimpleShapeRenderType")},{key:"invalidate",value:mt(function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return t?r.invalidate(e,{filterType:mt(function(e){return e===t},"filterType"),forceRedraw:!0}):r.invalidate(e)},"invalidate")},{key:"gc",value:mt(function(){this.atlasManager.gc()},"gc")},{key:"_createShaderProgram",value:mt(function(e){var t=this.gl,r=`#version 300 es
|
||
precision highp float;
|
||
|
||
uniform mat3 uPanZoomMatrix;
|
||
uniform int uAtlasSize;
|
||
|
||
// instanced
|
||
in vec2 aPosition; // a vertex from the unit square
|
||
|
||
in mat3 aTransform; // used to transform verticies, eg into a bounding box
|
||
in int aVertType; // the type of thing we are rendering
|
||
|
||
// the z-index that is output when using picking mode
|
||
in vec4 aIndex;
|
||
|
||
// For textures
|
||
in int aAtlasId; // which shader unit/atlas to use
|
||
in vec4 aTex; // x/y/w/h of texture in atlas
|
||
|
||
// for edges
|
||
in vec4 aPointAPointB;
|
||
in vec4 aPointCPointD;
|
||
in vec2 aLineWidth; // also used for node border width
|
||
|
||
// simple shapes
|
||
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
|
||
in vec4 aColor; // also used for edges
|
||
in vec4 aBorderColor; // aLineWidth is used for border width
|
||
|
||
// output values passed to the fragment shader
|
||
out vec2 vTexCoord;
|
||
out vec4 vColor;
|
||
out vec2 vPosition;
|
||
// flat values are not interpolated
|
||
flat out int vAtlasId;
|
||
flat out int vVertType;
|
||
flat out vec2 vTopRight;
|
||
flat out vec2 vBotLeft;
|
||
flat out vec4 vCornerRadius;
|
||
flat out vec4 vBorderColor;
|
||
flat out vec2 vBorderWidth;
|
||
flat out vec4 vIndex;
|
||
|
||
void main(void) {
|
||
int vid = gl_VertexID;
|
||
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
|
||
|
||
if(aVertType == `.concat(0,`) {
|
||
float texX = aTex.x; // texture coordinates
|
||
float texY = aTex.y;
|
||
float texW = aTex.z;
|
||
float texH = aTex.w;
|
||
|
||
if(vid == 1 || vid == 2 || vid == 4) {
|
||
texX += texW;
|
||
}
|
||
if(vid == 2 || vid == 4 || vid == 5) {
|
||
texY += texH;
|
||
}
|
||
|
||
float d = float(uAtlasSize);
|
||
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||
}
|
||
else if(aVertType == `).concat(4," || aVertType == ").concat(7,`
|
||
|| aVertType == `).concat(5," || aVertType == ").concat(6,`) { // simple shapes
|
||
|
||
// the bounding box is needed by the fragment shader
|
||
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
|
||
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
|
||
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
|
||
|
||
// calculations are done in the fragment shader, just pass these along
|
||
vColor = aColor;
|
||
vCornerRadius = aCornerRadius;
|
||
vBorderColor = aBorderColor;
|
||
vBorderWidth = aLineWidth;
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||
}
|
||
else if(aVertType == `).concat(1,`) {
|
||
vec2 source = aPointAPointB.xy;
|
||
vec2 target = aPointAPointB.zw;
|
||
|
||
// adjust the geometry so that the line is centered on the edge
|
||
position.y = position.y - 0.5;
|
||
|
||
// stretch the unit square into a long skinny rectangle
|
||
vec2 xBasis = target - source;
|
||
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
||
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
||
vColor = aColor;
|
||
}
|
||
else if(aVertType == `).concat(2,`) {
|
||
vec2 pointA = aPointAPointB.xy;
|
||
vec2 pointB = aPointAPointB.zw;
|
||
vec2 pointC = aPointCPointD.xy;
|
||
vec2 pointD = aPointCPointD.zw;
|
||
|
||
// adjust the geometry so that the line is centered on the edge
|
||
position.y = position.y - 0.5;
|
||
|
||
vec2 p0, p1, p2, pos;
|
||
if(position.x == 0.0) { // The left side of the unit square
|
||
p0 = pointA;
|
||
p1 = pointB;
|
||
p2 = pointC;
|
||
pos = position;
|
||
} else { // The right side of the unit square, use same approach but flip the geometry upside down
|
||
p0 = pointD;
|
||
p1 = pointC;
|
||
p2 = pointB;
|
||
pos = vec2(0.0, -position.y);
|
||
}
|
||
|
||
vec2 p01 = p1 - p0;
|
||
vec2 p12 = p2 - p1;
|
||
vec2 p21 = p1 - p2;
|
||
|
||
// Find the normal vector.
|
||
vec2 tangent = normalize(normalize(p12) + normalize(p01));
|
||
vec2 normal = vec2(-tangent.y, tangent.x);
|
||
|
||
// Find the vector perpendicular to p0 -> 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=TJ(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.x<q.y)? 1.570796327 : 0.0;
|
||
for( int i=0; i<5; i++ ) {
|
||
vec2 cs = vec2(cos(w),sin(w));
|
||
vec2 u = ab*vec2( cs.x,cs.y);
|
||
vec2 v = ab*vec2(-cs.y,cs.x);
|
||
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
|
||
}
|
||
|
||
// compute final point and distance
|
||
float d = length(p-ab*vec2(cos(w),sin(w)));
|
||
|
||
// return signed distance
|
||
return (dot(p/ab,p/ab)>1.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.batchManager.getMaxAtlasesPerBatch();a++)n.uTextures.push(t.getUniformLocation(n,"uTexture".concat(a)));return n},"_createShaderProgram")},{key:"_createVAO",value:mt(function(){var e=[0,0,1,0,1,1,0,0,1,1,0,1],t=(this.vertexCount=e.length/2,this.maxInstances),r=this.gl,i=this.program,n=r.createVertexArray();return r.bindVertexArray(n),PJ(r,"vec2",i.aPosition,e),this.transformBuffer=BJ(r,t,i.aTransform),this.indexBuffer=$J(r,t,"vec4",i.aIndex),this.vertTypeBuffer=$J(r,t,"int",i.aVertType),this.atlasIdBuffer=$J(r,t,"int",i.aAtlasId),this.texBuffer=$J(r,t,"vec4",i.aTex),this.pointAPointBBuffer=$J(r,t,"vec4",i.aPointAPointB),this.pointCPointDBuffer=$J(r,t,"vec4",i.aPointCPointD),this.lineWidthBuffer=$J(r,t,"vec2",i.aLineWidth),this.colorBuffer=$J(r,t,"vec4",i.aColor),this.cornerRadiusBuffer=$J(r,t,"vec4",i.aCornerRadius),this.borderColorBuffer=$J(r,t,"vec4",i.aBorderColor),r.bindVertexArray(null),n},"_createVAO")},{key:"buffers",get:mt(function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(e){return Yee(e,"Buffer")}).map(function(e){return t[e]})),this._buffers},"get")},{key:"startFrame",value:mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Wce.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},"startFrame")},{key:"startBatch",value:mt(function(){this.instanceCount=0,this.batchManager.startBatch()},"startBatch")},{key:"endFrame",value:mt(function(){this.endBatch()},"endFrame")},{key:"_isVisible",value:mt(function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))},"_isVisible")},{key:"drawTexture",value:mt(function(e,t,r){var i=this.atlasManager,n=this.batchManager,a=i.getRenderTypeOpts(r);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(e);if(s===Yce.IGNORE)return;if(s==Yce.USE_BB)return void this.drawPickingRectangle(e,t,r)}var o,l=KK(i.getAtlasInfo(e,r));try{for(l.s();!(o=l.n()).done;){var c=o.value,h=c.atlas,u=c.tex1,d=c.tex2;n.canAddToCurrentBatch(h)||this.endBatch();for(var p=n.getAtlasIndexForBatch(h),g=0,f=[[u,!0],[d,!1]];g<f.length;g++){var m,y,v,b=rZ(f[g],2),x=b[0],w=b[1];0!=x.w&&(m=this.instanceCount,this.vertTypeBuffer.getView(m)[0]=0,LJ(t,this.indexBuffer.getView(m)),this.atlasIdBuffer.getView(m)[0]=p,(y=this.texBuffer.getView(m))[0]=x.x,y[1]=x.y,y[2]=x.w,y[3]=x.h,v=this.transformBuffer.getMatrixView(m),this.setTransformMatrix(e,v,a,c,w),this.instanceCount++,w||this.wrappedCount++,this.instanceCount>=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<arguments.length&&void 0!==arguments[4])||arguments[4],o=0;r.shapeProps&&r.shapeProps.padding&&(o=e.pstyle(r.shapeProps.padding).pfValue),i?(a=i.bb,n=(n=i.tex1).w/(n.w+i.tex2.w),i=this._getAdjustedBB(a,o,s,s?n:1-n),this._applyTransformMatrix(t,i,r,e)):(a=r.getBoundingBox(e),s=this._getAdjustedBB(a,o,!0,1),this._applyTransformMatrix(t,s,r,e))},"setTransformMatrix")},{key:"_applyTransformMatrix",value:mt(function(e,t,r,i){qJ(e);var n,a,s=0!==(s=r.getRotation?r.getRotation(i):0)?(GJ(e,e,[(n=r.getRotationPoint(i)).x,n.y]),jJ(e,e,s),a=(n=r.getRotationOffset(i)).x+(t.xOffset||0),n.y+(t.yOffset||0)):(a=t.x1,t.y1);GJ(e,e,[a,s]),WJ(e,e,[t.w,t.h])},"_applyTransformMatrix")},{key:"_getAdjustedBB",value:mt(function(e,t,r,i){var n=e.x1,a=e.y1,s=e.w,o=e.h,t=(t&&(n-=t,a-=t,s+=2*t,o+=2*t),0),l=s*i;return r&&i<1?s=l:!r&&i<1&&(n+=t=s-l,s=l),{x1:n,y1:a,w:s,h:o,xOffset:t,yOffset:e.yOffset}},"_getAdjustedBB")},{key:"drawPickingRectangle",value:mt(function(e,t,r){var r=this.atlasManager.getRenderTypeOpts(r),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=4,LJ(t,this.indexBuffer.getView(i)),RJ([0,0,0],1,this.colorBuffer.getView(i)),t=this.transformBuffer.getMatrixView(i),this.setTransformMatrix(e,t,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=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)),LJ(t,this.indexBuffer.getView(r)),RJ(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)&&(RJ(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?$ie(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,qJ(o=this.transformBuffer.getMatrixView(e)),GJ(o,o,[i,n]),WJ(o,o,[s,s]),jJ(o,o,l),this.vertTypeBuffer.getView(e)[0]=3,LJ(t,this.indexBuffer.getView(e)),RJ(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,LJ(t,this.indexBuffer.getView(e)),RJ(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<r.length-2;l+=2){var c=this.instanceCount,h=(this.vertTypeBuffer.getView(c)[0]=2,LJ(t,this.indexBuffer.getView(c)),RJ(s,o,this.colorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=a,r[l-2]),u=r[l-1],d=r[l],p=r[l+1],g=r[l+2],f=r[l+3],m=r[l+4],y=r[l+5],v=(0==l&&(h=2*d-g+.001,u=2*p-f+.001),l==r.length-4&&(m=2*g-d+.001,y=2*f-p+.001),this.pointAPointBBuffer.getView(c));v[0]=h,v[1]=u,v[2]=d,v[3]=p,(h=this.pointCPointDBuffer.getView(c))[0]=g,h[1]=f,h[2]=m,h[3]=y,this.instanceCount++,this.instanceCount>=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<n.length;a+=2){var s=(1-t)*e[a]+t*e[a+2],o=(1-t)*e[a+1]+t*e[a+3];n[a]=s,n[a+1]=o}return this._setCurvePoint(n,t,r,i)}r[i]=e[0],r[i+1]=e[1]},"_setCurvePoint")},{key:"endBatch",value:mt(function(){var e=this.gl,t=this.vao,r=this.vertexCount,i=this.instanceCount;if(0!==i){var n,a=this.renderTarget.picking?this.pickingProgram:this.program,s=(e.useProgram(a),e.bindVertexArray(t),KK(this.buffers));try{for(s.s();!(n=s.n()).done;)n.value.bufferSubData(i)}catch(e){s.e(e)}finally{s.f()}for(var o=this.batchManager.getAtlases(),l=0;l<o.length;l++)o[l].bufferIfNeeded(e);for(var c=0;c<o.length;c++)e.activeTexture(e.TEXTURE0+c),e.bindTexture(e.TEXTURE_2D,o[c].texture),e.uniform1i(a.uTextures[c],c);e.uniform1f(a.uZoom,SJ(this.r)),e.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(a.uAtlasSize,this.batchManager.getAtlasSize()),t=RJ(this.bgColor,1),e.uniform4fv(a.uBGColor,t),e.drawArraysInstanced(e.TRIANGLES,0,r,i),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:o.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:mt(function(){var e=this.atlasManager.getDebugInfo(),t=e.reduce(function(e,t){return e+t.atlasCount},0),r=this.batchDebugInfo,i=r.reduce(function(e,t){return e+t.count},0);return{atlasInfo:e,totalAtlases:t,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:r.length,batchInfo:r,totalInstances:i}},"getDebugInfo")}]),Hce={initWebgl:function(e,t){var i=this,r=i.data.contexts[i.WEBGL],r=(e.bgColor=HJ(i),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglTexRowsNodes=Math.min(e.webglTexRowsNodes,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),i.webglDebug=e.webglDebug,i.webglDebugShowAtlases=e.webglDebugShowAtlases,i.pickingFrameBuffer=FJ(r),i.pickingFrameBuffer.needsDraw=!0,i.drawing=new Vce(i,r,e),mt(function(t){return function(e){return i.getTextAngle(e,t)}},"getLabelRotation")),n=mt(function(t){return function(e){return(e=e.pstyle(t))&&e.value}},"isLabelVisible"),a=mt(function(t){return function(e){return 0<e.pstyle("".concat(t,"-opacity")).value}},"isLayerVisible"),s=mt(function(e){return"yes"===e.pstyle("text-events").strValue?Yce.USE_BB:Yce.IGNORE},"getTexPickingMode"),o=mt(function(e){var t=(r=e.position()).x,r=r.y,i=e.outerWidth();return{w:i,h:e=e.outerHeight(),x1:t-i/2,y1:r-e/2}},"getBBForSimpleShape"),l=(i.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),i.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),i.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),i.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:o,isSimple:_J,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),i.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:o,isVisible:a("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),i.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:o,isVisible:a("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),i.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:Xce(t.getLabelKey,null),getBoundingBox:Kce(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:r(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:n("label")}),i.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:Xce(t.getSourceLabelKey,"source"),getBoundingBox:Kce(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:r("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:n("source-label")}),i.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:Xce(t.getTargetLabelKey,"target"),getBoundingBox:Kce(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:r("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:n("target-label")}),Mte(function(){console.log("garbage collect flag set"),i.data.gc=!0},1e4));i.onUpdateEleCalcs(function(e,t){var r=!1;t&&0<t.length&&(r|=i.drawing.invalidate(t)),r&&l()}),KJ(i)}},mt(HJ,"getBGColor"),mt(XJ,"getLabelLines"),Xce=mt(function(t,i){return function(e){var r=t(e);return 1<(e=XJ(e,i)).length?e.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},"getStyleKeysForLabel"),Kce=mt(function(n,a){return function(e,t){var r=n(e);if("string"==typeof t){var i=t.indexOf("_");if(0<i)return t=Number(t.substring(i+1)),i=XJ(e,a),e=r.h/i.length,t=r.y1+(i=e*t),{x1:r.x1,w:r.w,y1:t,h:e,yOffset:i}}return r}},"getBoundingBoxForLabel"),mt(KJ,"overrideCanvasRendererFunctions"),mt(ZJ,"clearWebgl"),mt(QJ,"clearCanvas"),mt(JJ,"createPanZoomMatrix"),mt(eee,"setContextTransform"),mt(tee,"drawSelectionRectangle"),mt(ree,"drawAxes"),mt(iee,"drawAtlases"),mt(nee,"getPickingIndexes"),mt(aee,"findNearestElementsWebgl"),mt(see,"drawEle"),mt(oee,"renderWebgl"),Zce={drawPolygonPath:function(e,t,r,i,n,a){var s=i/2,o=n/2;e.beginPath&&e.beginPath(),e.moveTo(t+s*a[0],r+o*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+s*a[2*l],r+o*a[2*l+1]);e.closePath()},drawRoundPolygonPath:function(t,e,r,i,n,a,s){s.forEach(function(e){return hJ(t,e)}),t.closePath()},drawRoundRectanglePath:function(e,t,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?$ie(i,n):Math.min(a,o,s);e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.arcTo(t+s,r-o,t+s,r,i),e.arcTo(t+s,r+o,t,r+o,i),e.arcTo(t-s,r+o,t-s,r,i),e.arcTo(t-s,r-o,t,r-o,i),e.lineTo(t,r-o),e.closePath()},drawBottomRoundRectanglePath:function(e,t,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?$ie(i,n):a;e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.lineTo(t+s,r-o),e.lineTo(t+s,r),e.arcTo(t+s,r+o,t,r+o,i),e.arcTo(t-s,r+o,t-s,r,i),e.lineTo(t-s,r-o),e.lineTo(t,r-o),e.closePath()},drawCutRectanglePath:function(e,t,r,i,n,a,s){i/=2,n/=2,s="auto"===s?Fie():s,e.beginPath&&e.beginPath(),e.moveTo(t-i+s,r-n),e.lineTo(t+i-s,r-n),e.lineTo(t+i,r-n+s),e.lineTo(t+i,r+n-s),e.lineTo(t+i-s,r+n),e.lineTo(t-i+s,r+n),e.lineTo(t-i,r+n-s),e.lineTo(t-i,r-n+s),e.closePath()},drawBarrelPath:function(e,t,r,i,n){var a=t-(s=i/2),t=t+s,s=r-(o=n/2),r=r+o,i=(o=qie(i,n)).widthOffset,n=o.heightOffset,o=o.ctrlPtOffsetPct*i;e.beginPath&&e.beginPath(),e.moveTo(a,s+n),e.lineTo(a,r-n),e.quadraticCurveTo(a+o,r,a+i,r),e.lineTo(t-i,r),e.quadraticCurveTo(t-o,r,t,r-n),e.lineTo(t,s+n),e.quadraticCurveTo(t-o,s,t-i,s),e.lineTo(a+i,s),e.quadraticCurveTo(a+o,s,a,s+n),e.closePath()}},Qce=Math.sin(0),Jce=Math.cos(0),ehe={},the={},rhe=Math.PI/40,ihe=0*Math.PI;ihe<2*Math.PI;ihe+=rhe)ehe[ihe]=Math.sin(ihe),the[ihe]=Math.cos(ihe);Zce.drawEllipsePath=function(e,t,r,i,n){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,r,i/2,n/2,0,0,2*Math.PI);else for(var a,s,o=i/2,l=n/2,c=0*Math.PI;c<2*Math.PI;c+=rhe)a=t-o*ehe[c]*Qce+o*the[c]*Jce,s=r+l*the[c]*Qce+l*ehe[c]*Jce,0===c?e.moveTo(a,s):e.lineTo(a,s);e.closePath()},nhe={createBuffer:function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,[r,r.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,r=t.mutableElements().boundingBox(),i=this.findContainerClientCoords(),n=e.full?Math.ceil(r.w):i[2],i=e.full?Math.ceil(r.h):i[3],a=he(e.maxWidth)||he(e.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==e.scale?(n*=e.scale,i*=e.scale,o=e.scale):a&&(c=l=1/0,he(e.maxWidth)&&(l=o*e.maxWidth/n),he(e.maxHeight)&&(c=o*e.maxHeight/i),n*=o=Math.min(l,c),i*=o),a||(n*=s,i*=s,o*=s),document.createElement("canvas")),c=(l.width=n,l.height=i,l.style.width=n+"px",l.style.height=i+"px",l.getContext("2d"));return 0<n&&0<i&&(c.clearRect(0,0,n,i),c.globalCompositeOperation="source-over",a=this.getCachedZSortedEles(),e.full?(c.translate(-r.x1*o,-r.y1*o),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(r.x1*o,r.y1*o)):(r={x:(s=t.pan()).x*o,y:s.y*o},o*=t.zoom(),c.translate(r.x,r.y),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(-r.x,-r.y)),e.bg)&&(c.globalCompositeOperation="destination-over",c.fillStyle=e.bg,c.rect(0,0,n,i),c.fill()),l}},mt(lee,"b64ToBlob"),mt(cee,"b64UriToB64"),mt(hee,"output"),nhe.png=function(e){return hee(e,this.bufferCanvasImage(e),"image/png")},nhe.jpg=function(e){return hee(e,this.bufferCanvasImage(e),"image/jpeg")},ahe={nodeShapeImpl:function(e,t,r,i,n,a,s,o){switch(e){case"ellipse":return this.drawEllipsePath(t,r,i,n,a);case"polygon":return this.drawPolygonPath(t,r,i,n,a,s);case"round-polygon":return this.drawRoundPolygonPath(t,r,i,n,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,i,n,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,i,n,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,i,n,a,o);case"barrel":return this.drawBarrelPath(t,r,i,n,a)}}},(ohe=(she=uee).prototype).CANVAS_LAYERS=3,ohe.SELECT_BOX=0,ohe.DRAG=1,ohe.NODE=2,ohe.WEBGL=3,ohe.CANVAS_TYPES=["2d","2d","2d","webgl2"],ohe.BUFFER_COUNT=3,ohe.TEXTURE_BUFFER=0,ohe.MOTIONBLUR_BUFFER_NODE=1,ohe.MOTIONBLUR_BUFFER_DRAG=2,mt(uee,"CanvasRenderer"),ohe.redrawHint=function(e,t){switch(e){case"eles":this.data.canvasNeedsRedraw[ohe.NODE]=t;break;case"drag":this.data.canvasNeedsRedraw[ohe.DRAG]=t;break;case"select":this.data.canvasNeedsRedraw[ohe.SELECT_BOX]=t;break;case"gc":this.data.gc=!0}},lhe=typeof Path2D<"u",ohe.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},ohe.usePaths=function(){return lhe&&this.pathsEnabled},ohe.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},ohe.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},ohe.makeOffscreenCanvas=function(e,t){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":sZ(OffscreenCanvas))?r=new OffscreenCanvas(e,t):((r=this.cy.window().document.createElement("canvas")).width=e,r.height=t),r},[kce,Sce,Dce,Mce,Oce,Pce,Bce,Hce,Zce,nhe,ahe].forEach(function(e){Kee(ohe,e)}),che=[{type:"layout",extensions:qle},{type:"renderer",extensions:[{name:"null",impl:cJ},{name:"base",impl:gce},{name:"canvas",impl:she}]}],hhe={},uhe={},mt(dee,"setExtension"),mt(pee,"getExtension"),mt(gee,"setModule"),mt(fee,"getModule"),dhe=mt(function(){return 2===arguments.length?pee.apply(null,arguments):3===arguments.length?dee.apply(null,arguments):4===arguments.length?fee.apply(null,arguments):5===arguments.length?gee.apply(null,arguments):void are("Invalid extension access syntax")},"extension"),lle.prototype.extension=dhe,che.forEach(function(t){t.extensions.forEach(function(e){dee(t.type,e.name,e.impl)})}),phe=mt(function(){if(!(this instanceof phe))return new phe;this.length=0},"Stylesheet"),(ghe=phe.prototype).instanceString=function(){return"stylesheet"},ghe.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},ghe.css=function(e,t){var r=this.length-1;if(kee(e))this[r].properties.push({name:e,value:t});else if(Eee(e))for(var i=e,n=Object.keys(i),a=0;a<n.length;a++){var s=n[a],o=i[s];null!=o&&null!=(s=sle.properties[s]||sle.properties[Gee(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},ghe.style=ghe.css,ghe.generateStyle=function(e){return e=new sle(e),this.appendToStyle(e)},ghe.appendToStyle=function(e){for(var t=0;t<this.length;t++){var r=this[t],i=r.selector,n=r.properties;e.selector(i);for(var a=0;a<n.length;a++){var s=n[a];e.css(s.name,s.value)}}return e},(fhe=mt(function(e){return Eee(e=void 0===e?{}:e)?new lle(e):kee(e)?dhe.apply(dhe,arguments):void 0},"cytoscape")).use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(fhe),e.apply(null,t),this},fhe.warnings=function(e){return sre(e)},fhe.version="3.33.1",fhe.stylesheet=fhe.Stylesheet=phe}),yhe=oqe((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(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;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},h.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),r=0;r<t.length;r++)e+=t[r].getNoOfChildren();return 0==e?1:e},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var e=-o.INITIAL_WORLD_BOUNDARY,t=o.INITIAL_WORLD_BOUNDARY,t=o.WORLD_CENTER_X+l.nextDouble()*(t-e)+e,e=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-e)+e;this.rect.x=t,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var e,t;0!=this.getChild().getNodes().length&&((t=this.getChild()).updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(e=t.getRight()-t.getLeft(),t=t.getBottom()-t.getTop(),this.labelWidth>e&&(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.getNodes().indexOf(i))throw"Node already in graph!";return(i.owner=this).getNodes().push(i),i}if(i=e,!(-1<this.getNodes().indexOf(t)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(t.owner!=r.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=r.owner?null:(i.source=t,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),r!=t&&r.edges.push(i),i)},u.prototype.remove=function(e){var t=e;if(e instanceof o){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,i=t.edges.slice(),n=i.length,a=0;a<n;a++)((r=i[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(e instanceof l){if(null==(r=e))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,t=r.source.edges.indexOf(r),e=r.target.edges.indexOf(r);if(!(-1<t&&-1<e))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(t,1),r.target!=r.source&&r.target.edges.splice(e,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var e,t=d.MAX_VALUE,r=d.MAX_VALUE,i=this.getNodes(),n=i.length,a=0;a<n;a++){var s,o=i[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=i[0].getParent().paddingLeft?i[0].getParent().paddingLeft:this.margin,this.left=r-e,this.top=t-e,new c(this.left,this.top))},u.prototype.updateBounds=function(e){for(var t,r,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,c=0;c<l;c++){var h=o[c];e&&null!=h.child&&h.updateBounds(),(t=h.getLeft())<i&&(i=t),n<(t=h.getRight())&&(n=t),(t=h.getTop())<a&&(a=t),s<(t=h.getBottom())&&(s=t)}var u=new p(i,a,n-i,s-a);i==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(e){for(var t=d.MAX_VALUE,r=-d.MAX_VALUE,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=e.length,s=0;s<a;s++){var o,l=e[s];(o=l.getLeft())<t&&(t=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<i&&(i=o),n<(o=l.getBottom())&&(n=o)}return new p(t,i,r-t,n-i)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,r=t.length,i=0;i<r;i++)e+=t[i].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,i=new h,n=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){i.push(e),n.add(e)});0!==i.length;)for(var a,s,o=(a=(e=i.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||n.has(s)||s.withChildren().forEach(function(e){i.push(e),n.add(e)});this.isConnected=!1,n.size>=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<this.graphs.indexOf(e))throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return(e.parent=t).child=e}if(n=r,r=e,e=(i=t).getOwner(),t=n.getOwner(),null==e||e.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==t||t.getGraphManager()!=this)throw"Target not in this graph mgr!";if(e==t)return r.isInterGraph=!1,e.add(r,i,n);if(r.isInterGraph=!0,r.source=i,r.target=n,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},i.prototype.remove=function(e){if(e instanceof c){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var r,i=[],n=(i=i.concat(t.getEdges())).length,a=0;a<n;a++)r=i[a],t.remove(r);for(var s,o=[],n=(o=o.concat(t.getNodes())).length,a=0;a<n;a++)s=o[a],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(e instanceof h){if(null==(r=e))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,i=0;i<r;i++)e=e.concat(t[i].getNodes());this.allNodes=e}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),r=(t.length,0);r<t.length;r++)e=e.concat(t[r].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=e).parent&&(e.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,i=e.getOwner();null!=(r=i.getParent());){if(r==t)return!0;if(null==(i=r.getOwner()))break}for(i=t.getOwner();null!=(r=i.getParent());){if(r==e)return!0;if(null==(i=r.getOwner()))break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,i,n,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(t=(e=a[o]).source,r=e.target,e.lca=null,(e.sourceInLca=t)==(e.targetInLca=r))e.lca=t.getOwner();else{for(i=t.getOwner();null==e.lca;){for(n=(e.targetInLca=r).getOwner();null==e.lca;){if(n==i){e.lca=n;break}if(n==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=n.getParent(),n=e.targetInLca.getOwner()}if(i==this.rootGraph)break;null==e.lca&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var i=t.getOwner();null!=i;){if(i==r)return i;i=i.getParent().getOwner()}r=r.getParent().getOwner()}return r},i.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,i=e.getNodes(),n=i.length,a=0;a<n;a++)(r=i[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},i.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,r=0;r<t;r++)if(e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=i},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){var h=r(12);function i(){}mt(i,"IGeometry"),i.calcSeparationAmount=function(e,t,r,i){if(!e.intersects(t))throw"assert failed";var n=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,n),r[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),r[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=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]<e?e=r[0]:t=r[1],r[0]=-1*n[0]*(e/2+i),r[1]=-1*n[1]*(t/2+i)},i.decideDirectionsForOverlappingNodes=function(e,t,r){e.getCenterX()<t.getCenterX()?r[0]=-1:r[0]=1,e.getCenterY()<t.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(e,t,r){var i=e.getCenterX(),n=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=i,r[1]=n,r[2]=a,r[3]=s,!0;var o=e.getX(),l=e.getY(),c=e.getRight(),h=e.getX(),u=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),m=t.getY(),y=t.getRight(),v=t.getX(),b=t.getBottom(),x=t.getRight(),w=t.getWidthHalf(),T=t.getHeightHalf(),k=!1,C=!1;if(i===a){if(s<n)return r[0]=i,r[1]=l,r[2]=a,r[3]=b,!1;n<s&&(r[0]=i,r[1]=u,r[2]=a,r[3]=m)}else if(n===s){if(a<i)return r[0]=o,r[1]=n,r[2]=y,r[3]=s,!1;i<a&&(r[0]=c,r[1]=n,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,S=(s-n)/(a-i),E=void 0,_=void 0,A=void 0;if(-e==S?(a<i?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),k=!0):e==S&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),k=!0),-t==S?(i<a?(r[2]=v,r[3]=b):(r[2]=y,r[3]=m),C=!0):t==S&&(i<a?(r[2]=f,r[3]=m):(r[2]=x,r[3]=b),C=!0),k&&C)return!1;if(c=a<i?s<n?(E=this.getCardinalDirection(e,S,4),this.getCardinalDirection(t,S,2)):(E=this.getCardinalDirection(-e,S,3),this.getCardinalDirection(-t,S,1)):s<n?(E=this.getCardinalDirection(-e,S,1),this.getCardinalDirection(-t,S,3)):(E=this.getCardinalDirection(e,S,2),this.getCardinalDirection(t,S,4)),!k)switch(E){case 1:_=l,r[0]=i+-g/S,r[1]=_;break;case 2:_=n+p*S,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=i+g/S,r[1]=_;break;case 4:_=n+-p*S,r[0]=h,r[1]=_}if(!C)switch(c){case 1:A=m,r[2]=a+-T/S,r[3]=A;break;case 2:A=s+w*S,r[2]=x,r[3]=A;break;case 3:A=b,r[2]=a+T/S,r[3]=A;break;case 4:A=s+-w*S,r[2]=v,r[3]=A}}return!1},i.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},i.getIntersection=function(e,t,r,i){var n,a,s,o,l,c;return null==i?this.getIntersection2(e,t,r):(n=e.x,a=t.x,l=r.x,o=a*(e=e.y)-n*(t=t.y),c=(s=i.x)*(r=r.y)-l*(i=i.y),0==(i=(t-=e)*(e=l-s)-(l=i-r)*(s=n-a))?null:new h((s*c-e*o)/i,(l*o-t*c)/i))},i.angleOfVector=function(e,t,r,i){var n=void 0;return e!==r?(n=Math.atan((i-t)/(r-e)),r<e?n+=Math.PI:i<t&&(n+=this.TWO_PI)):n=i<t?this.ONE_AND_HALF_PI:this.HALF_PI,n},i.doIntersect=function(e,t,r,i){var n=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=i.x,l=(a-n)*((i=i.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-n)+(a-n)*(i-e))/l,0<(a=((i-r)*(o-n)+(s-o)*(i-e))/l))&&a<1&&0<t&&t<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i},function(e,t,r){function i(){}mt(i,"IMath"),i.sign=function(e){return 0<e?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=i},function(e,t,r){function i(){}mt(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,i){return null!==e?e.next=t:i.head=t,null!==r?r.prev=t:i.tail=t,t.prev=e,t.next=r,i.length++,t},"add"),c=mt(function(e,t){var r=e.prev,i=e.next;return null!==r?r.next=i:t.head=i,null!==i?i.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function h(e){var t=this;n(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(h,"LinkedList"),a=h,s=[{key:"size",value:mt(function(){return this.length},"size")},{key:"insertBefore",value:mt(function(e,t){return l(t.prev,o(e),t,this)},"insertBefore")},{key:"insertAfter",value:mt(function(e,t){return l(t,o(e),t.next,this)},"insertAfter")},{key:"insertNodeBefore",value:mt(function(e,t){return l(t.prev,e,t,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:mt(function(e,t){return l(t,e,t.next,this)},"insertNodeAfter")},{key:"push",value:mt(function(e){return l(this.tail,o(e),null,this)},"push")},{key:"unshift",value:mt(function(e){return l(null,o(e),this.head,this)},"unshift")},{key:"remove",value:mt(function(e){return c(e,this)},"remove")},{key:"pop",value:mt(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:mt(function(e){if(e<=this.length()){for(var t=1,r=this.head;t<e;)r=r.next,t++;return r.value}},"get_object_at")},{key:"set_object_at",value:mt(function(e,t){if(e<=this.length()){for(var r=1,i=this.head;r<e;)i=i.next,r++;i.value=t}},"set_object_at")}],i(a.prototype,s),e.exports=h},function(e,t,r){function i(e,t,r){this.x=null,(this.y=null)==e&&null==t&&null==r?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==r?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==r&&(this.x=(r=e).x,this.y=r.y)}mt(i,"Point"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(e,t,r){"Point"==e.constructor.name&&null==t&&null==r?this.setLocation((r=e).x,r.y):"number"==typeof e&&"number"==typeof t&&null==r&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},i.prototype.move=function(e,t){this.x=e,this.y=t},i.prototype.translate=function(e,t){this.x+=e,this.y+=t},i.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=i},function(e,t,r){function i(e,t,r,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=i&&(this.x=e,this.y=t,this.width=r,this.height=i)}mt(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(e){this.x=e},i.prototype.getY=function(){return this.y},i.prototype.setY=function(e){this.y=e},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},e.exports=i},function(e,t,r){var i="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};function n(){}mt(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(e){return n.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=n.getString(),n.lastID++),e.uniqueID)},n.getString=function(e){return"Object#"+(null==e?n.lastID:e)},n.isPrimitive=function(e){var t="u"<typeof e?"undefined":i(e);return null==e||"object"!=t&&"function"!=t},e.exports=n},function(e,t,r){function g(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(g,"_toConsumableArray");var i=r(0),n=r(6),a=r(3),s=r(1),o=r(5),l=r(4),c=r(17),h=r(27);function u(e){h.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}mt(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(h.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var e=new n(this);return this.graphManager=e},u.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},u.prototype.newNode=function(e){return new a(this.graphManager,e)},u.prototype.newEdge=function(e){return new s(null,null,e)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(e&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var r=this.graphManager.getRoot().getNodes(),t=0;t<r.length;t++)r[t];this.update(this.graphManager.getRoot())}},u.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof a){var t=e;if(null!=t.getChild())for(var r=t.getChild().getNodes(),i=0;i<r.length;i++)update(r[i]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else e instanceof s?null!=e.vGraphObject&&e.vGraphObject.update(e):e instanceof o&&null!=e.vGraphObject&&e.vGraphObject.update(e)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(e){if(null==e)this.transform(new l(0,0));else{var t=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(r.x),t.setDeviceOrgY(r.y);for(var i=this.getAllNodes(),n=0;n<i.length;n++)i[n].transform(t)}}},u.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,r,i=e.getNodes(),n=0;n<i.length;n++)null==(r=(t=i[n]).getChild())||0==r.getNodes().length?t.scatter():(this.positionNodesRandomly(r),t.updateBounds())},u.prototype.getFlatForest=function(){for(var e=[],t=!0,r=this.graphManager.getRoot().getNodes(),i=!0,n=0;n<r.length;n++)null!=r[n].getChild()&&(i=!1);if(i)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&t;){for(s.push(l[0]);0<s.length&&t;){var c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),n=0;n<h.length;n++){var u=h[n].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,c)}}}if(t){var d=[].concat(g(a));for(e.push(d),n=0;n<d.length;n++){var p=d[n];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else e=[]}return e},u.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],r=e.source,i=this.graphManager.calcLowestCommonAncestor(e.source,e.target),n=0;n<e.bendpoints.length;n++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),i.add(a),this.newEdge(null));this.graphManager.add(s,r,a),t.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,e.target),this.edgeToDummyNodes.set(e,t),(e.isInterGraph()?this.graphManager:i).remove(e),t},u.prototype.createBendpointsFromDummyNodes=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),e=[].concat(g(this.edgeToDummyNodes.keys())).concat(e),t=0;t<e.length;t++){var r=e[t];if(0<r.bendpoints.length){for(var i=this.edgeToDummyNodes.get(r),n=0;n<i.length;n++){var a=i[n],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(n);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(e,t,r,i){var n,a;return null!=r&&null!=i?(n=t,e<=50?n-=(t-t/r)/50*(50-e):n+=(t*i-t)/50*(e-50),n):(r=e<=50?(a=9*t/500,t/10):(a=9*t/50,-8*t),a*e+r)},u.findCenterOfTree=function(e){var t=(t=[]).concat(e),r=[],i=new Map,n=!1,a=null;1!=t.length&&2!=t.length||(n=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(c=t[s]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!n;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var c=t[s],h=t.indexOf(c);0<=h&&t.splice(h,1),c.getNeighborsList().forEach(function(e){var t;r.indexOf(e)<0&&(1==(t=i.get(e)-1)&&l.push(e),i.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(n=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function i(){}mt(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return(i.x=1e4*Math.sin(i.seed++))-Math.floor(i.x)},e.exports=i},function(e,t,r){var i=r(4);function n(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}mt(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(e){this.lworldExtX=e},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(e){this.lworldExtY=e},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},n.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},n.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},n.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},n.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},n.prototype.inverseTransformPoint=function(e){return new i(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=n},function(e,t,r){function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(d,"_toConsumableArray");var i,n=r(15),p=r(7),o=r(0),c=r(8),h=r(9);function a(){n.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(i in mt(a,"FDLayout"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var e,t,r,i,n,a=this.getGraphManager().getAllEdges(),s=0;s<a.length;s++)(e=a[s]).idealLength=this.idealEdgeLength,e.isInterGraph&&(t=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),n=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+n-2*o.SIMPLE_NODE_SIZE),i=e.getLca().getInclusionTreeDepth(),e.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(t.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*i))},a.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>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;r<t.length;r++)e=t[r],this.calcSpringForce(e,e.idealLength)},a.prototype.calcRepulsionForces=function(){var e,t,r,i,n,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),n=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,n,a,s),n.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)i=o[t],r.getOwner()==i.getOwner()&&this.calcRepulsionForce(r,i)},a.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),r=0;r<t.length;r++)e=t[r],this.calcGravitationalForce(e)},a.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},a.prototype.calcSpringForce=function(e,t){var r,i,n=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==n.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(i=(t=this.springConstant*(r-t))*(e.lengthX/r),e=e.lengthY/r*t,n.springForceX+=i,n.springForceY+=e,a.springForceX-=i,a.springForceY-=e)},a.prototype.calcRepulsionForce=function(e,t){var r,i,n,a=e.getRect(),s=t.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(c.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),i=2*o[0],n=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*i,e.repulsionForceY-=o*n,t.repulsionForceX+=o*i,t.repulsionForceY+=o*n):(o=this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),n=(l=this.repulsionConstant*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=i=l*r/s,e.repulsionForceY-=n,t.repulsionForceX+=i,t.repulsionForceY+=n)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),i=(r.getRight()+r.getLeft())/2,n=(r.getTop()+r.getBottom())/2,i=e.getCenterX()-i,n=e.getCenterY()-n,a=Math.abs(i)+e.getWidth()/2,s=Math.abs(n)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*n):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*n*this.compoundGravityConstant)},a.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),r=0;r<t.length;r++)(e=t[r]).noOfChildren=e.getNoOfChildren()},a.prototype.calcGrid=function(e){for(var t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange)),i=new Array(t),n=0;n<t;n++)i[n]=new Array(r);for(n=0;n<t;n++)for(var a=0;a<r;a++)i[n][a]=new Array;return i},a.prototype.addNodeToGrid=function(e,t,r){for(var i=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),n=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((e.getRect().height+e.getRect().y-r)/this.repulsionRange)),o=i;o<=n;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(i,n,a,s)},a.prototype.updateGrid=function(){var e,t,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<r.length;e++)t=r[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(e,t,r,i){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||i){var n=new Set;e.surrounding=new Array;for(var a=this.grid,s=e.startX-1;s<e.finishX+2;s++)for(var o=e.startY-1;o<e.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var c,h,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||n.has(u)||(c=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),h=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&n.add(u))}e.surrounding=[].concat(d(n))}for(s=0;s<e.surrounding.length;s++)this.calcRepulsionForce(e,e.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},e.exports=a},function(e,t,r){var i,n=r(1),a=r(7);function s(e,t,r){n.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(i in mt(s,"FDLayoutEdge"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];e.exports=s},function(e,t,r){var i,n=r(3);function a(e,t,r,i){n.call(this,e,t,r,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(i in mt(a,"FDLayoutNode"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.setGridCoordinates=function(e,t,r,i){this.startX=e,this.finishX=t,this.startY=r,this.finishY=i},e.exports=a},function(e,t,r){function i(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},e.exports=i},function(e,t,r){var i=r(14);function n(){this.map={},this.keys=[]}mt(n,"HashMap"),n.prototype.put=function(e,t){var r=i.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},n.prototype.contains=function(e){return i.createID(e),null!=this.map[e]},n.prototype.get=function(e){return e=i.createID(e),this.map[e]},n.prototype.keySet=function(){return this.keys},e.exports=n},function(e,t,r){var i=r(14);function n(){this.set={}}mt(n,"HashSet"),n.prototype.add=function(e){var t=i.createID(e);this.contains(t)||(this.set[t]=e)},n.prototype.remove=function(e){delete this.set[i.createID(e)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(e){return this.set[i.createID(e)]==e},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,i=0;i<r;i++)e.push(this.set[t[i]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var i=e[r];this.add(i)}},e.exports=n},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var i;t<r&&(i=this._partition(e,t,r),this._quicksort(e,t,i),this._quicksort(e,i+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var i=this._get(e,t),n=t,a=r;;){for(;this.compareFunction(i,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,n),i);)n++;if(!(n<a))return a;this._swap(e,n,a),n++,a--}},"_partition")},{key:"_get",value:mt(function(e,t){return e instanceof o?e.get_object_at(t):e[t]},"_get")},{key:"_set",value:mt(function(e,t,r){e instanceof o?e.set_object_at(t,r):e[t]=r},"_set")},{key:"_swap",value:mt(function(e,t,r){var i=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,i)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],i(a.prototype,s),l);function l(e,t){n(this,l),null===t&&void 0===t||(this.compareFunction=this._defaultCompareFunction),t=void 0,t=e instanceof o?e.size():e.length,this._quicksort(e,0,t-1)}e.exports=r},function(e,t,r){var i,n;function a(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;c(this,h),this.sequence1=e,this.sequence2=t,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=n,this.iMax=e.length+1,this.jMax=t.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}mt(a,"defineProperties"),mt(c,"_classCallCheck"),mt(h,"NeedlemanWunsch"),i=h,n=[{key:"getScore",value:mt(function(){return this.score},"getScore")},{key:"getAlignments",value:mt(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:mt(function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var i=1;i<this.jMax;i++){var n=[this.sequence1[r-1]===this.sequence2[i-1]?this.grid[r-1][i-1]+this.match_score:this.grid[r-1][i-1]+this.mismatch_penalty,this.grid[r-1][i]+this.gap_penalty,this.grid[r][i-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(n);this.grid[r][i]=n[a[0]],this.tracebackGrid[r][i]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:mt(function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],r=this.tracebackGrid[t.pos[0]][t.pos[1]];r[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),r[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),r[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:mt(function(e,t){for(var r=[],i=-1;-1!==(i=e.indexOf(t,i+1));)r.push(i);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(i.prototype,n),e.exports=h},function(e,t,r){var i=mt(function(){},"layoutBase");i.FDLayout=r(18),i.FDLayoutConstants=r(7),i.FDLayoutEdge=r(19),i.FDLayoutNode=r(20),i.DimensionD=r(21),i.HashMap=r(22),i.HashSet=r(23),i.IGeometry=r(8),i.IMath=r(9),i.Integer=r(10),i.Point=r(12),i.PointD=r(4),i.RandomSeed=r(16),i.RectangleD=r(13),i.Transform=r(17),i.UniqueIDGeneretor=r(14),i.Quicksort=r(24),i.LinkedList=r(11),i.LGraphObject=r(2),i.LGraph=r(5),i.LEdge=r(1),i.LGraphManager=r(6),i.LNode=r(3),i.Layout=r(15),i.LayoutConstants=r(0),i.NeedlemanWunsch=r(25),e.exports=i},function(e,t,r){function i(){this.listeners=[]}mt(i,"Emitter");var n=i.prototype;n.addListener=function(e,t){this.listeners.push({event:e,callback:t})},n.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var i=this.listeners[r];i.event===e&&i.callback===t&&this.listeners.splice(r,1)}},n.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var i=this.listeners[r];e===i.event&&i.callback(t)}},e.exports=i}],n={},mt(i,"__webpack_require__"),i.m=r,i.c=n,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=26);function i(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var r,n})}),vhe=oqe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(yhe()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(yhe()):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;n<i.length;n++)null==(r=i[n]).getChild()?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},s.prototype.setPred1=function(e){this.pred1=e},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(e){this.next=e},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(e){this.processed=e},s.prototype.isProcessed=function(){return processed},e.exports=s},function(e,t,r){var i,n=r(0).FDLayout,a=r(4),s=r(3),h=r(5),o=r(2),u=r(1),g=r(0).FDLayoutConstants,d=r(0).LayoutConstants,p=r(0).Point,f=r(0).PointD,m=r(0).Layout,y=r(0).Integer,v=r(0).IGeometry,l=r(0).LGraph,c=r(0).Transform;function b(){n.call(this),this.toBeTiled={}}for(i in mt(b,"CoSELayout"),b.prototype=Object.create(n.prototype),n)b[i]=n[i];b.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},b.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},b.prototype.newNode=function(e){return new h(this.graphManager,e)},b.prototype.newEdge=function(e){return new o(null,null,e)},b.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=g.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=g.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=g.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},b.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},b.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?u.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()),this.initSpringEmbedder(),this.runSpringEmbedder(),!0},b.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},b.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var i=e[r].rect,n=e[r].id;t[n]={id:n,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return t},b.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},b.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),i=r.length,n=0;n<i;n++)(e=r[n]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},b.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var i=e[r];if(!t.has(i)){var n=i.getSource(),a=i.getTarget();if(n==a)i.getBendpoints().push(new f),i.getBendpoints().push(new f),this.createDummyNodesForBendpoints(i),t.add(i);else{var s=(s=(s=[]).concat(n.getEdgeListToNode(a))).concat(a.getEdgeListToNode(n));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new f),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},b.prototype.positionNodesRadially=function(e){for(var t=new p(0,0),r=Math.ceil(Math.sqrt(e.length)),i=0,n=0,a=0,s=new f(0,0),o=0;o<e.length;o++){o%r==0&&(n=i,(a=0)!=o&&(n+=u.DEFAULT_COMPONENT_SEPERATION),i=0);var l=e[o],c=m.findCenterOfTree(l);t.x=a,t.y=n,(s=b.radialLayout(l,c,t)).y>i&&(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;a<e.length;a++)e[a].transform(n);return i=new f(t.getMaxX(),t.getMaxY()),n.inverseTransformPoint(i)},b.branchRadialLayout=function(e,t,r,i,n,a){(s=(i-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),n*Math.cos(s)),s=n*Math.sin(s),l=(e.setCenter(o,s),[]),c=(l=l.concat(e.getEdges())).length;null!=t&&c--;for(var h=0,u=l.length,d=e.getEdgesBetween(t);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,c--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(i-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(b.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,n+a,a),h++)}},b.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var i=e[r].getDiagonal();t<i&&(t=i)}return t},b.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},b.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var e=[],t=this.graphManager.getAllNodes(),r=0;r<t.length;r++){var i=(n=t[r]).getParent();0!==this.getNodeDegreeWithChildren(n)||null!=i.id&&this.getToBeTiled(i)||e.push(n)}for(r=0;r<e.length;r++){var n,a=(n=e[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(n)}Object.keys(c).forEach(function(e){if(1<c[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=c[e],c[e][0].getParent()),i=new h(l.graphManager),n=(i.id=t,i.paddingLeft=r.paddingLeft||0,i.paddingRight=r.paddingRight||0,i.paddingBottom=r.paddingBottom||0,i.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=i,l.getGraphManager().add(l.newGraph(),i)),a=r.getChild();a.add(i);for(var s=0;s<c[e].length;s++){var o=c[e][s];a.remove(o),n.add(o)}}})},b.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},b.prototype.clearZeroDegreeMembers=function(){var r=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t=r.idToDummyNode[e];i[e]=r.tileNodes(r.memberGroups[e],t.paddingLeft+t.paddingRight),t.rect.width=i[e].width,t.rect.height=i[e].height})},b.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)}},b.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)})},b.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;i<r.length;i++){var n=r[i];if(0<this.getNodeDegree(n))return this.toBeTiled[t]=!1;if(null==n.getChild())this.toBeTiled[n.id]=!1;else if(!this.getToBeTiled(n))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},b.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,i=0;i<t.length;i++){var n=t[i];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},b.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),i=0;i<r.length;i++){var n=r[i];t+=this.getNodeDegreeWithChildren(n)}return t},b.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},b.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},b.prototype.adjustLocations=function(e,t,r,i,n){r+=n;for(var a=t+=i,s=0;s<e.rows.length;s++){var o=e.rows[s];t=a;for(var l=0,c=0;c<o.length;c++){var h=o[c];h.rect.x=t,h.rect.y=r,t+=h.rect.width+e.horizontalPadding,h.rect.height>l&&(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.height<t.rect.width*t.rect.height?1:0});for(var i=0;i<e.length;i++){var n=e[i];0==r.rows.length?this.insertNodeToRow(r,n,0,t):this.canAddHorizontal(r,n.rect.width,n.rect.height)?this.insertNodeToRow(r,n,this.getShortestRowIndex(r),t):this.insertNodeToRow(r,n,r.rows.length,t),this.shiftToLastRow(r)}return r},b.prototype.insertNodeToRow=function(e,t,r,i){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var i=e.rowWidth[r]+t.rect.width,i=(0<e.rows[r].length&&(i+=e.horizontalPadding),e.rowWidth[r]=i,e.width<i&&(e.width=i),t.rect.height),n=(0<r&&(i+=e.verticalPadding),0);i>e.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;i<e.rows.length;i++)e.rowWidth[i]<r&&(t=i,r=e.rowWidth[i]);return t},b.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]>r&&(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]<r&&0<a&&(i=r+e.verticalPadding-e.rowHeight[a]),a=t+e.horizontalPadding<=e.width-n?(e.height+i)/(n+t+e.horizontalPadding):(e.height+i)/e.width,i=r+e.verticalPadding,(a<1?1/a:a)<((n=e.width<t?(e.height+i)/t:(e.height+i)/e.width)<1?1/n:n))},b.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,i=e.rows[t],n=i[i.length-1],a=n.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>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;o<i.length;o++)i[o].height>s&&(s=i[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<n.height+e.verticalPadding&&(e.rowHeight[r]=n.height+e.verticalPadding),n=e.rowHeight[t]+e.rowHeight[r],e.height+=n-a,this.shiftToLastRow(e)}},b.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},b.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},b.prototype.reduceTrees=function(){for(var e,t=[],r=!0;r;){for(var i=this.graphManager.getAllNodes(),n=[],r=!1,a=0;a<i.length;a++)1!=(e=i[a]).getEdges().length||e.getEdges()[0].isInterGraph||null!=e.getChild()||(n.push([e,e.getEdges()[0],e.getOwner()]),r=!0);if(1==r){for(var s=[],o=0;o<n.length;o++)1==n[o][0].getEdges().length&&(s.push(n[o]),n[o][0].getOwner().remove(n[o][0]));t.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},b.prototype.growTree=function(e){for(var t,r=e[e.length-1],i=0;i<r.length;i++)t=r[i],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},b.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=(e=t==e[1].source?e[1].target:e[1].source).startX,i=e.finishX,n=e.startY,a=e.finishY,s=[0,0,0,0];if(0<n)for(var o=r;o<=i;o++)s[0]+=this.grid[o][n-1].length+this.grid[o][n].length-1;if(i<this.grid.length-1)for(o=n;o<=a;o++)s[1]+=this.grid[i+1][o].length+this.grid[i][o].length-1;if(a<this.grid[0].length-1)for(o=r;o<=i;o++)s[2]+=this.grid[o][a+1].length+this.grid[o][a].length-1;if(0<r)for(o=n;o<=a;o++)s[3]+=this.grid[r-1][o].length+this.grid[r][o].length-1;for(var l,c,h,u,d=y.MAX_VALUE,p=0;p<s.length;p++)s[p]<d?(d=s[p],l=1,c=p):s[p]==d&&l++;3==l&&0==d?0==s[0]&&0==s[1]&&0==s[2]?h=1:0==s[0]&&0==s[1]&&0==s[3]?h=0:0==s[0]&&0==s[2]&&0==s[3]?h=3:0==s[1]&&0==s[2]&&0==s[3]&&(h=2):h=2==l&&0==d?(u=Math.floor(2*Math.random()),0==s[0]&&0==s[1]?0==u?0:1:0==s[0]&&0==s[2]?0==u?0:2:0==s[0]&&0==s[3]?0==u?0:3:0==s[1]&&0==s[2]?0==u?1:2:0==s[1]&&0==s[3]?0==u?1:3:0==u?2:3):4==l&&0==d?u=Math.floor(4*Math.random()):c,0==h?t.setCenter(e.getCenterX(),e.getCenterY()-e.getHeight()/2-g.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==h?t.setCenter(e.getCenterX()+e.getWidth()/2+g.DEFAULT_EDGE_LENGTH+t.getWidth()/2,e.getCenterY()):2==h?t.setCenter(e.getCenterX(),e.getCenterY()+e.getHeight()/2+g.DEFAULT_EDGE_LENGTH+t.getHeight()/2):t.setCenter(e.getCenterX()-e.getWidth()/2-g.DEFAULT_EDGE_LENGTH-t.getWidth()/2,e.getCenterY())},e.exports=b},function(e,t,r){var i={};i.layoutBase=r(0),i.CoSEConstants=r(1),i.CoSEEdge=r(2),i.CoSEGraph=r(3),i.CoSEGraphManager=r(4),i.CoSELayout=r(6),i.CoSENode=r(5),e.exports=i}],a={},mt(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=7);function i(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var n,a})}),bhe=oqe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(vhe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(vhe()):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<r.length;i++){var n=r[i],a=this.idToLNode[n.data("source")],u=this.idToLNode[n.data("target")];a!==u&&0==a.getEdgesBetween(u).length&&(e.add(c.newEdge(),a,u).id=n.id())}var d=mt(function(e,t){return t=(e="number"==typeof e?t:e).data("id"),{x:(e=h.idToLNode[t]).getRect().getCenterX(),y:e.getRect().getCenterY()}},"getPositions"),p=mt(function e(){for(var t,a,r=mt(function(){l.fit&&l.cy.fit(l.eles,l.padding),s||(s=!0,h.cy.one("layoutready",l.ready),h.cy.trigger({type:"layoutready",layout:h}))},"afterReposition"),i=h.options.refresh,n=0;n<i&&!t;n++)t=h.stopped||h.layout.tick();t?(c.checkLayoutSuccess()&&!c.isSubLayout&&c.doPostLayout(),c.tilingPostLayout&&c.tilingPostLayout(),c.isLayoutFinished=!0,h.options.eles.nodes().positions(d),r(),h.cy.one("layoutstop",h.options.stop),h.cy.trigger({type:"layoutstop",layout:h}),o&&cancelAnimationFrame(o),s=!1):(a=h.layout.getPositionsData(),l.eles.nodes().positions(function(e,t){if(!(e="number"==typeof e?t:e).isParent()){for(var r=e.id(),i=a[r],n=e;null==i&&(i=a[n.data("parent")]||a["DummyCompound_"+n.data("parent")],a[r]=i,null!=(n=n.parent()[0])););return null!=i?{x:i.x,y:i.y}:{x:e.position("x"),y:e.position("y")}}}),r(),o=requestAnimationFrame(e))},"iterateAnimated");return c.addListener("layoutstarted",function(){"during"===h.options.animate&&(o=requestAnimationFrame(p))}),c.runLayout(),"during"!==this.options.animate&&(h.options.eles.nodes().not(":parent").layoutPositions(h,h.options,d),s=!1),this},l.prototype.getTopMostNodes=function(e){for(var i={},t=0;t<e.length;t++)i[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(i[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(e,t,r){for(var i=t.length,n=0;n<i;n++){var a,s,o,l=t[n],c=l.children(),h=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?e.add(new u(r.graphManager,new d(l.position("x")-h.w/2,l.position("y")-h.h/2),new p(parseFloat(h.w),parseFloat(h.h)))):e.add(new u(this.graphManager))).id=l.data("id"),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),this.options.nodeDimensionsIncludeLabels&&l.isParent()&&(o=l.boundingBox({includeLabels:!0,includeNodes:!1}).w,a=l.boundingBox({includeLabels:!0,includeNodes:!1}).h,s=l.css("text-halign"),h.labelWidth=o,h.labelHeight=a,h.labelPos=s),this.idToLNode[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&(o=r.getGraphManager().add(r.newGraph(),h),this.processChildrenList(o,c,r))}},l.prototype.stop=function(){return this.stopped=!0,this},mt(function(e){e("layout","cose-bilkent",l)},"register"));typeof cytoscape<"u"&&r(cytoscape),e.exports=r}],a={},mt(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1);function i(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var n,a})});function xhe(e,i){e.forEach(t=>{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 whe(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 The(i){return new Promise(t=>{let e=V("body").append("div").attr("id","cy").attr("style","display:none"),r=fhe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),xhe(i.nodes,r),whe(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 khe(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 Che(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 She,Ehe=x(()=>{mhe(),She=G(bhe(),1),aT(),e(),fhe.use(She.default),mt(xhe,"addNodes"),mt(whe,"addEdges"),mt(The,"createCytoscapeInstance"),mt(khe,"extractPositionedNodes"),mt(Che,"extractPositionedEdges")});async function _he(e,t){M.debug("Starting cose-bilkent layout algorithm");try{Ahe(e);var r=await The(e),i=khe(r),n=Che(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 Ahe(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 Rhe,Lhe=x(()=>{e(),Ehe(),mt(_he,"executeCoseBilkentLayout"),mt(Ahe,"validateLayoutData")}),Nhe=x(()=>{Lhe(),Rhe=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")}),Dhe={};dqe(Dhe,{render:()=>Ihe});var Ihe,Mhe,Ohe,Phe,$he,Bhe,Fhe,zhe,qhe,Uhe,Ghe,jhe,Whe,Yhe,Vhe,Hhe,Xhe,Khe,Zhe,Qhe=x(()=>{Nhe(),Ihe=Rhe}),Jhe=x(()=>{cP(),e(),Mhe={},Ohe=mt(e=>{for(var t of e)Mhe[t.name]=t},"registerLayoutLoaders"),mt(()=>{Ohe([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(GK(),zK)),"loader")},{name:"cose-bilkent",loader:mt(async()=>Promise.resolve().then(()=>(Qhe(),Dhe)),"loader")}])},"registerDefaultLayoutLoaders")(),Phe=mt(async(e,t)=>{var r;if(e.layoutAlgorithm in Mhe)return(await(r=Mhe[e.layoutAlgorithm]).loader()).render(e,t,oP,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm)},"render"),$he=mt((e="",{fallback:t="dagre"}={})=>{if(e in Mhe)return e;if(t in Mhe)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")}),eue=x(()=>{ch(),e(),Bhe=mt((e,t,r,i)=>{e.attr("class",r);var{width:r,height:n,x:a,y:s}=Fhe(e,t),i=(Qc(e,n,r,i),zhe(a,s,r,n,t));e.attr("viewBox",i),M.debug(`viewBox configured: ${i} with padding: `+t)},"setupViewPortForSVG"),Fhe=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"),zhe=mt((e,t,r,i,n)=>e-n+` ${t-n} ${r} `+i,"createViewBox")}),tue=x(()=>{aT(),Cu(),e(),aO(),Jhe(),eue(),a_(),qhe=mt(function(e,t){return t.db.getClasses()},"getClasses"),Uhe=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),YM(t,n)),d=i.db.getDirection(),d=(h.type=i.type,h.layoutAlgorithm=$he(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 Phe(h,u),h.config.flowchart?.diagramPadding??8);t_.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),Bhe(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"),Ghe={getClasses:qhe,draw:Uhe}}),rue=x(()=>{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],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,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],i=[1,44],n=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],te=[1,34],re=[1,35],ie=[1,36],ne=[1,37],ae=[1,57],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],p=[1,61],g=[1,60],f=[1,62],se=[8,9,11,75,77,78],oe=[1,78],le=[1,91],ce=[1,96],he=[1,95],ue=[1,92],de=[1,88],pe=[1,94],ge=[1,90],fe=[1,97],me=[1,93],ye=[1,98],ve=[1,89],be=[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],xe=[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],Te=[1,121],ke=[1,122],Ce=[1,124],Se=[1,123],Ee=[44,60,62,74,89,102,105,106,109,111,114,115,116],_e=[1,133],Ae=[1,147],Re=[1,148],Le=[1,149],Ne=[1,150],De=[1,135],Ie=[1,137],Me=[1,141],Oe=[1,142],Pe=[1,143],$e=[1,144],Be=[1,145],Fe=[1,146],ze=[1,151],qe=[1,152],Ue=[1,131],Ge=[1,132],je=[1,139],We=[1,134],Ye=[1,138],Ve=[1,136],He=[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],Xe=[1,154],Ke=[1,156],v=[8,9,11],b=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],x=[1,176],w=[1,172],T=[1,173],k=[1,177],C=[1,174],S=[1,175],Ze=[77,116,119],E=[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],Qe=[10,106],Je=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],_=[1,247],A=[1,245],R=[1,249],L=[1,243],N=[1,244],D=[1,246],I=[1,248],M=[1,250],et=[1,268],tt=[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,$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"},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]],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])||0<a[o].length)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 183:this.$=a[o];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=i.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=i.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=i.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 43:this.$=a[o-1]+a[o];break;case 44:this.$=a[o];break;case 45:i.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),i.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:i.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:i.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:i.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:this.$=[a[o]];break;case 52:i.addVertex(a[o-5][a[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 54:this.$=a[o];break;case 55:this.$=a[o-2],i.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],i.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],i.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],i.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],i.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 76:this.$=a[o];break;case 77:var l=i.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=i.destructLink(a[o],a[o-2]),this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1],id:a[o-3]};break;case 79:this.$={text:a[o],type:"text"};break;case 80:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 81:this.$={text:a[o],type:"string"};break;case 82:this.$={text:a[o],type:"markdown"};break;case 83:l=i.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=i.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[o-1]};break;case 85:this.$=a[o-1];break;case 86:this.$={text:a[o],type:"text"};break;case 87:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 88:this.$={text:a[o],type:"string"};break;case 89:case 104:this.$={text:a[o],type:"markdown"};break;case 101:this.$={text:a[o],type:"text"};break;case 102:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 103:this.$={text:a[o],type:"text"};break;case 105:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],i.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],i.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2]),i.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],i.setClickEvent(a[o-4],a[o-3],a[o-2]),i.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],i.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],i.setLink(a[o-4],a[o-2]),i.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],i.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],i.setLink(a[o-6],a[o-4],a[o]),i.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],i.setLink(a[o-3],a[o-2]),i.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],i.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],i.setLink(a[o-5],a[o-4],a[o]),i.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],i.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],i.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],i.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],i.updateLinkInterpolate([a[o-6]],a[o-2]),i.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],i.updateLinkInterpolate(a[o-6],a[o-2]),i.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],i.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],i.updateLinkInterpolate(a[o-4],a[o]);break;case 128:case 130:this.$=[a[o]];break;case 129:case 131:a[o-2].push(a[o]),this.$=a[o-2];break;case 133:this.$=a[o-1]+a[o];break;case 181:this.$=a[o];break;case 182:case 184:this.$=a[o-1]+""+a[o];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"}}},"anonymous"),table:[{3:1,4:2,9:$,10:B,12:F},{1:[3]},e(z,q,{5:6}),{4:7,9:$,10:B,12:F},{4:8,9:$,10:B,12:F},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:U,9:G,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,33:24,34:V,36:H,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ie,124:ne},e(z,[2,9]),e(z,[2,10]),e(z,[2,11]),{8:[1,54],9:[1,55],10:ae,15:53,18:56},e(d,[2,3]),e(d,[2,4]),e(d,[2,5]),e(d,[2,6]),e(d,[2,7]),e(d,[2,8]),{8:p,9:g,11:f,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:p,9:g,11:f,21:67},{8:p,9:g,11:f,21:68},{8:p,9:g,11:f,21:69},{8:p,9:g,11:f,21:70},{8:p,9:g,11:f,21:71},{8:p,9:g,10:[1,72],11:f,21:73},e(d,[2,36]),{35:[1,74]},{37:[1,75]},e(d,[2,39]),e(se,[2,50],{18:76,39:77,10:ae,40:oe}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:le,44:ce,60:he,80:[1,86],89:ue,95:[1,83],97:[1,84],101:85,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},e(d,[2,185]),e(d,[2,186]),e(d,[2,187]),e(d,[2,188]),e(be,[2,51]),e(be,[2,54],{46:[1,99]}),e(m,[2,72],{113:112,29:[1,100],44:t,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:r,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:i,102:n,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),e(y,[2,181]),e(y,[2,142]),e(y,[2,143]),e(y,[2,144]),e(y,[2,145]),e(y,[2,146]),e(y,[2,147]),e(y,[2,148]),e(y,[2,149]),e(y,[2,150]),e(y,[2,151]),e(y,[2,152]),e(z,[2,12]),e(z,[2,18]),e(z,[2,19]),{9:[1,113]},e(xe,[2,26],{18:114,10:ae}),e(d,[2,27]),{42:115,43:38,44:t,45:39,47:40,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(d,[2,40]),e(d,[2,41]),e(d,[2,42]),e(we,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:Te,81:ke,116:Ce,119:Se},{75:[1,125],77:[1,126]},e(Ee,[2,83]),e(d,[2,28]),e(d,[2,29]),e(d,[2,30]),e(d,[2,31]),e(d,[2,32]),{10:_e,12:Ae,14:Re,27:Le,28:127,32:Ne,44:De,60:Ie,75:Me,80:[1,129],81:[1,130],83:140,84:Oe,85:Pe,86:$e,87:Be,88:Fe,89:ze,90:qe,91:128,105:Ue,109:Ge,111:je,114:We,115:Ye,116:Ve},e(He,q,{5:153}),e(d,[2,37]),e(d,[2,38]),e(se,[2,48],{44:Xe}),e(se,[2,49],{18:155,10:ae,40:Ke}),e(be,[2,44]),{44:t,47:157,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{102:[1,158],103:159,105:[1,160]},{44:t,47:161,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{44:t,47:162,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},e(v,[2,115],{120:167,10:[1,166],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,117],{10:[1,168]}),e(b,[2,183]),e(b,[2,170]),e(b,[2,171]),e(b,[2,172]),e(b,[2,173]),e(b,[2,174]),e(b,[2,175]),e(b,[2,176]),e(b,[2,177]),e(b,[2,178]),e(b,[2,179]),e(b,[2,180]),{44:t,47:169,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{30:170,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:178,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:180,50:[1,179],67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:181,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:182,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:183,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{109:[1,184]},{30:185,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:186,65:[1,187],67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:188,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:189,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{30:190,67:x,80:w,81:T,82:171,116:k,117:C,118:S},e(y,[2,182]),e(z,[2,20]),e(xe,[2,25]),e(se,[2,46],{39:191,18:192,10:ae,40:oe}),e(we,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{77:[1,196],79:197,116:Ce,119:Se},e(Ze,[2,79]),e(Ze,[2,81]),e(Ze,[2,82]),e(Ze,[2,168]),e(Ze,[2,169]),{76:198,79:120,80:Te,81:ke,116:Ce,119:Se},e(Ee,[2,84]),{8:p,9:g,10:_e,11:f,12:Ae,14:Re,21:200,27:Le,29:[1,199],32:Ne,44:De,60:Ie,75:Me,83:140,84:Oe,85:Pe,86:$e,87:Be,88:Fe,89:ze,90:qe,91:201,105:Ue,109:Ge,111:je,114:We,115:Ye,116:Ve},e(E,[2,101]),e(E,[2,103]),e(E,[2,104]),e(E,[2,157]),e(E,[2,158]),e(E,[2,159]),e(E,[2,160]),e(E,[2,161]),e(E,[2,162]),e(E,[2,163]),e(E,[2,164]),e(E,[2,165]),e(E,[2,166]),e(E,[2,167]),e(E,[2,90]),e(E,[2,91]),e(E,[2,92]),e(E,[2,93]),e(E,[2,94]),e(E,[2,95]),e(E,[2,96]),e(E,[2,97]),e(E,[2,98]),e(E,[2,99]),e(E,[2,100]),{6:11,7:12,8:U,9:G,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,202],33:24,34:V,36:H,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ie,124:ne},{10:ae,18:203},{44:[1,204]},e(be,[2,43]),{10:[1,205],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,206]},{10:[1,207],106:[1,208]},e(Qe,[2,128]),{10:[1,209],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,210],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{80:[1,211]},e(v,[2,109],{10:[1,212]}),e(v,[2,111],{10:[1,213]}),{80:[1,214]},e(b,[2,184]),{80:[1,215],98:[1,216]},e(be,[2,55],{113:112,44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),{31:[1,217],67:x,82:218,116:k,117:C,118:S},e(Je,[2,86]),e(Je,[2,88]),e(Je,[2,89]),e(Je,[2,153]),e(Je,[2,154]),e(Je,[2,155]),e(Je,[2,156]),{49:[1,219],67:x,82:218,116:k,117:C,118:S},{30:220,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{51:[1,221],67:x,82:218,116:k,117:C,118:S},{53:[1,222],67:x,82:218,116:k,117:C,118:S},{55:[1,223],67:x,82:218,116:k,117:C,118:S},{57:[1,224],67:x,82:218,116:k,117:C,118:S},{60:[1,225]},{64:[1,226],67:x,82:218,116:k,117:C,118:S},{66:[1,227],67:x,82:218,116:k,117:C,118:S},{30:228,67:x,80:w,81:T,82:171,116:k,117:C,118:S},{31:[1,229],67:x,82:218,116:k,117:C,118:S},{67:x,69:[1,230],71:[1,231],82:218,116:k,117:C,118:S},{67:x,69:[1,233],71:[1,232],82:218,116:k,117:C,118:S},e(se,[2,45],{18:155,10:ae,40:Ke}),e(se,[2,47],{44:Xe}),e(we,[2,75]),e(we,[2,74]),{62:[1,234],67:x,82:218,116:k,117:C,118:S},e(we,[2,77]),e(Ze,[2,80]),{77:[1,235],79:197,116:Ce,119:Se},{30:236,67:x,80:w,81:T,82:171,116:k,117:C,118:S},e(He,q,{5:237}),e(E,[2,102]),e(d,[2,35]),{43:238,44:t,45:39,47:40,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{10:ae,18:239},{10:_,60:A,84:R,92:240,105:L,107:241,108:242,109:N,110:D,111:I,112:M},{10:_,60:A,84:R,92:251,104:[1,252],105:L,107:241,108:242,109:N,110:D,111:I,112:M},{10:_,60:A,84:R,92:253,104:[1,254],105:L,107:241,108:242,109:N,110:D,111:I,112:M},{105:[1,255]},{10:_,60:A,84:R,92:256,105:L,107:241,108:242,109:N,110:D,111:I,112:M},{44:t,47:257,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},e(v,[2,116]),e(v,[2,118],{10:[1,261]}),e(v,[2,119]),e(m,[2,56]),e(Je,[2,87]),e(m,[2,57]),{51:[1,262],67:x,82:218,116:k,117:C,118:S},e(m,[2,64]),e(m,[2,59]),e(m,[2,60]),e(m,[2,61]),{109:[1,263]},e(m,[2,63]),e(m,[2,65]),{66:[1,264],67:x,82:218,116:k,117:C,118:S},e(m,[2,67]),e(m,[2,68]),e(m,[2,70]),e(m,[2,69]),e(m,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(we,[2,78]),{31:[1,265],67:x,82:218,116:k,117:C,118:S},{6:11,7:12,8:U,9:G,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,266],33:24,34:V,36:H,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ie,124:ne},e(be,[2,53]),{43:267,44:t,45:39,47:40,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,121],{106:et}),e(tt,[2,130],{108:269,10:_,60:A,84:R,105:L,109:N,110:D,111:I,112:M}),e(O,[2,132]),e(O,[2,134]),e(O,[2,135]),e(O,[2,136]),e(O,[2,137]),e(O,[2,138]),e(O,[2,139]),e(O,[2,140]),e(O,[2,141]),e(v,[2,122],{106:et}),{10:[1,270]},e(v,[2,123],{106:et}),{10:[1,271]},e(Qe,[2,129]),e(v,[2,105],{106:et}),e(v,[2,106],{113:112,44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),e(v,[2,110]),e(v,[2,112],{10:[1,272]}),e(v,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:p,9:g,11:f,21:277},e(d,[2,34]),e(be,[2,52]),{10:_,60:A,84:R,105:L,107:278,108:242,109:N,110:D,111:I,112:M},e(O,[2,133]),{14:le,44:ce,60:he,89:ue,101:279,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},{14:le,44:ce,60:he,89:ue,101:280,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},{98:[1,281]},e(v,[2,120]),e(m,[2,58]),{30:282,67:x,80:w,81:T,82:171,116:k,117:C,118:S},e(m,[2,66]),e(He,q,{5:283}),e(tt,[2,131],{108:269,10:_,60:A,84:R,105:L,109:N,110:D,111:I,112:M}),e(v,[2,126],{120:167,10:[1,284],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,127],{120:167,10:[1,285],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,114]),{31:[1,286],67:x,82:218,116:k,117:C,118:S},{6:11,7:12,8:U,9:G,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,287],33:24,34:V,36:H,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ie,124:ne},{10:_,60:A,84:R,92:288,105:L,107:241,108:242,109:N,110:D,111:I,112:M},{10:_,60:A,84:R,92:289,105:L,107:241,108:242,109:N,110:D,111:I,112:M},e(m,[2,62]),e(d,[2,33]),e(v,[2,124],{106:et}),e(v,[2,125],{106:et})],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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),t.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,"<br/>"),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 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119: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]*)/,/^(?:[^\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,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],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,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};$.lexer=B,mt(P,"Parser"),(jhe=new((P.prototype=$).Parser=P)).parser=jhe,Whe=jhe}),iue=x(()=>{rue(),(Yhe=Object.assign({},Whe)).parse=e=>(e=e.replace(/}\s*\n/g,`}
|
||
`),Whe.parse(e)),Vhe=Yhe}),nue=x(()=>{Hhe=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")}),aue=x(()=>{Wr(),nue(),Xhe=mt((e,t)=>{var r=(n=ht)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),Khe=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: ${Xhe(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;
|
||
}
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${e.edgeLabelBackground};
|
||
fill: ${e.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
${Hhe()}
|
||
`,"getStyles"),Zhe=Khe}),sue={};dqe(sue,{diagram:()=>oue});var oue,lue,cue,hue,uue=x(()=>{Cu(),nO(),tue(),iue(),aue(),oue={parser:Vhe,get db(){return new WM},renderer:Ghe,styles:Zhe,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Sh({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Sh({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),due=x(()=>{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,50],i=[1,10],n=[1,11],a=[1,12],s=[1,13],o=[1,20],l=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],P=[1,26],g=[1,18],f=[1,33],m=[1,34],y=[1,35],v=[1,36],b=[1,37],$=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],x=[1,42],w=[1,43],T=[1,52],k=[40,50,68,69],C=[1,63],S=[1,61],E=[1,58],_=[1,62],A=[1,64],R=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],B=[63,64,65,66,67],F=[1,81],z=[1,80],q=[1,78],U=[1,79],G=[6,10,42,47],L=[6,10,13,41,42,47,48,49],N=[1,89],D=[1,88],I=[1,87],M=[19,56],j=[1,98],W=[1,97],O=[19,56,58,60],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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$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",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"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],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,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 56:case 64: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 76:case 77:this.$=a[o].replace(/"/g,"");break;case 55:case 78:this.$=a[o];break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 62:case 63:case 66:this.$=a[o];break;case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 67:this.$=a[o].replace(/"/g,"");break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=i.Cardinality.ZERO_OR_ONE;break;case 70:this.$=i.Cardinality.ZERO_OR_MORE;break;case 71:this.$=i.Cardinality.ONE_OR_MORE;break;case 72:this.$=i.Cardinality.ONLY_ONE;break;case 73:this.$=i.Cardinality.MD_PARENT;break;case 74:this.$=i.Identification.NON_IDENTIFYING;break;case 75: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:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:27,11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:f,64:m,65:y,66:v,67:b}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(r,[2,27]),t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),t(r,[2,31]),t($,[2,54]),t($,[2,55]),t(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:41,40:x,41:w},{16:44,40:x,41:w},{16:45,40:x,41:w},t(r,[2,4]),{11:46,40:d,50:g},{16:47,40:x,41:w},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},t(k,[2,69]),t(k,[2,70]),t(k,[2,71]),t(k,[2,72]),t(k,[2,73]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:C,38:57,41:S,42:E,45:59,46:60,48:_,49:A},t(R,[2,37]),t(R,[2,38]),{16:65,40:x,41:w,42:E},{13:C,38:66,41:S,42:E,45:59,46:60,48:_,49:A},{13:[1,67],15:[1,68]},t(r,[2,17],{61:32,12:69,17:[1,70],42:E,63:f,64:m,65:y,66:v,67:b}),{19:[1,71]},t(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:b},t(B,[2,74]),t(B,[2,75]),{6:F,10:z,39:77,42:q,47:U},{40:[1,82],41:[1,83]},t(G,[2,43],{46:84,13:C,41:S,48:_,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:E}),{6:F,10:z,39:85,42:q,47:U},{14:86,40:N,50:D,70:I},{16:90,40:x,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:T},t(r,[2,12]),{19:[2,57]},t(M,[2,58],{54:94,55:95,57:96,59:j,60:W}),t([19,56,59,60],[2,63]),t(r,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(r,[2,36]),{13:C,41:S,45:101,46:60,48:_,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,76]),t(r,[2,77]),t(r,[2,78]),{13:[1,102],42:E},{13:[1,104],15:[1,103]},{19:[1,105]},t(r,[2,15]),t(M,[2,59],{55:106,58:[1,107],60:W}),t(M,[2,60]),t(O,[2,64]),t(M,[2,67]),t(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:x,41:w},t(G,[2,44],{46:84,13:C,41:S,48:_,49:A}),{14:111,40:N,50:D,70:I},{16:112,40:x,41:w},{14:113,40:N,50:D,70:I},t(r,[2,13]),t(M,[2,61]),{57:114,59:j},{19:[1,115]},t(r,[2,20]),t(r,[2,23],{17:[1,116],42:E}),t(r,[2,11]),{13:[1,117],42:E},t(r,[2,10]),t(O,[2,65]),t(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:N,50:D,70:I},{19:[1,121]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;case 30:return t.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 63;case 42:case 43:case 44:return 65;case 45:case 46:return 63;case 47:case 48:case 49:case 50:case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:case 56:case 57:case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:case 65:return 69;case 66:case 67:case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return t.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,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,71,72,73,74],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(lue=new((e.prototype=i).Parser=e)).parser=lue,cue=lue}),pue=x(()=>{e(),Cu(),ku(),a_(),hue=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=yh,this.getAccTitle=vh,this.setAccDescription=bh,this.getAccDescription=xh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,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:[]}),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=[],mh()}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:n_(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};i.push(o)}return{nodes:r,edges:i,other:{},config:n,direction:"TB"}}}}),gue={};dqe(gue,{draw:()=>fue});var fue,mue,yue,vue,bue=x(()=>{Cu(),e(),aO(),Jhe(),eue(),a_(),aT(),fue=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=YM(t,n);o.type=i.type,o.layoutAlgorithm=$he(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 Phe(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),t=l.selectAll('[id*="-background"]'),0<Array.from(t).length&&t.each(function(){var e=V(this),t=e.attr("id").replace("-background","");(t=l.select("#"+CSS.escape(t))).empty()||(t=t.attr("transform"),e.attr("transform",t))}),t_.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Bhe(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),xue=x(()=>{Wr(),mue=mt((e,t)=>{var r=(n=ht)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),yue=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: ${mue(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;
|
||
}
|
||
`,"getStyles"),vue=yue}),wue={};dqe(wue,{diagram:()=>Tue});var Tue,kue=x(()=>{due(),pue(),bue(),xue(),Tue={parser:cue,get db(){return new hue},renderer:gue,styles:vue}});function Cue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function Sue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Eue(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 Aue(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}function Rue(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Lue(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Nue(e){return Rue(e)&&"string"==typeof e.fullText}var Due,Iue=x(()=>{mt(Cue,"isAstNode"),mt(Sue,"isReference"),mt(Eue,"isMultiReference"),mt(_ue,"isAstNodeDescription"),mt(Aue,"isLinkingError"),Due=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 Cue(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(Rue,"isCompositeCstNode"),mt(Lue,"isLeafCstNode"),mt(Nue,"isRootCstNode")});function Mue(e){return"string"==typeof e?e:"u"<typeof e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function Oue(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Pue(...r){if(1===r.length){let t=r[0];if(t instanceof $ue)return t;if(Oue(t))return new $ue(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new $ue(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:Fue)}return 1<r.length?new $ue(()=>({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<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}}while(e.collIndex<r.length&&(Oue(t=r[e.collIndex++])?e.iterator=t[Symbol.iterator]():t&&"number"==typeof t.length&&(e.array=t)),e.iterator||e.array||e.collIndex<r.length);return Fue}):Bue}var $ue,Bue,Fue,zue,que,Uue=x(()=>{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;$ue=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 Fue})}join(e=","){let t=this.iterator(),r="",i,n=!1;for(;(i=t.next()).done||(n&&(r+=e),r+=Mue(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?Fue:{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 Fue})}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(!Oue(r=i(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Fue})}flat(e){if((e=void 0===e?1:e)<=0)return this;let i=1<e?this.flat(e-1):this;return new a(()=>({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(!Oue(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Fue})}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<r;e++)if(this.nextFn(t).done)return t;return t},this.nextFn)}limit(t){return new a(()=>({size:0,state:this.startFn()}),e=>(e.size++,t<e.size?Fue:this.nextFn(e.state)))}distinct(i){return new a(()=>({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 Fue})}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(Mue,"toString"),mt(Oue,"isIterable"),Bue=new $ue(()=>{},()=>Fue),Fue=Object.freeze({done:!0,value:void 0}),mt(Pue,"stream"),zue=class extends $ue{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);0<e.iterators.length;){var t=e.iterators[e.iterators.length-1].next();if(!t.done)return e.iterators.push(r(t.value)[Symbol.iterator]()),t;e.iterators.pop()}return Fue})}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),prune:mt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},n=que=que||{},mt(e,"sum"),n.sum=e,mt(t,"product"),n.product=t,mt(r,"min"),n.min=r,mt(i,"max"),n.max=i}),Gue={};function jue(i,n={}){for(let[r,e]of Object.entries(i))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{Cue(e)&&(e.$container=i,e.$containerProperty=r,e.$containerIndex=t,n.deep)&&jue(e,n)}):Cue(e)&&(e.$container=i,e.$containerProperty=r,n.deep)&&jue(e,n))}function Wue(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function Yue(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function Vue(e){if(e=Hue(e).$document)return e;throw new Error("AST node has no document.")}function Hue(e){for(;e.$container;)e=e.$container;return e}function Xue(e){return Sue(e)?e.ref?[e.ref]:[]:Eue(e)?e.items.map(e=>e.ref):[]}function Kue(n,e){if(!n)throw new Error("Node must be an AstNode.");let a=e?.range;return new $ue(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=n[t];if(Cue(r)){if(e.keyIndex++,Jue(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var i=r[e.arrayIndex++];if(Cue(i)&&Jue(i,a))return{done:!1,value:i}}e.arrayIndex=0}}e.keyIndex++}return Fue})}function Zue(e,t){if(e)return new zue(e,e=>Kue(e,t));throw new Error("Root node must be an AstNode.")}function Que(e,t){if(e)return t?.range&&!Jue(e,t.range)?new zue(e,()=>[]):new zue(e,e=>Kue(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function Jue(e,t){return!t||!!(e=e.$cstNode?.range)&&d0e(e,t)}function ede(a){return new $ue(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=a[t];if(Sue(r)||Eue(r))return e.keyIndex++,{done:!1,value:{reference:r,container:a,property:t}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var i=e.arrayIndex++,n=r[i];if(Sue(n)||Eue(r))return{done:!1,value:{reference:n,container:a,property:t,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Fue})}function tde(e,t){var r,e=e.getTypeMetaData(t.$type),i=t;for(r of Object.values(e.properties))void 0!==r.defaultValue&&void 0===i[r.name]&&(i[r.name]=rde(r.defaultValue))}function rde(e){return Array.isArray(e)?[...e.map(rde)]:e}function ide(e,t,r){var i,n,a={$type:e.$type};r&&(r.set(e,a),r.set(a,e));for([i,n]of Object.entries(e))if(!i.startsWith("$"))if(Cue(n))a[i]=ide(n,t,r);else if(Sue(n))a[i]=t(a,i,n.$refNode,n.$refText,n);else if(Array.isArray(n)){var s,o=[];for(s of n)Cue(s)?o.push(ide(s,t,r)):Sue(s)?o.push(t(a,i,s.$refNode,s.$refText,s)):o.push(s);a[i]=o}else a[i]=n;return jue(a,{deep:!0}),a}dqe(Gue,{assignMandatoryProperties:()=>tde,copyAstNode:()=>ide,findRootNode:()=>Hue,getContainerOfType:()=>Wue,getDocument:()=>Vue,getReferenceNodes:()=>Xue,hasContainerOfType:()=>Yue,linkContentToContainer:()=>jue,streamAllContents:()=>Zue,streamAst:()=>Que,streamContents:()=>Kue,streamReferences:()=>ede});var nde=x(()=>{Iue(),Uue(),_0e(),mt(jue,"linkContentToContainer"),mt(Wue,"getContainerOfType"),mt(Yue,"hasContainerOfType"),mt(Vue,"getDocument"),mt(Hue,"findRootNode"),mt(Xue,"getReferenceNodes"),mt(Kue,"streamContents"),mt(Zue,"streamAllContents"),mt(Que,"streamAst"),mt(Jue,"isAstNodeInRange"),mt(ede,"streamReferences"),mt(tde,"assignMandatoryProperties"),mt(rde,"copyDefaultValue"),mt(ide,"copyAstNode")}),ade={};function sde(e){return r0e.isInstance(e,npe.$type)}function ode(e){return r0e.isInstance(e,ape.$type)}function lde(e){return r0e.isInstance(e,spe.$type)}function cde(e){return r0e.isInstance(e,ope.$type)}function hde(e){return r0e.isInstance(e,lpe.$type)}function ude(e){return r0e.isInstance(e,cpe.$type)}function dde(e){return r0e.isInstance(e,hpe.$type)}function pde(e){return r0e.isInstance(e,upe.$type)}function gde(e){return r0e.isInstance(e,dpe.$type)}function fde(e){return r0e.isInstance(e,ppe.$type)}function mde(e){return r0e.isInstance(e,gpe.$type)}function yde(e){return r0e.isInstance(e,fpe.$type)}function vde(e){return r0e.isInstance(e,mpe.$type)}function bde(e){return r0e.isInstance(e,ype.$type)}function xde(e){return r0e.isInstance(e,vpe.$type)}function wde(e){return r0e.isInstance(e,bpe.$type)}function Tde(e){return r0e.isInstance(e,xpe.$type)}function kde(e){return r0e.isInstance(e,wpe.$type)}function Cde(e){return r0e.isInstance(e,Tpe.$type)}function Sde(e){return r0e.isInstance(e,kpe.$type)}function Ede(e){return r0e.isInstance(e,Cpe.$type)}function _de(e){return r0e.isInstance(e,Spe.$type)}function Ade(e){return r0e.isInstance(e,Epe.$type)}function Rde(e){return r0e.isInstance(e,_pe.$type)}function Lde(e){return r0e.isInstance(e,Ape.$type)}function Nde(e){return r0e.isInstance(e,Rpe.$type)}function Dde(e){return r0e.isInstance(e,Lpe.$type)}function Ide(e){return r0e.isInstance(e,Npe.$type)}function Mde(e){return r0e.isInstance(e,Dpe.$type)}function Ode(e){return r0e.isInstance(e,Ipe.$type)}function Pde(e){return r0e.isInstance(e,Mpe.$type)}function $de(e){return r0e.isInstance(e,Ope.$type)}function Bde(e){return r0e.isInstance(e,Ppe.$type)}function Fde(e){return r0e.isInstance(e,$pe.$type)}function zde(e){return r0e.isInstance(e,Bpe.$type)}function qde(e){return r0e.isInstance(e,Fpe.$type)}function Ude(e){return r0e.isInstance(e,zpe.$type)}function Gde(e){return r0e.isInstance(e,qpe.$type)}function jde(e){return r0e.isInstance(e,Upe.$type)}function Wde(e){return r0e.isInstance(e,Gpe.$type)}function Yde(e){return r0e.isInstance(e,jpe.$type)}function Vde(e){return r0e.isInstance(e,Wpe.$type)}function Hde(e){return r0e.isInstance(e,Ype.$type)}function Xde(e){return r0e.isInstance(e,Vpe.$type)}function Kde(e){return r0e.isInstance(e,Hpe.$type)}function Zde(e){return r0e.isInstance(e,Xpe.$type)}function Qde(e){return r0e.isInstance(e,Kpe.$type)}function Jde(e){return r0e.isInstance(e,Zpe.$type)}function epe(e){return r0e.isInstance(e,Qpe.$type)}function tpe(e){return r0e.isInstance(e,Jpe.$type)}function rpe(e){return r0e.isInstance(e,e0e.$type)}dqe(ade,{AbstractElement:()=>npe,AbstractParserRule:()=>ape,AbstractRule:()=>spe,AbstractType:()=>ope,Action:()=>lpe,Alternatives:()=>cpe,ArrayLiteral:()=>hpe,ArrayType:()=>upe,Assignment:()=>dpe,BooleanLiteral:()=>ppe,CharacterRange:()=>gpe,Condition:()=>fpe,Conjunction:()=>mpe,CrossReference:()=>ype,Disjunction:()=>vpe,EndOfFile:()=>bpe,Grammar:()=>xpe,GrammarImport:()=>wpe,Group:()=>Tpe,InferredType:()=>kpe,InfixRule:()=>Cpe,InfixRuleOperatorList:()=>Spe,InfixRuleOperators:()=>Epe,Interface:()=>_pe,Keyword:()=>Ape,LangiumGrammarAstReflection:()=>t0e,LangiumGrammarTerminals:()=>ipe,NamedArgument:()=>Rpe,NegatedToken:()=>Lpe,Negation:()=>Npe,NumberLiteral:()=>Dpe,Parameter:()=>Ipe,ParameterReference:()=>Mpe,ParserRule:()=>Ope,ReferenceType:()=>Ppe,RegexToken:()=>$pe,ReturnType:()=>Bpe,RuleCall:()=>Fpe,SimpleType:()=>zpe,StringLiteral:()=>qpe,TerminalAlternatives:()=>Upe,TerminalElement:()=>Gpe,TerminalGroup:()=>jpe,TerminalRule:()=>Wpe,TerminalRuleCall:()=>Ype,Type:()=>Vpe,TypeAttribute:()=>Hpe,TypeDefinition:()=>Xpe,UnionType:()=>Kpe,UnorderedGroup:()=>Zpe,UntilToken:()=>Qpe,ValueLiteral:()=>Jpe,Wildcard:()=>e0e,isAbstractElement:()=>sde,isAbstractParserRule:()=>ode,isAbstractRule:()=>lde,isAbstractType:()=>cde,isAction:()=>hde,isAlternatives:()=>ude,isArrayLiteral:()=>dde,isArrayType:()=>pde,isAssignment:()=>gde,isBooleanLiteral:()=>fde,isCharacterRange:()=>mde,isCondition:()=>yde,isConjunction:()=>vde,isCrossReference:()=>bde,isDisjunction:()=>xde,isEndOfFile:()=>wde,isGrammar:()=>Tde,isGrammarImport:()=>kde,isGroup:()=>Cde,isInferredType:()=>Sde,isInfixRule:()=>Ede,isInfixRuleOperatorList:()=>_de,isInfixRuleOperators:()=>Ade,isInterface:()=>Rde,isKeyword:()=>Lde,isNamedArgument:()=>Nde,isNegatedToken:()=>Dde,isNegation:()=>Ide,isNumberLiteral:()=>Mde,isParameter:()=>Ode,isParameterReference:()=>Pde,isParserRule:()=>$de,isReferenceType:()=>Bde,isRegexToken:()=>Fde,isReturnType:()=>zde,isRuleCall:()=>qde,isSimpleType:()=>Ude,isStringLiteral:()=>Gde,isTerminalAlternatives:()=>jde,isTerminalElement:()=>Wde,isTerminalGroup:()=>Yde,isTerminalRule:()=>Vde,isTerminalRuleCall:()=>Hde,isType:()=>Xde,isTypeAttribute:()=>Kde,isTypeDefinition:()=>Zde,isUnionType:()=>Qde,isUnorderedGroup:()=>Jde,isUntilToken:()=>epe,isValueLiteral:()=>tpe,isWildcard:()=>rpe,reflection:()=>r0e});var ipe,npe,ape,spe,ope,lpe,cpe,hpe,upe,dpe,ppe,gpe,fpe,mpe,ype,vpe,bpe,xpe,wpe,Tpe,kpe,Cpe,Spe,Epe,_pe,Ape,Rpe,Lpe,Npe,Dpe,Ipe,Mpe,Ope,Ppe,$pe,Bpe,Fpe,zpe,qpe,Upe,Gpe,jpe,Wpe,Ype,Vpe,Hpe,Xpe,Kpe,Zpe,Qpe,Jpe,e0e,t0e,r0e,i0e=x(()=>{Iue(),ipe={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]*/},npe={$type:"AbstractElement",cardinality:"cardinality"},mt(sde,"isAbstractElement"),ape={$type:"AbstractParserRule"},mt(ode,"isAbstractParserRule"),spe={$type:"AbstractRule"},mt(lde,"isAbstractRule"),ope={$type:"AbstractType"},mt(cde,"isAbstractType"),lpe={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"},mt(hde,"isAction"),cpe={$type:"Alternatives",cardinality:"cardinality",elements:"elements"},mt(ude,"isAlternatives"),hpe={$type:"ArrayLiteral",elements:"elements"},mt(dde,"isArrayLiteral"),upe={$type:"ArrayType",elementType:"elementType"},mt(pde,"isArrayType"),dpe={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"},mt(gde,"isAssignment"),ppe={$type:"BooleanLiteral",true:"true"},mt(fde,"isBooleanLiteral"),gpe={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"},mt(mde,"isCharacterRange"),fpe={$type:"Condition"},mt(yde,"isCondition"),mpe={$type:"Conjunction",left:"left",right:"right"},mt(vde,"isConjunction"),ype={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"},mt(bde,"isCrossReference"),vpe={$type:"Disjunction",left:"left",right:"right"},mt(xde,"isDisjunction"),bpe={$type:"EndOfFile",cardinality:"cardinality"},mt(wde,"isEndOfFile"),xpe={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},mt(Tde,"isGrammar"),wpe={$type:"GrammarImport",path:"path"},mt(kde,"isGrammarImport"),Tpe={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"},mt(Cde,"isGroup"),kpe={$type:"InferredType",name:"name"},mt(Sde,"isInferredType"),Cpe={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"},mt(Ede,"isInfixRule"),Spe={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},mt(_de,"isInfixRuleOperatorList"),Epe={$type:"InfixRuleOperators",precedences:"precedences"},mt(Ade,"isInfixRuleOperators"),_pe={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"},mt(Rde,"isInterface"),Ape={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"},mt(Lde,"isKeyword"),Rpe={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},mt(Nde,"isNamedArgument"),Lpe={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(Dde,"isNegatedToken"),Npe={$type:"Negation",value:"value"},mt(Ide,"isNegation"),Dpe={$type:"NumberLiteral",value:"value"},mt(Mde,"isNumberLiteral"),Ipe={$type:"Parameter",name:"name"},mt(Ode,"isParameter"),Mpe={$type:"ParameterReference",parameter:"parameter"},mt(Pde,"isParameterReference"),Ope={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"},mt($de,"isParserRule"),Ppe={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},mt(Bde,"isReferenceType"),$pe={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"},mt(Fde,"isRegexToken"),Bpe={$type:"ReturnType",name:"name"},mt(zde,"isReturnType"),Fpe={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"},mt(qde,"isRuleCall"),zpe={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"},mt(Ude,"isSimpleType"),qpe={$type:"StringLiteral",value:"value"},mt(Gde,"isStringLiteral"),Upe={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(jde,"isTerminalAlternatives"),Gpe={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Wde,"isTerminalElement"),jpe={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Yde,"isTerminalGroup"),Wpe={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"},mt(Vde,"isTerminalRule"),Ype={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"},mt(Hde,"isTerminalRuleCall"),Vpe={$type:"Type",name:"name",type:"type"},mt(Xde,"isType"),Hpe={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},mt(Kde,"isTypeAttribute"),Xpe={$type:"TypeDefinition"},mt(Zde,"isTypeDefinition"),Kpe={$type:"UnionType",types:"types"},mt(Qde,"isUnionType"),Zpe={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"},mt(Jde,"isUnorderedGroup"),Qpe={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(epe,"isUntilToken"),Jpe={$type:"ValueLiteral"},mt(tpe,"isValueLiteral"),e0e={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(rpe,"isWildcard"),t0e=class extends Due{static{mt(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:npe.$type,properties:{cardinality:{name:npe.cardinality}},superTypes:[]},AbstractParserRule:{name:ape.$type,properties:{},superTypes:[spe.$type,ope.$type]},AbstractRule:{name:spe.$type,properties:{},superTypes:[]},AbstractType:{name:ope.$type,properties:{},superTypes:[]},Action:{name:lpe.$type,properties:{cardinality:{name:lpe.cardinality},feature:{name:lpe.feature},inferredType:{name:lpe.inferredType},operator:{name:lpe.operator},type:{name:lpe.type,referenceType:ope.$type}},superTypes:[npe.$type]},Alternatives:{name:cpe.$type,properties:{cardinality:{name:cpe.cardinality},elements:{name:cpe.elements,defaultValue:[]}},superTypes:[npe.$type]},ArrayLiteral:{name:hpe.$type,properties:{elements:{name:hpe.elements,defaultValue:[]}},superTypes:[Jpe.$type]},ArrayType:{name:upe.$type,properties:{elementType:{name:upe.elementType}},superTypes:[Xpe.$type]},Assignment:{name:dpe.$type,properties:{cardinality:{name:dpe.cardinality},feature:{name:dpe.feature},operator:{name:dpe.operator},predicate:{name:dpe.predicate},terminal:{name:dpe.terminal}},superTypes:[npe.$type]},BooleanLiteral:{name:ppe.$type,properties:{true:{name:ppe.true,defaultValue:!1}},superTypes:[fpe.$type,Jpe.$type]},CharacterRange:{name:gpe.$type,properties:{cardinality:{name:gpe.cardinality},left:{name:gpe.left},lookahead:{name:gpe.lookahead},parenthesized:{name:gpe.parenthesized,defaultValue:!1},right:{name:gpe.right}},superTypes:[Gpe.$type]},Condition:{name:fpe.$type,properties:{},superTypes:[]},Conjunction:{name:mpe.$type,properties:{left:{name:mpe.left},right:{name:mpe.right}},superTypes:[fpe.$type]},CrossReference:{name:ype.$type,properties:{cardinality:{name:ype.cardinality},deprecatedSyntax:{name:ype.deprecatedSyntax,defaultValue:!1},isMulti:{name:ype.isMulti,defaultValue:!1},terminal:{name:ype.terminal},type:{name:ype.type,referenceType:ope.$type}},superTypes:[npe.$type]},Disjunction:{name:vpe.$type,properties:{left:{name:vpe.left},right:{name:vpe.right}},superTypes:[fpe.$type]},EndOfFile:{name:bpe.$type,properties:{cardinality:{name:bpe.cardinality}},superTypes:[npe.$type]},Grammar:{name:xpe.$type,properties:{imports:{name:xpe.imports,defaultValue:[]},interfaces:{name:xpe.interfaces,defaultValue:[]},isDeclared:{name:xpe.isDeclared,defaultValue:!1},name:{name:xpe.name},rules:{name:xpe.rules,defaultValue:[]},types:{name:xpe.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:wpe.$type,properties:{path:{name:wpe.path}},superTypes:[]},Group:{name:Tpe.$type,properties:{cardinality:{name:Tpe.cardinality},elements:{name:Tpe.elements,defaultValue:[]},guardCondition:{name:Tpe.guardCondition},predicate:{name:Tpe.predicate}},superTypes:[npe.$type]},InferredType:{name:kpe.$type,properties:{name:{name:kpe.name}},superTypes:[ope.$type]},InfixRule:{name:Cpe.$type,properties:{call:{name:Cpe.call},dataType:{name:Cpe.dataType},inferredType:{name:Cpe.inferredType},name:{name:Cpe.name},operators:{name:Cpe.operators},parameters:{name:Cpe.parameters,defaultValue:[]},returnType:{name:Cpe.returnType,referenceType:ope.$type}},superTypes:[ape.$type]},InfixRuleOperatorList:{name:Spe.$type,properties:{associativity:{name:Spe.associativity},operators:{name:Spe.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Epe.$type,properties:{precedences:{name:Epe.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:_pe.$type,properties:{attributes:{name:_pe.attributes,defaultValue:[]},name:{name:_pe.name},superTypes:{name:_pe.superTypes,defaultValue:[],referenceType:ope.$type}},superTypes:[ope.$type]},Keyword:{name:Ape.$type,properties:{cardinality:{name:Ape.cardinality},predicate:{name:Ape.predicate},value:{name:Ape.value}},superTypes:[npe.$type]},NamedArgument:{name:Rpe.$type,properties:{calledByName:{name:Rpe.calledByName,defaultValue:!1},parameter:{name:Rpe.parameter,referenceType:Ipe.$type},value:{name:Rpe.value}},superTypes:[]},NegatedToken:{name:Lpe.$type,properties:{cardinality:{name:Lpe.cardinality},lookahead:{name:Lpe.lookahead},parenthesized:{name:Lpe.parenthesized,defaultValue:!1},terminal:{name:Lpe.terminal}},superTypes:[Gpe.$type]},Negation:{name:Npe.$type,properties:{value:{name:Npe.value}},superTypes:[fpe.$type]},NumberLiteral:{name:Dpe.$type,properties:{value:{name:Dpe.value}},superTypes:[Jpe.$type]},Parameter:{name:Ipe.$type,properties:{name:{name:Ipe.name}},superTypes:[]},ParameterReference:{name:Mpe.$type,properties:{parameter:{name:Mpe.parameter,referenceType:Ipe.$type}},superTypes:[fpe.$type]},ParserRule:{name:Ope.$type,properties:{dataType:{name:Ope.dataType},definition:{name:Ope.definition},entry:{name:Ope.entry,defaultValue:!1},fragment:{name:Ope.fragment,defaultValue:!1},inferredType:{name:Ope.inferredType},name:{name:Ope.name},parameters:{name:Ope.parameters,defaultValue:[]},returnType:{name:Ope.returnType,referenceType:ope.$type}},superTypes:[ape.$type]},ReferenceType:{name:Ppe.$type,properties:{isMulti:{name:Ppe.isMulti,defaultValue:!1},referenceType:{name:Ppe.referenceType}},superTypes:[Xpe.$type]},RegexToken:{name:$pe.$type,properties:{cardinality:{name:$pe.cardinality},lookahead:{name:$pe.lookahead},parenthesized:{name:$pe.parenthesized,defaultValue:!1},regex:{name:$pe.regex}},superTypes:[Gpe.$type]},ReturnType:{name:Bpe.$type,properties:{name:{name:Bpe.name}},superTypes:[]},RuleCall:{name:Fpe.$type,properties:{arguments:{name:Fpe.arguments,defaultValue:[]},cardinality:{name:Fpe.cardinality},predicate:{name:Fpe.predicate},rule:{name:Fpe.rule,referenceType:spe.$type}},superTypes:[npe.$type]},SimpleType:{name:zpe.$type,properties:{primitiveType:{name:zpe.primitiveType},stringType:{name:zpe.stringType},typeRef:{name:zpe.typeRef,referenceType:ope.$type}},superTypes:[Xpe.$type]},StringLiteral:{name:qpe.$type,properties:{value:{name:qpe.value}},superTypes:[Jpe.$type]},TerminalAlternatives:{name:Upe.$type,properties:{cardinality:{name:Upe.cardinality},elements:{name:Upe.elements,defaultValue:[]},lookahead:{name:Upe.lookahead},parenthesized:{name:Upe.parenthesized,defaultValue:!1}},superTypes:[Gpe.$type]},TerminalElement:{name:Gpe.$type,properties:{cardinality:{name:Gpe.cardinality},lookahead:{name:Gpe.lookahead},parenthesized:{name:Gpe.parenthesized,defaultValue:!1}},superTypes:[npe.$type]},TerminalGroup:{name:jpe.$type,properties:{cardinality:{name:jpe.cardinality},elements:{name:jpe.elements,defaultValue:[]},lookahead:{name:jpe.lookahead},parenthesized:{name:jpe.parenthesized,defaultValue:!1}},superTypes:[Gpe.$type]},TerminalRule:{name:Wpe.$type,properties:{definition:{name:Wpe.definition},fragment:{name:Wpe.fragment,defaultValue:!1},hidden:{name:Wpe.hidden,defaultValue:!1},name:{name:Wpe.name},type:{name:Wpe.type}},superTypes:[spe.$type]},TerminalRuleCall:{name:Ype.$type,properties:{cardinality:{name:Ype.cardinality},lookahead:{name:Ype.lookahead},parenthesized:{name:Ype.parenthesized,defaultValue:!1},rule:{name:Ype.rule,referenceType:Wpe.$type}},superTypes:[Gpe.$type]},Type:{name:Vpe.$type,properties:{name:{name:Vpe.name},type:{name:Vpe.type}},superTypes:[ope.$type]},TypeAttribute:{name:Hpe.$type,properties:{defaultValue:{name:Hpe.defaultValue},isOptional:{name:Hpe.isOptional,defaultValue:!1},name:{name:Hpe.name},type:{name:Hpe.type}},superTypes:[]},TypeDefinition:{name:Xpe.$type,properties:{},superTypes:[]},UnionType:{name:Kpe.$type,properties:{types:{name:Kpe.types,defaultValue:[]}},superTypes:[Xpe.$type]},UnorderedGroup:{name:Zpe.$type,properties:{cardinality:{name:Zpe.cardinality},elements:{name:Zpe.elements,defaultValue:[]}},superTypes:[npe.$type]},UntilToken:{name:Qpe.$type,properties:{cardinality:{name:Qpe.cardinality},lookahead:{name:Qpe.lookahead},parenthesized:{name:Qpe.parenthesized,defaultValue:!1},terminal:{name:Qpe.terminal}},superTypes:[Gpe.$type]},ValueLiteral:{name:Jpe.$type,properties:{},superTypes:[]},Wildcard:{name:e0e.$type,properties:{cardinality:{name:e0e.cardinality},lookahead:{name:e0e.lookahead},parenthesized:{name:e0e.parenthesized,defaultValue:!1}},superTypes:[Gpe.$type]}}}},r0e=new t0e}),n0e={};function a0e(e){let t=e,r=!1;for(;t;){var i=Wue(t.grammarSource,$de);if(!i||!i.dataType)return r?t:void 0;t=t.container,r=!0}}function s0e(e){return new zue(e,e=>Rue(e)?e.content:[],{includeRoot:!0})}function o0e(e){return s0e(e).filter(Lue)}function l0e(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function c0e(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function h0e(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function u0e(e,t){var r;return e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character?S0e.Before:e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?S0e.After:(r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,e=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character,r&&e?S0e.Inside:r?S0e.OverlapBack:e?S0e.OverlapFront:S0e.Outside)}function d0e(e,t){return u0e(e,t)>S0e.After}function p0e(e,t,r=E0e){var i;if(e)return 0<t&&(i=t-e.offset,i=e.text.charAt(i),r.test(i)||t--),m0e(e,t)}function g0e(t,r){if(t){var e=b0e(t,!0);if(e&&f0e(e,r))return e;if(Nue(t))for(let e=t.content.findIndex(e=>!e.hidden)-1;0<=e;e--){var i=t.content[e];if(f0e(i,r))return i}}}function f0e(e,t){return Lue(e)&&t.includes(e.tokenType.name)}function m0e(e,t){return Lue(e)?e:Rue(e)&&(e=v0e(e,t,!1))?m0e(e,t):void 0}function y0e(e,t){return Lue(e)?e:Rue(e)&&(e=v0e(e,t,!0))?y0e(e,t):void 0}function v0e(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 b0e(r,i=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0<t;){t--;var n=e.content[t];if(i||!n.hidden)return n}r=e}}function x0e(i,n=!0){for(;i.container;){let e=i.container,t=e.content.indexOf(i),r=e.content.length-1;for(;t<r;){t++;var a=e.content[t];if(n||!a.hidden)return a}i=e}}function w0e(e){if(0===e.range.start.character)return e;let t=e.range.start.line,r=e,i;for(;e.container;){var n=e.container,a=i??n.content.indexOf(e);if(0===a?(e=n,i=void 0):(i=a-1,e=n.content[i]),e.range.start.line!==t)break;r=e}return r}function T0e(e,t){return(e=k0e(e,t))?e.parent.content.slice(e.a+1,e.b):[]}function k0e(e,t){let r=C0e(e),i=C0e(t),n;for(let e=0;e<r.length&&e<i.length;e++){var a=r[e],s=i[e];if(a.parent!==s.parent)break;n={parent:a.parent,a:a.index,b:s.index}}return n}function C0e(e){for(var t=[];e.container;){var r=e.container,i=r.content.indexOf(e);t.push({parent:r,index:i}),e=r}return t.reverse()}dqe(n0e,{DefaultNameRegexp:()=>E0e,RangeComparison:()=>S0e,compareRange:()=>u0e,findCommentNode:()=>g0e,findDeclarationNodeAtOffset:()=>p0e,findLeafNodeAtOffset:()=>m0e,findLeafNodeBeforeOffset:()=>y0e,flattenCst:()=>o0e,getDatatypeNode:()=>a0e,getInteriorNodes:()=>T0e,getNextNode:()=>x0e,getPreviousNode:()=>b0e,getStartlineNode:()=>w0e,inRange:()=>d0e,isChildNode:()=>l0e,isCommentNode:()=>f0e,streamCst:()=>s0e,toDocumentSegment:()=>h0e,tokenToRange:()=>c0e});var S0e,E0e,_0e=x(()=>{var e;Iue(),Uue(),nde(),i0e(),mt(a0e,"getDatatypeNode"),mt(s0e,"streamCst"),mt(o0e,"flattenCst"),mt(l0e,"isChildNode"),mt(c0e,"tokenToRange"),mt(h0e,"toDocumentSegment"),(e=S0e=S0e||{})[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(u0e,"compareRange"),mt(d0e,"inRange"),E0e=/^[\w\p{L}]$/u,mt(p0e,"findDeclarationNodeAtOffset"),mt(g0e,"findCommentNode"),mt(f0e,"isCommentNode"),mt(m0e,"findLeafNodeAtOffset"),mt(y0e,"findLeafNodeBeforeOffset"),mt(v0e,"binarySearch"),mt(b0e,"getPreviousNode"),mt(x0e,"getNextNode"),mt(w0e,"getStartlineNode"),mt(T0e,"getInteriorNodes"),mt(k0e,"getCommonParent"),mt(C0e,"getParentChain")});function A0e(e,t="Error: Got unexpected value."){throw new Error(t)}function R0e(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}var L0e,N0e=x(()=>{L0e=class extends Error{static{mt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(A0e,"assertUnreachable"),mt(R0e,"assertCondition")});function D0e(e){return e.charCodeAt(0)}function I0e(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function M0e(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function O0e(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function P0e(){throw Error("Internal Error - Should never get here!")}function $0e(e){return"Character"===e.type}var B0e,F0e,z0e,q0e,U0e,G0e,j0e,W0e,Y0e=x(()=>{mt(D0e,"cc"),mt(I0e,"insertToSet"),mt(M0e,"addFlag"),mt(O0e,"ASSERT_EXISTS"),mt(P0e,"ASSERT_NEVER_REACH_HERE"),mt($0e,"isCharacter")}),V0e=x(()=>{Y0e(),B0e=[];for(let e=D0e("0");e<=D0e("9");e++)B0e.push(e);F0e=[D0e("_")].concat(B0e);for(let e=D0e("a");e<=D0e("z");e++)F0e.push(e);for(let e=D0e("A");e<=D0e("Z");e++)F0e.push(e);z0e=[D0e(" "),D0e("\f"),D0e(`
|
||
`),D0e("\r"),D0e("\t"),D0e("\v"),D0e("\t"),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e(" "),D0e("\u2028"),D0e("\u2029"),D0e(" "),D0e(" "),D0e(" "),D0e("\ufeff")]}),H0e=x(()=>{Y0e(),V0e(),q0e=/[0-9a-fA-F]/,U0e=/[0-9]/,G0e=/[1-9]/,j0e=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":M0e(r,"global");break;case"i":M0e(r,"ignoreCase");break;case"m":M0e(r,"multiLine");break;case"u":M0e(r,"unicode");break;case"y":M0e(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"}}O0e(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return P0e()}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;O0e(t)}if((!0!==e||void 0!==t)&&O0e(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 O0e(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):P0e()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[D0e(`
|
||
`),D0e("\r"),D0e("\u2028"),D0e("\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=B0e;break;case"D":e=B0e,t=!0;break;case"s":e=z0e;break;case"S":e=z0e,t=!0;break;case"w":e=F0e;break;case"W":e=F0e,t=!0}return O0e(e)?{type:"Set",value:e,complement:t}:P0e()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=D0e("\f");break;case"n":e=D0e(`
|
||
`);break;case"r":e=D0e("\r");break;case"t":e=D0e("\t");break;case"v":e=D0e("\v")}return O0e(e)?{type:"Character",value:e}:P0e()}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:D0e("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:D0e(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
||
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:D0e(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,$0e(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,$0e(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.value})}else I0e(r.value,e),e.push(D0e("-")),I0e(i.value,e)}else I0e(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
||
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:D0e("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;var t=this.disjunction(),t=(this.consumeChar(")"),{type:"Group",capturing:e,value:t});return e&&(t.idx=this.groupIdx),t}positiveInteger(){let e=this.popChar();if(!1===G0e.test(e))throw Error("Expecting a positive integer");for(;U0e.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===U0e.test(e))throw Error("Expecting an integer");for(;U0e.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){var e=this.popChar();switch(e){case`
|
||
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:D0e(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return U0e.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
||
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
||
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let e=0;e<t;e++){var i=this.popChar();if(!1===q0e.test(i))throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){var e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}}),X0e=x(()=>{W0e=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){}}}),K0e=x(()=>{H0e(),X0e()}),Z0e={};function Q0e(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=age.pattern(e),i=[];for(t of r.value.value)oge.reset(e),oge.visit(t),i.push({start:oge.startRegexp,end:oge.endRegex});return i}catch{return[]}}function J0e(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),oge.reset(e),oge.visit(age.pattern(e)),oge.multiline}catch{return!1}}function ege(e){let t="string"==typeof e?new RegExp(e):e;return lge.some(e=>t.test(e))}function tge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rge(e,t){return e=ige(e),!!(t=t.match(e))&&0<t[0].length}function ige(e){let n=e="string"==typeof e?new RegExp(e):e,a=e.source,s=0;function o(){let t="",e;function r(e){t+=a.substr(s,e),s+=e}function i(e){t+="(?:"+a.substr(s,e)+"|$)",s+=e}for(mt(r,"appendRaw"),mt(i,"appendOptional");s<a.length;)switch(a[s]){case"\\":switch(a[s+1]){case"c":i(3);break;case"x":i(4);break;case"u":n.unicode?"{"===a[s+2]?i(a.indexOf("}",s)-s+1):i(6):i(2);break;case"p":case"P":n.unicode?i(a.indexOf("}",s)-s+1):i(2);break;case"k":i(a.indexOf(">",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)}dqe(Z0e,{NEWLINE_REGEXP:()=>nge,escapeRegExp:()=>tge,getTerminalParts:()=>Q0e,isMultilineComment:()=>J0e,isWhitespace:()=>ege,partialMatches:()=>rge,partialRegExp:()=>ige,whitespaceCharacters:()=>lge});var nge,age,sge,oge,lge,cge=x(()=>{K0e(),nge=/\r?\n/gm,age=new j0e,sge=class extends W0e{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=tge(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)}},oge=new sge,mt(Q0e,"getTerminalParts"),mt(J0e,"isMultilineComment"),lge=`
|
||
\r
`.split(""),mt(ege,"isWhitespace"),mt(tge,"escapeRegExp"),mt(rge,"partialMatches"),mt(ige,"partialRegExp")}),hge={};function uge(e){return e.rules.find(e=>$de(e)&&e.entry)}function dge(e){return e.rules.filter(e=>Vde(e)&&e.hidden)}function pge(e,t){var r,i=new Set,n=uge(e);if(!n)return new Set(e.rules);for(r of[n].concat(dge(e)))gge(r,i,t);var a,s=new Set;for(a of e.rules)(i.has(a.name)||Vde(a)&&a.hidden)&&s.add(a);return s}function gge(e,t,r){t.add(e.name),Zue(e).forEach(e=>{(qde(e)||r&&Hde(e))&&(e=e.rule.ref)&&!t.has(e.name)&&gge(e,t,r)})}function fge(e){let t=new Set;return Zue(e).forEach(e=>{bde(e)&&($de(e.type.ref)&&t.add(e.type.ref),Sde(e.type.ref))&&$de(e.type.ref.$container)&&t.add(e.type.ref.$container)}),t}function mge(e){return e.terminal||(e.type.ref?Sge(e.type.ref)?.terminal:void 0)}function yge(e){return e.hidden&&!ege(zge(e))}function vge(e,t){return e&&t?xge(e,t,e.astNode,!0):[]}function bge(e,t,r){return e&&t&&0!==(t=xge(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function xge(e,t,r,i){return!i&&(i=Wue(e.grammarSource,gde))&&i.feature===t?[e]:Rue(e)&&e.astNode===r?e.content.flatMap(e=>xge(e,t,r,!1)):[]}function wge(e,t){return e?kge(e,t,e?.astNode):[]}function Tge(e,t,r){return e&&0!==(t=kge(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function kge(e,t,r){if(e.astNode!==r)return[];if(Lde(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var i,n,a=s0e(e).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?Lde(i.grammarSource)&&i.grammarSource.value===t&&s.push(i):a.prune()),!n.done;);return s}function Cge(e){for(var t=e.astNode;t===e.container?.astNode;){var r=Wue(e.grammarSource,gde);if(r)return r;e=e.container}}function Sge(e){let t=e;return Sde(t)&&(hde(t.$container)?t=t.$container.$container:ode(t.$container)?t=t.$container:A0e(t.$container)),Ege(e,t,new Map)}function Ege(i,e,n){function t(e,t){let r;return Wue(e,gde)||(r=Ege(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 Zue(e)){if(gde(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(qde(r)&&$de(r.rule.ref))return t(r,r.rule.ref);if(Ude(r)&&r.typeRef?.ref)return t(r,r.typeRef.ref)}}function _ge(t){var e=t.$container;if(Cde(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var i=r[e];if(hde(i))return i;if(i=Zue(r[e]).find(hde))return i}}if(sde(e))return _ge(e)}function Age(e,t){return"?"===e||"*"===e||Cde(t)&&!!t.guardCondition}function Rge(e){return"*"===e||"+"===e}function Lge(e){return"+="===e}function Nge(e){return Dge(e,new Set)}function Dge(e,t){if(t.has(e))return!0;t.add(e);for(var r of Zue(e))if(qde(r)){if(!r.rule.ref||$de(r.rule.ref)&&!Dge(r.rule.ref,t)||Ede(r.rule.ref))return!1}else{if(gde(r))return!1;if(hde(r))return!1}return!!e.definition}function Ige(e){return Mge(e.type,new Set)}function Mge(e,t){return!!t.has(e)||(t.add(e),!pde(e)&&!Bde(e)&&(Qde(e)?e.types.every(e=>Mge(e,t)):!!Ude(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!Xde(e=e.typeRef.ref)&&Mge(e.type,t))))}function Oge(e){if(!Vde(e))return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)?e.name:void 0)}function Pge(e){if(ode(e))return $de(e)&&Nge(e)?e.name:Oge(e)??e.name;if(Rde(e)||Xde(e)||zde(e))return e.name;if(hde(e)){var t=$ge(e);if(t)return t}else if(Sde(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function $ge(e){return e.inferredType?e.inferredType.name:e.type?.ref?Pge(e.type.ref):void 0}function Bge(e){return Vde(e)?e.type?.name??"string":$de(e)&&Nge(e)?e.name:Oge(e)??e.name}function Fge(e){return Vde(e)?e.type?.name??"string":Oge(e)??e.name}function zge(e){var e=qge(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 qge(e,t){if(jde(e))return Uge(e);if(Yde(e))return Gge(e);if(mde(e))return Yge(e);if(Hde(e)){var r=e.rule.ref;if(r)return Hge(qge(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error("Missing rule reference.")}if(Dde(e))return Wge(e);if(epe(e))return jge(e);var i;if(Fde(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")),Hge(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});if(rpe(e))return Hge(Xge,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, `+e?.$cstNode?.text)}function Uge(e){return Hge(e.elements.map(e=>qge(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Gge(e){return Hge(e.elements.map(e=>qge(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function jge(e){return Hge(Xge+"*?"+qge(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Wge(e){return Hge(`(?!${qge(e.terminal)})${Xge}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Yge(e){return e.right?Hge(`[${Vge(e.left)}-${Vge(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Hge(Vge(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Vge(e){return tge(e.value)}function Hge(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?""+e+t.cardinality:e}dqe(hge,{findAssignment:()=>Cge,findNameAssignment:()=>Sge,findNodeForKeyword:()=>Tge,findNodeForProperty:()=>bge,findNodesForKeyword:()=>wge,findNodesForKeywordInternal:()=>kge,findNodesForProperty:()=>vge,getActionAtElement:()=>_ge,getActionType:()=>$ge,getAllReachableRules:()=>pge,getAllRulesUsedForCrossReferences:()=>fge,getCrossReferenceTerminal:()=>mge,getEntryRule:()=>uge,getExplicitRuleType:()=>Oge,getHiddenRules:()=>dge,getRuleType:()=>Fge,getRuleTypeName:()=>Bge,getTypeName:()=>Pge,isArrayCardinality:()=>Rge,isArrayOperator:()=>Lge,isCommentTerminal:()=>yge,isDataType:()=>Ige,isDataTypeRule:()=>Nge,isOptionalCardinality:()=>Age,terminalRegex:()=>zge});var Xge,Kge=x(()=>{N0e(),i0e(),Iue(),nde(),_0e(),cge(),mt(uge,"getEntryRule"),mt(dge,"getHiddenRules"),mt(pge,"getAllReachableRules"),mt(gge,"ruleDfs"),mt(fge,"getAllRulesUsedForCrossReferences"),mt(mge,"getCrossReferenceTerminal"),mt(yge,"isCommentTerminal"),mt(vge,"findNodesForProperty"),mt(bge,"findNodeForProperty"),mt(xge,"findNodesForPropertyInternal"),mt(wge,"findNodesForKeyword"),mt(Tge,"findNodeForKeyword"),mt(kge,"findNodesForKeywordInternal"),mt(Cge,"findAssignment"),mt(Sge,"findNameAssignment"),mt(Ege,"findNameAssignmentInternal"),mt(_ge,"getActionAtElement"),mt(Age,"isOptionalCardinality"),mt(Rge,"isArrayCardinality"),mt(Lge,"isArrayOperator"),mt(Nge,"isDataTypeRule"),mt(Dge,"isDataTypeRuleInternal"),mt(Ige,"isDataType"),mt(Mge,"isDataTypeInternal"),mt(Oge,"getExplicitRuleType"),mt(Pge,"getTypeName"),mt($ge,"getActionType"),mt(Bge,"getRuleTypeName"),mt(Fge,"getRuleType"),mt(zge,"terminalRegex"),Xge=/[\s\S]/.source,mt(qge,"abstractElementToRegex"),mt(Uge,"terminalAlternativesToRegex"),mt(Gge,"terminalGroupToRegex"),mt(jge,"untilTokenToRegex"),mt(Wge,"negateTokenToRegex"),mt(Yge,"characterRangeToRegex"),mt(Vge,"keywordToRegex"),mt(Hge,"withCardinality")});function Zge(e){var t,r=[];for(t of e.Grammar.rules)Vde(t)&&yge(t)&&J0e(zge(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:E0e}}var Qge=x(()=>{_0e(),Kge(),cge(),i0e(),mt(Zge,"createGrammarConfig")}),Jge=x(()=>{});function efe(e){console&&console.error&&console.error("Error: "+e)}function tfe(e){console&&console.warn&&console.warn("Warning: "+e)}var rfe=x(()=>{mt(efe,"PRINT_ERROR"),mt(tfe,"PRINT_WARNING")});function ife(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}var nfe=x(()=>{mt(ife,"timer")});function afe(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 sfe=x(()=>{mt(afe,"toFastProperties")}),ofe=x(()=>{rfe(),nfe(),sfe()});function lfe(e){return cfe(e)?e.LABEL:e.name}function cfe(e){return oj(e.LABEL)&&""!==e.LABEL}function hfe(e){return b(e,ufe)}function ufe(e){function t(e){return b(e,ufe)}var r,i;if(mt(t,"convertDefinition"),e instanceof pfe)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},oj(e.label)&&(r.label=e.label),r;if(e instanceof ffe)return{type:"Alternative",definition:t(e.definition)};if(e instanceof mfe)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof yfe)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof vfe)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:ufe(new Tfe({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof xfe)return{type:"RepetitionWithSeparator",idx:e.idx,separator:ufe(new Tfe({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof bfe)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof wfe)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Tfe)return r={type:"Terminal",name:e.terminalType.name,label:lfe(e.terminalType),idx:e.idx},oj(e.label)&&(r.terminalLabel=e.label),i=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=Nj(i)?i.source:i),r;if(e instanceof gfe)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var dfe,pfe,gfe,ffe,mfe,yfe,vfe,bfe,xfe,wfe,Tfe,kfe,Cfe=x(()=>{ZY(),mt(lfe,"tokenLabel"),mt(cfe,"hasTokenLabel"),dfe=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)})}},pfe=class extends dfe{static{mt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,E$(this,uW(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},gfe=class extends dfe{static{mt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",E$(this,uW(e,e=>void 0!==e))}},ffe=class extends dfe{static{mt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,E$(this,uW(e,e=>void 0!==e))}},mfe=class extends dfe{static{mt(this,"Option")}constructor(e){super(e.definition),this.idx=1,E$(this,uW(e,e=>void 0!==e))}},yfe=class extends dfe{static{mt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,E$(this,uW(e,e=>void 0!==e))}},vfe=class extends dfe{static{mt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,E$(this,uW(e,e=>void 0!==e))}},bfe=class extends dfe{static{mt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,E$(this,uW(e,e=>void 0!==e))}},xfe=class extends dfe{static{mt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,E$(this,uW(e,e=>void 0!==e))}},wfe=class extends dfe{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,E$(this,uW(e,e=>void 0!==e))}},Tfe=class{static{mt(this,"Terminal")}constructor(e){this.idx=1,E$(this,uW(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(hfe,"serializeGrammar"),mt(ufe,"serializeProduction")}),Sfe=x(()=>{Cfe(),kfe=class{static{mt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case pfe:return this.visitNonTerminal(t);case ffe:return this.visitAlternative(t);case mfe:return this.visitOption(t);case yfe:return this.visitRepetitionMandatory(t);case vfe:return this.visitRepetitionMandatoryWithSeparator(t);case xfe:return this.visitRepetitionWithSeparator(t);case bfe:return this.visitRepetition(t);case wfe:return this.visitAlternation(t);case Tfe:return this.visitTerminal(t);case gfe: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 Efe(e){return e instanceof ffe||e instanceof mfe||e instanceof bfe||e instanceof yfe||e instanceof vfe||e instanceof xfe||e instanceof Tfe||e instanceof gfe}function _fe(e,t=[]){return e instanceof mfe||e instanceof bfe||e instanceof xfe||(e instanceof wfe?wY(e.definition,e=>_fe(e,t)):!(e instanceof pfe&&yj(t,e))&&e instanceof dfe&&(e instanceof pfe&&t.push(e),cG(e.definition,e=>_fe(e,t))))}function Afe(e){return e instanceof wfe}function Rfe(e){if(e instanceof pfe)return"SUBRULE";if(e instanceof mfe)return"OPTION";if(e instanceof wfe)return"OR";if(e instanceof yfe)return"AT_LEAST_ONE";if(e instanceof vfe)return"AT_LEAST_ONE_SEP";if(e instanceof xfe)return"MANY_SEP";if(e instanceof bfe)return"MANY";if(e instanceof Tfe)return"CONSUME";throw Error("non exhaustive match")}var Lfe=x(()=>{ZY(),Cfe(),mt(Efe,"isSequenceProd"),mt(_fe,"isOptionalProd"),mt(Afe,"isBranchingProd"),mt(Rfe,"getProductionDslName")}),Nfe=x(()=>{Cfe(),Sfe(),Lfe()});function Dfe(e,t,r){return[new mfe({definition:[new Tfe({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var Ife,Mfe=x(()=>{ZY(),Nfe(),Ife=class{static{mt(this,"RestWalker")}walk(r,i=[]){v(r.definition,(e,t)=>{if(t=WU(r.definition,t+1),e instanceof pfe)this.walkProdRef(e,t,i);else if(e instanceof Tfe)this.walkTerminal(e,t,i);else if(e instanceof ffe)this.walkFlat(e,t,i);else if(e instanceof mfe)this.walkOption(e,t,i);else if(e instanceof yfe)this.walkAtLeastOne(e,t,i);else if(e instanceof vfe)this.walkAtLeastOneSep(e,t,i);else if(e instanceof xfe)this.walkManySep(e,t,i);else if(e instanceof bfe)this.walkMany(e,t,i);else{if(!(e instanceof wfe))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 mfe({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=Dfe(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new mfe({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=Dfe(e,t,r),this.walk(e,t)}walkOr(e,t,r){let i=t.concat(r);v(e.definition,e=>{e=new ffe({definition:[e]}),this.walk(e,i)})}},mt(Dfe,"restForRepetitionWithSeparator")});function Ofe(e){if(e instanceof pfe)return Ofe(e.referencedRule);if(e instanceof Tfe)return Bfe(e);if(Efe(e))return Pfe(e);if(Afe(e))return $fe(e);throw Error("non exhaustive match")}function Pfe(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=_fe(a),t=t.concat(Ofe(a)),i+=1,n=r.length>i;return PY(t)}function $fe(e){return e=b(e.definition,e=>Ofe(e)),PY(gB(e))}function Bfe(e){return[e.terminalType]}var Ffe,zfe=x(()=>{ZY(),Nfe(),mt(Ofe,"first"),mt(Pfe,"firstForSequence"),mt($fe,"firstForBranching"),mt(Bfe,"firstForTerminal")}),qfe=x(()=>{Ffe="_~IN~_"});function Ufe(e){let t={};return v(e,e=>{e=new jfe(e).startWalking(),E$(t,e)}),t}function Gfe(e,t){return e.name+t+Ffe}var jfe,Wfe=x(()=>{Mfe(),zfe(),ZY(),qfe(),Nfe(),jfe=class extends Ife{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=Gfe(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=Ofe(new ffe({definition:t})),this.follows[e]=r}},mt(Ufe,"computeAllProdsFollows"),mt(Gfe,"buildBetweenProdsFollowPrefix")});function Yfe(e){var t,e=e.toString();return Hfe.hasOwnProperty(e)?Hfe[e]:(t=Xfe.pattern(e),Hfe[e]=t)}function Vfe(){Hfe={}}var Hfe,Xfe,Kfe=x(()=>{K0e(),Hfe={},Xfe=new j0e,mt(Yfe,"getRegExpAst"),mt(Vfe,"clearRegExpParserCache")});function Zfe(e,t=!1){try{var r=Yfe(e);return Qfe(r.value,{},r.flags.ignoreCase)}catch(r){r.message===n1e?t&&tfe(`${a1e} 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.`:"",efe(`${a1e}
|
||
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 Qfe(t,n,a){switch(t.type){case"Disjunction":for(let e=0;e<t.value.length;e++)Qfe(t.value[e],n,a);break;case"Alternative":var r=t.value;for(let e=0;e<r.length;e++){var i=r[e];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var s=i;switch(s.type){case"Character":Jfe(s.value,n,a);break;case"Set":if(!0===s.complement)throw Error(n1e);v(s.value,t=>{if("number"==typeof t)Jfe(t,n,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)Jfe(e,n,a);else{for(let e=r.from;e<=r.to&&e<j1e;e++)Jfe(e,n,a);if(r.to>=j1e){var t=r.from>=j1e?r.from:j1e,e=r.to,t=O1e(t),i=O1e(e);for(let e=t;e<=i;e++)n[e]=e}}}});break;case"Group":Qfe(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===r1e(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return pj(n)}function Jfe(e,t,r){var i=O1e(e);t[i]=i,!0===r&&e1e(e,t)}function e1e(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=O1e(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=O1e(r.charCodeAt(0))]=e)}function t1e(e,r){return CG(e.value,e=>{if("number"==typeof e)return yj(r,e);{let t=e;return void 0!==CG(r,e=>t.from<=e&&e<=t.to)}})}function r1e(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(nC(e.value)?cG(e.value,r1e):r1e(e.value))}function i1e(t,e){var r,i;return e instanceof RegExp?(r=Yfe(e),(i=new s1e(t)).visit(r),i.found):void 0!==CG(e,e=>yj(t,e.charCodeAt(0)))}var n1e,a1e,s1e,o1e=x(()=>{K0e(),ZY(),ofe(),Kfe(),Y1e(),n1e="Complement Sets are not supported for first char optimization",a1e=`Unable to use "first char" lexer optimizations:
|
||
`,mt(Zfe,"getOptimizedStartCodesIndices"),mt(Qfe,"firstCharOptimizedIndices"),mt(Jfe,"addOptimizedIdxToResult"),mt(e1e,"handleIgnoreCase"),mt(t1e,"findCode"),mt(r1e,"isWholeOptional"),s1e=class extends W0e{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){yj(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===t1e(e,this.targetCharCodes)&&(this.found=!0):void 0!==t1e(e,this.targetCharCodes)&&(this.found=!0)}},mt(i1e,"canMatchCharCode")});function l1e(e,n){var t=(n=AU(n,{useSticky:z1e,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
||
`],tracer:mt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{P1e()});let r,i=(t("Reject Lexer.NA",()=>{r=dY(e,e=>e[$1e]===ume.NA)}),!1),a;t("Transform Patterns",()=>{i=!1,a=b(r,e=>{var t,e=e[$1e];if(Nj(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||yj(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(n.useSticky?S1e:C1e)(e):t[1]:t;if(IT(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?S1e:C1e)(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)!==ume.SKIPPED){if(oj(e))return e;if(Oj(e))return!1;throw Error("non exhaustive match")}}),l=b(r,e=>{if(e=e.LONGER_ALT)return nC(e)?b(e,e=>wj(r,e)):[wj(r,e)]}),c=b(r,e=>e.PUSH_MODE),h=b(r,e=>nj(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=I1e(n.lineTerminatorCharacters);u=b(r,e=>!1),"onlyOffset"!==n.positionTracking&&(u=b(r,e=>nj(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===N1e(e,t)&&i1e(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=b(r,R1e),p=b(a,L1e),g=cY(r,(e,t)=>(t=t.GROUP,oj(t)&&t!==ume.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=cY(r,(r,e,i)=>{if("string"==typeof e.PATTERN){var t=O1e(e.PATTERN.charCodeAt(0));M1e(r,t,f[i])}else if(nC(e.START_CHARS_HINT)){let t;v(e.START_CHARS_HINT,e=>{e=O1e("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,M1e(r,e,f[i]))})}else Nj(e.PATTERN)?e.PATTERN.unicode?(m=!1,n.ensureOptimizations&&efe(`${a1e} 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=Zfe(e.PATTERN,n.ensureOptimizations),Ej(t)&&(m=!1),v(t,e=>{M1e(r,e,f[i])})):(n.ensureOptimizations&&efe(`${a1e} TokenType: <${e.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
||
This will disable the lexer's first char optimizations.
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:m}}function c1e(e,t){let r=[],i=u1e(e);r=r.concat(i.errors);var n=(e=d1e(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(h1e(n))).concat(v1e(n))).concat(b1e(n,t))).concat(x1e(n))}function h1e(e){let t=[],r=fG(e,e=>Nj(e[$1e]));return t=(t=(t=(t=(t=t.concat(p1e(r))).concat(f1e(r))).concat(m1e(r))).concat(y1e(r))).concat(g1e(r))}function u1e(e){var t=fG(e,e=>!nj(e,$1e));return{errors:b(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:cme.MISSING_PATTERN,tokenTypes:[e]})),valid:BU(e,t)}}function d1e(e){var t=fG(e,e=>(e=e[$1e],!(Nj(e)||IT(e)||nj(e,"exec")||oj(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:cme.INVALID_PATTERN,tokenTypes:[e]})),valid:BU(e,t)}}function p1e(e){class i extends W0e{static{mt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=fG(e,e=>{e=e.PATTERN;try{var t=Yfe(e),r=new i;return r.visit(t),r.found}catch{return q1e.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:cme.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function g1e(e){return e=fG(e,e=>e.PATTERN.test("")),b(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:cme.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function f1e(e){class i extends W0e{static{mt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=fG(e,e=>{e=e.PATTERN;try{var t=Yfe(e),r=new i;return r.visit(t),r.found}catch{return U1e.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:cme.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function m1e(e){return e=fG(e,e=>(e=e[$1e])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:cme.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function y1e(e){let i=[],t=b(e,r=>cY(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||yj(i,t)||t.PATTERN===ume.NA||(i.push(t),e.push(t)),e),[]));t=Az(t);var r=fG(t,e=>1<e.length);return b(r,e=>{var t=b(e,e=>e.name);return{message:`The same RegExp pattern ->${AG(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:cme.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function v1e(e){return e=fG(e,e=>!!nj(e,"GROUP")&&(e=e.GROUP)!==ume.SKIPPED&&e!==ume.NA&&!oj(e)),b(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:cme.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function b1e(e,t){return e=fG(e,e=>void 0!==e.PUSH_MODE&&!yj(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:cme.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function x1e(e){let a=[],t=cY(e,(e,t,r)=>{var i=t.PATTERN;return i!==ume.NA&&(oj(i)?e.push({str:i,idx:r,tokenType:t}):Nj(i)&&T1e(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<t&&w1e(e,i.PATTERN)&&(t=`Token: ->${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:cme.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function w1e(e,t){var r;if(Nj(t))return!k1e(t)&&null!==(r=t.exec(e))&&0===r.index;if(IT(t))return t(e,0,[],{});if(nj(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function T1e(t){return void 0===CG([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function k1e(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function C1e(e){var t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function S1e(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function E1e(e,t,r){let n=[];return nj(e,B1e)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+B1e+`> property in its definition
|
||
`,type:cme.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),nj(e,F1e)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+F1e+`> property in its definition
|
||
`,type:cme.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),nj(e,F1e)&&nj(e,B1e)&&!nj(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${B1e}: <${e.defaultMode}>which does not exist
|
||
`,type:cme.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),nj(e,F1e)&&v(e.modes,(r,i)=>{v(r,(t,e)=>{Oj(t)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${e}>
|
||
`,type:cme.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):nj(t,"LONGER_ALT")&&(e=nC(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],v(e,e=>{Oj(e)||yj(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:cme.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function _1e(e,t,r){let i=[],n=!1,a=Az(gB(pj(e.modes))),s=dY(a,e=>e[$1e]===ume.NA),o=I1e(r);return t&&v(s,e=>{var t=N1e(e,o);!1!==t?(t={message:D1e(e,t),type:t.issue,tokenType:e},i.push(t)):nj(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(n=!0):i1e(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:cme.NO_LINE_BREAKS_FLAGS}),i}function A1e(r){let i={},e=k$(r);return v(e,e=>{var t=r[e];if(!nC(t))throw Error("non exhaustive match");i[e]=[]}),i}function R1e(e){if(e=e.PATTERN,Nj(e))return!1;if(IT(e))return!0;if(nj(e,"exec"))return!0;if(oj(e))return!1;throw Error("non exhaustive match")}function L1e(e){return!(!oj(e)||1!==e.length)&&e.charCodeAt(0)}function N1e(e,t){if(nj(e,"LINE_BREAKS"))return!1;if(Nj(e.PATTERN)){try{i1e(t,e.PATTERN)}catch(e){return{issue:cme.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(oj(e.PATTERN))return!1;if(R1e(e))return{issue:cme.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function D1e(e,t){if(t.issue===cme.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===cme.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> 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 I1e(e){return b(e,e=>oj(e)?e.charCodeAt(0):e)}function M1e(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function O1e(e){return e<j1e?e:W1e[e]}function P1e(){if(Ej(W1e)){W1e=new Array(65536);for(let e=0;e<65536;e++)W1e[e]=255<e?255+~~(e/255):e}}var $1e,B1e,F1e,z1e,q1e,U1e,G1e,j1e,W1e,Y1e=x(()=>{K0e(),gme(),ZY(),ofe(),o1e(),Kfe(),$1e="PATTERN",B1e="defaultMode",F1e="modes",z1e="boolean"==typeof new RegExp("(?:)").sticky,mt(l1e,"analyzeTokenTypes"),mt(c1e,"validatePatterns"),mt(h1e,"validateRegExpPattern"),mt(u1e,"findMissingPatterns"),mt(d1e,"findInvalidPatterns"),q1e=/[^\\][$]/,mt(p1e,"findEndOfInputAnchor"),mt(g1e,"findEmptyMatchRegExps"),U1e=/[^\\[][\^]|^\^/,mt(f1e,"findStartOfInputAnchor"),mt(m1e,"findUnsupportedFlags"),mt(y1e,"findDuplicatePatterns"),mt(v1e,"findInvalidGroupType"),mt(b1e,"findModesThatDoNotExist"),mt(x1e,"findUnreachablePatterns"),mt(w1e,"tryToMatchStrToPattern"),mt(T1e,"noMetaChar"),mt(k1e,"usesLookAheadOrBehind"),mt(C1e,"addStartOfInput"),mt(S1e,"addStickyFlag"),mt(E1e,"performRuntimeChecks"),mt(_1e,"performWarningRuntimeChecks"),mt(A1e,"cloneEmptyGroups"),mt(R1e,"isCustomPattern"),mt(L1e,"isShortPattern"),G1e={test:mt(function(t){var r=t.length;for(let e=this.lastIndex;e<r;e++){var i=t.charCodeAt(e);if(10===i)return this.lastIndex=e+1,!0;if(13===i)return 10===t.charCodeAt(e+1)?this.lastIndex=e+2:this.lastIndex=e+1,!0}return!1},"test"),lastIndex:0},mt(N1e,"checkLineBreaksIssues"),mt(D1e,"buildLineBreakIssueMessage"),mt(I1e,"getCharCodes"),mt(M1e,"addToMapOfArrays"),j1e=256,W1e=[],mt(O1e,"charCodeToOptimizedIndex"),mt(P1e,"initCharCodeToOptimizedIndexMap")});function V1e(e,t){return(e=e.tokenTypeIdx)===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[e]}function H1e(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function X1e(e){Z1e(e=K1e(e)),J1e(e),Q1e(e),v(e,e=>{e.isParent=0<e.categoryMatches.length})}function K1e(e){let t=Tz(e),r=e,i=!0;for(;i;){r=Az(gB(b(r,e=>e.CATEGORIES)));var n=BU(r,t);t=t.concat(n),Ej(n)?i=!1:r=n}return t}function Z1e(e){v(e,e=>{tme(e)||((ome[sme]=e).tokenTypeIdx=sme++),rme(e)&&!nC(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),rme(e)||(e.CATEGORIES=[]),ime(e)||(e.categoryMatches=[]),nme(e)||(e.categoryMatchesMap={})})}function Q1e(e){v(e,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(ome[t].tokenTypeIdx)})})}function J1e(e){v(e,e=>{eme([],e)})}function eme(r,i){v(r,e=>{i.categoryMatchesMap[e.tokenTypeIdx]=!0}),v(i.CATEGORIES,e=>{var t=r.concat(i);yj(t,e)||eme(t,e)})}function tme(e){return nj(e,"tokenTypeIdx")}function rme(e){return nj(e,"CATEGORIES")}function ime(e){return nj(e,"categoryMatches")}function nme(e){return nj(e,"categoryMatchesMap")}function ame(e){return nj(e,"tokenTypeIdx")}var sme,ome,lme,cme,hme,ume,dme=x(()=>{ZY(),mt(V1e,"tokenStructuredMatcher"),mt(H1e,"tokenStructuredMatcherNoCategories"),sme=1,ome={},mt(X1e,"augmentTokenTypes"),mt(K1e,"expandCategories"),mt(Z1e,"assignTokenDefaultProps"),mt(Q1e,"assignCategoriesTokensProp"),mt(J1e,"assignCategoriesMapProp"),mt(eme,"singleAssignCategoriesToksMap"),mt(tme,"hasShortKeyProperty"),mt(rme,"hasCategoriesProperty"),mt(ime,"hasExtendingTokensTypesProperty"),mt(nme,"hasExtendingTokensTypesMapProperty"),mt(ame,"isTokenType")}),pme=x(()=>{lme={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.`}}}),gme=x(()=>{var e;Y1e(),ZY(),ofe(),dme(),pme(),Kfe(),(e=cme=cme||{})[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",hme={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
||
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:lme,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(hme),(ume=class{static{mt(this,"Lexer")}constructor(n,a=hme){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<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),ife(t)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> 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=E$({},hme,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===hme.lineTerminatorsPattern)this.config.lineTerminatorsPattern=G1e;else if(this.config.lineTerminatorCharacters===hme.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=nC(n)?{modes:{defaultMode:Tz(n)},defaultMode:B1e}:(e=!1,Tz(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(E1e(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(_1e(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(e,t)=>{r.modes[t]=dY(e,e=>Oj(e))}),k$(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(c1e(t,i))}),Ej(this.lexerDefinitionErrors)){X1e(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=l1e(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=E$({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!Ej(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=>{tfe(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(z1e?(this.chopInput=$S,this.match=this.matchWithTest):(this.updateLastIndex=HP,this.match=this.matchWithExec),e&&(this.handleModes=HP),!1===this.trackStartLines&&(this.computeNewColumn=$S),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=HP),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var e=cY(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!Ej(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",()=>{Vfe()}),this.TRACE_INIT("toFastProperties",()=>{afe(this)})})}tokenize(e,t=this.defaultMode){if(Ej(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,w=A1e(this.emptyGroups),q=this.trackStartLines,T=this.config.lineTerminatorsPattern,k=0,C=[],S=[],E=[],U=[];Object.freeze(U);let _;function A(){return C}function R(e){return e=O1e(e),void 0===(e=S[e])?U:e}mt(A,"getPossiblePatternsSlow"),mt(R,"getPossiblePatternsOptimized");var G=mt(e=>{var t;1===E.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})):(E.pop(),e=UU(E),C=this.patternIdxToConfig[e],S=this.charCodeToPatternIdxToConfig[e],k=C.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=S&&t?R:A)},"pop_mode");function L(e){E.push(e),S=this.charCodeToPatternIdxToConfig[e],C=this.patternIdxToConfig[e],k=C.length,k=C.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=S&&e?R:A}mt(L,"push_mode"),L.call(this,P);let N,j=this.config.recoveryEnabled;for(;f<F;){s=null;var W=g.charCodeAt(f),Y=_(W),V=Y.length;for(e=0;e<V;e++){var D=(N=Y[e]).pattern,H=(o=null,N.short);if(!1!==H?W===H&&(s=D):!0===N.isCustom?null!==(p=D.exec(g,f,y,w))?(s=p[0],void 0!==p.payload&&(o=p.payload)):s=null:(this.updateLastIndex(D,f),s=this.match(D,n,f)),null!==s){if(void 0!==(i=N.longerAlt)){var X=i.length;for(t=0;t<X;t++){var I=C[i[t]],M=I.pattern;if(!(l=null)===I.isCustom?null!==(p=M.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(M,f),r=this.match(M,n,f)),r&&r.length>s.length){s=r,o=l,N=I;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):w[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(T.lastIndex=0;!0===(t=T.test(s))&&(r=T.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<F;)for(n=this.chopInput(n,1),f++,a=0;a<k;a++){var O=C[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(i=!0):i=!0===O.isCustom?null!==K.exec(g,f,y,w):(this.updateLastIndex(K,f),null!==K.exec(n)),!0===i)break}if(d=f-e,x=this.computeNewColumn(x,d),B=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,e,d,t,r,UU(E)),v.push({offset:e,line:t,column:r,length:d,message:B}),!1===j)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(e,t,r,i){var n;!0===e.pop?(n=e.push,t(i),void 0!==n&&r.call(this,n)):void 0!==e.push&&r.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,r,i,n,a,s){void 0!==t&&(r=(t=r===s-1)?-1:0,1===i&&1==t||(e.endLine=n+r,e.endColumn=a-1-r))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,i){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:i}}createStartOnlyToken(e,t,r,i,n,a){return{image:e,startOffset:t,startLine:n,startColumn:a,tokenTypeIdx:r,tokenType:i}}createFullToken(e,t,r,i,n,a,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:n,endLine:n,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:i}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}matchWithTest(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null}matchWithExec(e,t){return null!==(e=e.exec(t))?e[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",ume.NA=/NOT_APPLICABLE/});function fme(e){return mme(e)?e.LABEL:e.name}function mme(e){return oj(e.LABEL)&&""!==e.LABEL}function yme(e){return vme(e)}function vme(e){var t=e.pattern,r={};if(r.name=e.name,Oj(t)||(r.PATTERN=t),nj(e,wme))throw`The parent property is no longer supported.
|
||
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return nj(e,Tme)&&(r.CATEGORIES=e[Tme]),X1e([r]),nj(e,kme)&&(r.LABEL=e[kme]),nj(e,Cme)&&(r.GROUP=e[Cme]),nj(e,Eme)&&(r.POP_MODE=e[Eme]),nj(e,Sme)&&(r.PUSH_MODE=e[Sme]),nj(e,_me)&&(r.LONGER_ALT=e[_me]),nj(e,Ame)&&(r.LINE_BREAKS=e[Ame]),nj(e,Rme)&&(r.START_CHARS_HINT=e[Rme]),r}function bme(e,t,r,i,n,a,s,o){return{image:t,startOffset:r,endOffset:i,startLine:n,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function xme(e,t){return V1e(e,t)}var wme,Tme,kme,Cme,Sme,Eme,_me,Ame,Rme,Lme,Nme,Dme,Ime,Mme=x(()=>{ZY(),gme(),dme(),mt(fme,"tokenLabel"),mt(mme,"hasTokenLabel"),wme="parent",Tme="categories",kme="label",Cme="group",Sme="push_mode",Eme="pop_mode",_me="longer_alt",Ame="line_breaks",Rme="start_chars_hint",mt(yme,"createToken"),mt(vme,"createTokenInternal"),X1e([Lme=yme({name:"EOF",pattern:ume.NA})]),mt(bme,"createTokenInstance"),mt(xme,"tokenMatcher")}),Ome=x(()=>{Mme(),ZY(),Nfe(),Nme={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${mme(e)?`--> ${fme(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: '`+AG(t).image+"'";return r?i+r+t:(r=cY(e,(e,t)=>e.concat(t),[]),e=b(r,e=>`[${b(e,e=>fme(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: '`+AG(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=>fme(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze(Nme),Dme={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
|
||
inside top level rule: ->`+e.name+"<-"}},Ime={buildDuplicateFoundError(e,t){function r(e){return e instanceof Tfe?e.terminalType.name:e instanceof pfe?e.nonTerminalName:""}mt(r,"getExtraProductionArgument");let i=e.name,n=AG(t),a=n.idx,s=Rfe(n),o=r(n),l=0<a,c=`->${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=>fme(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
||
in <OR${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#COMMON_PREFIX
|
||
For Further details.`},buildAlternationAmbiguityError(e){var t=b(e.prefixPath,e=>fme(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${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.`},buildEmptyRepetitionError(e){let t=Rfe(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 <OR${e.alternation.idx}> 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:
|
||
<OR${e.alternation.idx}> 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 gfe?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function Pme(e,t){return(e=new $me(e,t)).resolveRefs(),e.errors}var $me,Bme=x(()=>{tve(),ZY(),Nfe(),mt(Pme,"resolveGrammar"),$me=class extends kfe{static{mt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){v(pj(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:Q2e.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}}});function Fme(t,r,i=[]){i=Tz(i);let n=[],a=0;function s(e){return e.concat(WU(t,a+1))}function o(e){return e=Fme(s(e),r,i),n.concat(e)}for(mt(s,"remainingPathWith"),mt(o,"getAlternativesForProd");i.length<r&&a<t.length;){var e=t[a];if(e instanceof ffe)return o(e.definition);if(e instanceof pfe)return o(e.definition);if(e instanceof mfe)n=o(e.definition);else{if(e instanceof yfe)return o(e.definition.concat([new bfe({definition:e.definition})]));if(e instanceof vfe)return o([new ffe({definition:e.definition}),new bfe({definition:[new Tfe({terminalType:e.separator})].concat(e.definition)})]);if(e instanceof xfe){var l=e.definition.concat([new bfe({definition:[new Tfe({terminalType:e.separator})].concat(e.definition)})]);n=o(l)}else if(e instanceof bfe)l=e.definition.concat([new bfe({definition:e.definition})]),n=o(l);else{if(e instanceof wfe)return v(e.definition,e=>{!1===Ej(e.definition)&&(n=o(e.definition))}),n;if(!(e instanceof Tfe))throw Error("non exhaustive match");i.push(e.terminalType)}}a++}return n.push({partialPath:i,suffixDef:WU(t,a)}),n}function zme(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:[]});!Ej(u);)if((v=u.pop())===s)o&&UU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!Ej(d)){var m=d[0];if(m===n)v={idx:p,def:WU(d),ruleStack:HU(g),occurrenceStack:HU(f)},u.push(v);else if(m instanceof Tfe)if(p<l-1)r(t[v=p+1],m.terminalType)&&(v={idx:v,def:WU(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),o=!0}else if(m instanceof pfe){(v=Tz(g)).push(m.nonTerminalName);var y=Tz(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,WU(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof mfe)y={idx:p,def:WU(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(WU(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof yfe)v=new bfe({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],WU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof vfe)v=new Tfe({terminalType:m.separator}),v=new bfe({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],WU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof xfe)v={idx:p,def:WU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new Tfe({terminalType:m.separator}),v=new bfe({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],WU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof bfe)v={idx:p,def:WU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new bfe({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],WU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof wfe)for(let e=m.definition.length-1;0<=e;e--){var b={idx:p,def:m.definition[e].definition.concat(WU(d)),ruleStack:g,occurrenceStack:f};u.push(b),u.push(s)}else if(m instanceof ffe)u.push({idx:p,def:m.definition.concat(WU(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof gfe))throw Error("non exhaustive match");u.push(qme(m,p,g,f))}}}return h}function qme(e,t,r,i){return(r=Tz(r)).push(e.name),(i=Tz(i)).push(1),{idx:t,def:e.definition,ruleStack:r,occurrenceStack:i}}var Ume,Gme,jme,Wme,Yme,Vme,Hme=x(()=>{ZY(),zfe(),Mfe(),Nfe(),Gme=class extends Ife{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=Tz(this.path.ruleStack).reverse(),this.occurrenceStack=Tz(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(){Ej(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Ume=class extends Gme{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 ffe({definition:e}),this.possibleTokTypes=Ofe(t),this.found=!0)}},Gme=class extends Ife{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}},jme=class extends Gme{static{mt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var i;e.idx===this.occurrence?(i=AG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Tfe&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(e,t,r)}},Wme=class extends Gme{static{mt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var i;e.idx===this.occurrence?(i=AG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Tfe&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(e,t,r)}},Yme=class extends Gme{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var i;e.idx===this.occurrence?(i=AG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Tfe&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(e,t,r)}},Vme=class extends Gme{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var i;e.idx===this.occurrence?(i=AG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Tfe&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(Fme,"possiblePathsFrom"),mt(zme,"nextPossibleTokensAfter"),mt(qme,"expandTopLevelRule")});function Xme(e){if(e instanceof mfe||"Option"===e)return hye.OPTION;if(e instanceof bfe||"Repetition"===e)return hye.REPETITION;if(e instanceof yfe||"RepetitionMandatory"===e)return hye.REPETITION_MANDATORY;if(e instanceof vfe||"RepetitionMandatoryWithSeparator"===e)return hye.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof xfe||"RepetitionWithSeparator"===e)return hye.REPETITION_WITH_SEPARATOR;if(e instanceof wfe||"Alternation"===e)return hye.ALTERNATION;throw Error("non exhaustive match")}function Kme(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:i}=e;return(r=Xme(r))===hye.ALTERNATION?aye(e,t,i):sye(e,t,r,i)}function Zme(e,t,r,i,n,a){return a(e=aye(e,t,r),i,cye(e)?H1e:V1e,n)}function Qme(e,t,r,i,n,a){return t=cye(e=sye(e,t,n,r))?H1e:V1e,a(e[0],t,i)}function Jme(c,e,h,t){let u=c.length,r=cG(c,e=>cG(e,e=>1===e.length));if(e)return function(e){var r=b(e,e=>e.GATE);for(let t=0;t<u;t++){var i=c[t],n=i.length,a=r[t];if(void 0===a||!1!==a.call(this))e:for(let e=0;e<n;e++){var s=i[e],o=s.length;for(let e=0;e<o;e++){var l=this.LA(e+1);if(!1===h(l,s[e]))continue e}return t}}};if(!r||t)return function(){for(let t=0;t<u;t++){var r=c[t],i=r.length;e:for(let e=0;e<i;e++){var n=r[e],a=n.length;for(let e=0;e<a;e++){var s=this.LA(e+1);if(!1===h(s,n[e]))continue e}return t}}};{let e=b(c,e=>gB(e)),t=cY(e,(t,e,r)=>(v(e,e=>{nj(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),v(e.categoryMatches,e=>{nj(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function eye(n,a,r){let e=cG(n,e=>1===e.length),s=n.length;if(!e||r)return function(){e:for(let e=0;e<s;e++){var t=n[e],r=t.length;for(let e=0;e<r;e++){var i=this.LA(e+1);if(!1===a(i,t[e]))continue e}return!0}return!1};if(1===(r=gB(n)).length&&Ej(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=cY(r,(t,e,r)=>(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 tye(t){var r=new Array(t);for(let e=0;e<t;e++)r[e]=[];return r}function rye(t){let r=[""];for(let e=0;e<t.length;e++){var i=t[e],n=[];for(let e=0;e<r.length;e++){var a=r[e];n.push(a+"_"+i.tokenTypeIdx);for(let e=0;e<i.categoryMatches.length;e++){var s="_"+i.categoryMatches[e];n.push(a+s)}}r=n}return r}function iye(t,r,i){for(let e=0;e<t.length;e++)if(e!==i){var n=t[e];for(let e=0;e<r.length;e++)if(!0===n[r[e]])return!1}return!0}function nye(e,i){let t=b(e,e=>Fme([e],1)),n=tye(t.length),a=b(t,e=>{let t={};return v(e,e=>{e=rye(e.partialPath),v(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=i;r++){var o=s;s=tye(o.length);for(let t=0;t<o.length;t++){var l=o[t];for(let e=0;e<l.length;e++){var c=l[e].partialPath,h=l[e].suffixDef,u=rye(c);if(iye(a,u,t)||Ej(h)||c.length===i){var d=n[t];if(!1===oye(d,c)){d.push(c);for(let e=0;e<u.length;e++){var p=u[e];a[t][p]=!0}}}else d=Fme(h,r+1,c),s[t]=s[t].concat(d),v(d,e=>{e=rye(e.partialPath),v(e,e=>{a[t][e]=!0})})}}}return n}function aye(e,t,r,i){return e=new dye(e,hye.ALTERNATION,i),t.accept(e),nye(e.result,r)}function sye(e,t,r,i){var n=new dye(e,r),n=(t.accept(n),n.result),t=new uye(t,e,r).startWalking();return nye([new ffe({definition:n}),new ffe({definition:t})],i)}function oye(t,r){e:for(let e=0;e<t.length;e++){var i=t[e];if(i.length===r.length){for(let e=0;e<i.length;e++){var n=r[e],a=i[e];if(0==(n===a||void 0!==a.categoryMatchesMap[n.tokenTypeIdx]))continue e}return!0}}return!1}function lye(e,r){return e.length<r.length&&cG(e,(e,t)=>e===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function cye(e){return cG(e,e=>cG(e,e=>cG(e,e=>Ej(e.categoryMatches))))}var hye,uye,dye,pye=x(()=>{var e;ZY(),Hme(),Mfe(),dme(),Nfe(),(e=hye=hye||{})[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(Xme,"getProdType"),mt(Kme,"getLookaheadPaths"),mt(Zme,"buildLookaheadFuncForOr"),mt(Qme,"buildLookaheadFuncForOptionalProd"),mt(Jme,"buildAlternativesLookAheadFunc"),mt(eye,"buildSingleAlternativeLookaheadFunction"),uye=class extends Ife{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,hye.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,hye.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,hye.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,hye.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,hye.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},dye=class extends kfe{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,hye.OPTION)}visitRepetition(e){this.checkIsTarget(e,hye.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,hye.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,hye.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,hye.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,hye.ALTERNATION)}},mt(tye,"initializeArrayOfArrays"),mt(rye,"pathToHashKeys"),mt(iye,"isUniquePrefixHash"),mt(nye,"lookAheadSequenceFromAlternatives"),mt(aye,"getLookaheadPathsForOr"),mt(sye,"getLookaheadPathsForOptionalProd"),mt(oye,"containsPath"),mt(lye,"isStrictPrefixOfPath"),mt(cye,"areTokenCategoriesNotUsed")});function gye(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),b(e,e=>Object.assign({type:Q2e.CUSTOM_LOOKAHEAD_VALIDATION},e))}function fye(t,e,r,i){var n=$G(t,e=>mye(e,r)),e=Rye(t,e,r),a=$G(t,e=>Sye(e,r)),s=$G(t,e=>bye(e,t,i,r));return n.concat(e,a,s)}function mye(i,n){var e=new Lye,e=(i.accept(e),e.allProductions),e=YG(e,yye),e=uW(e,e=>1<e.length);return b(pj(e),e=>{var t=AG(e),e=n.buildDuplicateFoundError(i,e),r=Rfe(t),e={message:e,type:Q2e.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:t.idx};return(r=vye(t))&&(e.parameter=r),e})}function yye(e){return`${Rfe(e)}_#_${e.idx}_#_`+vye(e)}function vye(e){return e instanceof Tfe?e.terminalType.name:e instanceof pfe?e.nonTerminalName:""}function bye(r,e,t,i){var n=[];return 1<cY(e,(e,t)=>t.name===r.name?e+1:e,0)&&(e=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),n.push({message:e,type:Q2e.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function xye(e,t,r){var i=[];return yj(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:Q2e.INVALID_RULE_OVERRIDE,ruleName:e}),i}function wye(r,e,i,n=[]){var t,a=[],e=Tye(e.definition);return Ej(e)?[]:(t=r.name,yj(e,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:Q2e.LEFT_RECURSION,ruleName:t}),t=BU(e,n.concat([r])),e=$G(t,e=>{var t=Tz(n);return t.push(e),wye(r,e,i,t)}),a.concat(e))}function Tye(e){let t=[];if(Ej(e))return t;if((r=AG(e))instanceof pfe)t.push(r.referencedRule);else if(r instanceof ffe||r instanceof mfe||r instanceof yfe||r instanceof vfe||r instanceof xfe||r instanceof bfe)t=t.concat(Tye(r.definition));else if(r instanceof wfe)t=gB(b(r.definition,e=>Tye(e.definition)));else if(!(r instanceof Tfe))throw Error("non exhaustive match");var r=_fe(r),i=1<e.length;return r&&i?(r=WU(e),t.concat(Tye(r))):t}function kye(i,n){var e=new Nye,e=(i.accept(e),e.alternations);return $G(e,r=>{var e=HU(r.definition);return $G(e,(e,t)=>(e=zme([e],[],V1e,1),Ej(e)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:t}),type:Q2e.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:t+1}]:[]))})}function Cye(i,n,a){var e=new Nye,e=(i.accept(e),e.alternations),e=dY(e,e=>!0===e.ignoreAmbiguities);return $G(e,e=>{var t=_ye(r=aye(e.idx,i,e.maxLookahead||n,e),e,i,a),r=Aye(r,e,i,a);return t.concat(r)})}function Sye(t,r){var e=new Nye,e=(t.accept(e),e.alternations);return $G(e,e=>255<e.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:e}),type:Q2e.TOO_MANY_ALTS,ruleName:t.name,occurrence:e.idx}]:[])}function Eye(e,n,a){let s=[];return v(e,i=>{var e=new Dye,e=(i.accept(e),e.allProductions);v(e,e=>{var t=Xme(e),r=e.maxLookahead||n,t=sye(e.idx,i,t,r)[0];Ej(gB(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:e}),s.push({message:r,type:Q2e.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function _ye(a,s,r,i){let o=[],e=cY(a,(e,t,n)=>(!0!==s.definition[n].ignoreAmbiguities&&v(t,r=>{let i=[n];v(a,(e,t)=>{n!==t&&oye(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&i.push(t)}),1<i.length&&!oye(o,r)&&(o.push(r),e.push({alts:i,path:r}))}),e),[]);return b(e,e=>{var t=b(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:Q2e.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function Aye(e,n,a,s){let o=cY(e,(e,t,r)=>(t=b(t,e=>({idx:r,path:e})),e.concat(t)),[]);return Az($G(o,e=>{if(!0===n.definition[e.idx].ignoreAmbiguities)return[];let i=e.idx,t=e.path,r=fG(o,e=>!0!==n.definition[e.idx].ignoreAmbiguities&&e.idx<i&&lye(e.path,t));return b(r,e=>{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:Q2e.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function Rye(e,t,r){let i=[],n=b(t,e=>e.name);return v(e,e=>{var t=e.name;yj(n,t)&&(e=r.buildNamespaceConflictError(e),i.push({message:e,type:Q2e.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),i}var Lye,Nye,Dye,Iye=x(()=>{ZY(),tve(),Nfe(),pye(),Hme(),dme(),mt(gye,"validateLookahead"),mt(fye,"validateGrammar"),mt(mye,"validateDuplicateProductions"),mt(yye,"identifyProductionForDuplicates"),mt(vye,"getExtraProductionArgument"),Lye=class extends kfe{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(bye,"validateRuleDoesNotAlreadyExist"),mt(xye,"validateRuleIsOverridden"),mt(wye,"validateNoLeftRecursion"),mt(Tye,"getFirstNoneTerminal"),Nye=class extends kfe{static{mt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(kye,"validateEmptyOrAlternative"),mt(Cye,"validateAmbiguousAlternationAlternatives"),Dye=class extends kfe{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(Sye,"validateTooManyAlts"),mt(Eye,"validateSomeNonEmptyLookaheadPath"),mt(_ye,"checkAlternativesAmbiguities"),mt(Aye,"checkPrefixAlternativesAmbiguities"),mt(Rye,"checkTerminalAndNoneTerminalsNameSpace")});function Mye(e){let t=AU(e,{errMsgProvider:Dme}),r={};return v(e.rules,e=>{r[e.name]=e}),Pme(r,t.errMsgProvider)}function Oye(e){return fye((e=AU(e,{errMsgProvider:Ime})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Pye=x(()=>{ZY(),Bme(),Iye(),Ome(),mt(Mye,"resolveGrammar"),mt(Oye,"validateGrammar")});function $ye(e){return yj(Bye,e.name)}var Bye,Fye,zye,qye,Uye,Gye,jye=x(()=>{ZY(),Bye=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(Bye),mt($ye,"isRecognitionException"),Fye=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)}},zye=class extends Fye{static{mt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},qye=class extends Fye{static{mt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},Uye=class extends Fye{static{mt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},Gye=class extends Fye{static{mt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}}});function Wye(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=Lme,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}var Yye,Vye,Hye,Xye,Kye=x(()=>{Mme(),ZY(),jye(),qfe(),tve(),Yye={},Vye="InRuleRecoveryException",Hye=class extends Error{static{mt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=Vye}},Xye=class{static{mt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(nj(e,"recoveryEnabled")?e:K2e).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Wye)}getTokenToInsert(e){return(e=bme(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 zye(e,l,this.LA(0))).resyncedTokens=HU(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 Hye("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ej(t))return!1;let r=this.LA(1);return void 0!==CG(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 yj(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var i=CG(e,e=>xme(t,e));if(void 0!==i)return i;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?Yye:(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?Yye:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:i[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=b(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return gB(e)}getFollowSetFromFollowKey(e){return e===Yye?[Lme]:(e=e.ruleName+e.idxInCallingRule+Ffe+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,Lme)||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 HU(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Tz(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return b(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(Wye,"attemptInRepetitionRecovery")});function Zye(e,t,r){return r|t|e}var Qye,Jye=x(()=>{mt(Zye,"getKeyForAutomaticLookahead")}),e2e=x(()=>{ZY(),Ome(),tve(),Iye(),pye(),Qye=class{static{mt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:K2e.maxLookahead}validate(e){var t,r,i=this.validateNoLeftRecursion(e.rules);return Ej(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 $G(e,e=>wye(e,e,Ime))}validateEmptyOrAlternatives(e){return $G(e,e=>kye(e,Ime))}validateAmbiguousAlternationAlternatives(e,t){return $G(e,e=>Cye(e,t,Ime))}validateSomeNonEmptyLookaheadPath(e,t){return Eye(e,t,Ime)}buildLookaheadForAlternation(e){return Zme(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Jme)}buildLookaheadForOptional(e){return Qme(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Xme(e.prodType),eye)}}});function t2e(e){return n2e.reset(),e.accept(n2e),e=n2e.dslMethods,n2e.reset(),e}var r2e,i2e,n2e,a2e=x(()=>{ZY(),tve(),Jye(),Nfe(),e2e(),r2e=class{static{mt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(nj(e,"dynamicTokensEnabled")?e:K2e).dynamicTokensEnabled,this.maxLookahead=(nj(e,"maxLookahead")?e:K2e).maxLookahead,this.lookaheadStrategy=nj(e,"lookaheadStrategy")?e.lookaheadStrategy:new Qye({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}=t2e(s);v(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+Rfe(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=Zye(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),v(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,Rfe(e))}),v(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,Rfe(e))}),v(i,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,Rfe(e))}),v(n,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,Rfe(e))}),v(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,Rfe(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=Zye(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)}},i2e=class extends kfe{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)}},n2e=new i2e,mt(t2e,"collectMethods")});function s2e(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function o2e(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function l2e(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function c2e(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var h2e=x(()=>{mt(s2e,"setNodeLocationOnlyOffset"),mt(o2e,"setNodeLocationFull"),mt(l2e,"addTerminalToCst"),mt(c2e,"addNoneTerminalToCst")});function u2e(e,t){Object.defineProperty(e,d2e,{enumerable:!1,configurable:!0,writable:!1,value:t})}var d2e,p2e=x(()=>{d2e="name",mt(u2e,"defineNameProp")});function g2e(t,r){var i=k$(t),n=i.length;for(let e=0;e<n;e++){var a=t[i[e]],s=a.length;for(let e=0;e<s;e++){var o=a[e];void 0===o.tokenTypeIdx&&this[o.name](o.children,r)}}}function f2e(e,t){var r=mt(function(){},"derivedConstructor"),e=(u2e(r,e+"BaseSemantics"),{visit:mt(function(e,t){if(nC(e)&&(e=e[0]),!Oj(e))return this[e.name](e.children,t)},"visit"),validateVisitor:mt(function(){var e=y2e(this,t);if(!Ej(e))throw e=b(e,e=>e.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 m2e(e,t,r){var i=mt(function(){},"derivedConstructor");u2e(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return v(t,e=>{n[e]=g2e}),i.prototype=n,i.prototype.constructor=i}function y2e(e,t){return v2e(e,t)}function v2e(t,e){return e=fG(e,e=>!1===IT(t[e])),e=b(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:b2e.MISSING_METHOD,methodName:e})),Az(e)}var b2e,x2e,w2e,T2e,k2e,C2e,S2e,E2e=x(()=>{var e;ZY(),p2e(),mt(g2e,"defaultVisit"),mt(f2e,"createBaseSemanticVisitorConstructor"),mt(m2e,"createBaseVisitorConstructorWithDefaults"),(e=b2e=b2e||{})[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD",mt(y2e,"validateVisitor"),mt(v2e,"validateMissingCstMethods")}),_2e=x(()=>{h2e(),ZY(),E2e(),tve(),x2e=class{static{mt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(nj(e,"nodeLocationTracking")?e:K2e).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=o2e,this.setNodeLocationFromNode=o2e,this.cstPostRule=HP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=HP,this.setNodeLocationFromNode=HP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=s2e,this.setNodeLocationFromNode=s2e,this.cstPostRule=HP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=HP,this.setNodeLocationFromNode=HP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=HP,this.setNodeLocationFromNode=HP,this.cstPostRule=HP,this.setInitialNodeLocation=HP}else this.cstInvocationStateUpdate=HP,this.cstFinallyStateUpdate=HP,this.cstPostTerminal=HP,this.cstPostNonTerminal=HP,this.cstPostRule=HP}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];l2e(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];c2e(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return Oj(this.baseCstVisitorConstructor)?(e=f2e(this.className,k$(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return Oj(this.baseCstVisitorWithDefaultsConstructor)?(e=m2e(this.className,k$(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]}}}),A2e=x(()=>{tve(),w2e=class{static{mt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> 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)):X2e}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?X2e: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()}}}),R2e=x(()=>{ZY(),jye(),tve(),Ome(),Iye(),Nfe(),T2e=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=Z2e){yj(this.definedRulesNames,e)&&(i={message:Ime.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Q2e.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=Z2e){var i=xye(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($ye(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return hfe(pj(this.gastProductionsCache))}}}),L2e=x(()=>{ZY(),Jye(),jye(),pye(),Hme(),tve(),Kye(),Mme(),dme(),k2e=class{static{mt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=H1e,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},nj(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
||
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
||
For Further details.`);if(nC(e)){if(Ej(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(nC(e))this.tokensMap=cY(e,(e,t)=>(e[t.name]=t,e),{});else if(nj(e,"modes")&&cG(gB(pj(e.modes)),ame))t=gB(pj(e.modes)),t=PY(t),this.tokensMap=cY(t,(e,t)=>(e[t.name]=t,e),{});else{if(!LT(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Tz(e)}this.tokensMap.EOF=Lme,t=nj(e,"modes")?gB(pj(e.modes)):pj(e),e=cG(t,e=>Ej(e.categoryMatches)),this.tokenMatcher=e?H1e:V1e,X1e(pj(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=(nj(e,"resyncEnabled")?e:Z2e).resyncEnabled,a=(nj(e,"recoveryValueFunc")?e:Z2e).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($ye(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,hye.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,Yme)}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,hye.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,Vme],r,1536,e,Vme)}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,jme,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,Wme],t,1280,e,Wme)}}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=nC(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 Uye(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 $ye(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 zye(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===Vye?r:e}}saveRecogState(){var e=this.errors,t=Tz(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),Lme)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),N2e=x(()=>{jye(),ZY(),pye(),tve(),C2e=class{static{mt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(nj(e,"errorMessageProvider")?e:K2e).errorMessageProvider}SAVE_ERROR(e){if($ye(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Tz(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Tz(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var i=this.getCurrRuleFullName(),e=sye(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 Gye(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=aye(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 qye(e,this.LA(1),r))}}}),D2e=x(()=>{Hme(),ZY(),S2e=class{static{mt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if(Oj(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return zme([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=AG(e.ruleStack),t=this.getGAstProductions()[t];return new Ume(t,e).startWalking()}}});function I2e(e,t,r,i=!1){P2e(r);var n=UU(this.recordingProdStack),a=IT(t)?t:t.DEF,e=new e({definition:[],idx:r});return i&&(e.separator=t.SEP),nj(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),n.definition.push(e),this.recordingProdStack.pop(),$2e}function M2e(e,t){P2e(t);let r=UU(this.recordingProdStack),i=!1===nC(e),n=0==i?e:e.DEF,a=new wfe({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});return nj(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=wY(n,e=>IT(e.GATE)),a.hasPredicates=t,r.definition.push(a),v(n,e=>{var t=new ffe({definition:[]});a.definition.push(t),nj(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:nj(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),$2e}function O2e(e){return 0===e?"":""+e}function P2e(e){if(e<0||B2e<e)throw(e=new Error(`Invalid DSL Method idx value: <${e}>
|
||
Idx value must be a none negative value smaller than `+(B2e+1))).KNOWN_RECORDER_ERROR=!0,e}var $2e,B2e,F2e,z2e,q2e,U2e,G2e,j2e=x(()=>{ZY(),Nfe(),gme(),dme(),Mme(),tve(),Jye(),$2e={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze($2e),B2e=Math.pow(2,8)-1,X1e([F2e=yme({name:"RECORDING_PHASE_TOKEN",pattern:ume.NA})]),z2e=bme(F2e,`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(z2e),q2e={name:`This CSTNode indicates the Parser is in Recording Phase
|
||
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},U2e=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<r?r:"";this["CONSUME"+e]=function(e,t){return this.consumeInternalRecord(e,r,t)},this["SUBRULE"+e]=function(e,t){return this.subruleInternalRecord(e,r,t)},this["OPTION"+e]=function(e){return this.optionInternalRecord(e,r)},this["OR"+e]=function(e){return this.orInternalRecord(e,r)},this["MANY"+e]=function(e){this.manyInternalRecord(r,e)},this["MANY_SEP"+e]=function(e){this.manySepFirstInternalRecord(r,e)},this["AT_LEAST_ONE"+e]=function(e){this.atLeastOneInternalRecord(r,e)},this["AT_LEAST_ONE_SEP"+e]=function(e){this.atLeastOneSepFirstInternalRecord(r,e)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{var t=this;for(let e=0;e<10;e++){var r=0<e?e:"";delete t["CONSUME"+r],delete t["SUBRULE"+r],delete t["OPTION"+r],delete t["OR"+r],delete t["MANY"+r],delete t["MANY_SEP"+r],delete t["AT_LEAST_ONE"+r],delete t["AT_LEAST_ONE_SEP"+r]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return X2e}topLevelRuleRecord(e,t){try{var r=new gfe({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 I2e.call(this,mfe,e,t)}atLeastOneInternalRecord(e,t){I2e.call(this,yfe,t,e)}atLeastOneSepFirstInternalRecord(e,t){I2e.call(this,vfe,t,e,!0)}manyInternalRecord(e,t){I2e.call(this,bfe,t,e)}manySepFirstInternalRecord(e,t){I2e.call(this,xfe,t,e,!0)}orInternalRecord(e,t){return M2e.call(this,e,t)}subruleInternalRecord(e,t,r){var i,n;if(P2e(t),e&&!1!==nj(e,"ruleName"))return i=UU(this.recordingProdStack),n=e.ruleName,n=new pfe({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?q2e:$2e;throw(r=new Error(`<SUBRULE${O2e(t)}> 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(P2e(t),tme(e))return i=UU(this.recordingProdStack),r=new Tfe({idx:t,terminalType:e,label:r?.LABEL}),i.definition.push(r),z2e;throw(i=new Error(`<CONSUME${O2e(t)}> 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(I2e,"recordProd"),mt(M2e,"recordOrProd"),mt(O2e,"getIdxSuffix"),mt(P2e,"assertMethodIdxIsValid")}),W2e=x(()=>{ZY(),ofe(),tve(),G2e=class{static{mt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;nj(e,"traceInitPerf")?(e=e.traceInitPerf,this.traceInitMaxIdent=(t="number"==typeof e)?e:1/0,this.traceInitPerf=t?0<e:e):(this.traceInitMaxIdent=0,this.traceInitPerf=K2e.traceInitPerf),this.traceInitIndent=-1}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<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),ife(t)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${i}ms`),this.traceInitIndent--,n):t()}}});function Y2e(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 V2e=x(()=>{mt(Y2e,"applyMixins")});function H2e(e=void 0){return function(){return e}}var X2e,K2e,Z2e,Q2e,J2e,eve,tve=x(()=>{var e;ZY(),ofe(),Wfe(),Mme(),Ome(),Pye(),Kye(),a2e(),_2e(),A2e(),R2e(),L2e(),N2e(),D2e(),j2e(),W2e(),V2e(),Iye(),X2e=bme(Lme,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(X2e),K2e=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Nme,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Z2e=Object.freeze({recoveryValueFunc:mt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(e=Q2e=Q2e||{})[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(H2e,"EMPTY_ALT"),(J2e=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",()=>{afe(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=Mye({rules:pj(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;Ej(i)&&!1===this.skipValidations&&(e=Oye({rules:pj(this.gastProductionsCache),tokenTypes:pj(this.tokensMap),errMsgProvider:Ime,grammarName:r}),t=gye({lookaheadStrategy:this.lookaheadStrategy,rules:pj(this.gastProductionsCache),tokenTypes:pj(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),Ej(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=Ufe(pj(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:pj(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(pj(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Ej(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),nj(t,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
||
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
||
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
||
For further details.`);this.skipValidations=(nj(t,"skipValidations")?t:K2e).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Y2e(J2e,[Xye,r2e,x2e,w2e,k2e,T2e,C2e,S2e,U2e,G2e]),eve=class extends J2e{static{mt(this,"EmbeddedActionsParser")}constructor(e,t=K2e){(t=Tz(t)).outputCst=!1,super(e,t)}}}),rve=x(()=>{Nfe()}),ive=x(()=>{}),nve=x(()=>{rve(),ive()}),ave=x(()=>{Jge()}),sve=x(()=>{Jge(),tve(),gme(),Mme(),pye(),e2e(),Ome(),jye(),pme(),Nfe(),Nfe(),nve(),ave()});function ove(e,t,r){return e.name+`_${t}_`+r}function lve(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},i=(cve(r,t),t.length);for(let e=0;e<i;e++){var n=t[e],a=yve(r,n,n);void 0!==a&&_ve(r,n,a)}return r}function cve(t,r){var i=r.length;for(let e=0;e<i;e++){var n=r[e],a=Rve(t,n,void 0,{type:Ive}),s=Rve(t,n,void 0,{type:Pve});a.stop=s,t.ruleToStartState.set(n,a),t.ruleToStopState.set(n,s)}}function hve(e,t,r){return r instanceof Tfe?Sve(e,t,r.terminalType,r):(r instanceof pfe?Eve:r instanceof wfe?fve:r instanceof mfe?mve:r instanceof bfe?uve:r instanceof xfe?dve:r instanceof yfe?pve:r instanceof vfe?gve:yve)(e,t,r)}function uve(e,t,r){var i=Rve(e,t,r,{type:Ove});return wve(e,i),bve(e,t,r,Tve(e,t,i,r,yve(e,t,r)))}function dve(e,t,r){var i=Rve(e,t,r,{type:Ove});return wve(e,i),bve(e,t,r,Tve(e,t,i,r,yve(e,t,r)),Sve(e,t,r.separator,r))}function pve(e,t,r){var i=Rve(e,t,r,{type:Mve});return wve(e,i),vve(e,t,r,Tve(e,t,i,r,yve(e,t,r)))}function gve(e,t,r){var i=Rve(e,t,r,{type:Mve});return wve(e,i),vve(e,t,r,Tve(e,t,i,r,yve(e,t,r)),Sve(e,t,r.separator,r))}function fve(t,r,e){var i=Rve(t,r,e,{type:Dve}),n=(wve(t,i),b(e.definition,e=>hve(t,r,e)));return Tve(t,r,i,e,...n)}function mve(e,t,r){var i=Rve(e,t,r,{type:Dve});return wve(e,i),xve(e,t,r,Tve(e,t,i,r,yve(e,t,r)))}function yve(t,r,e){return 1===(e=fG(b(e.definition,e=>hve(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:Cve(t,e)}function vve(e,t,r,i,n){var a=i.left,i=i.right,s=Rve(e,t,r,{type:zve}),o=(wve(e,s),Rve(e,t,r,{type:qve}));return a.loopback=s,o.loopback=s,Ave(i,e.decisionMap[ove(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(Ave(s,a),Ave(s,o)):(Ave(s,o),Ave(s,n.left),Ave(n.right,a)),{left:a,right:o}}function bve(e,t,r,i,n){var a=i.left,i=i.right,s=Rve(e,t,r,{type:Fve}),o=(wve(e,s),Rve(e,t,r,{type:qve})),l=Rve(e,t,r,{type:Bve});return s.loopback=l,o.loopback=l,Ave(s,a),Ave(s,o),Ave(i,l),void 0!==n?(Ave(l,o),Ave(l,n.left),Ave(n.right,a)):Ave(l,s),{left:e.decisionMap[ove(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function xve(e,t,r,i){var n=i.left;return Ave(n,i.right),e.decisionMap[ove(t,"Option",r.idx)]=n,i}function wve(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Tve(e,t,r,i,...n){var a,s=Rve(e,t,i,{type:$ve,start:r});r.end=s;for(a of n)void 0!==a?(Ave(r,a.left),Ave(a.right,s)):Ave(r,s);return n={left:r,right:s},e.decisionMap[ove(t,kve(i),i.idx)]=r,n}function kve(e){if(e instanceof wfe)return"Alternation";if(e instanceof mfe)return"Option";if(e instanceof bfe)return"Repetition";if(e instanceof xfe)return"RepetitionWithSeparator";if(e instanceof yfe)return"RepetitionMandatory";if(e instanceof vfe)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Cve(t,r){var i=r.length;for(let e=0;e<i-1;e++){var n,a=r[e],s=(n=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof Wve,o=n,l=r[e+1].left;a.left.type===Dve&&a.right.type===Dve&&void 0!==n&&(s&&o.followState===a.right||n.target===a.right)?(s?o.followState=l:n.target=l,Nve(t,a.right)):Ave(a.right,l)}return{left:r[0].left,right:r[i-1].right}}function Sve(e,t,r,i){var n=Rve(e,t,i,{type:Dve}),e=Rve(e,t,i,{type:Dve});return Lve(n,new Gve(e,r)),{left:n,right:e}}function Eve(e,t,r){var i=r.referencedRule,n=e.ruleToStartState.get(i),a=Rve(e,t,r,{type:Dve}),e=Rve(e,t,r,{type:Dve});return Lve(a,new Wve(n,i,e)),{left:a,right:e}}function _ve(e,t,r){var i=e.ruleToStartState.get(t),e=(Ave(i,r.left),e.ruleToStopState.get(t));return Ave(r.right,e),{left:i,right:e}}function Ave(e,t){Lve(e,new jve(t))}function Rve(e,t,r,i){return r=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},i),e.states.push(r),r}function Lve(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function Nve(e,t){e.states.splice(e.states.indexOf(t),1)}var Dve,Ive,Mve,Ove,Pve,$ve,Bve,Fve,zve,qve,Uve,Gve,jve,Wve,Yve=x(()=>{OG(),mG(),sve(),mt(ove,"buildATNKey"),Dve=1,Ive=2,Mve=4,Ove=5,Pve=7,$ve=8,Bve=9,Fve=10,zve=11,qve=12,Uve=class{static{mt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Gve=class extends Uve{static{mt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},jve=class extends Uve{static{mt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Wve=class extends Uve{static{mt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(lve,"createATN"),mt(cve,"createRuleStartAndStopATNStates"),mt(hve,"atom"),mt(uve,"repetition"),mt(dve,"repetitionSep"),mt(pve,"repetitionMandatory"),mt(gve,"repetitionMandatorySep"),mt(fve,"alternation"),mt(mve,"option"),mt(yve,"block"),mt(vve,"plus"),mt(bve,"star"),mt(xve,"optional"),mt(wve,"defineDecisionState"),mt(Tve,"makeAlts"),mt(kve,"getProdType"),mt(Cve,"makeBlock"),mt(Sve,"tokenRef"),mt(Eve,"ruleRef"),mt(_ve,"buildRuleHandle"),mt(Ave,"epsilon"),mt(Rve,"newState"),mt(Lve,"addTransition"),mt(Nve,"removeState")});function Vve(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}var Hve,Xve,Kve=x(()=>{OG(),Hve={},Xve=class{static{mt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=Vve(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(Vve,"getATNConfigKey")});function Zve(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 Qve(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 Jve(t){var r=t.decisionStates.length,i=Array(r);for(let e=0;e<r;e++)i[e]=Zve(t.decisionStates[e],e);return i}function ebe(e,t,r,i){let n=e[t](r),a=n.start;return void 0===a&&(e=gbe(n.atnStartState),a=pbe(n,ube(e)),n.start=a),tbe.apply(this,[n,a,r,i])}function tbe(e,t,r,i){let n=t,a=1,s=[],o=this.LA(a++);for(;;){var l=obe(n,o);if((l=void 0===l?rbe.apply(this,[e,n,o,a,r,i]):l)===Hve)return sbe(s,n,o);if(!0===l.isAcceptState)return l.prediction;n=l,s.push(o),o=this.LA(a++)}}function rbe(e,t,r,i,n,a){var s=lbe(t.configs,r,n);if(0===s.size)return dbe(e,t,r,Hve),Hve;let o=ube(s),l=hbe(s,n);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):bbe(s)&&(n=Kj(s.alts),o.isAcceptState=!0,o.prediction=n,o.configs.uniqueAlt=n,ibe.apply(this,[e,i,s.alts,a])),o=dbe(e,t,r,o)}function ibe(e,t,r,i){var n=[];for(let e=1;e<=t;e++)n.push(this.LA(e).tokenType);i(nbe({topLevelRule:(e=e.atnStartState).rule,ambiguityIndices:r,production:e.production,prefixPath:n}))}function nbe(e){var t=b(e.prefixPath,e=>fme(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${abe(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 abe(e){if(e instanceof pfe)return"SUBRULE";if(e instanceof mfe)return"OPTION";if(e instanceof wfe)return"OR";if(e instanceof yfe)return"AT_LEAST_ONE";if(e instanceof vfe)return"AT_LEAST_ONE_SEP";if(e instanceof xfe)return"MANY_SEP";if(e instanceof bfe)return"MANY";if(e instanceof Tfe)return"CONSUME";throw Error("non exhaustive match")}function sbe(e,t,r){return t=$G(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:FY(t.filter(e=>e instanceof Gve).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function obe(e,t){return e.edges[t.tokenTypeIdx]}function lbe(e,t,r){var i,n=new Xve,a=[];for(i of e.elements)if(!1!==r.is(i.alt))if(i.state.type===Pve)a.push(i);else{var s=i.state.transitions.length;for(let e=0;e<s;e++){var o=cbe(i.state.transitions[e],t);void 0!==o&&n.add({state:o,alt:i.alt,stack:i.stack})}}let l;if(void 0===(l=0===a.length&&1===n.size?n:l)){l=new Xve;for(var c of n.elements)fbe(c,l)}if(0<a.length&&!ybe(l))for(var h of a)l.add(h);return l}function cbe(e,t){if(e instanceof Gve&&xme(t,e.tokenType))return e.target}function hbe(e,t){let r;for(var i of e.elements)if(!0===t.is(i.alt))if(void 0===r)r=i.alt;else if(r!==i.alt)return;return r}function ube(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function dbe(e,t,r,i){return i=pbe(e,i),t.edges[r.tokenTypeIdx]=i}function pbe(e,t){var r,i;return t===Hve?t:(r=t.configs.key,void 0!==(i=e.states[r])?i:(t.configs.finalize(),e.states[r]=t))}function gbe(t){var r=new Xve,i=t.transitions.length;for(let e=0;e<i;e++)fbe({state:t.transitions[e].target,alt:e,stack:[]},r);return r}function fbe(t,r){var e,i=t.state;if(i.type===Pve)0<t.stack.length?fbe({state:(e=[...t.stack]).pop(),alt:t.alt,stack:e},r):r.add(t);else{i.epsilonOnlyTransitions||r.add(t);var n=i.transitions.length;for(let e=0;e<n;e++){var a=mbe(t,i.transitions[e]);void 0!==a&&fbe(a,r)}}}function mbe(e,t){var r;return t instanceof jve?{state:t.target,alt:e.alt,stack:e.stack}:t instanceof Wve?(r=[...e.stack,t.followState],{state:t.target,alt:e.alt,stack:r}):void 0}function ybe(e){for(var t of e.elements)if(t.state.type===Pve)return!0;return!1}function vbe(e){for(var t of e.elements)if(t.state.type!==Pve)return!1;return!0}function bbe(e){return!!vbe(e)||wbe(e=xbe(e.elements))&&!Tbe(e)}function xbe(e){var r,i=new Map;for(r of e){let e=Vve(r,!1),t=i.get(e);void 0===t&&(t={},i.set(e,t)),t[r.alt]=!0}return i}function wbe(e){for(var t of Array.from(e.values()))if(1<Object.keys(t).length)return!0;return!1}function Tbe(e){for(var t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}var kbe,Cbe,Sbe,Ebe=x(()=>{sve(),Yve(),Kve(),Zj(),BG(),zY(),OG(),fB(),eG(),_j(),hY(),mt(Zve,"createDFACache"),kbe=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;e<r;e++)t+=!0===this.predicates[e]?"1":"0";return t}},Cbe=new kbe,Sbe=class extends Qye{static{mt(this,"LLStarLookaheadStrategy")}constructor(e){super(),this.logging=null!=(e=e?.logging)?e:e=>console.log(e)}initialize(e){this.atn=lve(e.rules),this.dfas=Jve(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=ove(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=b(Kme({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>b(e,e=>e[0]));if(!Qve(c,!1)||n)return i?function(t){var r=new kbe,i=void 0===t?0:t.length;for(let e=0;e<i;e++){var n=t?.[e].GATE;r.set(e,void 0===n||n.call(this))}var e=ebe.call(this,a,l,r,s);return"number"==typeof e?e:void 0}:function(){var e=ebe.call(this,a,l,Cbe,s);return"number"==typeof e?e:void 0};{let r=cY(c,(t,e,r)=>(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=ove(t,i,e),l=this.atn.decisionMap[o].decision,c=b(Kme({maxLookahead:1,occurrence:e,prodType:i,rule:t}),e=>b(e,e=>e[0]));if(Qve(c)&&c[0][0]&&!n){if(r=c[0],1===(r=gB(r)).length&&Ej(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=cY(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=ebe.call(this,a,l,Cbe,s);return"object"!=typeof e&&0===e}}},mt(Qve,"isLL1Sequence"),mt(Jve,"initATNSimulator"),mt(ebe,"adaptivePredict"),mt(tbe,"performLookahead"),mt(rbe,"computeLookaheadTarget"),mt(ibe,"reportLookaheadAmbiguity"),mt(nbe,"buildAmbiguityError"),mt(abe,"getProductionDslName"),mt(sbe,"buildAdaptivePredictError"),mt(obe,"getExistingTargetState"),mt(lbe,"computeReachSet"),mt(cbe,"getReachableTarget"),mt(hbe,"getUniqueAlt"),mt(ube,"newDFAState"),mt(dbe,"addDFAEdge"),mt(pbe,"addDFAState"),mt(gbe,"computeStartState"),mt(fbe,"closure"),mt(mbe,"getEpsilonTarget"),mt(ybe,"hasConfigInRuleStopState"),mt(vbe,"allConfigsInRuleStopStates"),mt(bbe,"hasConflictTerminatingPrediction"),mt(xbe,"getConflictingAltSets"),mt(wbe,"hasConflictingAltSet"),mt(Tbe,"hasStateAssociatedWithOneAlt")}),_be=x(()=>{Ebe()}),Abe={};dqe(Abe,{AnnotatedTextEdit:()=>Zbe,ChangeAnnotation:()=>Xbe,ChangeAnnotationIdentifier:()=>Kbe,CodeAction:()=>Mxe,CodeActionContext:()=>Ixe,CodeActionKind:()=>Nxe,CodeActionTriggerKind:()=>Dxe,CodeDescription:()=>Wbe,CodeLens:()=>Oxe,Color:()=>$be,ColorInformation:()=>Bbe,ColorPresentation:()=>Fbe,Command:()=>Vbe,CompletionItem:()=>vxe,CompletionItemKind:()=>dxe,CompletionItemLabelDetails:()=>yxe,CompletionItemTag:()=>gxe,CompletionList:()=>bxe,CreateFile:()=>Jbe,DeleteFile:()=>txe,Diagnostic:()=>Ybe,DiagnosticRelatedInformation:()=>Ube,DiagnosticSeverity:()=>Gbe,DiagnosticTag:()=>jbe,DocumentHighlight:()=>Sxe,DocumentHighlightKind:()=>Cxe,DocumentLink:()=>$xe,DocumentSymbol:()=>Lxe,DocumentUri:()=>Rbe,EOL:()=>r4e,FoldingRange:()=>qbe,FoldingRangeKind:()=>zbe,FormattingOptions:()=>Pxe,Hover:()=>wxe,InlayHint:()=>Hxe,InlayHintKind:()=>Yxe,InlayHintLabelPart:()=>Vxe,InlineCompletionContext:()=>e4e,InlineCompletionItem:()=>Kxe,InlineCompletionList:()=>Zxe,InlineCompletionTriggerKind:()=>Qxe,InlineValueContext:()=>Wxe,InlineValueEvaluatableExpression:()=>jxe,InlineValueText:()=>Uxe,InlineValueVariableLookup:()=>Gxe,InsertReplaceEdit:()=>fxe,InsertTextFormat:()=>pxe,InsertTextMode:()=>mxe,Location:()=>Obe,LocationLink:()=>Pbe,MarkedString:()=>xxe,MarkupContent:()=>uxe,MarkupKind:()=>hxe,OptionalVersionedTextDocumentIdentifier:()=>lxe,ParameterInformation:()=>Txe,Position:()=>Ibe,Range:()=>Mbe,RenameFile:()=>exe,SelectedCompletionInfo:()=>Jxe,SelectionRange:()=>Bxe,SemanticTokenModifiers:()=>zxe,SemanticTokenTypes:()=>Fxe,SemanticTokens:()=>qxe,SignatureInformation:()=>kxe,StringValue:()=>Xxe,SymbolInformation:()=>Axe,SymbolKind:()=>Exe,SymbolTag:()=>_xe,TextDocument:()=>i4e,TextDocumentEdit:()=>Qbe,TextDocumentIdentifier:()=>sxe,TextDocumentItem:()=>cxe,TextEdit:()=>Hbe,URI:()=>Lbe,VersionedTextDocumentIdentifier:()=>oxe,WorkspaceChange:()=>axe,WorkspaceEdit:()=>rxe,WorkspaceFolder:()=>t4e,WorkspaceSymbol:()=>Rxe,integer:()=>Nbe,uinteger:()=>Dbe});var Rbe,Lbe,Nbe,Dbe,Ibe,Mbe,Obe,Pbe,$be,Bbe,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,wxe,Txe,kxe,Cxe,Sxe,Exe,_xe,Axe,Rxe,Lxe,Nxe,Dxe,Ixe,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,yt,a4e,s4e,o4e,l4e,c4e,h4e,u4e=x(()=>{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?Dbe.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?Dbe.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:Ibe.create(e,t),end:Ibe.create(r,i)};if(Ibe.is(e)&&Ibe.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)&&Ibe.is(e.start)&&Ibe.is(e.end)}function d(e,t){return{uri:e,range:t}}function p(e){return yt.objectLiteral(e)&&Mbe.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)&&Mbe.is(e.targetRange)&&yt.string(e.targetUri)&&Mbe.is(e.targetSelectionRange)&&(Mbe.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)&&Mbe.is(e.range)&&$be.is(e.color)}function x(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function w(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.undefined(e.textEdit)||Hbe.is(e))&&(yt.undefined(e.additionalTextEdits)||yt.typedArray(e.additionalTextEdits,Hbe.is))}function T(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 C(e,t){return{location:e,message:t}}function S(e){return yt.defined(e)&&Obe.is(e.location)&&yt.string(e.message)}function E(e){return yt.objectLiteral(e)&&yt.string(e.href)}function _(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)&&Mbe.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,Ube.is))}function R(e,t,...r){return e={title:e,command:t},yt.defined(r)&&0<r.length&&(e.arguments=r),e}function L(e){return yt.defined(e)&&yt.string(e.title)&&yt.string(e.command)}function N(e,t){return{range:e,newText:t}}function D(e,t){return{range:{start:e,end:e},newText:t}}function I(e){return{range:e,newText:""}}function P(e){return yt.objectLiteral(e)&&yt.string(e.newText)&&Mbe.is(e.range)}function $(e,t,r){return e={label:e},void 0!==t&&(e.needsConfirmation=t),void 0!==r&&(e.description=r),e}function B(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(yt.string(e.description)||void 0===e.description)}function F(e){return yt.string(e)}function z(e,t,r){return{range:e,newText:t,annotationId:r}}function q(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function U(e,t){return{range:e,newText:"",annotationId:t}}function G(e){return Hbe.is(e)&&(Xbe.is(e.annotationId)||Kbe.is(e.annotationId))}function j(e,t){return{textDocument:e,edits:t}}function W(e){return yt.defined(e)&&lxe.is(e.textDocument)&&Array.isArray(e.edits)}function Y(e,t,r){return e={kind:"create",uri:e},void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function V(e){return e&&"create"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||Kbe.is(e.annotationId))}function H(e,t,r,i){return e={kind:"rename",oldUri:e,newUri:t},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==i&&(e.annotationId=i),e}function X(e){return e&&"rename"===e.kind&&yt.string(e.oldUri)&&yt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||Kbe.is(e.annotationId))}function K(e,t,r){return e={kind:"delete",uri:e},void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Z(e){return e&&"delete"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||yt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||yt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||Kbe.is(e.annotationId))}function Q(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>yt.string(e.kind)?Jbe.is(e)||exe.is(e)||txe.is(e):Qbe.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)&&hxe.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)&&Mbe.is(e.insert)&&Mbe.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)&&(uxe.is(t.contents)||xxe.is(t.contents)||yt.typedArray(t.contents,xxe.is))&&(void 0===e.range||Mbe.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 we(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 Te(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)&&Mbe.is(e.range)&&Mbe.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 Ce(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function Se(e){return yt.defined(e)&&yt.typedArray(e.diagnostics,Ybe.is)&&(void 0===e.only||yt.typedArray(e.only,yt.string))&&(void 0===e.triggerKind||e.triggerKind===Dxe.Invoked||e.triggerKind===Dxe.Automatic)}function Ee(e,t,r){let i={title:e},n=!0;return"string"==typeof t?(n=!1,i.kind=t):Vbe.is(t)?i.command=t:i.edit=t,n&&void 0!==r&&(i.kind=r),i}function _e(e){return e&&yt.string(e.title)&&(void 0===e.diagnostics||yt.typedArray(e.diagnostics,Ybe.is))&&(void 0===e.kind||yt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||Vbe.is(e.command))&&(void 0===e.isPreferred||yt.boolean(e.isPreferred))&&(void 0===e.edit||rxe.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)&&Mbe.is(e.range)&&(yt.undefined(e.command)||Vbe.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 De(e,t,r){return{range:e,target:t,data:r}}function Ie(e){return yt.defined(e)&&Mbe.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)&&Mbe.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&&Mbe.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&&Mbe.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&&Mbe.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)&&Mbe.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)||uxe.is(e.tooltip))&&(void 0===e.location||Obe.is(e.location))&&(void 0===e.command||Vbe.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)&&Ibe.is(e.position)&&(yt.string(e.label)||yt.typedArray(e.label,Vxe.is))&&(void 0===e.kind||Yxe.is(e.kind))&&void 0===e.textEdits||yt.typedArray(e.textEdits,Hbe.is)&&(void 0===e.tooltip||yt.string(e.tooltip)||uxe.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)&&Lbe.is(e.uri)&&yt.string(e.name)}function rt(e,t,r,i){return new n4e(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<s.length&&t<o.length;)n(s[e],o[t])<=0?i[r++]=s[e++]:i[r++]=o[t++];for(;e<s.length;)i[r++]=s[e++];for(;t<o.length;)i[r++]=o[t++]}return i}O=Rbe=Rbe||{},mt(e,"is"),O.is=e,O=Lbe=Lbe||{},mt(a,"is"),O.is=a,(t=Nbe=Nbe||{}).MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,mt(s,"is"),t.is=s,(r=Dbe=Dbe||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,mt(o,"is"),r.is=o,O=Ibe=Ibe||{},mt(l,"create"),O.create=l,mt(c,"is"),O.is=c,O=Mbe=Mbe||{},mt(h,"create"),O.create=h,mt(u,"is"),O.is=u,O=Obe=Obe||{},mt(d,"create"),O.create=d,mt(p,"is"),O.is=p,O=Pbe=Pbe||{},mt(g,"create"),O.create=g,mt(f,"is"),O.is=f,O=$be=$be||{},mt(m,"create"),O.create=m,mt(y,"is"),O.is=y,O=Bbe=Bbe||{},mt(v,"create"),O.create=v,mt(b,"is"),O.is=b,O=Fbe=Fbe||{},mt(x,"create"),O.create=x,mt(w,"is"),O.is=w,(O=zbe=zbe||{}).Comment="comment",O.Imports="imports",O.Region="region",O=qbe=qbe||{},mt(T,"create"),O.create=T,mt(k,"is"),O.is=k,O=Ube=Ube||{},mt(C,"create"),O.create=C,mt(S,"is"),O.is=S,(O=Gbe=Gbe||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=jbe=jbe||{}).Unnecessary=1,O.Deprecated=2,O=Wbe=Wbe||{},mt(E,"is"),O.is=E,O=Ybe=Ybe||{},mt(_,"create"),O.create=_,mt(A,"is"),O.is=A,O=Vbe=Vbe||{},mt(R,"create"),O.create=R,mt(L,"is"),O.is=L,O=Hbe=Hbe||{},mt(N,"replace"),O.replace=N,mt(D,"insert"),O.insert=D,mt(I,"del"),O.del=I,mt(P,"is"),O.is=P,O=Xbe=Xbe||{},mt($,"create"),O.create=$,mt(B,"is"),O.is=B,O=Kbe=Kbe||{},mt(F,"is"),O.is=F,O=Zbe=Zbe||{},mt(z,"replace"),O.replace=z,mt(q,"insert"),O.insert=q,mt(U,"del"),O.del=U,mt(G,"is"),O.is=G,O=Qbe=Qbe||{},mt(j,"create"),O.create=j,mt(W,"is"),O.is=W,O=Jbe=Jbe||{},mt(Y,"create"),O.create=Y,mt(V,"is"),O.is=V,O=exe=exe||{},mt(H,"create"),O.create=H,mt(X,"is"),O.is=X,O=txe=txe||{},mt(K,"create"),O.create=K,mt(Z,"is"),O.is=Z,O=rxe=rxe||{},mt(Q,"is"),O.is=Q,ixe=class{static{mt(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,n;if(i=void 0===r?Hbe.insert(e,t):Kbe.is(r)?(n=r,Zbe.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),Zbe.insert(e,t,n)),this.edits.push(i),void 0!==n)return n}replace(e,t,r){let i,n;if(i=void 0===r?Hbe.replace(e,t):Kbe.is(r)?(n=r,Zbe.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),Zbe.replace(e,t,n)),this.edits.push(i),void 0!==n)return n}delete(e,t){let r,i;if(r=void 0===t?Hbe.del(e):Kbe.is(t)?(i=t,Zbe.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),Zbe.del(e,i)),this.edits.push(r),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},nxe=class{static{mt(this,"ChangeAnnotations")}constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Kbe.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},axe=class{static{mt(this,"WorkspaceChange")}constructor(r){this._textEditChanges=Object.create(null),void 0!==r?(this._workspaceEdit=r).documentChanges?(this._changeAnnotations=new nxe(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(e=>{var t;Qbe.is(e)&&(t=new ixe(e.edits,this._changeAnnotations),this._textEditChanges[e.textDocument.uri]=t)})):r.changes&&Object.keys(r.changes).forEach(e=>{var t=new ixe(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(lxe.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 ixe(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 ixe(i),this._textEditChanges[r]=e),e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new nxe,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;Xbe.is(t)||Kbe.is(t)?i=t:r=t;let n,a;if(n=void 0===i?Jbe.create(e,r):(a=Kbe.is(i)?i:this._changeAnnotations.manage(i),Jbe.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;Xbe.is(r)||Kbe.is(r)?n=r:i=r;let a,s;if(a=void 0===n?exe.create(e,t,i):(s=Kbe.is(n)?n:this._changeAnnotations.manage(n),exe.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;Xbe.is(t)||Kbe.is(t)?i=t:r=t;let n,a;if(n=void 0===i?txe.create(e,r):(a=Kbe.is(i)?i:this._changeAnnotations.manage(i),txe.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}},O=sxe=sxe||{},mt(J,"create"),O.create=J,mt(ee,"is"),O.is=ee,O=oxe=oxe||{},mt(te,"create"),O.create=te,mt(re,"is"),O.is=re,O=lxe=lxe||{},mt(ie,"create"),O.create=ie,mt(ne,"is"),O.is=ne,O=cxe=cxe||{},mt(ae,"create"),O.create=ae,mt(se,"is"),O.is=se,(i=hxe=hxe||{}).PlainText="plaintext",i.Markdown="markdown",mt(oe,"is"),i.is=oe,O=uxe=uxe||{},mt(le,"is"),O.is=le,(O=dxe=dxe||{}).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=pxe=pxe||{}).PlainText=1,O.Snippet=2,(gxe=gxe||{}).Deprecated=1,O=fxe=fxe||{},mt(ce,"create"),O.create=ce,mt(he,"is"),O.is=he,(O=mxe=mxe||{}).asIs=1,O.adjustIndentation=2,O=yxe=yxe||{},mt(ue,"is"),O.is=ue,O=vxe=vxe||{},mt(de,"create"),O.create=de,O=bxe=bxe||{},mt(pe,"create"),O.create=pe,O=xxe=xxe||{},mt(ge,"fromPlainText"),O.fromPlainText=ge,mt(fe,"is"),O.is=fe,O=wxe=wxe||{},mt(me,"is"),O.is=me,O=Txe=Txe||{},mt(ye,"create"),O.create=ye,O=kxe=kxe||{},mt(ve,"create"),O.create=ve,(O=Cxe=Cxe||{}).Text=1,O.Read=2,O.Write=3,O=Sxe=Sxe||{},mt(be,"create"),O.create=be,(O=Exe=Exe||{}).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=Axe=Axe||{},mt(xe,"create"),O.create=xe,O=Rxe=Rxe||{},mt(we,"create"),O.create=we,O=Lxe=Lxe||{},mt(Te,"create"),O.create=Te,mt(ke,"is"),O.is=ke,(O=Nxe=Nxe||{}).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=Dxe=Dxe||{}).Invoked=1,O.Automatic=2,O=Ixe=Ixe||{},mt(Ce,"create"),O.create=Ce,mt(Se,"is"),O.is=Se,O=Mxe=Mxe||{},mt(Ee,"create"),O.create=Ee,mt(_e,"is"),O.is=_e,O=Oxe=Oxe||{},mt(Ae,"create"),O.create=Ae,mt(Re,"is"),O.is=Re,O=Pxe=Pxe||{},mt(Le,"create"),O.create=Le,mt(Ne,"is"),O.is=Ne,O=$xe=$xe||{},mt(De,"create"),O.create=De,mt(Ie,"is"),O.is=Ie,n=Bxe=Bxe||{},mt(Me,"create"),n.create=Me,mt(Oe,"is"),n.is=Oe,(O=Fxe=Fxe||{}).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=zxe=zxe||{}).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=qxe=qxe||{},mt(Pe,"is"),O.is=Pe,O=Uxe=Uxe||{},mt($e,"create"),O.create=$e,mt(Be,"is"),O.is=Be,O=Gxe=Gxe||{},mt(Fe,"create"),O.create=Fe,mt(ze,"is"),O.is=ze,O=jxe=jxe||{},mt(qe,"create"),O.create=qe,mt(Ue,"is"),O.is=Ue,O=Wxe=Wxe||{},mt(Ge,"create"),O.create=Ge,mt(je,"is"),O.is=je,(O=Yxe=Yxe||{}).Type=1,O.Parameter=2,mt(We,"is"),O.is=We,O=Vxe=Vxe||{},mt(Ye,"create"),O.create=Ye,mt(Ve,"is"),O.is=Ve,O=Hxe=Hxe||{},mt(He,"create"),O.create=He,mt(Xe,"is"),O.is=Xe,O=Xxe=Xxe||{},mt(Ke,"createSnippet"),O.createSnippet=Ke,O=Kxe=Kxe||{},mt(Ze,"create"),O.create=Ze,O=Zxe=Zxe||{},mt(Qe,"create"),O.create=Qe,(O=Qxe=Qxe||{}).Invoked=0,O.Automatic=1,O=Jxe=Jxe||{},mt(Je,"create"),O.create=Je,O=e4e=e4e||{},mt(et,"create"),O.create=et,O=t4e=t4e||{},mt(tt,"is"),O.is=tt,r4e=[`
|
||
`,`\r
|
||
`,"\r"],O=i4e=i4e||{},mt(rt,"create"),O.create=rt,mt(it,"is"),O.is=it,mt(nt,"applyEdits"),O.applyEdits=nt,mt(M,"mergeSort"),n4e=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;e<r.length;e++){i&&(t.push(e),i=!1);var n=r.charAt(e);i="\r"===n||n===`
|
||
`,"\r"===n&&e+1<r.length&&r.charAt(e+1)===`
|
||
`&&e++}i&&0<r.length&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(0===i)return Ibe.create(0,e);for(;r<i;){var n=Math.floor((r+i)/2);t[n]>e?i=n:r=n+1}var a=r-1;return Ibe.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<r.length?r[e.line+1]:this._content.length,Math.max(Math.min(t+e.character,r),t))}get lineCount(){return this.getLineOffsets().length}};{var O=yt=yt||{};let i=Object.prototype.toString;function at(e){return typeof e<"u"}function st(e){return"u"<typeof e}function ot(e){return!0===e||!1===e}function lt(e){return"[object String]"===i.call(e)}function ct(e){return"[object Number]"===i.call(e)}function ht(e,t,r){return"[object Number]"===i.call(e)&&t<=e&&e<=r}function ut(e){return"[object Number]"===i.call(e)&&-2147483648<=e&&e<=2147483647}function dt(e){return"[object Number]"===i.call(e)&&0<=e&&e<=2147483647}function pt(e){return"[object Function]"===i.call(e)}function gt(e){return null!==e&&"object"==typeof e}function ft(e,t){return Array.isArray(e)&&e.every(t)}mt(at,"defined"),O.defined=at,mt(st,"undefined"),O.undefined=st,mt(ot,"boolean"),O.boolean=ot,mt(lt,"string"),O.string=lt,mt(ct,"number"),O.number=ct,mt(ht,"numberRange"),O.numberRange=ht,mt(ut,"integer"),O.integer=ut,mt(dt,"uinteger"),O.uinteger=dt,mt(pt,"func"),O.func=pt,mt(gt,"objectLiteral"),O.objectLiteral=gt,mt(ft,"typedArray"),O.typedArray=ft}}),d4e=x(()=>{u4e(),_0e(),a4e=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 h4e(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new l4e;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new o4e(e.startOffset,e.image.length,c0e(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 o4e(t.startOffset,t.image.length,c0e(t),t.tokenType,!0);i.root=this.rootNode,r.push(i)}let n=this.current,a=!1;if(0<n.content.length)n.content.push(...r);else{for(;n.container;){var s=n.container.content.indexOf(n);if(0<s){n.container.content.splice(s,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}}construct(e){var t=this.current;"string"!=typeof e.$type||e.$infix||(this.current.astNode=e),e.$cstNode=t,0===(e=this.nodeStack.pop())?.content.length&&this.removeNode(e)}},s4e=class{static{mt(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){var e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(e)return e;throw new Error("This node has no associated AST element")}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},o4e=class extends s4e{static{mt(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,i,n=!1){super(),this._hidden=n,this._offset=e,this._tokenType=i,this._length=t,this._range=r}},l4e=class extends s4e{static{mt(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new c4e(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){var e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;return e&&t?(void 0===this._rangeCache&&(e=e.range,t=t.range,this._rangeCache={start:e.start,end:t.end.line<e.start.line?e.start:t.end}),this._rangeCache):{start:Ibe.create(0,0),end:Ibe.create(0,0)}}get firstNonHiddenNode(){for(var e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;0<=e;e--){var t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},c4e=class t extends Array{static{mt(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(var t of e)t.container=this.parent}},h4e=class extends l4e{static{mt(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function p4e(e){return e.$type===g4e}var g4e,f4e,m4e,y4e,v4e,b4e,x4e,w4e,T4e,k4e,C4e=x(()=>{i0e(),sve(),_be(),i0e(),Kge(),nde(),d4e(),g4e=Symbol("Datatype"),mt(p4e,"isDataTypeNode"),f4e=mt(e=>e.endsWith("")?e:e+"","withRuleSuffix"),m4e=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 k4e(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new T4e(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()}},y4e=class extends m4e{static{mt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new a4e,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 Ede(e)&&(i=e.name,this.registerPrecedenceMap(e)),t=this.wrapper.DEFINE_RULE(f4e(e.name),this.startImplementation(r,i,t).bind(this)),this.allRules.set(e.name,t),$de(e)&&e.entry&&(this.mainRule=t),t}registerPrecedenceMap(t){var e=t.name,r=new Map;for(let e=0;e<t.operators.precedences.length;e++){var i,n=t.operators.precedences[e];for(i of n.operators)r.set(i.value,{precedence:e,rightAssoc:"right"===n.associativity})}this.operatorPrecedence.set(e,r)}computeRuleType(e){return Ede(e)?Pge(e):e.fragment?void 0:Nge(e)?g4e:Pge(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);var e=this.lexerResult=this.lexer.tokenize(e),r=(this.wrapper.input=e.tokens,t.rule?this.allRules.get(t.rule):this.mainRule);if(r)return r=this.doParse(r),this.nodeBuilder.addHiddenNodes(e.hidden),this.unorderedGroups.clear(),jue(r,{deep:!(this.lexerResult=void 0)}),{value:r,lexerErrors:e.errors,lexerReport:e.report,parserErrors:this.wrapper.errors};throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.")}doParse(e){if(e=this.wrapper.rule(e),void 0===(e=0<this.stack.length?this.construct():e))throw new Error("No result from parser");if(0<this.stack.length)throw new Error("Parser stack is not empty after parsing");return e}startImplementation(i,n,a){return e=>{var t,r=!this.isRecording()&&void 0!==i;return r&&(this.stack.push(t={$type:i}),i===g4e?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;e<t.length;e++)if(t[e].startOffset>r)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=Lde(i)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,n)}else if(p4e(a)){let e=t.image;Lde(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&&0<a.length&&this.performSubruleAssignment(s,i,a)}}performSubruleAssignment(e,t,r){var{assignment:t,crossRef:i}=this.getAssignment(t);t?this.assign(t.operator,t.feature,e,r,i):p4e(t=this.current)?t.value+=e.toString():"object"==typeof e&&e&&(r=this.assignWithoutOverride(e,t),this.stack.pop(),this.stack.push(r))}action(t,r){if(!this.isRecording()){let e=this.current;r.feature&&r.operator?(e=this.construct(),this.nodeBuilder.removeNode(e.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(e.$cstNode),this.stack.push({$type:t}),this.assign(r.operator,r.feature,e,e.$cstNode)):e.$type=t}}construct(){var e;if(!this.isRecording())return e=this.stack.pop(),this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):p4e(e)?this.converter.convert(e.value,e.$cstNode):(tde(this.astReflection,e),e)}constructInfix(e,i){var n=e.parts;if(Array.isArray(n)&&0!==n.length){var a=e.operators;if(!Array.isArray(a)||n.length<2)return n[0];let t=0,r=-1;for(let e=0;e<a.length;e++){var s=a[e];(s=i.get(s)??{precedence:1/0,rightAssoc:!1}).precedence>r?(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=Wue(e,gde),this.assignmentMap.set(e,{assignment:t,crossRef:t&&bde(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}},v4e=class{static{mt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Nme.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Nme.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Nme.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Nme.buildEarlyExitMessage(e)}},b4e=class extends v4e{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}\`.`}},x4e=class extends m4e{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(f4e(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}},w4e={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new b4e},T4e=class extends eve{static{mt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,{...w4e,lookaheadStrategy:r?new Qye({maxLookahead:t.maxLookahead}):new Sbe({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,{})}},k4e=class extends T4e{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 S4e(e,t,r){return E4e({parser:t,tokens:r,ruleNames:new Map},e),t}function E4e(e,t){let r=pge(t,!1),i=Pue(t.rules).filter($de).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,A4e(a,n.definition))}var s;for(s of Pue(t.rules).filter(Ede).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(Vde(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??z4e(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 A4e(t,r,e=!1){let i;if(Lde(r))i=B4e(t,r);else if(hde(r))i=R4e(t,r);else if(gde(r))i=A4e(t,r.terminal);else if(bde(r))i=$4e(t,r);else if(qde(r))i=L4e(t,r);else if(ude(r))i=I4e(t,r);else if(Jde(r))i=M4e(t,r);else if(Cde(r))i=O4e(t,r);else{if(!wde(r))throw new L0e(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;i=mt(()=>t.parser.consume(e,Lme,r),"method")}}return F4e(t,e?void 0:P4e(r),i,r.cardinality)}function R4e(e,t){let r=Pge(t);return()=>e.parser.action(r,t)}function L4e(a,s){let o=s.rule.ref;if(ode(o)){let t=a.subrule++,r=$de(o)&&o.fragment,i=0<s.arguments.length?N4e(o,s.arguments):()=>({}),n;return e=>{n=n??z4e(a,o),a.parser.subrule(t,n,r,s,i(e))}}if(Vde(o)){let e=a.consume++,t=U4e(a,o.name);return()=>a.parser.consume(e,t,s)}if(!o)throw new L0e(s.$cstNode,"Undefined rule: "+s.rule.$refText);A0e(o)}function N4e(s,e){if(e.some(e=>e.calledByName)){let n=e.map(e=>({parameterName:e.parameter?.ref?.name,predicate:D4e(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=>D4e(e.value));return t=>{var r,i,n={};for(let e=0;e<a.length;e++)e<s.parameters.length&&(r=s.parameters[e].name,i=a[e],n[r]=i(t));return n}}}function D4e(i){if(xde(i)){let t=D4e(i.left),r=D4e(i.right);return e=>t(e)||r(e)}if(vde(i)){let t=D4e(i.left),r=D4e(i.right);return e=>t(e)&&r(e)}if(Ide(i)){let t=D4e(i.value);return e=>!t(e)}if(Pde(i)){let t=i.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(fde(i)){let e=!!i.true;return()=>e}A0e()}function I4e(r,i){if(1===i.elements.length)return A4e(r,i.elements[0]);{let e=[];for(var n of i.elements){var a={ALT:A4e(r,n,!0)};(n=P4e(n))&&(a.GATE=D4e(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 M4e(s,e){if(1===e.elements.length)return A4e(s,e.elements[0]);let t=[];for(var r of e.elements){var i={ALT:A4e(s,r,!0)};(r=P4e(r))&&(i.GATE=D4e(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"<typeof(e=i.unorderedGroups.get(e))?.[r]&&(e[r]=!0))},t.GATE);return n?e.GATE=()=>n(a):e.GATE=()=>!i.unorderedGroups.get(l(o,i))?.[r],e})),"alternatives"),a=F4e(s,P4e(e),n,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function O4e(t,e){let r=e.elements.map(e=>A4e(t,e));return t=>r.forEach(e=>e(t))}function P4e(e){if(Cde(e))return e.guardCondition}function $4e(n,a,s=a.terminal){if(s){if(qde(s)&&$de(s.rule.ref)){let t=s.rule.ref,r=n.subrule++,i;return e=>{i=i??z4e(n,t),n.parser.subrule(r,i,!1,a,e)}}if(qde(s)&&Vde(s.rule.ref)){let e=n.consume++,t=U4e(n,s.rule.ref.name);return()=>n.parser.consume(e,t,a)}if(Lde(s)){let e=n.consume++,t=U4e(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=Sge(a.type.ref)?.terminal)return $4e(n,a,s);throw new Error("Could not find name assignment for type: "+Pge(a.type.ref))}function B4e(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 F4e(i,e,n,t){let a=e&&D4e(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:H2e(),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:H2e(),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})}A0e()}function z4e(e,t){if(t=q4e(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function q4e(i,n){if(ode(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let e=n,t=e.$container,r=n.$type;for(;!$de(t);)(Cde(t)||ude(t)||Jde(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,i.ruleNames.set(n,r),r}}function U4e(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}var G4e=x(()=>{sve(),i0e(),N0e(),Uue(),Kge(),mt(S4e,"createParser"),mt(E4e,"buildRules"),mt(_4e,"buildInfixRule"),mt(A4e,"buildElement"),mt(R4e,"buildAction"),mt(L4e,"buildRuleCall"),mt(N4e,"buildRuleCallPredicate"),mt(D4e,"buildPredicate"),mt(I4e,"buildAlternatives"),mt(M4e,"buildUnorderedGroup"),mt(O4e,"buildGroup"),mt(P4e,"getGuardCondition"),mt($4e,"buildCrossReference"),mt(B4e,"buildKeyword"),mt(F4e,"wrap"),mt(z4e,"getRule"),mt(q4e,"getRuleName"),mt(U4e,"getToken")});function j4e(e){var t=e.Grammar,r=e.parser.Lexer;return S4e(t,e=new x4e(e),r.definition),e.finalize(),e}var W4e=x(()=>{C4e(),G4e(),mt(j4e,"createCompletionParser")});function Y4e(e){return(e=V4e(e)).finalize(),e}function V4e(e){var t=e.Grammar,r=e.parser.Lexer;return S4e(t,new y4e(e),r.definition)}var H4e,X4e,K4e,Z4e=x(()=>{C4e(),G4e(),mt(Y4e,"createLangiumParser"),mt(V4e,"prepareLangiumParser")}),Q4e=x(()=>{sve(),i0e(),nde(),Kge(),cge(),Uue(),H4e=class{static{mt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){var e=Pue(pge(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(Vde).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=zge(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=ege(t)?ume.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(ode).flatMap(e=>Zue(e).filter(Lde)).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(tge(e.value),"i"):e.value}findLongerAlt(i,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&rge("^"+r.source+"$",i.value)&&e.push(t),e},[])}}}),J4e=x(()=>{function e(t){let r="";for(let e=1;e<t.length-1;e++){var i,n=t.charAt(e);"\\"===n?(i=t.charAt(++e),r+=a(i)):r+=n}return r}function a(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return`
|
||
`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function t(e){return"^"===e.charAt(0)?e.substring(1):e}function r(e){return parseInt(e)}function i(e){return BigInt(e)}function n(e){return new Date(e)}function s(e){return Number(e)}function o(e){return"true"===e.toLowerCase()}var l;i0e(),Kge(),X4e=class{static{mt(this,"DefaultValueConverter")}convert(e,t){var r=t.grammarSource;if(qde(r=bde(r)?mge(r):r)){if(r=r.rule.ref)return this.runConverter(r,e,t);throw new Error("This cst node was not parsed by a rule.")}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return K4e.convertInt(t);case"STRING":return K4e.convertString(t);case"ID":return K4e.convertID(t)}switch(Fge(e)?.toLowerCase()){case"number":return K4e.convertNumber(t);case"boolean":return K4e.convertBoolean(t);case"bigint":return K4e.convertBigint(t);case"date":return K4e.convertDate(t);default:return t}}},l=K4e=K4e||{},mt(e,"convertString"),l.convertString=e,mt(a,"convertEscapeCharacter"),mt(t,"convertID"),l.convertID=t,mt(r,"convertInt"),l.convertInt=r,mt(i,"convertBigint"),l.convertBigint=i,mt(n,"convertDate"),l.convertDate=n,mt(s,"convertNumber"),l.convertNumber=s,mt(o,"convertBoolean"),l.convertBoolean=o}),e5e=oqe(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}),t5e=oqe(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}),r5e=oqe(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=e5e();{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<t;e++)if(this._callbacks[e]===i){if(this._contexts[e]===n)return this._callbacks.splice(e,1),void this._contexts.splice(e,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var i=[],n=this._callbacks.slice(0),a=this._contexts.slice(0);for(let e=0,t=n.length;e<t;e++)try{i.push(n[e].apply(a[e],r))}catch(e){(0,s.default)().console.error(e)}return i}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{mt(this,"Emitter")}constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{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(){}}),i5e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,i=e5e(),n=t5e(),a=r5e();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}),n5e={},a5e=x(()=>{U(n5e,G(i5e(),1))});function s5e(){return new Promise(e=>{"u"<typeof setImmediate?setTimeout(e,0):setImmediate(e)})}function o5e(){return u5e=performance.now(),new n5e.CancellationTokenSource}function l5e(e){d5e=e}function c5e(e){return e===p5e}async function h5e(e){if(e!==n5e.CancellationToken.None){var t=performance.now();if(d5e<=t-u5e&&(u5e=t,await s5e(),u5e=performance.now()),e.isCancellationRequested)throw p5e}}var u5e,d5e,p5e,g5e,f5e=x(()=>{a5e(),mt(s5e,"delayNextTick"),u5e=0,d5e=10,mt(o5e,"startCancelableOperation"),mt(l5e,"setInterruptionPeriod"),p5e=Symbol("OperationCancelled"),mt(c5e,"isOperationCancelled"),mt(h5e,"interruptAndCheck"),g5e=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 m5e(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);m5e(s,n),m5e(o,n);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)n(s[e],o[t])<=0?i[r++]=s[e++]:i[r++]=o[t++];for(;e<s.length;)i[r++]=s[e++];for(;t<o.length;)i[r++]=o[t++]}return i}function y5e(t,e,r=0){var i=e?[r]:[];for(let e=0;e<t.length;e++){var n=t.charCodeAt(e);v5e(n)&&(13===n&&e+1<t.length&&10===t.charCodeAt(e+1)&&e++,i.push(r+e+1))}return i}function v5e(e){return 13===e||10===e}function b5e(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function x5e(e){var t=b5e(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var w5e,T5e,k5e,C5e,S5e,E5e,_5e,A5e,R5e,L5e,N5e,D5e,I5e=x(()=>{function e(e,t,r,i){return new w5e(e,t,r,i)}function t(e,t,r){if(e instanceof w5e)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=m5e(t.map(x5e),(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(o<n)throw new Error("Overlapping edit");o>n&&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;w5e=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=b5e(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=y5e(a.text,!1,o);if(e-r===n.length)for(let e=0,t=n.length;e<t;e++)i[e+r+1]=n[e];else n.length<1e4?i.splice(r+1,e-r,...n):this._lineOffsets=i=i.slice(0,r+1).concat(n,i.slice(e+1));var c=a.text.length-(l-o);if(0!=c)for(let e=r+1+n.length,t=i.length;e<t;e++)i[e]=i[e]+c}else{if(!n.isFull(a))throw new Error("Unknown change event received");this._content=a.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=y5e(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(0===i)return{line:0,character:e};for(;r<i;){var n=Math.floor((r+i)/2);t[n]>e?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<r.length?r[e.line+1]:this._content.length,e=Math.min(t+e.character,r),this.ensureBeforeEOL(e,t)))}ensureBeforeEOL(e,t){for(;t<e&&v5e(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}},i=T5e=T5e||{},mt(e,"create"),i.create=e,mt(t,"update"),i.update=t,mt(r,"applyEdits"),i.applyEdits=r,mt(m5e,"mergeSort"),mt(y5e,"computeLineOffsets"),mt(v5e,"isEOL"),mt(b5e,"getWellformedRange"),mt(x5e,"getWellformedEdit")}),M5e=x(()=>{{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<e.length)r=e.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(a!==o-1&&1!==s)if(a!==o-1&&2===s){if(i.length<2||2!==n||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(2<i.length){var l=i.lastIndexOf("/");if(l!==i.length-1){n=-1===l?(i="",0):(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=o,s=0;continue}}else if(2===i.length||1===i.length){i="",a=o,s=n=0;continue}t&&(0<i.length?i+="/..":i="..",n=2)}else 0<i.length?i+="/"+e.slice(a+1,o):i=e.slice(a+1,o),n=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return i}mt(d,"e"),mt(a,"r");var p={resolve:mt(function(){for(var e,t="",r=!1,i=arguments.length-1;-1<=i&&!r;i--){var n=0<=i?arguments[i]:e=void 0===e?process.cwd():e;d(n),0!==n.length&&(t=n+"/"+t,r=47===n.charCodeAt(0))}return t=a(t,!r),r?0<t.length?"/"+t:"/":0<t.length?t:"."},"resolve"),normalize:mt(function(e){var t,r;return d(e),0===e.length?".":(t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1),0<(e=0!==(e=a(e,!t)).length||t?e:".").length&&r&&(e+="/"),t?"/"+e:e)},"normalize"),isAbsolute:mt(function(e){return d(e),0<e.length&&47===e.charCodeAt(0)},"isAbsolute"),join:mt(function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];d(r),0<r.length&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":p.normalize(e)},"join"),relative:mt(function(e,t){if(d(e),d(t),e===t||(e=p.resolve(e))===(t=p.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var i=e.length,n=i-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var s=t.length-a,o=n<s?n:s,l=-1,c=0;c<=o;++c){if(c===o){if(o<s){if(47===t.charCodeAt(a+c))return t.slice(a+c+1);if(0===c)return t.slice(a+c)}else o<n&&(47===e.charCodeAt(r+c)?l=c:0===c&&(l=0));break}var h=e.charCodeAt(r+c);if(h!==t.charCodeAt(a+c))break;47===h&&(l=c)}for(var u="",c=r+l+1;c<=i;++c)c!==i&&47!==e.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return 0<u.length?u+t.slice(a+l):(47===t.charCodeAt(a+=l)&&++a,t.slice(a))},"relative"),_makeLong:mt(function(e){return e},"_makeLong"),dirname:mt(function(e){if(d(e),0===e.length)return".";for(var t=47===e.charCodeAt(0),r=-1,i=!0,n=e.length-1;1<=n;--n)if(47===e.charCodeAt(n)){if(!i){r=n;break}}else i=!1;return-1===r?t?"/":".":t&&1===r?"//":e.slice(0,r)},"dirname"),basename:mt(function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');d(e);var r=0,i=-1,n=!0;if(void 0!==t&&0<t.length&&t.length<=e.length){if(t.length===e.length&&t===e)return"";for(var a=t.length-1,s=-1,o=e.length-1;0<=o;--o){var l=e.charCodeAt(o);if(47===l){if(!n){r=o+1;break}}else-1===s&&(n=!1,s=o+1),0<=a&&(l===t.charCodeAt(a)?-1==--a&&(i=o):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(o=e.length-1;0<=o;--o)if(47===e.charCodeAt(o)){if(!n){r=o+1;break}}else-1===i&&(n=!1,i=o+1);return-1===i?"":e.slice(r,i)},"basename"),extname:mt(function(e){d(e);for(var t=-1,r=0,i=-1,n=!0,a=0,s=e.length-1;0<=s;--s){var o=e.charCodeAt(s);if(47!==o)-1===i&&(n=!1,i=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){r=s+1;break}}return-1===t||-1===i||0===a||1===a&&t===i-1&&t===r+1?"":e.slice(t,i)},"extname"),format:mt(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r;var t,r},"format"),parse:mt(function(e){d(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0!==e.length){for(var r,i=47===e.charCodeAt(0),n=i?(t.root="/",1):0,a=-1,s=0,o=-1,l=!0,c=e.length-1,h=0;n<=c;--c)if(47!==(r=e.charCodeAt(c)))-1===o&&(l=!1,o=c+1),46===r?-1===a?a=c:1!==h&&(h=1):-1!==a&&(h=-1);else if(!l){s=c+1;break}-1===a||-1===o||0===h||1===h&&a===o-1&&a===s+1?-1!==o&&(t.base=t.name=0===s&&i?e.slice(1,o):e.slice(s,o)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,o)):(t.name=e.slice(s,a),t.base=e.slice(s,o)),t.ext=e.slice(a,o)),0<s?t.dir=e.slice(0,s-1):i&&(t.dir="/")}return t},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,e.exports=p}},g={};function f(e){var t=g[e];return void 0===t&&(t=g[e]={exports:{}},p[e](t,t.exports,f)),t.exports}mt(f,"r"),f.d=(e,t)=>{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 C(t,r,i,n,a)}static parse(e,t=!1){return(e=s.exec(e))?new C(e[2]||"",T(e[4]||""),T(e[5]||""),T(e[7]||""),T(e[9]||""),t):new C("","","","","")}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 C("file",t,e,"","")}static from(e){return m(e=new C(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 C(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=i?1:void 0;class C 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;e<t.length;e++){var s=t.charCodeAt(e);97<=s&&s<=122||65<=s&&s<=90||48<=s&&s<=57||45===s||46===s||95===s||126===s||r&&47===s||i&&91===s||i&&93===s||i&&58===s?(-1!==a&&(n+=encodeURIComponent(t.substring(a,e)),a=-1),void 0!==n&&(n+=t.charAt(e))):(void 0===n&&(n=t.substr(0,e)),void 0!==(s=l[s])?(-1!==a&&(n+=encodeURIComponent(t.substring(a,e)),a=-1),n+=s):-1===a&&(a=e))}return-1!==a&&(n+=encodeURIComponent(t.substring(a))),void 0!==n?n:t}function v(t){let r;for(let e=0;e<t.length;e++){var i=t.charCodeAt(e);35===i||63===i?(void 0===r&&(r=t.substr(0,e)),r+=l[i]):void 0!==r&&(r+=t[e])}return void 0!==r?r:t}function b(e,t){let r;return r=e.authority&&1<e.path.length&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(65<=e.path.charCodeAt(1)&&e.path.charCodeAt(1)<=90||97<=e.path.charCodeAt(1)&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r=i?r.replace(/\//g,"\\"):r}function x(t,e){let r=e?v:y,i="",{scheme:n,authority:a,path:s,query:o,fragment:l}=t;if(n&&(i=i+n+":"),!a&&"file"!==n||(i+="//"),a){let e=a.indexOf("@");-1!==e&&(t=a.substr(0,e),a=a.substr(e+1),-1===(e=t.lastIndexOf(":"))?i+=r(t,!1,!1):i=(i=i+r(t.substr(0,e),!1,!1)+":")+r(t.substr(e+1),!1,!0),i+="@"),a=a.toLowerCase(),-1===(e=a.lastIndexOf(":"))?i+=r(a,!1,!0):i=(i+=r(a.substr(0,e),!1,!0))+a.substr(e)}return s&&(3<=s.length&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)?65<=(t=s.charCodeAt(1))&&t<=90&&(s=`/${String.fromCharCode(t+32)}:`+s.substr(3)):2<=s.length&&58===s.charCodeAt(1)&&65<=(t=s.charCodeAt(0))&&t<=90&&(s=String.fromCharCode(t+32)+":"+s.substr(2)),i+=r(s,!0,!1)),o&&(i=(i+="?")+r(o,!1,!1)),i=l?(i+="#")+(e?l:y(l,!1,!1)):i}function w(e){try{return decodeURIComponent(e)}catch{return 3<e.length?e.substr(0,3)+w(e.substr(3)):e}}mt(y,"m"),mt(v,"y"),mt(b,"v"),mt(x,"b"),mt(w,"C");let t=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(t)?e.replace(t,e=>w(e)):e}mt(T,"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)},k5e=e}({URI:C5e,Utils:S5e}=k5e)}),O5e=x(()=>{M5e();{var e=E5e=E5e||{};e.basename=S5e.basename,e.dirname=S5e.dirname,e.extname=S5e.extname,e.joinPath=S5e.joinPath,e.resolvePath=S5e.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?C5e.parse(e):e).path,t=("string"==typeof t?C5e.parse(t):t).path,r=e.split("/").filter(e=>0<e.length),i=t.split("/").filter(e=>0<e.length);if(a&&(e=/^[A-Z]:$/,r[0]&&e.test(r[0])&&(r[0]=r[0].toLowerCase()),i[0]&&e.test(i[0])&&(i[0]=i[0].toLowerCase()),r[0]!==i[0]))return t.substring(1);let n=0;for(;n<r.length&&r[n]===i[n];n++);return"../".repeat(r.length-n)+i.slice(n).join("/")}function i(e){return C5e.parse(e.toString()).toString()}function n(e,t){let r="string"==typeof e?e:e.path,i="string"==typeof t?t:t.path;return"/"===i.charAt(i.length-1)&&(i=i.slice(0,-1)),"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),i===r||!(i.length<r.length||"/"!==i.charAt(r.length))&&i.startsWith(r)}mt(t,"equals"),e.equals=t,mt(r,"relative"),e.relative=r,mt(i,"normalize"),e.normalize=i,mt(n,"contains"),e.contains=n}_5e=class{static{mt(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return E5e.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){(e=this.getNode(this.normalizeUri(e),!1))?.parent&&e.parent.children.delete(e.name)}has(e){return void 0!==this.getNode(this.normalizeUri(e),!1)?.element}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){var e=this.normalizeUri(e),t=this.getNode(e,!1);if(t)return{name:t.name,uri:E5e.joinPath(C5e.parse(e),t.name).toString(),element:t.element}}findChildren(e){let t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(e=>({name:e.name,uri:E5e.joinPath(C5e.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){return(e=this.getNode(E5e.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}}}),P5e=x(()=>{var e;I5e(),P5e(),a5e(),Uue(),O5e(),(e=A5e=A5e||{})[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",R5e=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=n5e.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??C5e.parse(e.uri),n5e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return n5e.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:A5e.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,i);n={parseResult:t,uri:r,state:A5e.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=A5e.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??T5e.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},L5e=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 Pue(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,A5e.Changed),e}deleteDocument(e){var e=e.toString(),t=this.documentTrie.find(e);return t&&(t.state=A5e.Changed,this.documentTrie.delete(e)),t}deleteDocuments(e){var t,e=e.toString(),r=this.documentTrie.findAll(e);for(t of r)t.state=A5e.Changed;return this.documentTrie.delete(e),r}}}),$5e=x(()=>{a5e(),Iue(),nde(),f5e(),P5e(),N5e=Symbol("RefResolving"),D5e=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=n5e.CancellationToken.None){if(this.profiler?.isActive("linking")){let i=this.profiler.createTask("linking",this.languageId);i.start();try{for(let r of Que(n.parseResult.value))await h5e(e),ede(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 Que(n.parseResult.value))await h5e(e),ede(t).forEach(e=>this.doLink(e,n))}doLink(e,t){var r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=N5e;try{var i=this.getCandidate(e);Aue(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=N5e;try{var a=this.getCandidates(e),s=[];if(Aue(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<t.length?t:this.createLinkingError(e)}buildReference(r,i,e,n){let a=this,s={$refNode:e,$refText:n,_ref:void 0,get ref(){if(Cue(this._ref))return this._ref;if(_ue(this._nodeDescription)){var e=a.loadAstNode(this._nodeDescription);this._ref=e??a.createLinkingError({reference:s,container:r,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=N5e;var e=Hue(r).$document,t=a.getLinkedNode({reference:s,container:r,property:i});if(t.error&&e&&e.state<A5e.ComputedScopes)return this._ref=void 0;this._ref=t.node??t.error,this._nodeDescription=t.descr,e?.references.push(this)}else this._ref===N5e&&a.throwCyclicReferenceError(r,i,n);return Cue(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Aue(this._ref)?this._ref:void 0}};return s}buildMultiReference(a,s,e,o){let l=this,c={$refNode:e,$refText:o,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=N5e;var e=Hue(a).$document,t=l.getCandidates({reference:c,container:a,property:s}),r=[];if(Aue(t))this._linkingError=t;else for(var i of t){var n=l.loadAstNode(i);n&&r.push({ref:n,$nodeDescription:i})}this._items=r,e?.references.push(this)}else this._items===N5e&&l.throwCyclicReferenceError(a,s,o);return Array.isArray(this._items)?this._items:[]},get error(){return this._linkingError||(0<this.items.length?void 0:this._linkingError=l.createLinkingError({reference:c,container:a,property:s}))}};return c}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{var t=this.getCandidate(e);return Aue(t)?{error:t}:(r=this.loadAstNode(t))?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);var r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': `+r}}}}loadAstNode(e){var t;return e.node||((t=this.langiumDocuments().getDocument(e.documentUri))?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0)}createLinkingError(e,t){var r=Hue(e.container).$document;return r&&r.state<A5e.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}}});function B5e(e){return"string"==typeof e.name}var F5e,z5e,q5e,U5e,G5e,j5e,W5e,Y5e,V5e,H5e,X5e,K5e,Z5e,Q5e,J5e,e3e=x(()=>{Kge(),mt(B5e,"isNamed"),F5e=class{static{mt(this,"DefaultNameProvider")}getName(e){if(B5e(e))return e.name}getNameNode(e){return bge(e.$cstNode,"name")}}}),t3e=x(()=>{Kge(),Iue(),nde(),_0e(),Uue(),O5e(),i0e(),z5e=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=Que(e.Grammar).some(e=>bde(e)&&e.isMulti)}findDeclarations(e){if(e){var t=Cge(e),r=e.astNode;if(t&&r){if(Sue(t=r[t.feature])||Eue(t))return Xue(t);if(Array.isArray(t))for(var i of t)if((Sue(i)||Eue(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return Xue(i)}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||l0e(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 ede(e))if(Eue(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=>E5e.equals(e.sourceUri,t.documentUri))),r.push(...i),Pue(r)}getSelfReferences(e){var t,r=[];for(t of this.getSelfNodes(e)){var i,n,a=this.nameProvider.getNameNode(t);a&&(i=Vue(t),n=this.nodeLocator.getAstNodePath(t),r.push({sourceUri:i.uri,sourcePath:n,targetUri:i.uri,targetPath:n,segment:h0e(a),local:!0}))}return r}}}),r3e=x(()=>{Uue(),q5e=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 que.sum(Pue(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))?Pue(e):Bue}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 Pue(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return Pue(this.map.keys())}values(){return Pue(this.map.values()).flat()}entriesGroupedByKey(){return Pue(this.map.entries())}},U5e=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)}}}),i3e=x(()=>{nde(),a5e(),r3e(),f5e(),G5e=class{static{mt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=n5e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=Kue,i=n5e.CancellationToken.None){var n,a=[];this.addExportedSymbol(e,a,t);for(n of r(e))await h5e(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=n5e.CancellationToken.None){var r,i=e.parseResult.value,n=new q5e;for(r of Zue(i))await h5e(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))}}}),n3e=x(()=>{r3e(),Uue(),j5e=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}},W5e=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<t.length)&&this.outerScope?Pue(t).concat(this.outerScope.getElements(e)):Pue(t)}getAllElements(){let e=Pue(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},Y5e=class{static{mt(this,"MultiMapScope")}constructor(e,t,r){this.elements=new q5e,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.add(n,i)}this.outerScope=t}getElement(e){var t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)[0]||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){var t=this.caseInsensitive?e.toLowerCase():e,t=this.elements.get(t);return(this.concatOuterScope||0===t.length)&&this.outerScope?Pue(t).concat(this.outerScope.getElements(e)):Pue(t)}getAllElements(){let e=Pue(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},V5e={getElement(){},getElements(){return Bue},getAllElements(){return Bue}}}),a3e=x(()=>{H5e=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")}},X5e=class extends H5e{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()}},K5e=class extends H5e{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}},Z5e=class extends K5e{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)}))}},Q5e=class extends X5e{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<t.length&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),s3e=x(()=>{n3e(),nde(),Uue(),a3e(),J5e=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 Q5e(e.shared)}getScope(t){let r=[],i=this.reflection.getReferenceType(t),n=Vue(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 j5e(Pue(e),t,r)}createScopeForNodes(e,t,r){return e=Pue(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new j5e(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Y5e(this.indexManager.allElements(e)))}}});function o3e(e){return"string"==typeof e.$comment}function l3e(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}var c3e,h3e,u3e=x(()=>{M5e(),Iue(),nde(),Kge(),mt(o3e,"isAstNodeWithComment"),mt(l3e,"isIntermediateReference"),c3e=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=Vue(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(Sue(r)){var o=r.ref,l=e?r.$refText:void 0;if(o){let e=Vue(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(Eue(r)){var c,o=e?r.$refText:void 0,h=[];for(c of r.items){let e=c.ref,t=Vue(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(Cue(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=vge(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<o.length;e++){var l=o[e];l3e(l)?o[e]=this.reviveReference(t,s,r,l,i):Cue(l)&&this.linkNode(l,r,i,t,s,e)}else l3e(o)?t[s]=this.reviveReference(t,s,r,o,i):Cue(o)&&this.linkNode(o,r,i,t,s);var c=t;c.$container=e,c.$containerProperty=n,c.$containerIndex=a}reviveReference(e,t,r,i,n){let a=i.$refText,s=i.$error,o;if(i.$ref){var l=this.getRefNode(r,i.$ref,n.uriConverter);if(Cue(l))return{$refText:(a=a||this.nameProvider.getName(l))??"",ref:l};s=l}else if(i.$refs){var c,h=[];for(c of i.$refs){var u=this.getRefNode(r,c,n.uriConverter);Cue(u)&&h.push({ref:u})}if(0!==h.length)return{$refText:a??"",items:h};o={$refText:a??"",items:h},s=s??"Could not resolve multi-reference"}if(s)return(o=o??{$refText:a??"",ref:void 0}).error={info:{container:e,property:t,reference:o},message:s},o}getRefNode(e,t,r){try{var i,n,a,s,o=t.indexOf("#");return 0===o?this.astNodeLocator.getAstNode(e,t.substring(1))||"Could not resolve path: "+t:o<0?(i=r?r(t):C5e.parse(t),(n=this.langiumDocuments.getDocument(i))?n.parseResult.value:"Could not find document for URI: "+t):(a=r?r(t.substring(0,o)):C5e.parse(t.substring(0,o)),(s=this.langiumDocuments.getDocument(a))?o===t.length-1?s.parseResult.value:this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(o+1))||"Could not resolve URI: "+t:"Could not find document for URI: "+t)}catch(e){return String(e)}}}}),d3e=x(()=>{O5e(),h3e=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=E5e.extname(e),e=E5e.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 p3e(e){return{code:e}}var g3e,f3e,m3e=x(()=>{var e;l6e(),r3e(),f5e(),Uue(),mt(p3e,"diagnosticData"),(e=g3e=g3e||{}).defaults=["fast","slow","built-in"],e.all=e.defaults,f3e=class{static{mt(this,"ValidationRegistry")}constructor(e){this.entries=new q5e,this.knownCategories=new Set(g3e.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)):A0e()}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(c5e(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=Pue(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 y3e(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=bge(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Tge(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 v3e(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 b3e(e){switch(e){case"error":return p3e(T3e.LexingError);case"warning":return p3e(T3e.LexingWarning);case"info":return p3e(T3e.LexingInfo);case"hint":return p3e(T3e.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var x3e,w3e,T3e,k3e,C3e,S3e,E3e,_3e,A3e,R3e,L3e,N3e,D3e=x(()=>{var e;a5e(),Kge(),nde(),_0e(),f5e(),m3e(),x3e=Object.freeze({validateNode:!0,validateChildren:!0}),w3e=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=n5e.CancellationToken.None){var i=e.parseResult,n=[];if(await h5e(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(i,n,t),!(t.stopAfterLexingErrors&&n.some(e=>e.data?.code===T3e.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(e=>e.data?.code===T3e.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(e=>e.data?.code===T3e.LinkingError))))){try{n.push(...await this.validateAst(i.value,t,r))}catch(e){if(c5e(e))throw e;console.error("An error occurred during validation:",e)}await h5e(r)}return n}processLexingErrors(e,t,r){var i;for(i of[...e.lexerErrors,...e.lexerReport?.diagnostics??[]]){var n={severity:v3e(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:b3e(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=c0e(i.token),e&&(a={severity:v3e("error"),range:e,message:i.message,data:p3e(T3e.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:T3e.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=n5e.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=n5e.CancellationToken.None){var n;for(n of this.validationRegistry.checksBefore)await h5e(i),await n(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=n5e.CancellationToken.None){if(this.profiler?.isActive("validating")){var n=this.profiler.createTask("validating",this.languageId);n.start();try{var a,s=Que(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=Que(e).iterator();for(c of h){await h5e(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 x3e}async validateAstAfter(e,t,r,i=n5e.CancellationToken.None){var n;for(n of this.validationRegistry.checksAfter)await h5e(i),await n(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:y3e(r),severity:v3e(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(y3e,"getDiagnosticRange"),mt(v3e,"toDiagnosticSeverity"),mt(b3e,"toDiagnosticData"),(e=T3e=T3e||{}).LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}),I3e=x(()=>{a5e(),Iue(),nde(),_0e(),f5e(),O5e(),k3e=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){var r=r??Vue(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??h0e(this.nameProvider.getNameNode(e)??e.$cstNode),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:h0e(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},C3e=class{static{mt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=n5e.CancellationToken.None){let r=[],i=e.parseResult.value;for(var n of Que(i))await h5e(t),ede(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=[];Sue(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Eue(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));var i,n=Vue(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=h0e(t.$refNode);for(i of r)s.push({sourceUri:n,sourcePath:a,targetUri:i.documentUri,targetPath:i.path,segment:o,local:E5e.equals(i.documentUri,n)});return s}}}),M3e=x(()=>{S3e=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)}}}),O3e={},P3e=x(()=>{U(O3e,G(r5e(),1))}),$3e=x(()=>{P3e(),f5e(),E3e=class{static{mt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new g5e,this.onConfigurationSectionUpdateEmitter=new O3e.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}}}),B3e=oqe(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=t5e(),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}),F3e=oqe(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}),z3e=oqe(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}),q3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var r,t=i5e(),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}),U3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=e5e(),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}),G3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var l=e5e(),t=t5e(),r=r5e(),i=U3e();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}),j3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=e5e(),r=t5e(),i=U3e(),n=r5e();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}),W3e=oqe(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(;t<this._chunks.length;){var a=this._chunks[t];for(r=0;r<a.length;){switch(a[r]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,r++;break e;default:e=0}break;default:e=0}r++}i+=a.byteLength,t++}if(4===e){var s=this._read(i+r),o=new Map,l=this.toString(s,"ascii").split(`\r
|
||
`);if(!(l.length<2))for(let e=0;e<l.length-2;e++){var c=(u=l[e]).indexOf(":");if(-1===c)throw new Error(`Message header must separate key and value using ':'
|
||
`+u);var h=u.substr(0,c),u=u.substr(c+1).trim();o.set(n?h.toLowerCase():h,u)}return o}}}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._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(;0<e;){var a,s=this._chunks[0];s.byteLength>e?(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}),Y3e=oqe(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=e5e(),me=t5e(),ye=B3e(),ve=F3e(),be=r5e(),xe=i5e();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 we,Te,t,ke,r,Ce,Se,Ee,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=we={},mt(n,"is"),i.is=n,ue.NullLogger=Object.freeze({error:mt(()=>{},"error"),warn:mt(()=>{},"warn"),info:mt(()=>{},"info"),log:mt(()=>{},"log")}),(i=Te||(ue.Trace=Te={}))[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=Te||(ue.Trace=Te={}),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,(Ce||(ue.SetTraceNotification=Ce={})).type=new ye.NotificationType("$/setTrace"),(Se||(ue.LogTraceNotification=Se={})).type=new ye.NotificationType("$/logTrace"),(i=Ee||(ue.ConnectionErrors=Ee={}))[i.Closed=1]="Closed",i[i.Disposed=2]="Disposed",i[i.AlreadyListening=3]="AlreadyListening";var l,_e,c,h,u,Ae,Re,Le,Ne=class w extends Error{static{mt(this,"ConnectionError")}constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,w.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 _e.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=Te.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 w(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(w(t.id),t):ye.Message.isResponse(t)?e.set(j(t.id),t):e.set(W(),t)}function V(e){}function T(){return n===Le.Listening}function k(){return n===Le.Closed}function C(){return n===Le.Disposed}function S(){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 E(){e||0===l.size||(e=(0,fe.default)().timer.setImmediate(()=>{e=void 0,K()}))}function _(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,_):_(e)}finally{E()}}}mt(w,"createRequestQueueKey"),mt(j,"createResponseQueueKey"),mt(W,"createNotificationQueueKey"),mt(Y,"addMessageToQueue"),mt(V,"cancelUndispatched"),mt(T,"isListening"),mt(k,"isClosed"),mt(C,"isDisposed"),mt(S,"closeHandler"),mt(H,"readErrorHandler"),mt(X,"writeErrorHandler"),r.onClose(S),r.onError(H),p.onClose(S),p.onError(X),mt(E,"triggerMessageQueue"),mt(_,"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=w(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{E()}},"callback");function Q(s){if(!C()){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=_e.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(!C())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(!C()){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 Te.Verbose:return JSON.stringify(e,null,4);case Te.Compact:return JSON.stringify(e);default:return}}function re(t){if(c!==Te.Off&&b)if(h===ke.Text){let e;c!==Te.Verbose&&c!==Te.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!==Te.Off&&b)if(h===ke.Text){let e;c!==Te.Verbose&&c!==Te.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!==Te.Off&&b)if(h===ke.Text){let e;c!==Te.Verbose&&c!==Te.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!==Te.Off&&b)if(h===ke.Text){let e;c!==Te.Verbose&&c!==Te.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!==Te.Off&&b&&t.method!==Se.type.method)if(h===ke.Text){let e;c!==Te.Verbose&&c!==Te.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!==Te.Off&&b)if(h===ke.Text){let e,t;c!==Te.Verbose&&c!==Te.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!==Te.Off&&(e={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()},b.log(e))}function D(){if(k())throw new Ne(Ee.Closed,"Connection is closed.");if(C())throw new Ne(Ee.Disposed,"Connection is disposed.")}function se(){if(T())throw new Ne(Ee.AlreadyListening,"Connection is already listening")}function oe(){if(!T())throw new Error("Call listen() first.")}function I(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):[I(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[I(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<t.length&&e<i;e++)r.push(I(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)r.push(null)}return r}mt(Q,"handleRequest"),mt(J,"handleResponse"),mt(ee,"handleNotification"),mt(te,"handleInvalidMessage"),mt(A,"stringifyTrace"),mt(re,"traceSendingRequest"),mt(ie,"traceSendingNotification"),mt(R,"traceSendingResponse"),mt(ne,"traceReceivedRequest"),mt(L,"traceReceivedNotification"),mt(ae,"traceReceivedResponse"),mt(N,"logLSPMessage"),mt(D,"throwIfClosedOrDisposed"),mt(se,"throwIfListening"),mt(oe,"throwIfNotListening"),mt(I,"undefinedToNull"),mt(le,"nullToUndefined"),mt(ce,"isNamedParam"),mt(M,"computeSingleParam"),mt(he,"computeMessageParams");let O={sendNotification:mt((i,...n)=>{D();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=>I(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)=>{D();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)=>{D(),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=>I(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)=>{D();let r=null;return we.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<m.size,"hasPendingResponse"),trace:mt(async(e,t,r)=>{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===Te.Off?void 0:t,!i||k()||C()||await O.sendNotification(Ce.type,{value:Te.toString(e)})},"trace"),onError:t.event,onClose:z.event,onUnhandledNotification:q.event,onDispose:G.event,end:mt(()=>{p.end()},"end"),dispose:mt(()=>{if(!C()){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(()=>{D(),se(),n=Le.Listening,r.listen(Z)},"listen"),inspect:mt(()=>{(0,fe.default)().console.log("inspect")},"inspect")};return O.onNotification(Se.type,e=>{var t;c!==Te.Off&&b&&(t=c===Te.Verbose||c===Te.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=_e||(ue.IdCancellationReceiverStrategy=_e={}),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}),V3e=oqe(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=B3e(),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")}),F3e()),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")}),z3e()),n=(Object.defineProperty(e,"Disposable",{enumerable:!0,get:mt(function(){return i.Disposable},"get")}),r5e()),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")}),i5e()),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")}),q3e()),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")}),G3e()),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")}),j3e()),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")}),W3e()),h=(Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:mt(function(){return c.AbstractMessageBuffer},"get")}),Y3e()),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")}),e5e());e.RAL=u.default}),H3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t,r=V3e(),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}),X3e=oqe(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,H3e().default.install(),V3e()),t=(t(V3e(),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}),K3e=oqe((e,t)=>{t.exports=X3e()}),Z3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=X3e(),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}),Q3e=oqe(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}),J3e=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=Z3e();(e=e.ImplementationRequest={method:"textDocument/implementation"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),ewe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=Z3e();(e=e.TypeDefinitionRequest={method:"textDocument/typeDefinition"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),twe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r=Z3e();(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)}),rwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=Z3e();(e=e.ConfigurationRequest={method:"workspace/configuration"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}),iwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r=Z3e();(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)}),nwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r=Z3e();(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)}),awe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=Z3e();(e=e.DeclarationRequest={method:"textDocument/declaration"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),swe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=Z3e();(e=e.SelectionRangeRequest={method:"textDocument/selectionRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),owe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r=X3e(),i=Z3e();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)}),lwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r=Z3e();(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)}),cwe=oqe(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=Z3e();(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)}),hwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=Z3e();(e=e.ShowDocumentRequest={method:"window/showDocument"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}),uwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Z3e();(e=e.LinkedEditingRangeRequest={method:"textDocument/linkedEditingRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),dwe=oqe(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=Z3e();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)}),pwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Z3e();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)}),gwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r=Z3e();(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)}),fwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r=Z3e();(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)}),mwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r=Z3e();(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)}),ywe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r=X3e(),i=Q3e(),n=Z3e();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)}),vwe=oqe(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,u4e();var t,i,r,n,a,s=j(Abe),o=Q3e(),l=Z3e();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<t.length;e++)if(!m(t[e],r[e]))return!1}if(o.objectLiteral(t)&&o.objectLiteral(r)){var n=Object.keys(t),e=Object.keys(r);if(n.length!==e.length||(n.sort(),e.sort(),!m(n,e)))return!1;for(let e=0;e<n.length;e++){var a=n[e];if(!m(t[a],r[a]))return!1}}}return!0}function y(e,t,r,i){return{uri:e,notebookType:t,version:r,cells:i}}function v(e){return o.objectLiteral(e)&&o.string(e.uri)&&s.integer.is(e.version)&&o.typedArray(e.cells,r.is)}function b(e){return o.objectLiteral(e)&&s.uinteger.is(e.start)&&s.uinteger.is(e.deleteCount)&&(void 0===e.cells||o.typedArray(e.cells,r.is))}function x(e,t,r){return e={start:e,deleteCount:t},void 0!==r&&(e.cells=r),e}(a=t||(e.NotebookCellKind=t={})).Markup=1,a.Code=2,mt(c,"is"),a.is=c,a=i||(e.ExecutionSummary=i={}),mt(h,"create"),a.create=h,mt(u,"is"),a.is=u,mt(d,"equals"),a.equals=d,a=r||(e.NotebookCell=r={}),mt(p,"create"),a.create=p,mt(g,"is"),a.is=g,mt(f,"diff"),a.diff=f,mt(m,"equalsMetadata"),a=e.NotebookDocument={},mt(y,"create"),a.create=y,mt(v,"is"),a.is=v,(a=n||(e.NotebookDocumentSyncRegistrationType=n={})).method="notebookDocument/sync",a.messageDirection=l.MessageDirection.clientToServer,a.type=new l.RegistrationType(a.method),(a=e.DidOpenNotebookDocumentNotification={method:"notebookDocument/didOpen"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method,a=e.NotebookCellArrayChange={},mt(b,"is"),a.is=b,mt(x,"create"),a.create=x,(a=e.DidChangeNotebookDocumentNotification={method:"notebookDocument/didChange"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method,(a=e.DidSaveNotebookDocumentNotification={method:"notebookDocument/didSave"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method,(a=e.DidCloseNotebookDocumentNotification={method:"notebookDocument/didClose"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method}),bwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=Z3e();(e=e.InlineCompletionRequest={method:"textDocument/inlineCompletion"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),xwe=oqe(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=Z3e(),o=(u4e(),j(Abe)),l=Q3e(),c=J3e(),h=(Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:mt(function(){return c.ImplementationRequest},"get")}),ewe()),u=(Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:mt(function(){return h.TypeDefinitionRequest},"get")}),twe()),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")}),rwe()),p=(Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:mt(function(){return d.ConfigurationRequest},"get")}),iwe()),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")}),nwe()),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")}),awe()),$=(Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:mt(function(){return P.DeclarationRequest},"get")}),swe()),f=(Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:mt(function(){return $.SelectionRangeRequest},"get")}),owe()),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")}),lwe()),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")}),cwe()),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")}),hwe()),F=(Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:mt(function(){return B.ShowDocumentRequest},"get")}),uwe()),v=(Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:mt(function(){return F.LinkedEditingRangeRequest},"get")}),dwe()),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")}),pwe()),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")}),gwe()),w=(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")}),fwe()),T=(Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:mt(function(){return w.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:mt(function(){return w.InlineValueRefreshRequest},"get")}),mwe()),k=(Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:mt(function(){return T.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:mt(function(){return T.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:mt(function(){return T.InlayHintRefreshRequest},"get")}),ywe()),C=(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")}),vwe()),z=(Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:mt(function(){return C.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:mt(function(){return C.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:mt(function(){return C.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:mt(function(){return C.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:mt(function(){return C.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:mt(function(){return C.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidCloseNotebookDocumentNotification},"get")}),bwe());function S(e){return l.string(e)||l.string(e.language)||l.string(e.scheme)||l.string(e.pattern)}function E(e){return l.objectLiteral(e)&&(l.string(e.notebookType)||l.string(e.scheme)||l.string(e.pattern))}function _(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<e.id.length}function L(e){return e&&(null===e.documentSelector||n.is(e.documentSelector))}function N(e){return l.objectLiteral(e)&&(void 0===e.workDoneProgress||l.boolean(e.workDoneProgress))}function D(e){return e&&l.boolean(e.workDoneProgress)}function I(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}function M(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}function O(e){return l.objectLiteral(e)&&(o.URI.is(e.baseUri)||o.WorkspaceFolder.is(e.baseUri))&&l.string(e.pattern)}Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:mt(function(){return z.InlineCompletionRequest},"get")}),a=r||(e.TextDocumentFilter=r={}),mt(S,"is"),a.is=S,a=t||(e.NotebookDocumentFilter=t={}),mt(E,"is"),a.is=E,a=i||(e.NotebookCellTextDocumentFilter=i={}),mt(_,"is"),a.is=_,a=n||(e.DocumentSelector=n={}),mt(A,"is"),a.is=A,(a=e.RegistrationRequest={method:"client/registerCapability"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType(a.method),(a=e.UnregistrationRequest={method:"client/unregisterCapability"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType(a.method),e.ResourceOperationKind={Create:"create",Rename:"rename",Delete:"delete"},e.FailureHandlingKind={Abort:"abort",Transactional:"transactional",TextOnlyTransactional:"textOnlyTransactional",Undo:"undo"},e.PositionEncodingKind={UTF8:"utf-8",UTF16:"utf-16",UTF32:"utf-32"},a=e.StaticRegistrationOptions={},mt(R,"hasId"),a.hasId=R,a=e.TextDocumentRegistrationOptions={},mt(L,"is"),a.is=L,a=e.WorkDoneProgressOptions={},mt(N,"is"),a.is=N,mt(D,"hasWorkDoneProgress"),a.hasWorkDoneProgress=D,(a=e.InitializeRequest={method:"initialize"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(e.InitializeErrorCodes={}).unknownProtocolVersion=1,(a=e.InitializedNotification={method:"initialized"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.ShutdownRequest={method:"shutdown"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType0(a.method),(a=e.ExitNotification={method:"exit"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType0(a.method),(a=e.DidChangeConfigurationNotification={method:"workspace/didChangeConfiguration"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),e.MessageType={Error:1,Warning:2,Info:3,Log:4,Debug:5},(a=e.ShowMessageNotification={method:"window/showMessage"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),(a=e.ShowMessageRequest={method:"window/showMessageRequest"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType(a.method),(a=e.LogMessageNotification={method:"window/logMessage"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),(a=e.TelemetryEventNotification={method:"telemetry/event"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),e.TextDocumentSyncKind={None:0,Full:1,Incremental:2},(a=e.DidOpenTextDocumentNotification={method:"textDocument/didOpen"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),a=e.TextDocumentContentChangeEvent={},mt(I,"isIncremental"),a.isIncremental=I,mt(M,"isFull"),a.isFull=M,(a=e.DidChangeTextDocumentNotification={method:"textDocument/didChange"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.DidCloseTextDocumentNotification={method:"textDocument/didClose"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.DidSaveTextDocumentNotification={method:"textDocument/didSave"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),e.TextDocumentSaveReason={Manual:1,AfterDelay:2,FocusOut:3},(a=e.WillSaveTextDocumentNotification={method:"textDocument/willSave"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.WillSaveTextDocumentWaitUntilRequest={method:"textDocument/willSaveWaitUntil"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DidChangeWatchedFilesNotification={method:"workspace/didChangeWatchedFiles"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),e.FileChangeType={Created:1,Changed:2,Deleted:3},a=e.RelativePattern={},mt(O,"is"),a.is=O,e.WatchKind={Create:1,Change:2,Delete:4},(a=e.PublishDiagnosticsNotification={method:"textDocument/publishDiagnostics"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),e.CompletionTriggerKind={Invoked:1,TriggerCharacter:2,TriggerForIncompleteCompletions:3},(a=e.CompletionRequest={method:"textDocument/completion"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CompletionResolveRequest={method:"completionItem/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.HoverRequest={method:"textDocument/hover"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),e.SignatureHelpTriggerKind={Invoked:1,TriggerCharacter:2,ContentChange:3},(a=e.SignatureHelpRequest={method:"textDocument/signatureHelp"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DefinitionRequest={method:"textDocument/definition"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.ReferencesRequest={method:"textDocument/references"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentHighlightRequest={method:"textDocument/documentHighlight"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentSymbolRequest={method:"textDocument/documentSymbol"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeActionRequest={method:"textDocument/codeAction"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeActionResolveRequest={method:"codeAction/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.WorkspaceSymbolRequest={method:"workspace/symbol"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.WorkspaceSymbolResolveRequest={method:"workspaceSymbol/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeLensRequest={method:"textDocument/codeLens"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeLensResolveRequest={method:"codeLens/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeLensRefreshRequest={method:"workspace/codeLens/refresh"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType0(a.method),(a=e.DocumentLinkRequest={method:"textDocument/documentLink"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentLinkResolveRequest={method:"documentLink/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentFormattingRequest={method:"textDocument/formatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentRangeFormattingRequest={method:"textDocument/rangeFormatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentRangesFormattingRequest={method:"textDocument/rangesFormatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentOnTypeFormattingRequest={method:"textDocument/onTypeFormatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(e.PrepareSupportDefaultBehavior={}).Identifier=1,(a=e.RenameRequest={method:"textDocument/rename"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.PrepareRenameRequest={method:"textDocument/prepareRename"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.ExecuteCommandRequest={method:"workspace/executeCommand"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.ApplyWorkspaceEditRequest={method:"workspace/applyEdit"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType("workspace/applyEdit")}),wwe=oqe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=X3e();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}),Twe=oqe(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(X3e(),e),t((u4e(),j(Abe)),e),t(Z3e(),e),t(xwe(),e),wwe());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}}),kwe=oqe(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,K3e());function r(e,t,r,i){return(0,n.createMessageConnection)(e,t,r,i)}t(K3e(),e),t(Twe(),e),mt(r,"createProtocolConnection"),e.createProtocolConnection=r}),Cwe=x(()=>{function e(e){return{dispose:mt(async()=>e(),"dispose")}}var t=_3e=_3e||{};mt(e,"create"),t.create=e}),Swe=x(()=>{A3e=G(kwe(),1),a5e(),Cwe(),r3e(),f5e(),Uue(),O5e(),P5e(),R3e=class{static{mt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new q5e,this.documentPhaseListeners=new q5e,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=A5e.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=n5e.CancellationToken.None){for(var i of e){var n,a=i.uri.toString();i.state===A5e.Validated?"boolean"==typeof t.validation&&t.validation?this.resetToState(i,A5e.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=A5e.IndexedReferences):this.buildState.delete(a)}this.currentState=A5e.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=n5e.CancellationToken.None){this.currentState=A5e.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=A5e.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,A5e.Changed)}let o=Pue(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,A5e.ComputedScopes)),await this.emitUpdate(t,s),await h5e(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<A5e.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray()),await this.buildDocuments(e,this.updateBuildOptions,r)}resultsAreIncomplete(e,t){return 1<=this.findMissingValidationCategories(e,t).length}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),n=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?i:new Set,a=void 0===t||!0===t.validation?i:"object"==typeof t.validation?t.validation.categories??i:[];return Pue(a).filter(e=>!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(;t<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;0<=r&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return!!e.references.some(e=>void 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 A5e.Changed:case A5e.Parsed:this.indexManager.removeContent(e.uri);case A5e.IndexedContent:e.localSymbols=void 0;case A5e.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case A5e.Linked:this.indexManager.removeReferences(e.uri);case A5e.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case A5e.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=A5e.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,A5e.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,A5e.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,A5e.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,A5e.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(t,A5e.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r)),t=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1)),await this.runCancelable(t,A5e.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.state<t&&(await h5e(r),await i(n),n.state=t,await this.notifyDocumentPhase(n,t,r));e=e.filter(e=>e.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??n5e.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(p5e):this.currentState>=n&&n>e.state?Promise.reject(new A3e.ResponseError(A3e.LSPErrorCodes.RequestFailed,`Document state of ${a.toString()} is ${A5e[e.state]}, requiring ${A5e[n]}, but workspace state is already ${A5e[this.currentState]}. Returning undefined.`)):new Promise((t,e)=>{let r=this.onDocumentPhase(n,e=>{E5e.equals(e.uri,a)&&(r.dispose(),i.dispose(),t(e.uri))}),i=s.onCancellationRequested(()=>{r.dispose(),i.dispose(),e(p5e)})}):Promise.reject(new A3e.ResponseError(A3e.LSPErrorCodes.ServerCancelled,"No document found for URI: "+a.toString()))}awaitBuilderState(n,a){return this.currentState>=n?Promise.resolve():a.isCancellationRequested?Promise.reject(p5e):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{r.dispose(),i.dispose(),e()}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(p5e)})})}async notifyDocumentPhase(e,t,r){var i;for(i of this.documentPhaseListeners.get(t).slice())try{await h5e(r),await i(e,r)}catch(e){if(!c5e(e))throw e}}async notifyBuildPhase(e,t,r){var i;if(0!==e.length)for(i of this.buildPhaseListeners.get(t).slice())await h5e(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=Pue(r.result.validationChecks).concat(i.categories).distinct().toArray():r.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}}),Ewe=x(()=>{nde(),a3e(),a5e(),Uue(),O5e(),L3e=class{static{mt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new K5e,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=Vue(e).uri,i=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{E5e.equals(e.targetUri,r)&&e.targetPath===t&&i.push(e)})}),Pue(i)}allElements(t,r){let e=Pue(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=n5e.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=n5e.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()))}}}),_we=x(()=>{a5e(),f5e(),O5e(),Uue(),N3e=class{static{mt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new g5e,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=n5e.CancellationToken.None){e=await this.performStartup(e),await h5e(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=Pue(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 C5e.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=E5e.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}});function Awe(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function Rwe(e){return e&&"modes"in e&&"defaultMode"in e}function Lwe(e){return!Awe(e)&&!Rwe(e)}var Nwe,Dwe,Iwe,Mwe=x(()=>{sve(),Nwe=class{static{mt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return lme.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return lme.buildUnableToPopLexerModeMessage(e)}},Dwe={mode:"full"},Iwe=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),Lwe(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new ume(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(Lwe(e))return e;let t=Rwe(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(Awe,"isTokenTypeArray"),mt(Rwe,"isIMultiModeLexerDefinition"),mt(Lwe,"isTokenTypeDictionary")});function Owe(e,t,r){let i,n;return i="string"==typeof e?(n=t,r):(n=e.range.start,t),n=n||Ibe.create(0,0),r=$we(e),t=Xwe(i),Uwe({index:0,tokens:Bwe({lines:r,position:n,options:t}),position:n})}function Pwe(e,t){var r,i,t=Xwe(t);return 0!==(e=$we(e)).length&&(r=e[e.length-1],i=t.start,t=t.end,!!i?.exec(e[0]))&&!!t?.exec(r)}function $we(e){return("string"==typeof e?e:e.text).split(nge)}function Bwe(a){let s=[],o=a.position.line,l=a.position.character;for(let n=0;n<a.lines.length;n++){let e=0===n,t=n===a.lines.length-1,r=a.lines[n],i=0;var c,h,u,d,p,g;e&&a.options.start?(c=a.options.start?.exec(r))&&(i=c.index+c[0].length):(c=a.options.line?.exec(r))&&(i=c.index+c[0].length),zwe(r=(r=t&&(h=a.options.end?.exec(r))?r.substring(0,h.index):r).substring(0,qwe(r)),i)>=r.length?0<s.length&&(h=Ibe.create(o,l),s.push({type:"break",content:"",range:Mbe.create(h,h)})):(eTe.lastIndex=i,(p=eTe.exec(r))&&(u=p[0],p=p[1],g=Ibe.create(o,l+i),d=Ibe.create(o,l+i+u.length),s.push({type:"tag",content:p,range:Mbe.create(g,d)}),i+=u.length,i=zwe(r,i)),i<r.length&&(p=r.substring(i),g=Array.from(p.matchAll(tTe)),s.push(...Fwe(g,p,o,l+i)))),o++,l=0}return 0<s.length&&"break"===s[s.length-1].type?s.slice(0,-1):s}function Fwe(e,i,n,a){var s=[];if(0===e.length){var t=Ibe.create(n,a),r=Ibe.create(n,a+i.length);s.push({type:"text",content:i,range:Mbe.create(t,r)})}else{let r=0;for(var o of e){var l=o.index,c=i.substring(r,l);0<c.length&&s.push({type:"text",content:i.substring(r,l),range:Mbe.create(Ibe.create(n,r+a),Ibe.create(n,l+a))});let e=c.length+1,t=o[1];s.push({type:"inline-tag",content:t,range:Mbe.create(Ibe.create(n,r+e+a),Ibe.create(n,r+e+t.length+a))}),e+=t.length,4===o.length?(e+=o[2].length,s.push({type:"text",content:c=o[3],range:Mbe.create(Ibe.create(n,r+e+a),Ibe.create(n,r+e+c.length+a))})):s.push({type:"text",content:"",range:Mbe.create(Ibe.create(n,r+e+a),Ibe.create(n,r+e+a))}),r=l+o[0].length}0<(t=i.substring(r)).length&&s.push({type:"text",content:t,range:Mbe.create(Ibe.create(n,r+a),Ibe.create(n,r+a+t.length))})}return s}function zwe(e,t){var r=e.substring(t).match(rTe);return r?t+r.index:e.length}function qwe(e){if((e=e.match(iTe))&&"number"==typeof e.index)return e.index}function Uwe(e){var t=Ibe.create(e.position.line,e.position.character);if(0===e.tokens.length)return new nTe([],Mbe.create(t,t));for(var r=[];e.index<e.tokens.length;){var i=Gwe(e,r[r.length-1]);i&&r.push(i)}var n=r[0]?.range.start??t,t=r[r.length-1]?.range.end??t;return new nTe(r,Mbe.create(n,t))}function Gwe(e,t){var r=e.tokens[e.index];return"tag"===r.type?Vwe(e,!1):"text"===r.type||"inline-tag"===r.type?Wwe(e):(jwe(r,t),void e.index++)}function jwe(e,t){t&&(e=new oTe("",e.range),("inlines"in t?t:t.content).inlines.push(e))}function Wwe(e){let t=e.tokens[e.index],r=t,i=t,n=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)n.push(Ywe(e)),i=t,t=e.tokens[e.index];return new sTe(n,Mbe.create(r.range.start,i.range.end))}function Ywe(e){return"inline-tag"===e.tokens[e.index].type?Vwe(e,!0):Hwe(e)}function Vwe(e,t){var r,i=e.tokens[e.index++],n=i.content.substring(1);return"text"===e.tokens[e.index]?.type?t?(r=Hwe(e),new aTe(n,new sTe([r],r.range),t,Mbe.create(i.range.start,r.range.end))):(r=Wwe(e),new aTe(n,r,t,Mbe.create(i.range.start,r.range.end))):(e=i.range,new aTe(n,new sTe([],e),t,e))}function Hwe(e){return e=e.tokens[e.index++],new oTe(e.content,e.range)}function Xwe(e){var t,r;return e?({start:e,end:t,line:r}=e,{start:Kwe(e,!0),end:Kwe(t,!1),line:Kwe(r,!0)}):Xwe({start:"/**",end:"*/",line:"*"})}function Kwe(e,t){var r;return"string"==typeof e||"object"==typeof e?(r="string"==typeof e?tge(e):e.source,t?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):e}function Zwe(i,n,a){if("linkplain"===i||"linkcode"===i||"link"===i){let e=n.indexOf(" "),t=n,r;return 0<e&&(r=zwe(n,e),t=n.substring(r),n=n.substring(0,e)),("linkcode"===i||"link"===i&&"code"===a.link)&&(t=`\`${t}\``),a.renderLink?.(n,t)??Qwe(n,t)}}function Qwe(e,t){try{return C5e.parse(e,!0),`[${t}](${e})`}catch{return e}}function Jwe(e){return e.endsWith(`
|
||
`)?`
|
||
`:`
|
||
|
||
`}var eTe,tTe,rTe,iTe,nTe,aTe,sTe,oTe,lTe,cTe,hTe,uTe,dTe,pTe,gTe,fTe=x(()=>{u4e(),cge(),O5e(),mt(Owe,"parseJSDoc"),mt(Pwe,"isJSDoc"),mt($we,"getLines"),eTe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,tTe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(Bwe,"tokenize"),mt(Fwe,"buildInlineTokens"),rTe=/\S/,iTe=/\s*$/,mt(zwe,"skipWhitespace"),mt(qwe,"lastCharacter"),mt(Uwe,"parseJSDocComment"),mt(Gwe,"parseJSDocElement"),mt(jwe,"appendEmptyLine"),mt(Wwe,"parseJSDocText"),mt(Ywe,"parseJSDocInline"),mt(Vwe,"parseJSDocTag"),mt(Hwe,"parseJSDocLine"),mt(Xwe,"normalizeOptions"),mt(Kwe,"normalizeOption"),nTe=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+=Jwe(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+=Jwe(t)+r);return t.trim()}},aTe=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:1<this.content.inlines.length&&(e=e+`
|
||
`+t),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){var t=this.content.toMarkdown(e);if(this.inline){var r=Zwe(this.name,t,e??{});if("string"==typeof r)return r}let i="",n=("italic"===e?.tag||void 0===e?.tag?i="*":"bold"===e?.tag?i="**":"bold-italic"===e?.tag&&(i="***"),i+"@"+this.name+i);return 1===this.content.inlines.length?n=n+" — "+t:1<this.content.inlines.length&&(n=n+`
|
||
`+t),this.inline?`{${n}}`:n}},mt(Zwe,"renderInlineTag"),mt(Qwe,"renderLinkDefault"),sTe=class{static{mt(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let t="";for(let e=0;e<this.inlines.length;e++){var r=this.inlines[e],i=this.inlines[e+1];t+=r.toString(),i&&i.range.start.line>r.range.start.line&&(t+=`
|
||
`)}return t}toMarkdown(t){let r="";for(let e=0;e<this.inlines.length;e++){var i=this.inlines[e],n=this.inlines[e+1];r+=i.toMarkdown(t),n&&n.range.start.line>i.range.start.line&&(r+=`
|
||
`)}return r}},oTe=class{static{mt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(Jwe,"fillNewlines")}),mTe=x(()=>{nde(),fTe(),lTe=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&&Pwe(e))return Owe(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=Vue(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)}}}),yTe=x(()=>{u3e(),_0e(),cTe=class{static{mt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return o3e(e)?e.$comment:g0e(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}}),vTe=x(()=>{f5e(),P3e(),hTe=class{static{mt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},uTe=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<this.threadCount;){let t=this.createWorker();t.onReady(()=>{var e;0<this.queue.length&&(e=this.queue.shift())&&(t.lock(),e.resolve(t))}),this.workerPool.push(t)}}async parse(e,t){let r=await this.acquireParserWorker(t),i=new g5e,n,a=t.onCancellationRequested(()=>{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 g5e;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(p5e)}),this.queue.push(r),r.promise}},dTe=class{static{mt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new O3e.Emitter,this.deferred=new g5e,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(p5e),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 g5e,this.sendMessage(e),this.deferred.promise}}}),bTe=x(()=>{a5e(),f5e(),pTe=class{static{mt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new n5e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=o5e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=n5e.CancellationToken.None){var i=new g5e;return e.push({action:t,deferred:i,cancellationToken:r}),this.performNextOperation(),i.promise}async performNextOperation(){if(this.done){var e=[];if(0<this.writeQueue.length)e.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{var i=await Promise.resolve().then(()=>e(r));t.resolve(i)}catch(e){c5e(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),xTe=x(()=>{d4e(),i0e(),Iue(),nde(),r3e(),_0e(),gTe=class{static{mt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new U5e,this.tokenTypeIdMap=new U5e,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 Que(e))r.set(t,{});if(e.$cstNode)for(var n of s0e(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)Cue(a)?s.push(this.dehydrateAstNode(a,t)):Sue(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else Cue(i)?n[r]=this.dehydrateAstNode(i,t):Sue(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 Nue(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Rue(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Lue(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 Que(e))r.set(t,{});let n;if(e.$cstNode)for(var a of s0e(e.$cstNode)){let e;"fullText"in a?(e=new h4e(a.fullText),n=e):"content"in a?e=new l4e:"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)Cue(a)?s.push(this.setParent(this.hydrateAstNode(a,t),n)):Sue(a)?s.push(this.hydrateReference(a,n,r,t)):s.push(a)}else Cue(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):Sue(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),Rue(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 o4e(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 Que(this.grammar))sde(t)&&this.grammarElementIdMap.set(t,e++)}}});function wTe(e){return{documentation:{CommentProvider:mt(e=>new cTe(e),"CommentProvider"),DocumentationProvider:mt(e=>new lTe(e),"DocumentationProvider")},parser:{AsyncParser:mt(e=>new hTe(e),"AsyncParser"),GrammarConfig:mt(e=>Zge(e),"GrammarConfig"),LangiumParser:mt(e=>Y4e(e),"LangiumParser"),CompletionParser:mt(e=>j4e(e),"CompletionParser"),ValueConverter:mt(()=>new X4e,"ValueConverter"),TokenBuilder:mt(()=>new H4e,"TokenBuilder"),Lexer:mt(e=>new Iwe(e),"Lexer"),ParserErrorMessageProvider:mt(()=>new b4e,"ParserErrorMessageProvider"),LexerErrorMessageProvider:mt(()=>new Nwe,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:mt(()=>new S3e,"AstNodeLocator"),AstNodeDescriptionProvider:mt(e=>new k3e(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:mt(e=>new C3e(e),"ReferenceDescriptionProvider")},references:{Linker:mt(e=>new D5e(e),"Linker"),NameProvider:mt(()=>new F5e,"NameProvider"),ScopeProvider:mt(e=>new J5e(e),"ScopeProvider"),ScopeComputation:mt(e=>new G5e(e),"ScopeComputation"),References:mt(e=>new z5e(e),"References")},serializer:{Hydrator:mt(e=>new gTe(e),"Hydrator"),JsonSerializer:mt(e=>new c3e(e),"JsonSerializer")},validation:{DocumentValidator:mt(e=>new w3e(e),"DocumentValidator"),ValidationRegistry:mt(e=>new f3e(e),"ValidationRegistry")},shared:mt(()=>e.shared,"shared")}}function TTe(t){return{ServiceRegistry:mt(e=>new h3e(e),"ServiceRegistry"),workspace:{LangiumDocuments:mt(e=>new L5e(e),"LangiumDocuments"),LangiumDocumentFactory:mt(e=>new R5e(e),"LangiumDocumentFactory"),DocumentBuilder:mt(e=>new R3e(e),"DocumentBuilder"),IndexManager:mt(e=>new L3e(e),"IndexManager"),WorkspaceManager:mt(e=>new N3e(e),"WorkspaceManager"),FileSystemProvider:mt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:mt(()=>new pTe,"WorkspaceLock"),ConfigurationProvider:mt(e=>new E3e(e),"ConfigurationProvider")},profilers:{}}}var kTe=x(()=>{Qge(),W4e(),Z4e(),Q4e(),J4e(),$5e(),e3e(),t3e(),i3e(),s3e(),u3e(),d3e(),D3e(),m3e(),I3e(),M3e(),$3e(),Swe(),P5e(),Ewe(),_we(),Mwe(),mTe(),yTe(),C4e(),vTe(),bTe(),xTe(),mt(wTe,"createDefaultCoreModule"),mt(TTe,"createDefaultSharedCoreModule")});function CTe(e,t,r,i,n,a,s,o,l){return ETe([e,t,r,i,n,a,s,o,l].reduce(ATe,{}))}function STe(e){if(e&&e[LTe])for(var t of Object.values(e))STe(t);return e}function ETe(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===LTe||_Te(e,t,r,i||n),"get"),getOwnPropertyDescriptor:mt((e,t)=>(_Te(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 _Te(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]===NTe)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]=NTe;try{e[t]="function"==typeof r?r(i):ETe(r,i)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function ATe(e,t){if(t)for(var[r,i]of Object.entries(t)){var n;null!=i&&("object"==typeof i?(n=e[r],e[r]=ATe("object"==typeof n&&null!==n?n:{},i)):e[r]=i)}return e}var RTe,LTe,NTe,DTe,ITe,MTe,OTe,PTe,$Te,BTe=x(()=>{(RTe=RTe||{}).merge=(e,t)=>ATe(ATe({},e),t),mt(CTe,"inject"),LTe=Symbol("isProxy"),mt(STe,"eagerLoad"),mt(ETe,"_inject"),NTe=Symbol(),mt(_Te,"_resolve"),mt(ATe,"_merge")}),FTe=x(()=>{}),zTe=x(()=>{yTe(),mTe(),fTe()}),qTe=x(()=>{}),UTe=x(()=>{Qge(),qTe()}),GTe=x(()=>{sve(),Q4e(),Mwe(),DTe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(ITe=ITe||{}).REGULAR="indentation-sensitive",ITe.IGNORE_INDENTATION="ignore-indentation",MTe=class extends H4e{static{mt(this,"IndentationAwareTokenBuilder")}constructor(e=DTe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...DTe,...e},this.indentTokenType=yme({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=yme({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!Awe(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=ITe.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<s.length?{modes:{[ITe.REGULAR]:[o,l,...h,c],[ITe.IGNORE_INDENTATION]:[...h,c]},defaultMode:ITe.REGULAR}:[o,l,c,...h];throw new Error("Some indentation/whitespace tokens not found!")}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return 0===t||`\r
|
||
`.includes(e[t-1])}matchWhitespace(e,t,r,i){return this.whitespaceRegExp.lastIndex=t,{currIndentLevel:(t=this.whitespaceRegExp.exec(e))?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:t}}createIndentationTokenInstance(e,t,r,i){return t=this.getLineNumber(t,i),bme(e,r,i,i+r.length,t,t,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,i){return!this.isStartOfLine(e,t)||({currIndentLevel:e,prevIndentLevel:t,match:r}=this.matchWhitespace(e,t,r,i),e<=t)?null:(this.indentationStack.push(e),r)}dedentMatcher(t,r,i,e){if(this.isStartOfLine(t,r)){var{currIndentLevel:e,prevIndentLevel:n,match:a}=this.matchWhitespace(t,r,i,e);if(!(n<=e))if(-1===(n=this.indentationStack.lastIndexOf(e)))this.diagnostics.push({severity:"error",message:`Invalid dedent level ${e} at offset: ${r}. Current indentation stack: `+this.indentationStack,offset:r,length:a?.[0]?.length??0,line:this.getLineNumber(t,r),column:1});else{var s=this.indentationStack.length-n-1,o=t.substring(0,r).match(/[\r\n]+$/)?.[0].length??1;for(let e=0;e<s;e++){var l=this.createIndentationTokenInstance(this.dedentTokenType,t,"",r-(o-1));i.push(l),this.indentationStack.pop()}}}return null}buildTerminalToken(e){var e=super.buildTerminalToken(e),{indentTokenName:t,dedentTokenName:r,whitespaceTokenName:i}=this.options;return e.name===t?this.indentTokenType:e.name===r?this.dedentTokenType:e.name===i?yme({name:i,pattern:this.whitespaceRegExp,group:ume.SKIPPED}):e}flushRemainingDedents(e){for(var t=[];1<this.indentationStack.length;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},OTe=class extends Iwe{static{mt(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof MTe))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=Dwe){var r=super.tokenize(e),e=r.report,{indentTokenType:t,dedentTokenType:e}=("full"===t?.mode&&r.tokens.push(...e.remainingDedents),e.remainingDedents=[],this.indentationTokenBuilder),i=t.tokenTypeIdx,n=e.tokenTypeIdx,a=[],s=r.tokens.length-1;for(let e=0;e<s;e++){var o=r.tokens[e],l=r.tokens[e+1];o.tokenTypeIdx===i&&l.tokenTypeIdx===n?e++:a.push(o)}return 0<=s&&a.push(r.tokens[s]),r.tokens=a,r}}}),jTe=x(()=>{}),WTe=x(()=>{vTe(),W4e(),d4e(),GTe(),Z4e(),C4e(),Mwe(),G4e(),jTe(),Q4e(),J4e()}),YTe=x(()=>{$5e(),e3e(),t3e(),n3e(),i3e(),s3e()}),VTe=x(()=>{xTe(),u3e()}),HTe=x(()=>{PTe=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[]}},$Te={fileSystemProvider:mt(()=>new PTe,"fileSystemProvider")}});function XTe(){var e=CTe(TTe($Te),QTe),t=CTe(wTe({shared:e}),ZTe);return e.ServiceRegistry.register(t),t}function KTe(e){var t=XTe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,C5e.parse(`memory:/${e.name??"grammar"}.langium`)),e}var ZTe,QTe,JTe,e6e,t6e=x(()=>{kTe(),BTe(),i0e(),HTe(),O5e(),ZTe={Grammar:mt(()=>{},"Grammar"),LanguageMetaData:mt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},QTe={AstReflection:mt(()=>new t0e,"AstReflection")},mt(XTe,"createMinimalGrammarServices"),mt(KTe,"loadGrammarFromJson")}),r6e={},i6e=(dqe(r6e,{AstUtils:()=>Gue,BiMap:()=>U5e,Cancellation:()=>n5e,ContextCache:()=>K5e,CstUtils:()=>n0e,DONE_RESULT:()=>Fue,Deferred:()=>g5e,Disposable:()=>_3e,DisposableCache:()=>H5e,DocumentCache:()=>Z5e,EMPTY_STREAM:()=>Bue,ErrorWithLocation:()=>L0e,GrammarUtils:()=>hge,MultiMap:()=>q5e,OperationCancelled:()=>p5e,Reduction:()=>que,RegExpUtils:()=>Z0e,SimpleCache:()=>X5e,StreamImpl:()=>$ue,TreeStreamImpl:()=>zue,URI:()=>C5e,UriTrie:()=>_5e,UriUtils:()=>E5e,WorkspaceCache:()=>Q5e,assertCondition:()=>R0e,assertUnreachable:()=>A0e,delayNextTick:()=>s5e,interruptAndCheck:()=>h5e,isOperationCancelled:()=>c5e,loadGrammarFromJson:()=>KTe,setInterruptionPeriod:()=>l5e,startCancelableOperation:()=>o5e,stream:()=>Pue}),x(()=>{a3e(),P3e(),U(r6e,O3e),r3e(),Cwe(),N0e(),t6e(),f5e(),Uue(),O5e(),nde(),a5e(),_0e(),Kge(),cge()})),n6e=x(()=>{D3e(),m3e()}),a6e=x(()=>{r3e(),JTe=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 q5e}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 e6e(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])}},e6e=class{static{mt(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new q5e,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)}}}),s6e=x(()=>{I3e(),M3e(),$3e(),Swe(),P5e(),HTe(),Ewe(),bTe(),_we(),a6e()}),o6e={},l6e=(dqe(o6e,{AbstractAstReflection:()=>Due,AbstractCstNode:()=>s4e,AbstractLangiumParser:()=>m4e,AbstractParserErrorMessageProvider:()=>v4e,AbstractThreadedAsyncParser:()=>uTe,AstUtils:()=>Gue,BiMap:()=>U5e,Cancellation:()=>n5e,CompositeCstNodeImpl:()=>l4e,ContextCache:()=>K5e,CstNodeBuilder:()=>a4e,CstUtils:()=>n0e,DEFAULT_TOKENIZE_OPTIONS:()=>Dwe,DONE_RESULT:()=>Fue,DatatypeSymbol:()=>g4e,DefaultAstNodeDescriptionProvider:()=>k3e,DefaultAstNodeLocator:()=>S3e,DefaultAsyncParser:()=>hTe,DefaultCommentProvider:()=>cTe,DefaultConfigurationProvider:()=>E3e,DefaultDocumentBuilder:()=>R3e,DefaultDocumentValidator:()=>w3e,DefaultHydrator:()=>gTe,DefaultIndexManager:()=>L3e,DefaultJsonSerializer:()=>c3e,DefaultLangiumDocumentFactory:()=>R5e,DefaultLangiumDocuments:()=>L5e,DefaultLangiumProfiler:()=>JTe,DefaultLexer:()=>Iwe,DefaultLexerErrorMessageProvider:()=>Nwe,DefaultLinker:()=>D5e,DefaultNameProvider:()=>F5e,DefaultReferenceDescriptionProvider:()=>C3e,DefaultReferences:()=>z5e,DefaultScopeComputation:()=>G5e,DefaultScopeProvider:()=>J5e,DefaultServiceRegistry:()=>h3e,DefaultTokenBuilder:()=>H4e,DefaultValueConverter:()=>X4e,DefaultWorkspaceLock:()=>pTe,DefaultWorkspaceManager:()=>N3e,Deferred:()=>g5e,Disposable:()=>_3e,DisposableCache:()=>H5e,DocumentCache:()=>Z5e,DocumentState:()=>A5e,DocumentValidator:()=>T3e,EMPTY_SCOPE:()=>V5e,EMPTY_STREAM:()=>Bue,EmptyFileSystem:()=>$Te,EmptyFileSystemProvider:()=>PTe,ErrorWithLocation:()=>L0e,GrammarAST:()=>ade,GrammarUtils:()=>hge,IndentationAwareLexer:()=>OTe,IndentationAwareTokenBuilder:()=>MTe,JSDocDocumentationProvider:()=>lTe,LangiumCompletionParser:()=>x4e,LangiumParser:()=>y4e,LangiumParserErrorMessageProvider:()=>b4e,LeafCstNodeImpl:()=>o4e,LexingMode:()=>ITe,MapScope:()=>W5e,Module:()=>RTe,MultiMap:()=>q5e,MultiMapScope:()=>Y5e,OperationCancelled:()=>p5e,ParserWorker:()=>dTe,ProfilingTask:()=>e6e,Reduction:()=>que,RefResolving:()=>N5e,RegExpUtils:()=>Z0e,RootCstNodeImpl:()=>h4e,SimpleCache:()=>X5e,StreamImpl:()=>$ue,StreamScope:()=>j5e,TextDocument:()=>T5e,TreeStreamImpl:()=>zue,URI:()=>C5e,UriTrie:()=>_5e,UriUtils:()=>E5e,VALIDATE_EACH_NODE:()=>x3e,ValidationCategory:()=>g3e,ValidationRegistry:()=>f3e,ValueConverter:()=>K4e,WorkspaceCache:()=>Q5e,assertCondition:()=>R0e,assertUnreachable:()=>A0e,createCompletionParser:()=>j4e,createDefaultCoreModule:()=>wTe,createDefaultSharedCoreModule:()=>TTe,createGrammarConfig:()=>Zge,createLangiumParser:()=>Y4e,createParser:()=>S4e,delayNextTick:()=>s5e,diagnosticData:()=>p3e,eagerLoad:()=>STe,getDiagnosticRange:()=>y3e,indentationBuilderDefaultOptions:()=>DTe,inject:()=>CTe,interruptAndCheck:()=>h5e,isAstNode:()=>Cue,isAstNodeDescription:()=>_ue,isAstNodeWithComment:()=>o3e,isCompositeCstNode:()=>Rue,isIMultiModeLexerDefinition:()=>Rwe,isJSDoc:()=>Pwe,isLeafCstNode:()=>Lue,isLinkingError:()=>Aue,isMultiReference:()=>Eue,isNamed:()=>B5e,isOperationCancelled:()=>c5e,isReference:()=>Sue,isRootCstNode:()=>Nue,isTokenTypeArray:()=>Awe,isTokenTypeDictionary:()=>Lwe,loadGrammarFromJson:()=>KTe,parseJSDoc:()=>Owe,prepareLangiumParser:()=>V4e,setInterruptionPeriod:()=>l5e,startCancelableOperation:()=>o5e,stream:()=>Pue,toDiagnosticData:()=>b3e,toDiagnosticSeverity:()=>v3e}),x(()=>{kTe(),BTe(),d3e(),FTe(),Iue(),zTe(),UTe(),WTe(),YTe(),VTe(),i6e(),U(o6e,r6e),n6e(),s6e(),i0e()}));function c6e(e){return nke.isInstance(e,A6e.$type)}function h6e(e){return nke.isInstance(e,L6e.$type)}function u6e(e){return nke.isInstance(e,M6e.$type)}function d6e(e){return nke.isInstance(e,F6e.$type)}function p6e(e){return nke.isInstance(e,q6e.$type)}function g6e(e){return nke.isInstance(e,W6e.$type)}function f6e(e){return nke.isInstance(e,V6e.$type)}function m6e(e){return nke.isInstance(e,H6e.$type)}function y6e(e){return nke.isInstance(e,X6e.$type)}function v6e(e){return nke.isInstance(e,K6e.$type)}function b6e(e){return nke.isInstance(e,tke.$type)}var x6e,s,w6e,T6e,k6e,C6e,S6e,E6e,_6e,A6e,R6e,L6e,N6e,D6e,I6e,M6e,O6e,P6e,$6e,B6e,F6e,z6e,q6e,U6e,G6e,j6e,W6e,Y6e,V6e,H6e,X6e,K6e,Z6e,Q6e,J6e,eke,tke,rke,ike,nke,ake,ske,oke,lke,cke,hke,uke,dke,pke,gke,fke,mke,yke,vke,bke,xke,wke,Tke,kke,Cke,Ske,Eke,_ke,Ake,Rke,Lke,Nke,Dke,Ike,Mke,Oke,Pke,$ke,Bke=x(()=>{l6e(),l6e(),l6e(),l6e(),x6e=Object.defineProperty,s=mt((e,t)=>x6e(e,"name",{value:t,configurable:!0}),"__name"),(w6e=w6e||{}).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 ]+\]/},(T6e=T6e||{}).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])?/},(k6e=k6e||{}).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]*/},(C6e=C6e||{}).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]*/},(S6e=S6e||{}).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]*/},(E6e=E6e||{}).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]*/},(_6e=_6e||{}).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:/"[^"]*"|'[^']*'/},{...w6e.Terminals,...T6e.Terminals,...k6e.Terminals,...C6e.Terminals,...S6e.Terminals,...E6e.Terminals,..._6e.Terminals},A6e={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"},mt(c6e,"isArchitecture"),s(c6e,"isArchitecture"),R6e={$type:"Axis",label:"label",name:"name"},L6e={$type:"Branch",name:"name",order:"order"},mt(h6e,"isBranch"),s(h6e,"isBranch"),N6e={$type:"Checkout",branch:"branch"},D6e={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},I6e={$type:"ClassDefStatement",className:"className",styleText:"styleText"},M6e={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"},mt(u6e,"isCommit"),s(u6e,"isCommit"),O6e={$type:"Curve",entries:"entries",label:"label",name:"name"},P6e={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},$6e={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},B6e={$type:"Entry",axis:"axis",value:"value"},F6e={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"},mt(d6e,"isGitGraph"),s(d6e,"isGitGraph"),z6e={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},q6e={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"},mt(p6e,"isInfo"),s(p6e,"isInfo"),U6e={$type:"Item",classSelector:"classSelector",name:"name"},G6e={$type:"Junction",id:"id",in:"in"},j6e={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},W6e={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"},mt(g6e,"isMerge"),s(g6e,"isMerge"),Y6e={$type:"Option",name:"name",value:"value"},V6e={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"},mt(f6e,"isPacket"),s(f6e,"isPacket"),H6e={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"},mt(m6e,"isPacketBlock"),s(m6e,"isPacketBlock"),X6e={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"},mt(y6e,"isPie"),s(y6e,"isPie"),K6e={$type:"PieSection",label:"label",value:"value"},mt(v6e,"isPieSection"),s(v6e,"isPieSection"),Z6e={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Q6e={$type:"Section",classSelector:"classSelector",name:"name"},J6e={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},eke={$type:"Statement"},tke={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"},mt(b6e,"isTreemap"),s(b6e,"isTreemap"),rke={$type:"TreemapRow",indent:"indent",item:"item"},ike=class extends Due{static{mt(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Architecture:{name:A6e.$type,properties:{accDescr:{name:A6e.accDescr},accTitle:{name:A6e.accTitle},edges:{name:A6e.edges,defaultValue:[]},groups:{name:A6e.groups,defaultValue:[]},junctions:{name:A6e.junctions,defaultValue:[]},services:{name:A6e.services,defaultValue:[]},title:{name:A6e.title}},superTypes:[]},Axis:{name:R6e.$type,properties:{label:{name:R6e.label},name:{name:R6e.name}},superTypes:[]},Branch:{name:L6e.$type,properties:{name:{name:L6e.name},order:{name:L6e.order}},superTypes:[eke.$type]},Checkout:{name:N6e.$type,properties:{branch:{name:N6e.branch}},superTypes:[eke.$type]},CherryPicking:{name:D6e.$type,properties:{id:{name:D6e.id},parent:{name:D6e.parent},tags:{name:D6e.tags,defaultValue:[]}},superTypes:[eke.$type]},ClassDefStatement:{name:I6e.$type,properties:{className:{name:I6e.className},styleText:{name:I6e.styleText}},superTypes:[]},Commit:{name:M6e.$type,properties:{id:{name:M6e.id},message:{name:M6e.message},tags:{name:M6e.tags,defaultValue:[]},type:{name:M6e.type}},superTypes:[eke.$type]},Curve:{name:O6e.$type,properties:{entries:{name:O6e.entries,defaultValue:[]},label:{name:O6e.label},name:{name:O6e.name}},superTypes:[]},Direction:{name:P6e.$type,properties:{accDescr:{name:P6e.accDescr},accTitle:{name:P6e.accTitle},dir:{name:P6e.dir},statements:{name:P6e.statements,defaultValue:[]},title:{name:P6e.title}},superTypes:[F6e.$type]},Edge:{name:$6e.$type,properties:{lhsDir:{name:$6e.lhsDir},lhsGroup:{name:$6e.lhsGroup,defaultValue:!1},lhsId:{name:$6e.lhsId},lhsInto:{name:$6e.lhsInto,defaultValue:!1},rhsDir:{name:$6e.rhsDir},rhsGroup:{name:$6e.rhsGroup,defaultValue:!1},rhsId:{name:$6e.rhsId},rhsInto:{name:$6e.rhsInto,defaultValue:!1},title:{name:$6e.title}},superTypes:[]},Entry:{name:B6e.$type,properties:{axis:{name:B6e.axis,referenceType:R6e.$type},value:{name:B6e.value}},superTypes:[]},GitGraph:{name:F6e.$type,properties:{accDescr:{name:F6e.accDescr},accTitle:{name:F6e.accTitle},statements:{name:F6e.statements,defaultValue:[]},title:{name:F6e.title}},superTypes:[]},Group:{name:z6e.$type,properties:{icon:{name:z6e.icon},id:{name:z6e.id},in:{name:z6e.in},title:{name:z6e.title}},superTypes:[]},Info:{name:q6e.$type,properties:{accDescr:{name:q6e.accDescr},accTitle:{name:q6e.accTitle},title:{name:q6e.title}},superTypes:[]},Item:{name:U6e.$type,properties:{classSelector:{name:U6e.classSelector},name:{name:U6e.name}},superTypes:[]},Junction:{name:G6e.$type,properties:{id:{name:G6e.id},in:{name:G6e.in}},superTypes:[]},Leaf:{name:j6e.$type,properties:{classSelector:{name:j6e.classSelector},name:{name:j6e.name},value:{name:j6e.value}},superTypes:[U6e.$type]},Merge:{name:W6e.$type,properties:{branch:{name:W6e.branch},id:{name:W6e.id},tags:{name:W6e.tags,defaultValue:[]},type:{name:W6e.type}},superTypes:[eke.$type]},Option:{name:Y6e.$type,properties:{name:{name:Y6e.name},value:{name:Y6e.value,defaultValue:!1}},superTypes:[]},Packet:{name:V6e.$type,properties:{accDescr:{name:V6e.accDescr},accTitle:{name:V6e.accTitle},blocks:{name:V6e.blocks,defaultValue:[]},title:{name:V6e.title}},superTypes:[]},PacketBlock:{name:H6e.$type,properties:{bits:{name:H6e.bits},end:{name:H6e.end},label:{name:H6e.label},start:{name:H6e.start}},superTypes:[]},Pie:{name:X6e.$type,properties:{accDescr:{name:X6e.accDescr},accTitle:{name:X6e.accTitle},sections:{name:X6e.sections,defaultValue:[]},showData:{name:X6e.showData,defaultValue:!1},title:{name:X6e.title}},superTypes:[]},PieSection:{name:K6e.$type,properties:{label:{name:K6e.label},value:{name:K6e.value}},superTypes:[]},Radar:{name:Z6e.$type,properties:{accDescr:{name:Z6e.accDescr},accTitle:{name:Z6e.accTitle},axes:{name:Z6e.axes,defaultValue:[]},curves:{name:Z6e.curves,defaultValue:[]},options:{name:Z6e.options,defaultValue:[]},title:{name:Z6e.title}},superTypes:[]},Section:{name:Q6e.$type,properties:{classSelector:{name:Q6e.classSelector},name:{name:Q6e.name}},superTypes:[U6e.$type]},Service:{name:J6e.$type,properties:{icon:{name:J6e.icon},iconText:{name:J6e.iconText},id:{name:J6e.id},in:{name:J6e.in},title:{name:J6e.title}},superTypes:[]},Statement:{name:eke.$type,properties:{},superTypes:[]},Treemap:{name:tke.$type,properties:{accDescr:{name:tke.accDescr},accTitle:{name:tke.accTitle},title:{name:tke.title},TreemapRows:{name:tke.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:rke.$type,properties:{indent:{name:rke.indent},item:{name:rke.item}},superTypes:[]}}}static{s(this,"MermaidAstReflection")}},nke=new ike,ske=s(()=>ake=ake??KTe(`{"$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"),lke=s(()=>oke=oke??KTe(`{"$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"),hke=s(()=>cke=cke??KTe(`{"$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"),dke=s(()=>uke=uke??KTe(`{"$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"),gke=s(()=>pke=pke??KTe(`{"$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"),mke=s(()=>fke=fke??KTe(`{"$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"),vke=s(()=>yke=yke??KTe(`{"$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"),Ske={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(Cke={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(kke={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(Tke={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(wke={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(xke={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(bke={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},Eke={AstReflection:s(()=>new ike,"AstReflection")},_ke={Grammar:s(()=>ske(),"Grammar"),LanguageMetaData:s(()=>bke,"LanguageMetaData"),parser:{}},Ake={Grammar:s(()=>lke(),"Grammar"),LanguageMetaData:s(()=>xke,"LanguageMetaData"),parser:{}},Rke={Grammar:s(()=>hke(),"Grammar"),LanguageMetaData:s(()=>wke,"LanguageMetaData"),parser:{}},Lke={Grammar:s(()=>dke(),"Grammar"),LanguageMetaData:s(()=>Tke,"LanguageMetaData"),parser:{}},Nke={Grammar:s(()=>gke(),"Grammar"),LanguageMetaData:s(()=>kke,"LanguageMetaData"),parser:{}},Dke={Grammar:s(()=>mke(),"Grammar"),LanguageMetaData:s(()=>Cke,"LanguageMetaData"),parser:{}},Ike={Grammar:s(()=>vke(),"Grammar"),LanguageMetaData:s(()=>Ske,"LanguageMetaData"),parser:{}},Mke={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Oke=class extends X4e{static{mt(this,"AbstractMermaidValueConverter")}static{s(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=Mke[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}},Pke=class extends Oke{static{mt(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},$ke=class extends H4e{static{mt(this,"AbstractMermaidTokenBuilder")}static{s(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 $ke{static{mt(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function Fke(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),Ake,qke);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var zke,qke,Uke=x(()=>{Bke(),l6e(),zke=class extends $ke{static{mt(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},qke={parser:{TokenBuilder:s(()=>new zke,"TokenBuilder"),ValueConverter:s(()=>new Pke,"ValueConverter")}},mt(Fke,"createGitGraphServices"),s(Fke,"createGitGraphServices")});function Gke(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),Rke,Wke);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var jke,Wke,Yke=x(()=>{Bke(),l6e(),jke=class extends $ke{static{mt(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Wke={parser:{TokenBuilder:s(()=>new jke,"TokenBuilder"),ValueConverter:s(()=>new Pke,"ValueConverter")}},mt(Gke,"createInfoServices"),s(Gke,"createInfoServices")});function Vke(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),Lke,Xke);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var Hke,Xke,Kke=x(()=>{Bke(),l6e(),Hke=class extends $ke{static{mt(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},Xke={parser:{TokenBuilder:s(()=>new Hke,"TokenBuilder"),ValueConverter:s(()=>new Pke,"ValueConverter")}},mt(Vke,"createPacketServices"),s(Vke,"createPacketServices")});function Zke(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),Nke,e7e);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var Qke,Jke,e7e,t7e=x(()=>{Bke(),l6e(),Qke=class extends $ke{static{mt(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Jke=class extends Oke{static{mt(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},e7e={parser:{TokenBuilder:s(()=>new Qke,"TokenBuilder"),ValueConverter:s(()=>new Jke,"ValueConverter")}},mt(Zke,"createPieServices"),s(Zke,"createPieServices")});function r7e(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),_ke,a7e);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var i7e,n7e,a7e,s7e=x(()=>{Bke(),l6e(),i7e=class extends $ke{static{mt(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},n7e=class extends Oke{static{mt(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},a7e={parser:{TokenBuilder:s(()=>new i7e,"TokenBuilder"),ValueConverter:s(()=>new n7e,"ValueConverter")}},mt(r7e,"createArchitectureServices"),s(r7e,"createArchitectureServices")});function o7e(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),Dke,c7e);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var l7e,c7e,h7e=x(()=>{Bke(),l6e(),l7e=class extends $ke{static{mt(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},c7e={parser:{TokenBuilder:s(()=>new l7e,"TokenBuilder"),ValueConverter:s(()=>new Pke,"ValueConverter")}},mt(o7e,"createRadarServices"),s(o7e,"createRadarServices")});function u7e(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function d7e(e=$Te){var e=CTe(TTe(e),Eke),t=CTe(wTe({shared:e}),Ike,y7e);return e.ServiceRegistry.register(t),u7e(t),{shared:e,Treemap:t}}var p7e,g7e,f7e,m7e,y7e,v7e=x(()=>{Bke(),l6e(),p7e=class extends $ke{static{mt(this,"TreemapTokenBuilder")}static{s(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},g7e=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,f7e=class extends Oke{static{mt(this,"TreemapValueConverter")}static{s(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=g7e.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(u7e,"registerValidationChecks"),s(u7e,"registerValidationChecks"),m7e=class{static{mt(this,"TreemapValidator")}static{s(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"}))}},y7e={parser:{TokenBuilder:s(()=>new p7e,"TokenBuilder"),ValueConverter:s(()=>new f7e,"ValueConverter")},validation:{TreemapValidator:s(()=>new m7e,"TreemapValidator")}},mt(d7e,"createTreemapServices"),s(d7e,"createTreemapServices")}),b7e={},x7e=(dqe(b7e,{InfoModule:()=>Wke,createInfoServices:()=>Gke}),x(()=>{Yke(),Bke()})),w7e={},T7e=(dqe(w7e,{PacketModule:()=>Xke,createPacketServices:()=>Vke}),x(()=>{Kke(),Bke()})),k7e={},C7e=(dqe(k7e,{PieModule:()=>e7e,createPieServices:()=>Zke}),x(()=>{t7e(),Bke()})),S7e={},E7e=(dqe(S7e,{ArchitectureModule:()=>a7e,createArchitectureServices:()=>r7e}),x(()=>{s7e(),Bke()})),_7e={},A7e=(dqe(_7e,{GitGraphModule:()=>qke,createGitGraphServices:()=>Fke}),x(()=>{Uke(),Bke()})),R7e={},L7e=(dqe(R7e,{RadarModule:()=>c7e,createRadarServices:()=>o7e}),x(()=>{h7e(),Bke()})),N7e={},D7e=(dqe(N7e,{TreemapModule:()=>y7e,createTreemapServices:()=>d7e}),x(()=>{v7e(),Bke()}));async function I7e(e,t){var r=O7e[e];if(!r)throw new Error("Unknown diagram type: "+e);if(M7e[e]||await r(),0<(r=M7e[e].parse(t)).lexerErrors.length||0<r.parserErrors.length)throw new P7e(r);return r.value}var M7e,O7e,P7e,$7e=x(()=>{Uke(),Yke(),Kke(),t7e(),s7e(),h7e(),v7e(),Bke(),M7e={},O7e={info:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(x7e(),b7e))).createInfoServices)().Info.parser.LangiumParser;M7e.info=e},"info"),packet:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(T7e(),w7e))).createPacketServices)().Packet.parser.LangiumParser;M7e.packet=e},"packet"),pie:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(C7e(),k7e))).createPieServices)().Pie.parser.LangiumParser;M7e.pie=e},"pie"),architecture:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(E7e(),S7e))).createArchitectureServices)().Architecture.parser.LangiumParser;M7e.architecture=e},"architecture"),gitGraph:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(A7e(),_7e))).createGitGraphServices)().GitGraph.parser.LangiumParser;M7e.gitGraph=e},"gitGraph"),radar:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(L7e(),R7e))).createRadarServices)().Radar.parser.LangiumParser;M7e.radar=e},"radar"),treemap:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(D7e(),N7e))).createTreemapServices)().Treemap.parser.LangiumParser;M7e.treemap=e},"treemap")},mt(I7e,"parse"),s(I7e,"parse"),P7e=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join(`
|
||
`)} `+e.parserErrors.map(e=>e.message).join(`
|
||
`)),this.result=e}static{s(this,"MermaidParseError")}}});function B7e(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var F7e,z7e,q7e=x(()=>{mt(B7e,"populateCommonDb")}),U7e=x(()=>{F7e={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),G7e=x(()=>{z7e=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function j7e(){return jE({length:7})}function W7e(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 Y7e(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function V7e(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]);Y7e(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]),Y7e(e,t,a))}V7e(e=W7e(e,e=>e.id))}var H7e,X7e,y,K7e,Z7e,Q7e,J7e,eCe,tCe,rCe,iCe,nCe,aCe,sCe,oCe,lCe,cCe,hCe,uCe,dCe,pCe,gCe,fCe,mCe,yCe,vCe,bCe,xCe,wCe,TCe,kCe,CCe,SCe,ECe,_Ce,ACe,RCe,LCe,NCe,DCe,ICe,MCe,OCe,PCe,$Ce,BCe,FCe,zCe,qCe,UCe,GCe,jCe,WCe,YCe,VCe,HCe,XCe,KCe,ZCe,QCe,JCe,eSe,tSe=x(()=>{e(),a_(),ii(),Pc(),ku(),U7e(),G7e(),ti(),H7e=Yt.gitGraph,X7e=mt(()=>_E({...H7e,...sr().gitGraph}),"getConfig"),y=new z7e(()=>{var e=(t=X7e()).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(j7e,"getID"),mt(W7e,"uniqBy"),K7e=mt(function(e){y.records.direction=e},"setDirection"),Z7e=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"),Q7e=mt(function(){return y.records.options},"getOptions"),J7e=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),X7e());r=L.sanitizeText(r,a),t=L.sanitizeText(t,a),n=n?.map(e=>L.sanitizeText(e,a)),e={id:r||y.records.seq+"-"+j7e(),message:t,seq:y.records.seq++,type:i??F7e.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"),eCe=mt(function(e){var t=e.name,e=e.order,t=L.sanitizeText(t,X7e());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}),iCe(t),M.debug("in createBranch")},"branch"),tCe=mt(e=>{var t=e.branch,r=e.id,i=e.type,n=e.tags,a=X7e(),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+"-"+j7e(),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:F7e.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"),rCe=mt(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent,a=(M.debug("Entering cherryPick:",t,r,i),X7e());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===F7e.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+"-"+j7e(),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:F7e.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+e.id+(e.type===F7e.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"),iCe=mt(function(e){var t;if(e=L.sanitizeText(e,X7e()),!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(Y7e,"upsert"),mt(V7e,"prettyPrintCommitHistory"),nCe=mt(function(){M.debug(y.records.commits),V7e([cCe()[0]])},"prettyPrint"),aCe=mt(function(){y.reset(),mh()},"clear"),sCe=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"),oCe=mt(function(){return y.records.branches},"getBranches"),lCe=mt(function(){return y.records.commits},"getCommits"),cCe=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"),hCe=mt(function(){return y.records.currBranch},"getCurrentBranch"),uCe=mt(function(){return y.records.direction},"getDirection"),dCe=mt(function(){return y.records.head},"getHead"),pCe={commitType:F7e,getConfig:X7e,setDirection:K7e,setOptions:Z7e,getOptions:Q7e,commit:J7e,branch:eCe,merge:tCe,cherryPick:rCe,checkout:iCe,prettyPrint:nCe,clear:aCe,getBranchesAsObjArray:sCe,getBranches:oCe,getCommits:lCe,getCommitsArray:cCe,getCurrentBranch:hCe,getDirection:uCe,getHead:dCe,setAccTitle:yh,getAccTitle:vh,getAccDescription:xh,setAccDescription:bh,setDiagramTitle:wh,getDiagramTitle:Th}}),rSe=x(()=>{$7e(),e(),q7e(),tSe(),U7e(),gCe=mt((e,t)=>{B7e(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)fCe(r,t)},"populate"),fCe=mt((e,t)=>{var r={Commit:mt(e=>t.commit(mCe(e)),"Commit"),Branch:mt(e=>t.branch(yCe(e)),"Branch"),Merge:mt(e=>t.merge(vCe(e)),"Merge"),Checkout:mt(e=>t.checkout(bCe(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(xCe(e)),"CherryPicking")}[e.$type];r?r(e):M.error("Unknown statement type: "+e.$type)},"parseStatement"),mCe=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?F7e[e.type]:F7e.NORMAL,tags:e.tags??void 0}),"parseCommit"),yCe=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),vCe=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?F7e[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),bCe=mt(e=>e.branch,"parseCheckout"),xCe=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),wCe={parse:mt(async e=>{e=await I7e("gitGraph",e),M.debug(e),gCe(e,pCe)},"parse")}}),iSe=x(()=>{aT(),Cu(),e(),a_(),U7e(),ZCe=O(),TCe=ZCe?.gitGraph,kCe=new Map,CCe=new Map,SCe=new Map,ECe=[],_Ce=0,ACe="LR",RCe=mt(()=>{kCe.clear(),CCe.clear(),SCe.clear(),_Ce=0,ECe=[],ACe="LR"},"clear"),LCe=mt(e=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof e?e.split(/\\n|\n|<br\s*\/?>/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"),NCe=mt(e=>{let r,i,n;return n="BT"===ACe?(i=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(i=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===ACe||"BT"==ACe?CCe.get(e)?.y:CCe.get(e)?.x;void 0!==t&&i(t,n)&&(r=e,n=t)}),r},"findClosestParent"),DCe=mt(e=>{let r="",i=1/0;return e.forEach(e=>{var t=CCe.get(e).y;t<=i&&(r=e,i=t)}),r||void 0},"findClosestParentBT"),ICe=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=OCe(t),a=Math.max(n,a)):r.push(t),PCe(t,n)}),n=a,r.forEach(e=>{$Ce(e,n,t)}),e.forEach(e=>{var t,r;(e=i.get(e))?.parents.length&&(t=DCe(e.parents),(n=CCe.get(t).y-40)<=a&&(a=n),t=kCe.get(e.branch).pos,r=n-10,CCe.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),MCe=mt(e=>{var t=NCe(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=CCe.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),OCe=mt(e=>MCe(e)+40,"calculateCommitPosition"),PCe=mt((e,t)=>{var r=kCe.get(e.branch);if(r)return r=r.pos,CCe.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),$Ce=mt((e,t,r)=>{var i=kCe.get(e.branch);if(!i)throw new Error("Branch not found for commit "+e.id);i=i.pos,CCe.set(e.id,{x:i,y:t+r})},"setRootPosition"),BCe=mt((e,t,r,i,n,a)=>{var s;a===F7e.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===F7e.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===F7e.MERGE?9:10),s.attr("class",`commit ${t.id} commit`+n%8),a===F7e.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===F7e.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"),FCe=mt((e,t,r,i)=>{var n,a;t.type!==F7e.CHERRY_PICK&&(t.customId&&t.type===F7e.MERGE||t.type!==F7e.MERGE)&&TCe?.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),n=(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-n.width/2-2).attr("y",r.y+13.5).attr("width",n.width+4).attr("height",n.height+4),"TB"===ACe||"BT"===ACe?(a.attr("x",r.x-(n.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(n.width+16)).attr("y",r.y+n.height-12)):t.attr("x",r.posWithOffset-n.width/2),TCe.rotateCommitLabel)&&("TB"===ACe||"BT"===ACe?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(t=-7.5-(n.width+10)/25*9.5,a=10+n.width/25*8.5,e.attr("transform","translate("+t+", "+a+") rotate(-45, "+i+", "+r.y+")")))},"drawCommitLabel"),zCe=mt((n,a,s,o)=>{if(0<a.tags.length){let e=0,t=0,r=0,i=[];for(var l of a.tags.reverse()){var c=n.insert("polygon"),h=n.append("circle"),u=(l=n.append("text").attr("y",s.y-16-e).attr("class","tag-label").text(l)).node()?.getBBox();if(!u)throw new Error("Tag bbox not found");t=Math.max(t,u.width),r=Math.max(r,u.height),l.attr("x",s.posWithOffset-u.width/2),i.push({tag:l,hole:h,rect:c,yOffset:e}),e+=20}for(var{tag:d,hole:p,rect:g,yOffset:f}of i){var m=r/2,y=s.y-19.2-f;g.attr("class","tag-label-bkg").attr("points",`
|
||
${o-t/2-2},${2+y}
|
||
${o-t/2-2},${y-2}
|
||
${s.posWithOffset-t/2-4},${y-m-2}
|
||
${s.posWithOffset+t/2+4},${y-m-2}
|
||
${s.posWithOffset+t/2+4},${y+m+2}
|
||
${s.posWithOffset-t/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",o-t/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==ACe&&"BT"!==ACe||(y=o+f,g.attr("class","tag-label-bkg").attr("points",`
|
||
${s.x},${y+2}
|
||
${s.x},${y-2}
|
||
${s.x+10},${y-m-2}
|
||
${s.x+10+t+4},${y-m-2}
|
||
${s.x+10+t+4},${y+m+2}
|
||
${s.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),p.attr("cx",s.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),d.attr("x",s.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+o+")"))}}},"drawCommitTags"),qCe=mt(e=>{switch(e.customType??e.type){case F7e.NORMAL:return"commit-normal";case F7e.REVERSE:return"commit-reverse";case F7e.HIGHLIGHT:return"commit-highlight";case F7e.MERGE:return"commit-merge";case F7e.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),UCe=mt((e,t,r,i)=>{var n,a={x:0,y:0};return 0<e.parents.length?(n=NCe(e.parents))?(n=i.get(n)??a,"TB"===t?n.y+40:"BT"===t?(i.get(e.id)??a).y-40:n.x+40):0:"TB"===t?30:"BT"===t?(i.get(e.id)??a).y-40:0},"calculatePosition"),GCe=mt((e,t,r)=>{var r="BT"===ACe&&r?t:t+10,t="TB"===ACe||"BT"===ACe?r:kCe.get(e.branch)?.pos,i="TB"===ACe||"BT"===ACe?kCe.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"),jCe=mt((e,a,s)=>{if(!TCe)throw new Error("GitGraph config not found");let o=e.append("g").attr("class","commit-bullets"),l=e.append("g").attr("class","commit-labels"),c="TB"===ACe||"BT"===ACe?30:0,t=[...a.keys()],h=TCe?.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"===ACe&&(h&&ICe(i,a,c),i=i.reverse()),i.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);h&&(c=UCe(t,ACe,c,CCe));var r,i,n,e=GCe(t,c,h);s&&(r=qCe(t),i=t.customType??t.type,n=kCe.get(t.branch)?.index??0,BCe(o,t,e,r,n,i),FCe(l,t,e,c),zCe(l,t,e,c)),"TB"===ACe||"BT"===ACe?CCe.set(t.id,{x:e.x,y:e.posWithOffset}):CCe.set(t.id,{x:e.posWithOffset,y:e.y}),(c="BT"===ACe&&h?c+40:c+40+10)>_Ce&&(_Ce=c)})},"drawCommits"),WCe=mt((t,r,e,i,n)=>{let a=(("TB"===ACe||"BT"===ACe?e.x<i.x:e.y<i.y)?r:t).branch,s=mt(e=>e.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...n.values()].some(e=>o(e)&&s(e))},"shouldRerouteArrow"),YCe=mt((e,t,r=0)=>{let i=e+Math.abs(e-t)/2,n;return 5<r?i:ECe.every(e=>10<=Math.abs(e-i))?(ECe.push(i),i):(n=Math.abs(e-t),YCe(e,t-n/5,r+1))},"findLane"),VCe=mt((e,t,r,i)=>{var n,a=CCe.get(t.id),s=CCe.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=WCe(t,r,a,s,i),l="",c="",h=0,u=0,d=kCe.get(r.branch)?.index;r.type===F7e.MERGE&&t.id!==r.parents[0]&&(d=kCe.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.y<s.y?YCe(a.y,s.y):YCe(s.y,a.y),n=a.x<s.x?YCe(a.x,s.x):YCe(s.x,a.x),p="TB"===ACe?a.x<s.x?`M ${a.x} ${a.y} L ${n-h} ${a.y} ${c} ${n} ${a.y+u} L ${n} ${s.y-h} ${l} ${n+u} ${s.y} L ${s.x} `+s.y:(d=kCe.get(t.branch)?.index,`M ${a.x} ${a.y} L ${n+h} ${a.y} ${l} ${n} ${a.y+u} L ${n} ${s.y-h} ${c} ${n-u} ${s.y} L ${s.x} `+s.y):"BT"===ACe?a.x<s.x?`M ${a.x} ${a.y} L ${n-h} ${a.y} ${l} ${n} ${a.y-u} L ${n} ${s.y+h} ${c} ${n+u} ${s.y} L ${s.x} `+s.y:(d=kCe.get(t.branch)?.index,`M ${a.x} ${a.y} L ${n+h} ${a.y} ${c} ${n} ${a.y-u} L ${n} ${s.y+h} ${l} ${n-u} ${s.y} L ${s.x} `+s.y):a.y<s.y?`M ${a.x} ${a.y} L ${a.x} ${i-h} ${l} ${a.x+u} ${i} L ${s.x-h} ${i} ${c} ${s.x} ${i+u} L ${s.x} `+s.y:(d=kCe.get(t.branch)?.index,`M ${a.x} ${a.y} L ${a.x} ${i+h} ${c} ${a.x+u} ${i} L ${s.x-h} ${i} ${l} ${s.x} ${i-u} L ${s.x} `+s.y)):(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,"TB"===ACe?(a.x<s.x&&(p=r.type===F7e.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&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===F7e.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"===ACe?(a.x<s.x&&(p=r.type===F7e.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&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===F7e.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} ${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)):(a.y<s.y&&(p=r.type===F7e.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y>s.y&&(p=r.type===F7e.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"),HCe=mt((e,r)=>{let i=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(e=>{let t=r.get(e);t.parents&&0<t.parents.length&&t.parents.forEach(e=>{VCe(i,r.get(e),t,r)})})},"drawArrows"),XCe=mt((e,t)=>{let a=e.append("g");t.forEach((e,t)=>{var t=t%8,r=kCe.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);(i=a.append("line")).attr("x1",0),i.attr("y1",r),i.attr("x2",_Ce),i.attr("y2",r),i.attr("class","branch branch"+t),"TB"===ACe?(i.attr("y1",30),i.attr("x1",r),i.attr("y2",_Ce),i.attr("x2",r)):"BT"===ACe&&(i.attr("y1",_Ce),i.attr("x1",r),i.attr("y2",30),i.attr("x2",r)),ECe.push(r);var i=e.name,e=LCe(i),i=a.insert("rect"),n=a.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===TCe?.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===TCe?.rotateCommitLabel?30:0))+", "+(r-e.height/2-1)+")"),"TB"===ACe?(i.attr("x",r-e.width/2-10).attr("y",0),n.attr("transform","translate("+(r-e.width/2-5)+", 0)")):"BT"===ACe?(i.attr("x",r-e.width/2-10).attr("y",_Ce),n.attr("transform","translate("+(r-e.width/2-5)+", "+_Ce+")")):i.attr("transform","translate(-19, "+(r-e.height/2)+")")})},"drawBranches"),KCe=mt(function(e,t,r,i,n){return kCe.set(e,{pos:t,index:r}),t+(50+(n?40:0)+("TB"===ACe||"BT"===ACe?i.width/2:0))},"setBranchPosition"),ZCe=mt(function(e,t,r,i){if(RCe(),M.debug("in gitgraph renderer",e+`
|
||
`,"id:",t,r),!TCe)throw new Error("GitGraph config not found");let s=TCe.rotateCommitLabel??!1,n=i.db,o=(SCe=n.getCommits(),e=n.getBranchesAsObjArray(),ACe=n.getDirection(),V(`[id="${t}"]`)),l=0;e.forEach((e,t)=>{var r=LCe(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=KCe(e.name,l,t,r,s),a.remove(),n.remove(),i.remove()}),jCe(o,SCe,!1),TCe.showBranches&&XCe(o,e),HCe(o,SCe),jCe(o,SCe,!0),t_.insertTitle(o,"gitTitleText",TCe.titleTopMargin??0,n.getDiagramTitle()),Ah(void 0,o,TCe.diagramPadding,TCe.useMaxWidth)},"draw"),QCe={draw:ZCe}}),nSe=x(()=>{JCe=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"),eSe=JCe}),aSe={};dqe(aSe,{diagram:()=>sSe});var sSe,oSe,lSe,cSe=x(()=>{rSe(),tSe(),iSe(),nSe(),sSe={parser:wCe,db:pCe,renderer:QCe,styles:eSe}}),hSe=x(()=>{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],w=[1,20],T=[1,21],k=[1,22],C=[1,23],S=[1,25],E=[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:w,33:T,35:k,36:C,37:24,38:S,40:E},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:w,33:T,35:k,36:C,37:24,38:S,40:E},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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:break;case 11:return 10;case 12:case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(oSe=new((e.prototype=i).Parser=e)).parser=oSe,lSe=oSe}),uSe=oqe((e,t)=>{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<i.isoWeekday()&&(t+=7),i=i.add(t,"day"),r.diff(i,"week")+1):this.add(7*(e-this.isoWeek()),"day")},t.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)},t.startOf);t.startOf=function(e,t){var r=this.$utils(),i=!!r.u(t)||t;return"isoweek"===r.p(e)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.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_isoWeek=r()}),dSe=oqe((e,t)=>{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<e?1900:2e3)},"a"),a=mt(function(t){return function(e){this[t]=+e}},"f"),s=[/[+-]\d\d:?(\d\d)?|Z/,function(e){var t;(this.zone||(this.zone={})).offset=e&&"Z"!==e&&0!==(t=60*(e=e.match(/([+-]|\d\d)/g))[1]+(+e[2]||0))?"+"===e[0]?-t:t:0}],c=mt(function(e){return(e=g[e])&&(e.indexOf?e:e.s.concat(e.f))},"u"),h=mt(function(e,t){var r,i=g.meridiem;if(i){for(var n=1;n<=24;n+=1)if(-1<e.indexOf(i(n,0,t))){r=12<n;break}}else r=e===(t?"pm":"PM");return r},"d"),d={A:[i,function(e){this.afternoon=h(e,!1)}],a:[i,function(e){this.afternoon=h(e,!0)}],Q:[e,function(e){this.month=3*(e-1)+1}],S:[e,function(e){this.milliseconds=100*+e}],SS:[t,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[t,a("day")],Do:[i,function(e){var t=g.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var i=1;i<=31;i+=1)t(i).replace(/\[|\]/g,"")===e&&(this.day=i)}],w:[r,a("week")],ww:[t,a("week")],M:[r,a("month")],MM:[t,a("month")],MMM:[i,function(e){var t=c("months");if((t=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1)<1)throw new Error;this.month=t%12||t}],MMMM:[i,function(e){if((e=c("months").indexOf(e)+1)<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,a("year")],YY:[t,function(e){this.year=n(e)}],YYYY:[/\d{4}/,a("year")],Z:s,ZZ:s};function k(e){for(var t=e,n=g&&g.formats,h=(e=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,r){var i=r&&r.toUpperCase();return t||n[r]||o[r]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(l),u=h.length,r=0;r<u;r+=1){var i=h[r],a=(s=d[i])&&s[0],s=s&&s[1];h[r]=s?{regex:a,parser:s}:i.replace(/^\[|\]$/g,"")}return function(e){for(var t,r,i,n={},a=0,s=0;a<u;a+=1){var o,l,c=h[a];"string"==typeof c?s+=c.length:(l=c.regex,c=c.parser,o=e.slice(s),l=l.exec(o)[0],c.call(n,l),e=e.replace(l,""))}return void 0!==(i=(t=n).afternoon)&&(r=t.hours,i?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon),n}}return mt(k,"l"),function(e,t,d){d.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(n=e.parseTwoDigitYear);var p=(e=t.prototype).parse;e.parse=function(e){var t=e.date,r=e.utc,i=e.args,n=(this.$u=r,i[1]);if("string"==typeof n){var a=!0===i[2],s=!0===i[3],o=a||s,l=i[2];s&&(l=i[2]),g=this.$locale(),!a&&l&&(g=d.Ls[l]),this.$d=((e,t,r,i)=>{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<s?s-1:g.getMonth());var v,b=l||0,x=c||0,w=h||0,T=u||0;return d?new Date(Date.UTC(m,y,f,b,x,w,T+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,b,x,w,T)):(v=new Date(m,y,f,b,x,w,T),p?i(v).week(p).toDate():v)}catch{return new Date("")}})(t,n,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),o&&t!=this.format(n)&&(this.$d=new Date("")),g={}}else if(n instanceof Array)for(var c=n.length,h=1;h<=c;h+=1){i[1]=n[h-1];var u=d.apply(this,i);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}h===c&&(this.$d=new Date(""))}else p.call(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_customParseFormat=r()}),pSe=oqe((e,t)=>{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 gSe(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 fSe,mSe,ySe,vSe,bSe,xSe,wSe,TSe,kSe,CSe,SSe,ESe,_Se,ASe,RSe,LSe,NSe,DSe,ISe,MSe,OSe,PSe,$Se,BSe,FSe,zSe,qSe,USe,GSe,jSe,WSe,YSe,VSe,HSe,XSe,KSe,ZSe,QSe,JSe,eEe,tEe,rEe,iEe,nEe,aEe,sEe,oEe,lEe,cEe,hEe,uEe,dEe,pEe,gEe,fEe,mEe,yEe,vEe,bEe,xEe,wEe,TEe,kEe,CEe,SEe,EEe,_Ee,AEe,REe,LEe,NEe,DEe,IEe,MEe,OEe,PEe,$Ee,BEe,FEe,zEe,qEe,UEe=x(()=>{fSe=G(oT(),1),mSe=G(vr(),1),PSe=G(uSe(),1),$Se=G(dSe(),1),BSe=G(pSe(),1),e(),Cu(),a_(),ku(),mSe.default.extend(PSe.default),mSe.default.extend($Se.default),mSe.default.extend(BSe.default),ySe={friday:5,saturday:6},wSe=bSe=vSe="",TSe=[],kSe=[],CSe=new Map,SSe=[],ESe=[],ASe=_Se="",RSe=["active","done","crit","milestone","vert"],DSe=NSe=!(LSe=[]),ISe="sunday",MSe="saturday",OSe=0,PSe=mt(function(){SSe=[],ESe=[],LSe=[],xEe=[],xSe=bEe=vEe=void(gEe=0),wSe=ASe=bSe=vSe=_Se="",TSe=[],DSe=NSe=!(kSe=[]),OSe=0,CSe=new Map,mh(),ISe="sunday",MSe="saturday"},"clear"),$Se=mt(function(e){bSe=e},"setAxisFormat"),BSe=mt(function(){return bSe},"getAxisFormat"),FSe=mt(function(e){xSe=e},"setTickInterval"),zSe=mt(function(){return xSe},"getTickInterval"),qSe=mt(function(e){wSe=e},"setTodayMarker"),USe=mt(function(){return wSe},"getTodayMarker"),GSe=mt(function(e){vSe=e},"setDateFormat"),jSe=mt(function(){NSe=!0},"enableInclusiveEndDates"),WSe=mt(function(){return NSe},"endDatesAreInclusive"),YSe=mt(function(){DSe=!0},"enableTopAxis"),VSe=mt(function(){return DSe},"topAxisEnabled"),HSe=mt(function(e){ASe=e},"setDisplayMode"),XSe=mt(function(){return ASe},"getDisplayMode"),KSe=mt(function(){return vSe},"getDateFormat"),ZSe=mt(function(e){TSe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),QSe=mt(function(){return TSe},"getIncludes"),JSe=mt(function(e){kSe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),eEe=mt(function(){return kSe},"getExcludes"),tEe=mt(function(){return CSe},"getLinks"),rEe=mt(function(e){_Se=e,SSe.push(e)},"addSection"),iEe=mt(function(){return SSe},"getSections"),nEe=mt(function(){let e=SEe(),t=0;for(;!e&&t<10;)e=SEe(),t++;return ESe=xEe},"getTasks"),aEe=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()!==ySe[MSe]&&e.isoWeekday()!==ySe[MSe]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(t)||r.includes(n))},"isInvalidDate"),sEe=mt(function(e){ISe=e},"setWeekday"),oEe=mt(function(){return ISe},"getWeekday"),lEe=mt(function(e){MSe=e},"setWeekend"),cEe=mt(function(t,r,i,n){if(i.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,mSe.default)(t.startTime):(0,mSe.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,mSe.default)(t.endTime):(0,mSe.default)(t.endTime,r,!0),[r,i]=hEe(e,a,r,i,n);t.endTime=r.toDate(),t.renderEndTime=i}},"checkTaskDates"),hEe=mt(function(e,t,r,i,n){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),(a=aEe(e,r,i,n))&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),uEe=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+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var n of i.groups.ids.split(" "))void 0!==(n=kEe(n))&&(!e||n.endTime>e.endTime)&&(e=n);return e?e.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,mSe.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<i.getFullYear())throw new Error("Invalid date:"+r);return i},"getStartDate"),dEe=mt(function(e){return null!==(e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim()))?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),pEe=mt(function(e,t,r,i=!1){r=r.trim();var n=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var a of n.groups.ids.split(" "))void 0!==(a=kEe(a))&&(!e||a.startTime<e.startTime)&&(e=a);return e?e.startTime:((n=new Date).setHours(0,0,0,0),n)}let s=(0,mSe.default)(r,t.trim(),!0);if(s.isValid())return(s=i?s.add(1,"d"):s).toDate();let o=(0,mSe.default)(e),[l,c]=dEe(r);return Number.isNaN(l)||(n=o.add(l,c)).isValid()&&(o=n),o.toDate()},"getEndDate"),gEe=0,fEe=mt(function(e){return void 0===e?"task"+(gEe+=1):e},"parseId"),mEe=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};gSe(r,i,RSe);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let n="";switch(r.length){case 1:i.id=fEe(),i.startTime=e.endTime,n=r[0];break;case 2:i.id=fEe(),i.startTime=uEe(void 0,vSe,r[0]),n=r[1];break;case 3:i.id=fEe(r[0]),i.startTime=uEe(void 0,vSe,r[1]),n=r[2]}return n&&(i.endTime=pEe(i.startTime,vSe,n,NSe),i.manualEndTime=(0,mSe.default)(n,"YYYY-MM-DD",!0).isValid(),cEe(i,vSe,kSe,TSe)),i},"compileData"),yEe=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};gSe(r,i,RSe);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:i.id=fEe(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:r[0]};break;case 2:i.id=fEe(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=fEe(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),xEe=[],wEe={},TEe=mt(function(e,t){e={section:_Se,type:_Se,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},t=yEe(bEe,t),e.raw.startTime=t.startTime,e.raw.endTime=t.endTime,e.id=t.id,e.prevTaskId=bEe,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,e.order=OSe,OSe++,t=xEe.push(e),wEe[bEe=e.id]=t-1},"addTask"),kEe=mt(function(e){return xEe[wEe[e]]},"findTaskById"),CEe=mt(function(e,t){e={section:_Se,type:_Se,description:e,task:e,classes:[]},t=mEe(vEe,t),e.startTime=t.startTime,e.endTime=t.endTime,e.id=t.id,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,vEe=e,ESe.push(e)},"addTaskOrg"),SEe=mt(function(){let e=mt(function(e){var t=xEe[e];switch(xEe[e].raw.startTime.type){case"prevTaskEnd":var r=kEe(t.prevTaskId);t.startTime=r.endTime;break;case"getStartDate":(r=uEe(void 0,vSe,xEe[e].raw.startTime.startData))&&(xEe[e].startTime=r)}return xEe[e].startTime&&(xEe[e].endTime=pEe(xEe[e].startTime,vSe,xEe[e].raw.endTime.data,NSe),xEe[e].endTime)&&(xEe[e].processed=!0,xEe[e].manualEndTime=(0,mSe.default)(xEe[e].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),cEe(xEe[e],vSe,kSe,TSe)),xEe[e].processed},"compileTask"),t=!0;for(var[r,i]of xEe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),EEe=mt(function(e,t){let r=t;"loose"!==O().securityLevel&&(r=(0,fSe.sanitizeUrl)(t)),e.split(",").forEach(function(e){void 0!==kEe(e)&&(REe(e,()=>{window.open(r,"_self")}),CSe.set(e,r))}),_Ee(e,"clickable")},"setLink"),_Ee=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=kEe(e))&&e.classes.push(t)})},"setClass"),AEe=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<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(e),void 0!==kEe(e)&&REe(e,()=>{t_.runFunc(t,...r)})}},"setClickFun"),REe=mt(function(t,r){LSe.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"),LEe=mt(function(e,t,r){e.split(",").forEach(function(e){AEe(e,t,r)}),_Ee(e,"clickable")},"setClickEvent"),NEe=mt(function(t){LSe.forEach(function(e){e(t)})},"bindFunctions"),DEe={getConfig:mt(()=>O().gantt,"getConfig"),clear:PSe,setDateFormat:GSe,getDateFormat:KSe,enableInclusiveEndDates:jSe,endDatesAreInclusive:WSe,enableTopAxis:YSe,topAxisEnabled:VSe,setAxisFormat:$Se,getAxisFormat:BSe,setTickInterval:FSe,getTickInterval:zSe,setTodayMarker:qSe,getTodayMarker:USe,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:Th,setDisplayMode:HSe,getDisplayMode:XSe,setAccDescription:bh,getAccDescription:xh,addSection:rEe,getSections:iEe,getTasks:nEe,addTask:TEe,findTaskById:kEe,addTaskOrg:CEe,setIncludes:ZSe,getIncludes:QSe,setExcludes:JSe,getExcludes:eEe,setClickEvent:LEe,setLink:EEe,getLinks:tEe,bindFunctions:NEe,parseDuration:dEe,isInvalidDate:aEe,setWeekday:sEe,getWeekday:oEe,setWeekend:lEe},mt(gSe,"getTaskTags")}),GEe=oqe((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()}),jEe=x(()=>{IEe=G(vr(),1),MEe=G(GEe(),1),e(),aT(),Pc(),Cu(),ch(),IEe.default.extend(MEe.default),MEe=mt(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),OEe={monday:ux,tuesday:dx,wednesday:px,thursday:gx,friday:fx,saturday:mx,sunday:hx},PEe=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.length;e++)if(a.startTime>=r[e]){r[e]=a.endTime,a.order=e+t,e>n&&(n=e);break}return n},"getMaxIntersections"),BEe=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===($Ee=a.parentElement.offsetWidth)&&($Ee=1200),void 0!==f.useWidth&&($Ee=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=PEe(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 "+$Ee+" "+h);let b=n.select(`[id="${l}"]`),x=g5().domain([ed(u,function(e){return e.startTime}),Qu(u,function(e){return e.endTime})]).rangeRound([0,$Ee-f.leftPadding-f.rightPadding]);function w(e,t){let r=e.startTime,i=t.startTime,n=0;return i<r?n=1:r<i&&(n=-1),n}function T(e,t,r){var i=f.barHeight,n=i+f.barGap,a=f.topPadding,s=f.leftPadding;zb().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(C1),C(n,a,s,0,r,e,g.db.getExcludes(),g.db.getIncludes()),E(s,a,0,r),k(e,n,a,s,i,0,t),_(n,a),A(s,0,0,r)}function k(e,r,i,n,c,t,h){e.sort((e,t)=>e.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=(0<e.classes.length&&(t=e.classes.join(" ")),0);for(var[i,n]of d.entries())e.type===n&&(r=i%f.numberSectionStyles);let a="";return e.active?e.crit?a+=" activeCrit":a=" active":e.done?a=e.crit?" doneCrit":" done":e.crit&&(a+=" crit"),0===a.length&&(a=" task"),e.milestone&&(a=" milestone "+a),e.vert&&(a=" vert "+a),"task"+(a=(a+=r)+(" "+t))}),s.append("text").attr("id",function(e){return e.id+"-text"}).text(function(e){return e.task}).attr("font-size",f.fontSize).attr("x",function(e){let t=x(e.startTime),r=x(e.renderEndTime||e.endTime);return e.milestone&&(t+=.5*(x(e.endTime)-x(e.startTime))-.5*c,r=t+c),e.vert?x(e.startTime)+n:(e=this.getBBox().width)>r-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=(0<e.classes.length&&(n=e.classes.join(" ")),0);for(var[s,o]of d.entries())e.type===o&&(a=s%f.numberSectionStyles);let l="";return e.active&&(l=e.crit?"activeCritText"+a:"activeText"+a),e.done?l=e.crit?l+" doneCritText"+a:l+" doneText"+a:e.crit&&(l=l+" critText"+a),e.milestone&&(l+=" milestoneText"),e.vert&&(l+=" vertText"),i>r-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 C(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||r<n)&&(n=r),(void 0===a||i>a)&&(a=i);if(n&&a)if(5<(0,IEe.default)(a).diff((0,IEe.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,IEe.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 S(e,t,r,i){return r<=0||t<e||(t-=e,(e=IEe.default.duration({[i??"day"]:r}).asMilliseconds())<=0)?1/0:Math.ceil(t/e)}function E(e,t,r,i){var n=g.db.getDateFormat(),n=g.db.getAxisFormat()||("D"===n?"%d":f.axisFormat??"%Y-%m-%d"),a=gd(x).tickSize(-i+t+f.gridLineStartPadding).tickFormat(l5(n)),s=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(g.db.getTickInterval()||f.tickInterval);if(null!==s){var o=parseInt(s[1],10);if(isNaN(o)||o<=0)M.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{var l=s[2],c=g.db.getWeekday()||f.weekday;if(1e4<(d=S((d=x.domain())[0],d[1],o,l)))M.warn(`The tick interval "${o}${l}" would generate ${d} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(l){case"millisecond":a.ticks(Vb.every(o));break;case"second":a.ticks(Hb.every(o));break;case"minute":a.ticks(Xb.every(o));break;case"hour":a.ticks(Zb.every(o));break;case"day":a.ticks(Jb.every(o));break;case"week":a.ticks(OEe[c].every(o));break;case"month":a.ticks(Cx.every(o))}}}if(b.append("g").attr("class","grid").attr("transform","translate("+e+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),g.db.topAxisEnabled()||f.topAxis){var h=pd(x).tickSize(-i+t+f.gridLineStartPadding).tickFormat(l5(n));if(null!==s){var u=parseInt(s[1],10);if(isNaN(u)||u<=0)M.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{var d=s[2],p=g.db.getWeekday()||f.weekday;if(S((l=x.domain())[0],l[1],u,d)<=1e4)switch(d){case"millisecond":h.ticks(Vb.every(u));break;case"second":h.ticks(Hb.every(u));break;case"minute":h.ticks(Xb.every(u));break;case"hour":h.ticks(Zb.every(u));break;case"day":h.ticks(Jb.every(u));break;case"week":h.ticks(OEe[p].every(u));break;case"month":h.ticks(Cx.every(u))}}}b.append("g").attr("class","grid").attr("transform","translate("+e+", "+t+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(r,i){let n=0,a=Object.keys(c).map(e=>[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<t&&a.setAttribute("dy","1em"),a.textContent=r,n.appendChild(a)}return n}).attr("x",10).attr("y",function(e,t){return 0<t?(n+=a[t-1][1],e[1]*r/2+n*r+i):e[1]*r/2+i}).attr("font-size",f.sectionFontSize).attr("class",function(e){for(var[t,r]of d.entries())if(e[0]===r)return"sectionTitle sectionTitle"+t%f.numberSectionStyles;return"sectionTitle"})}function A(e,t,r,i){var n,a,s=g.db.getTodayMarker();"off"!==s&&(a=b.append("g").attr("class","today"),n=new Date,(a=a.append("line")).attr("x1",x(n)+e).attr("x2",x(n)+e).attr("y1",f.titleTopMargin).attr("y2",i-f.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function R(r){var i={},n=[];for(let e=0,t=r.length;e<t;++e)Object.prototype.hasOwnProperty.call(i,r[e])||(i[r[e]]=!0,n.push(r[e]));return n}mt(w,"taskCompare"),u.sort(w),T(u,$Ee,h),Qc(b,h,$Ee,f.useMaxWidth),b.append("text").text(g.db.getDiagramTitle()).attr("x",$Ee/2).attr("y",f.titleTopMargin).attr("class","titleText"),mt(T,"makeGantt"),mt(k,"drawRects"),mt(C,"drawExcludeDays"),mt(S,"getEstimatedTickCount"),mt(E,"makeGrid"),mt(_,"vertLabels"),mt(A,"drawToday"),mt(R,"checkUnique")},"draw"),FEe={setConf:MEe,draw:BEe}}),WEe=x(()=>{zEe=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;
|
||
}
|
||
|
||
|
||
/* 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;
|
||
}
|
||
|
||
.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"),qEe=zEe}),YEe={};dqe(YEe,{diagram:()=>VEe});var VEe,HEe,XEe,KEe,ZEe,QEe,JEe,e_e,t_e,r_e=x(()=>{hSe(),UEe(),jEe(),WEe(),VEe={parser:lSe,db:DEe,renderer:FEe,styles:qEe}}),i_e=x(()=>{$7e(),e(),HEe={parse:mt(async e=>{e=await I7e("info",e),M.debug(e)},"parse")}}),n_e=x(()=>{XEe={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),a_e=x(()=>{n_e(),KEe={version:XEe.version+""},ZEe=mt(()=>KEe.version,"getVersion"),QEe={getVersion:ZEe}}),s_e=x(()=>{aT(),Cu(),JEe=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")}),o_e=x(()=>{e(),s_e(),ch(),e_e=mt((e,t,r)=>{M.debug(`rendering info diagram
|
||
`+e),e=JEe(t),Qc(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"),t_e={draw:e_e}}),l_e={};dqe(l_e,{diagram:()=>c_e});var c_e,h_e,u_e,d_e,p_e,g_e,f_e,m_e,y_e,v_e,b_e,x_e,w_e,T_e,k_e,C_e,S_e,E_e,__e,A_e=x(()=>{i_e(),a_e(),o_e(),c_e={parser:HEe,db:QEe,renderer:t_e}}),R_e=x(()=>{e(),ku(),ti(),g_e=Yt.pie,h_e={sections:new Map,showData:!1,config:g_e},u_e=h_e.sections,d_e=h_e.showData,p_e=structuredClone(g_e),g_e=mt(()=>structuredClone(p_e),"getConfig"),f_e=mt(()=>{u_e=new Map,d_e=h_e.showData,mh()},"clear"),m_e=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.`);u_e.has(e)||(u_e.set(e,t),M.debug(`added new section: ${e}, with value: `+t))},"addSection"),y_e=mt(()=>u_e,"getSections"),v_e=mt(e=>{d_e=e},"setShowData"),b_e=mt(()=>d_e,"getShowData"),x_e={getConfig:g_e,clear:f_e,setDiagramTitle:wh,getDiagramTitle:Th,setAccTitle:yh,getAccTitle:vh,setAccDescription:bh,getAccDescription:xh,addSection:m_e,getSections:y_e,setShowData:v_e,getShowData:b_e}}),L_e=x(()=>{$7e(),e(),q7e(),R_e(),w_e=mt((e,t)=>{B7e(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),T_e={parse:mt(async e=>{e=await I7e("pie",e),M.debug(e),w_e(e,x_e)},"parse")}}),N_e=x(()=>{k_e=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"),C_e=k_e}),D_e=x(()=>{aT(),Cu(),e(),s_e(),ch(),a_(),S_e=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 c3().value(e=>e.value)(r)},"createPieArcs"),E_e=mt((e,t,r,i)=>{M.debug(`rendering pie chart
|
||
`+e);let n=i.db,a=O(),s=_E(n.getConfig(),a.pie),o=JEe(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[i]=e_(e.pieOuterStrokeWidth);i??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=V5().innerRadius(0).outerRadius(h),d=V5().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=S_e(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=vb(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`),Qc(o,450,t,s.useMaxWidth)},"draw"),__e={draw:E_e}}),I_e={};dqe(I_e,{diagram:()=>M_e});var M_e,O_e,P_e,$_e,B_e,F_e=x(()=>{L_e(),R_e(),N_e(),D_e(),M_e={parser:T_e,db:x_e,renderer:__e,styles:C_e}}),z_e=x(()=>{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],w=[1,62],T=[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],C=[4,5,6,7,8,9,10,11,12,13,14,15,18],S=[1,90],E=[1,91],_=[1,92],A=[1,99],R=[1,93],L=[1,96],N=[1,94],D=[1,95],I=[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:w,10:h,12:u,13:d,14:p,18:T,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:w,10:h,12:u,13:d,14:p,18:T,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:w,10:h,12:u,13:d,14:p,18:T,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:w,10:h,12:u,13:d,14:p,18:T,63:m,64:y,65:v,66:b,67:x}),t(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:T,63:m,64:y,65:v,66:b,67:x}),t(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:T,63:m,64:y,65:v,66:b,67:x}),t(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:T,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(C,[2,23]),t(C,[2,1]),t(C,[2,2]),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t(C,[2,6]),t(C,[2,7]),t(C,[2,8]),t(C,[2,9]),t(C,[2,10]),t(C,[2,11]),t(C,[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:S,5:E,6:_,8:A,11:R,13:L,16:89,17:N,18:D,19:I,20:M,22:88,23:87},t(C,[2,24]),t(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:T,63:m,64:y,65:v,66:b,67:x}),t(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:T,63:m,64:y,65:v,66:b,67:x}),t(o,[2,47],{22:88,16:89,23:100,4:S,5:E,6:_,8:A,11:R,13:L,17:N,18:D,19:I,20:M}),{46:[1,101]},t(o,[2,29],{10:he}),t(ue,[2,27],{16:103,4:S,5:E,6:_,8:A,11:R,13:L,17:N,18:D,19:I,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:S,5:E,6:_,8:A,11:R,13:L,17:N,18:D,19:I,20:M}),{4:S,5:E,6:_,8:A,11:R,13:L,16:89,17:N,18:D,19:I,20:M,22:105},t(O,[2,26]),t(o,[2,50],{10:he}),t(ue,[2,28],{16:103,4:S,5:E,6:_,8:A,11:R,13:L,17:N,18:D,19:I,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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=i,mt(e,"Parser"),(O_e=new((e.prototype=r).Parser=e)).parser=O_e,P_e=O_e}),q_e=x(()=>{aT(),ti(),e(),Kr(),$_e=Pt(),B_e=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:Yt.quadrantChart?.chartWidth||500,chartWidth:Yt.quadrantChart?.chartHeight||500,titlePadding:Yt.quadrantChart?.titlePadding||10,titleFontSize:Yt.quadrantChart?.titleFontSize||20,quadrantPadding:Yt.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Yt.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Yt.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Yt.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Yt.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Yt.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Yt.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Yt.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Yt.quadrantChart?.pointLabelFontSize||12,pointRadius:Yt.quadrantChart?.pointRadius||5,xAxisPosition:Yt.quadrantChart?.xAxisPosition||"top",yAxisPosition:Yt.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Yt.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Yt.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{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,quadrantTitleFill:$_e.quadrantTitleFill,quadrantInternalBorderStrokeFill:$_e.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:$_e.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=zb().domain([0,1]).range([i,a+i]),o=zb().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<this.data.points.length?"bottom":this.config.xAxisPosition,n=this.calculateSpace(i,e,t,r);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(i,e,t,n),borderLines:this.getBorders(n),title:this.getTitle(r)}}}});function U_e(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function G_e(e){return!/^\d+$/.test(e)}function j_e(e){return!/^\d+px$/.test(e)}var W_e,Y_e=x(()=>{W_e=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(U_e,"validateHexCode"),mt(G_e,"validateNumber"),mt(j_e,"validateSizeInPixels")});function V_e(e){return cc(e.trim(),l8e)}function H_e(e){c8e.setData({quadrant1Text:V_e(e.text)})}function X_e(e){c8e.setData({quadrant2Text:V_e(e.text)})}function K_e(e){c8e.setData({quadrant3Text:V_e(e.text)})}function Z_e(e){c8e.setData({quadrant4Text:V_e(e.text)})}function Q_e(e){c8e.setData({xAxisLeftText:V_e(e.text)})}function J_e(e){c8e.setData({xAxisRightText:V_e(e.text)})}function e8e(e){c8e.setData({yAxisTopText:V_e(e.text)})}function t8e(e){c8e.setData({yAxisBottomText:V_e(e.text)})}function r8e(e){var t,r={};for(t of e){var[i,n]=t.trim().split(/\s*:\s*/);if("radius"===i){if(G_e(n))throw new W_e(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(U_e(n))throw new W_e(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(U_e(n))throw new W_e(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(j_e(n))throw new W_e(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function i8e(e,t,r,i,n){n=r8e(n),c8e.addPoints([{x:r,y:i,text:V_e(e.text),className:t,...n}])}function n8e(e,t){c8e.addClass(e,r8e(t))}function a8e(e){c8e.setConfig({chartWidth:e})}function s8e(e){c8e.setConfig({chartHeight:e})}function o8e(){var{themeVariables:e,quadrantChart:t}=O();return t&&c8e.setConfig(t),c8e.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}),c8e.setData({titleText:Th()}),c8e.build()}var l8e,c8e,h8e,u8e,d8e,p8e,g8e=x(()=>{Cu(),Pc(),ku(),q_e(),Y_e(),l8e=O(),mt(V_e,"textSanitizer"),c8e=new B_e,mt(H_e,"setQuadrant1Text"),mt(X_e,"setQuadrant2Text"),mt(K_e,"setQuadrant3Text"),mt(Z_e,"setQuadrant4Text"),mt(Q_e,"setXAxisLeftText"),mt(J_e,"setXAxisRightText"),mt(e8e,"setYAxisTopText"),mt(t8e,"setYAxisBottomText"),mt(r8e,"parseStyles"),mt(i8e,"addPoint"),mt(n8e,"addClass"),mt(a8e,"setWidth"),mt(s8e,"setHeight"),mt(o8e,"getQuadrantData"),h8e=mt(function(){c8e.clear(),mh()},"clear"),u8e={setWidth:a8e,setHeight:s8e,setQuadrant1Text:H_e,setQuadrant2Text:X_e,setQuadrant3Text:K_e,setQuadrant4Text:Z_e,setXAxisLeftText:Q_e,setXAxisRightText:J_e,setYAxisTopText:e8e,setYAxisBottomText:t8e,parseStyles:r8e,addPoint:i8e,addClass:n8e,getQuadrantData:o8e,clear:h8e,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:Th,getAccDescription:xh,setAccDescription:bh}}),f8e=x(()=>{aT(),Cu(),e(),ch(),d8e=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=(Qc(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"),p8e={draw:d8e}}),m8e={};dqe(m8e,{diagram:()=>y8e});var y8e,v8e,b8e,x8e=x(()=>{z_e(),g8e(),f8e(),y8e={parser:P_e,db:u8e,renderer:p8e,styles:mt(()=>"","styles")}}),w8e=x(()=>{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],w=[1,43],T=[1,42],k=[1,47],C=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[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:w,27:T,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:C,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:C,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(S,[2,18]),{1:[2,2]},t(S,[2,8]),t(S,[2,9]),t(E,[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(E,[2,38]),t(E,[2,39]),t(_,[2,40]),t(_,[2,42]),t(_,[2,43]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(S,[2,10]),t(S,[2,22],{30:41,29:56,24:w,27:T}),t(S,[2,24]),t(S,[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(S,[2,11]),t(S,[2,30],{33:60,27:k}),t(S,[2,32]),{31:[1,61]},t(S,[2,12]),{17:62,24:C},{25:63,27:A},t(S,[2,14]),{17:65,24:C},t(S,[2,16]),t(S,[2,17]),t(_,[2,41]),t(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(S,[2,31]),{27:[1,69]},t(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(S,[2,15]),t(S,[2,26]),t(S,[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(S,[2,33]),t(S,[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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,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"),(v8e=new((e.prototype=i).Parser=e)).parser=v8e,b8e=v8e});function T8e(e){return"bar"===e.type}function k8e(e){return"band"===e.type}function C8e(e){return"linear"===e.type}var S8e,E8e,_8e,A8e,R8e=x(()=>{mt(T8e,"isBarPlot"),mt(k8e,"isBandAxisData"),mt(C8e,"isLinearAxisData")}),L8e=x(()=>{eL(),S8e=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=XR(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}}}),N8e=x(()=>{E8e=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():[]}}}),D8e=x(()=>{aT(),e(),N8e(),_8e=class extends E8e{static{mt(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=wb().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=wb().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]}}}),I8e=x(()=>{aT(),N8e(),A8e=class extends E8e{static{mt(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=zb().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=zb().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function M8e(e,t,r,i){return i=new S8e(i),k8e(e)?new _8e(t,r,e.categories,e.title,i):new A8e(t,r,[e.min,e.max],e.title,i)}var O8e=x(()=>{R8e(),L8e(),D8e(),I8e(),mt(M8e,"getAxis")});function P8e(e,t,r,i){return i=new S8e(i),new $8e(i,e,t,r)}var $8e,B8e,F8e,z8e=x(()=>{L8e(),$8e=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(P8e,"getChartTitleComponent")}),q8e=x(()=>{aT(),B8e=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?i3().y(e=>e[0]).x(e=>e[1]):i3().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}]}]:[]}}}),U8e=x(()=>{F8e=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 G8e(e,t,r){return new j8e(e,t,r)}var j8e,W8e,Y8e,V8e=x(()=>{q8e(),U8e(),j8e=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 B8e(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...i.getDrawableElement());break;case"bar":i=new F8e(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...i.getDrawableElement())}return r}},mt(G8e,"getPlotComponent")}),H8e=x(()=>{O8e(),z8e(),V8e(),R8e(),W8e=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:P8e(e,t,r,i),plot:G8e(e,t,r),xAxis:M8e(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:M8e(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),0<t&&(a+=t),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.xAxis.setRange([r,r+n]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:i+a}),this.componentStore.yAxis.setRange([i,i+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>T8e(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,0<e&&(a+=e),0<t&&(s+=t),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:i,y:n}),this.componentStore.yAxis.setRange([i,i+a]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:r}),this.componentStore.xAxis.setRange([n,n+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(e=>T8e(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}}}),X8e=x(()=>{H8e(),Y8e=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,i){return new W8e(e,t,r,i).getDrawableElement()}}});function K8e(){var e=Pt(),t=sr();return _E(e.xyChart,t.themeVariables.xyChart)}function Z8e(){var e=sr();return _E(Yt.xyChart,e.xyChart)}function Q8e(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function J8e(e){var t=sr();return cc(e.trim(),t)}function eAe(e){yAe=e}function tAe(e){vAe.chartOrientation="horizontal"===e?"horizontal":"vertical"}function rAe(e){xAe.xAxis.title=J8e(e.text)}function iAe(e,t){xAe.xAxis={type:"linear",title:xAe.xAxis.title,min:e,max:t},TAe=!0}function nAe(e){xAe.xAxis={type:"band",title:xAe.xAxis.title,categories:e.map(e=>J8e(e.text))},TAe=!0}function aAe(e){xAe.yAxis.title=J8e(e.text)}function sAe(e,t){xAe.yAxis={type:"linear",title:xAe.yAxis.title,min:e,max:t},kAe=!0}function oAe(e){var t=Math.min(...e),e=Math.max(...e),r=C8e(xAe.yAxis)?xAe.yAxis.min:1/0,i=C8e(xAe.yAxis)?xAe.yAxis.max:-1/0;xAe.yAxis={type:"linear",title:xAe.yAxis.title,min:Math.min(r,t),max:Math.max(i,e)}}function lAe(r){let e=[],t;if(0!==r.length&&(TAe||(i=C8e(xAe.xAxis)?xAe.xAxis.min:1/0,t=C8e(xAe.xAxis)?xAe.xAxis.max:-1/0,iAe(Math.min(i,1),Math.max(t,r.length))),kAe||oAe(r),k8e(xAe.xAxis)&&(e=xAe.xAxis.categories.map((e,t)=>[e,r[t]])),C8e(xAe.xAxis))){var i=xAe.xAxis.min,n=xAe.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 cAe(e){return wAe[0===e?0:e%wAe.length]}function hAe(e,t){t=lAe(t),xAe.plots.push({type:"line",strokeFill:cAe(mAe),strokeWidth:2,data:t}),mAe++}function uAe(e,t){t=lAe(t),xAe.plots.push({type:"bar",fill:cAe(mAe),data:t}),mAe++}function dAe(){if(0===xAe.plots.length)throw Error("No Plot to render, please provide a plot with some data");return xAe.title=Th(),Y8e.build(vAe,xAe,bAe,yAe)}function pAe(){return bAe}function gAe(){return vAe}function fAe(){return xAe}var mAe,yAe,vAe,bAe,xAe,wAe,TAe,kAe,CAe,SAe,EAe,_Ae,AAe=x(()=>{ii(),ti(),Kr(),a_(),Pc(),ku(),X8e(),R8e(),mAe=0,vAe=Z8e(),bAe=K8e(),xAe=Q8e(),wAe=bAe.plotColorPalette.split(",").map(e=>e.trim()),kAe=TAe=!1,mt(K8e,"getChartDefaultThemeConfig"),mt(Z8e,"getChartDefaultConfig"),mt(Q8e,"getChartDefaultData"),mt(J8e,"textSanitizer"),mt(eAe,"setTmpSVGG"),mt(tAe,"setOrientation"),mt(rAe,"setXAxisTitle"),mt(iAe,"setXAxisRangeData"),mt(nAe,"setXAxisBand"),mt(aAe,"setYAxisTitle"),mt(sAe,"setYAxisRangeData"),mt(oAe,"setYAxisRangeFromPlotData"),mt(lAe,"transformDataWithoutCategory"),mt(cAe,"getPlotColorFromPalette"),mt(hAe,"setLineData"),mt(uAe,"setBarData"),mt(dAe,"getDrawableElem"),mt(pAe,"getChartThemeConfig"),mt(gAe,"getChartConfig"),mt(fAe,"getXYChartData"),CAe=mt(function(){mh(),mAe=0,vAe=Z8e(),xAe=Q8e(),bAe=K8e(),wAe=bAe.plotColorPalette.split(",").map(e=>e.trim()),kAe=TAe=!1},"clear"),SAe={getDrawableElem:dAe,clear:CAe,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:Th,getAccDescription:xh,setAccDescription:bh,setOrientation:tAe,setXAxisTitle:rAe,setXAxisRangeData:iAe,setXAxisBand:nAe,setYAxisTitle:aAe,setYAxisRangeData:sAe,setLineData:hAe,setBarData:uAe,setTmpSVGG:eAe,getChartThemeConfig:pAe,getChartConfig:gAe,getXYChartData:fAe}}),RAe=x(()=>{e(),s_e(),ch(),EAe=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=JEe(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(Qc(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;0<n&&f[i]&&(e=f[i]),i+=t[n],r=(r=f[i])||(f[i]=e.append("g").attr("class",t[n]))}return r}mt(m,"getGroup");for(var y of g)if(0!==y.data.length){var v=m(y.groupTexts);switch(y.type){case"rect":if(v.selectAll("rect").data(y.data).enter().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).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<e.data.width&&0<e.data.height)).map(e=>{let t=e.data,r=.7*t.height;for(;!i(e,r)&&0<r;)--r;return r}),b=Math.floor(Math.min(...b));v.selectAll("text").data(x).enter().append("text").attr("x",e=>e.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<e.data.width&&0<e.data.height)).map(e=>{let{data:t,label:r}=e,i=t.width/(.7*r.length);for(;!n(e,i,10)&&0<i;)--i;return i}),w=Math.floor(Math.min(...b));v.selectAll("text").data(x).enter().append("text").attr("x",e=>e.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",w+"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"),_Ae={draw:EAe}}),LAe={};dqe(LAe,{diagram:()=>NAe});var NAe,DAe,IAe,MAe,OAe,PAe,$Ae=x(()=>{w8e(),AAe(),RAe(),NAe={parser:b8e,db:SAe,renderer:_Ae}}),BAe=x(()=>{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],w=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],C=[1,61],S=[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],E=[1,83],_=[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],D=[1,107],I=[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:w,90:T},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:w,90:T},{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:w,90:T},{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:w,90:T},{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:w,90:T},{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:w,90:T},{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:w,90:T},{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:w,90:T},{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:w,90:T},{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:w,90:T},{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:C,89:w,90:T},{30:63,33:62,75:C,89:w,90:T},{30:64,33:62,75:C,89:w,90:T},e(S,[2,29]),e(S,[2,30]),e(S,[2,31]),e(S,[2,32]),e(S,[2,33]),e(S,[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:C,89:w,90:T},{73:79,75:E,76:_,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:E,76:_,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:C,76:_,89:w,90:T},{5:[1,95]},{30:96,33:62,75:C,89:w,90:T},{5:[1,97]},{30:98,33:62,75:C,89:w,90:T},{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:_}),e(k,[2,64],{76:ie}),{33:103,75:[1,102],89:w,90:T},e(ne,[2,65],{79:104,75:E,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:_}),{5:L,28:105,31:N,34:D,36:I,38:M,40:O},{27:[1,112],76:_},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:_},{33:119,89:w,90:T},{33:120,89:w,90:T},{75:E,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:D,36:I,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:E,80:V,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:w,90:T},{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:D,36:I,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:D,36:I,38:M,40:O},{5:L,28:160,31:N,34:D,36:I,38:M,40:O},{5:L,28:161,31:N,34:D,36:I,38:M,40:O},{5:L,28:162,31:N,34:D,36:I,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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},$={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/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"),(DAe=new((P.prototype=t).Parser=P)).parser=DAe,IAe=DAe}),FAe=x(()=>{Cu(),e(),ku(),MAe=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=yh,this.getAccTitle=vh,this.setAccDescription=bh,this.getAccDescription=xh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,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,mh()}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};a.push(l)}return{nodes:n,edges:a,other:{},config:i,direction:this.getDirection()}}}}),zAe=x(()=>{OAe=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};
|
||
}
|
||
.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"),PAe=OAe}),qAe={};dqe(qAe,{draw:()=>UAe});var UAe,GAe=x(()=>{Cu(),e(),aO(),Jhe(),eue(),a_(),UAe=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=YM(t,n);o.type=i.type,o.layoutAlgorithm=$he(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=t,await Phe(o,n),t_.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Bhe(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),jAe={};dqe(jAe,{diagram:()=>WAe});var WAe,YAe,VAe,HAe,XAe,KAe,ZAe,QAe,JAe,e9e,t9e,r9e,i9e,n9e,a9e,s9e,o9e,l9e,c9e,h9e,u9e,d9e,p9e,g9e,f9e,m9e,y9e,v9e,b9e,x9e,w9e,T9e,k9e,C9e,S9e,E9e,_9e,A9e,R9e,L9e,N9e,D9e,I9e,M9e,O9e,P9e,$9e,B9e,F9e,z9e,q9e=x(()=>{BAe(),FAe(),zAe(),GAe(),WAe={parser:IAe,get db(){return new MAe},renderer:qAe,styles:PAe}}),U9e=x(()=>{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,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],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],w=[1,35],T=[1,36],k=[1,37],C=[1,38],S=[1,39],E=[1,41],_=[1,42],A=[1,43],R=[1,44],L=[1,45],N=[1,46],D=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],F=[2,71],I=[4,5,16,50,52,53],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],M=[69,70,71],O=[1,127],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",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",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,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],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,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 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16: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 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:i.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:i.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);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: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 35: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 36: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 37: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 38: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 39: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 40: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 41: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 43:this.$=a[o-3].concat([{type:"option",optionText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.ALT_ELSE},a[o]]);break;case 48: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 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50: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 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 54:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 55: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 56:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 59:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-2],a[o]];break;case 63:this.$=a[o];break;case 64:this.$=i.PLACEMENT.LEFTOF;break;case 65:this.$=i.PLACEMENT.RIGHTOF;break;case 66: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 67: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 68: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 69:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 70:this.$=a[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:a[o]};break;case 72:this.$=i.LINETYPE.SOLID_OPEN;break;case 73:this.$=i.LINETYPE.DOTTED_OPEN;break;case 74:this.$=i.LINETYPE.SOLID;break;case 75:this.$=i.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=i.LINETYPE.DOTTED;break;case 77:this.$=i.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=i.LINETYPE.SOLID_CROSS;break;case 79:this.$=i.LINETYPE.DOTTED_CROSS;break;case 80:this.$=i.LINETYPE.SOLID_POINT;break;case 81:this.$=i.LINETYPE.DOTTED_POINT;break;case 82: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,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},e(D,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},e(D,[2,7]),e(D,[2,8]),e(D,[2,14]),{12:48,50:k,52:C,53:S},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:N},{22:55,71:N},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(D,[2,29]),e(D,[2,30]),{32:[1,61]},{34:[1,62]},e(D,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:N},{22:75,71:N},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:N},{22:92,71:N},{22:93,71:N},{22:94,71:N},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],F),e(D,[2,6]),e(D,[2,15]),e(I,[2,9],{10:95}),e(D,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(D,[2,21]),{5:[1,99]},{5:[1,100]},e(D,[2,24]),e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,31]),e(D,[2,32]),e(z,r,{7:101}),e(z,r,{7:102}),e(z,r,{7:103}),e(q,r,{40:104,7:105}),e(U,r,{42:106,7:107}),e(U,r,{7:107,42:108}),e(G,r,{45:109,7:110}),e(z,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],F,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:N},e(M,[2,72]),e(M,[2,73]),e(M,[2,74]),e(M,[2,75]),e(M,[2,76]),e(M,[2,77]),e(M,[2,78]),e(M,[2,79]),e(M,[2,80]),e(M,[2,81]),{22:123,71:N},{22:125,59:124,71:N},{71:[2,64]},{71:[2,65]},{57:126,86:O},{57:128,86:O},{57:129,86:O},{57:130,86:O},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:k,52:C,53:S},{5:[1,136]},e(D,[2,19]),e(D,[2,20]),e(D,[2,22]),e(D,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,137],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,138],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,139],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{16:[1,140]},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,49:[1,141],50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{16:[1,142]},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,48:[1,143],50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{16:[1,144]},{16:[1,145]},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,47:[1,146],50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,147],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:b,43:x,44:w,46:T,50:k,52:C,53:S,55:E,60:_,61:A,62:R,63:L,71:N},{15:[1,148]},e(D,[2,49]),e(D,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(D,[2,51]),e(D,[2,52]),{22:151,71:N},{22:152,71:N},{57:153,86:O},{57:154,86:O},{57:155,86:O},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(D,[2,16]),e(I,[2,10]),{12:157,50:k,52:C,53:S},e(I,[2,12]),e(I,[2,13]),e(D,[2,18]),e(D,[2,34]),e(D,[2,35]),e(D,[2,36]),e(D,[2,37]),{15:[1,158]},e(D,[2,38]),{15:[1,159]},e(D,[2,39]),e(D,[2,40]),{15:[1,160]},e(D,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:O},{57:165,86:O},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:N},e(I,[2,11]),e(q,r,{7:105,40:167}),e(U,r,{7:107,42:168}),e(G,r,{7:110,45:169}),e(D,[2,48]),{5:[2,70]},e(D,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},$={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return t.yytext=t.yytext.trim(),71;case 11:return t.yytext=t.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 17:return t.yytext=t.yytext.trim(),this.begin("ALIAS"),71;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return t.yytext=t.yytext.trim(),71;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};t.lexer=$,mt(P,"Parser"),(YAe=new((P.prototype=t).Parser=P)).parser=YAe,VAe=YAe}),G9e=x(()=>{Cu(),z9(),e(),G7e(),Pc(),ku(),HAe={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},XAe={FILLED:0,OPEN:1},KAe={LEFTOF:0,RIGHTOF:1,OVER:2},ZAe={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},QAe=class{constructor(){this.state=new z7e(()=>({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=yh,this.setAccDescription=bh,this.setDiagramTitle=wh,this.getAccTitle=vh,this.getAccDescription=xh,this.getDiagramTitle=Th,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=HAe,this.ARROWTYPE=XAe,this.PLACEMENT=KAe}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=F9(o,{schema:B9})),i=s?.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<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&r++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&r--;return r}addMessage(e,t,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(e,t,r,i,n=!1){var a;if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(e??"")<1)throw(a=new Error("Trying to inactivate an inactive participant ("+e+")")).hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;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}),!0}hasAtLeastOneBox(){return 0<this.state.records.boxes.length}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.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(),mh()}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?cc(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=cc(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=cc(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=cc(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"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);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":yh(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}}}),j9e=x(()=>{JAe=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"),e9e=JAe}),W9e=x(()=>{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;e<u.length;e++){var d=e*l-l*(u.length-1)/2,p=t.append("text").attr("x",r).attr("y",i).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("x",r).attr("dy",d).text(u[e]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,i,n,a,s,o){(n=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),l(e,t,r,i,0,a,s,o),g(n,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}function i(e,t,r,i,n,a,s){f(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(e),s)}function c(e,t,r,i,n,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:c}=o,[h,u]=e_(o),d=e.split(L.lineBreakRegex);for(let e=0;e<d.length;e++){var p=e*h-h*(d.length-1)/2,g=t.append("text").attr("x",r+n/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",c).style("font-family",l);g.append("tspan").attr("x",r+n/2).attr("dy",p).text(d[e]),g.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,s)}}function n(e,t,r,i,n,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),c(e,t,r,i,n,a,s,o),f(l,s)}async function a(e,t,r,i,n,a,s,o){var l=await Ec(e,sr());(l=(t=t.append("switch")).append("foreignObject").attr("x",r+n/2-l.width/2).attr("y",i+a/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await Ac(e,sr())),c(e,t,r,i,n,a,s,o),f(l,s)}function f(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}t9e=G(oT(),1),ii(),a_(),Pc(),lT(),r9e=36,i9e="actor-top",n9e="actor-bottom",a9e="actor-box",s9e="actor-man",o9e=mt(function(e,t){return Sw(e,t)},"drawRect"),l9e=mt(function(e,t,r,i,n){if(null==t.links||0===Object.keys(t.links).length)return{height:0,width:0};var a=t.links,s=t.actorCnt,o=t.rectData,t="none",l=(n&&(t="block !important"),e.append("g")),n=(l.attr("id","actor"+s+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",t),""),c=(void 0!==o.class&&(n=" "+o.class),o.width>r?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,t9e.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),F9e(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"),c9e=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),h9e=mt(async function(i,n,a=null){var s=i.append("foreignObject"),o=await Ac(n.text,sr()),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"),u9e=mt(function(e,t){let r=0,i=0,n=t.text.split(L.lineBreakRegex),[a,s]=e_(t.fontSize),o=[],l=0,c=mt(()=>t.y,"yfunc");if(void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin)switch(t.valign){case"top":case"start":c=mt(()=>Math.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||NE;(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<t.textMargin&&(i+=(h._groups||h)[0][0].getBBox().height,r=i),o.push(h)}return o},"drawText"),d9e=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");return i.attr("points",r(t.x,t.y,t.width,t.height,7)),i.attr("class","labelBox"),t.y=t.y+t.height/2,u9e(e,t),i},"drawLabel"),p9e=-1,g9e=mt((r,i,e,n)=>{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"),f9e=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||(p9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",c9e(`actor${p9e}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+p9e).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=p9e,null!=t.links&&o.attr("id","root-"+p9e)),Lw()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=i?" "+n9e:" "+i9e,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,o9e(o,s));t.rectData=s,t.properties?.icon&&("@"===(i=t.properties.icon.trim()).charAt(0)?Rw(o,s.x+s.width-20,s.y+10,i.substr(1)):Aw(o,s.x+s.width-20,s.y+10,i)),B9e(r,Sc(t.description))(t.description,o,s.x,s.y,s.width,s.height,{class:"actor "+a9e},r);let l=t.height;return e.node&&(n=e.node().getBBox(),t.height=n.height,l=n.height),l},"drawActorTypeParticipant"),m9e=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||(p9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",c9e(`actor${p9e}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+p9e).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=p9e,null!=t.links&&o.attr("id","root-"+p9e)),Lw()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=i?" "+n9e:" "+i9e,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=o9e(o,s);o9e(o,e),t.rectData=s,t.properties?.icon&&("@"===(n=t.properties.icon.trim()).charAt(0)?Rw(o,s.x+s.width-20,s.y+10,n.substr(1)):Aw(o,s.x+s.width-20,s.y+10,n)),B9e(r,Sc(t.description))(t.description,o,s.x-6,s.y+6,s.width,s.height,{class:"actor "+a9e},r);let l=t.height;return i.node&&(a=i.node().getBBox(),t.height=a.height,l=a.height),l},"drawActorTypeCollections"),y9e=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||(p9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&l.attr("onclick",c9e(`actor${p9e}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+p9e).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=p9e,null!=t.links&&l.attr("id","root-"+p9e)),Lw()),h="actor";t.properties?.class?h=t.properties.class:c.fill="#eaeaea",h+=i?" "+n9e:" "+i9e,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)?Rw(l,d,i,e.substr(1)):Aw(l,d,i,e)),B9e(r,Sc(t.description))(t.description,l,c.x,c.y,c.width,c.height,{class:"actor "+a9e},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"),v9e=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||(p9e++,o.append("line").attr("id","actor"+p9e).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=p9e),e.append("g")),c=s9e;return l.attr("class",c+=i?" "+n9e:" "+i9e),l.attr("name",t.name),(o=Lw()).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+30,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",18).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-18})`),e=l.node().getBBox(),t.height=e.height+2*(r?.sequence?.labelBoxHeight??0),B9e(r,Sc(t.description))(t.description,l,o.x,o.y+18+(i?5:10),o.width,o.height,{class:"actor "+s9e},r),t.height},"drawActorTypeControl"),b9e=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=s9e,c=(l.attr("class",c+=i?" "+n9e:" "+i9e),l.attr("name",t.name),(e=Lw()).x=t.x,e.y=n,e.fill="#eaeaea",e.width=t.width,e.height=t.height,e.class="actor",t.x+t.width/2),h=n+(i?10:25),c=(l.append("circle").attr("cx",c).attr("cy",h).attr("r",18).attr("width",t.width).attr("height",t.height),l.append("line").attr("x1",c-18).attr("x2",c+18).attr("y1",h+18).attr("y2",h+18).attr("stroke","#333").attr("stroke-width",2),l.node().getBBox());return t.height=c.height+(r?.sequence?.labelBoxHeight??0),i||(p9e++,o.append("line").attr("id","actor"+p9e).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=p9e),B9e(r,Sc(t.description))(t.description,l,e.x,e.y+(i?(h-n+18-5)/2:(h+18-n)/2),e.width,e.height,{class:"actor "+s9e},r),l.attr("transform","translate(0, 9)"),t.height},"drawActorTypeEntity"),x9e=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||(p9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&l.attr("onclick",c9e(`actor${p9e}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+p9e).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=p9e,null!=t.links&&l.attr("id","root-"+p9e)),Lw()),h="actor";t.properties?.class?h=t.properties.class:c.fill="#eaeaea",h+=i?" "+n9e:" "+i9e,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/4,u=c.width/4,d=(g=e/2)/(2.5+e/50),p=l.append("g"),g=`
|
||
M ${c.x},${c.y+d}
|
||
a ${g},${d} 0 0 0 ${e},0
|
||
a ${g},${d} 0 0 0 -${e},0
|
||
l 0,${u-2*d}
|
||
a ${g},${d} 0 0 0 ${e},0
|
||
l 0,-${u-2*d}
|
||
`;return p.append("path").attr("d",g).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",h),i?p.attr("transform",`translate(${1.5*e}, ${c.height/4-2*d})`):p.attr("transform",`translate(${1.5*e}, ${(c.height+d)/4})`),t.rectData=c,B9e(r,Sc(t.description))(t.description,l,c.x,c.y+(i?(c.height+u)/4:(c.height+d)/2),c.width,c.height,{class:"actor "+a9e},r),(g=p.select("path:last-child")).node()&&(e=g.node().getBBox(),t.height=e.height+(r.sequence.labelBoxHeight??0)),t.height},"drawActorTypeDatabase"),w9e=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||(p9e++,o.append("line").attr("id","actor"+p9e).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=p9e),e.append("g")),e=s9e;return a.attr("class",e+=i?" "+n9e:" "+i9e),a.attr("name",t.name),(o=Lw()).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"+p9e).attr("x1",t.x+t.width/2-75).attr("y1",n+10).attr("x2",t.x+t.width/2-15).attr("y2",n+10),a.append("line").attr("id","actor-man-arms"+p9e).attr("x1",t.x+t.width/2-75).attr("y1",n+0).attr("x2",t.x+t.width/2-75).attr("y2",n+20),a.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+10).attr("r",30),s=a.node().getBBox(),t.height=s.height+(r.sequence.labelBoxHeight??0),B9e(r,Sc(t.description))(t.description,a,o.x,o.y+(i?11:18),o.width,o.height,{class:"actor "+s9e},r),a.attr("transform","translate(0,22)"),t.height},"drawActorTypeBoundary"),T9e=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||(p9e++,o.append("line").attr("id","actor"+p9e).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=p9e),e.append("g")),c=s9e;return l.attr("class",c+=i?" "+n9e:" "+i9e),l.attr("name",t.name),(o=Lw()).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"+p9e).attr("x1",a).attr("y1",n+25).attr("x2",a).attr("y2",n+45),l.append("line").attr("id","actor-man-arms"+p9e).attr("x1",a-r9e/2).attr("y1",n+33).attr("x2",a+r9e/2).attr("y2",n+33),l.append("line").attr("x1",a-r9e/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+r9e/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,B9e(r,Sc(t.description))(t.description,l,o.x,o.y+35,o.width,o.height,{class:"actor "+s9e},r),t.height},"drawActorTypeActor"),k9e=mt(async function(e,t,r,i){switch(t.type){case"actor":return T9e(e,t,r,i);case"participant":return f9e(e,t,r,i);case"boundary":return w9e(e,t,r,i);case"control":return v9e(e,t,r,i);case"entity":return b9e(e,t,r,i);case"database":return x9e(e,t,r,i);case"collections":return m9e(e,t,r,i);case"queue":return y9e(e,t,r,i)}},"drawActor"),C9e=mt(function(e,t,r){e=e.append("g"),A9e(e,t),t.name&&B9e(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),S9e=mt(function(e){return e.append("g")},"anchorElement"),E9e=mt(function(e,t,r,i,n){var a=Lw(),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,o9e(s,a)},"drawActivation"),_9e=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")}),Nw());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",d9e(u,p),(p=P9e()).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=Sc(p.text)?await h9e(u,p,t):u9e(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,Sc(p.text)?(t.starty=t.sections[f].y,await h9e(u,p,t)):u9e(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"),A9e=mt(function(e,t){Ew(e,t)},"drawBackgroundRect"),R9e=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"),L9e=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"),N9e=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"),D9e=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"),I9e=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"),M9e=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"),O9e=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"),P9e=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"),$9e=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"),B9e=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"),F9e=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},z9e={drawRect:o9e,drawText:u9e,drawLabel:d9e,drawActor:k9e,drawBox:C9e,drawPopup:l9e,anchorElement:S9e,drawActivation:E9e,drawLoop:_9e,drawBackgroundRect:A9e,insertArrowHead:D9e,insertArrowFilledHead:I9e,insertSequenceNumber:M9e,insertArrowCrossHead:O9e,insertDatabaseIcon:R9e,insertComputerIcon:L9e,insertClockIcon:N9e,getTextObj:P9e,getNoteRect:$9e,fixLifeLineHeights:g9e,sanitizeUrl:t9e.sanitizeUrl}});async function Y9e(e,t){$.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=t,a=L.splitBreaks(n).length,s=Sc(n),n=s?await Ec(n,O()):t_.calculateTextDimensions(n,Q9e(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 V9e(e,t,r,i,n){$.bumpVerticalPos(r);let a=i;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=Q9e(P),t.message=t_.wrapLabel(`[${t.message}]`,r-2*P.wrapPadding,e),t.width=r,t.wrap=!0,r=t_.calculateTextDimensions(t.message,e),e=L.getMax(r.height,P.labelBoxHeight),a=i+e,M.debug(e+" - "+t.message)),n(t),$.bumpVerticalPos(a)}function H9e(r,i,e,t,n,a,s){function o(e,t){e.x<n.get(r.from).x?($.insert(i.stopx-t,i.starty,i.startx,i.stopy+e.height/2+P.noteMargin),i.stopx=i.stopx+t):($.insert(i.startx,i.starty,i.stopx+t,i.stopy+e.height/2+P.noteMargin),i.stopx=i.stopx-t)}function l(e,t){e.x<n.get(r.to).x?($.insert(i.startx-t,i.starty,i.stopx,i.stopy+e.height/2+P.noteMargin),i.startx=i.startx+t):($.insert(i.stopx,i.starty,i.startx+t,i.stopy+e.height/2+P.noteMargin),i.startx=i.startx-t)}mt(o,"receiverAdjustment"),mt(l,"senderAdjustment");var c=[ZAe.ACTOR,ZAe.CONTROL,ZAe.ENTITY,ZAe.DATABASE];a.get(r.to)==t?(o(a=n.get(r.to),c.includes(a.type)?r9e/2+3:a.width/2+3),a.starty=e-a.height/2,$.bumpVerticalPos(a.height/2)):s.get(r.from)==t?(a=n.get(r.from),P.mirrorActors&&l(a,c.includes(a.type)?r9e/2:a.width/2),a.stopy=e-a.height/2,$.bumpVerticalPos(a.height/2)):s.get(r.to)==t&&(a=n.get(r.to),P.mirrorActors&&o(a,c.includes(a.type)?r9e/2+3:a.width/2+3),a.stopy=e-a.height/2,$.bumpVerticalPos(a.height/2))}async function X9e(e,t,r){var i,n={};for(i of t)if(e.get(i.to)&&e.get(i.from)){var a=e.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;var s=!(o=void 0!==i.placement),o=(o?J9e:Q9e)(P),l=i.wrap?t_.wrapLabel(i.message,P.width-2*P.wrapPadding,o):i.message,l=(Sc(l)?await Ec(i.message,O()):t_.calculateTextDimensions(l,o)).width+2*P.wrapPadding;s&&i.from===a.nextActor?n[i.to]=L.getMax(n[i.to]||0,l):s&&i.from===a.prevActor?n[i.from]=L.getMax(n[i.from]||0,l):s&&i.from===i.to?(n[i.from]=L.getMax(n[i.from]||0,l/2),n[i.to]=L.getMax(n[i.to]||0,l/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=L.getMax(n[i.from]||0,l):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=L.getMax(n[a.prevActor]||0,l):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=L.getMax(n[a.prevActor]||0,l/2)),a.nextActor)&&(n[i.from]=L.getMax(n[i.from]||0,l/2))}return M.debug("maxMessageWidthPerActor:",n),n}async function K9e(i,e,t){let r=0;for(var n of i.keys()){(n=i.get(n)).wrap&&(n.description=t_.wrapLabel(n.description,P.width-2*P.wrapPadding,eRe(P)));var a=Sc(n.description)?await Ec(n.description,O()):t_.calculateTextDimensions(n.description,eRe(P));n.width=n.wrap?P.width:L.getMax(P.width,a.width+2*P.wrapPadding),n.height=n.wrap?L.getMax(a.height,P.height):P.height,r=L.getMax(r,n.height)}for(var s in e){var o,l=i.get(s);l&&(o=(o=i.get(l.nextActor))?e[s]+P.actorMargin-l.width/2-o.width/2:e[s]+P.actorMargin-l.width/2,l.margin=L.getMax(o,P.actorMargin))}let c=0;return t.forEach(e=>{var t,r=Q9e(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=t_.wrapLabel(e.name,t-2*P.wrapPadding,r)),t_.calculateTextDimensions(e.name,r)),r=(c=L.getMax(r.height,c),L.getMax(t,r.width+2*P.wrapPadding));e.margin=P.boxTextMargin,t<r&&(e.margin+=(r-t)/2)}),t.forEach(e=>e.textMaxHeight=c),L.getMax(r,P.height)}var P,$,Z9e,Q9e,J9e,eRe,tRe,rRe,iRe,nRe,aRe,sRe,oRe,lRe,cRe,hRe,uRe,dRe,pRe,gRe=x(()=>{aT(),W9e(),e(),Pc(),Pc(),lT(),Cu(),yr(),a_(),ch(),G9e(),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,aRe(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=sRe(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")},Z9e=mt(async function(e,t){$.bumpVerticalPos(P.boxMargin),t.height=P.boxMargin,t.starty=$.getVerticalPos();var r=Lw(),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=Nw()).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",Sc(n.text)?await h9e(e,n):u9e(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"),Q9e=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),J9e=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),eRe=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(Y9e,"boundMessage"),tRe=mt(async function(e,t,r,i){var{startx:t,stopx:n,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=t,h=t_.calculateTextDimensions(s,Q9e(P)),u=Nw();u.x=t,u.y=a+10,u.width=n-t,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=P.messageFontFamily,u.fontSize=P.messageFontSize,u.fontWeight=P.messageFontWeight,u.anchor=P.messageAlign,u.valign="center",u.textMargin=P.wrapPadding,u.tspan=!1,Sc(u.text)?await h9e(e,u,{startx:t,stopx:n,starty:r}):u9e(e,u);let d=h.width,p,g=(t===n?p=P.rightAngles?e.append("path").attr("d",`M ${t},${r} H ${t+L.getMax(P.width/2,d/2)} V ${r+25} H `+t):e.append("path").attr("d","M "+t+","+r+" C "+(t+60)+","+(r-10)+" "+(t+60)+","+(r+30)+" "+t+","+(r+20)):((p=e.append("line")).attr("x1",t),p.attr("y1",r),p.attr("x2",n),p.attr("y2",r)),o===i.db.LINETYPE.DOTTED||o===i.db.LINETYPE.DOTTED_CROSS||o===i.db.LINETYPE.DOTTED_POINT||o===i.db.LINETYPE.DOTTED_OPEN||o===i.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");P.arrowMarkerAbsolute&&(g=fc(!0)),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==i.db.LINETYPE.SOLID&&o!==i.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==i.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==i.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==i.db.LINETYPE.SOLID_POINT&&o!==i.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==i.db.LINETYPE.SOLID_CROSS&&o!==i.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||P.showSequenceNumbers)&&(o!==i.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==i.db.LINETYPE.BIDIRECTIONAL_DOTTED||(t<n?p.attr("x1",t+12):p.attr("x1",t+6)),e.append("line").attr("x1",t).attr("y1",r).attr("x2",t).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+g+"#sequencenumber)"),e.append("text").attr("x",t).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),rRe=mt(function(e,t,r,i,n,a,s){let o=0,l=0,c,h=0;for(var u of i){var d=(u=t.get(u)).box;c&&c!=d&&(s||$.models.addBox(c),l+=P.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=n),l+=d.margin),u.width=u.width||P.width,u.height=L.getMax(u.height||P.height,P.height),u.margin=u.margin||P.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=$.getVerticalPos(),$.insert(u.x,n,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,$.models.addActor(u)}c&&!s&&$.models.addBox(c),$.bumpVerticalPos(h)},"addActorRenderingData"),iRe=mt(async function(t,r,i,e){if(e){let e=0;$.bumpVerticalPos(2*P.boxMargin);for(var n of i)(n=r.get(n)).stopy||(n.stopy=$.getVerticalPos()),n=await z9e.drawActor(t,n,P,!0),e=L.getMax(e,n);$.bumpVerticalPos(e+P.boxMargin)}else for(var a of i)a=r.get(a),await z9e.drawActor(t,a,P,!1)},"drawActors"),nRe=mt(function(e,t,r,i){let n=0,a=0;for(var s of r){var s=t.get(s),o=cRe(s);(o=z9e.drawPopup(e,s,o,P,P.forceMenus,i)).height>n&&(n=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),aRe=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"),sRe=mt(function(t){return $.activations.filter(function(e){return e.actor===t})},"actorActivations"),oRe=mt(function(e,t){return t=t.get(e),[(e=sRe(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(V9e,"adjustLoopHeightForWrap"),mt(H9e,"adjustCreatedDestroyedData"),lRe=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 X9e(c,g,n);if(P.height=await K9e(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))}rRe(l,c,h,p,0,g,!1);var b,x,w,T=await dRe(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,sRe(e.from).length),$.insert(r.startx,t-10,r.stopx,t)}z9e.insertArrowHead(l),z9e.insertArrowCrossHead(l),z9e.insertArrowFilledHead(l),z9e.insertSequenceNumber(l),mt(k,"activeEnd");let C=1,S=1,E=[],_=[],A=0;for(b of g){let e,t,r;switch(b.type){case n.db.LINETYPE.NOTE:$.resetVerticalPos(),t=b.noteModel,await Z9e(l,t);break;case n.db.LINETYPE.ACTIVE_START:$.newActivation(b,l,c);break;case n.db.LINETYPE.ACTIVE_END:k(b,$.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:V9e(T,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:V9e(T,b,P.boxMargin,P.boxMargin,e=>$.newLoop(void 0,e.message));break;case n.db.LINETYPE.RECT_END:e=$.endLoop(),_.push(e),$.models.addLoop(e),$.bumpVerticalPos(e.stopy-$.getVerticalPos());break;case n.db.LINETYPE.OPT_START:V9e(T,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:V9e(T,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.ALT_ELSE:V9e(T,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:V9e(T,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e)),$.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:V9e(T,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:C=b.message.start||C,S=b.message.step||S,b.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:V9e(T,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.CRITICAL_OPTION:V9e(T,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:V9e(T,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=C,r.sequenceVisible=n.db.showSequenceNumbers();var R=await Y9e(l,r);H9e(b,r,R,A,c,h,u),E.push({messageModel:r,lineStartY:R}),$.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.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)&&(C+=S),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await iRe(l,c,p,!1);for(x of E)await tRe(l,x.messageModel,x.lineStartY,n);P.mirrorActors&&await iRe(l,c,p,!0),_.forEach(e=>z9e.drawBackgroundRect(l,e)),g9e(l,c,p,P);for(w of $.models.boxes){w.height=$.getVerticalPos()-w.y,$.insert(w.x,w.y,w.x+w.width,w.height);var L=2*P.boxMargin;w.startx=w.x-L,w.starty=w.y-.25*L,w.stopx=w.startx+w.width+2*L,w.stopy=w.starty+w.height+.75*L,w.stroke="rgb(0,0,0, 0.5)",z9e.drawBox(l,w,P)}m&&$.bumpVerticalPos(P.boxMargin),r=nRe(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,D=(N<r.maxHeight?r.maxHeight:N)+2*P.diagramMarginY,I=(P.mirrorActors&&(D=D-P.boxMargin+P.bottomMarginAdj),a.stopx-a.startx);e=(I<r.maxWidth?r.maxWidth:I)+2*P.diagramMarginX,f&&l.append("text").text(f).attr("x",(a.stopx-a.startx)/2-2*P.diagramMarginX).attr("y",-25),Qc(l,D,e,P.useMaxWidth),o=f?40:0,l.attr("viewBox",a.startx-P.diagramMarginX+" -"+(P.diagramMarginY+o)+" "+e+" "+(D+o)),M.debug("models:",$.models)},"draw"),mt(X9e,"getMaxMessageWidthPerActor"),cRe=mt(function(e){let t=0,r=eRe(P);for(var i in e.links)i=t_.calculateTextDimensions(i,r).width+2*P.wrapPadding+2*P.boxMargin,t<i&&(t=i);return t},"getRequiredPopupWidth"),mt(K9e,"calculateActorMargins"),hRe=mt(async function(e,t,r){var i=t.get(e.from),t=t.get(e.to),n=i.x,a=t.x,s=e.wrap&&e.message,o=Sc(e.message)?await Ec(e.message,O()):t_.calculateTextDimensions(s?t_.wrapLabel(e.message,P.width,J9e(P)):e.message,J9e(P)),l={width:s?P.width:L.getMax(P.width,o.width+2*P.noteMargin),height:0,startx:i.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(l.width=s?L.getMax(P.width,o.width):L.getMax(i.width/2+t.width/2,o.width+2*P.noteMargin),l.startx=n+(i.width+P.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(l.width=s?L.getMax(P.width,o.width+2*P.noteMargin):L.getMax(i.width/2+t.width/2,o.width+2*P.noteMargin),l.startx=n-l.width+(i.width-P.actorMargin)/2):e.to===e.from?(o=t_.calculateTextDimensions(s?t_.wrapLabel(e.message,L.getMax(P.width,i.width),J9e(P)):e.message,J9e(P)),l.width=s?L.getMax(P.width,i.width):L.getMax(i.width,P.width,o.width+2*P.noteMargin),l.startx=n+(i.width-l.width)/2):(l.width=Math.abs(n+i.width/2-(a+t.width/2))+P.actorMargin,l.startx=n<a?n+i.width/2-P.actorMargin/2:a+t.width/2-P.actorMargin/2),s&&(l.message=t_.wrapLabel(e.message,l.width-2*P.wrapPadding,J9e(P))),M.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${e.message}]`),l},"buildNoteModel"),uRe=mt(function(e,t,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[i,n]=oRe(e.from,t),[a,s]=oRe(e.to,t),o=i<=a,l=o?n:i,c=o?a:s,h=2<Math.abs(a-s),u=mt(e=>o?-e:e,"adjustValue");e.from===e.to?c=l:(e.activate&&!h&&(c+=u(P.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(l-=u(3)));var t=[i,n,a,s],r=Math.abs(l-c),d=(e.wrap&&e.message&&(e.message=t_.wrapLabel(e.message,L.getMax(r+2*P.wrapPadding,P.width),Q9e(P))),t_.calculateTextDimensions(e.message,Q9e(P)));return{width:L.getMax(e.wrap?0:d.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"),dRe=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=sRe(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 hRe(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=uRe(r,i,n),(r.msgModel=c).startx&&c.stopx&&0<s.length&&s.forEach(e=>{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"),pRe={bounds:$,drawActors:iRe,drawActorsPopup:nRe,setConf:aRe,draw:lRe}}),fRe={};dqe(fRe,{diagram:()=>mRe});var mRe,yRe,vRe,bRe,xRe,wRe,TRe,kRe,CRe,SRe,ERe,_Re,ARe,RRe,LRe,NRe=x(()=>{U9e(),G9e(),j9e(),Cu(),gRe(),mRe={parser:VAe,get db(){return new QAe},renderer:pRe,styles:e9e,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Sh({sequence:{wrap:e.wrap}}))},"init")}}),DRe=x(()=>{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],o=[1,26],l=[1,24],P=[1,25],$=[1,32],B=[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],w=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],T=[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],C=[13,60,73,74,86,100,102,103],J=[13,60,68,69,70,71,72,86,100,102,103],ee=[1,100],S=[1,117],E=[1,113],_=[1,109],A=[1,115],R=[1,110],L=[1,111],N=[1,112],D=[1,114],I=[1,116],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,145],ne=[1,8,9,61],O=[1,8,9,22,48,60,61,82,86,87,88,89,90],T={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],[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]);break;case 35:i.addClassesToNamespace(a[o-4],a[o-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].unshift(a[o-2]),this.$=a[o];break;case 41:i.setCssClass(a[o-2],a[o]);break;case 42:i.addMembers(a[o-3],a[o-1]);break;case 44:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 45:this.$=a[o],i.addClass(a[o]);break;case 46:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 50:i.addAnnotation(a[o],a[o-2]);break;case 51:case 64:this.$=[a[o]];break;case 52:a[o].push(a[o-1]),this.$=a[o];break;case 53:break;case 54:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 55:case 56:break;case 57:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 59:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 60:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 61:i.addNote(a[o],a[o-1]);break;case 62:i.addNote(a[o]);break;case 63:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 65:this.$=a[o-2].concat([a[o]]);break;case 66:i.setDirection("TB");break;case 67:i.setDirection("BT");break;case 68:i.setDirection("RL");break;case 69:i.setDirection("LR");break;case 70:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 71:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 72:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 73:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 74:this.$=i.relationType.AGGREGATION;break;case 75:this.$=i.relationType.EXTENSION;break;case 76:this.$=i.relationType.COMPOSITION;break;case 77:this.$=i.relationType.DEPENDENCY;break;case 78:this.$=i.relationType.LOLLIPOP;break;case 79:this.$=i.lineType.LINE;break;case 80:this.$=i.lineType.DOTTED_LINE;break;case 81:case 87:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 82:case 88:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 83:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 84:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 86:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 89:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 90:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 91:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 92:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 93:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 94:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 95:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 96:i.setCssClass(a[o-1],a[o]);break;case 97:this.$=[a[o]];break;case 98:a[o-2].push(a[o]),this.$=a[o-2];break;case 100: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:o,51:l,52:P,54:$,56:B,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,53],{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,40],{39:[1,67],44:[1,66]}),t(g,[2,55]),t(g,[2,56]),{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,66]),t(g,[2,67]),t(g,[2,68]),t(g,[2,69]),t(w,[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(w,[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(T,[2,123]),t(T,[2,124]),t(T,[2,125]),t(T,[2,126]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),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:o,51:l,52:P,54:$,56:B,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:o,51:l,52:P,54:$,56:B,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,54]),{67:92,73:K,74:Z},t(k,[2,73],{66:93,68:f,69:m,70:y,71:v,72:b}),t(C,[2,74]),t(C,[2,75]),t(C,[2,76]),t(C,[2,77]),t(C,[2,78]),t(J,[2,79]),t(J,[2,80]),{8:[1,95],24:96,40:94,43:23,46:s},{16:97,60:c,86:h,100:u,102:d},{41:[1,99],45:98,51:ee},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:S,48:E,59:106,60:_,82:A,84:107,85:108,86:R,87:L,88:N,89:D,90:I},{60:[1,118]},{13:Q,55:119},t(g,[2,62]),t(g,[2,128]),{22:S,48:E,59:120,60:_,61:[1,121],82:A,84:107,85:108,86:R,87:L,88:N,89:D,90:I},t(te,[2,64]),{16:39,17:40,19:122,60:c,86:h,100:u,102:d,103:p},t(w,[2,16]),t(w,[2,17]),t(w,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:c,86:h,100:u,102:d,103:p},{39:[2,10]},t(re,[2,45],{11:125,12:[1,126]}),t(X,[2,7]),{9:[1,127]},t(M,[2,57]),{16:39,17:40,19:128,60:c,86:h,100:u,102:d,103:p},{13:[1,130],16:39,17:40,19:129,60:c,86:h,100:u,102:d,103:p},t(k,[2,72],{66:131,68:f,69:m,70:y,71:v,72:b}),t(k,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:s},{8:[1,134],41:[2,37]},t(x,[2,41],{39:[1,135]}),{41:[1,136]},t(x,[2,43]),{41:[2,51],45:137,51:ee},{16:39,17:40,19:138,60:c,86:h,100:u,102:d,103:p},t(g,[2,81],{13:[1,139]}),t(g,[2,83],{13:[1,141],77:[1,140]}),t(g,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},t(g,[2,95],{61:ie}),t(ne,[2,97],{85:146,22:S,48:E,60:_,82:A,86:R,87:L,88:N,89:D,90:I}),t(O,[2,99]),t(O,[2,101]),t(O,[2,102]),t(O,[2,103]),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(g,[2,96]),t(g,[2,61]),t(g,[2,63],{61:ie}),{60:[1,147]},t(w,[2,14]),{15:148,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{39:[2,12]},t(re,[2,46]),{13:[1,149]},{1:[2,4]},t(M,[2,59]),t(M,[2,58]),{16:39,17:40,19:150,60:c,86:h,100:u,102:d,103:p},t(k,[2,70]),t(g,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:s},{45:153,51:ee},t(x,[2,42]),{41:[2,52]},t(g,[2,50]),t(g,[2,82]),t(g,[2,84]),t(g,[2,85],{77:[1,154]}),t(g,[2,88]),t(g,[2,89],{13:[1,155]}),t(g,[2,91],{13:[1,157],77:[1,156]}),{22:S,48:E,60:_,82:A,84:158,85:108,86:R,87:L,88:N,89:D,90:I},t(O,[2,100]),t(te,[2,65]),{39:[2,11]},{14:[1,159]},t(M,[2,60]),t(g,[2,35]),{41:[2,39]},{41:[1,160]},t(g,[2,86]),t(g,[2,90]),t(g,[2,92]),t(g,[2,93],{77:[1,161]}),t(ne,[2,98],{85:146,22:S,48:E,60:_,82:A,86:R,87:L,88:N,89:D,90:I}),t(re,[2,8]),t(x,[2,44]),t(g,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_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}}};T.lexer=r,mt(e,"Parser"),(yRe=new((e.prototype=T).Parser=e)).parser=yRe,vRe=yRe}),IRe=x(()=>{Cu(),Pc(),bRe=["#","+","~","-",""],xRe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=cc(e,O()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+bc(this.id);"method"===this.memberType&&(e+=`(${bc(this.parameters.trim())})`,this.returnType)&&(e+=" : "+bc(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():"",bRe.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),bRe.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:"")+bc(this.id)+("method"===this.memberType?`(${bc(this.parameters)})`+(this.returnType?" : "+bc(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""}}}}),MRe=x(()=>{aT(),e(),Cu(),Pc(),a_(),ku(),IRe(),wRe="classId-",TRe=0,kRe=mt(e=>L.sanitizeText(e,O()),"sanitizeText"),CRe=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],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 r=V(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=V("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),V(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t;null!==(e=V(e.currentTarget)).attr("title")&&(t=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),V(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=yh,this.getAccTitle=vh,this.setAccDescription=bh,this.getAccDescription=xh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,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<t.indexOf("~")&&(e=t.split("~"),i=kRe(e[0]),r=kRe(e[1])),{className:i,type:r}}setClassLabel(e,t){e=L.sanitizeText(e,O()),t=t&&kRe(t),e=this.splitClassNameAndType(e).className,this.classes.get(e).label=t,this.classes.get(e).text=""+t+(this.classes.get(e).type?`<${this.classes.get(e).type}>`:"")}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:wRe+e+"-"+TRe}),TRe++)}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=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",mh()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}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(kRe(t.substring(2,t.length-2))):0<t.indexOf(")")?e.methods.push(new xRe(t,"method")):t&&e.members.push(new xRe(t,"attribute")))}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(e,t){t={id:"note"+this.notes.length,class:t,text:e},this.notes.push(t)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),kRe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=wRe+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=kRe(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=wRe+t),(e=this.classes.get(t))&&(e.link=t_.formatUrl(r,n),"sandbox"===n.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof i?kRe(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<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),this.functions.push(()=>{var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",()=>{t_.runFunc(i,...r)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:wRe+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t){if(this.namespaces.has(e))for(var r of t)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=e,this.namespaces.get(e).classes.set(r,this.classes.get(r))}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.keys()){var l=this.namespaces.get(e);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(t of this.classes.keys()){var c,h=this.classes.get(t);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of this.notes){u++;var d={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};a.push(d),(d=this.classes.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(i of this.interfaces){var p={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(n of this.relations){u++;var g={id:n_(n.id1,n.id2,{prefix:"id",counter:u}),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};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),ORe=x(()=>{nue(),SRe=mt(e=>`g.classGroup text {
|
||
fill: ${e.nodeBorder||e.classText};
|
||
stroke: none;
|
||
font-family: ${e.fontFamily};
|
||
font-size: 10px;
|
||
|
||
.title {
|
||
font-weight: bolder;
|
||
}
|
||
|
||
}
|
||
|
||
.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};
|
||
}
|
||
${Hhe()}
|
||
`,"getStyles"),ERe=SRe}),PRe=x(()=>{Cu(),e(),aO(),Jhe(),eue(),a_(),_Re=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"),ARe=mt(function(e,t){return t.db.getClasses()},"getClasses"),RRe=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=YM(t,n);o.type=i.type,o.layoutAlgorithm=$he(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Phe(o,n),t_.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Bhe(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),LRe={getClasses:ARe,draw:RRe,getDir:_Re}}),$Re={};dqe($Re,{diagram:()=>BRe});var BRe,FRe=x(()=>{DRe(),MRe(),ORe(),PRe(),BRe={parser:vRe,get db(){return new CRe},renderer:LRe,styles:ERe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),zRe={};dqe(zRe,{diagram:()=>qRe});var qRe,URe,GRe,jRe,WRe,YRe,VRe,HRe,XRe,KRe,ZRe,QRe,JRe,eLe,tLe,rLe,iLe,nLe,aLe,sLe,oLe,lLe,cLe,hLe,uLe,dLe,pLe,gLe,fLe,mLe,yLe,vLe,bLe,xLe,wLe,TLe,kLe=x(()=>{DRe(),MRe(),ORe(),PRe(),qRe={parser:vRe,get db(){return new CRe},renderer:LRe,styles:ERe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),CLe=x(()=>{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],w=[1,29],T=[1,30],k=[1,31],C=[1,32],S=[1,35],E=[1,36],_=[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],D=[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:w,41:T,45:k,48:C,51:S,52:E,53:_,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:w,41:T,45:k,48:C,51:S,52:E,53:_,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(D,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:w,41:T,45:k,48:C,51:S,52:E,53:_,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(D,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:w,41:T,45:k,48:C,51:S,52:E,53:_,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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:case 9:break;case 10:return 5;case 11:case 12:case 13:case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/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;]+)/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"),(URe=new((e.prototype=r).Parser=e)).parser=URe,GRe=URe}),SLe=x(()=>{WRe="root",YRe="relation",VRe="classDef",HRe="style",XRe="applyClass",KRe="default",QRe="fill:none",JRe="fill: #333",eLe="text",tLe="normal",rLe="rect",iLe="rectWithTitle",nLe="stateStart",aLe="stateEnd",sLe=ZRe="divider",oLe="roundedWithTitle",cLe="noteGroup",uLe=(hLe="statediagram")+"-state",pLe=(dLe="transition")+" note-edge",gLe=hLe+"-note",fLe=hLe+"-cluster",mLe=hLe+"-cluster-alt",bLe=jRe="state",wLe=(xLe="----")+(vLe=lLe="note"),TLe=""+xLe+(yLe="parent")});function ELe(e="",t=0,r="",i=xLe){return i=null!==r&&0<r.length?""+i+r:"",bLe+`-${e}${i}-`+t}function _Le(e,t,r){var i;t.id&&"</join></fork>"!==t.id&&"</choice>"!==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 ALe(e){return e?.classes?.join(" ")??""}function RLe(e){return e?.styles??[]}var LLe,NLe,DLe,ILe,MLe,OLe,PLe,$Le,BLe,FLe,zLe,qLe,ULe,GLe,jLe,WLe,YLe,VLe,HLe,XLe,KLe,ZLe,QLe,JLe,eNe,tNe,rNe,iNe,nNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe=x(()=>{Cu(),e(),Pc(),SLe(),LLe=new Map,NLe=0,mt(ELe,"stateDomId"),DLe=mt((r,e,i,n,a,s,o,l)=>{M.trace("items",e),e.forEach(e=>{switch(e.stmt){case jRe:case KRe:MLe(r,e,i,n,a,s,o,l);break;case YRe:MLe(r,e.state1,i,n,a,s,o,l),MLe(r,e.state2,i,n,a,s,o,l);var t={id:"edge"+NLe,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:QRe,labelStyle:"",label:L.sanitizeText(e.description??"",O()),arrowheadStyle:JRe,labelpos:"c",labelType:eLe,thickness:tLe,classes:dLe,look:o};a.push(t),NLe++}})},"setupDoc"),ILe=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(_Le,"insertOrUpdateNode"),mt(ALe,"getClassesFromDbInfo"),mt(RLe,"getStylesFromDbInfo"),MLe=mt((r,i,e,n,a,t,s,o)=>{var l=i.id,c=e.get(l),h=ALe(c),u=RLe(c),d=O();if(M.info("dataFetcher parsedItem",i,c,u),"root"!==l){let e=rLe;if(!0===i.start?e=nLe:!1===i.start&&(e=aLe),i.type!==KRe&&(e=i.type),LLe.get(l)||LLe.set(l,{id:l,shape:e,description:L.sanitizeText(l,d),cssClasses:h+" "+uLe,cssStyles:u}),c=LLe.get(l),i.description&&(Array.isArray(c.description)?(c.shape=iLe,c.description.push(i.description)):c.description?.length&&0<c.description.length?(c.shape=iLe,c.description===l?c.description=[i.description]:c.description=[c.description,i.description]):(c.shape=rLe,c.description=i.description),c.description=L.sanitizeTextOrArray(c.description,d)),1===c.description?.length&&c.shape===iLe&&("group"===c.type?c.shape=oLe:c.shape=rLe),!c.type&&i.doc&&(M.info("Setting cluster for XCX",l,ILe(i)),c.type="group",c.isGroup=!0,c.dir=ILe(i),c.shape=i.type===ZRe?sLe:oLe,c.cssClasses=c.cssClasses+` ${fLe} `+(t?mLe:"")),(h={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:ELe(l,NLe),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s}).shape===sLe&&(h.label=""),r&&"root"!==r.id&&(M.trace("Setting node ",l," to be child of its parent ",r.id),h.parentId=r.id),h.centerLabel=!0,i.note){u={labelStyle:"",shape:lLe,label:i.note.text,cssClasses:gLe,cssStyles:[],cssCompiledStyles:[],id:l+wLe+"-"+NLe,domId:ELe(l,NLe,vLe),type:c.type,isGroup:"group"===c.type,padding:d.flowchart?.padding,look:s,position:i.note.position},r=l+TLe,d={labelStyle:"",shape:cLe,label:i.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+TLe,domId:ELe(l,NLe,yLe),type:"group",isGroup:!0,padding:16,look:s,position:i.note.position},NLe++,u.parentId=d.id=r,_Le(n,d,o),_Le(n,u,o),_Le(n,h,o);let e=l,t=u.id;"left of"===i.note.position&&(e=u.id,t=l),a.push({id:e+"-"+t,start:e,end:t,arrowhead:"none",arrowTypeEnd:"",style:QRe,labelStyle:"",classes:pLe,arrowheadStyle:JRe,labelpos:"c",labelType:eLe,thickness:tLe,look:s})}else _Le(n,h,o)}i.doc&&(M.trace("Adding nodes children "),DLe(i,i.doc,e,n,a,!t,s,o))},"dataFetcher"),OLe=mt(()=>{LLe.clear(),NLe=0},"reset")}),gNe=x(()=>{Cu(),e(),aO(),Jhe(),eue(),a_(),SLe(),PLe=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"),$Le=mt(function(e,t){return t.db.getClasses()},"getClasses"),BLe=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=YM(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 Phe(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 <a> 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)}t_.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Bhe(l,8,hLe,a?.useMaxWidth??!0)},"draw"),FLe={getClasses:$Le,draw:BLe,getDir:PLe}}),fNe=x(()=>{Cu(),e(),a_(),Pc(),ku(),pNe(),gNe(),SLe(),zLe={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},qLe=mt(()=>new Map,"newClassesList"),ULe=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),GLe=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),jLe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=qLe(),this.documents={root:ULe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=vh,this.setAccTitle=yh,this.getAccDescription=xh,this.setAccDescription=bh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,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 jRe:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case YRe:this.addRelation(t.state1,t.state2,t.description);break;case VRe:this.addStyleClass(t.id.trim(),t.classes);break;case HRe:this.handleStyleDef(t);break;case XRe: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();OLe(),MLe(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&&0<r.description.length)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){var t,r,i=e.id.trim().split(","),n=e.styleClass.split(",");for(t of i){let e=this.getState(t);e||(r=t.trim(),this.addState(r),e=this.getState(r)),e&&(e.styles=n.map(e=>e.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===YRe)this.docTranslator(r,i.state1,!0),this.docTranslator(r,i.state2,!1);else if(i.stmt===jRe&&(i.id===zLe.START_NODE?(i.id=r.id+(e?"_start":"_end"),i.start=e):i.id=i.id.trim()),(i.stmt===WRe||i.stmt===jRe)&&i.doc){let e=[],t=[];for(var n of i.doc){var a;n.type===ZRe?((a=GLe(n)).doc=GLe(t),e.push(a),t=[]):t.push(n)}0<e.length&&0<t.length&&(r={stmt:jRe,id:GE(),type:"divider",doc:GLe(t)},e.push(GLe(r)),i.doc=e),i.doc.forEach(e=>this.docTranslator(i,e,!0))}}getRootDocV2(){return this.docTranslator({id:WRe,stmt:WRe},{id:WRe,stmt:WRe,doc:this.rootDoc},!0),{id:WRe,doc:this.rootDoc}}addState(e,t=KRe,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:jRe,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:ULe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=qLe(),e||(this.links=new Map,mh())}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===zLe.START_NODE?(this.startEndCount++,""+zLe.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=KRe){return e===zLe.START_NODE?zLe.START_TYPE:t}endIdIfNeeded(e=""){return e===zLe.END_NODE?(this.startEndCount++,""+zLe.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=KRe){return e===zLe.END_NODE?zLe.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(zLe.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(zLe.COLOR_KEYWORD).exec(e)&&(e=t.replace(zLe.FILL_KEYWORD,zLe.BG_FILL).replace(zLe.COLOR_KEYWORD,zLe.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:PLe(this.getRootDocV2())}}getConfig(){return O().state}}}),mNe=x(()=>{WLe=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"),YLe=WLe}),yNe=x(()=>{aT(),fNe(),a_(),Pc(),Cu(),e(),VLe=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"),HLe=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"),XLe=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"),KLe=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"),ZLe=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<c&&(u=(s-h)/2+i),Math.abs(o-d.x)<i&&s<c&&(u=o-(c-s)/2),t=1-O().state.textHeight,e.insert("rect",":first-child").attr("x",u).attr("y",t).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+O().state.textHeight+O().state.titleShift+1).attr("rx","0"),l.attr("x",u+i),c<=s&&l.attr("x",o+(h-n)/2-c/2+i),e.insert("rect",":first-child").attr("x",u).attr("y",O().state.titleShift-O().state.textHeight-O().state.padding).attr("width",h).attr("height",3*O().state.textHeight).attr("rx",O().state.radius),e.insert("rect",":first-child").attr("x",u).attr("y",O().state.titleShift-O().state.textHeight-O().state.padding).attr("width",h).attr("height",d.height+3+2*O().state.textHeight).attr("rx",O().state.radius),e},"addTitleAndBox"),QLe=mt(e=>(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"),JLe=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"),eNe=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,"<br/>")),o=(s=s.replace(/\n/g,"<br/>")).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"),tNe=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}=eNe(e,0,0,t);return r.attr("height",t+2*O().state.noteMargin),r.attr("width",e+2*O().state.noteMargin),r},"drawNote"),rNe=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&&VLe(e),"end"===t.type&&QLe(e),"fork"!==t.type&&"join"!==t.type||JLe(e,t),"note"===t.type&&tNe(t.note.text,e),"divider"===t.type&&HLe(e),"default"===t.type&&0===t.descriptions.length&&XLe(e,t),"default"===t.type&&0<t.descriptions.length&&KLe(e,t),e.node().getBBox());return r.width=i.width+2*O().state.padding,r.height=i.height+2*O().state.padding,r},"drawState"),iNe=0,nNe=mt(function(c,h,u){var d=mt(function(e){switch(e){case jLe.relationType.AGGREGATION:return"aggregation";case jLe.relationType.EXTENSION:return"extension";case jLe.relationType.COMPOSITION:return"composition";case jLe.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(e=>!Number.isNaN(e.y));let e=h.points,t=i3().x(function(e){return e.x}).y(function(e){return e.y}).curve(b3),r=c.append("path").attr("d",t(e)).attr("id","edge"+iNe).attr("class","transition"),i="";if(O().state.arrowMarkerAbsolute&&(i=fc(!0)),r.attr("marker-end","url("+i+"#"+d(jLe.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:i}=t_.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(1<n.length){let r=(n.length-1)*a*.5;s.forEach((e,t)=>e.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)}iNe++},"drawEdge")}),vNe=x(()=>{aT(),bK(),sV(),e(),Pc(),yNe(),Cu(),ch(),sNe={},oNe=mt(function(){},"setConf"),lNe=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"),cNe=mt(function(e,t,r,i){aNe=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=(lNe(e),i.db.getRootDoc()),t=(uNe(t,e,void 0,!1,s,o,i),aNe.padding),o=(s=e.node().getBBox()).width+2*t;Qc(e,i=s.height+2*t,1.75*o,aNe.useMaxWidth),e.attr("viewBox",`${s.x-aNe.padding} ${s.y-aNe.padding} `+o+" "+i)},"draw"),hNe=mt(e=>e?e.length*aNe.fontSizeFactor:1,"getLabelWidth"),uNe=mt((e,t,r,i,n,a,s)=>{let o=new nV({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l<e.length;l++)if("relation"===e[l].stmt){c=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:aNe.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:aNe.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});var h,u=s.db.getStates(),d=s.db.getRelations();for(h of Object.keys(u)){var p,g,f=u[h];r&&(f.parentId=r);let e;f.doc?(g=t.append("g").attr("id",f.id).attr("class","stateGroup"),e=uNe(f.doc,g,f.id,!i,n,a,s),g=(g=ZLe(g,f,i)).node().getBBox(),e.width=g.width,e.height=g.height+aNe.padding/2,sNe[f.id]={y:aNe.compositTitleSize}):e=rNe(t,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=rNe(t,g,o),"left of"===f.note.position?(o.setNode(e.id+"-note",p),o.setNode(e.id,e)):(o.setNode(e.id,e),o.setNode(e.id+"-note",p)),o.setParent(e.id,e.id+"-group"),o.setParent(e.id+"-note",e.id+"-group")):o.setNode(e.id,e)}M.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(e){m++,M.debug("Setting edge",e),o.setEdge(e.id1,e.id2,{relation:e,width:hNe(e.title),height:aNe.labelHeight*L.getRows(e.title).length,labelpos:"c"},"id"+m)}),YX(o),M.debug("Graph after layout",o.nodes()),t.node());o.nodes().forEach(function(e){void 0!==e&&void 0!==o.node(e)?(M.warn("Node "+e+": "+JSON.stringify(o.node(e))),n.select("#"+y.id+" #"+e).attr("transform","translate("+(o.node(e).x-o.node(e).width/2)+","+(o.node(e).y+(sNe[e]?sNe[e].y:0)-o.node(e).height/2)+" )"),n.select("#"+y.id+" #"+e).attr("data-x-shift",o.node(e).x-o.node(e).width/2),a.querySelectorAll("#"+y.id+" #"+e+" .divider").forEach(e=>{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))),nNe(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*aNe.padding,v.height=d.height+2*aNe.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),dNe={setConf:oNe,draw:cNe}}),bNe={};dqe(bNe,{diagram:()=>xNe});var xNe,wNe=x(()=>{CLe(),fNe(),mNe(),vNe(),xNe={parser:GRe,get db(){return new jLe(1)},renderer:dNe,styles:YLe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),TNe={};dqe(TNe,{diagram:()=>kNe});var kNe,CNe,SNe,ENe,_Ne,ANe,RNe,LNe,NNe,DNe,INe,MNe,ONe,PNe,$Ne,BNe,FNe,zNe,qNe,UNe,GNe,jNe,WNe,YNe,VNe,HNe,XNe,KNe,ZNe,QNe,JNe,eDe=x(()=>{CLe(),fNe(),mNe(),gNe(),kNe={parser:GRe,get db(){return new jLe(2)},renderer:FLe,styles:YLe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),tDe=x(()=>{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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(CNe=new((e.prototype=i).Parser=e)).parser=CNe,SNe=CNe}),rDe=x(()=>{Cu(),ku(),ENe="",_Ne=[],ANe=[],RNe=[],LNe=mt(function(){_Ne.length=0,ANe.length=0,ENe="",RNe.length=0,mh()},"clear"),NNe=mt(function(e){ENe=e,_Ne.push(e)},"addSection"),DNe=mt(function(){return _Ne},"getSections"),INe=mt(function(){let e=$Ne(),t=0;for(;!e&&t<100;)e=$Ne(),t++;return ANe.push(...RNe),ANe},"getTasks"),MNe=mt(function(){let t=[];return ANe.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),ONe=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:ENe,type:ENe,people:t,task:e,score:i},RNe.push(t)},"addTask"),PNe=mt(function(e){e={section:ENe,type:ENe,description:e,task:e,classes:[]},ANe.push(e)},"addTaskOrg"),$Ne=mt(function(){let e=mt(function(e){return RNe[e].processed},"compileTask"),t=!0;for(var[r,i]of RNe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),BNe=mt(function(){return MNe()},"getActors"),FNe={getConfig:mt(()=>O().journey,"getConfig"),clear:LNe,setDiagramTitle:wh,getDiagramTitle:Th,setAccTitle:yh,getAccTitle:vh,setAccDescription:bh,getAccDescription:xh,addSection:NNe,getSections:DNe,getTasks:INe,addTask:ONe,addTaskOrg:PNe,getActors:BNe}}),iDe=x(()=>{nue(),zNe=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:""};
|
||
}
|
||
${Hhe()}
|
||
`,"getStyles"),qNe=zNe}),nDe=x(()=>{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(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*c-c*(u.length-1)/2,p=t.append("text").attr("x",r+n/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+n/2).attr("dy",d).text(u[e]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,i,n,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),c(e,t,r,i,n,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}aT(),lT(),UNe=mt(function(e,t){return Sw(e,t)},"drawRect"),GNe=mt(function(e,r){var t=e.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(e){var t=V5().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function n(e){var t=V5().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(e){e.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),mt(i,"smile"),mt(n,"sad"),mt(a,"ambivalent"),(3<r.score?i:r.score<3?n:a)(e),t},"drawFace"),jNe=mt(function(e,t){return(e=e.append("circle")).attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),WNe=mt(function(e,t){return _w(e,t)},"drawText"),YNe=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,WNe(e,t)},"drawLabel"),VNe=mt(function(e,t,r){var e=e.append("g"),i=Lw();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,UNe(e,i),ZNe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),HNe=-1,XNe=mt(function(e,r,t){let i=r.x+t.width/2,n=e.append("g"),a=(HNe++,n.append("line").attr("id","task"+HNe).attr("x1",i).attr("y1",r.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),GNe(n,{cx:i,cy:300+30*(5-r.score),score:r.score}),(e=Lw()).x=r.x,e.y=r.y,e.fill=r.fill,e.width=t.width,e.height=t.height,e.class="task task-type-"+r.num,e.rx=3,e.ry=3,UNe(n,e),r.x+14);r.people.forEach(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};jNe(n,t),a+=10}),ZNe(t)(r.task,n,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),KNe=mt(function(e,t){Ew(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),ZNe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},QNe=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"),JNe={drawRect:UNe,drawCircle:jNe,drawSection:VNe,drawText:WNe,drawLabel:YNe,drawTask:XNe,drawBackgroundRect:KNe,initGraphics:QNe}});function aDe(s){let i=O().journey,o=i.maxLabelWidth,l=(lDe=0,60);Object.keys(oDe).forEach(t=>{var e=oDe[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:oDe[t].position};JNe.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=JNe.drawText(s,t).node().getBoundingClientRect().width,lDe<e&&e>i.leftMargin-e&&(lDe=e)}),l+=Math.max(20,20*a.length)})}var sDe,oDe,lDe,cDe,hDe,uDe,dDe,pDe,gDe,fDe,mDe,yDe=x(()=>{aT(),nDe(),Cu(),ch(),sDe=mt(function(t){Object.keys(t).forEach(function(e){cDe[e]=t[e]})},"setConf"),oDe={},lDe=0,mt(aDe,"drawActorLegend"),cDe=O().journey,hDe=0,uDe=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=(dDe.init(),u.select("#"+t)),t=(JNe.initGraphics(u),i.db.getTasks()),d=i.db.getDiagramTitle(),i=i.db.getActors();for(h in oDe)delete oDe[h];let p=0;i.forEach(e=>{oDe[e]={color:cDe.actorColours[p%cDe.actorColours.length],position:p},p++}),aDe(u),hDe=cDe.leftMargin+lDe,dDe.insert(0,0,hDe,50*Object.keys(oDe).length),fDe(u,t,0);var i=dDe.getBounds(),t=(d&&u.append("text").text(d).attr("x",hDe).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),i.stopy-i.starty+2*cDe.diagramMarginY),g=hDe+i.stopx+2*cDe.diagramMarginX,d=(Qc(u,t,g,cDe.useMaxWidth),u.append("line").attr("x1",hDe).attr("y1",4*cDe.height).attr("x2",g-hDe-4).attr("y2",4*cDe.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"),dDe={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(dDe.data,"startx",i-t*o.boxMargin,Math.min),l.updateVal(dDe.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(dDe.data,"starty",n-t*o.boxMargin,Math.min),l.updateVal(dDe.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(dDe.data,"startx",n,Math.min),this.updateVal(dDe.data,"starty",r,Math.min),this.updateVal(dDe.data,"stopx",e,Math.max),this.updateVal(dDe.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")},pDe=cDe.sectionFills,gDe=cDe.sectionColours,fDe=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=pDe[o%pDe.length],h=o%pDe.length,c=gDe[o%gDe.length];let t=0,r=d.section;for(let e=u;e<i.length&&i[e].section==r;e++)t+=1;var p={x:u*n.taskMargin+u*n.width+hDe,y:50,text:d.section,fill:l,num:h,colour:c,taskCount:t};JNe.drawSection(e,p,n),a=d.section,o++}p=d.people.reduce((e,t)=>(oDe[t]&&(e[t]=oDe[t]),e),{}),d.x=u*n.taskMargin+u*n.width+hDe,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,JNe.drawTask(e,d,n),dDe.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),mDe={setConf:sDe,draw:uDe}}),vDe={};dqe(vDe,{diagram:()=>bDe});var bDe,xDe,wDe,TDe=x(()=>{tDe(),rDe(),iDe(),yDe(),bDe={parser:SNe,db:FNe,renderer:mDe,styles:qNe,init:mt(e=>{mDe.setConf(e.journey),FNe.clear()},"init")}}),kDe=x(()=>{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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(xDe=new((e.prototype=i).Parser=e)).parser=xDe,wDe=xDe}),CDe={};dqe(CDe,{addEvent:()=>PDe,addSection:()=>DDe,addTask:()=>ODe,addTaskOrg:()=>$De,clear:()=>NDe,default:()=>FDe,getCommonDb:()=>LDe,getSections:()=>IDe,getTasks:()=>MDe});var SDe,EDe,_De,ADe,RDe,LDe,NDe,DDe,IDe,MDe,ODe,PDe,$De,BDe,FDe,zDe=x(()=>{ku(),SDe="",EDe=0,_De=[],ADe=[],RDe=[],LDe=mt(()=>uh,"getCommonDb"),NDe=mt(function(){_De.length=0,ADe.length=0,SDe="",RDe.length=0,mh()},"clear"),DDe=mt(function(e){SDe=e,_De.push(e)},"addSection"),IDe=mt(function(){return _De},"getSections"),MDe=mt(function(){let e=BDe(),t=0;for(;!e&&t<100;)e=BDe(),t++;return ADe.push(...RDe),ADe},"getTasks"),ODe=mt(function(e,t,r){e={id:EDe++,section:SDe,type:SDe,task:e,score:t||0,events:r?[r]:[]},RDe.push(e)},"addTask"),PDe=mt(function(e){RDe.find(e=>e.id===EDe-1).events.push(e)},"addEvent"),$De=mt(function(e){e={section:SDe,type:SDe,description:e,task:e,classes:[]},ADe.push(e)},"addTaskOrg"),BDe=mt(function(){let e=mt(function(e){return RDe[e].processed},"compileTask"),t=!0;for(var[r,i]of RDe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),FDe={clear:NDe,getCommonDb:LDe,addSection:DDe,getSections:IDe,getTasks:MDe,addTask:ODe,addTaskOrg:$De,addEvent:PDe}});function qDe(e,o){e.each(function(){var t,r=V(this),i=r.text().split(/(\s+|<br>)/).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;e<i.length;e++)t=i[i.length-1-e],n.push(t),s.text(n.join(" ").trim()),(s.node().getComputedTextLength()>o||"<br>"===t)&&(n.pop(),s.text(n.join(" ").trim()),n="<br>"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var UDe,GDe,jDe,WDe,YDe,VDe,HDe,XDe,KDe,ZDe,QDe,JDe,eIe,tIe,rIe,iIe,nIe,aIe,sIe,oIe,lIe,cIe,hIe,uIe,dIe=x(()=>{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(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*c-c*(u.length-1)/2,p=t.append("text").attr("x",r+n/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+n/2).attr("dy",d).text(u[e]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,i,n,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),c(e,t,r,i,n,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}aT(),UDe=mt(function(e,t){return(e=e.append("rect")).attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),void 0!==t.class&&e.attr("class",t.class),e},"drawRect"),GDe=mt(function(e,r){var t=e.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(e){var t=V5().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function n(e){var t=V5().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(e){e.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),mt(i,"smile"),mt(n,"sad"),mt(a,"ambivalent"),(3<r.score?i:r.score<3?n:a)(e),t},"drawFace"),jDe=mt(function(e,t){return(e=e.append("circle")).attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),WDe=mt(function(e,t){var r=t.text.replace(/<br\s*\/?>/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"),YDe=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,WDe(e,t)},"drawLabel"),VDe=mt(function(e,t,r){var e=e.append("g"),i=QDe();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,UDe(e,i),JDe(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,XDe=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"),GDe(e,{cx:i,cy:300+30*(5-t.score),score:t.score}),(i=QDe()).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,UDe(e,i),JDe(r)(t.task,e,i.x,i.y,i.width,i.height,{class:"task"},r,t.colour)},"drawTask"),KDe=mt(function(e,t){UDe(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),ZDe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),QDe=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"),JDe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},eIe=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(qDe,"wrap"),tIe=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(qDe,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+")"),iIe(n,t,r,i),t},"drawNode"),rIe=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(qDe,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"),iIe=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"),nIe={drawRect:UDe,drawCircle:jDe,drawSection:VDe,drawText:WDe,drawLabel:YDe,drawTask:XDe,drawBackgroundRect:KDe,getTextObj:ZDe,getNoteRect:QDe,initGraphics:eIe,drawNode:tIe,getVirtualNodeHeight:rIe}}),pIe=x(()=>{aT(),dIe(),e(),Cu(),ch(),aIe=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),nIe.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=nIe.getVirtualNodeHeight(l,e,n),M.debug("sectionHeight before draw",e),p=Math.max(p,e+20)}),0),w=0;M.debug("tasks.length",c.length);for([u,d]of c.entries()){var T,k={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},k=nIe.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(T of d.events){var C={descr:T,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};e+=nIe.getVirtualNodeHeight(l,C,n)}0<d.events.length&&(e+=10*(d.events.length-1)),w=Math.max(w,e)}M.debug("maxSectionHeight before draw",p),M.debug("maxTaskHeight before draw",g),t&&0<t.length?t.forEach(t=>{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=nIe.drawNode(i,r,v,n);M.debug("sectionNode output",r),i.attr("transform",`translate(${m}, 50)`),y+=p+50,0<e.length&&sIe(l,e,v,m,y,g,n,x,w,p,!1),m+=200*Math.max(e.length,1),y=50,v++}):(b=!1,sIe(l,c,v,m,y,g,n,x,w,p,!0)),i=l.node().getBBox(),M.debug("bounds",i),h&&l.append("text").text(h).attr("x",i.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=b?p+g+150:g+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",f).attr("x2",i.width+3*a).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Jc(void 0,l,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),sIe=mt(function(e,t,r,i,n,a,s,o,l,c,h){for(var u of t){var d={descr:u.task,section:r,number:r,width:150,padding:20,maxHeight:a},p=(M.debug("taskNode",d),e.append("g").attr("class","taskWrapper")),d=nIe.drawNode(p,d,r,s).height;M.debug("taskHeight after draw",d),p.attr("transform",`translate(${i}, ${n})`),a=Math.max(a,d),u.events&&(p=e.append("g").attr("class","lineWrapper"),n+=100,oIe(e,u.events,r,i,n,s),n-=100,p.append("line").attr("x1",i+95).attr("y1",n+a).attr("x2",i+95).attr("y2",n+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),i+=200,h&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),oIe=mt(function(e,t,r,i,n,a){let s=0,o=n;n+=100;for(var l of t){var l={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50},c=(M.debug("eventNode",l),e.append("g").attr("class","eventWrapper")),l=nIe.drawNode(c,l,r,a).height;s+=l,c.attr("transform",`translate(${i}, ${n})`),n=n+10+l}return n=o,s},"drawEvents"),lIe={setConf:mt(()=>{},"setConf"),draw:aIe}}),gIe=x(()=>{Wr(),cIe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],vt(t["lineColor"+e])?t["lineColor"+e]=a(t["lineColor"+e],20):t["lineColor"+e]=kt(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var i=""+(17-3*e);r+=`
|
||
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
|
||
fill: ${t["cScale"+e]};
|
||
}
|
||
.section-${e-1} text {
|
||
fill: ${t["cScaleLabel"+e]};
|
||
}
|
||
.node-icon-${e-1} {
|
||
font-size: 40px;
|
||
color: ${t["cScaleLabel"+e]};
|
||
}
|
||
.section-edge-${e-1}{
|
||
stroke: ${t["cScale"+e]};
|
||
}
|
||
.edge-depth-${e-1}{
|
||
stroke-width: ${i};
|
||
}
|
||
.section-${e-1} line {
|
||
stroke: ${t["cScaleInv"+e]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.lineWrapper line{
|
||
stroke: ${t["cScaleLabel"+e]} ;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
`}return r},"genSections"),hIe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${cIe(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"),uIe=hIe}),fIe={};dqe(fIe,{diagram:()=>mIe});var mIe,yIe,vIe,bIe=x(()=>{kDe(),zDe(),pIe(),gIe(),mIe={db:CDe,renderer:lIe,parser:wDe,styles:uIe}}),xIe=x(()=>{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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};r.lexer=c,mt(e,"Parser"),(yIe=new((e.prototype=r).Parser=e)).parser=yIe,vIe=yIe});function wIe(e,t=0){return(TIe[e[t+0]]+TIe[e[t+1]]+TIe[e[t+2]]+TIe[e[t+3]]+"-"+TIe[e[t+4]]+TIe[e[t+5]]+"-"+TIe[e[t+6]]+TIe[e[t+7]]+"-"+TIe[e[t+8]]+TIe[e[t+9]]+"-"+TIe[e[t+10]]+TIe[e[t+11]]+TIe[e[t+12]]+TIe[e[t+13]]+TIe[e[t+14]]+TIe[e[t+15]]).toLowerCase()}var TIe,kIe=x(()=>{TIe=[];for(let e=0;e<256;++e)TIe.push((e+256).toString(16).slice(1));mt(wIe,"unsafeStringify")});function CIe(){if(!SIe){if("u"<typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");SIe=crypto.getRandomValues.bind(crypto)}return SIe(EIe)}var SIe,EIe,_Ie,AIe,RIe=x(()=>{EIe=new Uint8Array(16),mt(CIe,"rng")}),LIe=x(()=>{_Ie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),AIe={randomUUID:_Ie}});function NIe(e,t,r){if(AIe.randomUUID&&!t&&!e)return AIe.randomUUID();var i=(e=e||{}).random??e.rng?.()??CIe();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 wIe(i)}var DIe,IIe,MIe,OIe,PIe,$Ie,BIe,FIe,zIe=x(()=>{LIe(),RIe(),kIe(),mt(NIe,"v4"),DIe=NIe}),qIe=x(()=>{zIe()}),UIe=x(()=>{Cu(),qIe(),Pc(),e(),ti(),ii(),IIe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},MIe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=IIe,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<t)return this.nodes[e];return null}getMindmap(){return 0<this.nodes.length?this.nodes[0]:null}addNode(e,t,r,i){M.info("addNode",e,t,r,i);let n=!1,a=(0===this.nodes.length?(this.baseLevel=e,e=0,n=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,n=!1),O()),s=a.mindmap?.padding??Yt.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2}if(t={id:this.count++,nodeId:cc(t,a),level:e,descr:cc(r,a),type:i,children:[],width:a.mindmap?.maxNodeWidth??Yt.mindmap.maxNodeWidth,padding:s,isRoot:n},r=this.getParent(e))r.children.push(t);else if(!n)throw new Error(`There can be only one root. No parent could be found for ("${t.descr}")`);this.nodes.push(t)}getType(e,t){switch(M.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return")"===t?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){var t,r;e&&(t=O(),r=this.nodes[this.nodes.length-1],e.icon&&(r.icon=cc(e.icon,t)),e.class)&&(r.class=cc(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(0===e.level?e.section=void 0:e.section=t,e.children)for(var[r,i]of e.children.entries())r=0===e.level?r:t,this.assignSections(i,r)}flattenNodes(e,t){var r=["mindmap-node"],r=(!0===e.isRoot?r.push("section-root","section--1"):void 0!==e.section&&r.push("section-"+e.section),e.class&&r.push(e.class),r.join(" ")),i=mt(e=>{switch(e){case IIe.CIRCLE:return"mindmapCircle";case IIe.RECT:return"rect";case IIe.ROUNDED_RECT:return"rounded";case IIe.CLOUD:return"cloud";case IIe.BANG:return"bang";case IIe.HEXAGON:return"hexagon";case IIe.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),i={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,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===gr().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-"+DIe()}}getLogger(){return M}}}),GIe=x(()=>{e(),aO(),Jhe(),eue(),ti(),OIe=mt(async(e,t,r,i)=>{M.debug(`Rendering mindmap diagram
|
||
`+e);var n=(e=i.db).getData(),a=YM(t,n.config.securityLevel);n.type=i.type,n.layoutAlgorithm=$he(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 Phe(n,a),Bhe(a,n.config.mindmap?.padding??Yt.mindmap.padding,"mindmapDiagram",n.config.mindmap?.useMaxWidth??Yt.mindmap.useMaxWidth))},"draw"),PIe={draw:OIe}}),jIe=x(()=>{Wr(),$Ie=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],vt(t["lineColor"+e])?t["lineColor"+e]=a(t["lineColor"+e],20):t["lineColor"+e]=kt(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var i=""+(17-3*e);r+=`
|
||
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
|
||
fill: ${t["cScale"+e]};
|
||
}
|
||
.section-${e-1} text {
|
||
fill: ${t["cScaleLabel"+e]};
|
||
}
|
||
.node-icon-${e-1} {
|
||
font-size: 40px;
|
||
color: ${t["cScaleLabel"+e]};
|
||
}
|
||
.section-edge-${e-1}{
|
||
stroke: ${t["cScale"+e]};
|
||
}
|
||
.edge-depth-${e-1}{
|
||
stroke-width: ${i};
|
||
}
|
||
.section-${e-1} line {
|
||
stroke: ${t["cScaleInv"+e]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
`}return r},"genSections"),BIe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${$Ie(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"),FIe=BIe}),WIe={};dqe(WIe,{diagram:()=>YIe});var YIe,VIe,HIe,XIe,KIe,ZIe,QIe,JIe,eMe,tMe,rMe,iMe,nMe,aMe,sMe,oMe,lMe,cMe,hMe,uMe,dMe,pMe,gMe,fMe,mMe,yMe=x(()=>{xIe(),UIe(),GIe(),jIe(),YIe={get db(){return new MIe},renderer:PIe,parser:vIe,styles:FIe}}),vMe=x(()=>{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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return this.pushState("shapeData"),t.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,"<br/>"),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"),(VIe=new((e.prototype=r).Parser=e)).parser=VIe,HIe=VIe}),bMe=x(()=>{Cu(),Pc(),e(),ti(),z9(),XIe=[],KIe=[],ZIe=0,QIe={},JIe=mt(()=>{XIe=[],KIe=[],ZIe=0,QIe={}},"clear"),eMe=mt(e=>{if(0===XIe.length)return null;let t=XIe[0].level,r=null;for(let e=XIe.length-1;0<=e;e--)if(XIe[e].level===t&&(r=r||XIe[e]),XIe[e].level<t)throw new Error('Items without section detected, found section ("'+XIe[e].label+'")');return e===r?.level?null:r},"getSection"),tMe=mt(function(){return KIe},"getSections"),rMe=mt(function(){var e=[],r=tMe(),i=O();for(let t of r){var n,a={id:t.id,label:cc(t.label??"",i),isGroup:!0,ticket:t.ticket,shape:"kanbanSection",level:t.level,look:i.look};e.push(a);for(n of XIe.filter(e=>e.parentId===t.id)){var s={id:n.id,parentId:t.id,label:cc(n.label??"",i),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"),iMe=mt((e,t,r,i,n)=>{let a=O(),s=a.mindmap?.padding??Yt.mindmap.padding;switch(i){case nMe.ROUNDED_RECT:case nMe.RECT:case nMe.HEXAGON:s*=2}if(i={id:cc(t,a)||"kbn"+ZIe++,level:e,label:cc(r,a),width:a.mindmap?.maxNodeWidth??Yt.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(`
|
||
`)?n+`
|
||
`:`{
|
||
`+n+`
|
||
}`,(t=F9(n,{schema:B9})).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=eMe(e))?i.parentId=r.id||"kbn"+ZIe++:KIe.push(i),XIe.push(i)},"addNode"),nMe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},aMe=mt((e,t)=>{switch(M.debug("In get type",e,t),e){case"[":return nMe.RECT;case"(":return")"===t?nMe.ROUNDED_RECT:nMe.CLOUD;case"((":return nMe.CIRCLE;case")":return nMe.CLOUD;case"))":return nMe.BANG;case"{{":return nMe.HEXAGON;default:return nMe.DEFAULT}},"getType"),sMe=mt((e,t)=>{QIe[e]=t},"setElementForId"),oMe=mt(e=>{var t,r;e&&(t=O(),r=XIe[XIe.length-1],e.icon&&(r.icon=cc(e.icon,t)),e.class)&&(r.cssClasses=cc(e.class,t))},"decorateNode"),lMe=mt(e=>{switch(e){case nMe.DEFAULT:return"no-border";case nMe.RECT:return"rect";case nMe.ROUNDED_RECT:return"rounded-rect";case nMe.CIRCLE:return"circle";case nMe.CLOUD:return"cloud";case nMe.BANG:return"bang";case nMe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),cMe=mt(()=>M,"getLogger"),hMe=mt(e=>QIe[e],"getElementById"),uMe={clear:JIe,addNode:iMe,getSections:tMe,getData:rMe,nodeType:nMe,getType:aMe,setElementForId:sMe,decorateNode:oMe,type2Str:lMe,getLogger:cMe,getElementById:hMe}}),xMe=x(()=>{Cu(),e(),s_e(),ch(),ti(),oO(),lP(),dMe=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=JEe(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 tO(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 rP(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await sP(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)}Jc(void 0,e,s.mindmap?.padding??Yt.kanban.padding,s.mindmap?.useMaxWidth??Yt.kanban.useMaxWidth)},"draw"),pMe={draw:dMe}}),wMe=x(()=>{Wr(),nue(),gMe=mt(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],vt(r["lineColor"+e])?r["lineColor"+e]=a(r["lineColor"+e],20):r["lineColor"+e]=kt(r["lineColor"+e],20);var i=mt((e,t)=>(r.darkMode?kt:a)(e,t),"adjuster");for(let e=0;e<r.THEME_COLOR_LIMIT;e++){var n=""+(17-3*e);t+=`
|
||
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
|
||
fill: ${i(r["cScale"+e],10)};
|
||
stroke: ${i(r["cScale"+e],10)};
|
||
|
||
}
|
||
.section-${e-1} text {
|
||
fill: ${r["cScaleLabel"+e]};
|
||
}
|
||
.node-icon-${e-1} {
|
||
font-size: 40px;
|
||
color: ${r["cScaleLabel"+e]};
|
||
}
|
||
.section-edge-${e-1}{
|
||
stroke: ${r["cScale"+e]};
|
||
}
|
||
.edge-depth-${e-1}{
|
||
stroke-width: ${n};
|
||
}
|
||
.section-${e-1} line {
|
||
stroke: ${r["cScaleInv"+e]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${r.background};
|
||
stroke: ${r.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.kanban-ticket-link {
|
||
fill: ${r.background};
|
||
stroke: ${r.nodeBorder};
|
||
text-decoration: underline;
|
||
}
|
||
`}return t},"genSections"),fMe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${gMe(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;
|
||
}
|
||
${Hhe()}
|
||
`,"getStyles"),mMe=fMe}),TMe={};dqe(TMe,{diagram:()=>kMe});var kMe,CMe,SMe,EMe,_Me,AMe,RMe,LMe,NMe,DMe,IMe,MMe,OMe,PMe,$Me,BMe=x(()=>{vMe(),bMe(),xMe(),wMe(),kMe={db:uMe,renderer:pMe,parser:HIe,styles:mMe}}),FMe=x(()=>{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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};n.lexer=r,mt(e,"Parser"),(CMe=new((e.prototype=n).Parser=e)).parser=CMe,SMe=CMe}),zMe=x(()=>{Cu(),Pc(),ku(),EMe=[],_Me=[],AMe=new Map,RMe=mt(()=>{EMe=[],_Me=[],AMe=new Map,mh()},"clear"),LMe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},NMe=mt((e,t,r)=>{EMe.push(new LMe(e,t,r))},"addLink"),DMe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},IMe=mt(e=>{e=L.sanitizeText(e,O());let t=AMe.get(e);return void 0===t&&(t=new DMe(e),AMe.set(e,t),_Me.push(t)),t},"findOrCreateNode"),MMe=mt(()=>_Me,"getNodes"),OMe=mt(()=>EMe,"getLinks"),PMe=mt(()=>({nodes:_Me.map(e=>({id:e.ID})),links:EMe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),$Me={nodesMap:AMe,getConfig:mt(()=>O().sankey,"getConfig"),getNodes:MMe,getLinks:OMe,getGraph:PMe,addLink:NMe,findOrCreateNode:IMe,getAccTitle:vh,setAccTitle:yh,getAccDescription:xh,setAccDescription:bh,getDiagramTitle:Th,setDiagramTitle:wh,clear:RMe}});function qMe(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 UMe=x(()=>{mt(qMe,"max")});function GMe(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 jMe=x(()=>{mt(GMe,"min")});function WMe(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 YMe=x(()=>{mt(WMe,"sum")}),VMe=x(()=>{UMe(),jMe(),YMe()});function HMe(e){return e.target.depth}function XMe(e){return e.depth}function KMe(e,t){return t-1-e.height}function ZMe(e,t){return e.sourceLinks.length?e.depth:t-1}function QMe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?GMe(e.sourceLinks,HMe)-1:0}var JMe=x(()=>{VMe(),mt(HMe,"targetDepth"),mt(XMe,"left"),mt(KMe,"right"),mt(ZMe,"justify"),mt(QMe,"center")});function eOe(e){return function(){return e}}var tOe=x(()=>{mt(eOe,"constant")});function rOe(e,t){return nOe(e.source,t.source)||e.index-t.index}function iOe(e,t){return nOe(e.target,t.target)||e.index-t.index}function nOe(e,t){return e.y0-t.y0}function aOe(e){return e.value}function sOe(e){return e.index}function oOe(e){return e.nodes}function lOe(e){return e.links}function cOe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function hOe({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 uOe(){let o=0,l=0,c=1,h=1,u=24,n=8,d,p=sOe,g=ZMe,f,m,t=oOe,r=lOe,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),T(e),hOe(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(WMe(t.sourceLinks,aOe),WMe(t.targetLinks,aOe)):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=qMe(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 w(e){var r,i=GMe(e,e=>(h-l-(e.length-1)*d)/WMe(e,aOe));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;e<r.length;++e){var s=r[e];s.y0+=t*(e+1),s.y1+=t*(e+1)}R(r)}}function T(e){var t=x(e);d=Math.min(n,(h-l)/(qMe(t,e=>e.length)-1)),w(t);for(let e=0;e<a;++e){var r=Math.pow(.99,e),i=Math.max(1-r,(e+1)/a);C(t,r,i),k(t,r,i)}}function k(r,i,n){for(let e=1,t=r.length;e<t;++e){var a,s,o=r[e];for(a of o){let e=0,t=0;for(var{source:l,value:c}of a.targetLinks)c*=a.layer-l.layer,e+=L(l,a)*c,t+=c;0<t&&(s=(e/t-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(nOe),S(o,n)}}function C(r,i,n){for(let e=r.length,t=e-2;0<=t;--t){var a,s,o=r[t];for(a of o){let e=0,t=0;for(var{target:l,value:c}of a.sourceLinks)c*=l.layer-a.layer,e+=N(a,l)*c,t+=c;0<t&&(s=(e/t-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(nOe),S(o,n)}}function S(e,t){var r=e.length>>1,i=e[r];_(e,i.y0-d,r-1,t),E(e,i.y1+d,1+r,t),_(e,h,e.length-1,t),E(e,l,0,t)}function E(e,t,r,i){for(;r<e.length;++r){var n=e[r],a=(t-n.y0)*i;1e-6<a&&(n.y0+=a,n.y1+=a),t=n.y1+d}}function _(e,t,r,i){for(;0<=r;--r){var n=e[r],a=(n.y1-t)*i;1e-6<a&&(n.y0-=a,n.y1-=a),t=n.y0-d}}function A({sourceLinks:e,targetLinks:t}){if(void 0===m){for(var{source:{sourceLinks:r}}of t)r.sort(iOe);for(var{target:{targetLinks:i}}of e)i.sort(rOe)}}function R(e){if(void 0===m)for(var{sourceLinks:t,targetLinks:r}of e)t.sort(iOe),r.sort(rOe)}function L(e,t){let r=e.y0-(e.sourceLinks.length-1)*d/2;for(var{target:i,width:n}of e.sourceLinks){if(i===t)break;r+=n+d}for(var{source:a,width:s}of t.targetLinks){if(a===e)break;r-=s}return r}function N(e,t){let r=t.y0-(t.targetLinks.length-1)*d/2;for(var{source:i,width:n}of t.targetLinks){if(i===e)break;r+=n+d}for(var{target:a,width:s}of e.sourceLinks){if(a===t)break;r-=s}return r}return mt(i,"sankey"),i.update=function(e){return hOe(e),e},i.nodeId=function(e){return arguments.length?(p="function"==typeof e?e:eOe(e),i):p},i.nodeAlign=function(e){return arguments.length?(g="function"==typeof e?e:eOe(e),i):g},i.nodeSort=function(e){return arguments.length?(f=e,i):f},i.nodeWidth=function(e){return arguments.length?(u=+e,i):u},i.nodePadding=function(e){return arguments.length?(n=d=+e,i):n},i.nodes=function(e){return arguments.length?(t="function"==typeof e?e:eOe(e),i):t},i.links=function(e){return arguments.length?(r="function"==typeof e?e:eOe(e),i):r},i.linkSort=function(e){return arguments.length?(m=e,i):m},i.size=function(e){return arguments.length?(o=l=0,c=+e[0],h=+e[1],i):[c-o,h-l]},i.extent=function(e){return arguments.length?(o=+e[0][0],c=+e[1][0],l=+e[0][1],h=+e[1][1],i):[[o,l],[c,h]]},i.iterations=function(e){return arguments.length?(a=+e,i):a},mt(s,"computeNodeLinks"),mt(y,"computeNodeValues"),mt(v,"computeNodeDepths"),mt(b,"computeNodeHeights"),mt(x,"computeNodeLayers"),mt(w,"initializeNodeBreadths"),mt(T,"computeNodeBreadths"),mt(k,"relaxLeftToRight"),mt(C,"relaxRightToLeft"),mt(S,"resolveCollisions"),mt(E,"resolveCollisionsTopToBottom"),mt(_,"resolveCollisionsBottomToTop"),mt(A,"reorderNodeLinks"),mt(R,"reorderLinks"),mt(L,"targetTop"),mt(N,"sourceTop"),i}var dOe=x(()=>{VMe(),JMe(),tOe(),mt(rOe,"ascendingSourceBreadth"),mt(iOe,"ascendingTargetBreadth"),mt(nOe,"ascendingBreadth"),mt(aOe,"value"),mt(sOe,"defaultId"),mt(oOe,"defaultNodes"),mt(lOe,"defaultLinks"),mt(cOe,"find"),mt(hOe,"computeLinkBreadths"),mt(uOe,"Sankey")});function pOe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function gOe(){return new pOe}var fOe,mOe,yOe,vOe,bOe=x(()=>{fOe=Math.PI,yOe=(mOe=2*fOe)-1e-6,mt(pOe,"Path"),mt(gOe,"path"),pOe.prototype=gOe.prototype={constructor:pOe,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<p&&(1e-6<Math.abs(d*c-h*u)&&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((fOe-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,1e-6<Math.abs(p-1)&&(this._+="L"+(e+p*u)+","+(t+p*d)),this._+="A"+n+","+n+",0,0,"+ +(u*o<d*r)+","+(this._x1=e+i*c)+","+(this._y1=t+i*h)):this._+="L"+(this._x1=e)+","+(this._y1=t))},"arcTo"),arc:mt(function(e,t,r,i,n,a){e=+e,t=+t,a=!!a;var s=(r=+r)*Math.cos(i),o=r*Math.sin(i),l=e+s,c=t+o,h=1^a,a=a?i-n:n-i;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(1e-6<Math.abs(this._x1-l)||1e-6<Math.abs(this._y1-c))&&(this._+="L"+l+","+c),r&&(yOe<(a=a<0?a%mOe+mOe:a)?this._+="A"+r+","+r+",0,1,"+h+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +(fOe<=a)+","+h+","+(this._x1=e+r*Math.cos(n))+","+(this._y1=t+r*Math.sin(n))))},"arc"),rect:mt(function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},"rect"),toString:mt(function(){return this._},"toString")},vOe=gOe}),xOe=x(()=>{bOe()});function wOe(e){return mt(function(){return e},"constant")}var TOe=x(()=>{mt(wOe,"default")});function kOe(e){return e[0]}function COe(e){return e[1]}var SOe,EOe=x(()=>{mt(kOe,"x"),mt(COe,"y")}),_Oe=x(()=>{SOe=Array.prototype.slice});function AOe(e){return e.source}function ROe(e){return e.target}function LOe(n){var a=AOe,s=ROe,o=kOe,l=COe,c=null;function t(){var e,t=SOe.call(arguments),r=a.apply(this,t),i=s.apply(this,t);if(c=c||(e=vOe()),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:wOe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:wOe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function NOe(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function DOe(){return LOe(NOe)}var IOe=x(()=>{xOe(),_Oe(),TOe(),EOe(),mt(AOe,"linkSource"),mt(ROe,"linkTarget"),mt(LOe,"link"),mt(NOe,"curveHorizontal"),mt(DOe,"linkHorizontal")}),MOe=x(()=>{IOe()});function OOe(e){return[e.source.x1,e.y0]}function POe(e){return[e.target.x0,e.y1]}function $Oe(){return DOe().source(OOe).target(POe)}var BOe,FOe,zOe,qOe,UOe,GOe,jOe,WOe=x(()=>{MOe(),mt(OOe,"horizontalSource"),mt(POe,"horizontalTarget"),mt($Oe,"default")}),YOe=x(()=>{dOe(),JMe(),WOe()}),VOe=x(()=>{BOe=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+")"}}}),HOe=x(()=>{Cu(),aT(),YOe(),ch(),VOe(),FOe={left:XMe,right:KMe,center:QMe,justify:ZMe},zOe=mt(function(e,t,r,i){let{securityLevel:n,sankey:a}=O(),s=Eh.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=FOe[p],b=(uOe().nodeId(e=>e.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),vb(v5));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=BOe.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<h/2?e.x1+6:e.x0-6).attr("y",e=>(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>e.x0<h/2?"start":"end").text(t),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),x=a?.linkColor??"gradient";"gradient"===x&&((t=i.append("linearGradient").attr("id",e=>(e.uid=BOe.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 w;switch(x){case"gradient":w=mt(e=>e.uid,"coloring");break;case"source":w=mt(e=>b(e.source.id),"coloring");break;case"target":w=mt(e=>b(e.target.id),"coloring");break;default:w=x}i.append("path").attr("d",$Oe()).attr("stroke",w).attr("stroke-width",e=>Math.max(1,e.width)),Jc(void 0,c,0,d)},"draw"),qOe={draw:zOe}}),XOe=x(()=>{UOe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
||
`).trim(),"prepareTextForParsing")}),KOe=x(()=>{GOe=mt(e=>`.label {
|
||
font-family: ${e.fontFamily};
|
||
}`,"getStyles"),jOe=GOe}),ZOe={};dqe(ZOe,{diagram:()=>JOe});var QOe,JOe,ePe,tPe,rPe,iPe,nPe,aPe,sPe,oPe,lPe,cPe,hPe=x(()=>{FMe(),zMe(),HOe(),XOe(),KOe(),QOe=SMe.parse.bind(SMe),SMe.parse=e=>QOe(UOe(e)),JOe={styles:jOe,parser:SMe,db:$Me,renderer:qOe}}),uPe=x(()=>{ii(),ti(),a_(),ku(),ePe=Yt.packet,tPe=class{constructor(){this.packet=[],this.setAccTitle=yh,this.getAccTitle=vh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,this.getAccDescription=xh,this.setAccDescription=bh}static{mt(this,"PacketDB")}getConfig(){var e=_E({...ePe,...sr().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){0<e.length&&this.packet.push(e)}clear(){mh(),this.packet=[]}}}),dPe=x(()=>{$7e(),e(),q7e(),uPe(),rPe=mt((e,t)=>{B7e(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<s)throw new Error(`Packet block ${s} - ${o} is invalid. End must be greater than start.`);if((s??=r+1)!==r+1)throw new Error(`Packet block ${s} - ${o??s} is not contiguous. It should start from ${r+1}.`);if(0===l)throw new Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(o??=s+(l??1)-1,l??=o-s+1,r=o,M.debug(`Packet block ${s} - ${r} with label `+c);i.length<=a+1&&t.getPacket().length<1e4;){var[h,u]=iPe({start:s,end:o,bits:l,label:c},n,a);if(i.push(h),h.end+1===n*a&&(t.pushWord(i),i=[],n++),!u)break;({start:s,end:o,bits:l,label:c}=u)}}t.pushWord(i)},"populate"),iPe=mt((e,t,r)=>{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<e.start)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);var i;return e.end+1<=t*r?[e,void 0]:[{start:e.start,end:i=t*r-1,label:e.label,bits:i-e.start},{start:i=t*r,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),nPe={parser:{yy:void 0},parse:mt(async e=>{var e=await I7e("packet",e),t=nPe.parser?.yy;if(!(t instanceof tPe))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),rPe(e,t)},"parse")}}),pPe=x(()=>{s_e(),ch(),aPe=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=JEe(t);d.attr("viewbox",`0 0 ${c} `+o),Qc(d,o,c,s.useMaxWidth);for([n,a]of u.entries())sPe(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"),sPe=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"),oPe={draw:aPe}}),gPe=x(()=>{a_(),lPe={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=_E(lPe,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")}),fPe={};dqe(fPe,{diagram:()=>mPe});var mPe,yPe,vPe,bPe,xPe,wPe,TPe,kPe,CPe,SPe,EPe,_Pe,APe,RPe,LPe,NPe,DPe,IPe=x(()=>{uPe(),dPe(),pPe(),gPe(),mPe={parser:nPe,get db(){return new tPe},renderer:oPe,styles:cPe}}),MPe=x(()=>{ii(),ti(),a_(),ku(),vPe={axes:[],curves:[],options:yPe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},bPe=structuredClone(vPe),xPe=Yt.radar,wPe=mt(()=>_E({...xPe,...sr().radar}),"getConfig"),TPe=mt(()=>bPe.axes,"getAxes"),kPe=mt(()=>bPe.curves,"getCurves"),CPe=mt(()=>bPe.options,"getOptions"),SPe=mt(e=>{bPe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),EPe=mt(e=>{bPe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:_Pe(e.entries)}))},"setCurves"),_Pe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=TPe();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"),APe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),bPe.options={showLegend:e.showLegend?.value??yPe.showLegend,ticks:e.ticks?.value??yPe.ticks,max:e.max?.value??yPe.max,min:e.min?.value??yPe.min,graticule:e.graticule?.value??yPe.graticule}},"setOptions"),RPe=mt(()=>{mh(),bPe=structuredClone(vPe)},"clear"),LPe={getAxes:TPe,getCurves:kPe,getOptions:CPe,setAxes:SPe,setCurves:EPe,setOptions:APe,getConfig:wPe,clear:RPe,setAccTitle:yh,getAccTitle:vh,setDiagramTitle:wh,getDiagramTitle:Th,getAccDescription:xh,setAccDescription:bh}}),OPe=x(()=>{$7e(),e(),q7e(),MPe(),NPe=mt(e=>{B7e(e,LPe);var{axes:e,curves:t,options:r}=e;LPe.setAxes(e),LPe.setCurves(t),LPe.setOptions(r)},"populate"),DPe={parse:mt(async e=>{e=await I7e("radar",e),M.debug(e),NPe(e)},"parse")}});function PPe(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=$Pe(e,i,n,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",BPe(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 $Pe(e,t,r,i){return i*(Math.min(Math.max(e,t),r)-t)/(r-t)}function BPe(t,r){let i=t.length,n=`M${t[0].x},`+t[0].y;for(let e=0;e<i;e++){var a=t[(e-1+i)%i],s=t[e],o=t[(e+1)%i],l=t[(e+2)%i],c=s.x+(o.x-a.x)*r,a=s.y+(o.y-a.y)*r,h=o.x-(l.x-s.x)*r;n+=` C${c},${a} ${h},${o.y-(l.y-s.y)*r} ${o.x},`+o.y}return n+" Z"}function FPe(a,e,t,r){if(t){let i=3*(r.width/2+r.marginRight)/4,n=3*-(r.height/2+r.marginTop)/4;e.forEach((e,t)=>{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 zPe,qPe,UPe,GPe,jPe,WPe,YPe,VPe,HPe=x(()=>{s_e(),zPe=mt((e,t,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),t=JEe(t),t=qPe(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;UPe(t,n,h,s.ticks,s.graticule),GPe(t,n,h,o),PPe(t,n,a,c,l,s.graticule,o),FPe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),qPe=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n=t.marginLeft+t.width/2,t=t.marginTop+t.height/2;return e.attr("viewbox",`0 0 ${r} `+i).attr("width",r).attr("height",i),e.append("g").attr("transform",`translate(${n}, ${t})`)},"drawFrame"),UPe=mt((n,a,s,o,e)=>{if("circle"===e)for(let e=0;e<o;e++){var t=s*(e+1)/o;n.append("circle").attr("r",t).attr("class","radarGraticule")}else if("polygon"===e){let i=a.length;for(let t=0;t<o;t++){let r=s*(t+1)/o,e=a.map((e,t)=>(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"),GPe=mt((t,r,i,n)=>{var a=r.length;for(let e=0;e<a;e++){var s=r[e].label,o=2*e*Math.PI/a-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",i*n.axisScaleFactor*Math.cos(o)).attr("y2",i*n.axisScaleFactor*Math.sin(o)).attr("class","radarAxisLine"),t.append("text").text(s).attr("x",i*n.axisLabelFactor*Math.cos(o)).attr("y",i*n.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes"),mt(PPe,"drawCurves"),mt($Pe,"relativeRadius"),mt(BPe,"closedRoundCurve"),mt(FPe,"drawLegend"),jPe={draw:zPe}}),XPe=x(()=>{a_(),Kr(),ii(),WPe=mt((t,r)=>{let i="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var n=t["cScale"+e];i+=`
|
||
.radarCurve-${e} {
|
||
color: ${n};
|
||
fill: ${n};
|
||
fill-opacity: ${r.curveOpacity};
|
||
stroke: ${n};
|
||
stroke-width: ${r.curveStrokeWidth};
|
||
}
|
||
.radarLegendBox-${e} {
|
||
fill: ${n};
|
||
fill-opacity: ${r.curveOpacity};
|
||
stroke: ${n};
|
||
}
|
||
`}return i},"genIndexStyles"),YPe=mt(e=>{var t=_E(Pt(),sr().themeVariables);return{themeVariables:t,radarOptions:_E(t.radar,e)}},"buildRadarStyleOptions"),VPe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=YPe(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;
|
||
}
|
||
${WPe(e,t)}
|
||
`},"styles")}),KPe={};dqe(KPe,{diagram:()=>ZPe});var ZPe,QPe,JPe,e$e=x(()=>{MPe(),OPe(),HPe(),XPe(),ZPe={parser:DPe,db:LPe,renderer:jPe,styles:VPe}}),t$e=x(()=>{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"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var b,x,w,T,k,C,S,E={};;){if(w=i[i.length-1],"u"<typeof(T=this.defaultActions[w]||((null===b||"u"<typeof b)&&(b=v()),o[w]&&o[w][b]))||!T.length||!T[0]){var _,A=[];for(k in o[w])this.terminals_[k]&&2<k&&A.push("'"+this.terminals_[k]+"'");_=g.showPosition?"Parse error on line "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:m,expected:A})}if(T[0]instanceof Array&&1<T.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(T[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[T[1]][1],E.$=a[a.length-C],E._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,T[1],a,s].concat(p)))<"u")return S;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[T[1]][0]),a.push(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
||
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>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<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:case 41:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"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"),(QPe=new((e.prototype=h).Parser=e)).parser=QPe,JPe=QPe});function r$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 i$e(e){return"=="!==(M.debug("typeStr2Type",e),e)?"normal":"thick"}function n$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 a$e,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,w$e,T$e,k$e,C$e,S$e,E$e,_$e,A$e,R$e,L$e,N$e,D$e,I$e,M$e,O$e,P$e,$$e,B$e,F$e,z$e,q$e,U$e,G$e,j$e,W$e=x(()=>{kz(),ii(),Cu(),e(),Pc(),ku(),a$e=new Map,s$e=[],o$e=new Map,l$e=O(),c$e=new Map,h$e=mt(e=>L.sanitizeText(e,l$e),"sanitizeText"),u$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"),d$e=mt(function(e,t=""){e=a$e.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),p$e=mt(function(e,r){e.split(",").forEach(function(e){let t=a$e.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},a$e.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),g$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&&0<n&&"column-setting"!==r.type&&"number"==typeof r.widthInColumns&&r.widthInColumns>n&&M.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+n),r.label&&(r.label=h$e(r.label)),"classDef"===r.type)u$e(r.id,r.css);else if("applyClass"===r.type)p$e(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&d$e(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var a=(o$e.get(r.id)??0)+1;o$e.set(r.id,a),r.id=a+"-"+r.id,s$e.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=a$e.get(r.id))?a$e.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&g$e(r.children,r),"space"===r.type){var s=r.width??1;for(let e=0;e<s;e++){var o=Tz(r);o.id=o.id+"-"+e,a$e.set(o.id,o),i.push(o)}}else void 0===a&&i.push(r);t.children=i},"populateBlockDatabase"),f$e=[],m$e={id:"root",type:"composite",children:[],columns:-1},y$e=mt(()=>{M.debug("Clear called"),mh(),m$e={id:"root",type:"composite",children:[],columns:-1},a$e=new Map([["root",m$e]]),f$e=[],c$e=new Map,s$e=[],o$e=new Map},"clear"),mt(r$e,"typeStr2Type"),mt(i$e,"edgeTypeStr2Type"),mt(n$e,"edgeStrToEdgeData"),v$e=0,b$e=mt(()=>(v$e++,"id-"+Math.random().toString(36).substr(2,12)+"-"+v$e),"generateId"),x$e=mt(e=>{m$e.children=e,g$e(e,m$e),f$e=m$e.children},"setHierarchy"),w$e=mt(e=>(e=a$e.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),T$e=mt(()=>[...a$e.values()],"getBlocksFlat"),k$e=mt(()=>f$e||[],"getBlocks"),C$e=mt(()=>s$e,"getEdges"),S$e=mt(e=>a$e.get(e),"getBlock"),E$e=mt(e=>{a$e.set(e.id,e)},"setBlock"),A$e=mt(()=>M,"getLogger"),_$e=mt(function(){return c$e},"getClasses"),A$e={getConfig:mt(()=>sr().block,"getConfig"),typeStr2Type:r$e,edgeTypeStr2Type:i$e,edgeStrToEdgeData:n$e,getLogger:A$e,getBlocksFlat:T$e,getBlocks:k$e,getEdges:C$e,setHierarchy:x$e,getBlock:S$e,setBlock:E$e,getColumns:w$e,getClasses:_$e,clear:y$e,generateId:b$e},R$e=A$e}),Y$e=x(()=>{Wr(),nue(),L$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"),N$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};
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${e.edgeLabelBackground};
|
||
fill: ${e.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
|
||
/* For html labels only */
|
||
.labelBkg {
|
||
background-color: ${L$e(e.edgeLabelBackground,.5)};
|
||
// background-color:
|
||
}
|
||
|
||
.node .cluster {
|
||
// fill: ${L$e(e.mainBkg,.5)};
|
||
fill: ${L$e(e.clusterBkg,.5)};
|
||
stroke: ${L$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};
|
||
}
|
||
${Hhe()}
|
||
`,"getStyles"),D$e=N$e}),V$e=x(()=>{e(),I$e=mt((t,e,r,i)=>{e.forEach(e=>{G$e[e](t,r,i)})},"insertMarkers"),M$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"),O$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"),P$e=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"),$$e=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"),B$e=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"),F$e=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"),z$e=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"),q$e=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"),U$e=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"),G$e={extension:M$e,composition:O$e,aggregation:P$e,dependency:$$e,lollipop:B$e,point:F$e,circle:z$e,cross:q$e,barb:U$e},j$e=I$e});function H$e(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 X$e(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}),0<s.children?.length){for(var h of s.children)X$e(h,o);var u,d,p,g,f=eBe(s),m=f.width;M.debug("setBlockSizes abc95 maxWidth of",s.id,":s children is ",m,u=f.height);for(d of s.children)d.size&&(M.debug(`abc95 Setting size of children of ${s.id} id=${d.id} ${m} ${u} `+JSON.stringify(d.size)),d.size.width=m*(d.widthInColumns??1)+J$e*((d.widthInColumns??1)-1),d.size.height=u,d.size.x=0,d.size.y=0,M.debug(`abc95 updating size of ${s.id} children child:${d.id} maxWidth:${m} maxHeight:`+u));for(p of s.children)X$e(p,o,m,u);let e=s.columns??-1,t=0;for(g of s.children)t+=g.widthInColumns??1;let r=s.children.length,i=(0<e&&e<t&&(r=e),Math.ceil(t/r)),n=r*(m+J$e)+J$e,a=i*(u+J$e)+J$e;if(n<l){M.debug(`Detected to small sibling: abc95 ${s.id} siblingWidth ${l} siblingHeight ${c} width `+n),n=l,a=c;var y,v=(l-r*J$e-J$e)/r,b=(c-i*J$e-J$e)/i;M.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),M.debug("Size indata abc88",s.id,"childHeight",b,"maxHeight",u),M.debug("Size indata abc88 xSize",r,"padding",J$e);for(y of s.children)y.size&&(y.size.width=v,y.size.height=b,y.size.x=0,y.size.y=0)}if(M.debug(`abc95 (finale calc) ${s.id} xSize ${r} ySize ${i} columns ${e}${s.children.length} width=`+Math.max(n,s.size?.width||0)),n<(s?.size?.width||0)&&(n=s?.size?.width||0,0<(f=0<e?Math.min(s.children.length,e):s.children.length))){var x,w=(n-f*J$e-J$e)/f;M.debug("abc95 (growing to fit) width",s.id,n,s.size?.width,w);for(x of s.children)x.size&&(x.size.width=w)}s.size={width:n,height:a,x:0,y:0}}M.debug("setBlockSizes abc94 (done)",s.id,s?.size?.x,s?.size?.width,s?.size?.y,s?.size?.height)}function K$e(n,a){M.debug(`abc85 layout blocks (=>layoutBlocks) ${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&&0<n.children.length){var o,e=n?.children[0]?.size?.width??0,e=n.children.length*e+(n.children.length-1)*J$e;M.debug("widthOfChildren 88",e,"posX");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):-J$e),i=0;for(o of n.children){var l=n;if(o.size){var{width:c,height:h}=o.size,{px:u,py:d}=H$e(s,t);d!=i&&(i=d,r=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-J$e,M.debug("New row in layout for block",n.id," and child ",o.id,i)),M.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${t} (px, py) ${u},${d} (${l?.size?.x},${l?.size?.y}) parent: ${l.id} width: `+c+J$e),l.size&&(u=c/2,o.size.x=r+J$e+u,M.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${r} new startingPosX${o.size.x} ${u} padding=${J$e} width=${c} halfWidth=${u} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 `+c*(o?.widthInColumns??1)/2),r=o.size.x+u,o.size.y=l.size.y-l.size.height/2+d*(h+J$e)+h/2+J$e,M.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${r}${J$e}${u}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2`+c*(o?.widthInColumns??1)/2)),o.children&&K$e(o,a);let e=o?.widthInColumns??1;0<s&&(e=Math.min(e,s-t%s)),t+=e,M.debug("abc88 columnsPos",o,t)}}}M.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function Z$e(e,{minX:t,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(e.size&&"root"!==e.id&&({x:a,y:s,width:o,height:l}=e.size,a-o/2<t&&(t=a-o/2),s-l/2<r&&(r=s-l/2),i<a+o/2&&(i=a+o/2),n<s+l/2)&&(n=s+l/2),e.children)for(var c of e.children)({minX:t,minY:r,maxX:i,maxY:n}=Z$e(c,{minX:t,minY:r,maxX:i,maxY:n}));return{minX:t,minY:r,maxX:i,maxY:n}}function Q$e(e){var t,r,i=e.getBlock("root");if(i)return X$e(i,e,0,0),K$e(i,e),M.debug("getBlocks",JSON.stringify(i,null,2)),{minX:e,minY:i,maxX:t,maxY:r}=Z$e(i),{x:e,y:i,width:t-e,height:r-i}}var J$e,eBe,tBe=x(()=>{e(),Cu(),J$e=O()?.block?.padding??8,mt(H$e,"calculateBlockPosition"),eBe=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/(e.widthInColumns??1)),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(X$e,"setBlockSizes"),mt(K$e,"layoutBlocks"),mt(Z$e,"findBounds"),mt(Q$e,"layout")});function rBe(e,t){t&&e.attr("style",t)}function iBe(e,t){var r=V(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=r.append("xhtml:div"),n=e.label,a=e.isNode?"nodeLabel":"edgeLabel",s=i.append("span");return s.html(cc(n,t)),rBe(s,e.labelStyle),s.attr("class",a),rBe(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}var nBe,aBe,sBe,oBe,lBe,cBe=x(()=>{aT(),Cu(),Pc(),e(),eL(),a_(),mt(rBe,"applyStyle"),mt(iBe,"addHtmlLabel"),nBe=mt(async(e,t,r,i)=>{let n=e||"";if("object"==typeof n&&(n=n[0]),e=O(),mc(e.flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"<br />"),M.debug("vertexText"+n),iBe({isNode:i,label:await QR(i_(n)),labelStyle:t.replace("fill:","color:")},e);var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),aBe=nBe}),hBe=x(()=>{e(),sBe=mt((e,t,r,i,n)=>{t.arrowTypeStart&&lBe(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&lBe(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),oBe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},lBe=mt((e,t,r,i,n,a)=>{var s=oBe[r];s?e.attr("marker-"+t,`url(${i}#${n}_${a}-${s}${"start"===t?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function uBe(e,t){O().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var dBe,pBe,gBe,fBe,mBe,yBe,vBe,bBe,xBe,wBe,TBe=x(()=>{e(),cBe(),eL(),aT(),Cu(),a_(),Pc(),mO(),sO(),hBe(),dBe={},pBe={},gBe=mt(async(e,t)=>{var r,i=O(),n=mc(i.flowchart.htmlLabels),i="markdown"===t.labelType?JR(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},i):await aBe(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=V(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),dBe[t.id]=a,t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(n=await aBe(t.startLabelLeft,t.labelStyle),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),pBe[t.id]||(pBe[t.id]={}),pBe[t.id].startLeft=r,uBe(l,t.startLabelLeft)),t.startLabelRight&&(n=await aBe(t.startLabelRight,t.labelStyle),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),pBe[t.id]||(pBe[t.id]={}),pBe[t.id].startRight=s,uBe(l,t.startLabelRight)),t.endLabelLeft&&(n=await aBe(t.endLabelLeft,t.labelStyle),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),pBe[t.id]||(pBe[t.id]={}),pBe[t.id].endLeft=a,uBe(l,t.endLabelLeft)),t.endLabelRight&&(r=await aBe(t.endLabelRight,t.labelStyle),n=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),pBe[t.id]||(pBe[t.id]={}),pBe[t.id].endRight=s,uBe(l,t.endLabelRight)),i},"insertEdgeLabel"),mt(uBe,"setTerminalWidth"),fBe=mt((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,dBe[i.id],n);var a,s=n.updatedPath||n.originalPath,o=O(),o=VM(o).subGraphTitleTotalMargin;if(i.label){let e=dBe[i.id],t=i.x,r=i.y;s&&(a=t_.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=pBe[i.id].startLeft,t=i.x,r=i.y;s&&(n=t_.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=pBe[i.id].startRight,t=i.x,r=i.y;s&&(a=t_.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=pBe[i.id].endLeft,t=i.x,r=i.y;s&&(o=t_.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=pBe[i.id].endRight,t=i.x,r=i.y;s&&(n=t_.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),mBe=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"),yBe=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.x<i.x?s-r:s+r,l=e.height/2,c=Math.abs(i.y-n.y),h=Math.abs(i.x-n.x),u;if(Math.abs(t-i.y)*s>Math.abs(a-i.x)*l)return e=n.y<i.y?i.y-l-t:t-l-i.y,o=h*e/c,u={x:n.x<i.x?n.x+o:n.x-h+o,y:n.y<i.y?n.y+c-e:n.y-c+e},0===o&&(u.x=i.x,u.y=i.y),0===h&&(u.x=i.x),0===c&&(u.y=i.y),M.debug(`abc89 topp/bott calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=n.x<i.x?i.x-s-a:a-s-i.x)/h,t=n.x<i.x?n.x+h-o:n.x-h+o,r=n.y<i.y?n.y+e:n.y-e;return M.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=i.x,r=i.y),0===h&&(t=i.x),0===c&&(r=i.y),{x:t,y:r}}},"intersection"),vBe=mt((e,i)=>{M.debug("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(mBe(i,e)||s)a=e,s||n.push(e);else{let t=yBe(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"),bBe=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=vBe(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",i[r.fromCluster]),o=vBe(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=b3,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),dO(r)),f=i3().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=fc(!0)),sBe(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),kBe=x(()=>{xBe=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"),wBe=mt((e,t,r)=>{var e=xBe(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 CBe(e,t){return e.intersect(t)}var SBe,EBe=x(()=>{mt(CBe,"intersectNode"),SBe=CBe});function _Be(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<n&&(a=-a),Math.abs(t*r*s/o));return{x:n+a,y:e+(t=i.y<e?-t:t)}}var ABe,RBe=x(()=>{mt(_Be,"intersectEllipse"),ABe=_Be});function LBe(e,t,r){return ABe(e,t,t,r)}var NBe,DBe=x(()=>{RBe(),mt(LBe,"intersectCircle"),NBe=LBe});function IBe(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<u*d||(u=(n=i.y-r.y)*e.x+(a=r.x-i.x)*e.y+(s=i.x*r.y-r.x*i.y),d=n*t.x+a*t.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-n*c)))return e=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-e)/o:(r+e)/o,y:(r=n*h-l*s)<0?(r-e)/o:(r+e)/o}}function MBe(e,t){return 0<e*t}var OBe,PBe=x(()=>{mt(IBe,"intersectLine"),mt(MBe,"sameSign"),OBe=IBe});function $Be(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<t.length;h++){var u=t[h],d=t[h<t.length-1?h+1:0];(u=OBe(e,i,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y}))&&a.push(u)}return a.length?(1<a.length&&a.sort(function(e,t){var r=e.x-i.x,e=e.y-i.y,r=Math.sqrt(r*r+e*e),e=t.x-i.x,t=t.y-i.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):e}var BBe,FBe,zBe,qBe,UBe=x(()=>{PBe(),mt(BBe=$Be,"intersectPolygon")}),GBe=x(()=>{FBe=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"),zBe=FBe}),jBe=x(()=>{EBe(),DBe(),RBe(),UBe(),GBe(),qBe={node:SBe,circle:NBe,ellipse:ABe,polygon:BBe,rect:zBe}});function WBe(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 YBe,VBe,HBe,XBe,KBe=x(()=>{cBe(),eL(),Cu(),aT(),Pc(),a_(),YBe=mt(async(e,t,r,n)=>{let a=O(),i,s=t.useHtmlLabels||mc(a.flowchart.htmlLabels),o=(i=r||"node default",e.insert("g").attr("class",i).attr("id",t.domId||t.id)),l=o.insert("g").attr("class","label").attr("style",t.labelStyle),c,h=(c=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0],l.node()),u,d=(u="markdown"===t.labelType?JR(l,cc(i_(c),a),{useHtmlLabels:s,width:t.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await aBe(cc(i_(c),a),t.labelStyle,!1,n))).getBBox(),p=t.padding/2;if(mc(a.flowchart.htmlLabels)){if(r=u.children[0],e=V(u),n=r.getElementsByTagName("img")){let i=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=a.fontSize||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)})))}d=r.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),VBe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(WBe,"insertPolygonShape")}),ZBe=x(()=>{KBe(),e(),Cu(),jBe(),HBe=mt(async(e,t)=>{t.useHtmlLabels||O().flowchart.htmlLabels||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:i}=await YBe(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),VBe(t,n),t.intersect=function(e){return qBe.rect(t,e)},e},"note"),XBe=HBe});function QBe(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 JBe,eFe,tFe,rFe,iFe,nFe,aFe,sFe,oFe,lFe,cFe,hFe,uFe,dFe,pFe,gFe,fFe,mFe,yFe,vFe,bFe,xFe,wFe,TFe,kFe,CFe,SFe,EFe,_Fe,AFe=x(()=>{aT(),Cu(),Pc(),e(),kBe(),cBe(),jBe(),ZBe(),KBe(),JBe=mt(e=>e?" "+e:"","formatClass"),eFe=mt((e,t)=>`${t||"node default"}${JBe(e.classes)} `+JBe(e.class),"getClassesFromNode"),tFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,s,s,o)).attr("style",t.style),VBe(t,e),t.intersect=function(e){return M.warn("Intersect called"),qBe.polygon(t,o,e)},r},"question"),rFe=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 qBe.circle(t,14,e)},e),"choice"),iFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,s,n,o);return l.attr("style",t.style),VBe(t,l),t.intersect=function(e){return qBe.polygon(t,o,e)},r},"hexagon"),nFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,void 0,!0),n=i.height+2*t.padding,a=n/2,s=i.width+2*a+t.padding,o=wBe(t.directions,i,t),l=WBe(r,s,n,o);return l.attr("style",t.style),VBe(t,l),t.intersect=function(e){return qBe.polygon(t,o,e)},r},"block_arrow"),aFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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 WBe(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(e){return qBe.polygon(t,s,e)},r},"rect_left_inv_arrow"),sFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,n,a,s);return o.attr("style",t.style),VBe(t,o),t.intersect=function(e){return qBe.polygon(t,s,e)},r},"lean_right"),oFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,n,a,s);return o.attr("style",t.style),VBe(t,o),t.intersect=function(e){return qBe.polygon(t,s,e)},r},"lean_left"),lFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,n,a,s);return o.attr("style",t.style),VBe(t,o),t.intersect=function(e){return qBe.polygon(t,s,e)},r},"trapezoid"),cFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,n,a,s);return o.attr("style",t.style),VBe(t,o),t.intersect=function(e){return qBe.polygon(t,s,e)},r},"inv_trapezoid"),hFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,n,a,s);return o.attr("style",t.style),VBe(t,o),t.intersect=function(e){return qBe.polygon(t,s,e)},r},"rect_right_inv_arrow"),uFe=mt(async(e,n)=>{let{shapeSvg:t,bbox:r}=await YBe(e,n,eFe(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 VBe(n,c),n.intersect=function(t){var r=qBe.rect(n,t),i=r.x-n.x;if(0!=a&&(Math.abs(i)<n.width/2||Math.abs(i)==n.width/2&&Math.abs(r.y-n.y)>n.height/2-s)){let e=s*s*(1-i*i/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0<t.y-n.y&&(e=-e),r.y+=e}return r},t},"cylinder"),dFe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await YBe(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&&(QBe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{M.warn("Unknown node property "+e)})),VBe(t,n),t.intersect=function(e){return qBe.rect(t,e)},e},"rect"),pFe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await YBe(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&&(QBe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{M.warn("Unknown node property "+e)})),VBe(t,n),t.intersect=function(e){return qBe.rect(t,e)},e},"composite"),gFe=mt(async(e,t)=>{var r,e=(await YBe(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&&(QBe(i,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{M.warn("Unknown node property "+e)})),VBe(t,i),t.intersect=function(e){return qBe.rect(t,e)},e},"labelRect"),mt(QBe,"applyNodePropertyBorders"),fFe=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),s.node().appendChild(await aBe(l,t.labelStyle,!0,!0))),h={width:0,height:0};mc(O().flowchart.htmlLabels)&&(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=s.node().appendChild(await aBe(e.join?e.join("<br/>"):e,t.labelStyle,!0,!0)),p=(mc(O().flowchart.htmlLabels)&&(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<d.width?0:-(d.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),n.attr("class","outer title-state").attr("x",-h.width/2-p).attr("y",-h.height/2-p).attr("width",h.width+t.padding).attr("height",h.height+t.padding),a.attr("class","divider").attr("x1",-h.width/2-p).attr("x2",h.width/2+p).attr("y1",-h.height/2-p+d.height+p).attr("y2",-h.height/2-p+d.height+p),VBe(t,n),t.intersect=function(e){return qBe.rect(t,e)},i},"rectWithTitle"),mFe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r}=await YBe(e,t,eFe(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 VBe(t,r),t.intersect=function(e){return qBe.rect(t,e)},e},"stadium"),yFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await YBe(e,t,eFe(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"),VBe(t,a),t.intersect=function(e){return M.info("Circle intersect",t,i.width/2+n,e),qBe.circle(t,i.width/2+n,e)},r},"circle"),vFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await YBe(e,t,eFe(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"),VBe(t,s),t.intersect=function(e){return M.info("DoubleCircle intersect",t,i.width/2+n+5,e),qBe.circle(t,i.width/2+n+5,e)},r},"doublecircle"),bFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await YBe(e,t,eFe(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=WBe(r,n,a,s);return o.attr("style",t.style),VBe(t,o),t.intersect=function(e){return qBe.polygon(t,s,e)},r},"subroutine"),xFe=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),VBe(t,r),t.intersect=function(e){return qBe.circle(t,7,e)},e},"start"),wFe=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"),VBe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return qBe.rect(t,e)},i},"forkJoin"),TFe=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),VBe(t,i),t.intersect=function(e){return qBe.circle(t,7,e)},e},"end"),kFe=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=h.node().appendChild(await aBe(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(mc(O().flowchart.htmlLabels)&&(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&&(O().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),V(e=h.node().appendChild(await aBe(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=e.getBBox(),b=(mc(O().flowchart.htmlLabels)&&(y=e.children[0],w=V(e),v=y.getBoundingClientRect(),w.attr("width",v.width),w.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=(O().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await aBe(r,t.cssStyle||s.labelStyle,!0,!0))),n=i.getBBox(),a;mc(O().flowchart.htmlLabels)&&(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=(O().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await aBe(r,t.cssStyle||s.labelStyle,!0,!0))),n=i.getBBox(),a;mc(O().flowchart.htmlLabels)&&(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 w=(l-v.width)/2;return V(e).attr("transform","translate( "+(-1*l/2+w)+", "+(-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),VBe(s,n),s.intersect=function(e){return qBe.rect(s,e)},i},"class_box"),CFe={rhombus:tFe,composite:pFe,question:tFe,rect:dFe,labelRect:gFe,rectWithTitle:fFe,choice:rFe,circle:yFe,doublecircle:vFe,stadium:mFe,hexagon:iFe,block_arrow:nFe,rect_left_inv_arrow:aFe,lean_right:sFe,lean_left:oFe,trapezoid:lFe,inv_trapezoid:cFe,rect_right_inv_arrow:hFe,cylinder:uFe,start:xFe,end:TFe,note:XBe,subroutine:bFe,fork:wFe,join:wFe,class_box:kFe},SFe={},EFe=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 CFe[r.shape](n,r,i)}else a=await CFe[r.shape](t,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),SFe[r.id]=n,r.haveCallback&&SFe[r.id].attr("class",SFe[r.id].attr("class")+" clickable"),n},"insertNode"),_Fe=mt(e=>{var t=SFe[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 RFe(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=TE(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??sr()?.block?.padding??0}}async function LFe(e,t,r){var i;"group"!==(t=RFe(t,0,!1)).type&&(i=sr(),i=(e=await EFe(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 NFe(e,t,r){var i=RFe(t,0,!0);"space"!==r.getBlock(i.id).type&&(r=sr(),await EFe(e,i,{config:r}),t.intersect=i?.intersect,_Fe(i))}async function DFe(e,t,r,i){for(var n of t)await i(e,n,r),n.children&&await DFe(e,n.children,r,i)}async function IFe(e,t,r){await DFe(e,t,r,LFe)}async function MFe(e,t,r){await DFe(e,t,r,NFe)}async function OFe(e,t,r,i,n){var a,s,o,l,c=new nV({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}],bBe(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 gBe(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"}),fBe({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var PFe,$Fe,BFe,FFe=x(()=>{sV(),ii(),TBe(),AFe(),a_(),mt(RFe,"getNodeFromBlock"),mt(LFe,"calculateBlockSize"),mt(NFe,"insertBlockPositioned"),mt(DFe,"performOperations"),mt(IFe,"calculateBlockSizes"),mt(MFe,"insertBlocks"),mt(OFe,"insertEdges")}),zFe=x(()=>{aT(),ii(),V$e(),e(),ch(),tBe(),FFe(),PFe=mt(function(e,t){return t.db.getClasses()},"getClasses"),$Fe=mt(async function(e,t,r,i){let{securityLevel:n,block:a}=sr(),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=(j$e(l,["point","circle","cross"],i.type,t),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await IFe(u,i,s),Q$e(s));await MFe(u,i,s),await OFe(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,Qc(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"),BFe={draw:$Fe,getClasses:PFe}}),qFe={};dqe(qFe,{diagram:()=>UFe});var UFe,GFe,jFe,WFe,YFe,VFe,HFe,XFe,KFe,ZFe,QFe,JFe,eze,tze,rze,ize,nze,aze,sze,oze,lze,cze,hze,uze,dze,pze,gze,fze,mze,yze,vze,bze=x(()=>{t$e(),W$e(),Y$e(),zFe(),UFe={parser:JPe,db:R$e,renderer:BFe,styles:D$e}}),xze=x(()=>{GFe={L:"left",R:"right",T:"top",B:"bottom"},jFe={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")},WFe={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")},YFe=mt(function(e){return HFe(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),VFe=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),HFe=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),XFe=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),KFe=mt(function(e,t){var r=HFe(e)&&XFe(t),e=XFe(e)&&HFe(t);return r||e},"isArchitectureDirectionXY"),ZFe=mt(function(e){var t=e[0],e=e[1],r=HFe(t)&&XFe(e),t=XFe(t)&&HFe(e);return r||t},"isArchitecturePairXY"),QFe=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),JFe=mt(function(e,t){return QFe(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),eze=mt(function([e,t],r){var i=r[0],r=r[1];return HFe(i)?XFe(r)?[e+("L"===i?-1:1),t+("T"===r?1:-1)]:[e+("L"===i?-1:1),t]:HFe(r)?[e+("L"===r?1:-1),t+("T"===i?1:-1)]:[e,t+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),tze=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"),rze=mt(function(e,t){return KFe(e,t)?"bend":HFe(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),ize=mt(function(e){return"service"===e.type},"isArchitectureService"),nze=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),aze=mt(e=>e.data(),"edgeData"),sze=mt(e=>e.data(),"nodeData")}),wze=x(()=>{ii(),ti(),a_(),ku(),xze(),oze=Yt.architecture,lze=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=yh,this.getAccTitle=vh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,this.getAccDescription=xh,this.setAccDescription=bh,this.clear()}static{mt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},mh()}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(ize)}addJunction({id:e,in:t}){this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(nze)}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(!VFe(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(r));if(!VFe(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=rze(t.lhsDir,t.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),t.lhsId===a?(n=JFe(t.lhsDir,t.rhsDir))&&(e[n]=t.rhsId):(i=JFe(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<a.length;){var t=a.shift();if(t){l[t]=1,delete c[t];let e=o[t],[r,i]=n[t];Object.entries(e).forEach(([e,t])=>{l[t]||(n[t]=eze([r,i],e),a.push(t))})}}return n},"BFS"),t=[e(r)];for(;0<Object.keys(c).length;)t.push(e(Object.keys(c)[0]));this.dataStructures={adjList:o,spatialMaps:t,groupAlignments:s}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return _E({...oze,...sr().architecture})}getConfigField(e){return this.getConfig()[e]}}}),Tze=x(()=>{$7e(),e(),q7e(),wze(),cze=mt((e,t)=>{B7e(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"),hze={parser:{yy:void 0},parse:mt(async e=>{var e=await I7e("architecture",e),t=(M.debug(e),hze.parser?.yy);if(!(t instanceof lze))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.");cze(e,t)},"parse")}}),kze=x(()=>{uze=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"),dze=uze}),Cze=oqe((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;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},h.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),r=0;r<t.length;r++)e+=t[r].getNoOfChildren();return 0==e?1:e},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var e=-o.INITIAL_WORLD_BOUNDARY,t=o.INITIAL_WORLD_BOUNDARY,t=o.WORLD_CENTER_X+l.nextDouble()*(t-e)+e,e=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-e)+e;this.rect.x=t,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var e,t;0!=this.getChild().getNodes().length&&((t=this.getChild()).updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(e=t.getRight()-t.getLeft(),t=t.getBottom()-t.getTop(),this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(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.getNodes().indexOf(i))throw"Node already in graph!";return(i.owner=this).getNodes().push(i),i}if(i=e,!(-1<this.getNodes().indexOf(t)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(t.owner!=r.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=r.owner?null:(i.source=t,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),r!=t&&r.edges.push(i),i)},u.prototype.remove=function(e){var t=e;if(e instanceof o){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,i=t.edges.slice(),n=i.length,a=0;a<n;a++)((r=i[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(e instanceof l){if(null==(r=e))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,t=r.source.edges.indexOf(r),e=r.target.edges.indexOf(r);if(!(-1<t&&-1<e))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(t,1),r.target!=r.source&&r.target.edges.splice(e,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var e,t=d.MAX_VALUE,r=d.MAX_VALUE,i=this.getNodes(),n=i.length,a=0;a<n;a++){var s,o=i[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=i[0].getParent().paddingLeft?i[0].getParent().paddingLeft:this.margin,this.left=r-e,this.top=t-e,new c(this.left,this.top))},u.prototype.updateBounds=function(e){for(var t,r,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,c=0;c<l;c++){var h=o[c];e&&null!=h.child&&h.updateBounds(),(t=h.getLeft())<i&&(i=t),n<(t=h.getRight())&&(n=t),(t=h.getTop())<a&&(a=t),s<(t=h.getBottom())&&(s=t)}var u=new p(i,a,n-i,s-a);i==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(e){for(var t=d.MAX_VALUE,r=-d.MAX_VALUE,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=e.length,s=0;s<a;s++){var o,l=e[s];(o=l.getLeft())<t&&(t=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<i&&(i=o),n<(o=l.getBottom())&&(n=o)}return new p(t,i,r-t,n-i)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,r=t.length,i=0;i<r;i++)e+=t[i].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,i=new h,n=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){i.push(e),n.add(e)});0!==i.length;)for(var a,s,o=(a=(e=i.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||n.has(s)||s.withChildren().forEach(function(e){i.push(e),n.add(e)});this.isConnected=!1,n.size>=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<this.graphs.indexOf(e))throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return(e.parent=t).child=e}if(n=r,r=e,e=(i=t).getOwner(),t=n.getOwner(),null==e||e.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==t||t.getGraphManager()!=this)throw"Target not in this graph mgr!";if(e==t)return r.isInterGraph=!1,e.add(r,i,n);if(r.isInterGraph=!0,r.source=i,r.target=n,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},i.prototype.remove=function(e){if(e instanceof c){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var r,i=[],n=(i=i.concat(t.getEdges())).length,a=0;a<n;a++)r=i[a],t.remove(r);for(var s,o=[],n=(o=o.concat(t.getNodes())).length,a=0;a<n;a++)s=o[a],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(e instanceof h){if(null==(r=e))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,i=0;i<r;i++)e=e.concat(t[i].getNodes());this.allNodes=e}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),r=(t.length,0);r<t.length;r++)e=e.concat(t[r].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=e).parent&&(e.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,i=e.getOwner();null!=(r=i.getParent());){if(r==t)return!0;if(null==(i=r.getOwner()))break}for(i=t.getOwner();null!=(r=i.getParent());){if(r==e)return!0;if(null==(i=r.getOwner()))break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,i,n,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(t=(e=a[o]).source,r=e.target,e.lca=null,(e.sourceInLca=t)==(e.targetInLca=r))e.lca=t.getOwner();else{for(i=t.getOwner();null==e.lca;){for(n=(e.targetInLca=r).getOwner();null==e.lca;){if(n==i){e.lca=n;break}if(n==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=n.getParent(),n=e.targetInLca.getOwner()}if(i==this.rootGraph)break;null==e.lca&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var i=t.getOwner();null!=i;){if(i==r)return i;i=i.getParent().getOwner()}r=r.getParent().getOwner()}return r},i.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,i=e.getNodes(),n=i.length,a=0;a<n;a++)(r=i[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},i.prototype.includesInvalidEdge=function(){for(var e,t=[],r=this.edges.length,i=0;i<r;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&t.push(e);for(i=0;i<t.length;i++)this.remove(t[i]);return!1},e.exports=i},function(e,t,r){var h=r(12);function i(){}mt(i,"IGeometry"),i.calcSeparationAmount=function(e,t,r,i){if(!e.intersects(t))throw"assert failed";var n=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,n),r[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),r[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=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]<e?e=r[0]:t=r[1],r[0]=-1*n[0]*(e/2+i),r[1]=-1*n[1]*(t/2+i)},i.decideDirectionsForOverlappingNodes=function(e,t,r){e.getCenterX()<t.getCenterX()?r[0]=-1:r[0]=1,e.getCenterY()<t.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(e,t,r){var i=e.getCenterX(),n=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=i,r[1]=n,r[2]=a,r[3]=s,!0;var o=e.getX(),l=e.getY(),c=e.getRight(),h=e.getX(),u=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),m=t.getY(),y=t.getRight(),v=t.getX(),b=t.getBottom(),x=t.getRight(),w=t.getWidthHalf(),T=t.getHeightHalf(),k=!1,C=!1;if(i===a){if(s<n)return r[0]=i,r[1]=l,r[2]=a,r[3]=b,!1;n<s&&(r[0]=i,r[1]=u,r[2]=a,r[3]=m)}else if(n===s){if(a<i)return r[0]=o,r[1]=n,r[2]=y,r[3]=s,!1;i<a&&(r[0]=c,r[1]=n,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,S=(s-n)/(a-i),E=void 0,_=void 0,A=void 0;if(-e==S?(a<i?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),k=!0):e==S&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),k=!0),-t==S?(i<a?(r[2]=v,r[3]=b):(r[2]=y,r[3]=m),C=!0):t==S&&(i<a?(r[2]=f,r[3]=m):(r[2]=x,r[3]=b),C=!0),k&&C)return!1;if(c=a<i?s<n?(E=this.getCardinalDirection(e,S,4),this.getCardinalDirection(t,S,2)):(E=this.getCardinalDirection(-e,S,3),this.getCardinalDirection(-t,S,1)):s<n?(E=this.getCardinalDirection(-e,S,1),this.getCardinalDirection(-t,S,3)):(E=this.getCardinalDirection(e,S,2),this.getCardinalDirection(t,S,4)),!k)switch(E){case 1:_=l,r[0]=i+-g/S,r[1]=_;break;case 2:_=n+p*S,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=i+g/S,r[1]=_;break;case 4:_=n+-p*S,r[0]=h,r[1]=_}if(!C)switch(c){case 1:A=m,r[2]=a+-T/S,r[3]=A;break;case 2:A=s+w*S,r[2]=x,r[3]=A;break;case 3:A=b,r[2]=a+T/S,r[3]=A;break;case 4:A=s+-w*S,r[2]=v,r[3]=A}}return!1},i.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},i.getIntersection=function(e,t,r,i){var n,a,s,o,l,c;return null==i?this.getIntersection2(e,t,r):(n=e.x,a=t.x,l=r.x,o=a*(e=e.y)-n*(t=t.y),c=(s=i.x)*(r=r.y)-l*(i=i.y),0==(i=(t-=e)*(e=l-s)-(l=i-r)*(s=n-a))?null:new h((s*c-e*o)/i,(l*o-t*c)/i))},i.angleOfVector=function(e,t,r,i){var n=void 0;return e!==r?(n=Math.atan((i-t)/(r-e)),r<e?n+=Math.PI:i<t&&(n+=this.TWO_PI)):n=i<t?this.ONE_AND_HALF_PI:this.HALF_PI,n},i.doIntersect=function(e,t,r,i){var n=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=i.x,l=(a-n)*((i=i.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-n)+(a-n)*(i-e))/l,0<(a=((i-r)*(o-n)+(s-o)*(i-e))/l))&&a<1&&0<t&&t<1},i.findCircleLineIntersections=function(e,t,r,i,n,a,s){var o=(r-e)*(r-e)+(i-t)*(i-t);return 0<=(r=2*((e-n)*(r-e)+(t-a)*(i-t)))*r-4*o*(i=(e-n)*(e-n)+(t-a)*(t-a)-s*s)?(e=(-r+Math.sqrt(r*r-4*o*i))/(2*o),n=(-r-Math.sqrt(r*r-4*o*i))/(2*o),0<=e&&e<=1?[e]:0<=n&&n<=1?[n]:null):null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i},function(e,t,r){function i(){}mt(i,"IMath"),i.sign=function(e){return 0<e?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=i},function(e,t,r){function i(){}mt(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,i){return null!==e?e.next=t:i.head=t,null!==r?r.prev=t:i.tail=t,t.prev=e,t.next=r,i.length++,t},"add"),c=mt(function(e,t){var r=e.prev,i=e.next;return null!==r?r.next=i:t.head=i,null!==i?i.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function h(e){var t=this;n(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(h,"LinkedList"),a=h,s=[{key:"size",value:mt(function(){return this.length},"size")},{key:"insertBefore",value:mt(function(e,t){return l(t.prev,o(e),t,this)},"insertBefore")},{key:"insertAfter",value:mt(function(e,t){return l(t,o(e),t.next,this)},"insertAfter")},{key:"insertNodeBefore",value:mt(function(e,t){return l(t.prev,e,t,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:mt(function(e,t){return l(t,e,t.next,this)},"insertNodeAfter")},{key:"push",value:mt(function(e){return l(this.tail,o(e),null,this)},"push")},{key:"unshift",value:mt(function(e){return l(null,o(e),this.head,this)},"unshift")},{key:"remove",value:mt(function(e){return c(e,this)},"remove")},{key:"pop",value:mt(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:mt(function(e){if(e<=this.length()){for(var t=1,r=this.head;t<e;)r=r.next,t++;return r.value}},"get_object_at")},{key:"set_object_at",value:mt(function(e,t){if(e<=this.length()){for(var r=1,i=this.head;r<e;)i=i.next,r++;i.value=t}},"set_object_at")}],i(a.prototype,s),e.exports=h},function(e,t,r){function i(e,t,r){this.x=null,(this.y=null)==e&&null==t&&null==r?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==r?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==r&&(this.x=(r=e).x,this.y=r.y)}mt(i,"Point"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(e,t,r){"Point"==e.constructor.name&&null==t&&null==r?this.setLocation((r=e).x,r.y):"number"==typeof e&&"number"==typeof t&&null==r&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},i.prototype.move=function(e,t){this.x=e,this.y=t},i.prototype.translate=function(e,t){this.x+=e,this.y+=t},i.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=i},function(e,t,r){function i(e,t,r,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=i&&(this.x=e,this.y=t,this.width=r,this.height=i)}mt(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(e){this.x=e},i.prototype.getY=function(){return this.y},i.prototype.setY=function(e){this.y=e},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},e.exports=i},function(e,t,r){var i="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};function n(){}mt(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(e){return n.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=n.getString(),n.lastID++),e.uniqueID)},n.getString=function(e){return"Object#"+(null==e?n.lastID:e)},n.isPrimitive=function(e){var t="u"<typeof e?"undefined":i(e);return null==e||"object"!=t&&"function"!=t},e.exports=n},function(e,t,r){function g(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(g,"_toConsumableArray");var i=r(0),n=r(7),a=r(3),s=r(1),o=r(6),l=r(5),c=r(17),h=r(29);function u(e){h.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}mt(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(h.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var e=new n(this);return this.graphManager=e},u.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},u.prototype.newNode=function(e){return new a(this.graphManager,e)},u.prototype.newEdge=function(e){return new s(null,null,e)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(e&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var r=this.graphManager.getRoot().getNodes(),t=0;t<r.length;t++)r[t];this.update(this.graphManager.getRoot())}},u.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof a){var t=e;if(null!=t.getChild())for(var r=t.getChild().getNodes(),i=0;i<r.length;i++)update(r[i]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else e instanceof s?null!=e.vGraphObject&&e.vGraphObject.update(e):e instanceof o&&null!=e.vGraphObject&&e.vGraphObject.update(e)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(e){if(null==e)this.transform(new l(0,0));else{var t=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(r.x),t.setDeviceOrgY(r.y);for(var i=this.getAllNodes(),n=0;n<i.length;n++)i[n].transform(t)}}},u.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,r,i=e.getNodes(),n=0;n<i.length;n++)null==(r=(t=i[n]).getChild())||0==r.getNodes().length?t.scatter():(this.positionNodesRandomly(r),t.updateBounds())},u.prototype.getFlatForest=function(){for(var e=[],t=!0,r=this.graphManager.getRoot().getNodes(),i=!0,n=0;n<r.length;n++)null!=r[n].getChild()&&(i=!1);if(i)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&t;){for(s.push(l[0]);0<s.length&&t;){var c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),n=0;n<h.length;n++){var u=h[n].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,c)}}}if(t){var d=[].concat(g(a));for(e.push(d),n=0;n<d.length;n++){var p=d[n];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else e=[]}return e},u.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],r=e.source,i=this.graphManager.calcLowestCommonAncestor(e.source,e.target),n=0;n<e.bendpoints.length;n++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),i.add(a),this.newEdge(null));this.graphManager.add(s,r,a),t.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,e.target),this.edgeToDummyNodes.set(e,t),(e.isInterGraph()?this.graphManager:i).remove(e),t},u.prototype.createBendpointsFromDummyNodes=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),e=[].concat(g(this.edgeToDummyNodes.keys())).concat(e),t=0;t<e.length;t++){var r=e[t];if(0<r.bendpoints.length){for(var i=this.edgeToDummyNodes.get(r),n=0;n<i.length;n++){var a=i[n],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(n);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(e,t,r,i){var n,a;return null!=r&&null!=i?(n=t,e<=50?n-=(t-t/r)/50*(50-e):n+=(t*i-t)/50*(e-50),n):(r=e<=50?(a=9*t/500,t/10):(a=9*t/50,-8*t),a*e+r)},u.findCenterOfTree=function(e){var t=(t=[]).concat(e),r=[],i=new Map,n=!1,a=null;1!=t.length&&2!=t.length||(n=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(c=t[s]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!n;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var c=t[s],h=t.indexOf(c);0<=h&&t.splice(h,1),c.getNeighborsList().forEach(function(e){var t;r.indexOf(e)<0&&(1==(t=i.get(e)-1)&&l.push(e),i.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(n=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function i(){}mt(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return(i.x=1e4*Math.sin(i.seed++))-Math.floor(i.x)},e.exports=i},function(e,t,r){var i=r(5);function n(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}mt(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(e){this.lworldExtX=e},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(e){this.lworldExtY=e},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},n.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},n.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},n.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},n.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},n.prototype.inverseTransformPoint=function(e){return new i(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=n},function(e,t,r){function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(d,"_toConsumableArray");var i,n=r(15),p=r(4),l=r(0),c=r(8),h=r(9);function a(){n.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(i in mt(a,"FDLayout"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var e,t,r,i,n,a,s=this.getGraphManager().getAllEdges(),o=0;o<s.length;o++)t=(e=s[o]).idealLength,e.isInterGraph&&(r=e.getSource(),i=e.getTarget(),n=e.getSourceInLca().getEstimatedSize(),a=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=n+a-2*l.SIMPLE_NODE_SIZE),n=e.getLca().getInclusionTreeDepth(),e.idealLength+=t*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+i.getInclusionTreeDepth()-2*n))},a.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>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;r<t.length;r++)e=t[r],this.calcSpringForce(e,e.idealLength)},a.prototype.calcRepulsionForces=function(){var e,t,r,i,n,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),n=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,n,a,s),n.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)i=o[t],r.getOwner()==i.getOwner()&&this.calcRepulsionForce(r,i)},a.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),r=0;r<t.length;r++)e=t[r],this.calcGravitationalForce(e)},a.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},a.prototype.calcSpringForce=function(e,t){var r,i,n=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==n.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(t=e.edgeElasticity*(r-t),i=e.lengthY/r*t,n.springForceX+=e=e.lengthX/r*t,n.springForceY+=i,a.springForceX-=e,a.springForceY-=i)},a.prototype.calcRepulsionForce=function(e,t){var r,i,n,a=e.getRect(),s=t.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(c.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),i=2*o[0],n=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*i,e.repulsionForceY-=o*n,t.repulsionForceX+=o*i,t.repulsionForceY+=o*n):(o=this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),n=(l=(e.nodeRepulsion/2+t.nodeRepulsion/2)*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=i=l*r/s,e.repulsionForceY-=n,t.repulsionForceX+=i,t.repulsionForceY+=n)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),i=(r.getRight()+r.getLeft())/2,n=(r.getTop()+r.getBottom())/2,i=e.getCenterX()-i,n=e.getCenterY()-n,a=Math.abs(i)+e.getWidth()/2,s=Math.abs(n)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*n):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*n*this.compoundGravityConstant)},a.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),r=0;r<t.length;r++)(e=t[r]).noOfChildren=e.getNoOfChildren()},a.prototype.calcGrid=function(e){for(var t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange)),i=new Array(t),n=0;n<t;n++)i[n]=new Array(r);for(n=0;n<t;n++)for(var a=0;a<r;a++)i[n][a]=new Array;return i},a.prototype.addNodeToGrid=function(e,t,r){for(var i=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),n=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((e.getRect().height+e.getRect().y-r)/this.repulsionRange)),o=i;o<=n;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(i,n,a,s)},a.prototype.updateGrid=function(){var e,t,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<r.length;e++)t=r[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(e,t,r,i){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||i){var n=new Set;e.surrounding=new Array;for(var a=this.grid,s=e.startX-1;s<e.finishX+2;s++)for(var o=e.startY-1;o<e.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var c,h,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||n.has(u)||(c=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),h=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&n.add(u))}e.surrounding=[].concat(d(n))}for(s=0;s<e.surrounding.length;s++)this.calcRepulsionForce(e,e.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},e.exports=a},function(e,t,r){var i,n=r(1),a=r(4);function s(e,t,r){n.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(i in mt(s,"FDLayoutEdge"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];e.exports=s},function(e,t,r){var i,n=r(3),a=r(4);function s(e,t,r,i){n.call(this,e,t,r,i),this.nodeRepulsion=a.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(i in mt(s,"FDLayoutNode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.setGridCoordinates=function(e,t,r,i){this.startX=e,this.finishX=t,this.startY=r,this.finishY=i},e.exports=s},function(e,t,r){function i(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},e.exports=i},function(e,t,r){var i=r(14);function n(){this.map={},this.keys=[]}mt(n,"HashMap"),n.prototype.put=function(e,t){var r=i.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},n.prototype.contains=function(e){return i.createID(e),null!=this.map[e]},n.prototype.get=function(e){return e=i.createID(e),this.map[e]},n.prototype.keySet=function(){return this.keys},e.exports=n},function(e,t,r){var i=r(14);function n(){this.set={}}mt(n,"HashSet"),n.prototype.add=function(e){var t=i.createID(e);this.contains(t)||(this.set[t]=e)},n.prototype.remove=function(e){delete this.set[i.createID(e)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(e){return this.set[i.createID(e)]==e},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,i=0;i<r;i++)e.push(this.set[t[i]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var i=e[r];this.add(i)}},e.exports=n},function(e,t,r){function i(){}mt(i,"Matrix"),i.multMat=function(e,t){for(var r=[],i=0;i<e.length;i++){r[i]=[];for(var n=0;n<t[0].length;n++)for(var a=r[i][n]=0;a<e[0].length;a++)r[i][n]+=e[i][a]*t[a][n]}return r},i.transpose=function(e){for(var t=[],r=0;r<e[0].length;r++){t[r]=[];for(var i=0;i<e.length;i++)t[r][i]=e[i][r]}return t},i.multCons=function(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=e[i]*t;return r},i.minusOp=function(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=e[i]-t[i];return r},i.dotProduct=function(e,t){for(var r=0,i=0;i<e.length;i++)r+=e[i]*t[i];return r},i.mag=function(e){return Math.sqrt(this.dotProduct(e,e))},i.normalize=function(e){for(var t=[],r=this.mag(e),i=0;i<e.length;i++)t[i]=e[i]/r;return t},i.multGamma=function(e){for(var t=[],r=0,i=0;i<e.length;i++)r+=e[i];r*=-1/e.length;for(var n=0;n<e.length;n++)t[n]=r+e[n];return t},i.multL=function(e,t,r){for(var i=[],n=[],a=[],s=0;s<t[0].length;s++){for(var o=0,l=0;l<t.length;l++)o+=-.5*t[l][s]*e[l];n[s]=o}for(var c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*n[u];a[c]=h}for(var d=0;d<t.length;d++){for(var p=0,g=0;g<t[0].length;g++)p+=t[d][g]*a[g];i[d]=p}return i},e.exports=i},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var i;t<r&&(i=this._partition(e,t,r),this._quicksort(e,t,i),this._quicksort(e,i+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var i=this._get(e,t),n=t,a=r;;){for(;this.compareFunction(i,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,n),i);)n++;if(!(n<a))return a;this._swap(e,n,a),n++,a--}},"_partition")},{key:"_get",value:mt(function(e,t){return e instanceof o?e.get_object_at(t):e[t]},"_get")},{key:"_set",value:mt(function(e,t,r){e instanceof o?e.set_object_at(t,r):e[t]=r},"_set")},{key:"_swap",value:mt(function(e,t,r){var i=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,i)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],i(a.prototype,s),l);function l(e,t){n(this,l),null===t&&void 0===t||(this.compareFunction=this._defaultCompareFunction),t=void 0,t=e instanceof o?e.size():e.length,this._quicksort(e,0,t-1)}e.exports=r},function(e,t,r){function Ae(){}mt(Ae,"SVD"),Ae.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t,P=Math.min(this.m,this.n);this.s=(e=>{for(var t=[];0<e--;)t.push(0);return t})(Math.min(this.m+1,this.n)),this.U=(t=[this.m,P],mt(function e(t){if(0==t.length)return 0;for(var r=[],i=0;i<t[0];i++)r.push(e(t.slice(1)));return r},"allocate")(t)),this.V=(t=[this.n,this.n],mt(function e(t){if(0==t.length)return 0;for(var r=[],i=0;i<t[0];i++)r.push(e(t.slice(1)));return r},"allocate")(t));for(var $,B,F,r=(e=>{for(var t=[];0<e--;)t.push(0);return t})(this.n),z=(e=>{for(var t=[];0<e--;)t.push(0);return t})(this.m),i=Math.min(this.m-1,this.n),n=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(i,n);a++){if(a<i){this.s[a]=0;for(var q=a;q<this.m;q++)this.s[a]=Ae.hypot(this.s[a],e[q][a]);if(0!==this.s[a]){e[a][a]<0&&(this.s[a]=-this.s[a]);for(var U=a;U<this.m;U++)e[U][a]/=this.s[a];e[a][a]+=1}this.s[a]=-this.s[a]}for(var s=a+1;s<this.n;s++){if(F=0!==this.s[a],a<i&&F){for(var G=0,j=a;j<this.m;j++)G+=e[j][a]*e[j][s];for(var G=-G/e[a][a],W=a;W<this.m;W++)e[W][s]+=G*e[W][a]}r[s]=e[a][s]}if(a<i)for(var Y=a;Y<this.m;Y++)this.U[Y][a]=e[Y][a];if(a<n){r[a]=0;for(var V=a+1;V<this.n;V++)r[a]=Ae.hypot(r[a],r[V]);if(0!==r[a]){r[a+1]<0&&(r[a]=-r[a]);for(var H=a+1;H<this.n;H++)r[H]/=r[a];r[a+1]+=1}if(r[a]=-r[a],$=a+1<this.m,B=0!==r[a],$&&B){for(var X=a+1;X<this.m;X++)z[X]=0;for(var K=a+1;K<this.n;K++)for(var Z=a+1;Z<this.m;Z++)z[Z]+=r[K]*e[Z][K];for(var Q=a+1;Q<this.n;Q++)for(var J=-r[Q]/r[a+1],ee=a+1;ee<this.m;ee++)e[ee][Q]+=J*z[ee]}for(var te=a+1;te<this.n;te++)this.V[te][a]=r[te]}}var o=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=e[i][i]),this.m<o&&(this.s[o-1]=0),n+1<o&&(r[n]=e[n][o-1]),r[o-1]=0;for(var l=i;l<P;l++){for(var re=0;re<this.m;re++)this.U[re][l]=0;this.U[l][l]=1}for(var c=i-1;0<=c;c--)if(0!==this.s[c]){for(var ie=c+1;ie<P;ie++){for(var ne=0,ae=c;ae<this.m;ae++)ne+=this.U[ae][c]*this.U[ae][ie];for(var ne=-ne/this.U[c][c],se=c;se<this.m;se++)this.U[se][ie]+=ne*this.U[se][c]}for(var oe=c;oe<this.m;oe++)this.U[oe][c]=-this.U[oe][c];this.U[c][c]=1+this.U[c][c];for(var le=0;le<c-1;le++)this.U[le][c]=0}else{for(var ce=0;ce<this.m;ce++)this.U[ce][c]=0;this.U[c][c]=1}for(var he,h=this.n-1;0<=h;h--){if(he=0!==r[h],h<n&&he)for(var ue=h+1;ue<P;ue++){for(var de=0,pe=h+1;pe<this.n;pe++)de+=this.V[pe][h]*this.V[pe][ue];for(var de=-de/this.V[h+1][h],ge=h+1;ge<this.n;ge++)this.V[ge][ue]+=de*this.V[ge][h]}for(var fe=0;fe<this.n;fe++)this.V[fe][h]=0;this.V[h][h]=1}for(var me=o-1,ye=Math.pow(2,-52),ve=Math.pow(2,-966);0<o;){for(var u=void 0,d=void 0,u=o-2;-1<=u&&-1!==u;u--)if(Math.abs(r[u])<=ve+ye*(Math.abs(this.s[u])+Math.abs(this.s[u+1]))){r[u]=0;break}if(u===o-2)d=4;else{for(var p=void 0,p=o-1;u<=p&&p!==u;p--){var be=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=ve+ye*be){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var xe=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=Ae.hypot(this.s[g],xe),we=this.s[g]/f,Te=xe/f;this.s[g]=f,g!==u&&(xe=-Te*r[g-1],r[g-1]=we*r[g-1]);for(var m=0;m<this.n;m++)f=we*this.V[m][g]+Te*this.V[m][o-1],this.V[m][o-1]=-Te*this.V[m][g]+we*this.V[m][o-1],this.V[m][g]=f}break;case 2:var ke=r[u-1];r[u-1]=0;for(var y=u;y<o;y++){var v=Ae.hypot(this.s[y],ke),Ce=this.s[y]/v,Se=ke/v;this.s[y]=v,ke=-Se*r[y],r[y]=Ce*r[y];for(var b=0;b<this.m;b++)v=Ce*this.U[b][y]+Se*this.U[b][u-1],this.U[b][u-1]=-Se*this.U[b][y]+Ce*this.U[b][u-1],this.U[b][y]=v}break;case 3:var x=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[u])),Math.abs(r[u])),w=this.s[o-1]/x,T=this.s[o-2]/x,k=r[o-2]/x,Ee=this.s[u]/x,x=r[u]/x,T=((T+w)*(T-w)+k*k)/2,k=w*k*(w*k),C=0;0==T&&0==k||(C=Math.sqrt(T*T+k),C=k/(T+(T<0?-C:C)));for(var S=(Ee+w)*(Ee-w)+C,E=Ee*x,_=u;_<o-1;_++){var A=Ae.hypot(S,E),R=S/A,L=E/A;_!==u&&(r[_-1]=A),S=R*this.s[_]+L*r[_],r[_]=R*r[_]-L*this.s[_],E=L*this.s[_+1],this.s[_+1]=R*this.s[_+1];for(var N=0;N<this.n;N++)A=R*this.V[N][_]+L*this.V[N][_+1],this.V[N][_+1]=-L*this.V[N][_]+R*this.V[N][_+1],this.V[N][_]=A;if(R=S/(A=Ae.hypot(S,E)),L=E/A,this.s[_]=A,S=R*r[_]+L*this.s[_+1],this.s[_+1]=-L*r[_]+R*this.s[_+1],E=L*r[_+1],r[_+1]=R*r[_+1],_<this.m-1)for(var D=0;D<this.m;D++)A=R*this.U[D][_]+L*this.U[D][_+1],this.U[D][_+1]=-L*this.U[D][_]+R*this.U[D][_+1],this.U[D][_]=A}r[o-2]=S;break;case 4:if(this.s[u]<=0&&(this.s[u]=this.s[u]<0?-this.s[u]:0,1))for(var _e=0;_e<=me;_e++)this.V[_e][u]=-this.V[_e][u];for(;u<me&&!(this.s[u]>=this.s[u+1]);){var I=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=I,u<this.n-1)for(var M=0;M<this.n;M++)I=this.V[M][u+1],this.V[M][u+1]=this.V[M][u],this.V[M][u]=I;if(u<this.m-1)for(var O=0;O<this.m;O++)I=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=I;u++}o--}}return{U:this.U,V:this.V,S:this.s}},Ae.hypot=function(e,t){var r=void 0;return Math.abs(e)>Math.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<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;c(this,h),this.sequence1=e,this.sequence2=t,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=n,this.iMax=e.length+1,this.jMax=t.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}mt(a,"defineProperties"),mt(c,"_classCallCheck"),mt(h,"NeedlemanWunsch"),i=h,n=[{key:"getScore",value:mt(function(){return this.score},"getScore")},{key:"getAlignments",value:mt(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:mt(function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var i=1;i<this.jMax;i++){var n=[this.sequence1[r-1]===this.sequence2[i-1]?this.grid[r-1][i-1]+this.match_score:this.grid[r-1][i-1]+this.mismatch_penalty,this.grid[r-1][i]+this.gap_penalty,this.grid[r][i-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(n);this.grid[r][i]=n[a[0]],this.tracebackGrid[r][i]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:mt(function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],r=this.tracebackGrid[t.pos[0]][t.pos[1]];r[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),r[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),r[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:mt(function(e,t){for(var r=[],i=-1;-1!==(i=e.indexOf(t,i+1));)r.push(i);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(i.prototype,n),e.exports=h},function(e,t,r){var i=mt(function(){},"layoutBase");i.FDLayout=r(18),i.FDLayoutConstants=r(4),i.FDLayoutEdge=r(19),i.FDLayoutNode=r(20),i.DimensionD=r(21),i.HashMap=r(22),i.HashSet=r(23),i.IGeometry=r(8),i.IMath=r(9),i.Integer=r(10),i.Point=r(12),i.PointD=r(5),i.RandomSeed=r(16),i.RectangleD=r(13),i.Transform=r(17),i.UniqueIDGeneretor=r(14),i.Quicksort=r(25),i.LinkedList=r(11),i.LGraphObject=r(2),i.LGraph=r(6),i.LEdge=r(1),i.LGraphManager=r(7),i.LNode=r(3),i.Layout=r(15),i.LayoutConstants=r(0),i.NeedlemanWunsch=r(27),i.Matrix=r(24),i.SVD=r(26),e.exports=i},function(e,t,r){function i(){this.listeners=[]}mt(i,"Emitter");var n=i.prototype;n.addListener=function(e,t){this.listeners.push({event:e,callback:t})},n.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var i=this.listeners[r];i.event===e&&i.callback===t&&this.listeners.splice(r,1)}},n.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var i=this.listeners[r];e===i.event&&i.callback(t)}},e.exports=i}],n={},mt(i,"__webpack_require__"),i.m=r,i.c=n,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=28);function i(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var r,n})}),Sze=oqe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(Cze()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(Cze()):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,w=r(551).LinkedList;function T(){n.call(this),this.toBeTiled={},this.constraints={}}for(i in mt(T,"CoSELayout"),T.prototype=Object.create(n.prototype),n)T[i]=n[i];T.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},T.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},T.prototype.newNode=function(e){return new h(this.graphManager,e)},T.prototype.newEdge=function(e){return new o(null,null,e)},T.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)},T.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},T.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.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<Object.keys(this.constraints).length&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),f.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var i=e[r].rect,n=e[r].id;t[n]={id:n,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return t},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===m.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},T.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].calculateDisplacement();for(0<Object.keys(this.constraints).length&&this.updateDisplacements(),t=0;t<e.length;t++)e[t].move()},T.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),t=0;t<e.length;t++){var r=e[t];this.idToNodeMap.set(r.id,r)}var i=mt(function e(t){for(var r,i=t.getChild().getNodes(),n=0,a=0;a<i.length;a++)null==(r=i[a]).getChild()?s.fixedNodeSet.has(r.id)&&(n+=100):n+=e(r);return n},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(e){s.fixedNodeSet.add(e.nodeId)});for(var n,e=this.graphManager.getAllNodes(),t=0;t<e.length;t++)null!=(r=e[t]).getChild()&&0<(n=i(r))&&(r.fixedNodeWeight=n)}if(this.constraints.relativePlacementConstraint){var a,o,l,c,h=new Map,u=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){s.fixedNodesOnHorizontal.add(e),s.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var d=this.constraints.alignmentConstraint.vertical,t=0;t<d.length;t++)this.dummyToNodeForVerticalAlignment.set("dummy"+t,[]),d[t].forEach(function(e){h.set(e,"dummy"+t),s.dummyToNodeForVerticalAlignment.get("dummy"+t).push(e),s.fixedNodeSet.has(e)&&s.fixedNodesOnHorizontal.add("dummy"+t)});if(this.constraints.alignmentConstraint.horizontal)for(var p=this.constraints.alignmentConstraint.horizontal,t=0;t<p.length;t++)this.dummyToNodeForHorizontalAlignment.set("dummy"+t,[]),p[t].forEach(function(e){u.set(e,"dummy"+t),s.dummyToNodeForHorizontalAlignment.get("dummy"+t).push(e),s.fixedNodeSet.has(e)&&s.fixedNodesOnVertical.add("dummy"+t)})}f.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(e){for(var t,r,i=e.length-1;i>=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 w,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)}},T.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;t<e.length;t++){for(var r=0,i=0;i<e[t].length;i++){if(this.fixedNodeSet.has(e[t][i])){r=0;break}r+=this.idToNodeMap.get(e[t][i]).displacementX}for(var a=r/e[t].length,i=0;i<e[t].length;i++)this.idToNodeMap.get(e[t][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var s=this.constraints.alignmentConstraint.horizontal,t=0;t<s.length;t++){for(var o=0,i=0;i<s[t].length;i++){if(this.fixedNodeSet.has(s[t][i])){o=0;break}o+=this.idToNodeMap.get(s[t][i]).displacementY}for(var l=o/s[t].length,i=0;i<s[t].length;i++)this.idToNodeMap.get(s[t][i]).displacementY=l}}if(this.constraints.relativePlacementConstraint)if(f.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(r){var i;n.fixedNodesOnHorizontal.has(r)||(i=0,i=(n.dummyToNodeForVerticalAlignment.has(r)?n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(r)[0]):n.idToNodeMap.get(r)).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(r).forEach(function(e){var t;e.right?(t=n.nodeToTempPositionMapHorizontal.get(e.right)-n.nodeToTempPositionMapHorizontal.get(r)-i)<e.gap&&(i-=e.gap-t):(t=n.nodeToTempPositionMapHorizontal.get(r)-n.nodeToTempPositionMapHorizontal.get(e.left)+i)<e.gap&&(i+=e.gap-t)}),n.nodeToTempPositionMapHorizontal.set(r,n.nodeToTempPositionMapHorizontal.get(r)+i),n.dummyToNodeForVerticalAlignment.has(r)?n.dummyToNodeForVerticalAlignment.get(r).forEach(function(e){n.idToNodeMap.get(e).displacementX=i}):n.idToNodeMap.get(r).displacementX=i)}),this.nodesInRelativeVertical.forEach(function(r){var i;n.fixedNodesOnHorizontal.has(r)||(i=0,i=(n.dummyToNodeForHorizontalAlignment.has(r)?n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(r)[0]):n.idToNodeMap.get(r)).displacementY,n.nodeToRelativeConstraintMapVertical.get(r).forEach(function(e){var t;e.bottom?(t=n.nodeToTempPositionMapVertical.get(e.bottom)-n.nodeToTempPositionMapVertical.get(r)-i)<e.gap&&(i-=e.gap-t):(t=n.nodeToTempPositionMapVertical.get(r)-n.nodeToTempPositionMapVertical.get(e.top)+i)<e.gap&&(i+=e.gap-t)}),n.nodeToTempPositionMapVertical.set(r,n.nodeToTempPositionMapVertical.get(r)+i),n.dummyToNodeForHorizontalAlignment.has(r)?n.dummyToNodeForHorizontalAlignment.get(r).forEach(function(e){n.idToNodeMap.get(e).displacementY=i}):n.idToNodeMap.get(r).displacementY=i)});else{for(t=0;t<this.componentsOnHorizontal.length;t++){var c=this.componentsOnHorizontal[t];if(this.fixedComponentsOnHorizontal[t])for(i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?this.dummyToNodeForVerticalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(c[i]).displacementX=0;else{for(var h=0,u=0,i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?(h+=(p=this.dummyToNodeForVerticalAlignment.get(c[i])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(h+=this.idToNodeMap.get(c[i]).displacementX,u++);for(var d=h/u,i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?this.dummyToNodeForVerticalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementX=d}):this.idToNodeMap.get(c[i]).displacementX=d}}for(t=0;t<this.componentsOnVertical.length;t++)if(c=this.componentsOnVertical[t],this.fixedComponentsOnVertical[t])for(i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?this.dummyToNodeForHorizontalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(c[i]).displacementY=0;else{for(var p,h=0,u=0,i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?(h+=(p=this.dummyToNodeForHorizontalAlignment.get(c[i])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(h+=this.idToNodeMap.get(c[i]).displacementY,u++);for(d=h/u,i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?this.dummyToNodeForHorizontalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementY=d}):this.idToNodeMap.get(c[i]).displacementY=d}}},T.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),i=r.length,n=0;n<i;n++)(e=r[n]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},T.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var i=e[r];if(!t.has(i)){var n=i.getSource(),a=i.getTarget();if(n==a)i.getBendpoints().push(new p),i.getBendpoints().push(new p),this.createDummyNodesForBendpoints(i),t.add(i);else{var s=(s=(s=[]).concat(n.getEdgeListToNode(a))).concat(a.getEdgeListToNode(n));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},T.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),r=Math.ceil(Math.sqrt(e.length)),i=0,n=0,a=0,s=new p(0,0),o=0;o<e.length;o++){o%r==0&&(n=i,(a=0)!=o&&(n+=f.DEFAULT_COMPONENT_SEPERATION),i=0);var l=e[o],c=g.findCenterOfTree(l);t.x=a,t.y=n,(s=T.radialLayout(l,c,t)).y>i&&(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))},T.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(T.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;a<e.length;a++)e[a].transform(n);return i=new p(t.getMaxX(),t.getMaxY()),n.inverseTransformPoint(i)},T.branchRadialLayout=function(e,t,r,i,n,a){(s=(i-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),n*Math.cos(s)),s=n*Math.sin(s),l=(e.setCenter(o,s),[]),c=(l=l.concat(e.getEdges())).length;null!=t&&c--;for(var h=0,u=l.length,d=e.getEdgesBetween(t);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,c--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(i-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(T.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,n+a,a),h++)}},T.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var i=e[r].getDiagonal();t<i&&(t=i)}return t},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var e=[],t=this.graphManager.getAllNodes(),r=0;r<t.length;r++){var i=(n=t[r]).getParent();0!==this.getNodeDegreeWithChildren(n)||null!=i.id&&this.getToBeTiled(i)||e.push(n)}for(r=0;r<e.length;r++){var n,a=(n=e[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(n)}Object.keys(c).forEach(function(e){if(1<c[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=c[e],c[e][0].getParent()),i=new h(l.graphManager),n=(i.id=t,i.paddingLeft=r.paddingLeft||0,i.paddingRight=r.paddingRight||0,i.paddingBottom=r.paddingBottom||0,i.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=i,l.getGraphManager().add(l.newGraph(),i)),a=r.getChild();a.add(i);for(var s=0;s<c[e].length;s++){var o=c[e][s];a.remove(o),n.add(o)}}})},T.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},T.prototype.clearZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t,r=i.idToDummyNode[e];n[e]=i.tileNodes(i.memberGroups[e],r.paddingLeft+r.paddingRight),r.rect.width=n[e].width,r.rect.height=n[e].height,r.setCenter(n[e].centerX,n[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))})},T.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)}},T.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)})},T.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;i<r.length;i++){var n=r[i];if(0<this.getNodeDegree(n))return this.toBeTiled[t]=!1;if(null==n.getChild())this.toBeTiled[n.id]=!1;else if(!this.getToBeTiled(n))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},T.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,i=0;i<t.length;i++){var n=t[i];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},T.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),i=0;i<r.length;i++){var n=r[i];t+=this.getNodeDegreeWithChildren(n)}return t},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},T.prototype.adjustLocations=function(e,t,r,i,n,a,s){r+=n+s;for(var o=t+=i+a,l=0;l<e.rows.length;l++){var c=e.rows[l];t=o;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=t,d.rect.y=r,t+=d.rect.width+e.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}r+=h+e.verticalPadding}},T.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))})},T.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)<t?e:r},T.prototype.getOrgRatio=function(e){return(e=e.width/e.height)<1?1/e:e},T.prototype.calcIdealRowWidth=function(e,t){var r,i=f.TILING_PADDING_VERTICAL,n=f.TILING_PADDING_HORIZONTAL,a=e.length,s=0,o=0,l=0,e=(e.forEach(function(e){s+=e.getWidth(),o+=e.getHeight(),e.getWidth()>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)<l?l:i)+2*n},T.prototype.tileNodesByFavoringDim=function(e,t,r){var i=f.TILING_PADDING_VERTICAL,n=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:i,horizontalPadding:n,centerX:0,centerY:0},o=(a&&(s.idealRowWidth=this.calcIdealRowWidth(e,r)),mt(function(e){return e.rect.width*e.rect.height},"getNodeArea")),l=mt(function(e,t){return o(t)-o(e)},"areaCompareFcn");e.sort(function(e,t){var r=l;return s.idealRowWidth?(r=a)(e.id,t.id):r(e,t)});for(var c=0,h=0,u=0;u<e.length;u++)c+=(p=e[u]).getCenterX(),h+=p.getCenterY();for(s.centerX=c/e.length,s.centerY=h/e.length,u=0;u<e.length;u++){var d,p=e[u];0==s.rows.length?this.insertNodeToRow(s,p,0,t):this.canAddHorizontal(s,p.rect.width,p.rect.height)?(d=s.rows.length-1,s.idealRowWidth||(d=this.getShortestRowIndex(s)),this.insertNodeToRow(s,p,d,t)):this.insertNodeToRow(s,p,s.rows.length,t),this.shiftToLastRow(s)}return s},T.prototype.insertNodeToRow=function(e,t,r,i){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var i=e.rowWidth[r]+t.rect.width,i=(0<e.rows[r].length&&(i+=e.horizontalPadding),e.rowWidth[r]=i,e.width<i&&(e.width=i),t.rect.height),n=(0<r&&(i+=e.verticalPadding),0);i>e.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},T.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]<r&&(t=i,r=e.rowWidth[i]);return t},T.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]>r&&(t=i,r=e.rowWidth[i]);return t},T.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]<r&&0<n&&(i=r+e.verticalPadding-e.rowHeight[n]),n=t+e.horizontalPadding<=e.width-a?(e.height+i)/(a+t+e.horizontalPadding):(e.height+i)/e.width,i=r+e.verticalPadding,(n=n<1?1/n:n)<((a=e.width<t?(e.height+i)/t:(e.height+i)/e.width)<1?1/a:a))},T.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,i=e.rows[t],n=i[i.length-1],a=n.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>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;o<i.length;o++)i[o].height>s&&(s=i[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<n.height+e.verticalPadding&&(e.rowHeight[r]=n.height+e.verticalPadding),n=e.rowHeight[t]+e.rowHeight[r],e.height+=n-a,this.shiftToLastRow(e)}},T.prototype.tilingPreLayout=function(){f.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},T.prototype.tilingPostLayout=function(){f.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},T.prototype.reduceTrees=function(){for(var e=[],t=!0;t;){for(var r,i,n=this.graphManager.getAllNodes(),a=[],t=!1,s=0;s<n.length;s++)1!=(i=n[s]).getEdges().length||i.getEdges()[0].isInterGraph||null!=i.getChild()||(f.PURE_INCREMENTAL?(r=i.getEdges()[0].getOtherEnd(i),r=new c(i.getCenterX()-r.getCenterX(),i.getCenterY()-r.getCenterY()),a.push([i,i.getEdges()[0],i.getOwner(),r])):a.push([i,i.getEdges()[0],i.getOwner()]),t=!0);if(1==t){for(var o=[],l=0;l<a.length;l++)1==a[l][0].getEdges().length&&(o.push(a[l]),a[l][0].getOwner().remove(a[l][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},T.prototype.growTree=function(e){for(var t,r=e[e.length-1],i=0;i<r.length;i++)t=r[i],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=t==e[1].source?e[1].target:e[1].source;if(f.PURE_INCREMENTAL)t.setCenter(r.getCenterX()+e[3].getWidth(),r.getCenterY()+e[3].getHeight());else{var i=r.startX,n=r.finishX,a=r.startY,s=r.finishY,o=[0,0,0,0];if(0<a)for(var l=i;l<=n;l++)o[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(n<this.grid.length-1)for(l=a;l<=s;l++)o[1]+=this.grid[n+1][l].length+this.grid[n][l].length-1;if(s<this.grid[0].length-1)for(l=i;l<=n;l++)o[2]+=this.grid[l][s+1].length+this.grid[l][s].length-1;if(0<i)for(l=a;l<=s;l++)o[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var c,h,u,d,p=y.MAX_VALUE,g=0;g<o.length;g++)o[g]<p?(p=o[g],c=1,h=g):o[g]==p&&c++;3==c&&0==p?0==o[0]&&0==o[1]&&0==o[2]?u=1:0==o[0]&&0==o[1]&&0==o[3]?u=0:0==o[0]&&0==o[2]&&0==o[3]?u=3:0==o[1]&&0==o[2]&&0==o[3]&&(u=2):u=2==c&&0==p?(d=Math.floor(2*Math.random()),0==o[0]&&0==o[1]?0==d?0:1:0==o[0]&&0==o[2]?0==d?0:2:0==o[0]&&0==o[3]?0==d?0:3:0==o[1]&&0==o[2]?0==d?1:2:0==o[1]&&0==o[3]?0==d?1:3:0==d?2:3):4==c&&0==p?d=Math.floor(4*Math.random()):h,0==u?t.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-m.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==u?t.setCenter(r.getCenterX()+r.getWidth()/2+m.DEFAULT_EDGE_LENGTH+t.getWidth()/2,r.getCenterY()):2==u?t.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+m.DEFAULT_EDGE_LENGTH+t.getHeight()/2):t.setCenter(r.getCenterX()-r.getWidth()/2-m.DEFAULT_EDGE_LENGTH-t.getWidth()/2,r.getCenterY())}},e.exports=T},991:(e,t,r)=>{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<this.child.getNodes().length&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,i=this.getChild().getNodes(),n=0;n<i.length;n++)null==(r=i[n]).getChild()?(r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},s.prototype.move=function(){var e=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(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.setPred1=function(e){this.pred1=e},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(e){this.next=e},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(e){this.processed=e},s.prototype.isProcessed=function(){return processed},e.exports=s},902:(e,t,r)=>{function Pe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(Pe,"_toConsumableArray");var $e=r(806),Be=r(551).LinkedList,Fe=r(551).Matrix,ze=r(551).SVD;function i(){}mt(i,"ConstraintHandler"),i.handleConstraints=function(e){var t={};t.fixedNodeConstraint=e.constraints.fixedNodeConstraint,t.alignmentConstraint=e.constraints.alignmentConstraint,t.relativePlacementConstraint=e.constraints.relativePlacementConstraint;for(var r=new Map,T=new Map,k=[],C=[],i=e.getAllNodes(),P=0,n=0;n<i.length;n++){var a=i[n];null==a.getChild()&&(T.set(a.id,P++),k.push(a.getCenterX()),C.push(a.getCenterY()),r.set(a.id,a))}t.relativePlacementConstraint&&t.relativePlacementConstraint.forEach(function(e){e.gap||0==e.gap||(e.left?e.gap=$e.DEFAULT_EDGE_LENGTH+r.get(e.left).getWidth()/2+r.get(e.right).getWidth()/2:e.gap=$e.DEFAULT_EDGE_LENGTH+r.get(e.top).getHeight()/2+r.get(e.bottom).getHeight()/2)});var s,$=mt(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},"calculatePositionDiff"),o=mt(function(e){var t=0,r=0;return e.forEach(function(e){t+=k[T.get(e)],r+=C[T.get(e)]}),{x:t/e.size,y:r/e.size}},"calculateAvgPosition"),e=mt(function(e,b,h,x,t){function n(e,t){var r=new Set(e),i=!0,e=!1,n=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var o=a.value;r.add(o)}}catch(t){e=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(e)throw n}}return r}mt(n,"setUnion");var a=new Map,w=(e.forEach(function(e,t){a.set(t,0)}),e.forEach(function(e,t){e.forEach(function(e){a.set(e.id,a.get(e.id)+1)})}),new Map),s=new Map,o=new Be;a.forEach(function(e,t){0==e?(o.push(t),h||("horizontal"==b?w.set(t,T.has(t)?k[T.get(t)]:x.get(t)):w.set(t,T.has(t)?C[T.get(t)]:x.get(t)))):w.set(t,Number.NEGATIVE_INFINITY),h&&s.set(t,new Set([t]))}),h&&t.forEach(function(e){var t,r,i=[];e.forEach(function(e){h.has(e)&&i.push(e)}),0<i.length?(t=0,i.forEach(function(e){"horizontal"==b?w.set(e,T.has(e)?k[T.get(e)]:x.get(e)):w.set(e,T.has(e)?C[T.get(e)]:x.get(e)),t+=w.get(e)}),t/=i.length,e.forEach(function(e){h.has(e)||w.set(e,t)})):(r=0,e.forEach(function(e){r+="horizontal"==b?T.has(e)?k[T.get(e)]:x.get(e):T.has(e)?C[T.get(e)]:x.get(e)}),r/=e.length,e.forEach(function(e){w.set(e,r)}))});for(var u,d,r=mt(function(){var i=o.shift();e.get(i).forEach(function(e){var t,r;w.get(e.id)<w.get(i)+e.gap&&(h&&h.has(e.id)?(r="horizontal"==b?T.has(e.id)?k[T.get(e.id)]:x.get(e.id):T.has(e.id)?C[T.get(e.id)]:x.get(e.id),w.set(e.id,r),r<w.get(i)+e.gap&&(t=w.get(i)+e.gap-r,s.get(i).forEach(function(e){w.set(e,w.get(e)-t)}))):w.set(e.id,w.get(i)+e.gap)),a.set(e.id,a.get(e.id)-1),0==a.get(e.id)&&o.push(e.id),h&&s.set(e.id,n(s.get(i),s.get(e.id)))})},"_loop");0!=o.length;)r();return h&&(u=new Set,e.forEach(function(e,t){0==e.length&&u.add(t)}),d=[],s.forEach(function(r,e){if(u.has(e)){var i,n,t=!1,a=!0,e=!1,s=void 0;try{for(var o,l=r[Symbol.iterator]();!(a=(o=l.next()).done);a=!0){var c=o.value;h.has(c)&&(t=!0)}}catch(t){e=!0,s=t}finally{try{!a&&l.return&&l.return()}finally{if(e)throw s}}t||(i=!1,n=void 0,d.forEach(function(e,t){e.has([].concat(Pe(r))[0])&&(i=!0,n=t)}),i?r.forEach(function(e){d[n].add(e)}):d.push(new Set(r)))}}),d.forEach(function(e,t){var r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=!0,o=!1,l=void 0;try{for(var c,h=e[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var u=c.value,d="horizontal"==b?T.has(u)?k[T.get(u)]:x.get(u):T.has(u)?C[T.get(u)]:x.get(u),p=w.get(u);d<r&&(r=d),n<d&&(n=d),p<i&&(i=p),a<p&&(a=p)}}catch(e){o=!0,l=e}finally{try{!s&&h.return&&h.return()}finally{if(o)throw l}}var g=(r+n)/2-(i+a)/2,f=!0,o=!1,l=void 0;try{for(var m,y=e[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var v=m.value;w.set(v,w.get(v)+g)}}catch(e){o=!0,l=e}finally{try{!f&&y.return&&y.return()}finally{if(o)throw l}}})),w},"findAppropriatePositionForRelativePlacement"),l=mt(function(e){var t=0,r=0,i=0,n=0;if(e.forEach(function(e){e.left?0<=k[T.get(e.left)]-k[T.get(e.right)]?t++:r++:0<=C[T.get(e.top)]-C[T.get(e.bottom)]?i++:n++}),r<t&&n<i)for(var a=0;a<T.size;a++)k[a]=-1*k[a],C[a]=-1*C[a];else if(r<t)for(var s=0;s<T.size;s++)k[s]=-1*k[s];else if(n<i)for(var o=0;o<T.size;o++)C[o]=-1*C[o]},"applyReflectionForRelativePlacement"),B=mt(function(i){var n=[],a=new Be,s=new Set,o=0;return i.forEach(function(e,t){if(!s.has(t)){for(n[o]=[],a.push(r=t),s.add(r),n[o].push(r);0!=a.length;){var r=a.shift();i.get(r).forEach(function(e){s.has(e.id)||(a.push(e.id),s.add(e.id),n[o].push(e.id))})}o++}}),n},"findComponents"),F=mt(function(e){var r=new Map;return e.forEach(function(e,t){r.set(t,[])}),e.forEach(function(e,t){e.forEach(function(e){r.get(t).push(e),r.get(e.id).push({id:t,gap:e.gap,direction:e.direction})})}),r},"dagToUndirected"),z=mt(function(e){var r=new Map;return e.forEach(function(e,t){r.set(t,[])}),e.forEach(function(e,t){e.forEach(function(e){r.get(e.id).push({id:t,gap:e.gap,direction:e.direction})})}),r},"dagToReversed"),c=[],h=[],u=!1,d=!1,p=new Set,g=new Map,f=new Map,m=[];if(t.fixedNodeConstraint&&t.fixedNodeConstraint.forEach(function(e){p.add(e.nodeId)}),t.relativePlacementConstraint&&(t.relativePlacementConstraint.forEach(function(e){e.left?(g.has(e.left)?g.get(e.left).push({id:e.right,gap:e.gap,direction:"horizontal"}):g.set(e.left,[{id:e.right,gap:e.gap,direction:"horizontal"}]),g.has(e.right)||g.set(e.right,[])):(g.has(e.top)?g.get(e.top).push({id:e.bottom,gap:e.gap,direction:"vertical"}):g.set(e.top,[{id:e.bottom,gap:e.gap,direction:"vertical"}]),g.has(e.bottom)||g.set(e.bottom,[]))}),m=B(f=F(g))),$e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(t.fixedNodeConstraint&&1<t.fixedNodeConstraint.length)t.fixedNodeConstraint.forEach(function(e,t){c[t]=[e.position.x,e.position.y],h[t]=[k[T.get(e.nodeId)],C[T.get(e.nodeId)]]}),u=!0;else if(t.alignmentConstraint){var y=0;if(t.alignmentConstraint.vertical){for(var q=t.alignmentConstraint.vertical,U=mt(function(e){var t=new Set,r=(q[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),i=0<r.size?k[T.get(r.values().next().value)]:o(t).x;q[e].forEach(function(e){c[y]=[i,C[T.get(e)]],h[y]=[k[T.get(e)],C[T.get(e)]],y++})},"_loop2"),G=0;G<q.length;G++)U(G);u=!0}if(t.alignmentConstraint.horizontal){for(var j=t.alignmentConstraint.horizontal,W=mt(function(e){var t=new Set,r=(j[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),i=0<r.size?k[T.get(r.values().next().value)]:o(t).y;j[e].forEach(function(e){c[y]=[k[T.get(e)],i],h[y]=[k[T.get(e)],C[T.get(e)]],y++})},"_loop3"),Y=0;Y<j.length;Y++)W(Y);u=!0}t.relativePlacementConstraint&&(d=!0)}else if(t.relativePlacementConstraint){for(var v,b,x,V,H,X=0,K=0,w=0;w<m.length;w++)m[w].length>X&&(X=m[w].length,K=w);X<f.size/2?(l(t.relativePlacementConstraint),d=u=!1):(v=new Map,b=new Map,x=[],m[K].forEach(function(t){g.get(t).forEach(function(e){"horizontal"==e.direction?(v.has(t)?v.get(t).push(e):v.set(t,[e]),v.has(e.id)||v.set(e.id,[]),x.push({left:t,right:e.id})):(b.has(t)?b.get(t).push(e):b.set(t,[e]),b.has(e.id)||b.set(e.id,[]),x.push({top:t,bottom:e.id}))})}),l(x),d=!1,V=e(v,"horizontal"),H=e(b,"vertical"),m[K].forEach(function(e,t){h[t]=[k[T.get(e)],C[T.get(e)]],c[t]=[],V.has(e)?c[t][0]=V.get(e):c[t][0]=k[T.get(e)],H.has(e)?c[t][1]=H.get(e):c[t][1]=C[T.get(e)]}),u=!0)}if(u){for(var S=Fe.transpose(c),Z=Fe.transpose(h),E=0;E<S.length;E++)S[E]=Fe.multGamma(S[E]),Z[E]=Fe.multGamma(Z[E]);for(var f=Fe.multMat(S,Fe.transpose(Z)),u=ze.svd(f),_=Fe.multMat(u.V,Fe.transpose(u.U)),A=0;A<T.size;A++){var Q=[k[A],C[A]],J=[_[0][0],_[1][0]],ee=[_[0][1],_[1][1]];k[A]=Fe.dotProduct(Q,J),C[A]=Fe.dotProduct(Q,ee)}d&&l(t.relativePlacementConstraint)}}if($e.ENFORCE_CONSTRAINTS){if(t.fixedNodeConstraint&&0<t.fixedNodeConstraint.length&&(s={x:0,y:0},t.fixedNodeConstraint.forEach(function(e,t){var r={x:k[T.get(e.nodeId)],y:C[T.get(e.nodeId)]},e=e.position,e=$(e,r);s.x+=e.x,s.y+=e.y}),s.x/=t.fixedNodeConstraint.length,s.y/=t.fixedNodeConstraint.length,k.forEach(function(e,t){k[t]+=s.x}),C.forEach(function(e,t){C[t]+=s.y}),t.fixedNodeConstraint.forEach(function(e){k[T.get(e.nodeId)]=e.position.x,C[T.get(e.nodeId)]=e.position.y})),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var te=t.alignmentConstraint.vertical,re=mt(function(e){var t=new Set,r=(te[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))).size?k[T.get(e.values().next().value)]:o(t).x);t.forEach(function(e){p.has(e)||(k[T.get(e)]=r)})},"_loop4"),ie=0;ie<te.length;ie++)re(ie);if(t.alignmentConstraint.horizontal)for(var ne=t.alignmentConstraint.horizontal,ae=mt(function(e){var t=new Set,r=(ne[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))).size?C[T.get(e.values().next().value)]:o(t).y);t.forEach(function(e){p.has(e)||(C[T.get(e)]=r)})},"_loop5"),se=0;se<ne.length;se++)ae(se)}if(t.relativePlacementConstraint){var R=new Map,L=new Map,N=new Map,D=new Map,oe=new Map,le=new Map,ce=new Set,he=new Set;if(p.forEach(function(e){ce.add(e),he.add(e)}),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var ue=t.alignmentConstraint.vertical,de=mt(function(t){N.set("dummy"+t,[]),ue[t].forEach(function(e){R.set(e,"dummy"+t),N.get("dummy"+t).push(e),p.has(e)&&ce.add("dummy"+t)}),oe.set("dummy"+t,k[T.get(ue[t][0])])},"_loop6"),pe=0;pe<ue.length;pe++)de(pe);if(t.alignmentConstraint.horizontal)for(var ge=t.alignmentConstraint.horizontal,fe=mt(function(t){D.set("dummy"+t,[]),ge[t].forEach(function(e){L.set(e,"dummy"+t),D.get("dummy"+t).push(e),p.has(e)&&he.add("dummy"+t)}),le.set("dummy"+t,C[T.get(ge[t][0])])},"_loop7"),me=0;me<ge.length;me++)fe(me)}var I=new Map,M=new Map,ye=mt(function(i){g.get(i).forEach(function(e){var t=void 0,r=void 0;"horizontal"==e.direction?(t=R.get(i)?R.get(i):i,r=R.get(e.id)?{id:R.get(e.id),gap:e.gap,direction:e.direction}:e,I.has(t)?I.get(t).push(r):I.set(t,[r]),I.has(r.id)||I.set(r.id,[])):(t=L.get(i)?L.get(i):i,r=L.get(e.id)?{id:L.get(e.id),gap:e.gap,direction:e.direction}:e,M.has(t)?M.get(t).push(r):M.set(t,[r]),M.has(r.id)||M.set(r.id,[]))})},"_loop8"),ve=!0,f=!1,u=void 0;try{for(var be,xe=g.keys()[Symbol.iterator]();!(ve=(be=xe.next()).done);ve=!0)ye(be.value)}catch(e){f=!0,u=e}finally{try{!ve&&xe.return&&xe.return()}finally{if(f)throw u}}var f=F(I),u=F(M),f=B(f),u=B(u),we=z(I),Te=z(M),ke=[],Ce=[],Se=(f.forEach(function(e,t){ke[t]=[],e.forEach(function(e){0==we.get(e).length&&ke[t].push(e)})}),u.forEach(function(e,t){Ce[t]=[],e.forEach(function(e){0==Te.get(e).length&&Ce[t].push(e)})}),e(I,"horizontal",ce,oe,ke)),Ee=e(M,"vertical",he,le,Ce),_e=mt(function(t){N.get(t)?N.get(t).forEach(function(e){k[T.get(e)]=Se.get(t)}):k[T.get(t)]=Se.get(t)},"_loop9"),Ae=!0,f=!1,u=void 0;try{for(var Re,Le=Se.keys()[Symbol.iterator]();!(Ae=(Re=Le.next()).done);Ae=!0)_e(Re.value)}catch(e){f=!0,u=e}finally{try{!Ae&&Le.return&&Le.return()}finally{if(f)throw u}}var Ne=mt(function(t){D.get(t)?D.get(t).forEach(function(e){C[T.get(e)]=Ee.get(t)}):C[T.get(t)]=Ee.get(t)},"_loop10"),De=!0,f=!1,u=void 0;try{for(var Ie,Me=Ee.keys()[Symbol.iterator]();!(De=(Ie=Me.next()).done);De=!0)Ne(Ie.value)}catch(e){f=!0,u=e}finally{try{!De&&Me.return&&Me.return()}finally{if(f)throw u}}}}for(var Oe=0;Oe<i.length;Oe++){var O=i[Oe];null==O.getChild()&&O.setCenter(k[T.get(O.id)],C[T.get(O.id)])}},e.exports=i},551:e=>{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})}),Eze=oqe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(Sze()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(Sze()):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<e?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return t.forEach(function(t){Object.keys(t).forEach(function(e){return r[e]=t[e]})}),r}},548:(e,t,r)=>{mt(S,"sliceIterator");var i=r(140).layoutBase.LinkedList;function S(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<e.length;t++)i[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(i[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,s,o,e){for(var l=new i,c=new Set,h=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],t=mt(function(){var i=a.collection(),n=(y.push(i),o[0]),e=a.collection();e.merge(n).merge(n.descendants().intersection(s)),h.push(n),e.forEach(function(e){l.push(e),c.add(e),i.merge(e)});for(var t,r=mt(function(){n=l.shift();var t=a.collection();n.neighborhood().nodes().forEach(function(e){0<s.intersection(n.edgesWith(e)).length&&t.merge(e)});for(var e=0;e<t.length;e++){var r=t[e];null==(u=o.intersection(r.union(r.ancestors())))||c.has(u[0])||u.union(u.descendants()).forEach(function(e){l.push(e),c.add(e),i.merge(e),o.has(e)&&h.push(e)})}},"_loop2");0!=l.length;)r();i.forEach(function(e){s.intersection(e.connectedEdges()).forEach(function(e){i.has(e.source())&&i.has(e.target())&&i.merge(e)})}),(!(g=h.length==o.length||g)||1<f)&&(d=h[0],p=d.connectedEdges().length,h.forEach(function(e){e.connectedEdges().length<p&&(p=e.connectedEdges().length,d=e)}),m.push(d.id()),(t=a.collection()).merge(h[0]),h.forEach(function(e){t.merge(e)}),h=[],o=o.difference(t),f++)},"_loop");t(),!g;);return e&&0<m.length&&e.set("dummy"+(e.size+1),m),y},relocateComponent:function(e,n,t){if(!t.fixedNodeConstraint){var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if("draft"==t.quality){var r=!0,i=!1,c=void 0;try{for(var h,u=n.nodeIndexes[Symbol.iterator]();!(r=(h=u.next()).done);r=!0){var d,p,g,f,m,y=(e=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return S(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<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(e){i=!0,c=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw c}}var w=e.x-(s+a)/2,T=e.y-(l+o)/2;n.xCoords=n.xCoords.map(function(e){return e+w}),n.yCoords=n.yCoords.map(function(e){return e+T})}else{Object.keys(n).forEach(function(e){var t=(e=n[e]).getRect().x,r=e.getRect().x+e.getRect().width,i=e.getRect().y,e=e.getRect().y+e.getRect().height;t<a&&(a=t),s<r&&(s=r),i<o&&(o=i),l<e&&(l=e)});var k=e.x-(s+a)/2,C=e.y-(l+o)/2;Object.keys(n).forEach(function(e){(e=n[e]).setCenter(e.getCenterX()+k,e.getCenterY()+C)})}}},calcBoundingBox:function(e,t,r,i){for(var n=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=e.descendants().not(":parent"),c=l.length,h=0;h<c;h++){var u,d=l[h];(u=t[i.get(d.id())]-d.width()/2)<n&&(n=u),a<(u=t[i.get(d.id())]+d.width()/2)&&(a=u),(u=r[i.get(d.id())]-d.height()/2)<s&&(s=u),o<(u=r[i.get(d.id())]+d.height()/2)&&(o=u)}return(e={}).topLeftX=n,e.topLeftY=s,e.width=a-n,e.height=o-s,e},calcParentsWithoutChildren:function(e,t){var r=e.collection();return t.nodes(":parent").forEach(function(e){var t=!1;e.children().forEach(function(e){"none"!=e.css("display")&&(t=!0)}),t||r.merge(e)}),r}}},816:(e,t,r)=>{var v=r(548),o=r(140).CoSELayout,b=r(140).CoSENode,x=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,T=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<a;s++){var o,l=r[s],c=null,h=void(0==l.intersection(y).length&&(c=l.children())),u=l.layoutDimensions({nodeDimensionsIncludeLabels:n.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?n.randomize?l.isParent()?(o=v.calcBoundingBox(l,p,g,d),0==l.intersection(y).length?t.add(new b(i.graphManager,new x(o.topLeftX,o.topLeftY),new w(o.width,o.height))):t.add(new b(i.graphManager,new x(o.topLeftX,o.topLeftY),new w(parseFloat(u.w),parseFloat(u.h))))):t.add(new b(i.graphManager,new x(p[d.get(l.id())]-u.w/2,g[d.get(l.id())]-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):t.add(new b(i.graphManager,new x(l.position("x")-u.w/2,l.position("y")-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):t.add(new b(this.graphManager))).id=l.data("id"),h.nodeRepulsion=m(n.nodeRepulsion,l),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),n.nodeDimensionsIncludeLabels&&(h.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,h.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,h.labelPosVertical=l.css("text-valign"),h.labelPosHorizontal=l.css("text-halign")),f[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&e(i.getGraphManager().add(i.newGraph(),h),c,i,n)}},"processChildrenList"),t=mt(function(e,t,r){for(var i=0,n=0,a=0;a<r.length;a++){var s=r[a],o=f[s.data("source")],l=f[s.data("target")];o&&l&&o!==l&&0==o.getEdgesBetween(l).length&&((o=t.add(e.newEdge(),o,l)).id=s.id(),o.idealLength=m(c.idealEdgeLength,s),o.edgeElasticity=m(c.edgeElasticity,s),i+=o.idealLength,n++)}null!=c.idealEdgeLength&&(0<n?T.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=i/n:h(c.idealEdgeLength)?T.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:T.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,T.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,T.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},"processEdges"),n=mt(function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)},"processConstraints"),a=(null!=c.nestingFactor&&(T.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),null!=c.gravity&&(T.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=c.gravity),null!=c.numIter&&(T.MAX_ITERATIONS=u.MAX_ITERATIONS=c.numIter),null!=c.gravityRange&&(T.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),null!=c.gravityCompound&&(T.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),null!=c.gravityRangeCompound&&(T.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),null!=c.initialEnergyOnIncremental&&(T.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),null!=c.tilingCompareBy&&(T.TILING_COMPARE_BY=c.tilingCompareBy),l.QUALITY="proof"==c.quality?2:0,T.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,T.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!c.randomize,T.ANIMATE=u.ANIMATE=l.ANIMATE=c.animate,T.TILE=c.tile,T.TILING_PADDING_VERTICAL="function"==typeof c.tilingPaddingVertical?c.tilingPaddingVertical.call():c.tilingPaddingVertical,T.TILING_PADDING_HORIZONTAL="function"==typeof c.tilingPaddingHorizontal?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,T.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,T.PURE_INCREMENTAL=!c.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,"transformed"==c.step&&(T.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,T.ENFORCE_CONSTRAINTS=!1,T.APPLY_LAYOUT=!1),"enforced"==c.step&&(T.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,T.ENFORCE_CONSTRAINTS=!0,T.APPLY_LAYOUT=!1),"cose"==c.step&&(T.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,T.ENFORCE_CONSTRAINTS=!1,T.APPLY_LAYOUT=!0),"all"==c.step&&(c.randomize?T.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:T.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,T.ENFORCE_CONSTRAINTS=!0,T.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?T.TREE_REDUCTION_ON_INCREMENTAL=!1:T.TREE_REDUCTION_ON_INCREMENTAL=!0,new o),s=a.newGraphManager();return e(s.addRoot(),v.getTopMostNodes(r),a,c),t(a,s,i),n(a,c),a.runLayout(),f},"coseLayout");e.exports={coseLayout:r}},212:(e,t,r)=>{function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=r(658),x=r(548),w=r(657).spectralLayout,T=r(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:mt(function(e){return 4500},"nodeRepulsion"),idealEdgeLength:mt(function(e){return 50},"idealEdgeLength"),edgeElasticity:mt(function(e){return.45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:mt(function(){},"ready"),stop:mt(function(){},"stop")}),r=(mt(c,"Layout"),a=c,s=[{key:"run",value:mt(function(){var h=this.options,e=h.cy,t=h.eles,u=[],d=[],r=void 0,i=[],n=(!h.fixedNodeConstraint||Array.isArray(h.fixedNodeConstraint)&&0!=h.fixedNodeConstraint.length||(h.fixedNodeConstraint=void 0),!h.alignmentConstraint||(!h.alignmentConstraint.vertical||Array.isArray(h.alignmentConstraint.vertical)&&0!=h.alignmentConstraint.vertical.length||(h.alignmentConstraint.vertical=void 0),!h.alignmentConstraint.horizontal)||Array.isArray(h.alignmentConstraint.horizontal)&&0!=h.alignmentConstraint.horizontal.length||(h.alignmentConstraint.horizontal=void 0),!h.relativePlacementConstraint||Array.isArray(h.relativePlacementConstraint)&&0!=h.relativePlacementConstraint.length||(h.relativePlacementConstraint=void 0),void((h.fixedNodeConstraint||h.alignmentConstraint||h.relativePlacementConstraint)&&(h.tile=!1,h.packComponents=!1))),a=!1;if(e.layoutUtilities&&h.packComponents&&(n=(n=e.layoutUtilities("get"))||e.layoutUtilities(),a=!0),0<t.nodes().length)if(a){if(a=x.getTopMostNodes(h.eles.nodes()),(r=x.connectComponents(e,h.eles,a)).forEach(function(e){e=e.boundingBox(),i.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),h.randomize&&r.forEach(function(e){h.eles=e,u.push(w(h))}),"default"==h.quality||"proof"==h.quality){var s=e.collection();if(h.tile){var a=new Map,o=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},c=[];if(r.forEach(function(r,e){0==r.edges().length&&(r.nodes().forEach(function(e,t){s.merge(r.nodes()[t]),e.isParent()||(l.nodeIndexes.set(r.nodes()[t].id(),o++),l.xCoords.push(r.nodes()[0].position().x),l.yCoords.push(r.nodes()[0].position().y))}),c.push(e))}),1<s.length){a=s.boundingBox(),i.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),r.push(s),u.push(l);for(var p=c.length-1;0<=p;p--)r.splice(c[p],1),u.splice(c[p],1),i.splice(c[p],1)}}r.forEach(function(e,t){h.eles=e,d.push(T(h,u[t])),x.relocateComponent(i[t],d[t],h)})}else r.forEach(function(e,t){x.relocateComponent(i[t],u[t],h)});var g,f,m,y,v=new Set;1<r.length&&(g=[],f=t.filter(function(e){return"none"==e.css("display")}),r.forEach(function(e,o){var l,r,c=void 0;"draft"==h.quality&&(c=u[o].nodeIndexes),0<e.nodes().not(f).length&&(l={edges:[],nodes:[]},e.nodes().not(f).forEach(function(e){var t;"draft"==h.quality?e.isParent()?(t=x.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,c),l.nodes.push({x:t.topLeftX,y:t.topLeftY,width:t.width,height:t.height})):(r=c.get(e.id()),l.nodes.push({x:u[o].xCoords[r]-e.boundingbox().w/2,y:u[o].yCoords[r]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h})):d[o][e.id()]&&l.nodes.push({x:d[o][e.id()].getLeft(),y:d[o][e.id()].getTop(),width:d[o][e.id()].getWidth(),height:d[o][e.id()].getHeight()})}),e.edges().forEach(function(e){var t,r,i,n,a,s=e.source(),e=e.target();"none"!=s.css("display")&&"none"!=e.css("display")&&("draft"==h.quality?(t=c.get(s.id()),r=c.get(e.id()),i=[],n=[],s.isParent()?(a=x.calcBoundingBox(s,u[o].xCoords,u[o].yCoords,c),i.push(a.topLeftX+a.width/2),i.push(a.topLeftY+a.height/2)):(i.push(u[o].xCoords[t]),i.push(u[o].yCoords[t])),e.isParent()?(a=x.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,c),n.push(a.topLeftX+a.width/2),n.push(a.topLeftY+a.height/2)):(n.push(u[o].xCoords[r]),n.push(u[o].yCoords[r])),l.edges.push({startX:i[0],startY:i[1],endX:n[0],endY:n[1]})):d[o][s.id()]&&d[o][e.id()]&&l.edges.push({startX:d[o][s.id()].getCenterX(),startY:d[o][s.id()].getCenterY(),endX:d[o][e.id()].getCenterX(),endY:d[o][e.id()].getCenterY()}))}),0<l.nodes.length)&&(g.push(l),v.add(o))}),m=n.packComponents(g,h.randomize).shifts,"draft"==h.quality?u.forEach(function(e,t){var r=e.xCoords.map(function(e){return e+m[t].dx}),i=e.yCoords.map(function(e){return e+m[t].dy});e.xCoords=r,e.yCoords=i}):(y=0,v.forEach(function(t){Object.keys(d[t]).forEach(function(e){(e=d[t][e]).setCenter(e.getCenterX()+m[y].dx,e.getCenterY()+m[y].dy)}),y++})))}else a=h.eles.boundingBox(),i.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),h.randomize&&(n=w(h),u.push(n)),"default"==h.quality||"proof"==h.quality?(d.push(T(h,u[0])),x.relocateComponent(i[0],d[0],h)):x.relocateComponent(i[0],u[0],h);var b=mt(function(r,e){var t,i,n,a;return"default"==h.quality||"proof"==h.quality?(i=t=void 0,n=(r="number"==typeof r?e:r).data("id"),d.forEach(function(e){n in e&&(t={x:e[n].getRect().getCenterX(),y:e[n].getRect().getCenterY()},i=e[n])}),h.nodeDimensionsIncludeLabels&&(i.labelWidth&&("left"==i.labelPosHorizontal?t.x+=i.labelWidth/2:"right"==i.labelPosHorizontal&&(t.x-=i.labelWidth/2)),i.labelHeight)&&("top"==i.labelPosVertical?t.y+=i.labelHeight/2:"bottom"==i.labelPosVertical&&(t.y-=i.labelHeight/2)),{x:(t=null==t?{x:r.position("x"),y:r.position("y")}:t).x,y:t.y}):(a=void 0,u.forEach(function(e){var t=e.nodeIndexes.get(r.id());null!=t&&(a={x:e.xCoords[t],y:e.yCoords[t]})}),{x:(a=null==a?{x:r.position("x"),y:r.position("y")}:a).x,y:a.y})},"getPositions");"default"==h.quality||"proof"==h.quality||h.randomize?(a=x.calcParentsWithoutChildren(e,t),n=t.filter(function(e){return"none"==e.css("display")}),h.eles=t.not(n),t.nodes().not(":parent").not(n).layoutPositions(this,h,b),0<a.length&&a.forEach(function(e){e.position(b(e))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}],i(a.prototype,s),c);function c(e){n(this,c),this.options=o({},l,e)}e.exports=r},657:(e,t,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=[],w=void 0,T=e.piTol,i=e.samplingType,k=e.nodeSeparation,d=void 0,P=mt(function(){for(var e=0,t=!1;e<d;){for(var r=Math.floor(Math.random()*w),t=!1,i=0;i<e;i++)if(h[i]==r){t=!0;break}t||(h[e]=r,e++)}},"randomSampleCR"),p=mt(function(e,t,r){for(var i,n=[],a=0,s=0,o=[],l=0,c=1,h=0;h<w;h++)o[h]=1e8;for(o[n[s]=e]=0;a<=s;){for(var u=n[a++],d=y[u],p=0;p<d.length;p++)1e8==o[i=m.get(d[p])]&&(o[i]=o[u]+1,n[++s]=i);b[u][t]=o[u]*k}if(r){for(var g=0;g<w;g++)b[g][t]<v[g]&&(v[g]=b[g][t]);for(var f=0;f<w;f++)l<v[f]&&(l=v[f],c=f)}return c},"BFS"),l=mt(function(e){var t=void 0;if(e){for(var t=Math.floor(Math.random()*w),r=0;r<w;r++)v[r]=1e8;for(var i=0;i<d;i++)t=p(h[i]=t,i,e)}else{P();for(var n=0;n<d;n++)p(h[n],n,e,!1)}for(var a=0;a<w;a++)for(var s=0;s<d;s++)b[a][s]*=b[a][s];for(var o=0;o<d;o++)u[o]=[];for(var l=0;l<d;l++)for(var c=0;c<d;c++)u[l][c]=b[h[c]][l]},"allBFS"),$=mt(function(){for(var e=(r=G.svd(u)).S,t=r.U,r=r.V,i=e[0]*e[0]*e[0],n=[],a=0;a<d;a++){n[a]=[];for(var s=0;s<d;s++)n[a][s]=0,a==s&&(n[a][s]=e[a]/(e[a]*e[a]+i/(e[a]*e[a])))}x=U.multMat(U.multMat(r,n),U.transpose(t))},"sample"),B=mt(function(){for(var e=void 0,t=void 0,r=[],i=[],n=[],a=[],s=0;s<w;s++)r[s]=Math.random(),i[s]=Math.random();for(var r=U.normalize(r),i=U.normalize(i),o=1e-9,l=1e-9,c=void 0;;){for(var h=0;h<w;h++)n[h]=r[h];if(r=U.multGamma(U.multL(U.multGamma(n),b,x)),e=U.dotProduct(n,r),r=U.normalize(r),o=U.dotProduct(n,r),(c=Math.abs(o/l))<=1+T&&1<=c)break;l=o}for(var u=0;u<w;u++)n[u]=r[u];for(l=1e-9;;){for(var d=0;d<w;d++)a[d]=i[d];if(a=U.minusOp(a,U.multCons(n,U.dotProduct(n,a))),i=U.multGamma(U.multL(U.multGamma(a),b,x)),t=U.dotProduct(a,i),i=U.normalize(i),o=U.dotProduct(a,i),(c=Math.abs(o/l))<=1+T&&1<=c)break;l=o}for(var p=0;p<w;p++)a[p]=i[p];g=U.multCons(n,Math.sqrt(Math.abs(e))),f=U.multCons(a,Math.sqrt(Math.abs(t)))},"powerIteration");q.connectComponents(n,a,q.getTopMostNodes(t),s),r.forEach(function(e){q.connectComponents(n,a,q.getTopMostNodes(e.descendants().intersection(a)),s)});for(var c=0,C=0;C<t.length;C++)t[C].isParent()||m.set(t[C].id(),c++);var S=!0,E=!1,_=void 0;try{for(var A,R=s.keys()[Symbol.iterator]();!(S=(A=R.next()).done);S=!0){var F=A.value;m.set(F,c++)}}catch(e){E=!0,_=e}finally{try{!S&&R.return&&R.return()}finally{if(E)throw _}}for(var L=0;L<m.size;L++)y[L]=[];r.forEach(function(e){for(var t=e.children().intersection(a);0==t.nodes(":childless").length;)t=t.nodes()[0].children().intersection(a);var r=0,i=t.nodes(":childless")[0].connectedEdges().length;t.nodes(":childless").forEach(function(e,t){e.connectedEdges().length<i&&(i=e.connectedEdges().length,r=t)}),o.set(e.id(),t.nodes(":childless")[r].id())}),t.forEach(function(t){var r=t.isParent()?m.get(o.get(t.id())):m.get(t.id());t.neighborhood().nodes().forEach(function(e){0<a.intersection(t.edgesWith(e)).length&&(e.isParent()?y[r].push(o.get(e.id())):y[r].push(e.id()))})});var z=mt(function(t){var r,i=m.get(t);s.get(t).forEach(function(e){r=n.getElementById(e).isParent()?o.get(e):e,y[i].push(r),y[m.get(r)].push(t)})},"_loop"),N=!0,E=!1,_=void 0;try{for(var D,I=s.keys()[Symbol.iterator]();!(N=(D=I.next()).done);N=!0)z(D.value)}catch(e){E=!0,_=e}finally{try{!N&&I.return&&I.return()}finally{if(E)throw _}}if(2<(w=m.size)){for(var d=w<e.sampleSize?w:e.sampleSize,M=0;M<w;M++)b[M]=[];for(var O=0;O<d;O++)x[O]=[];"draft"==e.quality||"all"==e.step?(l(i),$(),B()):m.forEach(function(e,t){g.push(n.getElementById(t).position("x")),f.push(n.getElementById(t).position("y"))})}else r=m.keys(),_=(E=n.getElementById(r.next().value)).position(),l=E.outerWidth(),g.push(_.x),f.push(_.y),2==w&&(i=n.getElementById(r.next().value).outerWidth(),g.push(_.x+l/2+i/2+e.idealEdgeLength),f.push(_.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");e.exports={spectralLayout:r}},579:(e,t,r)=>{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})}),_ze=x(()=>{$c(),pze=mt(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),gze={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:pze('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:pze('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:pze('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:pze('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:pze('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Rc,blank:{body:pze("")}}}}),Aze=x(()=>{Cu(),eL(),$c(),Pc(),_ze(),xze(),a_(),fze=mt(async function(w,e,T){let k=T.getConfigField("padding"),t=T.getConfigField("iconSize"),C=t/2,S=t/6,E=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}=aze(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&&(HFe(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(HFe(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==T.getNode(t)?.type||(HFe(r)?h+="L"===r?C:-C:u+="T"===r?C:-C),l||"junction"!==T.getNode(a)?.type||(HFe(s)?g+="L"===s?C:-C:f+="T"===s?C:-C),e[0]._private.rscratch&&((e=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge").attr("id",n_(t,a,{prefix:"L"})),i&&(x=HFe(r)?WFe[r](h,S):h-E,y=XFe(r)?WFe[r](u,S):u-E,e.insert("polygon").attr("points",jFe[r](S)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),o&&(x=HFe(s)?WFe[s](g,S):g-E,y=XFe(s)?WFe[s](f,S):f-E,e.insert("polygon").attr("points",jFe[s](S)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(b=KFe(r,s)?"XY":HFe(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 JR(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=JFe(r,s))&&ZFe(y)&&(e=x.node().getBoundingClientRect(),[y,v]=tze(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"),mze=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=sze(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(`<g>${await Oc(n.icon,{height:u,width:u,fallbackPrefix:gze.prefix})}</g>`),i.attr("transform","translate("+(t+p+1)+", "+(r+p+1)+")"),t+=u,r+=d/2-1-2),n.label&&(s=e.append("g"),await JR(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"),yze=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 JR(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(`<g>${await Oc(i.icon,{height:s,width:s,fallbackPrefix:gze.prefix})}</g>`):i.iconText?(o.html(`<g>${await Oc("blank",{height:s,width:s,fallbackPrefix:gze.prefix})}</g>`),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(cc(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} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 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"),vze=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 Rze(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 Lze(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 Nze(r,e){e.nodes().map(e=>{var t=sze(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 Dze(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 Ize(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=KFe(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 Mze(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<a.length-1;t++)for(let e=t+1;e<a.length;e++){var[s,o]=a[t],[l,c]=a[e];u[s]?.[l]===h||"default"===s||"default"===l?(r[i]??=[],r[i]=[...r[i],...o,...c]):(r[i+"-"+n++]=o,r[i+"-"+n++]=c)}return r},{}),"flattenAlignments"),r=e.map(e=>{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=>1<e.length),vert:Object.values(t(a,"vertical")).filter(e=>1<e.length)}}),[i,n]=r.reduce(([e,t],{horiz:r,vert:i})=>[[...e,...r],[...t,...i]],[[],[]]);return{horizontal:i,vertical:n}}function Oze(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<s.length;){var r=s.shift();if(r){o[r]=1;let n=a[r];if(n){let i=u(r);Object.entries(t).forEach(([e,t])=>{var t=h([i[0]+t[0],i[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),c.push({[GFe[e]]:r,[GFe[YFe(e)]]:n,gap:1.5*l.getConfigField("iconSize")}))})}}}}),c}function Pze(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=fhe({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(),Dze(l,s),Rze(n,s,h),Lze(a,s,h),Ize(c,s),Mze(h,u,d)),i=Oze(u,h),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=sze(e).parent)===sze(t).parent?1.5*h.getConfigField("iconSize"):.5*h.getConfigField("iconSize")},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=sze(e).parent)===sze(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=aze(t).sourceDir,[r,i]=XFe(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 $ze,Bze,Fze=x(()=>{mhe(),$ze=G(Eze(),1),aT(),e(),$c(),s_e(),ch(),_ze(),xze(),Aze(),Dc([{name:gze.prefix,icons:gze}]),fhe.use($ze.default),mt(Rze,"addServices"),mt(Lze,"addJunctions"),mt(Nze,"positionNodes"),mt(Dze,"addGroups"),mt(Ize,"addEdges"),mt(Mze,"getAlignments"),mt(Oze,"getRelativeConstraints"),mt(Pze,"layoutArchitecture"),$ze=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=JEe(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 yze(i,u,n),vze(i,u,a),await Pze(n,a,s,o,i,l));await fze(c,u,i),await mze(h,u,i),Nze(i,u),Jc(void 0,t,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),Bze={draw:$ze}}),zze={};dqe(zze,{diagram:()=>qze});var qze,Uze,Gze=x(()=>{Tze(),wze(),kze(),Fze(),qze={parser:hze,get db(){return new lze},renderer:Bze,styles:dze}}),jze=x(()=>{ti(),ii(),a_(),ML(),ku(),Uze=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=yh,this.getAccTitle=vh,this.setDiagramTitle=wh,this.getDiagramTitle=Th,this.getAccDescription=xh,this.setAccDescription=bh}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=Yt,t=sr();return _E({...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=>{AL(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(){mh(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function Wze(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<n.length&&n[n.length-1].level>=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 Yze,Vze,Hze,Xze,Kze,Zze,Qze,Jze,eqe,tqe=x(()=>{mt(Wze,"buildHierarchy")}),rqe=x(()=>{$7e(),e(),q7e(),tqe(),jze(),Yze=mt((e,i)=>{B7e(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=Vze(l),s=0<(s=l.classSelector?i.getStylesForClass(l.classSelector):[]).length?s.join(";"):void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},n.push(o))}let c=Wze(n),h=mt((e,t)=>{for(var r of e)i.addNode(r,t),r.children&&0<r.children.length&&h(r.children,t+1)},"addNodesRecursively");h(c,0)},"populate"),Vze=mt(e=>e.name?String(e.name):"","getItemName"),Hze={parser:{yy:void 0},parse:mt(async e=>{try{var t=await I7e("treemap",e),r=(M.debug("Treemap AST:",t),Hze.parser?.yy);if(!(r instanceof Uze))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.");Yze(t,r)}catch(e){throw M.error("Error parsing treemap:",e),e}},"parse")}}),iqe=x(()=>{s_e(),eue(),ch(),aT(),ML(),ii(),e(),Xze=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=sr().themeVariables;if(h){var s=c?30:0,d=JEe(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),Qc(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+iv(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+iv(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+iv(t||"")(e),"valueFormat")}else r=iv(y)}catch(e){M.error("Error creating format function:",e),r=iv(",")}let t=vb().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=vb().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=vb().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=Uv(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=ub().size([p,g]).paddingTop(e=>e.children&&0<e.children.length?35:0).paddingInner(l).paddingLeft(e=>e.children&&0<e.children.length?10:0).paddingRight(e=>e.children&&0<e.children.length?10:0).paddingBottom(e=>e.children&&0<e.children.length?10:0).round(!0)(y)).descendants().filter(e=>e.children&&0<e.children.length),(p=m.selectAll(".treemapSection").data(s).enter().append("g").attr("class","treemapSection").attr("transform",e=>`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(;0<e.length;){if(0===(e=r.substring(0,e.length-1)).length){t.text("..."),a.getComputedTextLength()>n&&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&&8<e;)e--,i.style("font-size",e+"px");let t=Math.max(6,Math.min(28,Math.round(.6*e))),r=e+2+t;for(;r>s&&8<e&&(e--,!((t=Math.max(6,Math.min(28,Math.round(.6*e))))<6&&8===e));)i.style("font-size",e+"px"),r=e+2+t,t<=6&&r;i.style("font-size",e+"px"),(n.getComputedTextLength()>a||e<8||s<e)&&i.style("display","none")}}),!1!==o.showValues&&y.append("text").attr("class","treemapValue").attr("x",e=>(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<n+t||t<6?i.style("display","none"):i.style("display",null)}),s=o.diagramPadding??8,Bhe(d,s,"flowchart",o?.useMaxWidth||!1)}},"draw"),Kze=mt(function(e,t){return t.db.getClasses()},"getClasses"),Zze={draw:Xze,getClasses:Kze}}),nqe=x(()=>{a_(),Qze={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},Jze=mt(({treemap:e}={})=>`
|
||
.treemapNode.section {
|
||
stroke: ${(e=_E(Qze,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"),eqe=Jze}),aqe={};dqe(aqe,{diagram:()=>sqe});var sqe,oqe,lqe=x(()=>{jze(),rqe(),iqe(),nqe(),sqe={parser:Hze,get db(){return new Uze},renderer:Zze,styles:eqe}}),cqe=(dqe(oqe={},{default:()=>TGe}),$c(),nh(),oh(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(D_(),L_))).diagram}),"loader")}),hqe={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(()=>(uue(),sue))).diagram}),"loader")},uqe="flowchart-v2",x=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"),dqe=mt(async()=>{var e=(await Promise.resolve().then(()=>(uue(),sue))).diagram;return{id:uqe,diagram:e}},"loader"),pqe={id:uqe,detector:x,loader:dqe},gqe={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(kue(),wue))).diagram}),"loader")},fqe={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(cSe(),aSe))).diagram}),"loader")},mqe={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(r_e(),YEe))).diagram}),"loader")},yqe={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(A_e(),l_e))).diagram}),"loader")},vqe={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(F_e(),I_e))).diagram}),"loader")},bqe="quadrantChart",x=mt(e=>/^\s*quadrantChart/.test(e),"detector"),dqe=mt(async()=>{var e=(await Promise.resolve().then(()=>(x8e(),m8e))).diagram;return{id:bqe,diagram:e}},"loader"),xqe={id:bqe,detector:x,loader:dqe},wqe={id:"xychart",detector:mt(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>($Ae(),LAe))).diagram}),"loader")},Tqe="requirement",x=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),dqe=mt(async()=>{var e=(await Promise.resolve().then(()=>(q9e(),jAe))).diagram;return{id:Tqe,diagram:e}},"loader"),kqe={id:Tqe,detector:x,loader:dqe},Cqe={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(NRe(),fRe))).diagram}),"loader")},Sqe={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(()=>(FRe(),$Re))).diagram}),"loader")},Eqe="classDiagram",x=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),dqe=mt(async()=>{var e=(await Promise.resolve().then(()=>(kLe(),zRe))).diagram;return{id:Eqe,diagram:e}},"loader"),_qe={id:Eqe,detector:x,loader:dqe},Aqe={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(()=>(wNe(),bNe))).diagram}),"loader")},Rqe="stateDiagram",x=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),dqe=mt(async()=>{var e=(await Promise.resolve().then(()=>(eDe(),TNe))).diagram;return{id:Rqe,diagram:e}},"loader"),Lqe={id:Rqe,detector:x,loader:dqe},Nqe={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(TDe(),vDe))).diagram}),"loader")},Dqe=(e(),s_e(),ch(),x={draw:mt((e,t,r)=>{M.debug(`rendering svg for syntax error
|
||
`);var i=(t=JEe(t)).append("g");t.attr("viewBox","0 0 2412 512"),Qc(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")}),Iqe={db:{},renderer:x,parser:{parse:mt(()=>{},"parse")}},Mqe="flowchart-elk",dqe=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),x=mt(async()=>{var e=(await Promise.resolve().then(()=>(uue(),sue))).diagram;return{id:Mqe,diagram:e}},"loader"),Oqe={id:Mqe,detector:dqe,loader:x},Pqe={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(bIe(),fIe))).diagram}),"loader")},$qe={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(yMe(),WIe))).diagram}),"loader")},Bqe={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(BMe(),TMe))).diagram}),"loader")},Fqe={id:"sankey",detector:mt(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(hPe(),ZOe))).diagram}),"loader")},zqe={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(IPe(),fPe))).diagram}),"loader")},qqe={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(e$e(),KPe))).diagram}),"loader")},Uqe={id:"block",detector:mt(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(bze(),qFe))).diagram}),"loader")},Gqe="architecture",dqe=mt(e=>/^\s*architecture/.test(e),"detector"),x=mt(async()=>{var e=(await Promise.resolve().then(()=>(Gze(),zze))).diagram;return{id:Gqe,diagram:e}},"loader"),jqe={id:Gqe,detector:dqe,loader:x},Wqe=(oh(),Cu(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(lqe(),aqe))).diagram}),"loader")}),Yqe=!1,Vqe=mt(()=>{Yqe||(Yqe=!0,Nh("error",Iqe,e=>"error"===e.toLowerCase().trim()),Nh("---",{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("---")),Wc(Oqe,$qe,jqe),Wc(cqe,Bqe,_qe,Sqe,gqe,mqe,yqe,vqe,kqe,Cqe,pqe,hqe,Pqe,fqe,Lqe,Aqe,Nqe,xqe,Fqe,zqe,wqe,Uqe,qqe,Wqe))},"addDiagrams"),Hqe=(e(),oh(),Cu(),mt(async()=>{M.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(Gc).map(async([e,{detector:t,loader:r}])=>{if(r)try{Dh(e)}catch{try{var{diagram:i,id:n}=await r();Nh(n,i,t)}catch(t){throw M.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Gc[e],t}}}))).filter(e=>"rejected"===e.status);if(0<e.length){M.error(`Failed to load ${e.length} external diagrams`);for(var t of e)M.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams")),Xqe=(e(),aT(),"comm"),Kqe="rule",Zqe="decl",Qqe=Math.abs,Jqe=String.fromCharCode;function eUe(e){return e.trim()}function tUe(e,t,r){return e.replace(t,r)}function rUe(e,t,r){return e.indexOf(t,r)}function iUe(e,t){return 0|e.charCodeAt(t)}function nUe(e,t,r){return e.slice(t,r)}function aUe(e){return e.length}function sUe(e){return e.length}function oUe(e,t){return t.push(e),e}mt(eUe,"trim"),mt(tUe,"replace"),mt(rUe,"indexof"),mt(iUe,"charat"),mt(nUe,"substr"),mt(aUe,"strlen"),mt(sUe,"sizeof"),mt(oUe,"append");var lUe=1,cUe=1,hUe=0,uUe=0,dUe=0,pUe="";function gUe(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:lUe,column:cUe,length:s,return:"",siblings:o}}function fUe(){return dUe=0<uUe?iUe(pUe,--uUe):0,cUe--,10===dUe&&(cUe=1,lUe--),dUe}function mUe(){return dUe=uUe<hUe?iUe(pUe,uUe++):0,cUe++,10===dUe&&(cUe=1,lUe++),dUe}function yUe(){return iUe(pUe,uUe)}function vUe(e,t){return nUe(pUe,e,t)}function bUe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xUe(e){return lUe=cUe=1,hUe=aUe(pUe=e),uUe=0,[]}function wUe(e){return pUe="",e}function TUe(e){return eUe(vUe(uUe-1,SUe(91===e?e+2:40===e?e+1:e)))}function kUe(e){for(;(dUe=yUe())&&dUe<33;)mUe();return 2<bUe(e)||3<bUe(dUe)?"":" "}function CUe(e,t){for(;--t&&mUe()&&!(dUe<48||102<dUe||57<dUe&&dUe<65||70<dUe&&dUe<97););return vUe(e,uUe+(t<6&&32==yUe()&&32==mUe()))}function SUe(e){for(;mUe();)switch(dUe){case e:return uUe;case 34:case 39:34!==e&&39!==e&&SUe(dUe);break;case 40:41===e&&SUe(e);break;case 92:mUe()}return uUe}function EUe(e,t){for(;mUe()&&e+dUe!==57&&(e+dUe!==84||47!==yUe()););return"/*"+vUe(t,uUe-1)+"*"+Jqe(47===e?e:mUe())}function _Ue(e){for(;!bUe(yUe());)mUe();return vUe(e,uUe)}function AUe(e){return wUe(RUe("",null,null,null,[""],e=xUe(e),0,[0],e))}function RUe(e,t,r,i,n,a,s,o,l){for(var c,h,u,d=0,p=0,g=s,f=0,m=0,y=1,v=1,b=1,x=0,w="",T=n,k=w;v;)switch(c=x,x=mUe()){case 40:if(108!=c&&58==iUe(k,g-1)){-1!=rUe(k+=tUe(TUe(x),"&","&\f"),"&\f",Qqe(d?o[d-1]:0))&&(b=-1);break}case 34:case 39:case 91:k+=TUe(x);break;case 9:case 10:case 13:case 32:k+=kUe(c);break;case 92:k+=CUe(uUe-1,7);continue;case 47:switch(yUe()){case 42:case 47:oUe(NUe(EUe(mUe(),uUe),t,r,l),l),5!=bUe(c||1)&&5!=bUe(yUe()||1)||!aUe(k)||" "===nUe(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*y:o[d++]=aUe(k)*b;case 125*y:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+p:-1==b&&(k=tUe(k,/\f/g,"")),0<m&&(aUe(k)-g||0===y&&47===c)&&oUe(32<m?DUe(k+";",i,r,g-1,l):DUe(tUe(k," ","")+";",i,r,g-2,l),l);break;case 59:k+=";";default:if(oUe(u=LUe(k,t,r,d,p,n,o,w,T=[],h=[],g,a),a),123===x)if(0===p)RUe(k,t,u,u,T,a,g,o,h);else{switch(f){case 99:if(110===iUe(k,3))break;case 108:if(97===iUe(k,2))break;default:p=0;case 100:case 109:case 115:}p?RUe(e,u,u,i&&oUe(LUe(e,u,u,0,0,n,o,w,n,T=[],g,h),h),n,h,g,o,i?T:h):RUe(k,u,u,u,[""],h,0,o,h)}}d=p=m=0,y=b=1,w=k="",g=s;break;case 58:g=1+aUe(k),m=c;default:if(y<1)if(123==x)--y;else if(125==x&&0==y++&&125==fUe())continue;switch(k+=Jqe(x),x*y){case 38:b=0<p?1:(k+="\f",-1);break;case 44:o[d++]=(aUe(k)-1)*b,b=1;break;case 64:45===yUe()&&(k+=TUe(mUe())),f=yUe(),p=g=aUe(w=k+=_Ue(uUe)),x++;break;case 45:45===c&&2==aUe(k)&&(y=0)}}return a}function LUe(e,t,r,i,n,a,s,o,l,c,h,u){for(var d,p=n-1,g=0===n?a:[""],f=sUe(g),m=0,y=0;m<i;++m)for(var v,b=0,x=nUe(e,p+1,p=Qqe(d=s[m]));b<f;++b)(v=eUe(0<d?g[b]+" "+x:tUe(x,/&\f/g,g[b])))&&(l[y++]=v);return gUe(e,t,r,0===n?Kqe:o,l,c,h,u)}function NUe(e,t,r,i){return gUe(e,t,r,Xqe,Jqe(dUe),nUe(e,2,-2),0,i)}function DUe(e,t,r,i,n){return gUe(e,t,r,Zqe,nUe(e,0,i),nUe(e,i+1,-1),i,n)}function IUe(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function MUe(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Zqe:return e.return=e.return||e.value;case Xqe:return"";case"@keyframes":return e.return=e.value+"{"+IUe(e.children,i)+"}";case Kqe:if(!aUe(e.value=e.props.join(",")))return""}return aUe(r=IUe(e.children,i))?e.return=e.value+"{"+r+"}":""}function OUe(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function PUe(e,t,r,i){var n;void 0!==e.insert&&(r&&(e.attr("aria-describedby",n="chart-desc-"+i),e.insert("desc",":first-child").attr("id",n).text(r)),t)&&(e.attr("aria-labelledby",n="chart-title-"+i),e.insert("title",":first-child").attr("id",n).text(t))}mt(gUe,"node"),mt(function(){return dUe},"char"),mt(fUe,"prev"),mt(mUe,"next"),mt(yUe,"peek"),mt(function(){return uUe},"caret"),mt(vUe,"slice"),mt(bUe,"token"),mt(xUe,"alloc"),mt(wUe,"dealloc"),mt(TUe,"delimit"),mt(kUe,"whitespace"),mt(CUe,"escaping"),mt(SUe,"delimiter"),mt(EUe,"commenter"),mt(_Ue,"identifier"),mt(AUe,"compile"),mt(RUe,"parse"),mt(LUe,"ruleset"),mt(NUe,"comment"),mt(DUe,"declaration"),mt(IUe,"serialize"),mt(MUe,"stringify"),ln(),_j(),n_e(),mt(OUe,"setA11yDiagramInfo"),mt(PUe,"addSVGa11yTitleDescription"),yr(),ii(),ii(),Cu(),oh(),sh(),a_();var $Ue=class kGe{constructor(e,t,r,i,n){this.type=e,this.text=t,this.db=r,this.parser=i,this.renderer=n}static{mt(this,"Diagram")}static async fromText(e,t={}){var r=sr(),i=jc(e,r);e=r_(e)+`
|
||
`;try{Dh(i)}catch{if(!(n=Vc(i)))throw new Uc(`Diagram ${i} not found.`);var{id:n,diagram:a}=await n();Nh(n,a)}var{db:n,parser:a,renderer:s,init:o}=Dh(i);return a.parser&&(a.parser.yy=n),n.clear?.(),o?.(r),t.title&&n.setDiagramTitle?.(t.title),await a.parse(e),new kGe(i,e,n,a,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},BUe=(Pc(),[]),FUe=mt(()=>{BUe.forEach(e=>{e()}),BUe=[]},"attachFunctions"),zUe=(e(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function qUe(e){var t,r,i=e.match(Fc);return i?(r={},(t="object"!=typeof(t=F9(i[1],{schema:B9})??{})||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:{}}}ah(),z9(),mt(qUe,"extractFrontMatter"),a_();var UUe=mt(e=>e.replace(/\r\n?/g,`
|
||
`).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),GUe=mt(e=>{var{text:e,metadata:t}=qUe(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"),jUe=mt(e=>{var t=t_.detectInit(e)??{},r=t_.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:PE(e),directive:t}},"processDirectives");function WUe(e){var t=UUe(e),t=GUe(t),r=jUe(t.text),i=_E(t.config,r.directive);return{code:e=zUe(r.text),title:t.title,config:i}}function YUe(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(WUe,"preprocessDiagram"),hh(),Jr(),a_(),mt(YUe,"toBase64");var VUe=["foreignobject"],HUe=["dominant-baseline"];function XUe(e){return e=WUe(e),cr(),lr(e.config??{}),e}async function KUe(e,t){Vqe();try{var{code:r,config:i}=XUe(e);return{diagramType:(await sGe(r)).type,config:i}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt(XUe,"processAndSetConfigs"),mt(KUe,"parse");var ZUe=mt((e,t,r=[])=>`
|
||
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),QUe=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=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{Ej(t.styles)||e.forEach(e=>{i+=ZUe(t.id,e,t.styles)}),Ej(t.textStyles)||(i+=ZUe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return i},"createCssStyles"),JUe=mt((e,t,r,i)=>(r=QUe(e,r),IUe(AUe(i+`{${ih(t,r,e.themeVariables)}}`),MUe)),"createUserStyles"),eGe=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=i_(i)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),tGe=mt((e="",t)=>`<iframe style="width:100%;height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${YUe(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
||
The "iframe" tag is not supported by your browser.
|
||
</iframe>`,"putIntoIFrame"),rGe=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 iGe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(iGe,"sandboxedIframe");var nGe=mt((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),dqe=mt(async function(e,t,r){Vqe();var i=XUe(t),n=(t=i.code,sr());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=iGe(V(r),s),(u=V(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=V(r),rGe(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(nGe(document,e,l,s),d?(y=iGe(V("body"),s),(u=V(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=V("body"),rGe(u,e,l));let f,m;try{f=await $Ue.fromText(t,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw h(),r;f=await $Ue.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=JUe(n,y,v,a),b=document.createElement("style");b.innerHTML=v,i.insertBefore(b,r);try{await f.renderer.draw(t,e,XEe.version,f)}catch(r){throw n.suppressErrorRendering?h():Dqe.draw(t,e,XEe.version),r}oGe(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=eGe(x,d,mc(n.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),x=tGe(x,v)):p||(x=on.sanitize(x,{ADD_TAGS:VUe,ADD_ATTR:HUe,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),FUe(),m)throw m;return h(),{diagramType:y,svg:x,bindFunctions:f.db.bindFunctions}},"render");function aGe(e={}){(e=Re({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),rr(e),e?.theme&&e.theme in qt?e.themeVariables=qt[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=qt.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?tr(e):nr(),De(e.logLevel),Vqe()}mt(aGe,"initialize");var sGe=mt((e,t={})=>(e=WUe(e).code,$Ue.fromText(e,t)),"getDiagramFromText");function oGe(e,t,r,i){OUe(t,e),PUe(t,r,i,t.attr("id"))}mt(oGe,"addA11yInfo");var lGe=Object.freeze({render:dqe,parse:KUe,getDiagramFromText:sGe,initialize:aGe,getConfig:sr,setConfig:ar,getSiteConfig:nr,updateSiteConfig:ir,reset:mt(()=>{cr()},"reset"),globalReset:mt(()=>{cr(Xt)},"globalReset"),defaultConfig:Xt}),cGe=(De(sr().logLevel),cr(sr()),Jhe(),a_(),mt((e,t,r)=>{M.warn(e),EE(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")),hGe=mt(async function(t={querySelector:".mermaid"}){try{await uGe(t)}catch(e){if(EE(e)&&M.error(e.str),wGe.parseError&&wGe.parseError(e),!t.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),e}},"run"),uGe=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var i=lGe.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),lGe.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new t_.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=Bc(t_.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),t_.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await bGe(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){cGe(e,o,wGe.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),dGe=mt(function(e){lGe.initialize(e)},"initialize"),x=mt(async function(e,t,r){M.warn("mermaid.init is deprecated. Please use run instead."),e&&dGe(e),e={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof t?e.querySelector=t:t&&(t instanceof HTMLElement?e.nodes=[t]:e.nodes=t),await hGe(e)},"init"),dqe=mt(async(e,{lazyLoad:t=!0}={})=>{Vqe(),Wc(...e),!1===t&&await Hqe()},"registerExternalDiagrams"),pGe=mt(function(){wGe.startOnLoad&&lGe.getConfig().startOnLoad&&wGe.run().catch(e=>M.error("Mermaid failed to initialize",e))},"contentLoaded"),gGe=(typeof document<"u"&&window.addEventListener("load",pGe,!1),mt(function(e){wGe.parseError=e},"setParseErrorHandler")),fGe=[],mGe=!1,yGe=mt(async()=>{if(!mGe){for(mGe=!0;0<fGe.length;){var e=fGe.shift();if(e)try{await e()}catch(e){M.error("Error executing queue",e)}}mGe=!1}},"executeQueue"),vGe=mt(async(a,s)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{lGe.parse(a,s).then(e=>{t(e),i(e)},e=>{M.error("Error parsing",e),wGe.parseError?.(e),r(e),n(e)})}),"performCall");fGe.push(e),yGe().catch(n)}),"parse"),bGe=mt((a,s,o)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{lGe.render(a,s,o).then(e=>{t(e),i(e)},e=>{M.error("Error parsing",e),wGe.parseError?.(e),r(e),n(e)})}),"performCall");fGe.push(e),yGe().catch(n)}),"render"),xGe=mt(()=>Object.keys(Gc).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),wGe={startOnLoad:!0,mermaidAPI:lGe,parse:vGe,render:bGe,init:x,run:hGe,registerExternalDiagrams:dqe,registerLayoutLoaders:Ohe,initialize:dGe,parseError:void 0,contentLoaded:pGe,setParseErrorHandler:gGe,detectType:jc,registerIconPacks:Dc,getRegisteredDiagramsMetadata:xGe},TGe=wGe;return j(oqe)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;
|