tabi-lean/static/js/mermaid.min.js
github-actions[bot] a59310a6b2
⬆️ chore(deps): upgrade mermaid to v11.6.0 (#500)
Co-authored-by: welpo <welpo@users.noreply.github.com>
2025-03-26 08:27:44 +01:00

2564 lines
2.5 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var __esbuild_esm_mermaid=(()=>{var w,k,M,T,C,_,S,A,N,I,R,B,F,$=Object.create,z=Object.defineProperty,G=Object.getOwnPropertyDescriptor,U=Object.getOwnPropertyNames,q=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty,me=(t,e)=>z(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,Y=(e,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of U(r))W.call(e,t)||t===i||z(e,t,{get:()=>r[t],enumerable:!(n=G(r,t))||n.enumerable});return e},H=(t,e,r)=>(Y(t,e,"default"),r&&Y(r,e,"default")),tt=(t,e,r)=>(r=null!=t?$(q(t)):{},Y(!e&&t&&t.__esModule?r:z(r,"default",{value:t,enumerable:!0}),t)),et=(iPt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var n="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:me(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},i=me(function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},"m"),r={s:i,z:me(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+i(r,2,"0")+":"+i(e,2,"0")},"z"),m:me(function t(e,r){var i,n,a;return e.date()<r.date()?-t(r,e):(i=12*(r.year()-e.year())+(r.month()-e.month()),a=r-(n=e.clone().add(i,m))<0,e=e.clone().add(i+(a?-1:1),m),+(-(i+(r-n)/(a?n-e:e-n))||0))},"t"),a:me(function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},"a"),p:me(function(t){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:n,Q:"quarter"}[t]||String(t||"").toLowerCase().replace(/s$/,"")},"p"),u:me(function(t){return void 0===t},"u")},o="en",l={},a=(l[o]=t,"$isDayjsObject"),c=me(function(t){return t instanceof k||!(!t||!t[a])},"S"),h=me(function t(e,r,i){var n;if(!e)return o;if("string"==typeof e){var a=e.toLowerCase(),r=(l[a]&&(n=a),r&&(l[a]=r,n=a),e.split("-"));if(!n&&1<r.length)return t(r[0])}else a=e.name,l[a]=e,n=a;return!i&&n&&(o=n),n||!i&&o},"t"),b=me(function(t,e){return c(t)?t.clone():((e="object"==typeof e?e:{}).date=t,e.args=arguments,new k(e))},"O"),w=r,k=(w.l=h,w.i=c,w.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})},me(E,"M"),(t=E.prototype).parse=function(a){this.$d=(()=>{var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,i,n=t.match(s);if(n)return r=n[2]-1||0,i=(n[7]||"0").substring(0,3),e?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(t)})(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t)<this.startOf(e)},t.isBefore=function(t,e){return this.endOf(e)<b(t)},t.$g=function(t,e,r){return w.u(t)?this[e]:this.set(r,t)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(t,e){var r=this,i=!!w.u(e)||e,e=w.p(t),n=me(function(t,e){return e=w.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r),i?e:e.endOf(g)},"l"),a=me(function(t,e){return w.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},"$"),s=this.$W,o=this.$M,l=this.$D,c="set"+(this.$u?"UTC":"");switch(e){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()}},t.endOf=function(t){return this.startOf(t,!1)},t.$set=function(t,e){var t=w.p(t),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[t]),i=t===g?this.$D+(e-this.$W):e;return t===m||t===y?((e=this.clone().set(v,1)).$d[r](i),e.init(),this.$d=e.set(v,Math.min(this.$D,e.daysInMonth())).$d):r&&this.$d[r](i),this.init(),this},t.set=function(t,e){return this.clone().$set(t,e)},t.get=function(t){return this[w.p(t)]()},t.add=function(r,t){var i=this,t=(r=Number(r),w.p(t)),e=me(function(t){var e=b(i);return w.w(e.date(e.date()+Math.round(t*r)),i)},"y");return t===m?this.set(m,this.$M+r):t===y?this.set(y,this.$y+r):t===g?e(1):t===f?e(7):(e={minute:6e4,hour:36e5,second:1e3}[t]||1,t=this.$d.getTime()+r*e,w.w(t,this))},t.subtract=function(t,e){return this.add(-1*t,e)},t.format=function(t){var n,r,i,a,s,o,l,c,h,u,d=this,p=this.$locale();return this.isValid()?(n=t||"YYYY-MM-DDTHH:mm:ssZ",r=w.z(this),i=this.$H,a=this.$m,s=this.$M,o=p.weekdays,l=p.months,t=p.meridiem,c=me(function(t,e,r,i){return t&&(t[e]||t(d,n))||r[e].slice(0,i)},"h"),h=me(function(t){return w.s(i%12||12,t,"0")},"d"),u=t||function(t,e,r){return t=t<12?"AM":"PM",r?t.toLowerCase():t},n.replace(x,function(t,e){return e||(()=>{switch(t){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||e},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(t,e,r){var i,n=this,e=w.p(e),a=b(t),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=me(function(){return w.m(n,a)},"D");switch(e){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)},t.daysInMonth=function(){return this.endOf(m).$D},t.$locale=function(){return l[this.$L]},t.locale=function(t,e){var r;return t?(r=this.clone(),(t=h(t,e,!0))&&(r.$L=t),r):this.$L},t.clone=function(){return w.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},E),T=k.prototype;function E(t){this.$L=h(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[a]=!0}return b.prototype=T,[["$ms",n],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(e){T[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(t,e){return t.$i||(t(e,k,b),t.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(t){return b(1e3*t)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=r()}),e=t(()=>{w=tt(et(),1),k={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:me(()=>{},"trace"),debug:me(()=>{},"debug"),info:me(()=>{},"info"),warn:me(()=>{},"warn"),error:me(()=>{},"error"),fatal:me(()=>{},"fatal")},T=me(function(t="fatal"){let e=k.fatal;"string"==typeof t?t.toLowerCase()in k&&(e=k[t]):"number"==typeof t&&(e=t),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},e<=k.fatal&&(M.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"",C("FATAL"))),e<=k.error&&(M.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"",C("ERROR"))),e<=k.warn&&(M.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"",C("WARN"))),e<=k.info&&(M.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"",C("INFO"))),e<=k.debug&&(M.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"",C("DEBUG"))),e<=k.trace&&(M.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"",C("TRACE")))},"setLogLevel"),C=me(t=>`%c${(0,w.default)().format("ss.SSS")} : ${t} : `,"format")}),rt=t(()=>{_=Object.freeze({left:0,top:0,width:16,height:16}),S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({..._,...S}),N=Object.freeze({...A,body:"",hidden:!1})}),it=t(()=>{rt(),I=Object.freeze({width:null,height:null}),R=Object.freeze({...I,...S})}),nt=t(()=>{B=me((t,e,r,i="")=>{var n,a=t.split(":");if("@"===t.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?(t=a.pop(),n=a.pop(),n={provider:0<a.length?a[0]:i,prefix:n,name:t},e&&!F(n)?null:n):1<(n=(t=a[0]).split("-")).length?(a={provider:i,prefix:n.shift(),name:n.join("-")},e&&!F(a)?null:a):r&&""===i&&(n={provider:i,prefix:"",name:t},!e||F(n,r))?n:null},"stringToIcon"),F=me((t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),"validateIconName")});function st(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}var ot=t(()=>{me(st,"mergeIconTransformations")});function lt(t,e){var r,i=st(t,e);for(r in N)r in S?r in t&&!(r in i)&&(i[r]=S[r]):r in e?i[r]=e[r]:r in t&&(i[r]=t[r]);return i}var ct=t(()=>{rt(),ot(),me(lt,"mergeIconData")});function ht(t,e){let i=t.icons,n=t.aliases||Object.create(null),a=Object.create(null);function s(t){var e,r;return i[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=n[t]&&n[t].parent)&&s(e))&&(a[t]=[e].concat(r))),a[t])}return me(s,"resolve"),(e||Object.keys(i).concat(Object.keys(n))).forEach(s),a}var ut=t(()=>{me(ht,"getIconsTree")});function dt(t,e,r){let i=t.icons,n=t.aliases||Object.create(null),a={};function s(t){a=lt(i[t]||n[t],a)}return me(s,"parse"),s(e),r.forEach(s),lt(t,a)}function pt(t,e){var r;return t.icons[e]?dt(t,e,[]):(r=ht(t,[e])[e])?dt(t,e,r):null}var gt=t(()=>{ct(),ut(),me(dt,"internalGetIconData"),me(pt,"getIconData")});function ft(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;var i,n=t.split(mt);if(null===n||!n.length)return t;let a=[],s=n.shift(),o=yt.test(s);for(;;){if(!o||(i=parseFloat(s),isNaN(i))?a.push(s):a.push(Math.ceil(i*e*r)/r),void 0===(s=n.shift()))return a.join("");o=!o}}var mt,yt,vt=t(()=>{mt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,me(ft,"calculateSize")});function xt(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;0<=i;){var n=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===n||-1===a)break;var s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}function bt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function wt(t,e,r){return bt((t=xt(t)).defs,e+t.content+r)}var kt=t(()=>{me(xt,"splitSVGDefs"),me(bt,"mergeDefsAndContent"),me(wt,"wrapSVGContent")});function Tt(t,e){let r={...A,...t},i={...R,...e},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,n=([r,i].forEach(t=>{let e=[],r=t.hFlip,i=t.vFlip,n=t.rotate;r?i?n+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):i&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.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,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,e.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),e.length&&(o=wt(o,'<g transform="'+e.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=ft(u,l/c)):(h="auto"===n?l:n,u=null===a?ft(h,c/l):"auto"===a?c:a),{}),p=me((t,e)=>{Et(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[s.left,s.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:o}}var Et,Ct=t(()=>{rt(),it(),vt(),kt(),Et=me(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),me(Tt,"iconToSVG")});function _t(i,n=At){for(var t,e=[];t=St.exec(i);)e.push(t[1]);if(e.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);e.forEach(t=>{var e="function"==typeof n?n(t):n+(Lt++).toString(),t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+t+')([")]|\\.[a-z])',"g"),"$1"+e+r+"$3")}),i=i.replace(new RegExp(r,"g"),"")}return i}var St,At,Lt,Nt=t(()=>{St=/\sid="(\S+)"/g,At="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Lt=0,me(_t,"replaceIDs")});function It(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}var Rt,Mt,Dt,Ot,Pt,Bt,Ft=t(()=>{me(It,"iconToHTML")}),$t=iPt((t,e)=>{function i(t){if(!(100<(t=String(t)).length)&&(t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t))){var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*e;case"weeks":case"week":case"w":return 6048e5*e;case"days":case"day":case"d":return 864e5*e;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*e;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*e;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}function n(t){var e=Math.abs(t);return 864e5<=e?Math.round(t/864e5)+"d":36e5<=e?Math.round(t/36e5)+"h":6e4<=e?Math.round(t/6e4)+"m":1e3<=e?Math.round(t/1e3)+"s":t+"ms"}function a(t){var e=Math.abs(t);return 864e5<=e?r(t,e,864e5,"day"):36e5<=e?r(t,e,36e5,"hour"):6e4<=e?r(t,e,6e4,"minute"):1e3<=e?r(t,e,1e3,"second"):t+" ms"}function r(t,e,r,i){return e=1.5*r<=e,Math.round(t/r)+" "+i+(e?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"==r&&0<t.length)return i(t);if("number"==r&&isFinite(t))return(e.long?a:n)(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))},me(i,"parse"),me(n,"fmtShort"),me(a,"fmtLong"),me(r,"plural")}),zt=iPt((t,e)=>{function r(e){function t(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return o.colors[Math.abs(r)%o.colors.length]}function o(t){let r,e=null,i,n;function s(...a){if(s.enabled){let i=s,t=Number(new Date),e=t-(r||t),n=(i.diff=e,i.prev=r,i.curr=t,r=t,a[0]=o.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O"),0);a[0]=a[0].replace(/%([a-zA-Z%])/g,(t,e)=>{var r;return"%%"===t?"%":(n++,"function"==typeof(e=o.formatters[e])&&(r=a[n],t=e.call(i,r),a.splice(n,1),n--),t)}),o.formatArgs.call(i,a),(i.log||o.log).apply(i,a)}}return me(s,"debug"),s.namespace=t,s.useColors=o.useColors(),s.color=o.selectColor(t),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:me(()=>null!==e?e:(i!==o.namespaces&&(i=o.namespaces,n=o.enabled(t)),n),"get"),set:me(t=>{e=t},"set")}),"function"==typeof o.init&&o.init(s),s}function a(t,e){return(e=o(this.namespace+("u"<typeof e?":":e)+t)).log=this.log,e}function r(t){var e;o.save(t),o.namespaces=t,o.names=[],o.skips=[];for(e of("string"==typeof t?t:"").trim().replace(" ",",").split(",").filter(Boolean))"-"===e[0]?o.skips.push(e.slice(1)):o.names.push(e)}function i(t,e){let r=0,i=0,n=-1,a=0;for(;r<t.length;)if(i<e.length&&(e[i]===t[r]||"*"===e[i]))"*"===e[i]?(n=i,a=r):r++,i++;else{if(-1===n)return!1;i=n+1,a++,r=a}for(;i<e.length&&"*"===e[i];)i++;return i===e.length}function n(){var t=[...o.names,...o.skips.map(t=>"-"+t)].join(",");return o.enable(""),t}function s(t){for(var e of o.skips)if(i(t,e))return!1;for(var r of o.names)if(i(t,r))return!0;return!1}function l(t){return t instanceof Error?t.stack||t.message:t}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return((o.debug=o).default=o).coerce=l,o.disable=n,o.enable=r,o.enabled=s,o.humanize=$t(),o.destroy=c,Object.keys(e).forEach(t=>{o[t]=e[t]}),o.names=[],o.skips=[],o.formatters={},me(t,"selectColor"),o.selectColor=t,me(o,"createDebug"),me(a,"extend"),me(r,"enable"),me(i,"matchesTemplate"),me(n,"disable"),me(s,"enabled"),me(l,"coerce"),me(c,"destroy"),o.enable(o.load()),o}me(r,"setup"),e.exports=r}),Gt=iPt((e,r)=>{function t(){if(typeof window<"u"&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(t[1],10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),this.useColors){var i="color: "+this.color;t.splice(1,0,i,"color: inherit");let e=0,r=0;t[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(e++,"%c"===t)&&(r=e)}),t.splice(r,0,i)}}function n(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}}function a(){let t;try{t=e.storage.getItem("debug")}catch{}return t=!t&&typeof process<"u"&&"env"in process?process.env.DEBUG:t}function s(){try{return localStorage}catch{}}e.formatArgs=i,e.save=n,e.load=a,e.useColors=t,e.storage=s(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],me(t,"useColors"),me(i,"formatArgs"),e.log=console.debug||console.log||(()=>{}),me(n,"save"),me(a,"load"),me(s,"localstorage"),r.exports=zt()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),Ut=t(()=>{nt(),gt(),Ct(),Nt(),Ft(),tt(Gt(),1)}),qt=t(()=>{e(),Ut(),Rt={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},Mt=new Map,Dt=new Map,Ot=me(t=>{for(var e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",e.name),"loader"in e)Dt.set(e.name,e.loader);else{if(!("icons"in e))throw M.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Mt.set(e.name,e.icons)}}},"registerIconPacks"),Pt=me(async(t,e)=>{var r=B(t,!0,void 0!==e);if(!r)throw new Error("Invalid icon name: "+t);if(!(e=r.prefix||e))throw new Error("Icon name must contain a prefix: "+t);let i=Mt.get(e);if(!i){var n=Dt.get(e);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:e},Mt.set(e,i)}catch(t){throw M.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(n=pt(i,r.name))return n;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Bt=me(async(t,e)=>{let r;try{r=await Pt(t,e?.fallbackPrefix)}catch(t){M.error(t),r=Rt}return It(_t((t=Tt(r,e)).body),t.attributes)},"getIconSVG")});function jt(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i,n=Array.from("string"==typeof t?[t]:t),t=(n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,""),n.reduce(function(t,e){return(e=e.match(/\n([\t ]+|(?!\s).)/g))?t.concat(e.map(function(t){return null!=(t=null==(t=t.match(/[\t ]/g))?void 0:t.length)?t:0})):t},[])),a=(t.length&&(i=new RegExp(`
[ ]{`+Math.min.apply(Math,t)+"}","g"),n=n.map(function(t){return t.replace(i,`
`)})),n[0]=n[0].replace(/^\r?\n/,""),n[0]);return e.forEach(function(t,e){var r=(i=a.match(/(?:^|\n)( *)$/))?i[1]:"",i=t;"string"==typeof t&&t.includes(`
`)&&(i=String(t).split(`
`).map(function(t,e){return 0===e?t:""+r+t}).join(`
`)),a+=i+n[e+1]}),a}var Wt,Yt,Ht,Vt,Xt,Kt,Zt,Qt,Jt,te,ee,re,ie,ne,ae,se,oe,le,ce,he,ue,de,pe,ge,fe,ve,xe,be,we,ke,Te,Ee,Ce,_e,Se,Ae,Le,Ne,Ie,Re,Me,De,Oe,Pe,Be,Fe,$e,ze,Ge,Ue,qe,je,We,a,Ye,He,Ve,r,Xe,Ke,Ze,i,Qe,Je,tr,er,rr,ir,nr,ar,sr,or,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,xr,br,wr,kr,Tr,Er,Cr,_r,Sr,Ar,Lr,Nr,Ir,Rr,Mr,Dr,Or,Pr,Br,Fr=t(()=>{me(jt,"dedent")}),$r=t(()=>{Wt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Yt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ht=/\s*%%.*\n/gm}),zr=t(()=>{Vt=class extends Error{static{me(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Gr=t(()=>{e(),$r(),zr(),Xt={},Kt=me(function(t,e){t=t.replace(Wt,"").replace(Yt,"").replace(Ht,`
`);for(var[r,{detector:i}]of Object.entries(Xt))if(i(t,e))return r;throw new Vt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Zt=me((...t)=>{for(var{id:e,detector:r,loader:i}of t)Qt(e,r,i)},"registerLazyLoadedDiagrams"),Qt=me((t,e,r)=>{Xt[t]&&M.warn(`Detector with key ${t} already exists. Overwriting.`),Xt[t]={detector:e,loader:r},M.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),Jt=me(t=>Xt[t].loader,"getDiagramLoader")}),Ur=t(()=>{function B(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[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],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],_=[1,44],S=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],j=[1,54],W=[1,55],Y=[1,56],H=[1,57],V=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],R=[1,82],M=[1,83],D=[1,84],O=[1,85],P=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],it=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],e={trace:me(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:me(function(t,e,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:e,23:r,24:F,26:$,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:70,19:20,20:21,21:22,22:e,23:r,24:F,26:$,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:71,19:20,20:21,21:22,22:e,23:r,24:F,26:$,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:72,19:20,20:21,21:22,22:e,23:r,24:F,26:$,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:73,19:20,20:21,21:22,22:e,23:r,24:F,26:$,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{14:[1,74]},t(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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K}),t(Z,[2,14]),t(Q,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(J,[2,19]),t(J,[2,20]),{25:[1,78]},{27:[1,79]},t(J,[2,23]),{35:80,75:81,76:R,77:M,79:D,80:O},{35:86,75:81,76:R,77:M,79:D,80:O},{35:87,75:81,76:R,77:M,79:D,80:O},{35:88,75:81,76:R,77:M,79:D,80:O},{35:89,75:81,76:R,77:M,79:D,80:O},{35:90,75:81,76:R,77:M,79:D,80:O},{35:91,75:81,76:R,77:M,79:D,80:O},{35:92,75:81,76:R,77:M,79:D,80:O},{35:93,75:81,76:R,77:M,79:D,80:O},{35:94,75:81,76:R,77:M,79:D,80:O},{35:95,75:81,76:R,77:M,79:D,80:O},{35:96,75:81,76:R,77:M,79:D,80:O},{35:97,75:81,76:R,77:M,79:D,80:O},{35:98,75:81,76:R,77:M,79:D,80:O},{35:99,75:81,76:R,77:M,79:D,80:O},{35:100,75:81,76:R,77:M,79:D,80:O},{35:101,75:81,76:R,77:M,79:D,80:O},{35:102,75:81,76:R,77:M,79:D,80:O},{35:103,75:81,76:R,77:M,79:D,80:O},{35:104,75:81,76:R,77:M,79:D,80:O},t(P,[2,59]),{35:105,75:81,76:R,77:M,79:D,80:O},{35:106,75:81,76:R,77:M,79:D,80:O},{35:107,75:81,76:R,77:M,79:D,80:O},{35:108,75:81,76:R,77:M,79:D,80:O},{35:109,75:81,76:R,77:M,79:D,80:O},{35:110,75:81,76:R,77:M,79:D,80:O},{35:111,75:81,76:R,77:M,79:D,80:O},{35:112,75:81,76:R,77:M,79:D,80:O},{35:113,75:81,76:R,77:M,79:D,80:O},{35:114,75:81,76:R,77:M,79:D,80:O},{35:115,75:81,76:R,77:M,79:D,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:R,77:M,79:D,80:O},{35:120,75:81,76:R,77:M,79:D,80:O},{35:121,75:81,76:R,77:M,79:D,80:O},{35:122,75:81,76:R,77:M,79:D,80:O},{35:123,75:81,76:R,77:M,79:D,80:O},{35:124,75:81,76:R,77:M,79:D,80:O},{35:125,75:81,76:R,77:M,79:D,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Z,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:F,26:$,28:z}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:F,26:$,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K}),t(J,[2,21]),t(J,[2,22]),t(P,[2,39]),t(tt,[2,71],{75:81,35:132,76:R,77:M,79:D,80:O}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(P,[2,58]),t(P,[2,60]),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),t(P,[2,64]),t(P,[2,65]),t(P,[2,66]),t(P,[2,67]),t(P,[2,68]),t(P,[2,69]),t(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(Z,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(P,[2,24]),t(P,[2,35]),t(it,[2,25]),t(it,[2,26],{12:[1,138]}),t(it,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,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}}};e.lexer=r,me(B,"Parser"),(te=new((B.prototype=e).Parser=B)).parser=te,ee=te}),qr=t(()=>{re=me((e,r,{depth:i=2,clobber:n=!1}={})=>{let a={depth:i,clobber:n};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>re(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||i<=0?null!=e&&"object"==typeof e&&"object"==typeof r?Object.assign(e,r):r:(void 0!==r&&"object"==typeof e&&"object"==typeof r&&Object.keys(r).forEach(t=>{"object"!=typeof r[t]||void 0!==e[t]&&"object"!=typeof e[t]?(n||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=re(e[t],r[t],{depth:i-1,clobber:n}))}),e)},"assignWithDepth"),ie=re}),jr=t(()=>{ne={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:me(t=>255<=t?255:t<0?0:t,"r"),g:me(t=>255<=t?255:t<0?0:t,"g"),b:me(t=>255<=t?255:t<0?0:t,"b"),h:me(t=>t%360,"h"),s:me(t=>100<=t?100:t<0?0:t,"s"),l:me(t=>100<=t?100:t<0?0:t,"l"),a:me(t=>1<=t?1:t<0?0:t,"a")},toLinear:me(t=>{var e=t/255;return.03928<t?Math.pow((.055+e)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:me((t,e,r)=>(r<0&&(r+=1),1<r&&--r,r<.16666666666666666?t+6*(e-t)*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),"hue2rgb"),hsl2rgb:me(({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;var n=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(i){case"r":return 255*ne.hue2rgb(a,n,t+.3333333333333333);case"g":return 255*ne.hue2rgb(a,n,t);case"b":return 255*ne.hue2rgb(a,n,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:me(({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;var n=Math.max(t,e,r),a=Math.min(t,e,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 t:return 60*((e-r)/o+(e<r?6:0));case e:return 60*((r-t)/o+2);case r:return 60*((t-e)/o+4);default:return-1}},"rgb2hsl")},ae=ne}),Wr=t(()=>{se={clamp:me((t,e,r)=>r<e?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:me(t=>Math.round(1e10*t)/1e10,"round")},oe=se}),Yr=t(()=>{le={dec2hex:me(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},ce=le}),Hr=t(()=>{jr(),Wr(),Yr(),he={channel:ae,lang:oe,unit:ce}}),Vr=t(()=>{Hr(),ue={};for(let t=0;t<=255;t++)ue[t]=he.unit.dec2hex(t);de={ALL:0,RGB:1,HSL:2}}),Xr=t(()=>{Vr(),pe=class{static{me(this,"Type")}constructor(){this.type=de.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=de.ALL}is(t){return this.type===t}},ge=pe}),Kr=t(()=>{Hr(),Xr(),Vr(),fe=class{static{me(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new ge}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=de.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=he.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=he.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=he.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=he.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=he.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=he.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(de.HSL)||void 0===e?(this._ensureHSL(),he.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(de.HSL)||void 0===e?(this._ensureHSL(),he.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(de.HSL)||void 0===e?(this._ensureHSL(),he.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(de.RGB)||void 0===e?(this._ensureRGB(),he.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(de.RGB)||void 0===e?(this._ensureRGB(),he.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(de.RGB)||void 0===e?(this._ensureRGB(),he.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(de.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(de.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(de.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(de.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(de.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(de.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},ve=fe}),Zr=t(()=>{Kr(),xe=new ve({r:0,g:0,b:0,a:0},"transparent"),be=xe}),Qr=t(()=>{Zr(),Vr(),we={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:me(t=>{if(35===t.charCodeAt(0)){var e,r,i,n,a,s=t.match(we.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,be.set({r:(e>>(i=(r=4<s)?8:4)*(3+(n=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(e>>i*(2+n)&a)*r,b:(e>>i*(1+n)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:i}=t;return i<1?"#"+ue[Math.round(t)]+ue[Math.round(e)]+ue[Math.round(r)]+ue[Math.round(255*i)]:"#"+ue[Math.round(t)]+ue[Math.round(e)]+ue[Math.round(r)]},"stringify")},ke=we}),Jr=t(()=>{Hr(),Zr(),Te={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:me(t=>{if(r=t.match(Te.hueRe)){var[,e,r]=r;switch(r){case"grad":return he.channel.clamp.h(.9*parseFloat(e));case"rad":return he.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return he.channel.clamp.h(360*parseFloat(e))}}return he.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:me(t=>{var e,r,i,n,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Te.re)))return[,a,e,r,i,n]=a,be.set({h:Te._hue2deg(a),s:he.channel.clamp.s(parseFloat(e)),l:he.channel.clamp.l(parseFloat(r)),a:i?he.channel.clamp.a(n?parseFloat(i)/100:parseFloat(i)):1},t)},"parse"),stringify:me(t=>{var{h:t,s:e,l:r,a:i}=t;return i<1?`hsla(${he.lang.round(t)}, ${he.lang.round(e)}%, ${he.lang.round(r)}%, ${i})`:`hsl(${he.lang.round(t)}, ${he.lang.round(e)}%, ${he.lang.round(r)}%)`},"stringify")},Ee=Te}),ti=t(()=>{Qr(),Ce={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:me(t=>{if(t=t.toLowerCase(),t=Ce.colors[t])return ke.parse(t)},"parse"),stringify:me(t=>{var e,r=ke.stringify(t);for(e in Ce.colors)if(Ce.colors[e]===r)return e},"stringify")},_e=Ce}),ei=t(()=>{Hr(),Zr(),Se={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:me(t=>{var e,r,i,n,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Se.re)))return[,l,e,r,i,n,a,s,o]=l,be.set({r:he.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:he.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:he.channel.clamp.b(a?2.55*parseFloat(n):parseFloat(n)),a:s?he.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:i}=t;return i<1?`rgba(${he.lang.round(t)}, ${he.lang.round(e)}, ${he.lang.round(r)}, ${he.lang.round(i)})`:`rgb(${he.lang.round(t)}, ${he.lang.round(e)}, ${he.lang.round(r)})`},"stringify")},Ae=Se}),ri=t(()=>{Qr(),Jr(),ti(),ei(),Vr(),Le={format:{keyword:_e,hex:ke,rgb:Ae,rgba:Ae,hsl:Ee,hsla:Ee},parse:me(t=>{if("string"!=typeof t)return t;var e=ke.parse(t)||Ae.parse(t)||Ee.parse(t)||_e.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:me(t=>!t.changed&&t.color?t.color:(t.type.is(de.HSL)||void 0===t.data.r?Ee:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Ae:ke).stringify(t),"stringify")},Ne=Le}),ii=t(()=>{Hr(),ri(),Ie=me((t,e)=>{var r,i=Ne.parse(t);for(r in e)i[r]=he.channel.clamp[r](e[r]);return Ne.stringify(i)},"change"),Re=Ie}),ni=t(()=>{Hr(),Zr(),ri(),ii(),Me=me((t,e,r=0,i=1)=>"number"!=typeof t?Re(t,{a:e}):(t=be.set({r:he.channel.clamp.r(t),g:he.channel.clamp.g(e),b:he.channel.clamp.b(r),a:he.channel.clamp.a(i)}),Ne.stringify(t)),"rgba"),De=Me}),ai=t(()=>{Hr(),ri(),Oe=me((t,e)=>he.lang.round(Ne.parse(t)[e]),"channel"),Pe=Oe}),si=t(()=>{Hr(),ri(),Be=me(t=>{var{r:t,g:e,b:r}=Ne.parse(t),t=.2126*he.channel.toLinear(t)+.7152*he.channel.toLinear(e)+.0722*he.channel.toLinear(r);return he.lang.round(t)},"luminance"),Fe=Be}),oi=t(()=>{si(),$e=me(t=>.5<=Fe(t),"isLight"),ze=$e}),li=t(()=>{oi(),Ge=me(t=>!ze(t),"isDark"),Ue=Ge}),ci=t(()=>{Hr(),ri(),qe=me((t,e,r)=>{var i=(t=Ne.parse(t))[e];return i!==(r=he.channel.clamp[e](i+r))&&(t[e]=r),Ne.stringify(t)},"adjustChannel"),je=qe}),hi=t(()=>{ci(),We=me((t,e)=>je(t,"l",e),"lighten"),a=We}),ui=t(()=>{ci(),Ye=me((t,e)=>je(t,"l",-e),"darken"),He=Ye}),di=t(()=>{ri(),ii(),Ve=me((t,e)=>{var r,i=Ne.parse(t),n={};for(r in e)e[r]&&(n[r]=i[r]+e[r]);return Re(t,n)},"adjust"),r=Ve}),pi=t(()=>{ri(),ni(),Xe=me((t,e,r=50)=>{var{r:t,g:i,b:n,a}=Ne.parse(t),{r:e,g:s,b:o,a:l}=Ne.parse(e),c=2*(r/=100)-1,h=a-l;return De(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),i*c+s*h,n*c+o*h,a*r+l*(1-r))},"mix"),Ke=Xe}),gi=t(()=>{ri(),pi(),Ze=me((t,e=100)=>{var r=Ne.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ke(r,t,e)},"invert"),i=Ze}),fi=t(()=>{ni(),ai(),li(),hi(),ui(),di(),gi()}),mi=t(()=>{fi()}),yi=t(()=>{Qe="#ffffff",Je="#f2f2f2"}),vi=t(()=>{mi(),tr=me((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),xi=t(()=>{mi(),yi(),vi(),er=class{static{me(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||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(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?He(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||He(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.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||He(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||He(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=He(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=He(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||i(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||a(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||He(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;var e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:180,s:-15,l:e*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:180,s:-15,l:e*(8+3*t)});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||Ue(this.quadrant1Fill)?a:He)(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?He(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=He(this.git0,25),this.git1=He(this.git1,25),this.git2=He(this.git2,25),this.git3=He(this.git3,25),this.git4=He(this.git4,25),this.git5=He(this.git5,25),this.git6=He(this.git6,25),this.git7=He(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||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Je}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},rr=me(t=>{var e=new er;return e.calculate(t),e},"getThemeVariables")}),bi=t(()=>{mi(),vi(),ir=class{static{me(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=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(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=De(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=He("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=He(this.sectionBkgColor,10),this.taskBorderColor=De(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=De(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.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||He(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||i(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||a(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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||Ue(this.quadrant1Fill)?a:He)(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?He(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(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},nr=me(t=>{var e=new ir;return e.calculate(t),e},"getThemeVariables")}),wi=t(()=>{mi(),vi(),yi(),ar=class{static{me(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=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(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.sectionBkgColor=De(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.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||He(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||He(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=He(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||He(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||r(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:30,l:-(7+5*t)});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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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||Ue(this.quadrant1Fill)?a:He)(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=He(this.git0,25),this.git1=He(this.git1,25),this.git2=He(this.git2,25),this.git3=He(this.git3,25),this.git4=He(this.git4,25),this.git5=He(this.git5,25),this.git6=He(this.git6,25),this.git7=He(this.git7,25)),this.gitInv0=this.gitInv0||He(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||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Je}calculate(e){var t;Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},sr=me(t=>{var e=new ar;return e.calculate(t),e},"getThemeVariables")}),ki=t(()=>{mi(),yi(),vi(),or=class{static{me(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=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(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.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=He(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||He(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||He(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=He(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||He(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||r(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});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||Ue(this.quadrant1Fill)?a:He)(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=He(this.git0,25),this.git1=He(this.git1,25),this.git2=He(this.git2,25),this.git3=He(this.git3,25),this.git4=He(this.git4,25),this.git5=He(this.git5,25),this.git6=He(this.git6,25),this.git7=He(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||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Je}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},lr=me(t=>{var e=new or;return e.calculate(t),e},"getThemeVariables")}),Ti=t(()=>{mi(),vi(),yi(),cr=class{static{me(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=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(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.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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||i(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||a(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||He(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||r(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||r(this.mainBkg,{l:-(8+5*t)});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=He(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=He(this.critBkgColor,10),this.todayLineColor=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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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||Ue(this.quadrant1Fill)?a:He)(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=He(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||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Je}calculate(e){var t;"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},hr=me(t=>{var e=new cr;return e.calculate(t),e},"getThemeVariables")}),Ei=t(()=>{xi(),bi(),wi(),ki(),Ti(),ur={base:{getThemeVariables:rr},dark:{getThemeVariables:nr},default:{getThemeVariables:sr},forest:{getThemeVariables:lr},neutral:{getThemeVariables:hr}}}),Ci=t(()=>{dr={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},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,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"]},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,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},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}}),_i=t(()=>{Ei(),Ci(),pr={...dr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ur.default.getThemeVariables(),sequence:{...dr.sequence,messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:me(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:me(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...dr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...dr.c4,useWidth:void 0,personFont:me(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:me(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:me(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:me(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:me(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:me(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:me(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:me(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:me(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:me(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:me(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:me(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:me(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:me(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:me(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:me(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:me(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:me(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:me(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:me(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:me(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...dr.pie,useWidth:984},xyChart:{...dr.xyChart,useWidth:void 0},requirement:{...dr.requirement,useWidth:void 0},packet:{...dr.packet},radar:{...dr.radar}},gr=me((r,i="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,i+e,...gr(r[e],"")]:[...t,i+e],[]),"keyify"),fr=new Set(gr(pr,"")),mr=pr}),Si=t(()=>{_i(),e(),yr=me(t=>{if(M.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>yr(t));else{for(var e of Object.keys(t)){var r;if(M.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!fr.has(e)||null==t[e])M.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])M.debug("sanitizing object",e),yr(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(M.debug("sanitizing css option",e),t[e]=vr(t[e]))}if(t.themeVariables)for(var i of Object.keys(t.themeVariables)){var n=t.themeVariables[i];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}M.debug("After sanitization",t)}},"sanitizeDirective"),vr=me(t=>{let e=0,r=0;for(var i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss")}),Ai=t(()=>{qr(),e(),Ei(),_i(),Si(),xr=Object.freeze(mr),br=ie({},xr),kr=[],Tr=ie({},xr),Er=me((t,e)=>{let r=ie({},t),i={};for(var n of e)Ir(n),i=ie(i,n);return r=ie(r,i),i.theme&&i.theme in ur&&(t=ie({},wr),e=ie(t.themeVariables||{},i.themeVariables),r.theme)&&r.theme in ur&&(r.themeVariables=ur[r.theme].getThemeVariables(e)),Br(Tr=r),Tr},"updateCurrentConfig"),Cr=me(t=>(br=ie({},xr),br=ie(br,t),t.theme&&ur[t.theme]&&(br.themeVariables=ur[t.theme].getThemeVariables(t.themeVariables)),Er(br,kr),br),"setSiteConfig"),_r=me(t=>{wr=ie({},t)},"saveConfigFromInitialize"),Sr=me(t=>(br=ie(br,t),Er(br,kr),br),"updateSiteConfig"),Ar=me(()=>ie({},br),"getSiteConfig"),Lr=me(t=>(Br(t),ie(Tr,t),Nr()),"setConfig"),Nr=me(()=>ie({},Tr),"getConfig"),Ir=me(e=>{e&&(["secure",...br.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(M.debug("Denied attempt to modify a secure key "+t,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Ir(e[t])}))},"sanitize"),Rr=me(t=>{yr(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),kr.push(t),Er(br,kr)},"addDirective"),Mr=me((t=br)=>{Er(t,kr=[])},"reset"),Dr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Or={},Pr=me(t=>{Or[t]||(M.warn(Dr[t]),Or[t]=!0)},"issueWarning"),Br=me(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Pr("LAZY_LOAD_DEPRECATED")},"checkConfig")});function Li(n){return function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return qi(n,t,r)}}function Ni(i){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return ji(i,e)}}function Ii(e,r){var i,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Ki;Bi&&Bi(e,null);let a=r.length;for(;a--;){let t=r[a];"string"==typeof t&&(i=n(t))!==t&&(Fi(r)||(r[a]=i),t=i),e[t]=!0}return e}function Ri(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function Mi(t){var e,r,i=Ui(null);for([e,r]of Pi(t))rn(t,e)&&(Array.isArray(r)?i[e]=Ri(r):r&&"object"==typeof r&&r.constructor===Object?i[e]=Mi(r):i[e]=r);return i}function Di(t,e){for(;null!==t;){var r=zi(t,e);if(r){if(r.get)return Li(r.get);if("function"==typeof r.value)return Li(r.value)}t=$i(t)}function i(){return null}return me(i,"fallbackValue"),i}function Oi(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ln(),u=me(t=>Oi(t),"DOMPurify");if(u.version="3.2.4",u.removed=[],!t||!t.document||t.document.nodeType!==An.document||!t.Element)return u.isSupported=!1,u;let n=t.document,c=n,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:F,Element:$,NodeFilter:e,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=t,r=$.prototype,q=Di(r,"cloneNode"),j=Di(r,"remove"),W=Di(r,"nextSibling"),Y=Di(r,"childNodes"),s=Di(r,"parentNode");var H;"function"==typeof B&&(H=n.createElement("template")).content&&H.content.ownerDocument&&(n=H.content.ownerDocument);let p,h="",{implementation:V,createNodeIterator:X,createDocumentFragment:K,getElementsByTagName:Z}=n,Q=c.importNode,g=In(),{MUSTACHE_EXPR:J,ERB_EXPR:tt,TMPLIT_EXPR:et,DATA_ATTR:rt,ARIA_ATTR:it,IS_SCRIPT_OR_DATA:nt,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:st}=(u.isSupported="function"==typeof Pi&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,Sn),ot=Sn.IS_ALLOWED_URI,f=null,lt=Ii({},[...sn,...on,...ln,...hn,...dn]),m=null,ct=Ii({},[...pn,...gn,...fn,...mn]),o=Object.seal(Ui(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}})),y=null,ht=null,ut=!0,dt=!0,pt=!1,gt=!0,v=!1,ft=!0,x=!1,mt=!1,yt=!1,b=!1,w=!1,k=!1,vt=!0,xt=!1,bt=!0,T=!1,i,l=null,wt=Ii({},["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"]),kt=null,Tt=Ii({},["audio","video","img","source","image","track"]),Et=null,Ct=Ii({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",_=C,_t=!1,St=null,At=Ii({},[a,E,C],Zi),S=Ii({},["mi","mo","mn","ms","mtext"]),A=Ii({},["annotation-xml"]),Lt=Ii({},["title","style","font","a","script"]),L=null,Nt=["application/xhtml+xml","text/html"],N=null,I=null,It=n.createElement("form"),Rt=me(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Mt=me(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!I||I!==t){if(t=Mi(t&&"object"==typeof t?t:{}),L=-1===Nt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===L?Zi:Ki,f=rn(t,"ALLOWED_TAGS")?Ii({},t.ALLOWED_TAGS,N):lt,m=rn(t,"ALLOWED_ATTR")?Ii({},t.ALLOWED_ATTR,N):ct,St=rn(t,"ALLOWED_NAMESPACES")?Ii({},t.ALLOWED_NAMESPACES,Zi):At,Et=rn(t,"ADD_URI_SAFE_ATTR")?Ii(Mi(Ct),t.ADD_URI_SAFE_ATTR,N):Ct,kt=rn(t,"ADD_DATA_URI_TAGS")?Ii(Mi(Tt),t.ADD_DATA_URI_TAGS,N):Tt,l=rn(t,"FORBID_CONTENTS")?Ii({},t.FORBID_CONTENTS,N):wt,y=rn(t,"FORBID_TAGS")?Ii({},t.FORBID_TAGS,N):{},ht=rn(t,"FORBID_ATTR")?Ii({},t.FORBID_ATTR,N):{},i=!!rn(t,"USE_PROFILES")&&t.USE_PROFILES,ut=!1!==t.ALLOW_ARIA_ATTR,dt=!1!==t.ALLOW_DATA_ATTR,pt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,gt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,v=t.SAFE_FOR_TEMPLATES||!1,ft=!1!==t.SAFE_FOR_XML,x=t.WHOLE_DOCUMENT||!1,b=t.RETURN_DOM||!1,w=t.RETURN_DOM_FRAGMENT||!1,k=t.RETURN_TRUSTED_TYPE||!1,yt=t.FORCE_BODY||!1,vt=!1!==t.SANITIZE_DOM,xt=t.SANITIZE_NAMED_PROPS||!1,bt=!1!==t.KEEP_CONTENT,T=t.IN_PLACE||!1,ot=t.ALLOWED_URI_REGEXP||kn,_=t.NAMESPACE||C,S=t.MATHML_TEXT_INTEGRATION_POINTS||S,A=t.HTML_INTEGRATION_POINTS||A,o=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Rt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(o.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Rt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(o.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(o.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(dt=!1),w&&(b=!0),i&&(f=Ii({},dn),m=[],!0===i.html&&(Ii(f,sn),Ii(m,pn)),!0===i.svg&&(Ii(f,on),Ii(m,gn),Ii(m,mn)),!0===i.svgFilters&&(Ii(f,ln),Ii(m,gn),Ii(m,mn)),!0===i.mathMl)&&(Ii(f,hn),Ii(m,fn),Ii(m,mn)),t.ADD_TAGS&&Ii(f=f===lt?Mi(f):f,t.ADD_TAGS,N),t.ADD_ATTR&&Ii(m=m===ct?Mi(m):m,t.ADD_ATTR,N),t.ADD_URI_SAFE_ATTR&&Ii(Et,t.ADD_URI_SAFE_ATTR,N),t.FORBID_CONTENTS&&Ii(l=l===wt?Mi(l):l,t.FORBID_CONTENTS,N),bt&&(f["#text"]=!0),x&&Ii(f,["html","head","body"]),f.table&&(Ii(f,["tbody"]),delete y.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw an('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw an('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');p=t.TRUSTED_TYPES_POLICY,h=p.createHTML("")}else null!==(p=void 0===p?Nn(d,O):p)&&"string"==typeof h&&(h=p.createHTML(""));Gi&&Gi(t),I=t}},"_parseConfig"),Dt=Ii({},[...on,...ln,...cn]),Ot=Ii({},[...hn,...un]),Pt=me(function(t){let e=s(t);e&&e.tagName||(e={namespaceURI:_,tagName:"template"});var r=Ki(t.tagName),i=Ki(e.tagName);return!!St[t.namespaceURI]&&(t.namespaceURI===E?e.namespaceURI===C?"svg"===r:e.namespaceURI===a?"svg"===r&&("annotation-xml"===i||S[i]):!!Dt[r]:t.namespaceURI===a?e.namespaceURI===C?"math"===r:e.namespaceURI===E?"math"===r&&A[i]:!!Ot[r]:t.namespaceURI===C?!(e.namespaceURI===E&&!A[i]||e.namespaceURI===a&&!S[i]||Ot[r])&&(Lt[r]||!Dt[r]):!("application/xhtml+xml"!==L||!St[t.namespaceURI]))},"_checkValidNamespace"),R=me(function(t){Vi(u.removed,{element:t});try{s(t).removeChild(t)}catch{j(t)}},"_forceRemove"),M=me(function(t,e){try{Vi(u.removed,{attribute:e.getAttributeNode(t),from:e})}catch{Vi(u.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(b||w)try{R(e)}catch{}else try{e.setAttribute(t,"")}catch{}},"_removeAttribute"),Bt=me(function(t){let e=null,r=null;yt?t="<remove></remove>"+t:(i=Qi(t,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===L&&_===C&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var i=p?p.createHTML(t):t;if(_===C)try{e=(new U).parseFromString(i,L)}catch{}if(!e||!e.documentElement){e=V.createDocument(_,"template",null);try{e.documentElement.innerHTML=_t?h:i}catch{}}return i=e.body||e.documentElement,t&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),_===C?Z.call(e,x?"html":"body")[0]:x?e.documentElement:i},"_initDocument"),Ft=me(function(t){return X.call(t.ownerDocument||t,t,e.SHOW_ELEMENT|e.SHOW_COMMENT|e.SHOW_TEXT|e.SHOW_PROCESSING_INSTRUCTION|e.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),$t=me(function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof z)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=me(function(t){return"function"==typeof F&&t instanceof F},"_isNode");function D(t,e,r){Wi(t,t=>{t.call(u,e,r,I)})}me(D,"_executeHooks");let Gt=me(function(e){let r=null;if(D(g.beforeSanitizeElements,e,null),!$t(e)){var t=N(e.nodeName);if(D(g.uponSanitizeElement,e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&nn(/<[/\w]/g,e.innerHTML)&&nn(/<[/\w]/g,e.textContent)||e.nodeType===An.progressingInstruction||ft&&e.nodeType===An.comment&&nn(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof $&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&nn(/<\/no(script|embed|frames)/i,e.innerHTML)?(R(e),!0):(v&&e.nodeType===An.text&&(r=e.textContent,Wi([J,tt,et],t=>{r=Ji(r,t," ")}),e.textContent!==r)&&(Vi(u.removed,{element:e.cloneNode()}),e.textContent=r),D(g.afterSanitizeElements,e,null),!1);if(!y[t]&&qt(t)&&(o.tagNameCheck instanceof RegExp&&nn(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(bt&&!l[t]){var i=s(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&i)for(let t=n.length-1;0<=t;--t){var a=q(n[t],!0);a.__removalCount=(e.__removalCount||0)+1,i.insertBefore(a,W(e))}}}}return R(e),!0},"_sanitizeElements"),Ut=me(function(t,e,r){if(vt&&("id"===e||"name"===e)&&(r in n||r in It))return!1;if((!dt||ht[e]||!nn(rt,e))&&(!ut||!nn(it,e)))if(!m[e]||ht[e]){if(!(qt(t)&&(o.tagNameCheck instanceof RegExp&&nn(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&nn(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&nn(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Et[e]&&!nn(ot,Ji(r,at,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==tn(r,"data:")||!kt[t])&&(!pt||nn(nt,Ji(r,at,"")))&&r)return!1;return!0},"_isValidAttribute"),qt=me(function(t){return"annotation-xml"!==t&&Qi(t,st)},"_isBasicCustomElement"),jt=me(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!$t(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:i}=t,n=N(e),a="value"===e?i:en(i);if(s.attrName=n,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D(g.uponSanitizeAttribute,l,s),a=s.attrValue,!xt||"id"!==n&&"name"!==n||(M(e,l),a="user-content-"+a),ft&&nn(/((--!?|])>)|<\/(style|title)/i,a))M(e,l);else if(!s.forceKeepAttr&&(M(e,l),s.keepAttr))if(!gt&&nn(/\/>/i,a))M(e,l);else{v&&Wi([J,tt,et],t=>{a=Ji(a,t," ")});var h=N(l.nodeName);if(Ut(h,n,a)){if(p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,n)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,e,a):l.setAttribute(e,a),$t(l)?R(l):Hi(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),Wt=me(function t(e){var r,i=Ft(e);for(D(g.beforeSanitizeShadowDOM,e,null);r=i.nextNode();)D(g.uponSanitizeShadowNode,r,null),Gt(r),jt(r),r.content instanceof P&&t(r.content);D(g.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,i,n,a=null;if("string"!=typeof(t=(_t=!t)?"\x3c!--\x3e":t)&&!zt(t)){if("function"!=typeof t.toString)throw an("toString is not a function");if("string"!=typeof(t=t.toString()))throw an("dirty is not a string, aborting")}if(!u.isSupported)return t;if(mt||Mt(e),u.removed=[],T="string"!=typeof t&&T){if(t.nodeName){var s=N(t.nodeName);if(!f[s]||y[s])throw an("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof F)(i=(r=Bt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType===An.element&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!b&&!v&&!x&&-1===t.indexOf("<"))return p&&k?p.createHTML(t):t;if(!(r=Bt(t)))return b?null:k?h:""}r&&yt&&R(r.firstChild);for(var o=Ft(T?t:r);n=o.nextNode();)Gt(n),jt(n),n.content instanceof P&&Wt(n.content);if(T)return t;if(b){if(w)for(a=K.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?Q.call(c,a,!0):a}let l=x?r.outerHTML:r.innerHTML;return x&&f["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&nn(Cn,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
`+l),v&&Wi([J,tt,et],t=>{l=Ji(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Mt(t),mt=!0},u.clearConfig=function(){I=null,mt=!1},u.isValidAttribute=function(t,e,r){return I||Mt({}),t=N(t),e=N(e),Ut(t,e,r)},u.addHook=function(t,e){"function"==typeof e&&Vi(g[t],e)},u.removeHook=function(t,e){return void 0!==e?-1===(e=Yi(g[t],e))?void 0:Xi(g[t],e,1)[0]:Hi(g[t])},u.removeHooks=function(t){g[t]=[]},u.removeAllHooks=function(){g=In()},u}var Pi,Bi,Fi,$i,zi,Gi,Ui,qi,ji,Wi,Yi,Hi,Vi,Xi,Ki,Zi,Qi,Ji,tn,en,rn,nn,an,sn,on,ln,cn,hn,un,dn,pn,gn,fn,mn,yn,vn,xn,bn,wn,kn,Tn,En,Cn,_n,Sn,An,Ln,Nn,In,Rn,Mn=t(()=>{({entries:Pi,setPrototypeOf:Bi,isFrozen:Fi,getPrototypeOf:$i,getOwnPropertyDescriptor:zi}=Object),{freeze:Gi,seal:_n,create:Ui}=Object,{apply:qi,construct:ji}=typeof Reflect<"u"&&Reflect,Gi=Gi||me(function(t){return t},"freeze"),_n=_n||me(function(t){return t},"seal"),qi=qi||me(function(t,e,r){return t.apply(e,r)},"apply"),ji=ji||me(function(t,e){return new t(...e)},"construct"),Wi=Li(Array.prototype.forEach),Yi=Li(Array.prototype.lastIndexOf),Hi=Li(Array.prototype.pop),Vi=Li(Array.prototype.push),Xi=Li(Array.prototype.splice),Ki=Li(String.prototype.toLowerCase),Zi=Li(String.prototype.toString),Qi=Li(String.prototype.match),Ji=Li(String.prototype.replace),tn=Li(String.prototype.indexOf),en=Li(String.prototype.trim),rn=Li(Object.prototype.hasOwnProperty),nn=Li(RegExp.prototype.test),an=Ni(TypeError),me(Li,"unapply"),me(Ni,"unconstruct"),me(Ii,"addToSet"),me(Ri,"cleanArray"),me(Mi,"clone"),me(Di,"lookupGetter"),sn=Gi(["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"]),on=Gi(["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"]),ln=Gi(["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"]),cn=Gi(["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"]),hn=Gi(["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"]),un=Gi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dn=Gi(["#text"]),pn=Gi(["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"]),gn=Gi(["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"]),fn=Gi(["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"]),mn=Gi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yn=_n(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vn=_n(/<%[\w\W]*|[\w\W]*%>/gm),xn=_n(/\$\{[\w\W]*/gm),bn=_n(/^data-[\-\w.\u00B7-\uFFFF]+$/),wn=_n(/^aria-[\-\w]+$/),kn=_n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tn=_n(/^(?:\w+script|data):/i),En=_n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cn=_n(/^html$/i),_n=_n(/^[a-z][.\w]*(-[.\w]+)+$/i),Sn=Object.freeze({__proto__:null,ARIA_ATTR:wn,ATTR_WHITESPACE:En,CUSTOM_ELEMENT:_n,DATA_ATTR:bn,DOCTYPE_NAME:Cn,ERB_EXPR:vn,IS_ALLOWED_URI:kn,IS_SCRIPT_OR_DATA:Tn,MUSTACHE_EXPR:yn,TMPLIT_EXPR:xn}),An={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ln=me(function(){return"u"<typeof window?null:window},"getGlobal"),Nn=me(function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;var r="data-tt-policy-suffix";e="dompurify"+((r=e&&e.hasAttribute(r)?e.getAttribute(r):null)?"#"+r:"");try{return t.createPolicy(e,{createHTML(t){return t},createScriptURL(t){return t}})}catch{return console.warn("TrustedTypes policy "+e+" could not be created."),null}},"_createTrustedTypesPolicy"),In=me(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),me(Oi,"createDOMPurify"),Rn=Oi()}),Dn={};function On(t){return String(t).replace(ga,t=>pa[t])}function Pn(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Bn(t){for(var e=0;e<Aa.length;e++)for(var r=Aa[e],i=0;i<r.blocks.length;i++){var n=r.blocks[i];if(t>=n[0]&&t<=n[1])return r.name}return null}function Fn(t){for(var e=0;e<La.length;e+=2)if(La[e]<=t&&t<=La[e+1])return!0;return!1}function $n(t,e){Ua[t]=e}function zn(t,e,r){if(!Ua[e])throw new Error("Font metrics not found for font: "+e+".");var i=t.charCodeAt(0),n=Ua[e][i];if(!n&&t[0]in ja&&(i=ja[t[0]].charCodeAt(0),n=Ua[e][i]),n=!n&&"text"===r&&Fn(i)?Ua[e][77]:n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}function Gn(t){var e=5<=t?0:3<=t?1:2;if(!Wa[e]){var r,i=Wa[e]={cssEmPerMu:qa.quad[e]/18};for(r in qa)qa.hasOwnProperty(r)&&(i[r]=qa[r][e])}return Wa[e]}function Un(t){if(t instanceof ls)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function qn(t){if(t instanceof ns)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}function o(t,e,r,i,n,a){gs[t][n]={font:e,group:r,replace:i},a&&i&&(gs[t][i]=gs[t][n])}function l(t){for(var{type:t,names:e,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},o=0;o<e.length;++o)Zs[e[o]]=s;t&&(n&&(Qs[t]=n),a)&&(Js[t]=a)}function jn(t){var{type:t,htmlBuilder:e,mathmlBuilder:r}=t;l({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:e,mathmlBuilder:r})}function Wn(t,e){return t=ro(["base"],t,e),(e=ro(["strut"])).style.height=K(t.height+t.depth),t.depth&&(e.style.verticalAlign=K(-t.depth)),t.children.unshift(e),t}function Yn(t,e){var r,i=null,n=(1===t.length&&"tag"===t[0].type&&(i=t[0].tag,t=t[0].body),oo(t,e,"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(Wn(o,e)),o=[])}else n[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(Wn(o,e)),o=[]),s.push(n[l]));return 0<o.length&&s.push(Wn(o,e)),i?((a=Wn(oo(i,e,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(t=ro(["katex-html"],s)).setAttribute("aria-hidden","true"),a&&((i=a.children[0]).style.height=K(t.height+t.depth),t.depth)&&(i.style.verticalAlign=K(-t.depth)),t}function Hn(t){return new Ga(t)}function Vn(t,e,r,i,n){return r=1===(t=bo(t,r)).length&&t[0]instanceof fo&&ya.contains(["mrow","mtable"],t[0].type)?t[0]:new E.MathNode("mrow",t),(t=new E.MathNode("annotation",[new E.TextNode(e)])).setAttribute("encoding","application/x-tex"),e=new E.MathNode("semantics",[r,t]),(r=new E.MathNode("math",[e])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),i&&r.setAttribute("display","block"),Z.makeSpan([n?"katex":"katex-mathml"],[r])}function Xn(t,e){if(t&&t.type===e)return t;throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)))}function Kn(t){var e=Zn(t);if(e)return e;throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)))}function Zn(t){return t&&("atom"===t.type||ps.hasOwnProperty(t.type))?t:null}function Qn(t,e){var r=oo(t.body,e,!0);return Do([t.mclass],r,e)}function Jn(t,e){var r,e=bo(t.body,e);return"minner"===t.mclass?r=new E.MathNode("mpadded",e):"mord"===t.mclass?t.isCharacterBox?(r=e[0]).type="mi":r=new E.MathNode("mi",e):(t.isCharacterBox?(r=e[0]).type="mo":r=new E.MathNode("mo",e),"mbin"===t.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===t.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function ta(t,e,r){var i=Po[t];switch(i){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(i,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var n=r.callFunction("\\\\cdleft",[e[0]],[]),a=r.callFunction("\\Big",[{type:"atom",text:i,mode:"math",family:"rel"}],[]),s=r.callFunction("\\\\cdright",[e[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 ea(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"!==r)throw new X("Expected \\\\ or \\cr or \\end",t.nextToken);0===e[e.length-1].length&&e.pop();break}t.consume()}for(var i=[],n=[i],a=0;a<e.length;a++){for(var s=e[a],o=Bo(),l=0;l<s.length;l++)if(Fo(s[l])){i.push(o);var c=Kn(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($o(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=ta(c,h,t);i.push({type:"styling",body:[g],mode:"math",style:"display"}),o=Bo()}else o.body.push(s[l]);a%2==0?i.push(o):i.shift(),n.push(i=[])}return t.gullet.endGroup(),t.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 ra(t,e){var r=Zn(t);if(r&&ya.contains(fl,r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function ia(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function na(t){for(var{type:t,names:e,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},o=0;o<e.length;++o)ml[e[o]]=s;n&&(Qs[t]=n),a&&(Js[t]=a)}function h(t,e){yl[t]=e}function aa(t){var e=[],r=(t.consumeSpaces(),t.fetch().text);for("\\relax"===r&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);"\\hline"===r||"\\hdashline"===r;)t.consume(),e.push("\\hdashline"===r),t.consumeSpaces(),r=t.fetch().text;return e}function sa(t){if(-1===t.indexOf("ed"))return-1===t.indexOf("*")}function oa(t,e,r){var{hskipBeforeAndAfter:e,addJot:i,cols:n,arraystretch:a,colSeparationType:s,autoTag:o,singleRow:l,emptySingleRow:c,maxNumCols:h,leqno:u}=e;if(t.gullet.beginGroup(),l||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var d=t.gullet.expandMacroAsText("\\arraystretch");if(null==d)a=1;else if(!(a=parseFloat(d))||a<0)throw new X("Invalid \\arraystretch: "+d)}t.gullet.beginGroup();var p=[],g=[p],f=[],m=[],y=null!=o?[]:void 0;function v(){o&&t.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(t.gullet.macros.get("\\df@tag")?(y.push(t.subparse([new ua("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!o&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(me(v,"beginRow"),me(x,"endRow"),v(),m.push(aa(t));;){var b=t.parseExpression(!1,l?"\\end":"\\\\"),w=(t.gullet.endGroup(),t.gullet.beginGroup(),b={type:"ordgroup",mode:t.mode,body:b},r&&(b={type:"styling",mode:t.mode,style:r,body:[b]}),p.push(b),t.fetch().text);if("&"===w){if(h&&p.length===h){if(l||s)throw new X("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===w){x(),1===p.length&&"styling"===b.type&&0===b.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",t.nextToken);t.consume(),b=void 0," "!==t.gullet.future().text&&(b=t.parseSizeGroup(!0)),f.push(b?b.value:null),x(),m.push(aa(t)),g.push(p=[]),v()}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:a,body:g,cols:n,rowGaps:f,hskipBeforeAndAfter:e,hLinesBeforeRow:m,colSeparationType:s,tags:y,leqno:u}}function la(t){return"d"===t.slice(0,1)?"display":"text"}function ca(t,e,r){for(var i=oo(t,e,!1),n=e.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,e.sizingClasses(r)):i[a].classes[s+1]==="reset-size"+e.size&&(i[a].classes[s+1]="reset-size"+r.size),i[a].height*=n,i[a].depth*=n}return Z.makeFragment(i)}(lPt=(t,e)=>{for(var r in e)z(t,r,{get:e[r],enumerable:!0})})(Dn,{default:()=>vc});var ha,ua,X,da,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,_a,Sa,Aa,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,Fa,$a,za,Ga,Ua,qa,ja,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,K,ts,es,rs,is,ns,as,ss,os,ls,cs,hs,us,ds,ps,gs,u,d,p,fs,g,ms,ys,vs,xs,bs,ws,ks,Ts,Es,Cs,_s,Ss,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,Fs,$s,zs,Gs,Us,qs,js,Ws,Ys,Hs,Vs,Z,Xs,Ks,Zs,Qs,Js,to,eo,ro,io,no,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,E,yo,vo,xo,bo,wo,ko,To,Eo,Co,_o,So,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,Fo,$o,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,Zo,Qo,Jo,tl,el,rl,il,nl,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,_l,Sl,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,f,Kl,Zl,Ql,Jl,tc,ec,rc,ic,nc,ac,sc,oc,lc,cc,hc,uc,dc,pc,m,gc,fc,mc,yc,y,vc,xc=t(()=>{for(ha=class r{static{me(this,"SourceLocation")}constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new r(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}},ua=class i{static{me(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new i(e,ha.range(this,t))}},(X=class s{static{me(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,i,n,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,i=e.start,n=e.end,i===r.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ",e=r.slice(i,n).replace(/[^]/g,"$&̲"),a+=(15<i?"…"+r.slice(i-15,i):r.slice(0,i))+e+(n+15<r.length?r.slice(n,n+15)+"…":r.slice(n))),(e=new Error(a)).name="ParseError",e.__proto__=s.prototype,null!=(e.position=i)&&null!=n&&(e.length=n-i),e.rawMessage=t,e}}).prototype.__proto__=Error.prototype,Bl=me(function(t,e){return-1!==t.indexOf(e)},"contains"),y=me(function(t,e){return void 0===t?e:t},"deflt"),da=/([A-Z])/g,ac=me(function(t){return t.replace(da,"-$1").toLowerCase()},"hyphenate"),pa={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},ga=/[&><"']/g,me(On,"escape"),fa=me(function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},"getBaseElem"),m=me(function(t){return"mathord"===(t=fa(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),ma=me(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Il=me(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),ya={contains:Bl,deflt:y,escape:On,hyphenate:ac,getBaseElem:fa,isCharacterBox:m,protocolFromUrl:Il},va={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:me(t=>"#"+t,"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:me((t,e)=>(e.push(t),e),"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:me(t=>Math.max(0,t),"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:me(t=>Math.max(0,t),"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:me(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:me(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},me(Pn,"getDefaultValue"),xa=class{static{me(this,"Settings")}constructor(t){for(var e 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,t=t||{},va){var r;va.hasOwnProperty(e)&&(r=va[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:Pn(r))}}reportNonstrict(t,e,r){var i=this.strict;if((i="function"==typeof i?i(t,e,r):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var i=this.strict;if("function"==typeof i)try{i=i(t,e,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': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=ya.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Bl=class{static{me(this,"Style")}constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return ba[wa[this.id]]}sub(){return ba[ka[this.id]]}fracNum(){return ba[Ta[this.id]]}fracDen(){return ba[Ea[this.id]]}cramp(){return ba[Ca[this.id]]}text(){return ba[_a[this.id]]}isTight(){return 2<=this.size}},ba=[new Bl(0,0,!1),new Bl(1,0,!0),new Bl(2,1,!1),new Bl(3,1,!0),new Bl(4,2,!1),new Bl(5,2,!0),new Bl(6,3,!1),new Bl(7,3,!0)],wa=[4,5,4,5,6,7,6,7],ka=[5,5,5,5,7,7,7,7],Ta=[2,3,4,5,6,7,6,7],Ea=[3,3,5,5,7,7,7,7],Ca=[1,1,3,3,5,5,7,7],_a=[0,1,2,3,2,3,2,3],Sa={DISPLAY:ba[0],TEXT:ba[2],SCRIPT:ba[4],SCRIPTSCRIPT:ba[6]},Aa=[{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]]}],me(Bn,"scriptFromCodepoint"),La=[],Aa.forEach(t=>t.blocks.forEach(t=>La.push(...t))),me(Fn,"supportedCodepoint"),Na=me(function(t,e){return"M95,"+(622+t+e)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+t/2.075+" -"+t+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+t)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),Ia=me(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+t/2.084+" -"+t+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+t)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Ra=me(function(t,e){return"M983 "+(10+t+e)+`
l`+t/3.13+" -"+t+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Ma=me(function(t,e){return"M424,"+(2398+t+e)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+t)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+`
h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),Da=me(function(t,e){return"M473,"+(2713+t+e)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),Oa=me(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),Pa=me(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+`
H742v`+(r-54-e-t)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Ba=me(function(t,e,r){e*=1e3;var i="";switch(t){case"sqrtMain":i=Na(e,80);break;case"sqrtSize1":i=Ia(e,80);break;case"sqrtSize2":i=Ra(e,80);break;case"sqrtSize3":i=Ma(e,80);break;case"sqrtSize4":i=Da(e,80);break;case"sqrtTall":i=Pa(e,80,r)}return i},"sqrtPath"),Fa=me(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),$a={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`},za=me(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z
M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z
M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z
M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),Ga=class{static{me(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return ya.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){var t=me(t=>t.toText(),"toText");return this.children.map(t).join("")}},Ua={"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]}},qa={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]},ja={"Å":"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"},me($n,"setFontMetrics"),me(zn,"getCharacterMetrics"),Wa={},me(Gn,"getGlobalMetrics"),Ya=[[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]],Ha=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Va=me(function(t,e){return e.size<2?t:Ya[t-1][e.size-1]},"sizeAtStyle"),(Xa=class n{static{me(this,"Options")}constructor(t){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=t.style,this.color=t.color,this.size=t.size||n.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Ha[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e,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(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return new n(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Va(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Ha[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Va(n.BASESIZE,t);return this.size===e&&this.textSize===n.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==n.BASESIZE?["sizing","reset-size"+this.size,"size"+n.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Gn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ka={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},Za={ex:!0,em:!0,mu:!0},Qa=me(function(t){return(t="string"!=typeof t?t.unit:t)in Ka||t in Za||"ex"===t},"validUnit"),Ja=me(function(t,e){var r;if(t.unit in Ka)r=Ka[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var i=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=i.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=i.fontMetrics().quad}i!==e&&(r*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=me(function(t){return+t.toFixed(4)+"em"},"makeEm"),ts=me(function(t){return t.filter(t=>t).join(" ")},"createClass"),es=me(function(t,e,r){this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e&&(e.style.isTight()&&this.classes.push("mtight"),t=e.getColor())&&(this.style.color=t)},"initNode"),rs=me(function(t){var e,r,i=document.createElement(t);for(e in i.className=ts(this.classes),this.style)this.style.hasOwnProperty(e)&&(i.style[e]=this.style[e]);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"),is=me(function(t){var e,r,i="<"+t,n=(this.classes.length&&(i+=' class="'+ya.escape(ts(this.classes))+'"'),"");for(e in this.style)this.style.hasOwnProperty(e)&&(n+=ya.hyphenate(e)+":"+this.style[e]+";");for(r in n&&(i+=' style="'+ya.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(r)&&(i+=" "+r+'="'+ya.escape(this.attributes[r])+'"');i+=">";for(var a=0;a<this.children.length;a++)i+=this.children[a].toMarkup();return i+"</"+t+">"},"toMarkup"),ns=class{static{me(this,"Span")}constructor(t,e,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,es.call(this,t,r,i),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return ya.contains(this.classes,t)}toNode(){return rs.call(this,"span")}toMarkup(){return is.call(this,"span")}},as=class{static{me(this,"Anchor")}constructor(t,e,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,es.call(this,e,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return ya.contains(this.classes,t)}toNode(){return rs.call(this,"a")}toMarkup(){return is.call(this,"a")}},ss=class{static{me(this,"Img")}constructor(t,e,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=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return ya.contains(this.classes,t)}toNode(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var t,e='<img src="'+ya.escape(this.src)+'" alt="'+ya.escape(this.alt)+'"',r="";for(t in this.style)this.style.hasOwnProperty(t)&&(r+=ya.hyphenate(t)+":"+this.style[t]+";");return r&&(e+=' style="'+ya.escape(r)+'"'),e+"'/>"}},os={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},ls=class{static{me(this,"SymbolNode")}constructor(t,e,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=t,this.height=e||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,(t=Bn(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=os[this.text])}hasClass(t){return ya.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0<this.italic&&((r=document.createElement("span")).style.marginRight=K(this.italic)),0<this.classes.length&&((r=r||document.createElement("span")).className=ts(this.classes)),this.style)this.style.hasOwnProperty(t)&&(r=r||document.createElement("span"),r.style[t]=this.style[t]);return r?(r.appendChild(e),r):e}toMarkup(){var t,e=!1,r="<span",i=(this.classes.length&&(e=!0,r=(r+=' class="')+ya.escape(ts(this.classes))+'"'),"");for(t in 0<this.italic&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(t)&&(i+=ya.hyphenate(t)+":"+this.style[t]+";");i&&(e=!0,r+=' style="'+ya.escape(i)+'"');var n=ya.escape(this.text);return e?(r+=">")+n+"</span>":n}},cs=class{static{me(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var t,e='<svg xmlns="http://www.w3.org/2000/svg"';for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+ya.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</svg>"}},hs=class{static{me(this,"PathNode")}constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",$a[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+ya.escape(this.alternate)+'"/>':'<path d="'+ya.escape($a[this.pathName])+'"/>'}},us=class{static{me(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","line");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var t,e="<line";for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+ya.escape(this.attributes[t])+'"');return e+"/>"}},me(Un,"assertSymbolDomNode"),me(qn,"assertSpan"),ds={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ps={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},gs={math:{},text:{}},me(o,"defineSymbol"),d="text",y="ams",ac="accent-token",m="bin",Il="close",Bl="inner",fs="mathord",nc="op-token",fc="open",Ol="punct",gc="spacing",g="textord",o(u="math",p="main",f="rel","≡","\\equiv",!0),o(u,p,f,"≺","\\prec",!0),o(u,p,f,"≻","\\succ",!0),o(u,p,f,"","\\sim",!0),o(u,p,f,"⊥","\\perp"),o(u,p,f,"⪯","\\preceq",!0),o(u,p,f,"⪰","\\succeq",!0),o(u,p,f,"≃","\\simeq",!0),o(u,p,f,"","\\mid",!0),o(u,p,f,"≪","\\ll",!0),o(u,p,f,"≫","\\gg",!0),o(u,p,f,"≍","\\asymp",!0),o(u,p,f,"∥","\\parallel"),o(u,p,f,"⋈","\\bowtie",!0),o(u,p,f,"⌣","\\smile",!0),o(u,p,f,"⊑","\\sqsubseteq",!0),o(u,p,f,"⊒","\\sqsupseteq",!0),o(u,p,f,"≐","\\doteq",!0),o(u,p,f,"⌢","\\frown",!0),o(u,p,f,"∋","\\ni",!0),o(u,p,f,"∝","\\propto",!0),o(u,p,f,"⊢","\\vdash",!0),o(u,p,f,"⊣","\\dashv",!0),o(u,p,f,"∋","\\owns"),o(u,p,Ol,".","\\ldotp"),o(u,p,Ol,"⋅","\\cdotp"),o(u,p,g,"#","\\#"),o(d,p,g,"#","\\#"),o(u,p,g,"&","\\&"),o(d,p,g,"&","\\&"),o(u,p,g,"ℵ","\\aleph",!0),o(u,p,g,"∀","\\forall",!0),o(u,p,g,"ℏ","\\hbar",!0),o(u,p,g,"∃","\\exists",!0),o(u,p,g,"∇","\\nabla",!0),o(u,p,g,"♭","\\flat",!0),o(u,p,g,"","\\ell",!0),o(u,p,g,"♮","\\natural",!0),o(u,p,g,"♣","\\clubsuit",!0),o(u,p,g,"℘","\\wp",!0),o(u,p,g,"♯","\\sharp",!0),o(u,p,g,"♢","\\diamondsuit",!0),o(u,p,g,"","\\Re",!0),o(u,p,g,"♡","\\heartsuit",!0),o(u,p,g,"","\\Im",!0),o(u,p,g,"♠","\\spadesuit",!0),o(u,p,g,"§","\\S",!0),o(d,p,g,"§","\\S"),o(u,p,g,"¶","\\P",!0),o(d,p,g,"¶","\\P"),o(u,p,g,"†","\\dag"),o(d,p,g,"†","\\dag"),o(d,p,g,"†","\\textdagger"),o(u,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\textdaggerdbl"),o(u,p,Il,"⎱","\\rmoustache",!0),o(u,p,fc,"⎰","\\lmoustache",!0),o(u,p,Il,"⟯","\\rgroup",!0),o(u,p,fc,"⟮","\\lgroup",!0),o(u,p,m,"∓","\\mp",!0),o(u,p,m,"⊖","\\ominus",!0),o(u,p,m,"⊎","\\uplus",!0),o(u,p,m,"⊓","\\sqcap",!0),o(u,p,m,"","\\ast"),o(u,p,m,"⊔","\\sqcup",!0),o(u,p,m,"◯","\\bigcirc",!0),o(u,p,m,"∙","\\bullet",!0),o(u,p,m,"‡","\\ddagger"),o(u,p,m,"≀","\\wr",!0),o(u,p,m,"⨿","\\amalg"),o(u,p,m,"&","\\And"),o(u,p,f,"⟵","\\longleftarrow",!0),o(u,p,f,"⇐","\\Leftarrow",!0),o(u,p,f,"⟸","\\Longleftarrow",!0),o(u,p,f,"⟶","\\longrightarrow",!0),o(u,p,f,"⇒","\\Rightarrow",!0),o(u,p,f,"⟹","\\Longrightarrow",!0),o(u,p,f,"↔","\\leftrightarrow",!0),o(u,p,f,"⟷","\\longleftrightarrow",!0),o(u,p,f,"⇔","\\Leftrightarrow",!0),o(u,p,f,"⟺","\\Longleftrightarrow",!0),o(u,p,f,"↦","\\mapsto",!0),o(u,p,f,"⟼","\\longmapsto",!0),o(u,p,f,"↗","\\nearrow",!0),o(u,p,f,"↩","\\hookleftarrow",!0),o(u,p,f,"↪","\\hookrightarrow",!0),o(u,p,f,"↘","\\searrow",!0),o(u,p,f,"↼","\\leftharpoonup",!0),o(u,p,f,"⇀","\\rightharpoonup",!0),o(u,p,f,"↙","\\swarrow",!0),o(u,p,f,"↽","\\leftharpoondown",!0),o(u,p,f,"⇁","\\rightharpoondown",!0),o(u,p,f,"↖","\\nwarrow",!0),o(u,p,f,"⇌","\\rightleftharpoons",!0),o(u,y,f,"≮","\\nless",!0),o(u,y,f,"","\\@nleqslant"),o(u,y,f,"","\\@nleqq"),o(u,y,f,"⪇","\\lneq",!0),o(u,y,f,"≨","\\lneqq",!0),o(u,y,f,"","\\@lvertneqq"),o(u,y,f,"⋦","\\lnsim",!0),o(u,y,f,"⪉","\\lnapprox",!0),o(u,y,f,"⊀","\\nprec",!0),o(u,y,f,"⋠","\\npreceq",!0),o(u,y,f,"⋨","\\precnsim",!0),o(u,y,f,"⪹","\\precnapprox",!0),o(u,y,f,"≁","\\nsim",!0),o(u,y,f,"","\\@nshortmid"),o(u,y,f,"∤","\\nmid",!0),o(u,y,f,"⊬","\\nvdash",!0),o(u,y,f,"⊭","\\nvDash",!0),o(u,y,f,"⋪","\\ntriangleleft"),o(u,y,f,"⋬","\\ntrianglelefteq",!0),o(u,y,f,"⊊","\\subsetneq",!0),o(u,y,f,"","\\@varsubsetneq"),o(u,y,f,"⫋","\\subsetneqq",!0),o(u,y,f,"","\\@varsubsetneqq"),o(u,y,f,"≯","\\ngtr",!0),o(u,y,f,"","\\@ngeqslant"),o(u,y,f,"","\\@ngeqq"),o(u,y,f,"⪈","\\gneq",!0),o(u,y,f,"≩","\\gneqq",!0),o(u,y,f,"","\\@gvertneqq"),o(u,y,f,"⋧","\\gnsim",!0),o(u,y,f,"⪊","\\gnapprox",!0),o(u,y,f,"⊁","\\nsucc",!0),o(u,y,f,"⋡","\\nsucceq",!0),o(u,y,f,"⋩","\\succnsim",!0),o(u,y,f,"⪺","\\succnapprox",!0),o(u,y,f,"≆","\\ncong",!0),o(u,y,f,"","\\@nshortparallel"),o(u,y,f,"∦","\\nparallel",!0),o(u,y,f,"⊯","\\nVDash",!0),o(u,y,f,"⋫","\\ntriangleright"),o(u,y,f,"⋭","\\ntrianglerighteq",!0),o(u,y,f,"","\\@nsupseteqq"),o(u,y,f,"⊋","\\supsetneq",!0),o(u,y,f,"","\\@varsupsetneq"),o(u,y,f,"⫌","\\supsetneqq",!0),o(u,y,f,"","\\@varsupsetneqq"),o(u,y,f,"⊮","\\nVdash",!0),o(u,y,f,"⪵","\\precneqq",!0),o(u,y,f,"⪶","\\succneqq",!0),o(u,y,f,"","\\@nsubseteqq"),o(u,y,m,"⊴","\\unlhd"),o(u,y,m,"⊵","\\unrhd"),o(u,y,f,"↚","\\nleftarrow",!0),o(u,y,f,"↛","\\nrightarrow",!0),o(u,y,f,"⇍","\\nLeftarrow",!0),o(u,y,f,"⇏","\\nRightarrow",!0),o(u,y,f,"↮","\\nleftrightarrow",!0),o(u,y,f,"⇎","\\nLeftrightarrow",!0),o(u,y,f,"△","\\vartriangle"),o(u,y,g,"ℏ","\\hslash"),o(u,y,g,"▽","\\triangledown"),o(u,y,g,"◊","\\lozenge"),o(u,y,g,"Ⓢ","\\circledS"),o(u,y,g,"®","\\circledR"),o(d,y,g,"®","\\circledR"),o(u,y,g,"∡","\\measuredangle",!0),o(u,y,g,"∄","\\nexists"),o(u,y,g,"℧","\\mho"),o(u,y,g,"Ⅎ","\\Finv",!0),o(u,y,g,"⅁","\\Game",!0),o(u,y,g,"","\\backprime"),o(u,y,g,"▲","\\blacktriangle"),o(u,y,g,"▼","\\blacktriangledown"),o(u,y,g,"■","\\blacksquare"),o(u,y,g,"⧫","\\blacklozenge"),o(u,y,g,"★","\\bigstar"),o(u,y,g,"∢","\\sphericalangle",!0),o(u,y,g,"∁","\\complement",!0),o(u,y,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,y,g,"","\\diagup"),o(u,y,g,"╲","\\diagdown"),o(u,y,g,"□","\\square"),o(u,y,g,"□","\\Box"),o(u,y,g,"◊","\\Diamond"),o(u,y,g,"¥","\\yen",!0),o(d,y,g,"¥","\\yen",!0),o(u,y,g,"✓","\\checkmark",!0),o(d,y,g,"✓","\\checkmark"),o(u,y,g,"ℶ","\\beth",!0),o(u,y,g,"ℸ","\\daleth",!0),o(u,y,g,"ℷ","\\gimel",!0),o(u,y,g,"ϝ","\\digamma",!0),o(u,y,g,"ϰ","\\varkappa"),o(u,y,fc,"┌","\\@ulcorner",!0),o(u,y,Il,"┐","\\@urcorner",!0),o(u,y,fc,"└","\\@llcorner",!0),o(u,y,Il,"┘","\\@lrcorner",!0),o(u,y,f,"≦","\\leqq",!0),o(u,y,f,"⩽","\\leqslant",!0),o(u,y,f,"⪕","\\eqslantless",!0),o(u,y,f,"≲","\\lesssim",!0),o(u,y,f,"⪅","\\lessapprox",!0),o(u,y,f,"≊","\\approxeq",!0),o(u,y,m,"⋖","\\lessdot"),o(u,y,f,"⋘","\\lll",!0),o(u,y,f,"≶","\\lessgtr",!0),o(u,y,f,"⋚","\\lesseqgtr",!0),o(u,y,f,"⪋","\\lesseqqgtr",!0),o(u,y,f,"≑","\\doteqdot"),o(u,y,f,"≓","\\risingdotseq",!0),o(u,y,f,"≒","\\fallingdotseq",!0),o(u,y,f,"∽","\\backsim",!0),o(u,y,f,"⋍","\\backsimeq",!0),o(u,y,f,"⫅","\\subseteqq",!0),o(u,y,f,"⋐","\\Subset",!0),o(u,y,f,"⊏","\\sqsubset",!0),o(u,y,f,"≼","\\preccurlyeq",!0),o(u,y,f,"⋞","\\curlyeqprec",!0),o(u,y,f,"≾","\\precsim",!0),o(u,y,f,"⪷","\\precapprox",!0),o(u,y,f,"⊲","\\vartriangleleft"),o(u,y,f,"⊴","\\trianglelefteq"),o(u,y,f,"⊨","\\vDash",!0),o(u,y,f,"⊪","\\Vvdash",!0),o(u,y,f,"⌣","\\smallsmile"),o(u,y,f,"⌢","\\smallfrown"),o(u,y,f,"≏","\\bumpeq",!0),o(u,y,f,"≎","\\Bumpeq",!0),o(u,y,f,"≧","\\geqq",!0),o(u,y,f,"⩾","\\geqslant",!0),o(u,y,f,"⪖","\\eqslantgtr",!0),o(u,y,f,"≳","\\gtrsim",!0),o(u,y,f,"⪆","\\gtrapprox",!0),o(u,y,m,"⋗","\\gtrdot"),o(u,y,f,"⋙","\\ggg",!0),o(u,y,f,"≷","\\gtrless",!0),o(u,y,f,"⋛","\\gtreqless",!0),o(u,y,f,"⪌","\\gtreqqless",!0),o(u,y,f,"≖","\\eqcirc",!0),o(u,y,f,"≗","\\circeq",!0),o(u,y,f,"≜","\\triangleq",!0),o(u,y,f,"","\\thicksim"),o(u,y,f,"≈","\\thickapprox"),o(u,y,f,"⫆","\\supseteqq",!0),o(u,y,f,"⋑","\\Supset",!0),o(u,y,f,"⊐","\\sqsupset",!0),o(u,y,f,"≽","\\succcurlyeq",!0),o(u,y,f,"⋟","\\curlyeqsucc",!0),o(u,y,f,"≿","\\succsim",!0),o(u,y,f,"⪸","\\succapprox",!0),o(u,y,f,"⊳","\\vartriangleright"),o(u,y,f,"⊵","\\trianglerighteq"),o(u,y,f,"⊩","\\Vdash",!0),o(u,y,f,"","\\shortmid"),o(u,y,f,"∥","\\shortparallel"),o(u,y,f,"≬","\\between",!0),o(u,y,f,"⋔","\\pitchfork",!0),o(u,y,f,"∝","\\varpropto"),o(u,y,f,"◀","\\blacktriangleleft"),o(u,y,f,"∴","\\therefore",!0),o(u,y,f,"∍","\\backepsilon"),o(u,y,f,"▶","\\blacktriangleright"),o(u,y,f,"∵","\\because",!0),o(u,y,f,"⋘","\\llless"),o(u,y,f,"⋙","\\gggtr"),o(u,y,m,"⊲","\\lhd"),o(u,y,m,"⊳","\\rhd"),o(u,y,f,"≂","\\eqsim",!0),o(u,p,f,"⋈","\\Join"),o(u,y,f,"≑","\\Doteq",!0),o(u,y,m,"∔","\\dotplus",!0),o(u,y,m,"","\\smallsetminus"),o(u,y,m,"⋒","\\Cap",!0),o(u,y,m,"⋓","\\Cup",!0),o(u,y,m,"⩞","\\doublebarwedge",!0),o(u,y,m,"⊟","\\boxminus",!0),o(u,y,m,"⊞","\\boxplus",!0),o(u,y,m,"⋇","\\divideontimes",!0),o(u,y,m,"⋉","\\ltimes",!0),o(u,y,m,"⋊","\\rtimes",!0),o(u,y,m,"⋋","\\leftthreetimes",!0),o(u,y,m,"⋌","\\rightthreetimes",!0),o(u,y,m,"⋏","\\curlywedge",!0),o(u,y,m,"⋎","\\curlyvee",!0),o(u,y,m,"⊝","\\circleddash",!0),o(u,y,m,"⊛","\\circledast",!0),o(u,y,m,"⋅","\\centerdot"),o(u,y,m,"⊺","\\intercal",!0),o(u,y,m,"⋒","\\doublecap"),o(u,y,m,"⋓","\\doublecup"),o(u,y,m,"⊠","\\boxtimes",!0),o(u,y,f,"⇢","\\dashrightarrow",!0),o(u,y,f,"⇠","\\dashleftarrow",!0),o(u,y,f,"⇇","\\leftleftarrows",!0),o(u,y,f,"⇆","\\leftrightarrows",!0),o(u,y,f,"⇚","\\Lleftarrow",!0),o(u,y,f,"↞","\\twoheadleftarrow",!0),o(u,y,f,"↢","\\leftarrowtail",!0),o(u,y,f,"↫","\\looparrowleft",!0),o(u,y,f,"⇋","\\leftrightharpoons",!0),o(u,y,f,"↶","\\curvearrowleft",!0),o(u,y,f,"↺","\\circlearrowleft",!0),o(u,y,f,"↰","\\Lsh",!0),o(u,y,f,"⇈","\\upuparrows",!0),o(u,y,f,"↿","\\upharpoonleft",!0),o(u,y,f,"⇃","\\downharpoonleft",!0),o(u,p,f,"⊶","\\origof",!0),o(u,p,f,"⊷","\\imageof",!0),o(u,y,f,"⊸","\\multimap",!0),o(u,y,f,"↭","\\leftrightsquigarrow",!0),o(u,y,f,"⇉","\\rightrightarrows",!0),o(u,y,f,"⇄","\\rightleftarrows",!0),o(u,y,f,"↠","\\twoheadrightarrow",!0),o(u,y,f,"↣","\\rightarrowtail",!0),o(u,y,f,"↬","\\looparrowright",!0),o(u,y,f,"↷","\\curvearrowright",!0),o(u,y,f,"↻","\\circlearrowright",!0),o(u,y,f,"↱","\\Rsh",!0),o(u,y,f,"⇊","\\downdownarrows",!0),o(u,y,f,"↾","\\upharpoonright",!0),o(u,y,f,"⇂","\\downharpoonright",!0),o(u,y,f,"⇝","\\rightsquigarrow",!0),o(u,y,f,"⇝","\\leadsto"),o(u,y,f,"⇛","\\Rrightarrow",!0),o(u,y,f,"↾","\\restriction"),o(u,p,g,"","`"),o(u,p,g,"$","\\$"),o(d,p,g,"$","\\$"),o(d,p,g,"$","\\textdollar"),o(u,p,g,"%","\\%"),o(d,p,g,"%","\\%"),o(u,p,g,"_","\\_"),o(d,p,g,"_","\\_"),o(d,p,g,"_","\\textunderscore"),o(u,p,g,"∠","\\angle",!0),o(u,p,g,"∞","\\infty",!0),o(u,p,g,"","\\prime"),o(u,p,g,"△","\\triangle"),o(u,p,g,"Γ","\\Gamma",!0),o(u,p,g,"Δ","\\Delta",!0),o(u,p,g,"Θ","\\Theta",!0),o(u,p,g,"Λ","\\Lambda",!0),o(u,p,g,"Ξ","\\Xi",!0),o(u,p,g,"Π","\\Pi",!0),o(u,p,g,"Σ","\\Sigma",!0),o(u,p,g,"Υ","\\Upsilon",!0),o(u,p,g,"Φ","\\Phi",!0),o(u,p,g,"Ψ","\\Psi",!0),o(u,p,g,"Ω","\\Omega",!0),o(u,p,g,"A","Α"),o(u,p,g,"B","Β"),o(u,p,g,"E","Ε"),o(u,p,g,"Z","Ζ"),o(u,p,g,"H","Η"),o(u,p,g,"I","Ι"),o(u,p,g,"K","Κ"),o(u,p,g,"M","Μ"),o(u,p,g,"N","Ν"),o(u,p,g,"O","Ο"),o(u,p,g,"P","Ρ"),o(u,p,g,"T","Τ"),o(u,p,g,"X","Χ"),o(u,p,g,"¬","\\neg",!0),o(u,p,g,"¬","\\lnot"),o(u,p,g,"","\\top"),o(u,p,g,"⊥","\\bot"),o(u,p,g,"∅","\\emptyset"),o(u,y,g,"∅","\\varnothing"),o(u,p,fs,"α","\\alpha",!0),o(u,p,fs,"β","\\beta",!0),o(u,p,fs,"γ","\\gamma",!0),o(u,p,fs,"δ","\\delta",!0),o(u,p,fs,"ϵ","\\epsilon",!0),o(u,p,fs,"ζ","\\zeta",!0),o(u,p,fs,"η","\\eta",!0),o(u,p,fs,"θ","\\theta",!0),o(u,p,fs,"ι","\\iota",!0),o(u,p,fs,"κ","\\kappa",!0),o(u,p,fs,"λ","\\lambda",!0),o(u,p,fs,"μ","\\mu",!0),o(u,p,fs,"ν","\\nu",!0),o(u,p,fs,"ξ","\\xi",!0),o(u,p,fs,"ο","\\omicron",!0),o(u,p,fs,"π","\\pi",!0),o(u,p,fs,"ρ","\\rho",!0),o(u,p,fs,"σ","\\sigma",!0),o(u,p,fs,"τ","\\tau",!0),o(u,p,fs,"υ","\\upsilon",!0),o(u,p,fs,"ϕ","\\phi",!0),o(u,p,fs,"χ","\\chi",!0),o(u,p,fs,"ψ","\\psi",!0),o(u,p,fs,"ω","\\omega",!0),o(u,p,fs,"ε","\\varepsilon",!0),o(u,p,fs,"ϑ","\\vartheta",!0),o(u,p,fs,"ϖ","\\varpi",!0),o(u,p,fs,"ϱ","\\varrho",!0),o(u,p,fs,"ς","\\varsigma",!0),o(u,p,fs,"φ","\\varphi",!0),o(u,p,m,"","*",!0),o(u,p,m,"+","+"),o(u,p,m,"","-",!0),o(u,p,m,"⋅","\\cdot",!0),o(u,p,m,"∘","\\circ",!0),o(u,p,m,"÷","\\div",!0),o(u,p,m,"±","\\pm",!0),o(u,p,m,"×","\\times",!0),o(u,p,m,"∩","\\cap",!0),o(u,p,m,"","\\cup",!0),o(u,p,m,"","\\setminus",!0),o(u,p,m,"∧","\\land"),o(u,p,m,"","\\lor"),o(u,p,m,"∧","\\wedge",!0),o(u,p,m,"","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,fc,"⟨","\\langle",!0),o(u,p,fc,"","\\lvert"),o(u,p,fc,"∥","\\lVert"),o(u,p,Il,"?","?"),o(u,p,Il,"!","!"),o(u,p,Il,"⟩","\\rangle",!0),o(u,p,Il,"","\\rvert"),o(u,p,Il,"∥","\\rVert"),o(u,p,f,"=","="),o(u,p,f,":",":"),o(u,p,f,"≈","\\approx",!0),o(u,p,f,"≅","\\cong",!0),o(u,p,f,"≥","\\ge"),o(u,p,f,"≥","\\geq",!0),o(u,p,f,"←","\\gets"),o(u,p,f,">","\\gt",!0),o(u,p,f,"∈","\\in",!0),o(u,p,f,"","\\@not"),o(u,p,f,"⊂","\\subset",!0),o(u,p,f,"⊃","\\supset",!0),o(u,p,f,"⊆","\\subseteq",!0),o(u,p,f,"⊇","\\supseteq",!0),o(u,y,f,"⊈","\\nsubseteq",!0),o(u,y,f,"⊉","\\nsupseteq",!0),o(u,p,f,"⊨","\\models"),o(u,p,f,"←","\\leftarrow",!0),o(u,p,f,"≤","\\le"),o(u,p,f,"≤","\\leq",!0),o(u,p,f,"<","\\lt",!0),o(u,p,f,"→","\\rightarrow",!0),o(u,p,f,"→","\\to"),o(u,y,f,"≱","\\ngeq",!0),o(u,y,f,"≰","\\nleq",!0),o(u,p,gc," ","\\ "),o(u,p,gc," ","\\space"),o(u,p,gc," ","\\nobreakspace"),o(d,p,gc," ","\\ "),o(d,p,gc," "," "),o(d,p,gc," ","\\space"),o(d,p,gc," ","\\nobreakspace"),o(u,p,gc,null,"\\nobreak"),o(u,p,gc,null,"\\allowbreak"),o(u,p,Ol,",",","),o(u,p,Ol,";",";"),o(u,y,m,"⊼","\\barwedge",!0),o(u,y,m,"⊻","\\veebar",!0),o(u,p,m,"⊙","\\odot",!0),o(u,p,m,"⊕","\\oplus",!0),o(u,p,m,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,m,"⊘","\\oslash",!0),o(u,y,m,"⊚","\\circledcirc",!0),o(u,y,m,"⊡","\\boxdot",!0),o(u,p,m,"△","\\bigtriangleup"),o(u,p,m,"▽","\\bigtriangledown"),o(u,p,m,"†","\\dagger"),o(u,p,m,"⋄","\\diamond"),o(u,p,m,"⋆","\\star"),o(u,p,m,"◃","\\triangleleft"),o(u,p,m,"▹","\\triangleright"),o(u,p,fc,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,Il,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,fc,"{","\\lbrace"),o(u,p,Il,"}","\\rbrace"),o(u,p,fc,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,Il,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,fc,"(","\\lparen",!0),o(u,p,Il,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,fc,"⌊","\\lfloor",!0),o(u,p,Il,"⌋","\\rfloor",!0),o(u,p,fc,"⌈","\\lceil",!0),o(u,p,Il,"⌉","\\rceil",!0),o(u,p,g,"\\","\\backslash"),o(u,p,g,"","|"),o(u,p,g,"","\\vert"),o(d,p,g,"|","\\textbar",!0),o(u,p,g,"∥","\\|"),o(u,p,g,"∥","\\Vert"),o(d,p,g,"∥","\\textbardbl"),o(d,p,g,"~","\\textasciitilde"),o(d,p,g,"\\","\\textbackslash"),o(d,p,g,"^","\\textasciicircum"),o(u,p,f,"↑","\\uparrow",!0),o(u,p,f,"⇑","\\Uparrow",!0),o(u,p,f,"↓","\\downarrow",!0),o(u,p,f,"⇓","\\Downarrow",!0),o(u,p,f,"↕","\\updownarrow",!0),o(u,p,f,"⇕","\\Updownarrow",!0),o(u,p,nc,"∐","\\coprod"),o(u,p,nc,"","\\bigvee"),o(u,p,nc,"⋀","\\bigwedge"),o(u,p,nc,"⨄","\\biguplus"),o(u,p,nc,"⋂","\\bigcap"),o(u,p,nc,"","\\bigcup"),o(u,p,nc,"∫","\\int"),o(u,p,nc,"∫","\\intop"),o(u,p,nc,"∬","\\iint"),o(u,p,nc,"∭","\\iiint"),o(u,p,nc,"∏","\\prod"),o(u,p,nc,"∑","\\sum"),o(u,p,nc,"⨂","\\bigotimes"),o(u,p,nc,"⨁","\\bigoplus"),o(u,p,nc,"⨀","\\bigodot"),o(u,p,nc,"∮","\\oint"),o(u,p,nc,"∯","\\oiint"),o(u,p,nc,"∰","\\oiiint"),o(u,p,nc,"⨆","\\bigsqcup"),o(u,p,nc,"∫","\\smallint"),o(d,p,Bl,"…","\\textellipsis"),o(u,p,Bl,"…","\\mathellipsis"),o(d,p,Bl,"…","\\ldots",!0),o(u,p,Bl,"…","\\ldots",!0),o(u,p,Bl,"⋯","\\@cdots",!0),o(u,p,Bl,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(u,p,ac,"ˊ","\\acute"),o(u,p,ac,"ˋ","\\grave"),o(u,p,ac,"¨","\\ddot"),o(u,p,ac,"~","\\tilde"),o(u,p,ac,"ˉ","\\bar"),o(u,p,ac,"˘","\\breve"),o(u,p,ac,"ˇ","\\check"),o(u,p,ac,"^","\\hat"),o(u,p,ac,"⃗","\\vec"),o(u,p,ac,"˙","\\dot"),o(u,p,ac,"˚","\\mathring"),o(u,p,fs,"","\\@imath"),o(u,p,fs,"","\\@jmath"),o(u,p,g,"ı","ı"),o(u,p,g,"ȷ","ȷ"),o(d,p,g,"ı","\\i",!0),o(d,p,g,"ȷ","\\j",!0),o(d,p,g,"ß","\\ss",!0),o(d,p,g,"æ","\\ae",!0),o(d,p,g,"œ","\\oe",!0),o(d,p,g,"ø","\\o",!0),o(d,p,g,"Æ","\\AE",!0),o(d,p,g,"Œ","\\OE",!0),o(d,p,g,"Ø","\\O",!0),o(d,p,ac,"ˊ","\\'"),o(d,p,ac,"ˋ","\\`"),o(d,p,ac,"ˆ","\\^"),o(d,p,ac,"˜","\\~"),o(d,p,ac,"ˉ","\\="),o(d,p,ac,"˘","\\u"),o(d,p,ac,"˙","\\."),o(d,p,ac,"¸","\\c"),o(d,p,ac,"˚","\\r"),o(d,p,ac,"ˇ","\\v"),o(d,p,ac,"¨",'\\"'),o(d,p,ac,"˝","\\H"),o(d,p,ac,"◯","\\textcircled"),ms={"--":!0,"---":!0,"``":!0,"''":!0},o(d,p,g,"","--",!0),o(d,p,g,"","\\textendash"),o(d,p,g,"—","---",!0),o(d,p,g,"—","\\textemdash"),o(d,p,g,"","`",!0),o(d,p,g,"","\\textquoteleft"),o(d,p,g,"","'",!0),o(d,p,g,"","\\textquoteright"),o(d,p,g,"“","``",!0),o(d,p,g,"“","\\textquotedblleft"),o(d,p,g,"”","''",!0),o(d,p,g,"”","\\textquotedblright"),o(u,p,g,"°","\\degree",!0),o(d,p,g,"°","\\degree"),o(d,p,g,"°","\\textdegree",!0),o(u,p,g,"£","\\pounds"),o(u,p,g,"£","\\mathsterling",!0),o(d,p,g,"£","\\pounds"),o(d,p,g,"£","\\textsterling",!0),o(u,y,g,"✠","\\maltese"),o(d,y,g,"✠","\\maltese"),ys='0123456789/@."',xs=0;xs<ys.length;xs++)vs=ys.charAt(xs),o(u,p,g,vs,vs);for(bs='0123456789!@*()-=+";:?/.,',ks=0;ks<bs.length;ks++)ws=bs.charAt(ks),o(d,p,g,ws,ws);for(Ts="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Cs=0;Cs<Ts.length;Cs++)Es=Ts.charAt(Cs),o(u,p,fs,Es,Es),o(d,p,g,Es,Es);for(o(u,y,g,"C",""),o(d,y,g,"C",""),o(u,y,g,"H",""),o(d,y,g,"H",""),o(u,y,g,"N",""),o(d,y,g,"N",""),o(u,y,g,"P",""),o(d,y,g,"P",""),o(u,y,g,"Q",""),o(d,y,g,"Q",""),o(u,y,g,"R",""),o(d,y,g,"R",""),o(u,y,g,"Z",""),o(d,y,g,"Z",""),o(u,p,fs,"h",""),o(d,p,fs,"h",""),_s="",As=0;As<Ts.length;As++)Ss=Ts.charAt(As),_s=String.fromCharCode(55349,56320+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56372+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56424+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56580+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56684+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56736+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56788+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56840+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56944+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),As<26&&(_s=String.fromCharCode(55349,56632+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s),_s=String.fromCharCode(55349,56476+As),o(u,p,fs,Ss,_s),o(d,p,g,Ss,_s));for(o(u,p,fs,"k",_s="𝕜"),o(d,p,g,"k",_s),Ns=0;Ns<10;Ns++)Ls=Ns.toString(),_s=String.fromCharCode(55349,57294+Ns),o(u,p,fs,Ls,_s),o(d,p,g,Ls,_s),_s=String.fromCharCode(55349,57314+Ns),o(u,p,fs,Ls,_s),o(d,p,g,Ls,_s),_s=String.fromCharCode(55349,57324+Ns),o(u,p,fs,Ls,_s),o(d,p,g,Ls,_s),_s=String.fromCharCode(55349,57334+Ns),o(u,p,fs,Ls,_s),o(d,p,g,Ls,_s);for(Is="ÐÞþ",Ms=0;Ms<Is.length;Ms++)Rs=Is.charAt(Ms),o(u,p,fs,Rs,Rs),o(d,p,g,Rs,Rs);Ds=[["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"]],Os=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ps=me(function(t,e){var r,i=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536,e="math"===e?0:1;if(119808<=i&&i<120484)return r=Math.floor((i-119808)/26),[Ds[r][2],Ds[r][e]];if(120782<=i&&i<=120831)return r=Math.floor((i-120782)/10),[Os[r][2],Os[r][e]];if(120485==i||120486==i)return[Ds[0][2],Ds[0][e]];if(120486<i&&i<120782)return["",""];throw new X("Unsupported character: "+t)},"wideCharacterFont"),Bs=me(function(t,e,r){return{value:t=gs[r][t]&&gs[r][t].replace?gs[r][t].replace:t,metrics:zn(t,e,r)}},"lookupSymbol"),Fs=me(function(t,e,r,i,n){var a=Bs(t,e,r),s=a.metrics;return t=a.value,a=s?(a=s.italic,("text"===r||i&&"mathit"===i.font)&&(a=0),new ls(t,s.height,s.depth,a,s.skew,s.width,n)):(typeof console<"u"&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),new ls(t,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"),gc=me(function(t,e,r,i){return void 0===i&&(i=[]),"boldsymbol"===r.font&&Bs(t,"Main-Bold",e).metrics?Fs(t,"Main-Bold",e,r,i.concat(["mathbf"])):"\\"===t||"main"===gs[e][t].font?Fs(t,"Main-Regular",e,r,i):Fs(t,"AMS-Regular",e,r,i.concat(["amsrm"]))},"mathsym"),$s=me(function(t,e,r,i,n){return"textord"!==n&&Bs(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),Ol=me(function(t,e,r){var i,n,a=t.mode,s=t.text,o=["mord"],l=(t="math"===a||"text"===a&&e.font)?e.font:e.fontFamily,c="",h="";if(55349===s.charCodeAt(0)&&([c,h]=Ps(s,a)),0<c.length)return Fs(s,c,a,e,o.concat(h));if(l){if(n="boldsymbol"===l?(i=(c=$s(s,a,e,o,r)).fontName,[c.fontClass]):t?(i=Hs[l].fontName,[l]):(i=Ys(l,e.fontWeight,e.fontShape),[l,e.fontWeight,e.fontShape]),Bs(s,i,a).metrics)return Fs(s,i,a,e,o.concat(n));if(ms.hasOwnProperty(s)&&"Typewriter"===i.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(Fs(s[d],i,a,e,o.concat(n)));return js(u)}}if("mathord"===r)return Fs(s,"Math-Italic",a,e,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=gs[a][s]&&gs[a][s].font)?(c=Ys("amsrm",e.fontWeight,e.fontShape),Fs(s,c,a,e,o.concat("amsrm",e.fontWeight,e.fontShape))):"main"!==h&&h?(t=Ys(h,e.fontWeight,e.fontShape),Fs(s,t,a,e,o.concat(t,e.fontWeight,e.fontShape))):(l=Ys("textrm",e.fontWeight,e.fontShape),Fs(s,l,a,e,o.concat(e.fontWeight,e.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),zs=me((t,e)=>{if(ts(t.classes)!==ts(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var i in t.style)if(t.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;return!0},"canCombine"),m=me(t=>{for(var e=0;e<t.length-1;e++){var r=t[e],i=t[e+1];r instanceof ls&&i instanceof ls&&zs(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,t.splice(e+1,1),e--)}return t},"tryCombineChars"),Gs=me(function(t){for(var e=0,r=0,i=0,n=0;n<t.children.length;n++){var a=t.children[n];a.height>e&&(e=a.height),r<a.depth&&(r=a.depth),i<a.maxFontSize&&(i=a.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=i},"sizeElementFromChildren"),Us=me(function(t,e,r,i){return t=new ns(t,e,r,i),Gs(t),t},"makeSpan"),qs=me((t,e,r,i)=>new ns(t,e,r,i),"makeSvgSpan"),fc=me(function(t,e,r){return(t=Us([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Il=me(function(t,e,r,i){return t=new as(t,e,r,i),Gs(t),t},"makeAnchor"),js=me(function(t){return t=new Ga(t),Gs(t),t},"makeFragment"),f=me(function(t,e){return t instanceof Ga?Us([],[t],e):t},"wrapFragment"),Ws=me(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],i=-e[0].shift-e[0].elem.depth,n=i,a=1;a<e.length;a++){var s=-e[a].shift-n-e[a].elem.depth,o=s-(e[a-1].elem.height+e[a-1].elem.depth);n+=s,r.push({type:"kern",size:o}),r.push(e[a])}return{children:r,depth:i}}var l;if("top"===t.positionType){for(var c=t.positionData,h=0;h<t.children.length;h++){var u=t.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===t.positionType)l=-t.positionData;else{if("elem"!==(i=t.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===t.positionType)l=-i.elem.depth-t.positionData;else{if("firstBaseline"!==t.positionType)throw new Error("Invalid positionType "+t.positionType+".");l=-i.elem.depth}}return{children:t.children,depth:l}},"getVListChildrenAndDepth"),nc=me(function(t,e){for(var{children:r,depth:t}=Ws(t),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=Us(["pstrut"],[]);s.style.height=K(i);for(var o=[],l=t,c=t,h=t,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=Us(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)}(t=Us(["vlist"],o)).style.height=K(c);var m=l<0?(y=Us([],[]),(y=Us(["vlist"],[y])).style.height=K(-l),m=Us(["vlist-s"],[new ls("")]),[Us(["vlist-r"],[t,m]),Us(["vlist-r"],[y])]):[Us(["vlist-r"],[t])],y=Us(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),Bl=me((t,e)=>{var r=Us(["mspace"],[],e),t=Ja(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Ys=me(function(t,e,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}return i+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Hs={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"},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"}},Vs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ac=me(function(t,e){var[t,r,i]=Vs[t],t=new hs(t),t=new cs([t],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(t=qs(["overlay"],[t],e)).height=i,t.style.height=K(i),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Hs,makeSymbol:Fs,mathsym:gc,makeSpan:Us,makeSvgSpan:qs,makeLineSpan:fc,makeAnchor:Il,makeFragment:js,wrapFragment:f,makeVList:nc,makeOrd:Ol,makeGlue:Bl,staticSvg:ac,svgData:Vs,tryCombineChars:m},Xs={mord:{mop:y={number:3,unit:"mu"},mbin:gc={number:4,unit:"mu"},mrel:fc={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:fc,minner:y},mbin:{mord:gc,mop:gc,mopen:gc,minner:gc},mrel:{mord:fc,mop:fc,mopen:fc,minner:fc},mopen:{},mclose:{mop:y,mbin:gc,mrel:fc,minner:y},mpunct:{mord:y,mop:y,mrel:fc,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:gc,mrel:fc,mopen:y,mpunct:y,minner:y}},Ks={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Zs={},Qs={},Js={},me(l,"defineFunction"),me(jn,"defineFunctionBuilders"),to=me(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),eo=me(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),ro=Z.makeSpan,io=["leftmost","mbin","mopen","mrel","mop","mpunct"],no=["rightmost","mrel","mclose","mpunct"],ao={display:Sa.DISPLAY,text:Sa.TEXT,script:Sa.SCRIPT,scriptscript:Sa.SCRIPTSCRIPT},so={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},oo=me(function(t,e,r,i){void 0===i&&(i=[null,null]);for(var n,a,s=[],o=0;o<t.length;o++){var l,c=go(t[o],e);c instanceof Ga?(l=c.children,s.push(...l)):s.push(c)}return Z.tryCombineChars(s),r&&(n=e,1===t.length&&("sizing"===(a=t[0]).type?n=e.havingSize(a.size):"styling"===a.type&&(n=e.havingStyle(ao[a.style]))),a=ro([i[0]||"leftmost"],[],e),i=ro([i[1]||"rightmost"],[],e),lo(s,(t,e)=>{var r=e.classes[0],i=t.classes[0];"mbin"===r&&ya.contains(no,i)?e.classes[0]="mord":"mbin"===i&&ya.contains(io,r)&&(t.classes[0]="mord")},{node:a},i,r="root"===r),lo(s,(t,e)=>{var e=uo(e),r=uo(t);if(t=e&&r?(t.hasClass("mtight")?Ks:Xs)[e][r]:null)return Z.makeGlue(t,n)},{node:a},i,r)),s},"buildExpression"),lo=me(function t(r,e,i,n,a){n&&r.push(n);for(var s=0;s<r.length;s++){var o,l=r[s],c=co(l);c?t(c.children,e,i,null,a):((c=!l.hasClass("mspace"))&&(o=e(l,i.node))&&(i.insertAfter?i.insertAfter(o):(r.unshift(o),s++)),c?i.node=l:a&&l.hasClass("newline")&&(i.node=ro(["leftmost"])),i.insertAfter=(e=>t=>{r.splice(e+1,0,t),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),co=me(function(t){return t instanceof Ga||t instanceof as||t instanceof ns&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),ho=me(function t(e,r){var i=co(e);if(i&&(i=i.children).length){if("right"===r)return t(i[i.length-1],"right");if("left"===r)return t(i[0],"left")}return e},"getOutermostNode"),uo=me(function(t,e){return t&&(e&&(t=ho(t,e)),so[t.classes[0]])||null},"getTypeOfDomTree"),po=me(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),ro(e.concat(t))},"makeNullDelimiter"),go=me(function(t,e,r){if(!t)return ro();var i;if(Qs[t.type])return i=Qs[t.type](t,e),r&&e.size!==r.size&&(i=ro(e.sizingClasses(r),[i],e),e=e.sizeMultiplier/r.sizeMultiplier,i.height*=e,i.depth*=e),i;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(Wn,"buildHTMLUnbreakable"),me(Yn,"buildHTML"),me(Hn,"newDocumentFragment"),fo=class{static{me(this,"MathNode")}constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);0<this.classes.length&&(e.className=ts(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var t,e="<"+this.type;for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=ya.escape(this.attributes[t]),e+='"');0<this.classes.length&&(e+=' class ="'+ya.escape(ts(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+("</"+this.type)+">"}toText(){return this.children.map(t=>t.toText()).join("")}},mo=class{static{me(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return ya.escape(this.toText())}toText(){return this.text}},Il=class{static{me(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=.05555<=t&&t<=.05556?"":.1666<=t&&t<=.1667?"":.2222<=t&&t<=.2223?"":.2777<=t&&t<=.2778?"":-.05556<=t&&t<=-.05555?"":-.1667<=t&&t<=-.1666?"":-.2223<=t&&t<=-.2222?"":-.2778<=t&&t<=-.2777?"":null}toNode(){var t;return this.character?document.createTextNode(this.character):((t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),t)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+K(this.width)+'"/>'}toText(){return this.character||" "}},E={MathNode:fo,TextNode:mo,SpaceNode:Il,newDocumentFragment:Hn},yo=me(function(t,e,r){return!gs[e][t]||!gs[e][t].replace||55349===t.charCodeAt(0)||ms.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=gs[e][t].replace),new E.TextNode(t)},"makeText"),vo=me(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),xo=me(function(t,e){var r;return"texttt"===e.fontFamily?"monospace":"textsf"===e.fontFamily?"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif":"textit"===e.fontShape&&"textbf"===e.fontWeight?"bold-italic":"textit"===e.fontShape?"italic":"textbf"===e.fontWeight?"bold":(e=e.font)&&"mathnormal"!==e?(r=t.mode,"mathit"===e?"italic":"boldsymbol"===e?"textord"===t.type?"bold":"bold-italic":"mathbf"===e?"bold":"mathbb"===e?"double-struck":"mathfrak"===e?"fraktur":"mathscr"===e||"mathcal"===e?"script":"mathsf"===e?"sans-serif":"mathtt"===e?"monospace":!ya.contains(["\\imath","\\jmath"],t=t.text)&&zn(t=gs[r][t]&&gs[r][t].replace?gs[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),bo=me(function(t,e,r){var i;if(1===t.length)return i=ko(t[0],e),r&&i instanceof fo&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var n,a=[],s=0;s<t.length;s++){var o,l=ko(t[s],e);if(l instanceof fo&&n instanceof fo){if("mtext"===l.type&&"mtext"===n.type&&l.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...l.children);continue}if("mn"===l.type&&"mn"===n.type){n.children.push(...l.children);continue}if("mi"===l.type&&1===l.children.length&&"mn"===n.type){var c=l.children[0];if(c instanceof mo&&"."===c.text){n.children.push(...l.children);continue}}else"mi"===n.type&&1===n.children.length&&(c=n.children[0])instanceof mo&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)&&(o=l.children[0])instanceof mo&&0<o.text.length&&(o.text=o.text.slice(0,1)+"̸"+o.text.slice(1),a.pop())}a.push(l),n=l}return a},"buildExpression"),wo=me(function(t,e,r){return vo(bo(t,e,r))},"buildExpressionRow"),ko=me(function(t,e){if(!t)return new E.MathNode("mrow");if(Js[t.type])return Js[t.type](t,e);throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(Vn,"buildMathML"),To=me(function(t){return new Xa({style:t.displayMode?Sa.DISPLAY:Sa.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},"optionsFromSettings"),Eo=me(function(t,e){var r;return e.displayMode&&(r=["katex-display"],e.leqno&&r.push("leqno"),e.fleqn&&r.push("fleqn"),t=Z.makeSpan(r,[t])),t},"displayWrap"),Co=me(function(t,e,r){var i,n=To(r);return"mathml"===r.output?Vn(t,e,n,r.displayMode,!0):(t="html"===r.output?(i=Yn(t,n),Z.makeSpan(["katex"],[i])):(i=Vn(t,e,n,r.displayMode,!1),e=Yn(t,n),Z.makeSpan(["katex"],[i,e])),Eo(t,r))},"buildTree"),_o=me(function(t,e,r){return t=Yn(t,To(r)),t=Z.makeSpan(["katex"],[t]),Eo(t,r)},"buildHTMLTree"),So={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":"="},f=me(function(t){return(t=new E.MathNode("mo",[new E.TextNode(So[t.replace(/^\\/,"")])])).setAttribute("stretchy","true"),t},"mathMLnode"),Ao={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]},Lo=me(function(t){return"ordgroup"===t.type?t.body.length:1},"groupLength"),nc=me(function(f,m){function t(){var t,e,r=4e5,i=f.label.slice(1);if(ya.contains(["widehat","widecheck","widetilde","utilde"],i))return e=5<(e=Lo(f.base))?"widehat"===i||"widecheck"===i?(a=420,r=2364,t=.42,i+"4"):(a=312,r=2340,t=.34,"tilde4"):(e=[1,1,2,2,3,3][e],"widehat"===i||"widecheck"===i?(r=[0,1062,2364,2364,2364][e],a=[0,239,300,360,420][e],t=[0,.24,.3,.3,.36,.42][e],i+e):(r=[0,600,1033,2339,2340][e],a=[0,260,286,306,312][e],t=[0,.26,.286,.3,.306,.34][e],"tilde"+e)),e=new hs(e),e=new cs([e],{width:"100%",height:K(t),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[e],m),minWidth:0,height:t};var n=[],a=Ao[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 hs(s[p]),g=new cs([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}}me(t,"buildSvgSpan_");var{span:e,minWidth:r,height:i}=t();return e.height=i,e.style.height=K(i),0<r&&(e.style.minWidth=K(r)),e},"svgSpan"),Ol=me(function(t,e,r,i,n){var a,t=t.height+t.depth+r+i;return/fbox|color|angl/.test(e)?(a=Z.makeSpan(["stretchy",e],[],n),"fbox"===e&&(r=n.color&&n.getColor())&&(a.style.borderColor=r)):(i=[],/^[bx]cancel$/.test(e)&&i.push(new us({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&i.push(new us({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new cs(i,{width:"100%",height:K(t)}),a=Z.makeSvgSpan([],[r],n)),a.height=t,a.style.height=K(t),a},"encloseSpan"),No={encloseSpan:Ol,mathMLnode:f,svgSpan:nc},me(Xn,"assertNodeType"),me(Kn,"assertSymbolNodeType"),me(Zn,"checkSymbolNodeType"),Io=me((t,e)=>{t&&"supsub"===t.type?(o=(r=Xn(t.base,"accent")).base,t.base=o,i=qn(go(t,e)),t.base=r):o=(r=Xn(t,"accent")).base;var r,i,n,a,t=go(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&ya.isCharacterBox(o)&&(o=ya.getBaseElem(o),s=Un(go(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=No.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+K(2*s)+")",marginLeft:K(2*s)}:void 0}]},e)):("\\vec"===r.label?(a=Z.staticSvg("vec",e),n=Z.svgData.vec[1]):((a=Un(a=Z.makeOrd({mode:r.mode,text:r.label},e,"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=t.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:t},{type:"kern",size:-l},{type:"elem",elem:c}]},e)),s=Z.makeSpan(["mord","accent"],[c],e);return i?(i.children[0]=s,i.height=Math.max(s.height,i.height),i.classes[0]="mord",i):s},"htmlBuilder$a"),Bl=me((t,e)=>{var r=t.isStretchy?No.mathMLnode(t.label):new E.MathNode("mo",[yo(t.label,t.mode)]);return(t=new E.MathNode("mover",[ko(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Ro=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|")),l({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:me((t,e)=>{var e=to(e[0]),r=!Ro.test(t.funcName),i=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:i,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bl}),l({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:me((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bl}),l({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:me((t,e)=>{var r=go(t.base,e),i=No.svgSpan(t,e),t="\\utilde"===t.label?.12:0,i=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[i],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=No.mathMLnode(t.label);return(t=new E.MathNode("munder",[ko(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Mo=me(t=>((t=new E.MathNode("mpadded",t?[t]:[])).setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t),"paddedNode"),l({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(t,e,r){var{parser:t,funcName:i}=t;return{type:"xArrow",mode:t.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,i=e.style,n=e.havingStyle(i.sup()),a=Z.wrapFragment(go(t.body,n,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",i=(a.classes.push(s+"-arrow-pad"),t.below&&(n=e.havingStyle(i.sub()),(r=Z.wrapFragment(go(t.below,n,e),e)).classes.push(s+"-arrow-pad")),No.svgSpan(t,e)),n=-e.fontMetrics().axisHeight+.5*i.height,s=-e.fontMetrics().axisHeight-.5*i.height-.111;return(.25<a.depth||"\\xleftequilibrium"===t.label)&&(s-=a.depth),(r=r?(t=-e.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:t}]},e)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:i,shift:n}]},e)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],e)},mathmlBuilder(t,e){var r,i,n=No.mathMLnode(t.label);return n.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body?(r=Mo(ko(t.body,e)),t.below?(i=Mo(ko(t.below,e)),new E.MathNode("munderover",[n,i,r])):new E.MathNode("mover",[n,r])):t.below?(i=Mo(ko(t.below,e)),new E.MathNode("munder",[n,i])):(r=Mo(),new E.MathNode("mover",[n,r]))}}),Do=Z.makeSpan,me(Qn,"htmlBuilder$9"),me(Jn,"mathmlBuilder$8"),l({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:eo(e),isCharacterBox:ya.isCharacterBox(e)}},htmlBuilder:Qn,mathmlBuilder:Jn}),Oo=me(t=>"atom"!==(t="ordgroup"===t.type&&t.body.length?t.body[0]:t).type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family,"binrelClass"),l({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){return{type:"mclass",mode:(t=t.parser).mode,mclass:Oo(e[0]),body:eo(e[1]),isCharacterBox:ya.isCharacterBox(e[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,i=e[1],e=e[0],n="\\stackrel"!==r?Oo(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:eo(i)},i={type:"supsub",mode:e.mode,base:i,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:n,body:[i],isCharacterBox:ya.isCharacterBox(i)}},htmlBuilder:Qn,mathmlBuilder:Jn}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:Oo(e[0]),body:eo(e[0])}},htmlBuilder(t,e){var r=oo(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=bo(t.body,e),(e=new E.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),Po={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Bo=me(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Fo=me(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),$o=me((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),me(ta,"cdArrow"),me(ea,"parseCD"),l({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup());return(r=Z.wrapFragment(go(t.label,r,e),e)).classes.push("cd-label-"+t.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){return e=new E.MathNode("mrow",[ko(t.label,e)]),(e=new E.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new E.MathNode("mstyle",[e])).setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}}),l({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){return{type:"cdlabelparent",mode:(t=t.parser).mode,fragment:e[0]}},htmlBuilder(t,e){return(t=Z.wrapFragment(go(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new E.MathNode("mrow",[ko(t.fragment,e)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Xn(e[0],"ordgroup").body,i="",n=0;n<r.length;n++)i+=Xn(r[n],"textord").text;if(e=parseInt(i),isNaN(e))throw new X("\\@char has non-numeric argument "+i);if(e<0||1114111<=e)throw new X("\\@char with invalid code point "+i);return e=e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),ac=me((t,e)=>(e=oo(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=me((t,e)=>(e=bo(t.body,e.withColor(t.color)),(e=new E.MathNode("mstyle",e)).setAttribute("mathcolor",t.color),e),"mathmlBuilder$7"),l({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var t=t.parser,r=Xn(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:eo(e[1])}},htmlBuilder:ac,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Xn(e[0],"color-token").color,r=(t.gullet.macros.set("\\current@color",e),t.parseExpression(!0,r));return{type:"color",mode:t.mode,color:e,body:r}},htmlBuilder:ac,mathmlBuilder:m}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var i="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,n=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:n,size:i&&Xn(i,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(Ja(t.size,e))),r},mathmlBuilder(t,e){var r=new E.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(Ja(t.size,e))),r}}),zo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Go=me(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),Uo=me(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),qo=me((t,e,r,i)=>{var n=t.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,n,i)},"letCommand"),l({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:t,funcName:e}=t,r=(t.consumeSpaces(),t.fetch());if(zo[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=zo[r.text]),Xn(t.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),l({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:t}=t,r=e.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new X("Expected a control sequence",r);for(var n,a=0,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){n=e.gullet.future(),s[a].push("{");break}if(r=e.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=e.gullet.consumeArg().tokens;return n&&o.unshift(n),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},t===zo[t]),{type:"internal",mode:e.mode}}}),l({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Go(t.gullet.popToken()),i=(t.gullet.consumeSpaces(),Uo(t));return qo(t,r,i,"\\\\globallet"===e),{type:"internal",mode:t.mode}}}),l({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Go(t.gullet.popToken()),i=t.gullet.popToken(),n=t.gullet.popToken();return qo(t,r,n,"\\\\globalfuture"===e),t.gullet.pushToken(n),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}}),jo=me(function(t,e,r){if(r=zn(gs.math[t]&&gs.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),Wo=me(function(t,e,r,i){return e=r.havingBaseStyle(e),i=Z.makeSpan(i.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,i.height*=t,i.depth*=t,i.maxFontSize=e.sizeMultiplier,i},"styleWrap"),Yo=me(function(t,e,r){r=e.havingBaseStyle(r),r=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight,t.classes.push("delimcenter"),t.style.top=K(r),t.height-=r,t.depth+=r},"centerSpan"),Ho=me(function(t,e,r,i,n,a){return t=Z.makeSymbol(t,"Main-Regular",n,i),n=Wo(t,e,i,a),r&&Yo(n,i,e),n},"makeSmallDelim"),Vo=me(function(t,e,r,i){return Z.makeSymbol(t,"Size"+e+"-Regular",r,i)},"mathrmSize"),Xo=me(function(t,e,r,i,n,a){return t=Vo(t,e,n,i),n=Wo(Z.makeSpan(["delimsizing","size"+e],[t],i),Sa.TEXT,i,a),r&&Yo(n,i,Sa.TEXT),n},"makeLargeDelim"),Ko=me(function(t,e,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(t,e,r)])])}},"makeGlyphSpan"),Zo=me(function(t,e,r){var i=(Ua["Size4-Regular"][t.charCodeAt(0)]?Ua["Size4-Regular"]:Ua["Size1-Regular"])[t.charCodeAt(0)][4],t=new hs("inner",Fa(t,Math.round(1e3*e))),t=new cs([t],{width:K(i),height:K(e),style:"width:"+K(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(i),{type:"elem",elem:t}},"makeInner"),Qo={type:"kern",size:-.008},Jo=["|","\\lvert","\\rvert","\\vert"],tl=["\\|","\\lVert","\\rVert","\\Vert"],el=me(function(t,e,r,i,n,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):ya.contains(Jo,t)?(s="",c="vert",h=333):ya.contains(tl,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=jo(u,p,n)).height+t.depth),g=(g=jo(s,p,n)).height+g.depth,f=(f=jo(o,p,n)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=jo(d,p,n)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=i.fontMetrics().axisHeight,y=(r&&(v*=i.sizeMultiplier),e/2-v),g=[],v=(0<c.length?(r=e-t-f,v=Math.round(1e3*e),r=za(c,Math.round(1e3*r)),c=new hs(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new cs([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(Ko(o,p,n)),g.push(Qo),null===d?g.push(Zo(s,e-t-f+.016,i)):(g.push(Zo(s,c=(e-t-f-m)/2+.016,i)),g.push(Qo),g.push(Ko(d,p,n)),g.push(Qo),g.push(Zo(s,c,i))),g.push(Qo),g.push(Ko(u,p,n))),i.havingBaseStyle(Sa.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return Wo(Z.makeSpan(["delimsizing","mult"],[r],v),Sa.TEXT,i,a)},"makeStackedDelim"),rl=me(function(t,e,r,i,n){return i=Ba(t,i,r),t=new hs(t,i),i=new cs([t],{width:"400em",height:K(e),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[i],n)},"sqrtSvg"),gc=me(function(t,e){var r,i=e.havingBaseSizing(),n=ul("\\surd",t*i.sizeMultiplier,cl,i),i=i.sizeMultiplier,a=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),s=0,o=0,l=0,n="small"===n.type?(t<1?i=1:t<1.4&&(i=.7),o=(1+a)/i,(r=rl("sqrtMain",s=(1+a+.08)/i,l=1e3+1e3*a+80,a,e)).style.minWidth="0.853em",.833/i):"large"===n.type?(l=1080*sl[n.size],o=(sl[n.size]+a)/i,s=(sl[n.size]+a+.08)/i,(r=rl("sqrtSize"+n.size,s,l,a,e)).style.minWidth="1.02em",1/i):(s=t+a+.08,o=t+a,l=Math.floor(1e3*t+a)+80,(r=rl("sqrtTall",s,l,a,e)).style.minWidth="0.742em",1.056);return r.height=o,r.style.height=K(s),{span:r,advanceWidth:n,ruleWidth:(e.fontMetrics().sqrtRuleThickness+a)*i}},"makeSqrtImage"),il=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],nl=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],al=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],sl=[0,1.2,1.8,2.4,3],fc=me(function(t,e,r,i,n){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),ya.contains(il,t)||ya.contains(al,t))return Xo(t,e,!1,r,i,n);if(ya.contains(nl,t))return el(t,sl[e],!1,r,i,n);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ol=[{type:"small",style:Sa.SCRIPTSCRIPT},{type:"small",style:Sa.SCRIPT},{type:"small",style:Sa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ll=[{type:"small",style:Sa.SCRIPTSCRIPT},{type:"small",style:Sa.SCRIPT},{type:"small",style:Sa.TEXT},{type:"stack"}],cl=[{type:"small",style:Sa.SCRIPTSCRIPT},{type:"small",style:Sa.SCRIPT},{type:"small",style:Sa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],hl=me(function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},"delimTypeToFont"),ul=me(function(t,e,r,i){for(var n=Math.min(2,3-i.style.size);n<r.length&&"stack"!==r[n].type;n++){var a=(a=jo(t,hl(r[n]),"math")).height+a.depth;if("small"===r[n].type&&(a*=i.havingBaseStyle(r[n].style).sizeMultiplier),e<a)return r[n]}return r[r.length-1]},"traverseSequence"),dl=me(function(t,e,r,i,n,a){"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=ya.contains(al,t)?ol:ya.contains(il,t)?cl:ll;return"small"===(s=ul(t,e,s,i)).type?Ho(t,s.style,r,i,n,a):"large"===s.type?Xo(t,s.size,r,i,n,a):el(t,e,r,i,n,a)},"makeCustomSizedDelim"),y=me(function(t,e,r,i,n,a){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=5/i.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return dl(t,r,!0,i,n,a)},"makeLeftRightDelim"),pl={sqrtImage:gc,sizedDelim:fc,sizeToMaxHeight:sl,customSizedDelim:dl,leftRightDelim:y},gl={"\\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}},fl=["(","\\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","."],me(ra,"checkDelimiter"),l({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:me((t,e)=>(e=ra(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:gl[t.funcName].size,mclass:gl[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:me((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):pl.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:me(t=>{var e=[],e=("."!==t.delim&&e.push(yo(t.delim,t.mode)),new E.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(pl.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),me(ia,"assertParsed"),l({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var r=t.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:t.parser.mode,delim:ra(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var e=ra(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),i=(--t.leftrightDepth,t.expect("\\right",!1),Xn(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:i.delim,rightColor:i.color}},"handler"),htmlBuilder:me((t,e)=>{ia(t);for(var r,i=oo(t.body,e,!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*=e.sizeMultiplier,a*=e.sizeMultiplier,r="."===t.left?po(e,["mopen"]):pl.leftRightDelim(t.left,n,a,e,t.mode,["mopen"]),i.unshift(r),s)for(var l=1;l<i.length;l++){var c=i[l].isMiddle;c&&(i[l]=pl.leftRightDelim(c.delim,n,a,c.options,t.mode,[]))}return r="."===t.right?po(e,["mclose"]):(r=t.rightColor?e.withColor(t.rightColor):e,pl.leftRightDelim(t.right,n,a,r,t.mode,["mclose"])),i.push(r),Z.makeSpan(["minner"],i,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{ia(t);var r,e=bo(t.body,e);return"."!==t.left&&((r=new E.MathNode("mo",[yo(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new E.MathNode("mo",[yo(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),vo(e)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{if(e=ra(e[0],t),t.parser.leftrightDepth)return{type:"middle",mode:t.parser.mode,delim:e.text};throw new X("\\middle without preceding \\left",e)},"handler"),htmlBuilder:me((t,e)=>{var r;return"."===t.delim?r=po(e,[]):(r=pl.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t="\\vert"===t.delim||"|"===t.delim?yo("|","text"):yo(t.delim,t.mode),(t=new E.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),Il=me((t,e)=>{var r,i,n,a,s,o=Z.wrapFragment(go(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=ya.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=Ja({number:.6,unit:"pt"},e),s=Ja({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,i=o.height+o.depth+a+s,o.style.paddingLeft=K(i/2+a),c=Math.floor(1e3*i*c),n=Oa(c),n=new cs([new hs("phase",n)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[n],e)).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(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:i)):"angl"===l?(c=4*(i=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=No.encloseSpan(o,l,c,n,e),/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,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(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}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),Ol=me((t,e)=>{var r=new E.MathNode(-1<t.label.indexOf("colorbox")?"mpadded":"menclose",[ko(t.body,e)]);switch(t.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=e.fontMetrics().fboxsep*e.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"===t.label&&(i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),r.setAttribute("style","border: "+i+"em solid "+String(t.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r},"mathmlBuilder$6"),l({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:t,funcName:i}=t,n=Xn(e[0],"color-token").color;return{type:"enclose",mode:t.mode,label:i,backgroundColor:n,body:e[1]}},htmlBuilder:Il,mathmlBuilder:Ol}),l({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:t,funcName:i}=t,n=Xn(e[0],"color-token").color,a=Xn(e[1],"color-token").color;return{type:"enclose",mode:t.mode,label:i,backgroundColor:a,borderColor:n,body:e[2]}},htmlBuilder:Il,mathmlBuilder:Ol}),l({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){return{type:"enclose",mode:(t=t.parser).mode,label:"\\fbox",body:e[0]}}}),l({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"enclose",mode:t.mode,label:r,body:e}},htmlBuilder:Il,mathmlBuilder:Ol}),l({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){return{type:"enclose",mode:(t=t.parser).mode,label:"\\angl",body:e[0]}}}),ml={},me(na,"defineEnvironment"),yl={},me(h,"defineMacro"),me(aa,"getHLines"),vl=me(t=>{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),me(sa,"getAutoTag"),me(oa,"parseArray"),me(la,"dCellStyle"),f=me(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,i=0,n=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Sa.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?Ja({number:3,unit:"ex"},e):12*o),B=3*o,F=.7*(o=t.arraystretch*c),$=.3*o,h=0;function u(t){for(var e=0;e<t.length;++e)0<e&&(h+=.25),a.push({pos:h,isDashed:t[e]})}for(me(u,"setHLinePos"),u(P[0]),M=0;M<t.body.length;++M){for(var d=t.body[M],p=F,g=$,f=(i<d.length&&(i=d.length),new Array(d.length)),m=0;m<d.length;++m){var y=go(d[m],e);g<y.depth&&(g=y.depth),p<y.height&&(p=y.height),f[m]=y}var z=t.rowGaps[M],v=0;z&&0<(v=Ja(z,e))&&(g<(v+=$)&&(g=v),v=0),t.addJot&&(g+=B),f.height=p,f.depth=g,h+=p,f.pos=h,h+=g+v,n[M]=f,u(P[M+1])}var x,b,w=h/2+e.fontMetrics().axisHeight,k=t.cols||[],T=[],E=[];if(t.tags&&t.tags.some(t=>t))for(M=0;M<r;++M){var C=n[M],G=C.pos-w,_=t.tags[M],S=void 0;(S=!0===_?Z.makeSpan(["eqn-num"],[],e):!1===_?Z.makeSpan([],[],e):Z.makeSpan([],oo(_,e,!0),e)).depth=C.depth,S.height=C.height,E.push({type:"elem",elem:S,shift:G})}for(b=m=0;m<i||b<k.length;++m,++b){for(var A=k[b]||{},U=!0;"separator"===A.type;){if(U||((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(e.fontMetrics().doubleRuleSep),T.push(x)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var L="|"===A.separator?"solid":"dashed",N=Z.makeSpan(["vertical-separator"],[],e);N.style.height=K(h),N.style.borderRightWidth=K(s),N.style.borderRightStyle=L,N.style.margin="0 "+K(-s/2),(L=h-w)&&(N.style.verticalAlign=K(-L)),T.push(N),A=k[++b]||{},U=!1}if(!(i<=m)){for(var I=void 0,R=((0<m||t.hskipBeforeAndAfter)&&0!==(I=ya.deflt(A.pregap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x)),[]),M=0;M<r;++M){var q,D=n[M],O=D[m];O&&(q=D.pos-w,O.depth=D.depth,O.height=D.height,R.push({type:"elem",elem:O,shift:q}))}R=Z.makeVList({positionType:"individualShift",children:R},e),R=Z.makeSpan(["col-align-"+(A.align||"c")],[R]),T.push(R),(m<i-1||t.hskipBeforeAndAfter)&&0!==(I=ya.deflt(A.postgap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x))}}if(n=Z.makeSpan(["mtable"],T),0<a.length){for(var j=Z.makeLineSpan("hline",e,s),W=Z.makeLineSpan("hdashline",e,s),Y=[{type:"elem",elem:n,shift:0}];0<a.length;){var H=a.pop(),V=H.pos-w;Y.push(H.isDashed?{type:"elem",elem:W,shift:V}:{type:"elem",elem:j,shift:V})}n=Z.makeVList({positionType:"individualShift",children:Y},e)}return 0===E.length?Z.makeSpan(["mord"],[n],e):(c=Z.makeVList({positionType:"individualShift",children:E},e),c=Z.makeSpan(["tag"],[c],e),Z.makeFragment([n,c]))},"htmlBuilder"),xl={c:"center ",l:"left ",r:"right "},nc=me(function(t,e){for(var r=[],i=new E.MathNode("mtd",[],["mtr-glue"]),n=new E.MathNode("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var s=t.body[a],o=[],l=0;l<s.length;l++)o.push(new E.MathNode("mtd",[ko(s[l],e)]));t.tags&&t.tags[a]&&(o.unshift(i),o.push(i),t.leqno?o.unshift(n):o.push(n)),r.push(new E.MathNode("mtr",o))}var c=new E.MathNode("mtable",r),h=.5===t.arraystretch?.1:.16+t.arraystretch-1+(t.addJot?.09:0),h=(c.setAttribute("rowspacing",K(h)),""),u="";if(t.cols&&0<t.cols.length){var d=t.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+=xl[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"===t.colSeparationType){for(var v=t.cols||[],x="",b=1;b<v.length;b++)x+=b%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===t.colSeparationType||"gather"===t.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===t.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===t.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");for(var w="",k=t.hLinesBeforeRow,h=(h+=0<k[0].length?"left ":"")+(0<k[k.length-1].length?"right ":""),T=1;T<k.length-1;T++)w+=0===k[T].length?"none ":k[T][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==h&&(c=new E.MathNode("menclose",[c])).setAttribute("notation",h.trim()),t.arraystretch&&t.arraystretch<1&&(c=new E.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},"mathmlBuilder"),Bl=me(function(t,e){-1===t.envName.indexOf("ed")&&vl(t);var n,r=[],i=-1<t.envName.indexOf("at")?"alignat":"align",a="split"===t.envName,i=oa(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:sa(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),s=0,o={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var l="",c=0;c<e[0].body.length;c++)l+=Xn(e[0].body[c],"textord").text;n=Number(l),s=2*n}var h=!s;i.body.forEach(function(t){for(var e=1;e<t.length;e+=2){var r=Xn(t[e],"styling");Xn(r.body[0],"ordgroup").body.unshift(o)}if(h)s<t.length&&(s=t.length);else{var i=t.length/2;if(n<i)throw new X("Too many math in a row: expected "+n+", but got "+i,t[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"),na({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){return e={cols:e=(Zn(e[0])?[e[0]]:Xn(e[0],"ordgroup").body).map(function(t){var e=Kn(t).text;if(-1!=="lcr".indexOf(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new X("Unknown column alignment: "+e,t)}),hskipBeforeAndAfter:!0,maxNumCols:e.length},oa(t.parser,e,la(t.envName))},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===t.envName.charAt(t.envName.length-1)){var n=t.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=oa(t.parser,i,la(t.envName)),i=Math.max(0,...n.body.map(t=>t.length)),n.cols=new Array(i).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[n],left:e[0],right:e[1],rightColor:void 0}:n},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=oa(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Zn(e[0])?[e[0]]:Xn(e[0],"ordgroup").body).map(function(t){var e=Kn(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new X("Unknown column alignment: "+e,t)})).length)throw new X("{subarray} can contain only one column");if(0<(t=oa(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<t.body[0].length)throw new X("{subarray} can contain only one column");return t},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=oa(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},la(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:-1<t.envName.indexOf("r")?".":"\\{",right:-1<t.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Bl,htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){ya.contains(["gather","gather*"],t.envName)&&vl(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:sa(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return oa(t.parser,e,"display")},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Bl,htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){vl(t);var e={autoTag:sa(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return oa(t.parser,e,"display")},htmlBuilder:f,mathmlBuilder:nc}),na({type:"array",names:["CD"],props:{numArgs:0},handler(t){return vl(t),ea(t.parser)},htmlBuilder:f,mathmlBuilder:nc}),h("\\nonumber","\\gdef\\@eqnsw{0}"),h("\\notag","\\nonumber"),l({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new X(t.funcName+" valid only within array environment")}}),bl=ml,l({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:t,funcName:r}=t,i=e[0];if("ordgroup"!==i.type)throw new X("Invalid environment name",i);for(var n="",a=0;a<i.body.length;++a)n+=Xn(i.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:t.mode,name:n,nameGroup:i};if(!bl.hasOwnProperty(n))throw new X("No such environment: "+n,i);var e=bl[n],{args:r,optArgs:s}=t.parseArguments("\\begin{"+n+"}",e),o={mode:t.mode,envName:n,parser:t},e=e.handler(o,r,s),o=(t.expect("\\end",!1),t.nextToken);if((r=Xn(t.parseFunction(),"environment")).name!==n)throw new X("Mismatch: \\begin{"+n+"} matched by \\end{"+r.name+"}",o);return e}}),ac=me((t,e)=>{var r=t.font,e=e.withFont(r);return go(t.body,e)},"htmlBuilder$5"),m=me((t,e)=>{var r=t.font,e=e.withFont(r);return ko(t.body,e)},"mathmlBuilder$4"),wl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},l({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=to(e[0]);return{type:"font",mode:t.mode,font:(r=r in wl?wl[r]:r).slice(1),body:e}},"handler"),htmlBuilder:ac,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:me((t,e)=>{var t=t.parser,e=e[0],r=ya.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:Oo(e),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:e}],isCharacterBox:r}},"handler")}),l({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:i}=t,n=t.mode,i=t.parseExpression(!0,i);return{type:"font",mode:n,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:i}}},"handler"),htmlBuilder:ac,mathmlBuilder:m}),kl=me((t,e)=>("display"===t?e=e.id>=Sa.SCRIPT.id?e.text():Sa.DISPLAY:"text"===t&&e.size===Sa.DISPLAY.size?e=Sa.TEXT:"script"===t?e=Sa.SCRIPT:"scriptscript"===t&&(e=Sa.SCRIPTSCRIPT),e),"adjustStyle"),gc=me((t,e)=>{var r,i,n,a,s=kl(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=go(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height<h?h:c.height,c.depth=c.depth<u?u:c.depth),o=e.havingStyle(l),go(t.denom,o,e)),u=t.hasBarLine?(i=(a=t.barSize?(i=Ja(t.barSize,e),Z.makeLineSpan("frac-line",e,i)):Z.makeLineSpan("frac-line",e)).height,a.height):(a=null,i=0,e.fontMetrics().defaultRuleThickness),l=s.size===Sa.DISPLAY.size||"display"===t.size?(r=e.fontMetrics().num1,n=0<i?3*u:7*u,e.fontMetrics().denom1):(n=0<i?(r=e.fontMetrics().num2,u):(r=e.fontMetrics().num3,3*u),e.fontMetrics().denom2),u=a?(u=e.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}]},e)):((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}]},e));return o=e.havingStyle(s),u.height*=o.sizeMultiplier/e.sizeMultiplier,u.depth*=o.sizeMultiplier/e.sizeMultiplier,i=s.size===Sa.DISPLAY.size?e.fontMetrics().delim1:(s.size===Sa.SCRIPTSCRIPT.size?e.havingStyle(Sa.SCRIPT):e).fontMetrics().delim2,n=null==t.leftDelim?po(e,["mopen"]):pl.customSizedDelim(t.leftDelim,i,!0,e.havingStyle(s),t.mode,["mopen"]),a=t.continued?Z.makeSpan([]):null==t.rightDelim?po(e,["mclose"]):pl.customSizedDelim(t.rightDelim,i,!0,e.havingStyle(s),t.mode,["mclose"]),Z.makeSpan(["mord"].concat(o.sizingClasses(e)),[n,Z.makeSpan(["mfrac"],[u]),a],e)},"htmlBuilder$4"),fc=me((t,e)=>{var r=new E.MathNode("mfrac",[ko(t.numer,e),ko(t.denom,e)]),i=(t.hasBarLine?t.barSize&&(i=Ja(t.barSize,e),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),kl(t.size,e.style));return i.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=i.size===Sa.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(i=[],null!=t.leftDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(e)),i.push(r),null!=t.rightDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(e)),vo(i)):r},"mathmlBuilder$3"),l({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:me((t,e)=>{var r,{parser:t,funcName:i}=t,n=e[0],e=e[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:t.mode,continued:!1,numer:n,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:gc,mathmlBuilder:fc}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:me((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),l({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:t,funcName:r,token:i}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:e,token:i}}}),Tl=["display","text","script","scriptscript"],El=me(function(t){var e=null;return 0<t.length?"."===(e=t)?null:t:e},"delimFromValue"),l({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var r,t=t.parser,i=e[4],n=e[5],a="atom"===(a=to(e[0])).type&&"open"===a.family?El(a.text):null,s="atom"===(s=to(e[1])).type&&"close"===s.family?El(s.text):null,o=null,l=!!(l=Xn(e[2],"size")).isBlank||0<(o=l.value).number,c="auto";return"ordgroup"===(e=e[3]).type?0<e.body.length&&(r=Xn(e.body[0],"textord"),c=Tl[Number(r.text)]):(e=Xn(e,"textord"),c=Tl[Number(e.text)]),{type:"genfrac",mode:t.mode,numer:i,denom:n,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:c}},htmlBuilder:gc,mathmlBuilder:fc}),l({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:t,token:r}=t;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Xn(e[0],"size").value,token:r}}}),l({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:me((t,e)=>{var t=t.parser,r=e[0],i=ma(Xn(e[1],"infix").size),e=e[2],n=0<i.number;return{type:"genfrac",mode:t.mode,numer:r,denom:e,continued:!1,hasBarLine:n,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:gc,mathmlBuilder:fc}),Cl=me((t,e)=>{var r,i,n=e.style,n="supsub"===t.type?(r=t.sup?go(t.sup,e.havingStyle(n.sup()),e):go(t.sub,e.havingStyle(n.sub()),e),Xn(t.base,"horizBrace")):Xn(t,"horizBrace"),t=go(n.base,e.havingBaseStyle(Sa.DISPLAY)),a=No.svgSpan(n,e);return(n.isOver?(i=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(i=Z.makeVList({positionType:"bottom",positionData:t.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:t}]},e)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],e),i=n.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):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}]},e)),Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],e)},"htmlBuilder$3"),y=me((t,e)=>{var r=No.mathMLnode(t.label);return new E.MathNode(t.isOver?"mover":"munder",[ko(t.base,e),r])},"mathmlBuilder$2"),l({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:Cl,mathmlBuilder:y}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=e[1],e=Xn(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:eo(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:me((t,e)=>{var r=oo(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>((e=(e=wo(t.body,e))instanceof fo?e:new fo("mrow",[e])).setAttribute("href",t.href),e),"mathmlBuilder")}),l({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=Xn(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.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 e={type:"text",mode:t.mode,font:"\\texttt",body:i},{type:"href",mode:t.mode,href:r,body:eo(e)}},"handler")}),l({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){return{type:"hbox",mode:(t=t.parser).mode,body:eo(e[0])}},htmlBuilder(t,e){return t=oo(t.body,e,!1),Z.makeFragment(t)},mathmlBuilder(t,e){return new E.MathNode("mrow",bo(t.body,e))}}),l({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,i=Xn(e[0],"raw").string,e=e[1];t.settings.strict&&t.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 t.settings.isTrusted(n)?{type:"html",mode:t.mode,attributes:a,body:eo(e)}:t.formatUnsupportedCmd(r)},"handler"),htmlBuilder:me((t,e)=>{var r,i=oo(t.body,e,!1),n=["enclosing"],a=(t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(n,i,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:me((t,e)=>wo(t.body,e),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:me((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:eo(e[0]),mathml:eo(e[1])}),"handler"),htmlBuilder:me((t,e)=>(t=oo(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>wo(t.mathml,e),"mathmlBuilder")}),_l=me(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new X("Invalid size: '"+t+"' in \\includegraphics");if(t={number:+(e[1]+e[2]),unit:e[3]},Qa(t))return t;throw new X("Invalid unit: '"+t.unit+"' in \\includegraphics.")},"sizeData"),l({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:me((t,e,r)=>{var t=t.parser,i={number:0,unit:"em"},n={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Xn(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=_l(h);break;case"height":n=_l(h);break;case"totalheight":a=_l(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Xn(e[0],"url").url,""===s&&(s=(s=(s=r).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),t.settings.isTrusted({command:"\\includegraphics",url:r})?{type:"includegraphics",mode:t.mode,alt:s,width:i,height:n,totalheight:a,src:r}:t.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:me((t,e)=>{var r=Ja(t.height,e),i=0,n=(0<t.totalheight.number&&(i=Ja(t.totalheight,e)-r),0),e=(0<t.width.number&&(n=Ja(t.width,e)),{height:K(r+i)});return 0<n&&(e.width=K(n)),0<i&&(e.verticalAlign=K(-i)),(n=new ss(t.src,t.alt,e)).height=r,n.depth=i,n},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=new E.MathNode("mglyph",[]),i=(r.setAttribute("alt",t.alt),Ja(t.height,e)),n=0;return 0<t.totalheight.number&&(n=Ja(t.totalheight,e)-i,r.setAttribute("valign",K(-n))),r.setAttribute("height",K(i+n)),0<t.width.number&&(i=Ja(t.width,e),r.setAttribute("width",K(i))),r.setAttribute("src",t.src),r},"mathmlBuilder")}),l({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var r,i,{parser:t,funcName:n}=t,e=Xn(e[0],"size");return t.settings.strict&&(r="m"===n[1],i="mu"===e.value.unit,r?(i||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+e.value.unit+" units"),"math"!==t.mode&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):i&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")),{type:"kern",mode:t.mode,dimension:e.value}},htmlBuilder(t,e){return Z.makeGlue(t.dimension,e)},mathmlBuilder(t,e){return t=Ja(t.dimension,e),new E.SpaceNode(t)}}),l({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:e}},"handler"),htmlBuilder:me((t,e)=>{var r="clap"===t.alignment?(r=Z.makeSpan([],[go(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[go(t.body,e)]),i=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,i],e);return(r=Z.makeSpan(["strut"])).style.height=K(t.height+t.depth),t.depth&&(r.style.verticalAlign=K(-t.depth)),t.children.unshift(r),t=Z.makeSpan(["thinbox"],[t],e),Z.makeSpan(["mord","vbox"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[ko(t.body,e)]),"rlap"!==t.alignment&&(t="llap"===t.alignment?"-1":"-0.5",e.setAttribute("lspace",t+"width")),e.setAttribute("width","0px"),e),"mathmlBuilder")}),l({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:t,parser:r}=t,i=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),n=r.parseExpression(!1,t);return r.expect(t),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:n}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),Sl=me((t,e)=>{switch(e.style.size){case Sa.DISPLAY.size:return t.display;case Sa.TEXT.size:return t.text;case Sa.SCRIPT.size:return t.script;case Sa.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:me((t,e)=>({type:"mathchoice",mode:(t=t.parser).mode,display:eo(e[0]),text:eo(e[1]),script:eo(e[2]),scriptscript:eo(e[3])}),"handler"),htmlBuilder:me((t,e)=>(t=Sl(t,e),t=oo(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Sl(t,e),wo(t,e)),"mathmlBuilder")}),Al=me((t,e,r,i,n,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&ya.isCharacterBox(r);if(e&&(o={elem:e=go(e,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=go(r,i.havingStyle(n.sub()),i),kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.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:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i);else if(l)n=t.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:t}]},i);else{if(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{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"],Nl=me((t,e)=>{var r,i,n,a=!1,s=("supsub"===t.type?(r=t.sup,i=t.sub,n=Xn(t.base,"op"),a=!0):n=Xn(t,"op"),!1);if((t=e.style).size===Sa.DISPLAY.size&&n.symbol&&!ya.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",e,["mop","op-symbol",s?"large-op":"small-op"]),0<c.length&&(o=l.italic,h=Z.staticSvg(c+"Size"+(s?"2":"1"),e),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},e),n.name="\\"+c,l.classes.unshift("mop"),l.italic=o)}else if(n.body){var h=oo(n.body,e,!0);1===h.length&&h[0]instanceof ls?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,e)}else{for(var u=[],d=1;d<n.name.length;d++)u.push(Z.mathsym(n.name[d],n.mode,e));l=Z.makeSpan(["mop"],u,e)}return c=s=0,(l instanceof ls||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(s=(l.height-l.depth)/2-e.fontMetrics().axisHeight,c=l.italic),a?Al(l,r,i,e,t,c,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),Il=me((t,e)=>{var r;return t.symbol?(r=new fo("mo",[yo(t.name,t.mode)]),ya.contains(Ll,t.name)&&r.setAttribute("largeop","false")):r=t.body?new fo("mo",bo(t.body,e)):(r=new fo("mi",[new mo(t.name.slice(1))]),e=new fo("mo",[yo("","text")]),t.parentIsSupSub?new fo("mrow",[r,e]):Hn([r,e])),r},"mathmlBuilder$1"),Rl={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},l({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:me((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=Rl[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Nl,mathmlBuilder:Il}),l({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:eo(e)}),"handler"),htmlBuilder:Nl,mathmlBuilder:Il}),Ml={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},l({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(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Nl,mathmlBuilder:Il}),l({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Nl,mathmlBuilder:Il}),l({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return 1===e.length&&(e=Ml[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Nl,mathmlBuilder:Il}),Dl=me((t,e)=>{var r,i,n,a,s=!1;if("supsub"===t.type?(r=t.sup,i=t.sub,n=Xn(t.base,"operatorname"),s=!0):n=Xn(t,"operatorname"),0<n.body.length){for(var t=n.body.map(t=>{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=oo(t,e.withFont("mathrm"),!0),l=0;l<o.length;l++){var c=o[l];c instanceof ls&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,e)}else a=Z.makeSpan(["mop"],[],e);return s?Al(a,r,i,e,e.style,0,0):a},"htmlBuilder$1"),Ol=me((t,e)=>{for(var r=bo(t.body,e.withFont("mathrm")),i=!0,n=0;n<r.length;n++){var a=r[n];if(!(a instanceof E.SpaceNode))if(a instanceof E.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 E.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):i=!1;break;default:i=!1}else i=!1}i&&(e=r.map(t=>t.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[yo("","text")]);return t.parentIsSupSub?new E.MathNode("mrow",[e,o]):E.newDocumentFragment([e,o])},"mathmlBuilder"),l({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"operatorname",mode:t.mode,body:eo(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Dl,mathmlBuilder:Ol}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),jn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(oo(t.body,e,!1)):Z.makeSpan(["mord"],oo(t.body,e,!0),e)},mathmlBuilder(t,e){return wo(t.body,e,!0)}}),l({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){return t=t.parser,e=e[0],{type:"overline",mode:t.mode,body:e}},htmlBuilder(t,e){var t=go(t.body,e.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},e);return Z.makeSpan(["mord","overline"],[t],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("mover",[ko(t.body,e),r])).setAttribute("accent","true"),t}}),l({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:eo(e)}),"handler"),htmlBuilder:me((t,e)=>(t=oo(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=bo(t.body,e),new E.MathNode("mphantom",t)),"mathmlBuilder")}),l({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[go(t.body,e.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}]},e),Z.makeSpan(["mord"],[r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=bo(eo(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("height","0px"),t.setAttribute("depth","0px"),t),"mathmlBuilder")}),l({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var t=Z.makeSpan(["inner"],[go(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=bo(eo(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("width","0px"),t),"mathmlBuilder")}),l({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var t=t.parser,r=Xn(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=go(t.body,e),t=Ja(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new E.MathNode("mpadded",[ko(t.body,e)]),t=t.dy.number+t.dy.unit,e.setAttribute("voffset",t),e}}),l({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){return{type:"internal",mode:(t=t.parser).mode}}}),l({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var t=t.parser,r=r[0],i=Xn(e[0],"size"),e=Xn(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Xn(r,"size").value,width:i.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),i=Ja(t.width,e),n=Ja(t.height,e),t=t.shift?Ja(t.shift,e):0;return r.style.borderRightWidth=K(i),r.style.borderTopWidth=K(n),r.style.bottom=K(t),r.width=i,r.height=n+t,r.depth=-t,r.maxFontSize=1.125*n*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Ja(t.width,e),i=Ja(t.height,e),t=t.shift?Ja(t.shift,e):0,e=e.color&&e.getColor()||"black",n=new E.MathNode("mspace"),e=(n.setAttribute("mathbackground",e),n.setAttribute("width",K(r)),n.setAttribute("height",K(i)),new E.MathNode("mpadded",[n]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),me(ca,"sizingGroup"),Pl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Bl=me((t,e)=>{var r=e.havingSize(t.size);return ca(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Pl,props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:i}=t,t=i.parseExpression(!1,t);return{type:"sizing",mode:i.mode,size:Pl.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Bl,mathmlBuilder:me((t,e)=>(e=e.havingSize(t.size),t=bo(t.body,e),(t=new E.MathNode("mstyle",t)).setAttribute("mathsize",K(e.sizeMultiplier)),t),"mathmlBuilder")}),l({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:me((t,e,r)=>{var t=t.parser,i=!1,n=!1,a=r[0]&&Xn(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=e[0],{type:"smash",mode:t.mode,body:r,smashHeight:i,smashDepth:n}},"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[go(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;return t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Z.makeSpan(["mord"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[ko(t.body,e)]),t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e),"mathmlBuilder")}),l({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){return t=t.parser,r=r[0],e=e[0],{type:"sqrt",mode:t.mode,body:e,index:r}},htmlBuilder(t,e){0===(r=go(t.body,e.havingCrampedStyle())).height&&(r.height=e.fontMetrics().xHeight);var r=Z.wrapFragment(r,e),i=n=e.fontMetrics().defaultRuleThickness,i=n+(e.style.id<Sa.TEXT.id?e.fontMetrics().xHeight:i)/4,n=r.height+r.depth+i+n,{span:n,ruleWidth:a,advanceWidth:s}=pl.sqrtImage(n,e),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}]},e));return t.index?(s=e.havingStyle(Sa.SCRIPTSCRIPT),r=go(t.index,s,e),o=.6*(i.height-i.depth),n=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[n]),Z.makeSpan(["mord","sqrt"],[a,i],e)):Z.makeSpan(["mord","sqrt"],[i],e)},mathmlBuilder(t,e){var{body:t,index:r}=t;return r?new E.MathNode("mroot",[ko(t,e),ko(r,e)]):new E.MathNode("msqrt",[ko(t,e)])}}),Fl={display:Sa.DISPLAY,text:Sa.TEXT,script:Sa.SCRIPT,scriptscript:Sa.SCRIPTSCRIPT},l({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:t,funcName:r,parser:i}=t,t=i.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:r,body:t}},htmlBuilder(t,e){var r=Fl[t.style],r=e.havingStyle(r).withFont("");return ca(t.body,r,e)},mathmlBuilder(t,e){var r=Fl[t.style],e=e.havingStyle(r),r=bo(t.body,e),e=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return e.setAttribute("scriptlevel",r[0]),e.setAttribute("displaystyle",r[1]),e}}),$l=me(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Sa.DISPLAY.size||r.alwaysHandleSupSub)?Nl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Sa.DISPLAY.size||r.limits)?Dl:null:"accent"===r.type?ya.isCharacterBox(r.base)?Io:null:"horizBrace"===r.type&&!t.sub===r.isOver?Cl:null:null},"htmlBuilderDelegate"),jn({type:"supsub",htmlBuilder(t,e){if(a=$l(t,e))return a(t,e);var r,i,n,{base:a,sup:s,sub:o}=t,l=go(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&ya.isCharacterBox(a),o=(s&&(n=e.havingStyle(e.style.sup()),r=go(s,n,e),a||(h=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),i=go(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),n=e.style===Sa.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(i&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof ls||o)&&(s=K(-l.italic)),r&&i){h=Math.max(h,n,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(i.height-u)<t&&(u=t-(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}]},e)}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}]},e);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}]},e)}return t=uo(l,"right")||"mord",Z.makeSpan([t],[l,Z.makeSpan(["msupsub"],[d])],e)},mathmlBuilder(t,e){var r,i=!1,n=(t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(i=!0,r=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0),[ko(t.base,e)]);return t.sub&&n.push(ko(t.sub,e)),t.sup&&n.push(ko(t.sup,e)),r=i?r?"mover":"munder":t.sub?t.sup?(i=t.base)&&"op"===i.type&&i.limits&&e.style===Sa.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(e.style===Sa.DISPLAY||i.limits)?"munderover":"msubsup":(r=t.base)&&"op"===r.type&&r.limits&&(e.style===Sa.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||e.style===Sa.DISPLAY)?"munder":"msub":(i=t.base)&&"op"===i.type&&i.limits&&(e.style===Sa.DISPLAY||i.alwaysHandleSupSub)||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(i.limits||e.style===Sa.DISPLAY)?"mover":"msup",new E.MathNode(r,n)}}),jn({type:"atom",htmlBuilder(t,e){return Z.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new E.MathNode("mo",[yo(t.text,t.mode)]);return"bin"===t.family?"bold-italic"===(e=xo(t,e))&&r.setAttribute("mathvariant",e):"punct"===t.family?r.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||r.setAttribute("stretchy","false"),r}}),zl={mi:"italic",mn:"normal",mtext:"normal"},jn({type:"mathord",htmlBuilder(t,e){return Z.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new E.MathNode("mi",[yo(t.text,t.mode,e)]);return(t=xo(t,e)||"italic")!==zl[r.type]&&r.setAttribute("mathvariant",t),r}}),jn({type:"textord",htmlBuilder(t,e){return Z.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=yo(t.text,t.mode,e),e=xo(t,e)||"normal",t="text"===t.mode?new E.MathNode("mtext",[r]):/[0-9]/.test(t.text)?new E.MathNode("mn",[r]):"\\prime"===t.text?new E.MathNode("mo",[r]):new E.MathNode("mi",[r]);return e!==zl[t.type]&&t.setAttribute("mathvariant",e),t}}),Gl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ul={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},jn({type:"spacing",htmlBuilder(t,e){var r,i;if(Ul.hasOwnProperty(t.text))return r=Ul[t.text].className||"","text"===t.mode?((i=Z.makeOrd(t,e,"textord")).classes.push(r),i):Z.makeSpan(["mspace",r],[Z.mathsym(t.text,t.mode,e)],e);if(Gl.hasOwnProperty(t.text))return Z.makeSpan(["mspace",Gl[t.text]],[],e);throw new X('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(Ul.hasOwnProperty(t.text))return new E.MathNode("mtext",[new E.TextNode(" ")]);if(Gl.hasOwnProperty(t.text))return new E.MathNode("mspace");throw new X('Unknown type of space "'+t.text+'"')}}),ql=me(()=>{var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),jn({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[ql(),new E.MathNode("mtd",[wo(t.body,e)]),ql(),new E.MathNode("mtd",[wo(t.tag,e)])])])).setAttribute("width","100%"),t}}),jl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Wl={"\\textbf":"textbf","\\textmd":"textmd"},Yl={"\\textit":"textit","\\textup":"textup"},Hl=me((t,e)=>(t=t.font)?jl[t]?e.withTextFontFamily(jl[t]):Wl[t]?e.withTextFontWeight(Wl[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Yl[t]):e,"optionsWithFont"),l({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"text",mode:t.mode,body:eo(e),font:r}},htmlBuilder(t,e){return e=Hl(t,e),t=oo(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Hl(t,e),wo(t.body,e)}}),l({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"underline",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=go(t.body,e),r=Z.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:t}]},e);return Z.makeSpan(["mord","underline"],[r],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("munder",[ko(t.body,e),r])).setAttribute("accentunder","true"),t}}),l({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){return{type:"vcenter",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=go(t.body,e),r=e.fontMetrics().axisHeight,r=.5*(t.height-r-(t.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(t,e){return new E.MathNode("mpadded",[ko(t.body,e)],["vcenter"])}}),l({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Vl(t),i=[],n=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),i.push(Z.makeSymbol(s,"Typewriter-Regular",t.mode,n,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(n.sizingClasses(e)),Z.tryCombineChars(i),n)},mathmlBuilder(t,e){return t=new E.TextNode(Vl(t)),(t=new E.MathNode("mtext",[t])).setAttribute("mathvariant","monospace"),t}}),Vl=me(t=>t.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Xl=Zs,Kl=new RegExp("[̀-ͯ]+$"),Zl=class{static{me(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,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(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new ua("EOF",new ha(this,e,e));if(null===(i=this.tokenRegex.exec(t))||i.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new ua(t[e],new ha(this,e,e+1)));var r,i=i[6]||i[3]||(i[2]?"\\ ":" ");return 14===this.catcodes[i]?(-1===(r=t.indexOf(`
`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new ua(i,new ha(this,e,this.tokenRegex.lastIndex))}},Ql=class{static{me(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return(this.current.hasOwnProperty(t)?this.current:this.builtins)[t]}set(t,e,r){if(r=void 0!==r&&r){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(t)&&(r[t]=this.current[t]);null==e?delete this.current[t]:this.current[t]=e}},Jl=yl,h("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),h("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),h("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),h("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),h("\\@ifnextchar",function(t){var e=t.consumeArgs(3),t=(t.consumeSpaces(),t.future());return 1===e[0].length&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),h("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),h("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}),tc={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},h("\\char",function(t){var e,r,i=t.popToken(),n="";if("'"===i.text)e=8,i=t.popToken();else if('"'===i.text)e=16,i=t.popToken();else if("`"===i.text)if("\\"===(i=t.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 e=10;if(e){if(null==(n=tc[i.text])||e<=n)throw new X("Invalid base-"+e+" digit "+i.text);for(;null!=(r=tc[t.future().text])&&r<e;)n=n*e+r,t.popToken()}return"\\@char{"+n+"}"}),ec=me((t,e,r)=>{var i=t.consumeArg().tokens;if(1!==i.length)throw new X("\\newcommand's first argument must be a macro name");var n=i[0].text,a=t.isDefined(n);if(a&&!e)throw new X("\\newcommand{"+n+"} attempting to redefine "+n+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");if(e=0,1===(i=t.consumeArg().tokens).length&&"["===i[0].text){for(var s="",o=t.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);e=parseInt(s),i=t.consumeArg().tokens}return t.macros.set(n,{tokens:i,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>ec(t,!1,!0)),h("\\renewcommand",t=>ec(t,!0,!1)),h("\\providecommand",t=>ec(t,!0,!0)),h("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),h("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),h("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Xl[r],gs.math[r],gs.text[r]),""}),h("\\bgroup","{"),h("\\egroup","}"),h("~","\\nobreakspace"),h("\\lq","`"),h("\\rq","'"),h("\\aa","\\r a"),h("\\AA","\\r A"),h("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),h("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),h("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),h("","\\mathscr{B}"),h("","\\mathscr{E}"),h("","\\mathscr{F}"),h("","\\mathscr{H}"),h("","\\mathscr{I}"),h("","\\mathscr{L}"),h("","\\mathscr{M}"),h("","\\mathscr{R}"),h("","\\mathfrak{C}"),h("","\\mathfrak{H}"),h("","\\mathfrak{Z}"),h("\\Bbbk","\\Bbb{k}"),h("·","\\cdotp"),h("\\llap","\\mathllap{\\textrm{#1}}"),h("\\rlap","\\mathrlap{\\textrm{#1}}"),h("\\clap","\\mathclap{\\textrm{#1}}"),h("\\mathstrut","\\vphantom{(}"),h("\\underbar","\\underline{\\text{#1}}"),h("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),h("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),h("\\ne","\\neq"),h("≠","\\neq"),h("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),h("∉","\\notin"),h("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),h("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),h("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),h("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),h("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),h("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),h("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),h("⟂","\\perp"),h("‼","\\mathclose{!\\mkern-0.8mu!}"),h("∌","\\notni"),h("⌜","\\ulcorner"),h("⌝","\\urcorner"),h("⌞","\\llcorner"),h("⌟","\\lrcorner"),h("©","\\copyright"),h("®","\\textregistered"),h("","\\textregistered"),h("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),h("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),h("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),h("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),h("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),h("⋮","\\vdots"),h("\\varGamma","\\mathit{\\Gamma}"),h("\\varDelta","\\mathit{\\Delta}"),h("\\varTheta","\\mathit{\\Theta}"),h("\\varLambda","\\mathit{\\Lambda}"),h("\\varXi","\\mathit{\\Xi}"),h("\\varPi","\\mathit{\\Pi}"),h("\\varSigma","\\mathit{\\Sigma}"),h("\\varUpsilon","\\mathit{\\Upsilon}"),h("\\varPhi","\\mathit{\\Phi}"),h("\\varPsi","\\mathit{\\Psi}"),h("\\varOmega","\\mathit{\\Omega}"),h("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),h("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),h("\\boxed","\\fbox{$\\displaystyle{#1}$}"),h("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),h("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),h("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),rc={",":"\\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"},h("\\dots",function(t){var e="\\dotso";return(t=t.expandAfterFuture().text)in rc?e=rc[t]:("\\not"===t.slice(0,4)||t in gs.math&&ya.contains(["bin","rel"],gs.math[t].group))&&(e="\\dotsb"),e}),ic={")":!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},h("\\dotso",function(t){return t.future().text in ic?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in ic&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in ic?"\\@cdots\\,":"\\@cdots"}),h("\\dotsb","\\cdots"),h("\\dotsm","\\cdots"),h("\\dotsi","\\!\\cdots"),h("\\dotsx","\\ldots\\,"),h("\\DOTSI","\\relax"),h("\\DOTSB","\\relax"),h("\\DOTSX","\\relax"),h("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),h("\\,","\\tmspace+{3mu}{.1667em}"),h("\\thinspace","\\,"),h("\\>","\\mskip{4mu}"),h("\\:","\\tmspace+{4mu}{.2222em}"),h("\\medspace","\\:"),h("\\;","\\tmspace+{5mu}{.2777em}"),h("\\thickspace","\\;"),h("\\!","\\tmspace-{3mu}{.1667em}"),h("\\negthinspace","\\!"),h("\\negmedspace","\\tmspace-{4mu}{.2222em}"),h("\\negthickspace","\\tmspace-{5mu}{.277em}"),h("\\enspace","\\kern.5em "),h("\\enskip","\\hskip.5em\\relax"),h("\\quad","\\hskip1em\\relax"),h("\\qquad","\\hskip2em\\relax"),h("\\tag","\\@ifstar\\tag@literal\\tag@paren"),h("\\tag@paren","\\tag@literal{({#1})}"),h("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),h("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),h("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),h("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),h("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),h("\\newline","\\\\\\relax"),h("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),h("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(nc=K(Ua["Main-Regular"][84][1]-.7*Ua["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+nc+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),h("\\hspace","\\@ifstar\\@hspacer\\@hspace"),h("\\@hspace","\\hskip #1\\relax"),h("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),h("\\ordinarycolon",":"),h("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),h("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),h("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),h("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),h("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),h("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),h("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),h("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),h("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),h("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),h("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),h("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),h("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),h("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),h("∷","\\dblcolon"),h("∹","\\eqcolon"),h("≔","\\coloneqq"),h("≕","\\eqqcolon"),h("⩴","\\Coloneqq"),h("\\ratio","\\vcentcolon"),h("\\coloncolon","\\dblcolon"),h("\\colonequals","\\coloneqq"),h("\\coloncolonequals","\\Coloneqq"),h("\\equalscolon","\\eqqcolon"),h("\\equalscoloncolon","\\Eqqcolon"),h("\\colonminus","\\coloneq"),h("\\coloncolonminus","\\Coloneq"),h("\\minuscolon","\\eqcolon"),h("\\minuscoloncolon","\\Eqcolon"),h("\\coloncolonapprox","\\Colonapprox"),h("\\coloncolonsim","\\Colonsim"),h("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),h("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),h("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),h("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),h("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),h("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),h("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),h("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),h("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),h("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),h("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),h("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),h("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),h("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),h("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),h("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),h("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),h("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),h("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),h("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),h("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),h("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),h("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),h("\\imath","\\html@mathml{\\@imath}{ı}"),h("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),h("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),h("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),h("⟦","\\llbracket"),h("⟧","\\rrbracket"),h("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),h("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),h("⦃","\\lBrace"),h("⦄","\\rBrace"),h("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),h("⦵","\\minuso"),h("\\darr","\\downarrow"),h("\\dArr","\\Downarrow"),h("\\Darr","\\Downarrow"),h("\\lang","\\langle"),h("\\rang","\\rangle"),h("\\uarr","\\uparrow"),h("\\uArr","\\Uparrow"),h("\\Uarr","\\Uparrow"),h("\\N","\\mathbb{N}"),h("\\R","\\mathbb{R}"),h("\\Z","\\mathbb{Z}"),h("\\alef","\\aleph"),h("\\alefsym","\\aleph"),h("\\Alpha","\\mathrm{A}"),h("\\Beta","\\mathrm{B}"),h("\\bull","\\bullet"),h("\\Chi","\\mathrm{X}"),h("\\clubs","\\clubsuit"),h("\\cnums","\\mathbb{C}"),h("\\Complex","\\mathbb{C}"),h("\\Dagger","\\ddagger"),h("\\diamonds","\\diamondsuit"),h("\\empty","\\emptyset"),h("\\Epsilon","\\mathrm{E}"),h("\\Eta","\\mathrm{H}"),h("\\exist","\\exists"),h("\\harr","\\leftrightarrow"),h("\\hArr","\\Leftrightarrow"),h("\\Harr","\\Leftrightarrow"),h("\\hearts","\\heartsuit"),h("\\image","\\Im"),h("\\infin","\\infty"),h("\\Iota","\\mathrm{I}"),h("\\isin","\\in"),h("\\Kappa","\\mathrm{K}"),h("\\larr","\\leftarrow"),h("\\lArr","\\Leftarrow"),h("\\Larr","\\Leftarrow"),h("\\lrarr","\\leftrightarrow"),h("\\lrArr","\\Leftrightarrow"),h("\\Lrarr","\\Leftrightarrow"),h("\\Mu","\\mathrm{M}"),h("\\natnums","\\mathbb{N}"),h("\\Nu","\\mathrm{N}"),h("\\Omicron","\\mathrm{O}"),h("\\plusmn","\\pm"),h("\\rarr","\\rightarrow"),h("\\rArr","\\Rightarrow"),h("\\Rarr","\\Rightarrow"),h("\\real","\\Re"),h("\\reals","\\mathbb{R}"),h("\\Reals","\\mathbb{R}"),h("\\Rho","\\mathrm{P}"),h("\\sdot","\\cdot"),h("\\sect","\\S"),h("\\spades","\\spadesuit"),h("\\sub","\\subset"),h("\\sube","\\subseteq"),h("\\supe","\\supseteq"),h("\\Tau","\\mathrm{T}"),h("\\thetasym","\\vartheta"),h("\\weierp","\\wp"),h("\\Zeta","\\mathrm{Z}"),h("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),h("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),h("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),h("\\bra","\\mathinner{\\langle{#1}|}"),h("\\ket","\\mathinner{|{#1}\\rangle}"),h("\\braket","\\mathinner{\\langle{#1}\\rangle}"),h("\\Bra","\\left\\langle#1\\right|"),h("\\Ket","\\left|#1\\right\\rangle"),h("\\bra@ket",(ac=me(l=>t=>{var e=t.consumeArg().tokens,i=t.consumeArg().tokens,n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),me(r=>t=>{l&&(t.macros.set("|",a),n.length)&&t.macros.set("\\|",s);var e=r;return!r&&n.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?n:i,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),n.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),h("\\bra@set",ac(!0)),h("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),h("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),h("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),h("\\angln","{\\angl n}"),h("\\blue","\\textcolor{##6495ed}{#1}"),h("\\orange","\\textcolor{##ffa500}{#1}"),h("\\pink","\\textcolor{##ff00af}{#1}"),h("\\red","\\textcolor{##df0030}{#1}"),h("\\green","\\textcolor{##28ae7b}{#1}"),h("\\gray","\\textcolor{gray}{#1}"),h("\\purple","\\textcolor{##9d38bd}{#1}"),h("\\blueA","\\textcolor{##ccfaff}{#1}"),h("\\blueB","\\textcolor{##80f6ff}{#1}"),h("\\blueC","\\textcolor{##63d9ea}{#1}"),h("\\blueD","\\textcolor{##11accd}{#1}"),h("\\blueE","\\textcolor{##0c7f99}{#1}"),h("\\tealA","\\textcolor{##94fff5}{#1}"),h("\\tealB","\\textcolor{##26edd5}{#1}"),h("\\tealC","\\textcolor{##01d1c1}{#1}"),h("\\tealD","\\textcolor{##01a995}{#1}"),h("\\tealE","\\textcolor{##208170}{#1}"),h("\\greenA","\\textcolor{##b6ffb0}{#1}"),h("\\greenB","\\textcolor{##8af281}{#1}"),h("\\greenC","\\textcolor{##74cf70}{#1}"),h("\\greenD","\\textcolor{##1fab54}{#1}"),h("\\greenE","\\textcolor{##0d923f}{#1}"),h("\\goldA","\\textcolor{##ffd0a9}{#1}"),h("\\goldB","\\textcolor{##ffbb71}{#1}"),h("\\goldC","\\textcolor{##ff9c39}{#1}"),h("\\goldD","\\textcolor{##e07d10}{#1}"),h("\\goldE","\\textcolor{##a75a05}{#1}"),h("\\redA","\\textcolor{##fca9a9}{#1}"),h("\\redB","\\textcolor{##ff8482}{#1}"),h("\\redC","\\textcolor{##f9685d}{#1}"),h("\\redD","\\textcolor{##e84d39}{#1}"),h("\\redE","\\textcolor{##bc2612}{#1}"),h("\\maroonA","\\textcolor{##ffbde0}{#1}"),h("\\maroonB","\\textcolor{##ff92c6}{#1}"),h("\\maroonC","\\textcolor{##ed5fa6}{#1}"),h("\\maroonD","\\textcolor{##ca337c}{#1}"),h("\\maroonE","\\textcolor{##9e034e}{#1}"),h("\\purpleA","\\textcolor{##ddd7ff}{#1}"),h("\\purpleB","\\textcolor{##c6b9fc}{#1}"),h("\\purpleC","\\textcolor{##aa87ff}{#1}"),h("\\purpleD","\\textcolor{##7854ab}{#1}"),h("\\purpleE","\\textcolor{##543b78}{#1}"),h("\\mintA","\\textcolor{##f5f9e8}{#1}"),h("\\mintB","\\textcolor{##edf2df}{#1}"),h("\\mintC","\\textcolor{##e0e5cc}{#1}"),h("\\grayA","\\textcolor{##f6f7f7}{#1}"),h("\\grayB","\\textcolor{##f0f1f2}{#1}"),h("\\grayC","\\textcolor{##e3e5e6}{#1}"),h("\\grayD","\\textcolor{##d6d8da}{#1}"),h("\\grayE","\\textcolor{##babec2}{#1}"),h("\\grayF","\\textcolor{##888d93}{#1}"),h("\\grayG","\\textcolor{##626569}{#1}"),h("\\grayH","\\textcolor{##3b3e40}{#1}"),h("\\grayI","\\textcolor{##21242c}{#1}"),h("\\kaBlue","\\textcolor{##314453}{#1}"),h("\\kaGreen","\\textcolor{##71B307}{#1}"),sc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},oc=class{static{me(this,"MacroExpander")}constructor(t,e,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=e,this.expansionCount=0,this.feed(t),this.macros=new Ql(Jl,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Zl(t,this.settings)}switchMode(t){this.mode=t}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(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,i;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:e,end:r}=this.consumeArg());return this.pushToken(new ua("EOF",r.loc)),this.pushTokens(i),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],i=t&&0<t.length,n=(i||this.consumeSpaces(),this.future()),a=0,s=0;do{if(e=this.popToken(),r.push(e),"{"===e.text)++a;else if("}"===e.text){if(-1==--a)throw new X("Extra }",e)}else if("EOF"===e.text)throw new X("Unexpected end of input in a macro argument, expected '"+(t&&i?t[s]:"}")+"'",e);if(t&&i)if((0===a||1===a&&"{"===t[s])&&e.text===t[s]){if(++s===t.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:e}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new X("The length of delimiters doesn't match the number of args!");for(var r=e[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<t;s++)a.push(this.consumeArg(e&&e[s+1]).tokens);return a}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,i=e.noexpand?null:this._getExpansion(r);if(null==i||t&&i.unexpandable){if(t&&null==i&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!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 t;if(!1===this.expandOnce())return(t=this.stack.pop()).treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ua(t)]):void 0}expandTokens(t){var e,r=[],i=this.stack.length;for(this.pushTokens(t);this.stack.length>i;)!1===this.expandOnce(!0)&&((e=this.stack.pop()).treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),r.push(e));return this.countExpansion(r.length),r}expandMacroAsText(t){return(t=this.expandMacro(t))&&t.map(t=>t.text).join("")}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1!==t.length||null==(t=this.lexer.catcodes[t])||13===t){if("string"!=typeof(t="function"==typeof e?e(this):e))return t;var r=0;if(-1!==t.indexOf("#"))for(var i=t.replace(/##/g,"");-1!==i.indexOf("#"+(r+1));)++r;for(var n=new Zl(t,this.settings),a=[],s=n.lex();"EOF"!==s.text;)a.push(s),s=n.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Xl.hasOwnProperty(t)||gs.math.hasOwnProperty(t)||gs.text.hasOwnProperty(t)||sc.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Xl.hasOwnProperty(t)&&!Xl[t].primitive}},lc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,cc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),hc={"́":{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"}},uc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(dc=class a{static{me(this,"Parser")}constructor(t,e){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 oc(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new X("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken,t=(this.consume(),this.gullet.pushToken(new ua("}")),this.gullet.pushTokens(t),this.parseExpression(!1));return this.expect("}"),this.nextToken=e,t}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==a.endOfExpression.indexOf(i.text)||e&&i.text===e||t&&Xl[i.text]&&Xl[i.text].infix)break;if(!(i=this.parseAtom(e)))break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,i,n=-1,a=0;a<t.length;a++)if("infix"===t[a].type){if(-1!==n)throw new X("only one infix operator per group",t[a].token);e=t[n=a].replaceWith}return-1!==n&&e?(r=t.slice(0,n),i=t.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"===e?this.callFunction(e,[r,t[n],i],[]):this.callFunction(e,[r,i],[])]):t}handleSupSubscript(t){var e=this.fetch(),r=e.text;if(this.consume(),this.consumeSpaces(),t=this.parseGroup(t))return t;throw new X("Expected group after '"+r+"'",e)}formatUnsupportedCmd(t){for(var e=[],r=0;r<t.length;r++)e.push({type:"textord",mode:"text",text:t[r]});var i={type:"text",mode:this.mode,body:e};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]}}parseAtom(t){var e,r,i=this.parseGroup("atom",t);if("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(e)throw new X("Double superscript",n);e=this.handleSupSubscript("superscript")}else if("_"===n.text){if(r)throw new X("Double subscript",n);r=this.handleSupSubscript("subscript")}else if("'"===n.text){if(e)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")),e={type:"ordgroup",mode:this.mode,body:o}}else{if(!cc[n.text])break;var l=lc.test(n.text),c=[];for(c.push(new ua(cc[n.text])),this.consume();;){var h=this.fetch().text;if(!cc[h]||lc.test(h)!==l)break;c.unshift(new ua(cc[h])),this.consume()}a=this.subparse(c),l?r={type:"ordgroup",mode:"math",body:a}:e={type:"ordgroup",mode:"math",body:a}}}return e||r?{type:"supsub",mode:this.mode,base:i,sup:e,sub:r}:i}parseFunction(t,e){var r=this.fetch(),i=r.text;if(!(n=Xl[i]))return null;if(this.consume(),e&&"atom"!==e&&!n.allowedInArgument)throw new X("Got function '"+i+"' with no arguments"+(e?" as "+e:""),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:e,optArgs:n}=this.parseArguments(i,n);return this.callFunction(i,e,n,r,t)}callFunction(t,e,r,i,n){var a=Xl[t];if(a&&a.handler)return a.handler({funcName:t,parser:this,token:i,breakOnTokenText:n},e,r);throw new X("No function handler for "+t)}parseArguments(t,e){var r=e.numArgs+e.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var i=[],n=[],a=0;a<r;a++){var s=e.argTypes&&e.argTypes[a],o=a<e.numOptionalArgs,s=((e.primitive&&null==s||"sqrt"===e.type&&1===a&&null==n[0])&&(s="primitive"),this.parseGroupOfType("argument to '"+t+"'",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(t,e,r){switch(e){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,e);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(t)))throw new X("Expected group as "+t,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new X("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(t,e){if(null==(e=this.gullet.scanArgument(e)))return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),e.text=i,e}parseRegexGroup(t,e){for(var r,i=this.fetch(),n=i,a="";"EOF"!==(r=this.fetch()).text&&t.test(a+r.text);)a+=(n=r).text,this.consume();if(""===a)throw new X("Invalid "+e+": '"+i.text+"'",i);return i.range(n,a)}parseColorGroup(t){if(null==(t=this.parseStringGroup("color",t)))return null;var e=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(e)return e=e[0],/^[0-9a-f]{6}$/i.test(e)&&(e="#"+e),{type:"color-token",mode:this.mode,color:e};throw new X("Invalid color: '"+t.text+"'",t)}parseSizeGroup(t){var e,r=!1;if(this.gullet.consumeSpaces(),!(e=t||"{"===this.gullet.future().text?this.parseStringGroup("size",t):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(t||0!==e.text.length||(e.text="0pt",r=!0),!(t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e.text)))throw new X("Invalid size: '"+e.text+"'",e);if(t={number:+(t[1]+t[2]),unit:t[3]},Qa(t))return{type:"size",mode:this.mode,value:t,isBlank:r};throw new X("Invalid unit: '"+t.unit+"'",e)}parseUrlGroup(t){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),t=this.parseStringGroup("url",t),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t?null:(t=t.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:t})}parseArgumentGroup(t,e){var r,i;return null==(t=this.gullet.scanArgument(t))?null:(r=this.mode,e&&this.switchMode(e),this.gullet.beginGroup(),i=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),t={type:"ordgroup",mode:this.mode,loc:t.loc,body:i},e&&this.switchMode(r),t)}parseGroup(t,e){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:ha.range(r,s),body:a,semisimple:"\\begingroup"===i||void 0}}else if(null==(n=this.parseFunction(e,t)||this.parseSymbol())&&"\\"===i[0]&&!sc.hasOwnProperty(i)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+i,r);n=this.formatUnsupportedCmd(i),this.consume()}return n}formLigatures(t){for(var e=t.length-1,r=0;r<e;++r){var i=t[r],n=i.text;"-"===n&&"-"===t[r+1].text&&(r+1<e&&"-"===t[r+2].text?(t.splice(r,3,{type:"textord",mode:"text",loc:ha.range(i,t[r+2]),text:"---"}),e-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:ha.range(i,t[r+1]),text:"--"}),--e)),"'"!==n&&"`"!==n||t[r+1].text!==n||(t.splice(r,2,{type:"textord",mode:"text",loc:ha.range(i,t[r+1]),text:n+n}),--e)}}parseSymbol(){var t=this.fetch(),e=t.text;if(/^\\verb[^a-zA-Z]/.test(e)){if(this.consume(),(i=(n="*"===(i=e.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}}uc.hasOwnProperty(e[0])&&!gs[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=uc[e[0]]+e.slice(1));var r=Kl.exec(e);if(r&&("i"===(e=e.substring(0,r.index))?e="ı":"j"===e&&(e="ȷ")),gs[this.mode][e]){this.settings.strict&&"math"===this.mode&&0<=Is.indexOf(e)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var i=gs[this.mode][e].group,n=ha.range(t),a=ds.hasOwnProperty(i)?{type:"atom",mode:this.mode,family:i,loc:n,text:e}:{type:i,mode:this.mode,loc:n,text:e}}else{if(!(128<=e.charCodeAt(0)))return null;this.settings.strict&&(Fn(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:ha.range(t),text:e}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!hc[o])throw new X("Unknown accent ' "+o+"'",t);var l=hc[o][this.mode]||hc[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:ha.range(t),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],pc=me(function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(t=new dc(t,e)).gullet.macros.current["\\df@tag"];var r=t.parse();if(delete t.gullet.macros.current["\\current@color"],delete t.gullet.macros.current["\\color"],t.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:t.subparse([new ua("\\df@tag")])}]}return r},"parseTree"),m=me(function(t,e,r){e.textContent="",t=yc(t,r).toNode(),e.appendChild(t)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),m=me(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),gc=me(function(t,e){return yc(t,e).toMarkup()},"renderToString"),fc=me(function(t,e){return e=new xa(e),pc(t,e)},"generateParseTree"),mc=me(function(t,e,r){if(!r.throwOnError&&t instanceof X)return(e=Z.makeSpan(["katex-error"],[new ls(e)])).setAttribute("title",t.toString()),e.setAttribute("style","color:"+r.errorColor),e;throw t},"renderError"),yc=me(function(t,e){e=new xa(e);try{var r=pc(t,e);return Co(r,t,e)}catch(r){return mc(r,t,e)}},"renderToDomTree"),y=me(function(t,e){e=new xa(e);try{var r=pc(t,e);return _o(r,t,e)}catch(r){return mc(r,t,e)}},"renderToHTMLTree"),vc={version:"0.16.11",render:m,renderToString:gc,ParseError:X,SETTINGS_SCHEMA:va,__parse:fc,__renderToDomTree:yc,__renderToHTMLTree:y,__setFontMetrics:$n,__defineSymbol:o,__defineFunction:l,__defineMacro:h,__domTree:{Span:ns,Anchor:as,SymbolNode:ls,SvgNode:cs,PathNode:hs,LineNode:us}}});function bc(){let e="data-temp-href-target";Rn.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Rn.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var wc,kc,Tc,Ec,Cc,_c,Sc,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc,Pc,Bc,Fc,$c,zc,Gc,Uc,qc,jc,L,Wc,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc=t(()=>{Mn(),wc=/<br\s*\/?>/gi,kc=me(t=>t?Ic(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Tc=(()=>{let t=!1;return()=>{t||(bc(),t=!0)}})(),me(bc,"setupDompurifyHooks"),Ec=me(t=>(Tc(),Rn.sanitize(t)),"removeScript"),Cc=me((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=Ec(t):"loose"!==e&&(t=(t=(t=Ic(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Nc(t))),t),"sanitizeMore"),_c=me((t,e)=>t&&(e.dompurifyConfig?Rn.sanitize(Cc(t,e),e.dompurifyConfig):Rn.sanitize(Cc(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Sc=me((t,e)=>"string"==typeof t?_c(t,e):t.flat().map(t=>_c(t,e)),"sanitizeTextOrArray"),Ac=me(t=>wc.test(t),"hasBreaks"),Lc=me(t=>t.split(wc),"splitBreaks"),Nc=me(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ic=me(t=>t.replace(wc,"#br#"),"breakToPlaceholder"),Rc=me(t=>{let e="";return e=t?(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replaceAll(/\(/g,"\\(")).replaceAll(/\)/g,"\\)"):e},"getUrl"),Mc=me(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Dc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Oc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Pc=me(function(t){var r,i,n=t.split(/(,)/),a=[];for(let e=0;e<n.length;e++){let t=n[e];","===t&&0<e&&e+1<n.length&&(r=n[e-1],i=n[e+1],Fc(r,i))&&(t=r+","+i,e++,a.pop()),a.push($c(t))}return a.join("")},"parseGenericTypes"),Bc=me((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Fc=me((t,e)=>(t=Bc(t,"~"),e=Bc(e,"~"),1===t&&1===e),"shouldCombineSets"),$c=me(t=>{let e=Bc(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],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"),zc=me(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Gc=/\$\$(.*)\$\$/g,Uc=me(t=>0<(t.match(Gc)?.length??0),"hasKatex"),qc=me(async(t,e)=>(t=await jc(t,e),(e=document.createElement("div")).innerHTML=t,e.id="katex-temp",e.style.visibility="hidden",e.style.position="absolute",e.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",e),t={width:e.clientWidth,height:e.clientHeight},e.remove(),t),"calculateMathMLDimensions"),jc=me(async(t,e)=>{if(!Uc(t))return t;if(!(zc()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Gc,"MathML is unsupported in this environment.");let r=(await Promise.resolve().then(()=>(xc(),Dn))).default,i=e.forceLegacyMathML||!zc()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(wc).map(t=>Uc(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Gc,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),L={getRows:kc,sanitizeText:_c,sanitizeTextOrArray:Sc,hasBreaks:Ac,splitBreaks:Lc,lineBreakRegex:wc,removeScript:Ec,getUrl:Rc,evaluate:Mc,getMax:Dc,getMin:Oc}}),th=t(()=>{e(),Wc=me(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Yc=me(function(t,e,r){var i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Hc=me(function(t,e,r,i){e=Yc(e,r,i),Wc(t,e)},"configureSvgSize"),Vc=me(function(t,e,r,i){var n=e.node().getBBox(),a=n.width,s=(M.info(`SVG bounds: ${a}x`+(s=n.height),n),M.info("Graph bounds: 0x0",t),M.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Hc(e,a,t,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),eh=t(()=>{e(),Xc={},Kc=me((t,e,r)=>{let i="";return t in Xc&&Xc[t]?i=Xc[t](r):M.warn("No theme found for "+t),` & {
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}
${e}
`},"getStyles"),Zc=me((t,e)=>{void 0!==e&&(Xc[t]=e)},"addStylesForDiagram"),Qc=Kc}),rh={};lPt(rh,{clear:()=>oh,getAccDescription:()=>uh,getAccTitle:()=>ch,getDiagramTitle:()=>ph,setAccDescription:()=>hh,setAccTitle:()=>lh,setDiagramTitle:()=>dh});var ih,nh,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh,fh,D,mh,yh,vh,xh,bh,wh,kh,Th,Eh,Ch,_h,Sh,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,Fh,$h,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,tu,eu,ru,iu,nu,au,su,ou,lu,cu,hu,uu,du,pu,gu=t(()=>{Jc(),Ai(),ah=nh=ih="",sh=me(t=>_c(t,Nr()),"sanitizeText"),oh=me(()=>{nh=ah=ih=""},"clear"),lh=me(t=>{ih=sh(t).replace(/^\s+/g,"")},"setAccTitle"),ch=me(()=>ih,"getAccTitle"),hh=me(t=>{ah=sh(t).replace(/\n\s+/g,`
`)},"setAccDescription"),uh=me(()=>ah,"getAccDescription"),dh=me(t=>{nh=sh(t)},"setDiagramTitle"),ph=me(()=>nh,"getDiagramTitle")}),fu=t(()=>{Gr(),e(),Ai(),Jc(),th(),eh(),gu(),gh=M,fh=T,D=Nr,mh=Lr,yh=xr,vh=me(t=>_c(t,D()),"sanitizeText"),xh=Vc,bh=me(()=>rh,"getCommonDb"),wh={},kh=me((t,e,r)=>{wh[t]&&gh.warn(`Diagram with id ${t} already registered. Overwriting.`),wh[t]=e,r&&Qt(t,r),Zc(t,e.styles),e.injectUtils?.(gh,fh,D,vh,xh,bh(),()=>{})},"registerDiagram"),Th=me(t=>{if(t in wh)return wh[t];throw new Eh(t)},"getDiagram"),Eh=class extends Error{static{me(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),mu=t(()=>{fu(),Jc(),gu(),Ch=[],_h=[""],Lh=[{alias:Sh="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Ah=""}],Ih="",Rh=!(Nh=[]),Mh=4,Dh=2,Ph=me(function(){return Oh},"getC4Type"),Bh=me(function(t){Oh=_c(t,D())},"setC4Type"),Fh=me(function(r,i,n,a,s,o,l,c,h){if(null!=r&&null!=i&&null!=n&&null!=a){let t={},e=Nh.find(t=>t.from===i&&t.to===n);e?t=e:Nh.push(t),t.type=r,t.from=i,t.to=n,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=ou()}},"addRel"),$h=me(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let t={},e=Ch.find(t=>t.alias===i);var c;e&&i===e.alias?t=e:(t.alias=i,Ch.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.descr={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],t[n]={text:c}):t.descr={text:a},"object"==typeof s?([n,c]=Object.entries(s)[0],t[n]=c):t.sprite=s,"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Sh,t.wrap=ou()}},"addPersonOrSystem"),zh=me(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let t={},e=Ch.find(t=>t.alias===i);var h;e&&i===e.alias?t=e:(t.alias=i,Ch.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],t[n]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],t[n]={text:h}):t.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],t[a]=n):t.link=c,t.wrap=ou(),t.typeC4Shape={text:r},t.parentBoundary=Sh}},"addContainer"),Gh=me(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let t={},e=Ch.find(t=>t.alias===i);var h;e&&i===e.alias?t=e:(t.alias=i,Ch.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],t[n]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],t[n]={text:h}):t.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],t[a]=n):t.link=c,t.wrap=ou(),t.typeC4Shape={text:r},t.parentBoundary=Sh}},"addComponent"),Uh=me(function(r,i,n,a,s){if(null!==r&&null!==i){let t={},e=Lh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Lh.push(t)),t.label=null==i?{text:""}:{text:i},null==n?t.type={text:"system"}:"object"==typeof n?([i,o]=Object.entries(n)[0],t[i]={text:o}):t.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],t[i]=o):t.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],t[n]=i):t.link=s,t.parentBoundary=Sh,t.wrap=ou(),Ah=Sh,Sh=r,_h.push(Ah)}},"addPersonOrSystemBoundary"),qh=me(function(r,i,n,a,s){if(null!==r&&null!==i){let t={},e=Lh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Lh.push(t)),t.label=null==i?{text:""}:{text:i},null==n?t.type={text:"container"}:"object"==typeof n?([i,o]=Object.entries(n)[0],t[i]={text:o}):t.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],t[i]=o):t.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],t[n]=i):t.link=s,t.parentBoundary=Sh,t.wrap=ou(),Ah=Sh,Sh=r,_h.push(Ah)}},"addContainerBoundary"),jh=me(function(r,i,n,a,s,t,o,l){if(null!==i&&null!==n){let t={},e=Lh.find(t=>t.alias===i);var c;e&&i===e.alias?t=e:(t.alias=i,Lh.push(t)),t.label=null==n?{text:""}:{text:n},null==a?t.type={text:"node"}:"object"==typeof a?([n,c]=Object.entries(a)[0],t[n]={text:c}):t.type={text:a},null==s?t.descr={text:""}:"object"==typeof s?([n,c]=Object.entries(s)[0],t[n]={text:c}):t.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],t[a]=n):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Sh,t.wrap=ou(),Ah=Sh,Sh=i,_h.push(Ah)}},"addDeploymentNode"),Wh=me(function(){Sh=Ah,_h.pop(),Ah=_h.pop(),_h.push(Ah)},"popBoundaryParseStack"),Yh=me(function(t,e,r,i,n,a,s,o,l,c,h){let u=Ch.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Lh.find(t=>t.alias===e))||(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"),Hh=me(function(t,e,r,i,n,a,s){var o,l,c=Nh.find(t=>t.from===e&&t.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"),Vh=me(function(t,e,r){var e="object"==typeof e?(i=Object.values(e)[0],parseInt(i)):parseInt(e),i="object"==typeof r?(i=Object.values(r)[0],parseInt(i)):parseInt(r);1<=e&&(Mh=e),1<=i&&(Dh=i)},"updateLayoutConfig"),Xh=me(function(){return Mh},"getC4ShapeInRow"),Kh=me(function(){return Dh},"getC4BoundaryInRow"),Zh=me(function(){return Sh},"getCurrentBoundaryParse"),Qh=me(function(){return Ah},"getParentBoundaryParse"),Jh=me(function(e){return null==e?Ch:Ch.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),tu=me(function(e){return Ch.find(t=>t.alias===e)},"getC4Shape"),eu=me(function(t){return Object.keys(Jh(t))},"getC4ShapeKeys"),ru=me(function(e){return null==e?Lh:Lh.filter(t=>t.parentBoundary===e)},"getBoundaries"),iu=ru,nu=me(function(){return Nh},"getRels"),au=me(function(){return Ih},"getTitle"),su=me(function(t){Rh=t},"setWrap"),ou=me(function(){return Rh},"autoWrap"),lu=me(function(){Ch=[],Lh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Sh="global",_h=[Ah=""],_h=[Ih=""],Rh=!(Nh=[]),Mh=4,Dh=2},"clear"),cu={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},hu={FILLED:0,OPEN:1},uu={LEFTOF:0,RIGHTOF:1,OVER:2},du=me(function(t){Ih=_c(t,D())},"setTitle"),pu={addPersonOrSystem:$h,addPersonOrSystemBoundary:Uh,addContainer:zh,addContainerBoundary:qh,addComponent:Gh,addDeploymentNode:jh,popBoundaryParseStack:Wh,addRel:Fh,updateElStyle:Yh,updateRelStyle:Hh,updateLayoutConfig:Vh,autoWrap:ou,setWrap:su,getC4ShapeArray:Jh,getC4Shape:tu,getC4ShapeKeys:eu,getBoundaries:ru,getBoundarys:iu,getCurrentBoundaryParse:Zh,getParentBoundaryParse:Qh,getRels:nu,getTitle:au,getC4Type:Ph,getC4ShapeInRow:Xh,getC4BoundaryInRow:Kh,setAccTitle:lh,getAccTitle:ch,getAccDescription:uh,setAccDescription:hh,getConfig:me(()=>D().c4,"getConfig"),clear:lu,LINETYPE:cu,ARROWTYPE:hu,PLACEMENT:uu,setTitle:du,setC4Type:Bh}});function yu(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var vu=t(()=>{me(yu,"ascending")});function xu(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var bu=t(()=>{me(xu,"descending")});function wu(r){let a,s,n;function o(t,e,r=0,i=t.length){if(r<i){if(0!==a(e,e))return i;do{var n=r+i>>>1}while(s(t[n],e)<0?r=1+n:i=n,r<i)}return r}function t(t,e,r=0,i=t.length){if(r<i){if(0!==a(e,e))return i;do{var n=r+i>>>1}while(s(t[n],e)<=0?r=1+n:i=n,r<i)}return r}function e(t,e,r=0,i=t.length){return r<(i=o(t,e,r,i-1))&&n(t[i-1],e)>-n(t[i],e)?i-1:i}return n=2!==r.length?(a=yu,s=me((t,e)=>yu(r(t),e),"compare2"),me((t,e)=>r(t)-e,"delta")):(a=r===yu||r===xu?r:ku,s=r),me(o,"left"),me(t,"right"),me(e,"center"),{left:o,center:e,right:t}}function ku(){return 0}var Tu=t(()=>{vu(),bu(),me(wu,"bisector"),me(ku,"zero")});function Eu(t){return null===t?NaN:+t}var Cu,_u,Su=t(()=>{me(Eu,"number")}),Au=t(()=>{vu(),Tu(),Su(),Cu=wu(yu).right,wu(Eu).center,_u=Cu});function Lu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Nu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Iu({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Ru(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Mu,Du=t(()=>{Mu=class extends Map{static{me(this,"InternMap")}constructor(t,e=Ru){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,i]of t)this.set(r,i)}get(t){return super.get(Lu(this,t))}has(t){return super.has(Lu(this,t))}set(t,e){return super.set(Nu(this,t),e)}delete(t){return super.delete(Iu(this,t))}},me(Lu,"intern_get"),me(Nu,"intern_set"),me(Iu,"intern_delete"),me(Ru,"keyof")});function Ou(t,e,r){let i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=$u<=a?10:zu<=a?5:Gu<=a?2:1,o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(t*c),l=Math.round(e*c),o/c<t&&++o,l/c>e&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(t/c),l=Math.round(e/c),o*c<t&&++o,l*c>e&&--l),l<o&&.5<=r&&r<2?Ou(t,e,2*r):[o,l,c]}function Pu(t,e,r){if(!(0<(r=+r)))return[];if((t=+t)==(e=+e))return[t];var i=e<t,[n,a,s]=i?Ou(e,t,r):Ou(t,e,r);if(!(n<=a))return[];var o=a-n+1,l=new Array(o);if(i)if(s<0)for(let t=0;t<o;++t)l[t]=(a-t)/-s;else for(let t=0;t<o;++t)l[t]=(a-t)*s;else if(s<0)for(let t=0;t<o;++t)l[t]=(n+t)/-s;else for(let t=0;t<o;++t)l[t]=(n+t)*s;return l}function Bu(t,e,r){return Ou(t=+t,e=+e,r=+r)[2]}function Fu(t,e,r){r=+r;var i=(e=+e)<(t=+t);return(i?-1:1)*((t=i?Bu(e,t,r):Bu(t,e,r))<0?1/-t:t)}var $u,zu,Gu,Uu=t(()=>{$u=Math.sqrt(50),zu=Math.sqrt(10),Gu=Math.sqrt(2),me(Ou,"tickSpec"),me(Pu,"ticks"),me(Bu,"tickIncrement"),me(Fu,"tickStep")});function qu(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i<t||void 0===i&&t<=t)&&(i=t);else{let t=-1;for(var n of e)null!=(n=r(n,++t,e))&&(i<n||void 0===i&&n<=n)&&(i=n)}return i}var ju=t(()=>{me(qu,"max")});function Wu(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i>t||void 0===i&&t<=t)&&(i=t);else{let t=-1;for(var n of e)null!=(n=r(n,++t,e))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var Yu=t(()=>{me(Wu,"min")});function Hu(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(n);++i<n;)a[i]=t+i*r;return a}var Vu=t(()=>{me(Hu,"range")}),Xu=t(()=>{Au(),Tu(),ju(),Yu(),Vu(),Uu(),Du()});function Ku(t){return t}var Zu=t(()=>{me(Ku,"default")});function Qu(t){return"translate("+t+",0)"}function Ju(t){return"translate(0,"+t+")"}function td(e){return t=>+e(t)}function ed(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function rd(){return!this.__axis}function id(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1<window.devicePixelRatio?0:.5,k=p===sd||4===p?-1:1,T=4===p||2===p?"x":"y",E=p===sd||p===od?Qu:Ju;function e(t){var e=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):Ku),i=Math.max(v,0)+b,n=+(a=g.range())[0]+w,a=+a[a.length-1]+w,s=(g.bandwidth?ed:td)(g.copy(),w),o=t.selection?t.selection():t,l=o.selectAll(".domain").data([null]),c=(e=o.selectAll(".tick").data(e,g).order()).exit(),h=e.enter().append("g").attr("class","tick"),u=e.select("line"),d=e.select("text"),l=l.merge(l.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),e=e.merge(h),u=u.merge(h.append("line").attr("stroke","currentColor").attr(T+"2",k*v)),d=d.merge(h.append("text").attr("fill","currentColor").attr(T,k*i).attr("dy",p===sd?"0em":p===od?"0.71em":"0.32em"));t!==o&&(l=l.transition(t),e=e.transition(t),u=u.transition(t),d=d.transition(t),c=c.transition(t).attr("opacity",1e-6).attr("transform",function(t){return isFinite(t=s(t))?E(t+w):this.getAttribute("transform")}),h.attr("opacity",1e-6).attr("transform",function(t){var e=this.parentNode.__axis;return E((e&&isFinite(e=e(t))?e:s(t))+w)})),c.remove(),l.attr("d",4===p||2===p?x?"M"+k*x+","+n+"H"+w+"V"+a+"H"+k*x:"M"+w+","+n+"V"+a:x?"M"+n+","+k*x+"V"+w+"H"+a+"V"+k*x:"M"+n+","+w+"H"+a),e.attr("opacity",1).attr("transform",function(t){return E(s(t)+w)}),u.attr(T+"2",k*v),d.attr(T,k*i).text(r),o.filter(rd).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 me(e,"axis"),e.scale=function(t){return arguments.length?(g=t,e):g},e.ticks=function(){return f=Array.from(arguments),e},e.tickArguments=function(t){return arguments.length?(f=null==t?[]:Array.from(t),e):f.slice()},e.tickValues=function(t){return arguments.length?(m=null==t?null:Array.from(t),e):m&&m.slice()},e.tickFormat=function(t){return arguments.length?(y=t,e):y},e.tickSize=function(t){return arguments.length?(v=x=+t,e):v},e.tickSizeInner=function(t){return arguments.length?(v=+t,e):v},e.tickSizeOuter=function(t){return arguments.length?(x=+t,e):x},e.tickPadding=function(t){return arguments.length?(b=+t,e):b},e.offset=function(t){return arguments.length?(w=+t,e):w},e}function nd(t){return id(sd,t)}function ad(t){return id(od,t)}var sd,od,ld=t(()=>{Zu(),sd=1,od=3,me(Qu,"translateX"),me(Ju,"translateY"),me(td,"number"),me(ed,"center"),me(rd,"entering"),me(id,"axis"),me(nd,"axisTop"),me(ad,"axisBottom")}),cd=t(()=>{ld()});function hd(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new ud(i)}function ud(t){this._=t}function dd(t,i){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function pd(t,e){for(var r,i=0,n=t.length;i<n;++i)if((r=t[i]).name===e)return r.value}function gd(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=fd,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}var fd,md,yd,vd,xd=t(()=>{fd={value:me(()=>{},"value")},me(hd,"dispatch"),me(ud,"Dispatch"),me(dd,"parseTypenames"),ud.prototype=hd.prototype={constructor:ud,on:me(function(t,e){var r,i=this._,n=dd(t+"",i),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(r=(t=n[a]).type)i[r]=gd(i[r],t.name,e);else if(null==e)for(r in i)i[r]=gd(i[r],t.name,null);return this}for(;++a<s;)if(r=(r=(t=n[a]).type)&&pd(i[r],t.name))return r},"on"),copy:me(function(){var t,e={},r=this._;for(t in r)e[t]=r[t].slice();return new ud(e)},"copy"),call:me(function(t,e){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(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,n)},"call"),apply:me(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,a=i.length;n<a;++n)i[n].value.apply(e,r)},"apply")},me(pd,"get"),me(gd,"set"),md=hd}),bd=t(()=>{xd()}),wd=t(()=>{vd={svg:"http://www.w3.org/2000/svg",xhtml:yd="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 kd(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),vd.hasOwnProperty(e)?{space:vd[e],local:t}:t}var Td=t(()=>{wd(),me(kd,"default")});function Ed(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===yd&&t.documentElement.namespaceURI===yd?t.createElement(r):t.createElementNS(e,r)}}function Cd(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _d(t){return((t=kd(t)).local?Cd:Ed)(t)}var Sd=t(()=>{Td(),wd(),me(Ed,"creatorInherit"),me(Cd,"creatorFixed"),me(_d,"default")});function Ad(){}function Ld(t){return null==t?Ad:function(){return this.querySelector(t)}}var Nd=t(()=>{me(Ad,"none"),me(Ld,"default")});function Id(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,s,o=e[n],l=o.length,c=i[n]=new Array(l),h=0;h<l;++h)(a=o[h])&&(s=t.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),c[h]=s);return new ng(i,this._parents)}var Rd=t(()=>{cg(),Nd(),me(Id,"default")});function Md(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Dd=t(()=>{me(Md,"array")});function Od(){return[]}function Pd(t){return null==t?Od:function(){return this.querySelectorAll(t)}}var Bd=t(()=>{me(Od,"empty"),me(Pd,"default")});function Fd(t){return function(){return Md(t.apply(this,arguments))}}function $d(t){t=("function"==typeof t?Fd:Pd)(t);for(var e=this._groups,r=e.length,i=[],n=[],a=0;a<r;++a)for(var s,o=e[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(i.push(t.call(s,s.__data__,c,o)),n.push(s));return new ng(i,n)}var zd=t(()=>{cg(),Dd(),Bd(),me(Fd,"arrayAll"),me($d,"default")});function Gd(t){return function(){return this.matches(t)}}function Ud(e){return function(t){return t.matches(e)}}var qd=t(()=>{me(Gd,"default"),me(Ud,"childMatcher")});function jd(t){return function(){return Hd.call(this.children,t)}}function Wd(){return this.firstElementChild}function Yd(t){return this.select(null==t?Wd:jd("function"==typeof t?t:Ud(t)))}var Hd,Vd=t(()=>{qd(),Hd=Array.prototype.find,me(jd,"childFind"),me(Wd,"childFirst"),me(Yd,"default")});function Xd(){return Array.from(this.children)}function Kd(t){return function(){return Qd.call(this.children,t)}}function Zd(t){return this.selectAll(null==t?Xd:Kd("function"==typeof t?t:Ud(t)))}var Qd,Jd=t(()=>{qd(),Qd=Array.prototype.filter,me(Xd,"children"),me(Kd,"childrenFilter"),me(Zd,"default")});function t0(t){"function"!=typeof t&&(t=Gd(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,s=e[n],o=s.length,l=i[n]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new ng(i,this._parents)}var e0=t(()=>{cg(),qd(),me(t0,"default")});function r0(t){return new Array(t.length)}var i0=t(()=>{me(r0,"default")});function n0(){return new ng(this._enter||this._groups.map(r0),this._parents)}function a0(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var s0=t(()=>{i0(),cg(),me(n0,"default"),me(a0,"EnterNode"),a0.prototype={constructor:a0,appendChild:me(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:me(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:me(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:me(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function o0(t){return function(){return t}}var l0=t(()=>{me(o0,"default")});function c0(t,e,r,i,n,a){for(var s,o=0,l=e.length,c=a.length;o<c;++o)(s=e[o])?(s.__data__=a[o],i[o]=s):r[o]=new a0(t,a[o]);for(;o<l;++o)(s=e[o])&&(n[o]=s)}function h0(t,e,r,i,n,a,s){for(var o,l,c=new Map,h=e.length,u=a.length,d=new Array(h),p=0;p<h;++p)(o=e[p])&&(d[p]=l=s.call(o,o.__data__,p,e)+"",c.has(l)?n[p]=o:c.set(l,o));for(p=0;p<u;++p)l=s.call(t,a[p],p,a)+"",(o=c.get(l))?((i[p]=o).__data__=a[p],c.delete(l)):r[p]=new a0(t,a[p]);for(p=0;p<h;++p)(o=e[p])&&c.get(d[p])===o&&(n[p]=o)}function u0(t){return t.__data__}function d0(t,e){if(!arguments.length)return Array.from(this,u0);var r=e?h0:c0,i=this._parents,n=this._groups;"function"!=typeof t&&(t=o0(t));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=p0(t.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,e);for(var y,v,x=0,b=0;x<g;++x)if(y=f[x]){for(b<=x&&(b=x+1);!(v=m[b])&&++b<g;);y._next=v||null}}return(s=new ng(s,i))._enter=o,s._exit=l,s}function p0(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var g0=t(()=>{cg(),s0(),l0(),me(c0,"bindIndex"),me(h0,"bindKey"),me(u0,"datum"),me(d0,"default"),me(p0,"arraylike")});function f0(){return new ng(this._exit||this._groups.map(r0),this._parents)}var m0=t(()=>{i0(),cg(),me(f0,"default")});function y0(t,e,r){var i=this.enter(),n=this,a=this.exit(),i="function"==typeof t?(i=t(i))&&i.selection():i.append(t+"");return null!=e&&(n=(n=e(n))&&n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n}var v0=t(()=>{me(y0,"default")});function x0(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,i=e.length,t=r.length,n=Math.min(i,t),a=new Array(i),s=0;s<n;++s)for(var o,l=e[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]=e[s];return new ng(a,this._parents)}var b0=t(()=>{cg(),me(x0,"default")});function w0(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,n=t[e],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 k0=t(()=>{me(w0,"default")});function T0(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||E0,me(t,"compareNode");for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a){for(var s,o=e[a],l=o.length,c=n[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(t)}return new ng(n,this._parents).order()}function E0(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}var C0=t(()=>{cg(),me(T0,"default"),me(E0,"ascending")});function _0(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var S0=t(()=>{me(_0,"default")});function A0(){return Array.from(this)}var L0=t(()=>{me(A0,"default")});function N0(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}var I0=t(()=>{me(N0,"default")});function R0(){let t=0;for(var e of this)++t;return t}var M0=t(()=>{me(R0,"default")});function D0(){return!this.node()}var O0=t(()=>{me(D0,"default")});function P0(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n,a=e[r],s=0,o=a.length;s<o;++s)(n=a[s])&&t.call(n,n.__data__,s,a);return this}var B0=t(()=>{me(P0,"default")});function F0(t){return function(){this.removeAttribute(t)}}function $0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z0(t,e){return function(){this.setAttribute(t,e)}}function G0(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function U0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function q0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function j0(t,e){var r,t=kd(t);return arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?$0:F0:"function"==typeof e?t.local?q0:U0:t.local?G0:z0)(t,e))}var W0=t(()=>{Td(),me(F0,"attrRemove"),me($0,"attrRemoveNS"),me(z0,"attrConstant"),me(G0,"attrConstantNS"),me(U0,"attrFunction"),me(q0,"attrFunctionNS"),me(j0,"default")});function Y0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var H0=t(()=>{me(Y0,"default")});function V0(t){return function(){this.style.removeProperty(t)}}function X0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function K0(e,r,i){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,i)}}function Z0(t,e,r){return 1<arguments.length?this.each((null==e?V0:"function"==typeof e?K0:X0)(t,e,r??"")):Q0(this.node(),t)}function Q0(t,e){return t.style.getPropertyValue(e)||Y0(t).getComputedStyle(t,null).getPropertyValue(e)}var J0=t(()=>{H0(),me(V0,"styleRemove"),me(X0,"styleConstant"),me(K0,"styleFunction"),me(Z0,"default"),me(Q0,"styleValue")});function tp(t){return function(){delete this[t]}}function ep(t,e){return function(){this[t]=e}}function rp(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function ip(t,e){return 1<arguments.length?this.each((null==e?tp:"function"==typeof e?rp:ep)(t,e)):this.node()[t]}var np=t(()=>{me(tp,"propertyRemove"),me(ep,"propertyConstant"),me(rp,"propertyFunction"),me(ip,"default")});function ap(t){return t.trim().split(/^|\s+/)}function sp(t){return t.classList||new op(t)}function op(t){this._node=t,this._names=ap(t.getAttribute("class")||"")}function lp(t,e){for(var r=sp(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function cp(t,e){for(var r=sp(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function hp(t){return function(){lp(this,t)}}function up(t){return function(){cp(this,t)}}function dp(t,e){return function(){(e.apply(this,arguments)?lp:cp)(this,t)}}function pp(t,e){var r=ap(t+"");if(arguments.length<2){for(var i=sp(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof e?dp:e?hp:up)(r,e))}var gp=t(()=>{me(ap,"classArray"),me(sp,"classList"),me(op,"ClassList"),op.prototype={add:me(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:me(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:me(function(t){return 0<=this._names.indexOf(t)},"contains")},me(lp,"classedAdd"),me(cp,"classedRemove"),me(hp,"classedTrue"),me(up,"classedFalse"),me(dp,"classedFunction"),me(pp,"default")});function fp(){this.textContent=""}function mp(t){return function(){this.textContent=t}}function yp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function vp(t){return arguments.length?this.each(null==t?fp:("function"==typeof t?yp:mp)(t)):this.node().textContent}var xp=t(()=>{me(fp,"textRemove"),me(mp,"textConstant"),me(yp,"textFunction"),me(vp,"default")});function bp(){this.innerHTML=""}function wp(t){return function(){this.innerHTML=t}}function kp(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Tp(t){return arguments.length?this.each(null==t?bp:("function"==typeof t?kp:wp)(t)):this.node().innerHTML}var Ep=t(()=>{me(bp,"htmlRemove"),me(wp,"htmlConstant"),me(kp,"htmlFunction"),me(Tp,"default")});function Cp(){this.nextSibling&&this.parentNode.appendChild(this)}function _p(){return this.each(Cp)}var Sp=t(()=>{me(Cp,"raise"),me(_p,"default")});function Ap(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Lp(){return this.each(Ap)}var Np=t(()=>{me(Ap,"lower"),me(Lp,"default")});function Ip(t){var e="function"==typeof t?t:_d(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var Rp=t(()=>{Sd(),me(Ip,"default")});function Mp(){return null}function Dp(t,e){var r="function"==typeof t?t:_d(t),i=null==e?Mp:"function"==typeof e?e:Ld(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var Op=t(()=>{Sd(),Nd(),me(Mp,"constantNull"),me(Dp,"default")});function Pp(){var t=this.parentNode;t&&t.removeChild(this)}function Bp(){return this.each(Pp)}var Fp=t(()=>{me(Pp,"remove"),me(Bp,"default")});function $p(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gp(t){return this.select(t?zp:$p)}var Up=t(()=>{me($p,"selection_cloneShallow"),me(zp,"selection_cloneDeep"),me(Gp,"default")});function qp(t){return arguments.length?this.property("__data__",t):this.node().__data__}var jp=t(()=>{me(qp,"default")});function Wp(e){return function(t){e.call(this,t,this.__data__)}}function Yp(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return 0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}function Hp(a){return function(){var t=this.__on;if(t){for(var e,r=0,i=-1,n=t.length;r<n;++r)e=t[r],a.type&&e.type!==a.type||e.name!==a.name?t[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?t.length=i:delete this.__on}}}function Vp(a,s,o){return function(){var t,e=this.__on,r=Wp(s);if(e)for(var i=0,n=e.length;i<n;++i)if((t=e[i]).type===a.type&&t.name===a.name)return this.removeEventListener(t.type,t.listener,t.options),this.addEventListener(t.type,t.listener=r,t.options=o),void(t.value=s);this.addEventListener(a.type,r,o),t={type:a.type,name:a.name,value:s,listener:r,options:o},e?e.push(t):this.__on=[t]}}function Xp(t,e,r){var i,n,a=Yp(t+""),s=a.length;if(!(arguments.length<2)){for(o=e?Vp:Hp,i=0;i<s;++i)this.each(o(a[i],e,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 Kp=t(()=>{me(Wp,"contextListener"),me(Yp,"parseTypenames"),me(Hp,"onRemove"),me(Vp,"onAdd"),me(Xp,"default")});function Zp(t,e,r){var i=Y0(t),n=i.CustomEvent;"function"==typeof n?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function Qp(t,e){return function(){return Zp(this,t,e)}}function Jp(t,e){return function(){return Zp(this,t,e.apply(this,arguments))}}function tg(t,e){return this.each(("function"==typeof e?Jp:Qp)(t,e))}var eg=t(()=>{H0(),me(Zp,"dispatchEvent"),me(Qp,"dispatchConstant"),me(Jp,"dispatchFunction"),me(tg,"default")});function*rg(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,n=t[e],a=0,s=n.length;a<s;++a)(i=n[a])&&(yield i)}var ig=t(()=>{me(rg,"default")});function ng(t,e){this._groups=t,this._parents=e}function ag(){return new ng([[document.documentElement]],og)}function sg(){return this}var og,lg,cg=t(()=>{Rd(),zd(),Vd(),Jd(),e0(),g0(),s0(),m0(),v0(),b0(),k0(),C0(),S0(),L0(),I0(),M0(),O0(),B0(),W0(),J0(),np(),gp(),xp(),Ep(),Sp(),Np(),Rp(),Op(),Fp(),Up(),jp(),Kp(),eg(),ig(),og=[null],me(ng,"Selection"),me(ag,"selection"),me(sg,"selection_selection"),ng.prototype=ag.prototype={constructor:ng,select:Id,selectAll:$d,selectChild:Yd,selectChildren:Zd,filter:t0,data:d0,enter:n0,exit:f0,join:y0,merge:x0,selection:sg,order:w0,sort:T0,call:_0,nodes:A0,node:N0,size:R0,empty:D0,each:P0,attr:j0,style:Z0,property:ip,classed:pp,text:vp,html:Tp,raise:_p,lower:Lp,append:Ip,insert:Dp,remove:Bp,clone:Gp,datum:qp,on:Xp,dispatch:tg,[Symbol.iterator]:rg},lg=ag});function j(t){return"string"==typeof t?new ng([[document.querySelector(t)]],[document.documentElement]):new ng([[t]],og)}var hg=t(()=>{cg(),me(j,"default")}),ug=t(()=>{qd(),Td(),hg(),cg(),Nd(),Bd(),J0()}),dg=t(()=>{});function pg(t,e,r){(t.prototype=e.prototype=r).constructor=t}function gg(t,e){var r,i=Object.create(t.prototype);for(r in e)i[r]=e[r];return i}var fg=t(()=>{me(pg,"default"),me(gg,"extend")});function mg(){}function yg(){return this.rgb().formatHex()}function vg(){return this.rgb().formatHex8()}function xg(){return Dg(this).formatHsl()}function bg(){return this.rgb().formatRgb()}function wg(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=qg.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?kg(e):3===r?new _g(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Tg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Tg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=jg.exec(t))?new _g(e[1],e[2],e[3],1):(e=Wg.exec(t))?new _g(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Yg.exec(t))?Tg(e[1],e[2],e[3],e[4]):(e=Hg.exec(t))?Tg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Vg.exec(t))?Mg(e[1],e[2]/100,e[3]/100,1):(e=Xg.exec(t))?Mg(e[1],e[2]/100,e[3]/100,e[4]):Kg.hasOwnProperty(t)?kg(Kg[t]):"transparent"===t?new _g(NaN,NaN,NaN,0):null}function kg(t){return new _g(t>>16&255,t>>8&255,255&t,1)}function Tg(t,e,r,i){return new _g(t=i<=0?e=r=NaN:t,e,r,i)}function Eg(t){return(t=t instanceof mg?t:wg(t))?new _g((t=t.rgb()).r,t.g,t.b,t.opacity):new _g}function Cg(t,e,r,i){return 1===arguments.length?Eg(t):new _g(t,e,r,i??1)}function _g(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Sg(){return"#"+Rg(this.r)+Rg(this.g)+Rg(this.b)}function Ag(){return"#"+Rg(this.r)+Rg(this.g)+Rg(this.b)+Rg(255*(isNaN(this.opacity)?1:this.opacity))}function Lg(){var t=Ng(this.opacity);return(1===t?"rgb(":"rgba(")+Ig(this.r)+`, ${Ig(this.g)}, `+Ig(this.b)+(1===t?")":`, ${t})`)}function Ng(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ig(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rg(t){return((t=Ig(t))<16?"0":"")+t.toString(16)}function Mg(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Pg(t,e,r,i)}function Dg(t){var e,r,i,n,a,s,o,l;return t instanceof Pg?new Pg(t.h,t.s,t.l,t.opacity):(t=t instanceof mg?t:wg(t))?t instanceof Pg?t:(e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=NaN,l=((a=Math.max(e,r,i))+n)/2,(o=a-n)?(s=e===a?(r-i)/o+6*(r<i):r===a?(i-e)/o+2:(e-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=0<l&&l<1?0:s,new Pg(s,o,l,t.opacity)):new Pg}function Og(t,e,r,i){return 1===arguments.length?Dg(t):new Pg(t,e,r,i??1)}function Pg(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Bg(t){return(t=(t||0)%360)<0?t+360:t}function Fg(t){return Math.max(0,Math.min(1,t||0))}function $g(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}var zg,Gg,Ug,qg,jg,Wg,Yg,Hg,Vg,Xg,Kg,Zg,Qg,Jg=t(()=>{fg(),me(mg,"Color"),zg="\\s*([+-]?\\d+)\\s*",Gg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qg=/^#([0-9a-f]{3,8})$/,jg=new RegExp(`^rgb\\(${zg},${zg},${zg}\\)$`),Wg=new RegExp(`^rgb\\(${Ug},${Ug},${Ug}\\)$`),Yg=new RegExp(`^rgba\\(${zg},${zg},${zg},${Gg}\\)$`),Hg=new RegExp(`^rgba\\(${Ug},${Ug},${Ug},${Gg}\\)$`),Vg=new RegExp(`^hsl\\(${Gg},${Ug},${Ug}\\)$`),Xg=new RegExp(`^hsla\\(${Gg},${Ug},${Ug},${Gg}\\)$`),Kg={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},pg(mg,wg,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yg,formatHex:yg,formatHex8:vg,formatHsl:xg,formatRgb:bg,toString:bg}),me(yg,"color_formatHex"),me(vg,"color_formatHex8"),me(xg,"color_formatHsl"),me(bg,"color_formatRgb"),me(wg,"color"),me(kg,"rgbn"),me(Tg,"rgba"),me(Eg,"rgbConvert"),me(Cg,"rgb"),me(_g,"Rgb"),pg(_g,Cg,gg(mg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _g(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new _g(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _g(Ig(this.r),Ig(this.g),Ig(this.b),Ng(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:Sg,formatHex:Sg,formatHex8:Ag,formatRgb:Lg,toString:Lg})),me(Sg,"rgb_formatHex"),me(Ag,"rgb_formatHex8"),me(Lg,"rgb_formatRgb"),me(Ng,"clampa"),me(Ig,"clampi"),me(Rg,"hex"),me(Mg,"hsla"),me(Dg,"hslConvert"),me(Og,"hsl"),me(Pg,"Hsl"),pg(Pg,Og,gg(mg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pg(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Pg(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l;return new _g($g(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),$g(t,r,e),$g(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Pg(Bg(this.h),Fg(this.s),Fg(this.l),Ng(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 t=Ng(this.opacity);return(1===t?"hsl(":"hsla(")+Bg(this.h)+`, ${100*Fg(this.s)}%, ${100*Fg(this.l)}%`+(1===t?")":`, ${t})`)}})),me(Bg,"clamph"),me(Fg,"clampt"),me($g,"hsl2rgb")}),t1=t(()=>{Zg=Math.PI/180,Qg=180/Math.PI});function e1(t){var e,r,i,n,a,s;return t instanceof i1?new i1(t.l,t.a,t.b,t.opacity):t instanceof h1?u1(t):(n=n1(.2225045*(e=o1((t=t instanceof _g?t:Eg(t)).r))+.7168786*(r=o1(t.g))+.0606169*(i=o1(t.b))),e===r&&r===i?a=s=n:(a=n1((.4360747*e+.3850649*r+.1430804*i)/.96422),s=n1((.0139322*e+.0971045*r+.7141733*i)/.82521)),new i1(116*n-16,500*(a-n),200*(n-s),t.opacity))}function r1(t,e,r,i){return 1===arguments.length?e1(t):new i1(t,e,r,i??1)}function i1(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function n1(t){return f1<t?Math.pow(t,1/3):t/g1+d1}function a1(t){return p1<t?t*t*t:g1*(t-d1)}function s1(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function o1(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l1(t){var e;return t instanceof h1?new h1(t.h,t.c,t.l,t.opacity):0===(t=t instanceof i1?t:e1(t)).a&&0===t.b?new h1(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity):new h1((e=Math.atan2(t.b,t.a)*Qg)<0?360+e:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function c1(t,e,r,i){return 1===arguments.length?l1(t):new h1(t,e,r,i??1)}function h1(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function u1(t){var e;return isNaN(t.h)?new i1(t.l,0,0,t.opacity):(e=t.h*Zg,new i1(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity))}var d1,p1,g1,f1,m1=t(()=>{fg(),Jg(),t1(),d1=4/29,g1=3*(p1=6/29)*p1,f1=p1*p1*p1,me(e1,"labConvert"),me(r1,"lab"),me(i1,"Lab"),pg(i1,r1,gg(mg,{brighter(t){return new i1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new i1(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new _g(s1(3.1338561*(e=.96422*a1(e))-1.6168667*(t=+a1(t))-.4906146*(r=.82521*a1(r))),s1(-.9787684*e+1.9161415*t+.033454*r),s1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),me(n1,"xyz2lab"),me(a1,"lab2xyz"),me(s1,"lrgb2rgb"),me(o1,"rgb2lrgb"),me(l1,"hclConvert"),me(c1,"hcl"),me(h1,"Hcl"),me(u1,"hcl2lab"),pg(h1,c1,gg(mg,{brighter(t){return new h1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new h1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return u1(this).rgb()}}))}),y1=t(()=>{Jg(),m1()});function v1(t,e,r,i,n){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*i+s*n)/6}function x1(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],i=s[e+1],n=0<e?s[e-1]:2*r-i,a=e<o-1?s[e+2]:2*i-r;return v1((t-e/o)*o,n,r,i,a)}}var b1=t(()=>{me(v1,"basis"),me(x1,"default")});function w1(i){var n=i.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*n),r=i[(e+n-1)%n];return v1((t-e/n)*n,r,i[e%n],i[(e+1)%n],i[(e+2)%n])}}var k1,T1=t(()=>{b1(),me(w1,"default")}),E1=t(()=>{k1=me(t=>()=>t,"default")});function C1(e,r){return function(t){return e+t*r}}function _1(e,r,i){return e=Math.pow(e,i),r=Math.pow(r,i)-e,i=1/i,function(t){return Math.pow(e+t*r,i)}}function S1(t,e){var r=e-t;return r?C1(t,180<r||r<-180?r-360*Math.round(r/360):r):k1(isNaN(t)?e:t)}function A1(r){return 1==(r=+r)?L1:function(t,e){return e-t?_1(t,e,r):k1(isNaN(t)?e:t)}}function L1(t,e){var r=e-t;return r?C1(t,r):k1(isNaN(t)?e:t)}var N1=t(()=>{E1(),me(C1,"linear"),me(_1,"exponential"),me(S1,"hue"),me(A1,"gamma"),me(L1,"nogamma")});function I1(o){return function(t){for(var e,r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),s=0;s<r;++s)e=Cg(t[s]),i[s]=e.r||0,n[s]=e.g||0,a[s]=e.b||0;return i=o(i),n=o(n),a=o(a),e.opacity=1,function(t){return e.r=i(t),e.g=n(t),e.b=a(t),e+""}}}var R1,M1=t(()=>{y1(),b1(),T1(),N1(),R1=me(function t(e){var s=A1(e);function r(e,t){var r=s((e=Cg(e)).r,(t=Cg(t)).r),i=s(e.g,t.g),n=s(e.b,t.b),a=L1(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=n(t),e.opacity=a(t),e+""}}return me(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),me(I1,"rgbSpline"),I1(x1),I1(w1)});function D1(e,r){r=r||[];var i,n=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(i=0;i<n;++i)a[i]=e[i]*(1-t)+r[i]*t;return a}}function O1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var P1=t(()=>{me(D1,"default"),me(O1,"isNumberArray")});function B1(t,e){for(var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),a=new Array(r),s=0;s<i;++s)n[s]=Z1(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(t){for(s=0;s<i;++s)a[s]=n[s](t);return a}}var F1=t(()=>{Q1(),me(B1,"genericArray")});function $1(e,r){var i=new Date;return e=+e,r=+r,function(t){return i.setTime(e*(1-t)+r*t),i}}var z1=t(()=>{me($1,"default")});function G1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var U1=t(()=>{me(G1,"default")});function q1(t,e){var r,i={},n={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?i[r]=Z1(t[r],e[r]):n[r]=e[r];return function(t){for(r in i)n[r]=i[r](t);return n}}var j1=t(()=>{Q1(),me(q1,"default")});function W1(t){return function(){return t}}function Y1(e){return function(t){return e(t)+""}}function H1(t,i){var e,r,n,a=V1.lastIndex=X1.lastIndex=0,s=-1,o=[],l=[];for(t+="",i+="";(e=V1.exec(t))&&(r=X1.exec(i));)(n=r.index)>a&&(n=i.slice(a,n),o[s]?o[s]+=n:o[++s]=n),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:G1(e,r)})),a=X1.lastIndex;return a<i.length&&(n=i.slice(a),o[s]?o[s]+=n:o[++s]=n),o.length<2?l[0]?Y1(l[0].x):W1(i):(i=l.length,function(t){for(var e,r=0;r<i;++r)o[(e=l[r]).i]=e.x(t);return o.join("")})}var V1,X1,K1=t(()=>{U1(),V1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,X1=new RegExp(V1.source,"g"),me(W1,"zero"),me(Y1,"one"),me(H1,"default")});function Z1(t,e){var r=typeof e;return null==e||"boolean"==r?k1(e):("number"==r?G1:"string"==r?(r=wg(e))?(e=r,R1):H1:e instanceof wg?R1:e instanceof Date?$1:O1(e)?D1:Array.isArray(e)?B1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?q1:G1)(t,e)}var Q1=t(()=>{y1(),M1(),F1(),z1(),U1(),j1(),K1(),E1(),P1(),me(Z1,"default")});function J1(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var tf=t(()=>{me(J1,"default")});function ef(t,e,r,i,n,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),t*i<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(e,t)*rf,skewX:Math.atan(l)*rf,scaleX:s,scaleY:o}}var rf,nf,af=t(()=>{rf=180/Math.PI,nf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},me(ef,"default")});function sf(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?nf:ef(t.a,t.b,t.c,t.d,t.e,t.f)}function of(t){return null!=t&&((lf=lf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=lf.transform.baseVal.consolidate())?ef((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):nf}var lf,cf=t(()=>{af(),me(sf,"parseCss"),me(of,"parseSvg")});function hf(r,o,l,n){function c(t){return t.length?t.pop()+" ":""}function i(t,e,r,i,n,a){var s;t!==r||e!==i?(s=n.push("translate(",null,o,null,l),a.push({i:s-4,x:G1(t,r)},{i:s-2,x:G1(e,i)})):(r||i)&&n.push("translate("+r+o+i+l)}function s(t,e,r,i){t!==e?(180<t-e?e+=360:180<e-t&&(t+=360),i.push({i:r.push(c(r)+"rotate(",null,n)-2,x:G1(t,e)})):e&&r.push(c(r)+"rotate("+e+n)}function h(t,e,r,i){t!==e?i.push({i:r.push(c(r)+"skewX(",null,n)-2,x:G1(t,e)}):e&&r.push(c(r)+"skewX("+e+n)}function u(t,e,r,i,n,a){var s;t!==r||e!==i?(s=n.push(c(n)+"scale(",null,",",null,")"),a.push({i:s-4,x:G1(t,r)},{i:s-2,x:G1(e,i)})):1===r&&1===i||n.push(c(n)+"scale("+r+","+i+")")}return me(c,"pop"),me(i,"translate"),me(s,"rotate"),me(h,"skewX"),me(u,"scale"),function(t,e){var n=[],a=[];return t=r(t),e=r(e),i(t.translateX,t.translateY,e.translateX,e.translateY,n,a),s(t.rotate,e.rotate,n,a),h(t.skewX,e.skewX,n,a),u(t.scaleX,t.scaleY,e.scaleX,e.scaleY,n,a),function(t){for(var e,r=-1,i=a.length;++r<i;)n[(e=a[r]).i]=e.x(t);return n.join("")}}}var uf,df,pf=t(()=>{U1(),cf(),me(hf,"interpolateTransform"),uf=hf(sf,"px, ","px)","deg)"),df=hf(of,", ",")",")")});function gf(s){return function(e,t){var r=s((e=c1(e)).h,(t=c1(t)).h),i=L1(e.c,t.c),n=L1(e.l,t.l),a=L1(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=n(t),e.opacity=a(t),e+""}}}var ff,mf=t(()=>{y1(),N1(),me(gf,"hcl"),ff=gf(S1),gf(L1)}),yf=t(()=>{Q1(),U1(),tf(),K1(),pf(),M1(),mf()});function vf(){return Df||(Bf(xf),Df=Pf.now()+Of)}function xf(){Df=0}function bf(){this._call=this._time=this._next=null}function wf(t,e,r){var i=new bf;return i.restart(t,e,r),i}function kf(){vf(),++Sf;for(var t,e=If;e;)0<=(t=Df-e._time)&&e._call.call(void 0,t),e=e._next;--Sf}function Tf(){Df=(Mf=Pf.now())+Of,Sf=Af=0;try{kf()}finally{Sf=0,Cf(),Df=0}}function Ef(){var t=Pf.now(),e=t-Mf;Nf<e&&(Of-=e,Mf=t)}function Cf(){for(var t,e,r=If,i=1/0;r;)r=r._call?(i>r._time&&(i=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:If=e);Rf=t,_f(i)}function _f(t){Sf||(Af=Af&&clearTimeout(Af),24<t-Df?(t<1/0&&(Af=setTimeout(Tf,t-Pf.now()-Of)),Lf=Lf&&clearInterval(Lf)):(Lf||(Mf=Pf.now(),Lf=setInterval(Ef,Nf)),Sf=1,Bf(Tf)))}var Sf,Af,Lf,Nf,If,Rf,Mf,Df,Of,Pf,Bf,Ff=t(()=>{Nf=1e3,Of=Df=Mf=Lf=Af=Sf=0,Pf="object"==typeof performance&&performance.now?performance:Date,Bf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},me(vf,"now"),me(xf,"clearNow"),me(bf,"Timer"),bf.prototype=wf.prototype={constructor:bf,restart:me(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?vf():+r)+(null==e?0:+e),this._next||Rf===this||(Rf?Rf._next=this:If=this,Rf=this),this._call=t,this._time=r,_f()},"restart"),stop:me(function(){this._call&&(this._call=null,this._time=1/0,_f())},"stop")},me(wf,"timer"),me(kf,"timerFlush"),me(Tf,"wake"),me(Ef,"poke"),me(Cf,"nap"),me(_f,"sleep")});function $f(e,r,t){var i=new bf;return r=null==r?0:+r,i.restart(t=>{i.stop(),e(t+r)},r,t),i}var zf=t(()=>{Ff(),me($f,"default")}),Gf=t(()=>{Ff(),zf()});function Uf(t,e,r,i,n,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Yf(t,r,{name:e,index:i,group:n,on:Hf,tween:Vf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Xf})}function qf(t,e){if((t=Wf(t,e)).state>Xf)throw new Error("too late; already scheduled");return t}function jf(t,e){if((t=Wf(t,e)).state>Qf)throw new Error("too late; already running");return t}function Wf(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function Yf(a,s,o){var l,c=a.__transition;function t(t){o.state=Kf,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,i,n;if(o.state!==Kf)return d();for(e in c)if(n=c[e],n.name===o.name){if(n.state===Qf)return $f(h);n.state===Jf?(n.state=em,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete c[e]):+e<s&&(n.state=em,n.timer.stop(),n.on.call("cancel",a,a.__data__,n.index,n.group),delete c[e])}if($f(function(){o.state===Qf&&(o.state=Jf,o.timer.restart(u,o.delay,o.time),u(t))}),o.state=Zf,o.on.call("start",a,a.__data__,o.index,o.group),o.state===Zf){for(o.state=Qf,l=new Array(i=o.tween.length),e=0,r=-1;e<i;++e)(n=o.tween[e].value.call(a,a.__data__,o.index,o.group))&&(l[++r]=n);l.length=r+1}}function u(t){for(var e=t<o.duration?o.ease.call(null,t/o.duration):(o.timer.restart(d),o.state=tm,1),r=-1,i=l.length;++r<i;)l[r].call(a,e);o.state===tm&&(o.on.call("end",a,a.__data__,o.index,o.group),d())}function d(){for(var t in o.state=em,o.timer.stop(),delete c[s],c)return;delete a.__transition}(c[s]=o).timer=wf(t,0,o.time),me(t,"schedule"),me(h,"start"),me(u,"tick"),me(d,"stop")}var Hf,Vf,Xf,Kf,Zf,Qf,Jf,tm,em,rm=t(()=>{bd(),Gf(),Hf=md("start","end","cancel","interrupt"),Vf=[],Xf=0,Kf=1,Zf=2,Qf=3,Jf=4,tm=5,em=6,me(Uf,"default"),me(qf,"init"),me(jf,"set"),me(Wf,"get"),me(Yf,"create")});function im(t,e){var r,i,n,a=t.__transition,s=!0;if(a){for(n in e=null==e?null:e+"",a)(r=a[n]).name!==e?s=!1:(i=Zf<r.state&&r.state<tm,r.state=em,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[n]);s&&delete t.__transition}}var nm=t(()=>{rm(),me(im,"default")});function am(t){return this.each(function(){im(this,t)})}var sm=t(()=>{nm(),me(am,"default")});function om(n,a){var s,o;return function(){var t=jf(this,n),e=t.tween;if(e!==s)for(var r=0,i=(o=s=e).length;r<i;++r)if(o[r].name===a){(o=o.slice()).splice(r,1);break}t.tween=o}}function lm(a,s,o){var l,c;if("function"!=typeof o)throw new Error;return function(){var t=jf(this,a),e=t.tween;if(e!==l){c=(l=e).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)}t.tween=c}}function cm(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=Wf(this.node(),r).tween,a=0,s=n.length;a<s;++a)if((i=n[a]).name===t)return i.value;return null}return this.each((null==e?om:lm)(r,t,e))}function hm(t,e,r){var i=t._id;return t.each(function(){var t=jf(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Wf(t,i).value[e]}}var um=t(()=>{rm(),me(om,"tweenRemove"),me(lm,"tweenFunction"),me(cm,"default"),me(hm,"tweenValue")});function dm(t,e){var r;return("number"==typeof e?G1:e instanceof wg?R1:(r=wg(e))?(e=r,R1):H1)(t,e)}var pm=t(()=>{y1(),yf(),me(dm,"default")});function gm(t){return function(){this.removeAttribute(t)}}function fm(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mm(e,r,i){var n,a,s=i+"";return function(){var t=this.getAttribute(e);return t===s?null:t===n?a:a=r(n=t,i)}}function ym(e,r,i){var n,a,s=i+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===n?a:a=r(n=t,i)}}function vm(i,n,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(i):(t=this.getAttribute(i))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=n(s=t,r))}}function xm(i,n,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(i.space,i.local):(t=this.getAttributeNS(i.space,i.local))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=n(s=t,r))}}function bm(t,e){var r=kd(t),i="transform"===r?df:dm;return this.attrTween(t,"function"==typeof e?(r.local?xm:vm)(r,i,hm(this,"attr."+t,e)):null==e?(r.local?fm:gm)(r):(r.local?ym:mm)(r,i,e))}var wm=t(()=>{yf(),ug(),um(),pm(),me(gm,"attrRemove"),me(fm,"attrRemoveNS"),me(mm,"attrConstant"),me(ym,"attrConstantNS"),me(vm,"attrFunction"),me(xm,"attrFunctionNS"),me(bm,"default")});function km(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Tm(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Em(e,r){var i,n;function t(){var t=r.apply(this,arguments);return i=t!==n?(n=t)&&Tm(e,t):i}return me(t,"tween"),t._value=r,t}function Cm(e,r){var i,n;function t(){var t=r.apply(this,arguments);return i=t!==n?(n=t)&&km(e,t):i}return me(t,"tween"),t._value=r,t}function _m(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return t=kd(t),this.tween(r,(t.local?Em:Cm)(t,e))}var Sm=t(()=>{ug(),me(km,"attrInterpolate"),me(Tm,"attrInterpolateNS"),me(Em,"attrTweenNS"),me(Cm,"attrTween"),me(_m,"default")});function Am(t,e){return function(){qf(this,t).delay=+e.apply(this,arguments)}}function Lm(t,e){return e=+e,function(){qf(this,t).delay=e}}function Nm(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Am:Lm)(e,t)):Wf(this.node(),e).delay}var Im=t(()=>{rm(),me(Am,"delayFunction"),me(Lm,"delayConstant"),me(Nm,"default")});function Rm(t,e){return function(){jf(this,t).duration=+e.apply(this,arguments)}}function Mm(t,e){return e=+e,function(){jf(this,t).duration=e}}function Dm(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rm:Mm)(e,t)):Wf(this.node(),e).duration}var Om=t(()=>{rm(),me(Rm,"durationFunction"),me(Mm,"durationConstant"),me(Dm,"default")});function Pm(t,e){if("function"!=typeof e)throw new Error;return function(){jf(this,t).ease=e}}function Bm(t){var e=this._id;return arguments.length?this.each(Pm(e,t)):Wf(this.node(),e).ease}var Fm=t(()=>{rm(),me(Pm,"easeConstant"),me(Bm,"default")});function $m(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;jf(this,e).ease=t}}function zm(t){if("function"!=typeof t)throw new Error;return this.each($m(this._id,t))}var Gm=t(()=>{rm(),me($m,"easeVarying"),me(zm,"default")});function Um(t){"function"!=typeof t&&(t=Gd(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var a,s=e[n],o=s.length,l=i[n]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new Ly(i,this._parents,this._name,this._id)}var qm=t(()=>{ug(),Dy(),me(Um,"default")});function jm(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,t=r.length,n=Math.min(i,t),a=new Array(i),s=0;s<n;++s)for(var o,l=e[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]=e[s];return new Ly(a,this._parents,this._name,this._id)}var Wm=t(()=>{Dy(),me(jm,"default")});function Ym(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return!(t=0<=e?t.slice(0,e):t)||"start"===t})}function Hm(r,i,n){var a,s,o=Ym(i)?qf:jf;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(i,n),t.on=s}}function Vm(t,e){var r=this._id;return arguments.length<2?Wf(this.node(),r).on.on(t):this.each(Hm(r,t,e))}var Xm=t(()=>{rm(),me(Ym,"start"),me(Hm,"onFunction"),me(Vm,"default")});function Km(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Zm(){return this.on("end.remove",Km(this._id))}var Qm=t(()=>{me(Km,"removeFunction"),me(Zm,"default")});function Jm(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Ld(t));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=t.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,Uf(u[d],e,r,d,u,Wf(o,r)));return new Ly(a,this._parents,e,r)}var ty=t(()=>{ug(),Dy(),rm(),me(Jm,"default")});function ey(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Pd(t));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=t.call(l,l.__data__,u,c),g=Wf(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Uf(d,e,r,f,p,g);a.push(p),s.push(l)}return new Ly(a,s,e,r)}var ry=t(()=>{ug(),Dy(),rm(),me(ey,"default")});function iy(){return new ny(this._groups,this._parents)}var ny,ay=t(()=>{ug(),ny=lg.prototype.constructor,me(iy,"default")});function sy(r,i){var n,a,s;return function(){var t=Q0(this,r),e=(this.style.removeProperty(r),Q0(this,r));return t===e?null:t===n&&e===a?s:s=i(n=t,a=e)}}function oy(t){return function(){this.style.removeProperty(t)}}function ly(e,r,i){var n,a,s=i+"";return function(){var t=Q0(this,e);return t===s?null:t===n?a:a=r(n=t,i)}}function cy(i,n,a){var s,o,l;return function(){var t=Q0(this,i),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(i),r=e=Q0(this,i)),t===r?null:t===s&&r===o?l:(o=r,l=n(s=t,e))}}function hy(i,n){var a,s,o,l,c="style."+n,h="end."+c;return function(){var t=jf(this,i),e=t.on,r=null==t.value[c]?l=l||oy(n):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function uy(t,e,r){var i="transform"==(t+="")?uf:dm;return null==e?this.styleTween(t,sy(t,i)).on("end.style."+t,oy(t)):"function"==typeof e?this.styleTween(t,cy(t,i,hm(this,"style."+t,e))).each(hy(this._id,t)):this.styleTween(t,ly(t,i,e),r).on("end.style."+t,null)}var dy=t(()=>{yf(),ug(),rm(),um(),pm(),me(sy,"styleNull"),me(oy,"styleRemove"),me(ly,"styleConstant"),me(cy,"styleFunction"),me(hy,"styleMaybeRemove"),me(uy,"default")});function py(e,r,i){return function(t){this.style.setProperty(e,r.call(this,t),i)}}function gy(e,r,i){var n,a;function t(){var t=r.apply(this,arguments);return n=t!==a?(a=t)&&py(e,t,i):n}return me(t,"tween"),t._value=r,t}function fy(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,gy(t,e,r??""))}var my=t(()=>{me(py,"styleInterpolate"),me(gy,"styleTween"),me(fy,"default")});function yy(t){return function(){this.textContent=t}}function vy(e){return function(){var t=e(this);this.textContent=t??""}}function xy(t){return this.tween("text","function"==typeof t?vy(hm(this,"text",t)):yy(null==t?"":t+""))}var by=t(()=>{um(),me(yy,"textConstant"),me(vy,"textFunction"),me(xy,"default")});function wy(e){return function(t){this.textContent=e.call(this,t)}}function ky(e){var r,i;function t(){var t=e.apply(this,arguments);return r=t!==i?(i=t)&&wy(t):r}return me(t,"tween"),t._value=e,t}function Ty(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,ky(t))}var Ey=t(()=>{me(wy,"textInterpolate"),me(ky,"textTween"),me(Ty,"default")});function Cy(){for(var t=this._name,e=this._id,r=++Ry,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])&&Uf(s,t,r,c,o,{time:(s=Wf(s,e)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new Ly(i,this._parents,t,r)}var _y=t(()=>{Dy(),rm(),me(Cy,"default")});function Sy(){var n,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},i={value:me(function(){0==--l&&t()},"value")};s.each(function(){var t=jf(this,o),e=t.on;e!==n&&((a=(n=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(i)),t.on=a}),0===l&&t()})}var Ay=t(()=>{rm(),me(Sy,"default")});function Ly(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ny(t){return lg().transition(t)}function Iy(){return++Ry}var Ry,My,Dy=t(()=>{ug(),wm(),Sm(),Im(),Om(),Fm(),Gm(),qm(),Wm(),Xm(),Qm(),ty(),ry(),ay(),dy(),my(),by(),Ey(),_y(),um(),Ay(),Ry=0,me(Ly,"Transition"),me(Ny,"transition"),me(Iy,"newId"),My=lg.prototype,Ly.prototype=Ny.prototype={constructor:Ly,select:Jm,selectAll:ey,selectChild:My.selectChild,selectChildren:My.selectChildren,filter:Um,merge:jm,selection:iy,transition:Cy,call:My.call,nodes:My.nodes,node:My.node,size:My.size,empty:My.empty,each:My.each,on:Vm,attr:bm,attrTween:_m,style:uy,styleTween:fy,text:xy,textTween:Ty,remove:Zm,tween:cm,delay:Nm,duration:Dm,ease:Bm,easeVarying:zm,end:Sy,[Symbol.iterator]:My[Symbol.iterator]}});function Oy(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Py=t(()=>{me(Oy,"cubicInOut")}),By=t(()=>{Py()});function Fy(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function $y(t){var e,r;t=t instanceof Ly?(e=t._id,t._name):(e=++Ry,(r=zy).time=vf(),null==t?null:t+"");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])&&Uf(s,t,e,c,o,r||Fy(s,e));return new Ly(i,this._parents,t,e)}var zy,Gy=t(()=>{Dy(),rm(),By(),Gf(),zy={time:null,delay:0,duration:250,ease:Oy},me(Fy,"inherit"),me($y,"default")}),Uy=t(()=>{ug(),sm(),Gy(),lg.prototype.interrupt=am,lg.prototype.transition=$y}),qy=t(()=>{Uy()}),jy=t(()=>{}),Wy=t(()=>{}),Yy=t(()=>{});function Hy(t){return[+t[0],+t[1]]}function Vy(t){return[Hy(t[0]),Hy(t[1])]}function Xy(t){return{type:t}}var Ky,Zy,Qy,Jy=t(()=>{qy(),jy(),Wy(),Yy(),{abs:Ky,max:Zy,min:Qy}=Math,me(Hy,"number1"),me(Vy,"number2"),["w","e"].map(Xy),me(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),me(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(Xy),me(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),me(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(Xy),me(function(t){return null==t?null:Vy(t)},"input"),me(function(t){return t},"output"),me(Xy,"type")}),t2=t(()=>{Jy()});function e2(r){this._+=r[0];for(let t=1,e=r.length;t<e;++t)this._+=arguments[t]+r[t]}function r2(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return e2;let i=10**e;return function(r){this._+=r[0];for(let t=1,e=r.length;t<e;++t)this._+=Math.round(arguments[t]*i)/i+r[t]}}function i2(){return new l2}var n2,a2,s2,o2,l2,c2=t(()=>{n2=Math.PI,o2=(a2=2*n2)-(s2=1e-6),me(e2,"append"),me(r2,"appendRound"),l2=class{static{me(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?e2:r2(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,n,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(t,e,r,i,n){if(t=+t,e=+e,r=+r,i=+i,(n=+n)<0)throw new Error("negative radius: "+n);var a,s,o=this._x1,l=this._y1,c=r-t,h=i-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:s2<p&&(Math.abs(d*c-h*u)>s2&&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((n2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>s2&&this._append`L${t+p*u},${e+p*d}`,this._append`A${n},${n},0,0,${+(u*o<d*r)},${this._x1=t+i*c},${this._y1=e+i*h}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,r,i,n,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var s=r*Math.cos(i),o=r*Math.sin(i),l=t+s,c=e+o,h=1^a,a=a?i-n:n-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>s2||Math.abs(this._y1-c)>s2)&&this._append`L${l},${c}`,r&&((a=a<0?a%a2+a2:a)>o2?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:s2<a&&this._append`A${r},${r},0,${+(n2<=a)},${h},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}},me(i2,"path"),i2.prototype=l2.prototype}),h2=t(()=>{c2()}),u2=t(()=>{}),d2=t(()=>{}),p2=t(()=>{}),g2=t(()=>{}),f2=t(()=>{}),m2=t(()=>{}),y2=t(()=>{});function v2(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function x2(t,e){var r;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(r=t.slice(0,e)).length?r[0]+r.slice(2):r,+t.slice(e+1)]}var b2=t(()=>{me(v2,"default"),me(x2,"formatDecimalParts")});function w2(t){return(t=x2(Math.abs(t)))?t[1]:NaN}var k2=t(()=>{b2(),me(w2,"default")});function T2(o,l){return function(t,e){for(var r=t.length,i=[],n=0,a=o[0],s=0;0<r&&0<a&&(e<s+a+1&&(a=Math.max(1,e-s)),i.push(t.substring(r-=a,r+a)),!((s+=a+1)>e));)a=o[n=(n+1)%o.length];return i.reverse().join(l)}}var E2=t(()=>{me(T2,"default")});function C2(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var _2=t(()=>{me(C2,"default")});function S2(t){var e;if(e=L2.exec(t))return new A2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function A2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}var L2,N2=t(()=>{L2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,me(S2,"formatSpecifier"),S2.prototype=A2.prototype,me(A2,"FormatSpecifier"),A2.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 I2(t){t:for(var e,r=t.length,i=1,n=-1;i<r;++i)switch(t[i]){case".":n=e=i;break;case"0":0===n&&(n=i),e=i;break;default:if(!+t[i])break t;0<n&&(n=0)}return 0<n?t.slice(0,n)+t.slice(e+1):t}var R2=t(()=>{me(I2,"default")});function M2(t,e){var r,i,n=x2(t,e);return n?(r=n[0],(n=(n=n[1])-(D2=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")+x2(t,Math.max(0,e+n-1))[0]):t+""}var D2,O2=t(()=>{b2(),me(M2,"default")});function P2(t,e){var r;return(e=x2(t,e))?(r=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+r:r.length>e+1?r.slice(0,e+1)+"."+r.slice(e+1):r+new Array(e-r.length+2).join("0")):t+""}var B2,F2=t(()=>{b2(),me(P2,"default")}),$2=t(()=>{b2(),O2(),F2(),B2={"%":me((t,e)=>(100*t).toFixed(e),"%"),b:me(t=>Math.round(t).toString(2),"b"),c:me(t=>t+"","c"),d:v2,e:me((t,e)=>t.toExponential(e),"e"),f:me((t,e)=>t.toFixed(e),"f"),g:me((t,e)=>t.toPrecision(e),"g"),o:me(t=>Math.round(t).toString(8),"o"),p:me((t,e)=>P2(100*t,e),"p"),r:P2,s:M2,X:me(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:me(t=>Math.round(t).toString(16),"x")}});function z2(t){return t}var G2=t(()=>{me(z2,"default")});function U2(t){var k=void 0===t.grouping||void 0===t.thousands?z2:T2(q2.call(t.grouping,Number),t.thousands+""),i=void 0===t.currency?"":t.currency[0]+"",n=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?z2:C2(q2.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",C=void 0===t.minus?"":t.minus+"",_=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=S2(t)).fill,h=t.align,u=t.sign,e=t.symbol,d=t.zero,p=t.width,g=t.comma,f=t.precision,m=t.trim,y=t.type,v=("n"===y?(g=!0,y="g"):B2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?i:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?n:/[%p]/.test(y)?a:"",b=B2[y],w=/[defgprs%]/.test(y);function r(t){var e,r,i,n=v,a=x;if("c"===y)a=b(t)+a,t="";else{var s=(t=+t)<0||1/t<0;if(t=isNaN(t)?_:b(Math.abs(t),f),m&&(t=I2(t)),n=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+n,a=("s"===y?j2[8+D2/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e<r;)if((i=t.charCodeAt(e))<48||57<i){a=(46===i?T+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}g&&!d&&(t=k(t,1/0));var o=n.length+t.length+a.length,l=o<p?new Array(p-o+1).join(c):"";switch(g&&d&&(t=k(l+t,l.length?p-a.length:1/0),l=""),h){case"<":t=n+t+a+l;break;case"=":t=n+l+t+a;break;case"^":t=l.slice(0,o=l.length>>1)+n+t+a+l.slice(o);break;default:t=l+n+t+a}return E(t)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),me(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=s(((t=S2(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(w2(e)/3))),i=Math.pow(10,-t),n=j2[8+t/3];return function(t){return r(i*t)+n}}return me(s,"newFormat"),me(e,"formatPrefix"),{format:s,formatPrefix:e}}var q2,j2,W2=t(()=>{k2(),E2(),_2(),N2(),R2(),$2(),O2(),G2(),q2=Array.prototype.map,j2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],me(U2,"default")});function Y2(t){return H2=U2(t),V2=H2.format,X2=H2.formatPrefix,H2}var H2,V2,X2,K2=t(()=>{W2(),Y2({thousands:",",grouping:[3],currency:["$",""]}),me(Y2,"defaultLocale")});function Z2(t){return Math.max(0,-w2(Math.abs(t)))}var Q2=t(()=>{k2(),me(Z2,"default")});function J2(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(w2(e)/3)))-w2(Math.abs(t)))}var tv=t(()=>{k2(),me(J2,"default")});function ev(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,w2(e)-w2(t))+1}var rv=t(()=>{k2(),me(ev,"default")}),iv=t(()=>{K2(),N2(),Q2(),tv(),rv()}),nv=t(()=>{}),av=t(()=>{}),sv=t(()=>{}),ov=t(()=>{});function lv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var cv=t(()=>{me(lv,"initRange")});function hv(){var r=new Mu,i=[],n=[],a=uv;function s(t){let e=r.get(t);if(void 0===e){if(a!==uv)return a;r.set(t,e=i.push(t)-1)}return n[e%n.length]}return me(s,"scale"),s.domain=function(t){if(!arguments.length)return i.slice();i=[],r=new Mu;for(var e of t)r.has(e)||r.set(e,i.push(e)-1);return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return hv(i,n).unknown(a)},lv.apply(s,arguments),s}var uv,dv=t(()=>{Xu(),cv(),uv=Symbol("implicit"),me(hv,"ordinal")});function pv(){var n,a,t=hv().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c<l,r=e?c:l,i=(n=((i=e?l:c)-r)/Math.max(1,t-u+2*d),h&&(n=Math.floor(n)),r+=(i-r-n*(t-u))*p,a=n*(1-u),h&&(r=Math.round(r),a=Math.round(a)),Hu(t).map(function(t){return r+n*t}));return o(e?i.reverse():i)}return delete t.unknown,me(e,"rescale"),t.domain=function(t){return(arguments.length?(s(t),e):s)()},t.range=function(t){return arguments.length?([l,c]=t,l=+l,c=+c,e()):[l,c]},t.rangeRound=function(t){return[l,c]=t,l=+l,c=+c,h=!0,e()},t.bandwidth=function(){return a},t.step=function(){return n},t.round=function(t){return arguments.length?(h=!!t,e()):h},t.padding=function(t){return arguments.length?(u=Math.min(1,d=+t),e()):u},t.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),e()):u},t.paddingOuter=function(t){return arguments.length?(d=+t,e()):d},t.align=function(t){return arguments.length?(p=Math.max(0,Math.min(1,t)),e()):p},t.copy=function(){return pv(s(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},lv.apply(e(),arguments)}var gv=t(()=>{Xu(),cv(),dv(),me(pv,"band")});function fv(t){return function(){return t}}var mv=t(()=>{me(fv,"constants")});function yv(t){return+t}var vv=t(()=>{me(yv,"number")});function xv(t){return t}function bv(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:fv(isNaN(r)?NaN:.5)}function wv(e,r){var t;return r<e&&(t=e,e=r,r=t),function(t){return Math.max(e,Math.min(r,t))}}function kv(t,e,r){var i=t[0],t=t[1],n=e[0],e=e[1],n=t<i?(i=bv(t,i),r(e,n)):(i=bv(i,t),r(n,e));return function(t){return n(i(t))}}function Tv(r,t,e){var i=Math.min(r.length,t.length)-1,n=new Array(i),a=new Array(i),s=-1;for(r[i]<r[0]&&(r=r.slice().reverse(),t=t.slice().reverse());++s<i;)n[s]=bv(r[s],r[s+1]),a[s]=e(t[s],t[s+1]);return function(t){var e=_u(r,t,1,i)-1;return a[e](n[e](t))}}function Ev(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Cv(){var r,i,e,n,a,s,o=Sv,l=Sv,c=Z1,h=xv;function u(){var t=Math.min(o.length,l.length);return h!==xv&&(h=wv(o[0],o[t-1])),n=2<t?Tv:kv,a=s=null,d}function d(t){return null==t||isNaN(t=+t)?e:(a=a||n(o.map(r),l,c))(r(h(t)))}return me(u,"rescale"),me(d,"scale"),d.invert=function(t){return h(i((s=s||n(l,o.map(r),G1))(t)))},d.domain=function(t){return arguments.length?(o=Array.from(t,yv),u()):o.slice()},d.range=function(t){return arguments.length?(l=Array.from(t),u()):l.slice()},d.rangeRound=function(t){return l=Array.from(t),c=J1,u()},d.clamp=function(t){return arguments.length?(h=!!t||xv,u()):h!==xv},d.interpolate=function(t){return arguments.length?(c=t,u()):c},d.unknown=function(t){return arguments.length?(e=t,d):e},function(t,e){return r=t,i=e,u()}}function _v(){return Cv()(xv,xv)}var Sv,Av=t(()=>{Xu(),yf(),mv(),vv(),Sv=[0,1],me(xv,"identity"),me(bv,"normalize"),me(wv,"clamper"),me(kv,"bimap"),me(Tv,"polymap"),me(Ev,"copy"),me(Cv,"transformer"),me(_v,"continuous")});function Lv(t,e,r,i){var n,a=Fu(t,e,r);switch((i=S2(i??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(n=J2(a,s))||(i.precision=n),X2(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=ev(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=Z2(a))||(i.precision=n-2*("%"===i.type))}return V2(i)}var Nv=t(()=>{Xu(),iv(),me(Lv,"tickFormat")});function Iv(c){var h=c.domain;return c.ticks=function(t){var e=h();return Pu(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return Lv(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,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=Bu(s,o,t))===e)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}e=r}return c},c}function Rv(){var t=_v();return t.copy=function(){return Ev(t,Rv())},lv.apply(t,arguments),Iv(t)}var Mv=t(()=>{Xu(),Av(),cv(),Nv(),me(Iv,"linearish"),me(Rv,"linear")});function Dv(t,e){var r,i=0,n=(t=t.slice()).length-1,a=t[i],s=t[n];return s<a&&(r=i,i=n,n=r,r=a,a=s,s=r),t[i]=e.floor(a),t[n]=e.ceil(s),t}var Ov=t(()=>{me(Dv,"nice")});function Pv(a,s,r,i){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return me(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,e)=>(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var i,n=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),t<e&&0<r)for(;n.push(i=new Date(+t)),s(t,r),a(t),i<t&&t<e;);return n},o.filter=r=>Pv(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(Bv.setTime(+t),Fv.setTime(+e),a(Bv),a(Fv),Math.floor(r(Bv,Fv))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0<e?1<e?o.filter(i?t=>i(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var Bv,Fv,$v,zv,Gv,Uv,qv,jv,Wv,Yv,Hv,Vv=t(()=>{Bv=new Date,Fv=new Date,me(Pv,"timeInterval")}),Xv=t(()=>{Vv(),($v=Pv(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?Pv(t=>{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):$v:null)}),Kv=t(()=>{Vv(),(zv=Pv(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Zv=t(()=>{Vv(),(Gv=Pv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())).range,(Uv=Pv(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),Qv=t(()=>{Vv(),(qv=Pv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())).range,(jv=Pv(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),Jv=t(()=>{Vv(),(Wv=Pv(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)).range,(Yv=Pv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(Hv=Pv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5))).range});function tx(e){return Pv(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}function ex(e){return Pv(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}var rx,ix,nx,ax,sx,ox,lx,cx,hx,ux,dx,px,gx,fx,mx,yx,vx,xx,bx=t(()=>{Vv(),me(tx,"timeWeekday"),rx=tx(0),ix=tx(1),nx=tx(2),ax=tx(3),sx=tx(4),ox=tx(5),lx=tx(6),rx.range,ix.range,nx.range,ax.range,sx.range,ox.range,lx.range,me(ex,"utcWeekday"),cx=ex(0),hx=ex(1),ux=ex(2),dx=ex(3),px=ex(4),gx=ex(5),fx=ex(6),cx.range,hx.range,ux.range,dx.range,px.range,gx.range,fx.range}),wx=t(()=>{Vv(),(mx=Pv(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())).range,(yx=Pv(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())).range}),kx=t(()=>{Vv(),(vx=Pv(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0<r?Pv(t=>{t.setFullYear(Math.floor(t.getFullYear()/r)*r),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*r)}):null,(xx=Pv(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0<r?Pv(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Tx(a,t,e,r,i,n){let s=[[zv,1,1e3],[zv,5,5e3],[zv,15,15e3],[zv,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],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function o(t,e,r){var i=e<t;return i&&([t,e]=[e,t]),r=(r=r&&"function"==typeof r.range?r:l(t,e,r))?r.range(t,+e+1):[],i?r.reverse():r}function l(t,e,r){var i=Math.abs(e-t)/r,n=wu(([,,t])=>t).right(s,i);return n===s.length?a.every(Fu(t/31536e6,e/31536e6,r)):0===n?$v.every(Math.max(Fu(t,e,r),1)):([t,e]=s[i/s[n-1][2]<s[n][2]/i?n-1:n],t.every(e))}return me(o,"ticks"),me(l,"tickInterval"),[o,l]}var Ex,Cx,_x,Sx,Ax=t(()=>{Xu(),Xv(),Kv(),Zv(),Qv(),Jv(),bx(),wx(),kx(),me(Tx,"ticker"),[Ex,Cx]=Tx(xx,yx,cx,Hv,jv,Uv),[_x,Sx]=Tx(vx,mx,rx,Wv,qv,Gv)}),Lx=t(()=>{Xv(),Kv(),Zv(),Qv(),Jv(),bx(),wx(),kx(),Ax()});function Nx(t){var e;return 0<=t.y&&t.y<100?((e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L)).setFullYear(t.y),e):new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ix(t){var e;return 0<=t.y&&t.y<100?((e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L))).setUTCFullYear(t.y),e):new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Rx(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Mx(t){var i=t.dateTime,n=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=Px(e),h=Bx(e),P=Px(r),B=Bx(r),F=Px(s),$=Bx(s),z=Px(o),G=Bx(o),U=Px(l),q=Bx(l),u={a:E,A:C,b:_,B:S,c:null,d:nb,e:nb,f:cb,g:bb,G:kb,H:ab,I:sb,j:ob,L:lb,m:hb,M:ub,p:A,q:L,Q:Wb,s:Yb,S:db,u:pb,U:gb,V:mb,w:yb,W:vb,x:null,X:null,y:xb,Y:wb,Z:Tb,"%":jb},d={a:N,A:I,b:R,B:M,c:null,d:Eb,e:Eb,f:Lb,g:zb,G:Ub,H:Cb,I:_b,j:Sb,L:Ab,m:Nb,M:Ib,p:D,q:O,Q:Wb,s:Yb,S:Rb,u:Mb,U:Db,V:Pb,w:Bb,W:Fb,x:null,X:null,y:$b,Y:Gb,Z:qb,"%":jb},j={a:y,A:v,b:x,B:b,c:w,d:Vx,e:Vx,f:tb,g:jx,G:qx,H:Kx,I:Kx,j:Xx,L:Jx,m:Hx,M:Zx,p:m,q:Yx,Q:rb,s:ib,S:Qx,u:$x,U:zx,V:Gx,w:Fx,W:Ux,x:k,X:T,y:jx,Y:qx,Z:Wx,"%":eb};function p(l,c){return function(t){var e,r,i,n=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a<o;)37===l.charCodeAt(a)&&(n.push(l.slice(s,a)),null!=(r=Hb[e=l.charAt(++a)])?e=l.charAt(++a):r="e"===e?" ":"0",(i=c[e])&&(e=i(t,r)),n.push(e),s=a+1);return n.push(l.slice(s,a)),n.join("")}}function g(n,a){return function(t){var e,r,i=Rx(1900,void 0,1);if(f(i,n,t+="",0)!=t.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?(e=4<(r=(e=Ix(Rx(i.y,0,1))).getUTCDay())||0===r?hx.ceil(e):hx(e),e=Yv.offset(e,7*(i.V-1)),i.y=e.getUTCFullYear(),i.m=e.getUTCMonth(),i.d=e.getUTCDate()+(i.w+6)%7):(e=4<(r=(e=Nx(Rx(i.y,0,1))).getDay())||0===r?ix.ceil(e):ix(e),e=Wv.offset(e,7*(i.V-1)),i.y=e.getFullYear(),i.m=e.getMonth(),i.d=e.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?Ix(Rx(i.y,0,1)).getUTCDay():Nx(Rx(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,Ix):Nx)(i)}}function f(t,e,r,i){for(var n,a,s=0,o=e.length,l=r.length;s<o;){if(l<=i)return-1;if(37===(n=e.charCodeAt(s++))){if(n=e.charAt(s++),!(a=j[n in Hb?e.charAt(s++):n])||(i=a(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}function m(t,e,r){return(e=c.exec(e.slice(r)))?(t.p=h.get(e[0].toLowerCase()),r+e[0].length):-1}function y(t,e,r){return(e=F.exec(e.slice(r)))?(t.w=$.get(e[0].toLowerCase()),r+e[0].length):-1}function v(t,e,r){return(e=P.exec(e.slice(r)))?(t.w=B.get(e[0].toLowerCase()),r+e[0].length):-1}function x(t,e,r){return(e=U.exec(e.slice(r)))?(t.m=q.get(e[0].toLowerCase()),r+e[0].length):-1}function b(t,e,r){return(e=z.exec(e.slice(r)))?(t.m=G.get(e[0].toLowerCase()),r+e[0].length):-1}function w(t,e,r){return f(t,i,e,r)}function k(t,e,r){return f(t,n,e,r)}function T(t,e,r){return f(t,a,e,r)}function E(t){return s[t.getDay()]}function C(t){return r[t.getDay()]}function _(t){return l[t.getMonth()]}function S(t){return o[t.getMonth()]}function A(t){return e[+(12<=t.getHours())]}function L(t){return 1+~~(t.getMonth()/3)}function N(t){return s[t.getUTCDay()]}function I(t){return r[t.getUTCDay()]}function R(t){return l[t.getUTCMonth()]}function M(t){return o[t.getUTCMonth()]}function D(t){return e[+(12<=t.getUTCHours())]}function O(t){return 1+~~(t.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),me(p,"newFormat"),me(g,"newParse"),me(f,"parseSpecifier"),me(m,"parsePeriod"),me(y,"parseShortWeekday"),me(v,"parseWeekday"),me(x,"parseShortMonth"),me(b,"parseMonth"),me(w,"parseLocaleDateTime"),me(k,"parseLocaleDate"),me(T,"parseLocaleTime"),me(E,"formatShortWeekday"),me(C,"formatWeekday"),me(_,"formatShortMonth"),me(S,"formatMonth"),me(A,"formatPeriod"),me(L,"formatQuarter"),me(N,"formatUTCShortWeekday"),me(I,"formatUTCWeekday"),me(R,"formatUTCShortMonth"),me(M,"formatUTCMonth"),me(D,"formatUTCPeriod"),me(O,"formatUTCQuarter"),{format:me(function(t){var e=p(t+="",u);return e.toString=function(){return t},e},"format"),parse:me(function(t){var e=g(t+="",!1);return e.toString=function(){return t},e},"parse"),utcFormat:me(function(t){var e=p(t+="",d);return e.toString=function(){return t},e},"utcFormat"),utcParse:me(function(t){var e=g(t+="",!0);return e.toString=function(){return t},e},"utcParse")}}function Dx(t,e,r){var i=t<0?"-":"",n=(t=(i?-t:t)+"").length;return i+(n<r?new Array(r-n+1).join(e)+t:t)}function Ox(t){return t.replace(Kb,"\\$&")}function Px(t){return new RegExp("^(?:"+t.map(Ox).join("|")+")","i")}function Bx(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Fx(t,e,r){return(e=Vb.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function $x(t,e,r){return(e=Vb.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function zx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Gx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function Ux(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function qx(t,e,r){return(e=Vb.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function jx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Wx(t,e,r){return(e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6)))?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Yx(t,e,r){return(e=Vb.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Hx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Vx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Xx(t,e,r){return(e=Vb.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Kx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Zx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Qx(t,e,r){return(e=Vb.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function Jx(t,e,r){return(e=Vb.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function tb(t,e,r){return(e=Vb.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function eb(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?r+e[0].length:-1}function rb(t,e,r){return(e=Vb.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function ib(t,e,r){return(e=Vb.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function nb(t,e){return Dx(t.getDate(),e,2)}function ab(t,e){return Dx(t.getHours(),e,2)}function sb(t,e){return Dx(t.getHours()%12||12,e,2)}function ob(t,e){return Dx(1+Wv.count(vx(t),t),e,3)}function lb(t,e){return Dx(t.getMilliseconds(),e,3)}function cb(t,e){return lb(t,e)+"000"}function hb(t,e){return Dx(t.getMonth()+1,e,2)}function ub(t,e){return Dx(t.getMinutes(),e,2)}function db(t,e){return Dx(t.getSeconds(),e,2)}function pb(t){return 0===(t=t.getDay())?7:t}function gb(t,e){return Dx(rx.count(vx(t)-1,t),e,2)}function fb(t){var e=t.getDay();return 4<=e||0===e?sx(t):sx.ceil(t)}function mb(t,e){return t=fb(t),Dx(sx.count(vx(t),t)+(4===vx(t).getDay()),e,2)}function yb(t){return t.getDay()}function vb(t,e){return Dx(ix.count(vx(t)-1,t),e,2)}function xb(t,e){return Dx(t.getFullYear()%100,e,2)}function bb(t,e){return Dx((t=fb(t)).getFullYear()%100,e,2)}function wb(t,e){return Dx(t.getFullYear()%1e4,e,4)}function kb(t,e){var r=t.getDay();return Dx((t=4<=r||0===r?sx(t):sx.ceil(t)).getFullYear()%1e4,e,4)}function Tb(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Dx(t/60|0,"0",2)+Dx(t%60,"0",2)}function Eb(t,e){return Dx(t.getUTCDate(),e,2)}function Cb(t,e){return Dx(t.getUTCHours(),e,2)}function _b(t,e){return Dx(t.getUTCHours()%12||12,e,2)}function Sb(t,e){return Dx(1+Yv.count(xx(t),t),e,3)}function Ab(t,e){return Dx(t.getUTCMilliseconds(),e,3)}function Lb(t,e){return Ab(t,e)+"000"}function Nb(t,e){return Dx(t.getUTCMonth()+1,e,2)}function Ib(t,e){return Dx(t.getUTCMinutes(),e,2)}function Rb(t,e){return Dx(t.getUTCSeconds(),e,2)}function Mb(t){return 0===(t=t.getUTCDay())?7:t}function Db(t,e){return Dx(cx.count(xx(t)-1,t),e,2)}function Ob(t){var e=t.getUTCDay();return 4<=e||0===e?px(t):px.ceil(t)}function Pb(t,e){return t=Ob(t),Dx(px.count(xx(t),t)+(4===xx(t).getUTCDay()),e,2)}function Bb(t){return t.getUTCDay()}function Fb(t,e){return Dx(hx.count(xx(t)-1,t),e,2)}function $b(t,e){return Dx(t.getUTCFullYear()%100,e,2)}function zb(t,e){return Dx((t=Ob(t)).getUTCFullYear()%100,e,2)}function Gb(t,e){return Dx(t.getUTCFullYear()%1e4,e,4)}function Ub(t,e){var r=t.getUTCDay();return Dx((t=4<=r||0===r?px(t):px.ceil(t)).getUTCFullYear()%1e4,e,4)}function qb(){return"+0000"}function jb(){return"%"}function Wb(t){return+t}function Yb(t){return Math.floor(+t/1e3)}var Hb,Vb,Xb,Kb,Zb=t(()=>{Lx(),me(Nx,"localDate"),me(Ix,"utcDate"),me(Rx,"newDate"),me(Mx,"formatLocale"),Hb={"-":"",_:" ",0:"0"},Vb=/^\s*\d+/,Xb=/^%/,Kb=/[\\^$*+?|[\]().{}]/g,me(Dx,"pad"),me(Ox,"requote"),me(Px,"formatRe"),me(Bx,"formatLookup"),me(Fx,"parseWeekdayNumberSunday"),me($x,"parseWeekdayNumberMonday"),me(zx,"parseWeekNumberSunday"),me(Gx,"parseWeekNumberISO"),me(Ux,"parseWeekNumberMonday"),me(qx,"parseFullYear"),me(jx,"parseYear"),me(Wx,"parseZone"),me(Yx,"parseQuarter"),me(Hx,"parseMonthNumber"),me(Vx,"parseDayOfMonth"),me(Xx,"parseDayOfYear"),me(Kx,"parseHour24"),me(Zx,"parseMinutes"),me(Qx,"parseSeconds"),me(Jx,"parseMilliseconds"),me(tb,"parseMicroseconds"),me(eb,"parseLiteralPercent"),me(rb,"parseUnixTimestamp"),me(ib,"parseUnixTimestampSeconds"),me(nb,"formatDayOfMonth"),me(ab,"formatHour24"),me(sb,"formatHour12"),me(ob,"formatDayOfYear"),me(lb,"formatMilliseconds"),me(cb,"formatMicroseconds"),me(hb,"formatMonthNumber"),me(ub,"formatMinutes"),me(db,"formatSeconds"),me(pb,"formatWeekdayNumberMonday"),me(gb,"formatWeekNumberSunday"),me(fb,"dISO"),me(mb,"formatWeekNumberISO"),me(yb,"formatWeekdayNumberSunday"),me(vb,"formatWeekNumberMonday"),me(xb,"formatYear"),me(bb,"formatYearISO"),me(wb,"formatFullYear"),me(kb,"formatFullYearISO"),me(Tb,"formatZone"),me(Eb,"formatUTCDayOfMonth"),me(Cb,"formatUTCHour24"),me(_b,"formatUTCHour12"),me(Sb,"formatUTCDayOfYear"),me(Ab,"formatUTCMilliseconds"),me(Lb,"formatUTCMicroseconds"),me(Nb,"formatUTCMonthNumber"),me(Ib,"formatUTCMinutes"),me(Rb,"formatUTCSeconds"),me(Mb,"formatUTCWeekdayNumberMonday"),me(Db,"formatUTCWeekNumberSunday"),me(Ob,"UTCdISO"),me(Pb,"formatUTCWeekNumberISO"),me(Bb,"formatUTCWeekdayNumberSunday"),me(Fb,"formatUTCWeekNumberMonday"),me($b,"formatUTCYear"),me(zb,"formatUTCYearISO"),me(Gb,"formatUTCFullYear"),me(Ub,"formatUTCFullYearISO"),me(qb,"formatUTCZone"),me(jb,"formatLiteralPercent"),me(Wb,"formatUnixTimestamp"),me(Yb,"formatUnixTimestampSeconds")});function Qb(t){return Jb=Mx(t),t4=Jb.format,Jb}var Jb,t4,e4=t(()=>{Zb(),Qb({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"]}),me(Qb,"defaultLocale")}),r4=t(()=>{e4()});function i4(t){return new Date(t)}function n4(t){return t instanceof Date?+t:+new Date(+t)}function a4(r,i,e,n,a,s,o,l,c,h){var u=_v(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(t){return(c(t)<t?g:l(t)<t?f:o(t)<t?m:s(t)<t?y:n(t)<t?a(t)<t?v:x:e(t)<t?b:w)(t)}return me(k,"tickFormat"),u.invert=function(t){return new Date(d(t))},u.domain=function(t){return arguments.length?p(Array.from(t,n4)):p().map(i4)},u.ticks=function(t){var e=p();return r(e[0],e[e.length-1],t??10)},u.tickFormat=function(t,e){return null==e?k:h(e)},u.nice=function(t){var e=p();return(t=t&&"function"==typeof t.range?t:i(e[0],e[e.length-1],t??10))?p(Dv(e,t)):u},u.copy=function(){return Ev(u,a4(r,i,e,n,a,s,o,l,c,h))},u}function s4(){return lv.apply(a4(_x,Sx,vx,mx,rx,Wv,qv,Gv,zv,t4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var o4=t(()=>{Lx(),r4(),Av(),cv(),Ov(),me(i4,"date"),me(n4,"number"),me(a4,"calendar"),me(s4,"time")}),l4=t(()=>{gv(),Mv(),dv(),o4()});function c4(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}var h4,u4=t(()=>{me(c4,"default")}),d4=t(()=>{u4(),h4=c4("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),p4=t(()=>{d4()});function g4(t){return me(function(){return t},"constant")}var f4=t(()=>{me(g4,"default")});function m4(t){return 1<t?0:t<-1?_4:Math.acos(t)}function y4(t){return 1<=t?S4:t<=-1?-S4:Math.asin(t)}var v4,x4,b4,w4,k4,T4,E4,C4,_4,S4,A4,L4=t(()=>{v4=Math.abs,x4=Math.atan2,b4=Math.cos,w4=Math.max,k4=Math.min,T4=Math.sin,E4=Math.sqrt,C4=1e-12,S4=(_4=Math.PI)/2,A4=2*_4,me(m4,"acos"),me(y4,"asin")});function N4(r){let i=3;return r.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);i=e}return r},()=>new l2(i)}var I4=t(()=>{h2(),me(N4,"withPath")});function R4(t){return t.innerRadius}function M4(t){return t.outerRadius}function D4(t){return t.startAngle}function O4(t){return t.endAngle}function P4(t){return t&&t.padAngle}function B4(t,e,r,i,n,a,s,o){var l=(o-=a)*(r-=t)-(s-=n)*(i-=e);if(!(l*l<C4))return[t+(l=(s*(e-a)-o*(t-n))/l)*r,e+l*i]}function F4(t,e,r,i,n,a,s){var o=(s=(s?a:-a)/E4((l=t-r)*l+(o=e-i)*o))*o,s=-s*l,l=t+o,t=e+s,e=r+o,r=i+s,i=(l+e)/2,c=(t+r)/2,h=e-l,u=r-t,d=h*h+u*u,e=((l=l*r-e*t)*u-h*(r=(u<0?-1:1)*E4(w4(0,(a=n-a)*a*d-l*l))))/d,t=(-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=e-i)*h+(u=t-c)*u&&(e=p,t=l),{cx:e,cy:t,x01:-o,y01:-s,x11:e*(n/a-1),y11:t*(n/a-1)}}function $4(){var A=R4,L=M4,N=g4(0),I=null,R=D4,M=O4,D=P4,O=null,P=N4(e);function e(){var t,e,r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k=+A.apply(this,arguments),T=+L.apply(this,arguments),E=R.apply(this,arguments)-S4,C=M.apply(this,arguments)-S4,_=v4(C-E),S=E<C;if(O=O||(t=P()),T<k&&(e=T,T=k,k=e),C4<T?A4-C4<_?(O.moveTo(T*b4(E),T*T4(E)),O.arc(0,0,T,E,C,!S),C4<k&&(O.moveTo(k*b4(C),k*T4(C)),O.arc(0,0,k,C,E,S))):(i=e=E,n=r=C,s=a=_,h=D.apply(this,arguments)/2,d=C4<h&&(I?+I.apply(this,arguments):E4(k*k+T*T)),w=b=o=k4(v4(T-k)/2,+N.apply(this,arguments)),C4<d&&(u=y4(d/k*T4(h)),d=y4(d/T*T4(h)),(a-=2*u)>C4?(i+=u*=S?1:-1,n-=u):(a=0,i=n=(E+C)/2),(s-=2*d)>C4?(e+=d*=S?1:-1,r-=d):(s=0,e=r=(E+C)/2)),h=T*b4(e),u=T*T4(e),d=k*b4(n),E=k*T4(n),C4<o&&(p=T*b4(r),g=T*T4(r),f=k*b4(i),m=k*T4(i),_<_4)&&((C=B4(h,u,f,m,p,g,d,E))?(_=h-C[0],x=u-C[1],y=p-C[0],v=g-C[1],_=1/T4(m4((_*y+x*v)/(E4(_*_+x*x)*E4(y*y+v*v)))/2),x=E4(C[0]*C[0]+C[1]*C[1]),b=k4(o,(k-x)/(_-1)),w=k4(o,(T-x)/(1+_))):b=w=0),C4<s?C4<w?(l=F4(f,m,h,u,T,w,S),c=F4(p,g,d,E,T,w,S),O.moveTo(l.cx+l.x01,l.cy+l.y01),w<o?O.arc(l.cx,l.cy,w,x4(l.y01,l.x01),x4(c.y01,c.x01),!S):(O.arc(l.cx,l.cy,w,x4(l.y01,l.x01),x4(l.y11,l.x11),!S),O.arc(0,0,T,x4(l.cy+l.y11,l.cx+l.x11),x4(c.cy+c.y11,c.cx+c.x11),!S),O.arc(c.cx,c.cy,w,x4(c.y11,c.x11),x4(c.y01,c.x01),!S))):(O.moveTo(h,u),O.arc(0,0,T,e,r,!S)):O.moveTo(h,u),C4<k&&C4<a?C4<b?(l=F4(d,E,p,g,k,-b,S),c=F4(h,u,f,m,k,-b,S),O.lineTo(l.cx+l.x01,l.cy+l.y01),b<o?O.arc(l.cx,l.cy,b,x4(l.y01,l.x01),x4(c.y01,c.x01),!S):(O.arc(l.cx,l.cy,b,x4(l.y01,l.x01),x4(l.y11,l.x11),!S),O.arc(0,0,k,x4(l.cy+l.y11,l.cx+l.x11),x4(c.cy+c.y11,c.cx+c.x11),S),O.arc(c.cx,c.cy,b,x4(c.y11,c.x11),x4(c.y01,c.x01),!S))):O.arc(0,0,k,n,i,S):O.lineTo(d,E)):O.moveTo(0,0),O.closePath(),t)return O=null,t+""||null}return me(e,"arc"),e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+R.apply(this,arguments)+ +M.apply(this,arguments))/2-_4/2;return[b4(e)*t,T4(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:g4(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:g4(+t),e):L},e.cornerRadius=function(t){return arguments.length?(N="function"==typeof t?t:g4(+t),e):N},e.padRadius=function(t){return arguments.length?(I=null==t?null:"function"==typeof t?t:g4(+t),e):I},e.startAngle=function(t){return arguments.length?(R="function"==typeof t?t:g4(+t),e):R},e.endAngle=function(t){return arguments.length?(M="function"==typeof t?t:g4(+t),e):M},e.padAngle=function(t){return arguments.length?(D="function"==typeof t?t:g4(+t),e):D},e.context=function(t){return arguments.length?(O=t??null,e):O},e}var z4=t(()=>{f4(),L4(),I4(),me(R4,"arcInnerRadius"),me(M4,"arcOuterRadius"),me(D4,"arcStartAngle"),me(O4,"arcEndAngle"),me(P4,"arcPadAngle"),me(B4,"intersect"),me(F4,"cornerTangents"),me($4,"default")});function G4(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var U4=t(()=>{Array.prototype.slice,me(G4,"default")});function q4(t){this._context=t}function j4(t){return new q4(t)}var W4=t(()=>{me(q4,"Linear"),q4.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}},"point")},me(j4,"default")});function Y4(t){return t[0]}function H4(t){return t[1]}var V4=t(()=>{me(Y4,"x"),me(H4,"y")});function X4(s,o){var l=g4(!0),c=null,h=j4,u=null,d=N4(e);function e(t){var e,r,i,n=(t=G4(t)).length,a=!1;for(null==c&&(u=h(i=d())),e=0;e<=n;++e)!(e<n&&l(r=t[e],e,t))===a&&((a=!a)?u.lineStart():u.lineEnd()),a&&u.point(+s(r,e,t),+o(r,e,t));if(i)return u=null,i+""||null}return s="function"==typeof s?s:void 0===s?Y4:g4(s),o="function"==typeof o?o:void 0===o?H4:g4(o),me(e,"line"),e.x=function(t){return arguments.length?(s="function"==typeof t?t:g4(+t),e):s},e.y=function(t){return arguments.length?(o="function"==typeof t?t:g4(+t),e):o},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:g4(!!t),e):l},e.curve=function(t){return arguments.length?(h=t,null!=c&&(u=h(c)),e):h},e.context=function(t){return arguments.length?(null==t?c=u=null:u=h(c=t),e):c},e}var K4=t(()=>{U4(),f4(),W4(),I4(),V4(),me(X4,"default")});function Z4(t,e){return e<t?-1:t<e?1:t<=e?0:NaN}var Q4=t(()=>{me(Z4,"default")});function J4(t){return t}var t5=t(()=>{me(J4,"default")});function e5(){var p=J4,g=Z4,f=null,m=g4(0),y=g4(A4),v=g4(0);function e(r){for(var t,e,i,n=(r=G4(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),c=Math.min(A4,Math.max(-A4,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(t,e){return g(o[t],o[e])}):null!=f&&s.sort(function(t,e){return f(r[t],r[e])}),d=0,t=a?(c-n*u)/a:0;d<n;++d,l=e)e=s[d],i=o[e],o[e]={data:r[e],index:d,value:i,startAngle:l,endAngle:e=l+(0<i?i*t:0)+u,padAngle:h};return o}return me(e,"pie"),e.value=function(t){return arguments.length?(p="function"==typeof t?t:g4(+t),e):p},e.sortValues=function(t){return arguments.length?(g=t,f=null,e):g},e.sort=function(t){return arguments.length?(f=t,g=null,e):f},e.startAngle=function(t){return arguments.length?(m="function"==typeof t?t:g4(+t),e):m},e.endAngle=function(t){return arguments.length?(y="function"==typeof t?t:g4(+t),e):y},e.padAngle=function(t){return arguments.length?(v="function"==typeof t?t:g4(+t),e):v},e}var r5=t(()=>{U4(),f4(),Q4(),t5(),L4(),me(e5,"default")});function i5(t){return new a5(t,!0)}function n5(t){return new a5(t,!1)}var a5,s5=t(()=>{a5=class{static{me(this,"Bump")}constructor(t,e){this._context=t,this._x=e}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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}},me(i5,"bumpX"),me(n5,"bumpY")});function o5(){}var l5=t(()=>{me(o5,"default")});function c5(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function h5(t){this._context=t}function u5(t){return new h5(t)}var d5=t(()=>{me(c5,"point"),me(h5,"Basis"),h5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 3:c5(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:c5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(u5,"default")});function p5(t){this._context=t}function g5(t){return new p5(t)}var f5=t(()=>{l5(),d5(),me(p5,"BasisClosed"),p5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:c5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(g5,"default")});function m5(t){this._context=t}function y5(t){return new m5(t)}var v5=t(()=>{d5(),me(m5,"BasisOpen"),m5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:c5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(y5,"default")});function x5(t,e){this._basis=new h5(t),this._beta=e}var b5,w5=t(()=>{d5(),me(x5,"Bundle"),x5.prototype={lineStart:me(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length-1;if(0<r)for(var i,n=t[0],a=e[0],s=t[r]-n,o=e[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*t[l]+(1-this._beta)*(n+(i=l/r)*s),this._beta*e[l]+(1-this._beta)*(a+i*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:me(function(t,e){this._x.push(+t),this._y.push(+e)},"point")},b5=me(function e(r){function t(t){return 1===r?new h5(t):new x5(t,r)}return me(t,"bundle"),t.beta=function(t){return e(+t)},t},"custom")(.85)});function k5(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function T5(t,e){this._context=t,this._k=(1-e)/6}var E5,C5=t(()=>{me(k5,"point"),me(T5,"Cardinal"),T5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:k5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:k5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},E5=me(function e(r){function t(t){return new T5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function _5(t,e){this._context=t,this._k=(1-e)/6}var S5,A5=t(()=>{l5(),C5(),me(_5,"CardinalClosed"),_5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:k5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},S5=me(function e(r){function t(t){return new _5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function L5(t,e){this._context=t,this._k=(1-e)/6}var N5,I5=t(()=>{C5(),me(L5,"CardinalOpen"),L5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,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:k5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},N5=me(function e(r){function t(t){return new L5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function R5(t,e,r){var i,n,a=t._x1,s=t._y1,o=t._x2,l=t._y2;C4<t._l01_a&&(a=(a*(i=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a)-t._x0*t._l12_2a+t._x2*t._l01_2a)/(n=3*t._l01_a*(t._l01_a+t._l12_a)),s=(s*i-t._y0*t._l12_2a+t._y2*t._l01_2a)/n),C4<t._l23_a&&(o=(o*(i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a)+t._x1*t._l23_2a-e*t._l12_2a)/(n=3*t._l23_a*(t._l23_a+t._l12_a)),l=(l*i+t._y1*t._l23_2a-r*t._l12_2a)/n),t._context.bezierCurveTo(a,s,o,l,t._x2,t._y2)}function M5(t,e){this._context=t,this._alpha=e}var D5,O5=t(()=>{L4(),C5(),me(R5,"point"),me(M5,"CatmullRom"),M5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(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:me(function(t,e){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:R5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},D5=me(function e(r){function t(t){return r?new M5(t,r):new T5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function P5(t,e){this._context=t,this._alpha=e}var B5,F5=t(()=>{A5(),l5(),O5(),me(P5,"CatmullRomClosed"),P5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(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:me(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:me(function(t,e){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:R5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},B5=me(function e(r){function t(t){return r?new P5(t,r):new _5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function $5(t,e){this._context=t,this._alpha=e}var z5,G5=t(()=>{I5(),O5(),me($5,"CatmullRomOpen"),$5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,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:R5(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},z5=me(function e(r){function t(t){return r?new $5(t,r):new L5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function U5(t){this._context=t}function q5(t){return new U5(t)}var j5=t(()=>{l5(),me(U5,"LinearClosed"),U5.prototype={areaStart:o5,areaEnd:o5,lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){this._point&&this._context.closePath()},"lineEnd"),point:me(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},me(q5,"default")});function W5(t){return t<0?-1:1}function Y5(t,e,r){var i=t._x1-t._x0,e=e-t._x1,n=(t._y1-t._y0)/(i||e<0&&-0),t=(n*e+(r=(r-t._y1)/(e||i<0&&-0))*i)/(i+e);return(W5(n)+W5(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(t))||0}function H5(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function V5(t,e,r){var i=t._x0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,t._y0+s*e,n-s,a-s*r,n,a)}function X5(t){this._context=t}function K5(t){this._context=new Z5(t)}function Z5(t){this._context=t}function Q5(t){return new X5(t)}function J5(t){return new K5(t)}var t3=t(()=>{me(W5,"sign"),me(Y5,"slope3"),me(H5,"slope2"),me(V5,"point"),me(X5,"MonotoneX"),X5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:V5(this,this._t0,H5(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,V5(this,H5(this,r=Y5(this,t,e)),r);break;default:V5(this,this._t0,r=Y5(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},me(K5,"MonotoneY"),(K5.prototype=Object.create(X5.prototype)).point=function(t,e){X5.prototype.point.call(this,e,t)},me(Z5,"ReflectContext"),Z5.prototype={moveTo:me(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:me(function(){this._context.closePath()},"closePath"),lineTo:me(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:me(function(t,e,r,i,n,a){this._context.bezierCurveTo(e,t,i,r,a,n)},"bezierCurveTo")},me(Q5,"monotoneX"),me(J5,"monotoneY")});function e3(t){this._context=t}function r3(t){var e,r,i=t.length-1,n=new Array(i),a=new Array(i),s=new Array(i);for(a[n[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)n[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(n[i-1]=2,a[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=n[e]/a[e-1],a[e]-=r,s[e]-=r*s[e-1];for(n[i-1]=s[i-1]/a[i-1],e=i-2;0<=e;--e)n[e]=(s[e]-n[e+1])/a[e];for(a[i-1]=(t[i]+n[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-n[e+1];return[n,a]}function i3(t){return new e3(t)}var n3=t(()=>{me(e3,"Natural"),e3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=r3(t),n=r3(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],t[s],e[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:me(function(t,e){this._x.push(+t),this._y.push(+e)},"point")},me(r3,"controlPoints"),me(i3,"default")});function a3(t,e){this._context=t,this._t=e}function s3(t){return new a3(t,.5)}function o3(t){return new a3(t,0)}function l3(t){return new a3(t,1)}var c3=t(()=>{me(a3,"Step"),a3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var r;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(r=this._x*(1-this._t)+t*this._t,this._context.lineTo(r,this._y),this._context.lineTo(r,e))}this._x=t,this._y=e},"point")},me(s3,"default"),me(o3,"stepBefore"),me(l3,"stepAfter")}),h3=t(()=>{z4(),K4(),r5(),f5(),v5(),d5(),s5(),w5(),A5(),I5(),C5(),F5(),G5(),O5(),j5(),W4(),t3(),n3(),c3()}),u3=t(()=>{}),d3=t(()=>{});function p3(t,e,r){this.k=t,this.x=e,this.y=r}function g3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return f3;return t.__zoom}var f3,m3,y3,v3,x3,b3,w3,k3,T3,E3,C3,_3,S3,A3,L3,N3,I3,R3,M3,D3,O3,P3,B3,F3,$3,z3,G3,U3,q3,j3,W3,Y3,H3=t(()=>{me(p3,"Transform"),p3.prototype={constructor:p3,scale:me(function(t){return 1===t?this:new p3(this.k*t,this.x,this.y)},"scale"),translate:me(function(t,e){return 0===t&0===e?this:new p3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:me(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:me(function(t){return t*this.k+this.x},"applyX"),applyY:me(function(t){return t*this.k+this.y},"applyY"),invert:me(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:me(function(t){return(t-this.x)/this.k},"invertX"),invertY:me(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:me(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:me(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:me(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},f3=new p3(1,0,0),g3.prototype=p3.prototype,me(g3,"transform")}),V3=t(()=>{}),X3=t(()=>{qy(),u3(),d3(),H3(),V3()}),K3=t(()=>{X3(),H3()}),Z3=t(()=>{Xu(),cd(),t2(),u2(),y1(),d2(),p2(),bd(),dg(),g2(),By(),f2(),y2(),iv(),nv(),av(),yf(),h2(),sv(),m2(),ov(),l4(),p4(),ug(),h3(),Lx(),r4(),Gf(),qy(),K3()}),Q3=iPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|&colon;)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),J3=iPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=Q3();function s(t){return-1<a.relativeFirstCharacters.indexOf(t[0])}function o(t){return t.replace(a.ctrlCharactersRegex,"").replace(a.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function l(t){return URL.canParse(t)}function c(t){try{return decodeURIComponent(t)}catch{return t}}function e(t){if(!t)return a.BLANK_URL;for(var e,r,i,n=c(t.trim());(e=(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<e.length;);return(t=n)?!s(t)&&(i=(r=t.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)):t:a.BLANK_URL}me(s,"isRelativeUrlWithoutProtocol"),me(o,"decodeHtmlCharacters"),me(l,"isValidUrl"),me(c,"decodeURI"),me(e,"sanitizeUrl"),t.sanitizeUrl=e}),t6=t(()=>{m3=tt(J3(),1),Jc(),y3=me((t,e)=>{var r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(var i in e.attrs)r.attr(i,e.attrs[i]);return e.class&&r.attr("class",e.class),r},"drawRect"),v3=me((t,e)=>{e={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"},y3(t,e).lower()},"drawBackgroundRect"),x3=me((t,e)=>{var r=e.text.replace(wc," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(r),t},"drawText"),b3=me((t,e,r,i)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(i),t.attr("xlink:href",e)},"drawImage"),w3=me((t,e,r,i)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(i),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),k3=me(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T3=me(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),e6=t(()=>{function e(t,e,r,i,n,a,s){g(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,i,n,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r+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[t]).attr("alignment-baseline","mathematical"),g(p,s)}}function r(t,e,r,i,n,a,s,o){(a=(e=e.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(t),l(t,e,r,i,n,0,s,o),g(a,s)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}Jc(),t6(),E3=tt(J3(),1),C3=me(function(t,e){return y3(t,e)},"drawRect"),_3=me(function(t,e,r,i,n,a){(t=t.append("image")).attr("width",e),t.attr("height",r),t.attr("x",i),t.attr("y",n),e=a.startsWith("data:image/png;base64")?a:(0,E3.sanitizeUrl)(a),t.attr("xlink:href",e)},"drawImage"),S3=me((t,e,r)=>{let i=t.append("g"),n=0;for(var a of e){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());$3(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(),$3(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"),A3=me(function(t,e,r){let i=t.append("g"),n=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(C3(i,t={x:e.x,y:e.y,fill:n,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,$3(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,$3(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,$3(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),L3=me(function(t,e,r){let i=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],n=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.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(e.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=t.append("g"),l=(o.attr("class","person-man"),k3());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=i,l.width=e.width,l.height=e.height,l.stroke=n,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},C3(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",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.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",e.x).replaceAll("starty",e.y).replaceAll("half",e.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",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.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",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}switch(t=F3(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":_3(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,$3(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?$3(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&$3(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,$3(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),N3=me(function(t){t.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"),I3=me(function(t){t.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"),R3=me(function(t){t.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"),M3=me(function(t){t.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"),D3=me(function(t){t.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"),O3=me(function(t){t.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"),P3=me(function(t){t.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"),B3=me(function(t){(t=t.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"),t.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"),F3=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),$3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},z3={drawRect:C3,drawBoundary:A3,drawC4Shape:L3,drawRels:S3,drawImage:_3,insertArrowHead:M3,insertArrowEnd:D3,insertArrowFilledHead:O3,insertDynamicNumber:P3,insertArrowCrossHead:B3,insertDatabaseIcon:N3,insertComputerIcon:I3,insertClockIcon:R3}}),r6=t(()=>{G3="object"==typeof global&&global&&global.Object===Object&&global,U3=G3}),i6=t(()=>{r6(),q3="object"==typeof self&&self&&self.Object===Object&&self,q3=U3||q3||Function("return this")(),j3=q3}),n6=t(()=>{i6(),W3=j3.Symbol,Y3=W3});function a6(t){var e=o6.call(t,c6),r=t[c6];try{var i=!(t[c6]=void 0)}catch{}var n=l6.call(t);return i&&(e?t[c6]=r:delete t[c6]),n}var s6,o6,l6,c6,h6,u6=t(()=>{n6(),s6=Object.prototype,o6=s6.hasOwnProperty,l6=s6.toString,c6=Y3?Y3.toStringTag:void 0,me(a6,"getRawTag"),h6=a6});function d6(t){return g6.call(t)}var p6,g6,f6,m6=t(()=>{p6=Object.prototype,g6=p6.toString,me(d6,"objectToString"),f6=d6});function y6(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(v6&&v6 in Object(t)?h6:f6)(t)}var v6,x6,b6=t(()=>{n6(),u6(),m6(),v6=Y3?Y3.toStringTag:void 0,me(y6,"baseGetTag"),x6=y6});function w6(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var k6,T6=t(()=>{me(w6,"isObject"),k6=w6});function E6(t){return!!k6(t)&&("[object Function]"==(t=x6(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var C6,_6,S6,A6=t(()=>{b6(),T6(),me(E6,"isFunction"),C6=E6}),L6=t(()=>{i6(),_6=j3["__core-js_shared__"],S6=_6});function N6(t){return!!I6&&I6 in t}var I6,R6,M6=t(()=>{var t;L6(),t=/[^.]+$/.exec(S6&&S6.keys&&S6.keys.IE_PROTO||""),I6=t?"Symbol(src)_1."+t:"",me(N6,"isMasked"),R6=N6});function D6(t){if(null!=t){try{return P6.call(t)}catch{}try{return t+""}catch{}}return""}var O6,P6,B6,F6=t(()=>{O6=Function.prototype,P6=O6.toString,me(D6,"toSource"),B6=D6});function $6(t){return!(!k6(t)||R6(t))&&(C6(t)?j6:G6).test(B6(t))}var z6,G6,U6,q6,j6,W6,Y6=t(()=>{A6(),M6(),T6(),F6(),z6=/[\\^$.*+?()[\]{}|]/g,G6=/^\[object .+?Constructor\]$/,U6=Function.prototype,q6=Object.prototype,U6=U6.toString,q6=q6.hasOwnProperty,j6=RegExp("^"+U6.call(q6).replace(z6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me($6,"baseIsNative"),W6=$6});function H6(t,e){return t?.[e]}var V6,X6=t(()=>{me(H6,"getValue"),V6=H6});function K6(t,e){return t=V6(t,e),W6(t)?t:void 0}var Z6,Q6,J6,tw=t(()=>{Y6(),X6(),me(K6,"getNative"),Z6=K6}),ew=t(()=>{tw(),Q6=Z6(Object,"create"),J6=Q6});function rw(){this.__data__=J6?J6(null):{},this.size=0}var iw,nw=t(()=>{ew(),me(rw,"hashClear"),iw=rw});function aw(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var sw,ow=t(()=>{me(aw,"hashDelete"),sw=aw});function lw(t){var e,r=this.__data__;return J6?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:hw.call(r,t)?r[t]:void 0}var cw,hw,uw,dw=t(()=>{ew(),cw=Object.prototype,hw=cw.hasOwnProperty,me(lw,"hashGet"),uw=lw});function pw(t){var e=this.__data__;return J6?void 0!==e[t]:fw.call(e,t)}var gw,fw,mw,yw=t(()=>{ew(),gw=Object.prototype,fw=gw.hasOwnProperty,me(pw,"hashHas"),mw=pw});function vw(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=J6&&void 0===e?"__lodash_hash_undefined__":e,this}var xw,bw=t(()=>{ew(),me(vw,"hashSet"),xw=vw});function ww(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}var kw,Tw=t(()=>{nw(),ow(),dw(),yw(),bw(),me(ww,"Hash"),ww.prototype.clear=iw,ww.prototype.delete=sw,ww.prototype.get=uw,ww.prototype.has=mw,ww.prototype.set=xw,kw=ww});function Ew(){this.__data__=[],this.size=0}var Cw,_w=t(()=>{me(Ew,"listCacheClear"),Cw=Ew});function Sw(t,e){return t===e||t!=t&&e!=e}var Aw,Lw=t(()=>{me(Sw,"eq"),Aw=Sw});function Nw(t,e){for(var r=t.length;r--;)if(Aw(t[r][0],e))return r;return-1}var Iw,Rw=t(()=>{Lw(),me(Nw,"assocIndexOf"),Iw=Nw});function Mw(t){var e=this.__data__;return!((t=Iw(e,t))<0||(t==e.length-1?e.pop():Ow.call(e,t,1),--this.size,0))}var Dw,Ow,Pw,Bw=t(()=>{Rw(),Dw=Array.prototype,Ow=Dw.splice,me(Mw,"listCacheDelete"),Pw=Mw});function Fw(t){var e=this.__data__;return(t=Iw(e,t))<0?void 0:e[t][1]}var $w,zw=t(()=>{Rw(),me(Fw,"listCacheGet"),$w=Fw});function Gw(t){return-1<Iw(this.__data__,t)}var Uw,qw=t(()=>{Rw(),me(Gw,"listCacheHas"),Uw=Gw});function jw(t,e){var r=this.__data__,i=Iw(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Ww,Yw=t(()=>{Rw(),me(jw,"listCacheSet"),Ww=jw});function Hw(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}var Vw,Xw,Kw,Zw=t(()=>{_w(),Bw(),zw(),qw(),Yw(),me(Hw,"ListCache"),Hw.prototype.clear=Cw,Hw.prototype.delete=Pw,Hw.prototype.get=$w,Hw.prototype.has=Uw,Hw.prototype.set=Ww,Vw=Hw}),Qw=t(()=>{tw(),i6(),Xw=Z6(j3,"Map"),Kw=Xw});function Jw(){this.size=0,this.__data__={hash:new kw,map:new(Kw||Vw),string:new kw}}var tk,ek=t(()=>{Tw(),Zw(),Qw(),me(Jw,"mapCacheClear"),tk=Jw});function rk(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var ik,nk=t(()=>{me(rk,"isKeyable"),ik=rk});function ak(t,e){return t=t.__data__,ik(e)?t["string"==typeof e?"string":"hash"]:t.map}var sk,ok=t(()=>{nk(),me(ak,"getMapData"),sk=ak});function lk(t){return t=sk(this,t).delete(t),this.size-=t?1:0,t}var ck,hk=t(()=>{ok(),me(lk,"mapCacheDelete"),ck=lk});function uk(t){return sk(this,t).get(t)}var dk,pk=t(()=>{ok(),me(uk,"mapCacheGet"),dk=uk});function gk(t){return sk(this,t).has(t)}var fk,mk=t(()=>{ok(),me(gk,"mapCacheHas"),fk=gk});function yk(t,e){var r=sk(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var vk,xk=t(()=>{ok(),me(yk,"mapCacheSet"),vk=yk});function bk(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}var wk,kk=t(()=>{ek(),hk(),pk(),mk(),xk(),me(bk,"MapCache"),bk.prototype.clear=tk,bk.prototype.delete=ck,bk.prototype.get=dk,bk.prototype.has=fk,bk.prototype.set=vk,wk=bk});function Tk(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(Ek);var a=me(function(){var t=arguments,e=n?n.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=i.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(Tk.Cache||wk),a}var Ek,Ck,_k=t(()=>{kk(),Ek="Expected a function",me(Tk,"memoize"),Tk.Cache=wk,Ck=Tk});function Sk(){this.__data__=new Vw,this.size=0}var Ak,Lk=t(()=>{Zw(),me(Sk,"stackClear"),Ak=Sk});function Nk(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Ik,Rk=t(()=>{me(Nk,"stackDelete"),Ik=Nk});function Mk(t){return this.__data__.get(t)}var Dk,Ok=t(()=>{me(Mk,"stackGet"),Dk=Mk});function Pk(t){return this.__data__.has(t)}var Bk,Fk=t(()=>{me(Pk,"stackHas"),Bk=Pk});function $k(t,e){var r=this.__data__;if(r instanceof Vw){var i=r.__data__;if(!Kw||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new wk(i)}return r.set(t,e),this.size=r.size,this}var zk,Gk=t(()=>{Zw(),Qw(),kk(),me($k,"stackSet"),zk=$k});function Uk(t){t=this.__data__=new Vw(t),this.size=t.size}var qk,jk,Wk,Yk=t(()=>{Zw(),Lk(),Rk(),Ok(),Fk(),Gk(),me(Uk,"Stack"),Uk.prototype.clear=Ak,Uk.prototype.delete=Ik,Uk.prototype.get=Dk,Uk.prototype.has=Bk,Uk.prototype.set=zk,qk=Uk}),Hk=t(()=>{tw(),jk=(()=>{try{var t=Z6(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Wk=jk});function Vk(t,e,r){"__proto__"==e&&Wk?Wk(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Xk,Kk=t(()=>{Hk(),me(Vk,"baseAssignValue"),Xk=Vk});function Zk(t,e,r){(void 0===r||Aw(t[e],r))&&(void 0!==r||e in t)||Xk(t,e,r)}var Qk,Jk=t(()=>{Kk(),Lw(),me(Zk,"assignMergeValue"),Qk=Zk});function tT(l){return function(t,e,r){for(var i=-1,n=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++i];if(!1===e(n[o],o,n))break}return t}}var eT,rT,iT,nT=t(()=>{me(tT,"createBaseFor"),eT=tT}),aT=t(()=>{nT(),rT=eT(),iT=rT});function sT(t,e){return e?t.slice():(e=t.length,e=cT?cT(e):new t.constructor(e),t.copy(e),e)}var oT,lT,cT,hT,uT,dT,pT=t(()=>{i6(),oT="object"==typeof exports&&exports&&!exports.nodeType&&exports,lT=(lT=oT&&"object"==typeof module&&module&&!module.nodeType&&module)&&lT.exports===oT?j3.Buffer:void 0,cT=lT?lT.allocUnsafe:void 0,me(sT,"cloneBuffer"),hT=sT}),gT=t(()=>{i6(),uT=j3.Uint8Array,dT=uT});function fT(t){var e=new t.constructor(t.byteLength);return new dT(e).set(new dT(t)),e}var mT,yT=t(()=>{gT(),me(fT,"cloneArrayBuffer"),mT=fT});function vT(t,e){return e=e?mT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var xT,bT=t(()=>{yT(),me(vT,"cloneTypedArray"),xT=vT});function wT(t,e){var r=-1,i=t.length;for(e=e||Array(i);++r<i;)e[r]=t[r];return e}var kT,TT,ET,CT=t(()=>{me(wT,"copyArray"),kT=wT}),_T=t(()=>{function e(){}T6(),TT=Object.create,me(e,"object"),ET=function(t){return k6(t)?TT?TT(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function ST(e,r){return function(t){return e(r(t))}}var AT,LT,NT,IT=t(()=>{me(ST,"overArg"),AT=ST}),RT=t(()=>{IT(),LT=AT(Object.getPrototypeOf,Object),NT=LT});function MT(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||DT)}var DT,OT,PT=t(()=>{DT=Object.prototype,me(MT,"isPrototype"),OT=MT});function BT(t){return"function"!=typeof t.constructor||OT(t)?{}:ET(NT(t))}var FT,$T=t(()=>{_T(),RT(),PT(),me(BT,"initCloneObject"),FT=BT});function zT(t){return null!=t&&"object"==typeof t}var GT,UT=t(()=>{me(zT,"isObjectLike"),GT=zT});function qT(t){return GT(t)&&"[object Arguments]"==x6(t)}var jT,WT,YT,HT,VT,XT,KT,ZT=t(()=>{b6(),UT(),me(qT,"baseIsArguments"),jT=qT}),QT=t(()=>{ZT(),UT(),HT=Object.prototype,WT=HT.hasOwnProperty,YT=HT.propertyIsEnumerable,HT=jT(function(){return arguments}())?jT:function(t){return GT(t)&&WT.call(t,"callee")&&!YT.call(t,"callee")},VT=HT}),JT=t(()=>{XT=Array.isArray,KT=XT});function t7(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}var e7,r7=t(()=>{me(t7,"isLength"),e7=t7});function i7(t){return null!=t&&e7(t.length)&&!C6(t)}var n7,a7=t(()=>{A6(),r7(),me(i7,"isArrayLike"),n7=i7});function s7(t){return GT(t)&&n7(t)}var o7,l7=t(()=>{a7(),UT(),me(s7,"isArrayLikeObject"),o7=s7});function c7(){return!1}var h7,u7,d7,p7,g7=t(()=>{me(c7,"stubFalse"),h7=c7}),f7=t(()=>{i6(),g7(),d7="object"==typeof exports&&exports&&!exports.nodeType&&exports,u7=(u7=d7&&"object"==typeof module&&module&&!module.nodeType&&module)&&u7.exports===d7?j3.Buffer:void 0,d7=u7?u7.isBuffer:void 0,p7=d7||h7});function m7(t){return!(!GT(t)||"[object Object]"!=x6(t))&&(null===(t=NT(t))||"function"==typeof(t=b7.call(t,"constructor")&&t.constructor)&&t instanceof t&&x7.call(t)==w7)}var y7,v7,x7,b7,w7,k7,T7=t(()=>{b6(),RT(),UT(),y7=Function.prototype,v7=Object.prototype,x7=y7.toString,b7=v7.hasOwnProperty,w7=x7.call(Object),me(m7,"isPlainObject"),k7=m7});function E7(t){return GT(t)&&e7(t.length)&&!!C7[x6(t)]}var C7,_7,S7=t(()=>{b6(),r7(),UT(),(C7={})["[object Float32Array]"]=C7["[object Float64Array]"]=C7["[object Int8Array]"]=C7["[object Int16Array]"]=C7["[object Int32Array]"]=C7["[object Uint8Array]"]=C7["[object Uint8ClampedArray]"]=C7["[object Uint16Array]"]=C7["[object Uint32Array]"]=!0,C7["[object Arguments]"]=C7["[object Array]"]=C7["[object ArrayBuffer]"]=C7["[object Boolean]"]=C7["[object DataView]"]=C7["[object Date]"]=C7["[object Error]"]=C7["[object Function]"]=C7["[object Map]"]=C7["[object Number]"]=C7["[object Object]"]=C7["[object RegExp]"]=C7["[object Set]"]=C7["[object String]"]=C7["[object WeakMap]"]=!1,me(E7,"baseIsTypedArray"),_7=E7});function A7(e){return function(t){return e(t)}}var L7,N7,I7,R7,M7,D7,O7,P7=t(()=>{me(A7,"baseUnary"),L7=A7}),B7=t(()=>{r6(),R7="object"==typeof exports&&exports&&!exports.nodeType&&exports,N7=R7&&"object"==typeof module&&module&&!module.nodeType&&module,R7=N7&&N7.exports===R7,I7=R7&&U3.process,R7=(()=>{try{return N7&&N7.require&&N7.require("util").types||I7&&I7.binding&&I7.binding("util")}catch{}})(),M7=R7}),F7=t(()=>{S7(),P7(),B7(),D7=(D7=M7&&M7.isTypedArray)?L7(D7):_7,O7=D7});function $7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var z7,G7=t(()=>{me($7,"safeGet"),z7=$7});function U7(t,e,r){var i=t[e];j7.call(t,e)&&Aw(i,r)&&(void 0!==r||e in t)||Xk(t,e,r)}var q7,j7,W7,Y7=t(()=>{Kk(),Lw(),q7=Object.prototype,j7=q7.hasOwnProperty,me(U7,"assignValue"),W7=U7});function H7(t,e,r,i){var n=!r;r=r||{};for(var a=-1,s=e.length;++a<s;){var o=e[a],l=i?i(r[o],t[o],o,r,t):void 0;void 0===l&&(l=t[o]),(n?Xk:W7)(r,o,l)}return r}var V7,X7=t(()=>{Y7(),Kk(),me(H7,"copyObject"),V7=H7});function K7(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Z7,Q7=t(()=>{me(K7,"baseTimes"),Z7=K7});function J7(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&t8.test(t))&&-1<t&&t%1==0&&t<e}var t8,e8,r8=t(()=>{t8=/^(?:0|[1-9]\d*)$/,me(J7,"isIndex"),e8=J7});function i8(t,e){var r,i=KT(t),n=!i&&VT(t),a=!i&&!n&&p7(t),s=!i&&!n&&!a&&O7(t),o=i||n||a||s,l=o?Z7(t.length,String):[],c=l.length;for(r in t)!e&&!a8.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||e8(r,c))||l.push(r);return l}var n8,a8,s8,o8=t(()=>{Q7(),QT(),JT(),f7(),r8(),F7(),n8=Object.prototype,a8=n8.hasOwnProperty,me(i8,"arrayLikeKeys"),s8=i8});function l8(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var c8,h8=t(()=>{me(l8,"nativeKeysIn"),c8=l8});function u8(t){if(!k6(t))return c8(t);var e,r=OT(t),i=[];for(e in t)("constructor"!=e||!r&&p8.call(t,e))&&i.push(e);return i}var d8,p8,g8,f8=t(()=>{T6(),PT(),h8(),d8=Object.prototype,p8=d8.hasOwnProperty,me(u8,"baseKeysIn"),g8=u8});function m8(t){return n7(t)?s8(t,!0):g8(t)}var y8,v8=t(()=>{o8(),f8(),a7(),me(m8,"keysIn"),y8=m8});function x8(t){return V7(t,y8(t))}var b8,w8=t(()=>{X7(),v8(),me(x8,"toPlainObject"),b8=x8});function k8(t,e,r,i,n,a,s){var o,l,c,h=z7(t,r),u=z7(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=KT(u))&&p7(u),c=!o&&!l&&O7(u),d=u,o||l||c?d=KT(h)?h:o7(h)?kT(h):l?hT(u,!(e=!1)):c?xT(u,!(e=!1)):[]:k7(u)||VT(u)?VT(d=h)?d=b8(h):k6(h)&&!C6(h)||(d=FT(u)):e=!1),e&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),Qk(t,r,d)}var T8,E8=t(()=>{Jk(),pT(),bT(),CT(),$T(),QT(),JT(),l7(),f7(),A6(),T6(),T7(),F7(),G7(),w8(),me(k8,"baseMergeDeep"),T8=k8});function C8(i,n,a,s,o){i!==n&&iT(n,function(t,e){var r;o=o||new qk,k6(t)?T8(i,n,e,a,C8,s,o):(r=s?s(z7(i,e),t,e+"",i,n,o):void 0,Qk(i,e,void 0===r?t:r))},y8)}var _8,S8=t(()=>{Yk(),Jk(),aT(),E8(),T6(),v8(),G7(),me(C8,"baseMerge"),_8=C8});function A8(t){return t}var L8,N8=t(()=>{me(A8,"identity"),L8=A8});function I8(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var R8,M8=t(()=>{me(I8,"apply"),R8=I8});function D8(a,s,o){return s=O8(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=O8(t.length-s,0),i=Array(r);++e<r;)i[e]=t[s+e];for(var e=-1,n=Array(s+1);++e<s;)n[e]=t[e];return n[s]=o(i),R8(a,this,n)}}var O8,P8,B8=t(()=>{M8(),O8=Math.max,me(D8,"overRest"),P8=D8});function F8(t){return function(){return t}}var $8,z8,G8=t(()=>{me(F8,"constant"),$8=F8}),U8=t(()=>{G8(),Hk(),N8(),z8=Wk?function(t,e){return Wk(t,"toString",{configurable:!0,enumerable:!1,value:$8(e),writable:!0})}:L8});function q8(r){var i=0,n=0;return function(){var t=j8(),e=16-(t-n);if(n=t,0<e){if(800<=++i)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}var j8,W8,Y8,H8,V8=t(()=>{j8=Date.now,me(q8,"shortOut"),W8=q8}),X8=t(()=>{U8(),V8(),Y8=W8(z8),H8=Y8});function K8(t,e){return H8(P8(t,e,L8),t+"")}var Z8,Q8=t(()=>{N8(),B8(),X8(),me(K8,"baseRest"),Z8=K8});function J8(t,e,r){var i;return!!k6(r)&&!!("number"==(i=typeof e)?n7(r)&&e8(e,r.length):"string"==i&&e in r)&&Aw(r[e],t)}var tE,eE=t(()=>{Lw(),a7(),r8(),T6(),me(J8,"isIterateeCall"),tE=J8});function rE(o){return Z8(function(t,e){var r=-1,i=e.length,n=1<i?e[i-1]:void 0,a=2<i?e[2]:void 0,n=3<o.length&&"function"==typeof n?(i--,n):void 0;for(a&&tE(e[0],e[1],a)&&(n=i<3?void 0:n,i=1),t=Object(t);++r<i;){var s=e[r];s&&o(t,s,r,n)}return t})}var iE,nE,aE,sE=t(()=>{Q8(),eE(),me(rE,"createAssigner"),iE=rE}),oE=t(()=>{S8(),sE(),nE=iE(function(t,e,r){_8(t,e,r)}),aE=nE});function lE(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),TE[t]??e):e}function cE(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,wE.sanitizeUrl)(t):t}function hE(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function uE(t){let e,r=0;t.forEach(t=>{r+=hE(t,e),e=t});var i=r/2;return IE(t,i)}function dE(t){return 1===t.length?t[0]:uE(t)}function pE(t,e,r){var r=structuredClone(r),i=(M.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),i=IE(r,i),t=10+.5*t,n=Math.atan2(r[0].y-i.y,r[0].x-i.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(n+Math.PI)*t+(r[0].x+i.x)/2,a.y=-Math.cos(n+Math.PI)*t+(r[0].y+i.y)/2):"end_right"===e?(a.x=Math.sin(n-Math.PI)*t+(r[0].x+i.x)/2-5,a.y=-Math.cos(n-Math.PI)*t+(r[0].y+i.y)/2-5):"end_left"===e?(a.x=Math.sin(n)*t+(r[0].x+i.x)/2-5,a.y=-Math.cos(n)*t+(r[0].y+i.y)/2-5):(a.x=Math.sin(n)*t+(r[0].x+i.x)/2,a.y=-Math.cos(n)*t+(r[0].y+i.y)/2),a}function gE(t){let e="",r="";for(var i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}function fE(e){let r="",i="0123456789abcdef",n=i.length;for(let t=0;t<e;t++)r+=i.charAt(Math.floor(Math.random()*n));return r}function mE(t,e){return zE(t,e).height}function yE(t,e){return zE(t,e).width}function vE(t){return"str"in t}function xE(t,e){return aE({},t,e)}function bE(t){return t??null}var wE,kE,TE,EE,CE,_E,SE,AE,LE,NE,IE,RE,ME,DE,OE,PE,BE,FE,$E,zE,GE,UE,qE,jE,WE,YE,HE,VE,XE,KE=t(()=>{wE=tt(J3(),1),Z3(),Jc(),Si(),e(),Gr(),qr(),_k(),oE(),$r(),kE="",TE={curveBasis:u5,curveBasisClosed:g5,curveBasisOpen:y5,curveBumpX:i5,curveBumpY:n5,curveBundle:b5,curveCardinalClosed:S5,curveCardinalOpen:N5,curveCardinal:E5,curveCatmullRomClosed:B5,curveCatmullRomOpen:z5,curveCatmullRom:D5,curveLinear:j4,curveLinearClosed:q5,curveMonotoneX:Q5,curveMonotoneY:J5,curveNatural:i3,curveStep:s3,curveStepAfter:l3,curveStepBefore:o3},EE=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,CE=me(function(t,e){var r,i=_E(t,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(t=>t.args),yr(r),ie(n,[...r])):i.args)return r=Kt(t,e),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),_E=me(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${EE.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var i,n,a,s=[];null!==(i=Yt.exec(t));)i.index===Yt.lastIndex&&Yt.lastIndex++,(i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e))&&(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:t,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),SE=me(function(t){return t.replace(Yt,"")},"removeDirectives"),AE=me(function(t,e){for(var[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray"),me(lE,"interpolateToCurve"),me(cE,"formatUrl"),LE=me((e,...t)=>{let r=e.split("."),i=r.length-1,n=r[i],a=window;for(let t=0;t<i;t++)if(!(a=a[r[t]]))return void M.error(`Function name: ${e} not found in window`);a[n](...t)},"runFunc"),me(hE,"distance"),me(uE,"traverseEdge"),me(dE,"calcLabelPosition"),NE=me((t,e=2)=>(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),IE=me((t,e)=>{let r,i=e;for(var n of t){if(r){var a=hE(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:NE((1-a)*r.x+a*n.x,5),y:NE((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),RE=me((t,e,r)=>{M.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=IE(e,25),t=t?10:5,i=Math.atan2(e[0].y-r.y,e[0].x-r.x),n={x:0,y:0};return n.x=Math.sin(i)*t+(e[0].x+r.x)/2,n.y=-Math.cos(i)*t+(e[0].y+r.y)/2,n},"calcCardinalityPosition"),me(pE,"calcTerminalLabelPosition"),me(gE,"getStylesFromArray"),ME=0,DE=me(()=>(ME++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ME),"generateId"),me(fE,"makeRandomHex"),OE=me(t=>fE(t.length),"random"),PE=me(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"),BE=me(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,i]=WE(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",i),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(i=t.append("tspan")).attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(r),t},"drawSimpleText"),FE=Ck((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,i,n=yE(t+" ",o),a=yE(h,o);h=s<n?({hyphenatedStrings:r,remainingWord:i}=$E(t,s,"-",o),c.push(h,...r),i):s<=a+n?(c.push(h),t):[h,t].filter(Boolean).join(" "),e+1===l.length&&c.push(h)}),c.filter(t=>""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),$E=Ck((t,i,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=yE(t,a)>=i?(e+=1,e=s.length===e,r=t+n,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",i)=>""+t+e+r+i.fontSize+i.fontWeight+i.fontFamily),me(mE,"calculateTextHeight"),me(yE,"calculateTextWidth"),zE=Ck((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};var[,n]=WE(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),s=[];if(!(r=j("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=PE();if(u.text=c||kE,0===(u=((u=BE(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]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),GE=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{me(this,"InitIDGenerator")}},qE=me(function(t){return UE=UE||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),UE.innerHTML=t,unescape(UE.textContent)},"entityDecode"),me(vE,"isDetailedError"),jE=me((t,e,r,i)=>{var n;i&&(n=t.node()?.getBBox())&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),WE=me(t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])},"parseFontSize"),me(xE,"cleanAndMerge"),YE={assignWithDepth:ie,wrapLabel:FE,calculateTextHeight:mE,calculateTextWidth:yE,calculateTextDimensions:zE,cleanAndMerge:xE,detectInit:CE,detectDirective:_E,isSubstringInArray:AE,interpolateToCurve:lE,calcLabelPosition:dE,calcCardinalityPosition:RE,calcTerminalLabelPosition:pE,formatUrl:cE,getStylesFromArray:gE,generateId:DE,random:OE,runFunc:LE,entityDecode:qE,insertTitle:jE,parseFontSize:WE,InitIDGenerator:GE},HE=me(function(t){let e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"})},"encodeEntities"),VE=me(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),XE=me((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+t+`_${e}_`+r+(n?"_"+n:""),"getEdgeId"),me(bE,"handleUndefinedAttr")});function ZE(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=FE(e[t].text,n,i),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=n,e[t].height=mE(e[t].text,i);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(yE(s,i),e[t].width),a=mE(s,i),e[t].height=e[t].height+a}}function QE(e,r,i,t,n){var a,s,o=new nC(n);o.data.widthLimit=i.data.widthLimit/Math.min(rC,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&iC.wrap,c=oC(iC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",ZE("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",ZE("type",s,l,c=oC(iC),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=oC(iC)).fontSize=c.fontSize-2,ZE("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%rC==0?(l=i.data.startx+iC.diagramMarginX,i.data.stopy+iC.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+iC.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&&hC(o,e,l,c),r=s.alias,0<(l=n.db.getBoundarys(r)).length&&QE(e,0,o,l,n),"global"!==s.alias&&cC(e,s,o),i.data.stopy=Math.max(o.data.stopy+iC.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+iC.c4ShapeMargin,i.data.stopx),JE=Math.max(JE,i.data.stopx),tC=Math.max(tC,i.data.stopy)}}var JE,tC,eC,rC,iC,nC,aC,sC,oC,lC,cC,hC,uC,dC,pC,gC,fC,mC,yC,vC,xC=t(()=>{Z3(),e6(),e(),Ur(),Jc(),mu(),fu(),qr(),KE(),th(),tC=JE=0,eC=4,rC=2,te.yy=pu,iC={},nC=class{static{me(this,"Bounds")}constructor(t){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,aC(t.db.getConfig())}setData(t,e,r,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=i}updateVal(t,e,r,i){void 0===t[e]?t[e]=r:t[e]=i(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,i=this.nextData.starty+2*t.margin,n=i+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>eC)&&(e=this.nextData.startx+t.margin+iC.nextLinePaddingX,i=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+t.height,this.nextData.cnt=1),t.x=e,t.y=i,this.updateVal(this.data,"startx",e,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",e,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(t){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},aC(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},aC=me(function(t){ie(iC,t),t.fontFamily&&(iC.personFontFamily=iC.systemFontFamily=iC.messageFontFamily=t.fontFamily),t.fontSize&&(iC.personFontSize=iC.systemFontSize=iC.messageFontSize=t.fontSize),t.fontWeight&&(iC.personFontWeight=iC.systemFontWeight=iC.messageFontWeight=t.fontWeight)},"setConf"),sC=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),oC=me(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),lC=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),me(ZE,"calcC4ShapeTextWH"),cC=me(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=iC.c4ShapeMargin-35;var r=e.wrap&&iC.wrap,i=oC(iC),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",yE(e.label.text,i));ZE("label",e,r,i,n),z3.drawBoundary(t,e,iC)},"drawBoundary"),hC=me(function(r,i,n,t){let a=0;for(var s of t){a=0;var o=n[s];switch((s=sC(iC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=yE("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=iC.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&&iC.wrap,l=iC.width-2*iC.c4ShapePadding,c=sC(iC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",ZE("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+"]",ZE("type",o,s,sC(iC,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+"]",ZE("techn",o,s,sC(iC,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(ZE("descr",o,s,sC(iC,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=iC.c4ShapePadding,o.width=Math.max(o.width||iC.width,e,iC.width),o.height=Math.max(o.height||iC.height,t,iC.height),o.margin=o.margin||iC.c4ShapeMargin,r.insert(o),z3.drawC4Shape(i,o,iC)}r.bumpLastMargin(iC.c4ShapeMargin)},"drawC4ShapeArray"),uC=class{static{me(this,"Point")}constructor(t,e){this.x=t,this.y=e}},dC=me(function(t,e){let r=t.x,i=t.y,n=e.x,a=e.y,s=r+t.width/2,o=i+t.height/2,l=Math.abs(r-n),c=Math.abs(i-a),h=c/l,u=t.height/t.width,d=null;return i==a&&r<n?d=new uC(r+t.width,o):i==a&&n<r?d=new uC(r,o):r==n&&i<a?d=new uC(s,i+t.height):r==n&&a<i&&(d=new uC(s,i)),n<r&&i<a?d=h<=u?new uC(r,o+h*t.width/2):new uC(s-l/c*t.height/2,i+t.height):r<n&&i<a?d=h<=u?new uC(r+t.width,o+h*t.width/2):new uC(s+l/c*t.height/2,i+t.height):r<n&&a<i?d=h<=u?new uC(r+t.width,o-h*t.width/2):new uC(s+t.height/2*l/c,i):n<r&&a<i&&(d=h<=u?new uC(r,o-t.width/2*h):new uC(s-t.height/2*l/c,i)),d},"getIntersectPoint"),pC=me(function(t,e){var r={x:0,y:0},i=(r.x=e.x+e.width/2,r.y=e.y+e.height/2,dC(t,r));return r.x=t.x+t.width/2,r.y=t.y+t.height/2,{startPoint:i,endPoint:t=dC(e,r)}},"getIntersectPoints"),gC=me(function(t,e,r,i){let n=0;for(var a of e){n+=1;var s=a.wrap&&iC.wrap,o=lC(iC);"C4Dynamic"===i.db.getC4Type()&&(a.label.text=n+": "+a.label.text);let t=yE(a.label.text,o);ZE("label",a,s,o,t),a.techn&&""!==a.techn.text&&ZE("techn",a,s,o,t=yE(a.techn.text,o)),a.descr&&""!==a.descr.text&&ZE("descr",a,s,o,t=yE(a.descr.text,o)),s=r(a.from),o=r(a.to),s=pC(s,o),a.startPoint=s.startPoint,a.endPoint=s.endPoint}z3.drawRels(t,e,iC)},"drawRels"),me(QE,"drawInsideBoundary"),fC=me(function(t,e,r,i){iC=D().c4;let n=D().securityLevel,a;"sandbox"===n&&(a=j("#i"+e));var s=j("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o=i.db,o=(i.db.setWrap(iC.wrap),eC=o.getC4ShapeInRow(),rC=o.getC4BoundaryInRow(),M.debug("C:"+JSON.stringify(iC,null,2)),"sandbox"===n?s.select(`[id="${e}"]`):j(`[id="${e}"]`)),s=(z3.insertComputerIcon(o),z3.insertDatabaseIcon(o),z3.insertClockIcon(o),(s=new nC(i)).setData(iC.diagramMarginX,iC.diagramMarginX,iC.diagramMarginY,iC.diagramMarginY),s.data.widthLimit=screen.availWidth,JE=iC.diagramMarginX,tC=iC.diagramMarginY,e=i.db.getTitle(),QE(o,0,s,i.db.getBoundarys(""),i),z3.insertArrowHead(o),z3.insertArrowEnd(o),z3.insertArrowCrossHead(o),z3.insertArrowFilledHead(o),gC(o,i.db.getRels(),i.db.getC4Shape,i),s.data.stopx=JE,s.data.stopy=tC,(i=s.data).stopy-i.starty+2*iC.diagramMarginY),l=i.stopx-i.startx+2*iC.diagramMarginX,e=(e&&o.append("text").text(e).attr("x",(i.stopx-i.startx)/2-4*iC.diagramMarginX).attr("y",i.starty+iC.diagramMarginY),Hc(o,s,l,iC.useMaxWidth),e?60:0);o.attr("viewBox",i.startx-iC.diagramMarginX+" -"+(iC.diagramMarginY+e)+" "+l+" "+(s+e)),M.debug("models:",i)},"draw"),mC={drawPersonOrSystemArray:hC,drawBoundary:cC,setConf:aC,draw:fC}}),bC=t(()=>{yC=me(t=>`.person {
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`,"getStyles"),vC=yC}),wC={};lPt(wC,{diagram:()=>kC});var kC,TC=t(()=>{Ur(),mu(),xC(),bC(),kC={parser:ee,db:pu,renderer:mC,styles:vC,init:me(({c4:t,wrap:e})=>{mC.setConf(t),pu.setWrap(e)},"init")}});function EC(t){return"u"<typeof t||null===t}function CC(t){return"object"==typeof t&&null!==t}function _C(t){return Array.isArray(t)?t:EC(t)?[]:[t]}function SC(t,e){var r,i,n,a;if(e)for(r=0,i=(a=Object.keys(e)).length;r<i;r+=1)t[n=a[r]]=e[n];return t}function AC(t,e){for(var r="",i=0;i<e;i+=1)r+=t;return r}function LC(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}function NC(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),i+" "+r):i}function IC(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=NC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function RC(t,e,r,i,n){var a="",s="";return(n=Math.floor(n/2)-1)<i-e&&(e=i-n+(a=" ... ").length),n<r-i&&(r=i+n-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function MC(t,e){return LS.repeat(" ",e-t.length)+t}function DC(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],a=[],s=-1;r=i.exec(t.buffer);)a.push(r.index),n.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);for(var o,l="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,h=e.maxLength-(e.indent+c+3),u=1;u<=e.linesBefore&&!(s-u<0);u++)o=RC(t.buffer,n[s-u],a[s-u],t.position-(n[s]-n[s-u]),h),l=LS.repeat(" ",e.indent)+MC((t.line-u+1).toString(),c)+" | "+o.str+`
`+l;for(o=RC(t.buffer,n[s],a[s],t.position,h),l=(l+=LS.repeat(" ",e.indent)+MC((t.line+1).toString(),c)+" | "+o.str+`
`)+LS.repeat("-",e.indent+c+3+o.pos)+`^
`,u=1;u<=e.linesAfter&&!(a.length<=s+u);u++)o=RC(t.buffer,n[s+u],a[s+u],t.position-(n[s]-n[s+u]),h),l+=LS.repeat(" ",e.indent)+MC((t.line+u+1).toString(),c)+" | "+o.str+`
`;return l.replace(/\n$/,"")}function OC(t){var r={};return null!==t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){r[String(t)]=e})}),r}function PC(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===RS.indexOf(t))throw new NS('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(t){return t},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=OC(t.styleAliases||null),-1===MS.indexOf(this.kind))throw new NS('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function BC(t,e){var n=[];return t[e].forEach(function(r){var i=n.length;n.forEach(function(t,e){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(i=e)}),n[i]=r}),n}function FC(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(me(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function $C(t){return this.extend(t)}function zC(t){var e;return null===t||1===(e=t.length)&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function GC(){return null}function UC(t){return null===t}function qC(t){var e;return null!==t&&(4===(e=t.length)&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t))}function jC(t){return"true"===t||"True"===t||"TRUE"===t}function WC(t){return"[object Boolean]"===Object.prototype.toString.call(t)}function YC(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function HC(t){return 48<=t&&t<=55}function VC(t){return 48<=t&&t<=57}function XC(t){if(null===t)return!1;var e,r=t.length,i=0,n=!1;if(!r)return!1;if("0"===(e="-"!==(e=t[i])&&"+"!==e?e:t[++i])){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;n=!0}return n&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!YC(t.charCodeAt(i)))return!1;n=!0}return n&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!HC(t.charCodeAt(i)))return!1;n=!0}return n&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!VC(t.charCodeAt(i)))return!1;n=!0}return!(!n||"_"===e)}function KC(t){var e,r=1;if("-"!==(e=(t=-1!==t.indexOf("_")?t.replace(/_/g,""):t)[0])&&"+"!==e||("-"===e&&(r=-1),e=(t=t.slice(1))[0]),"0"===t)return 0;if("0"===e){if("b"===t[1])return r*parseInt(t.slice(2),2);if("x"===t[1])return r*parseInt(t.slice(2),16);if("o"===t[1])return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function ZC(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!LS.isNegativeZero(t)}function QC(t){return!(null===t||!OS.test(t)||"_"===t[t.length-1])}function JC(t){var e="-"===(t=t.replace(/_/g,"").toLowerCase())[0]?-1:1;return".inf"===(t=0<="+-".indexOf(t[0])?t.slice(1):t)?1==e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:e*parseFloat(t,10)}function t_(t,e){if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(LS.isNegativeZero(t))return"-0.0";return e=t.toString(10),PS.test(e)?e.replace("e",".e"):e}function e_(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||LS.isNegativeZero(t))}function r_(t){return null!==t&&(null!==FS.exec(t)||null!==$S.exec(t))}function i_(t){var e,r,i,n,a,s=0,o=null,l=FS.exec(t);if(null===(l=null===l?$S.exec(t):l))throw new Error("Date resolve error");if(t=+l[1],e=+l[2]-1,r=+l[3],!l[4])return new Date(Date.UTC(t,e,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(t,e,r,i,n,a,s)),o&&l.setTime(l.getTime()-o),l}function n_(t){return t.toISOString()}function a_(t){return"<<"===t||null===t}function s_(t){if(null===t)return!1;for(var e,r=0,i=t.length,n=US,a=0;a<i;a++)if(!(64<(e=n.indexOf(t.charAt(a))))){if(e<0)return!1;r+=6}return r%8==0}function o_(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=US,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(e.charAt(s));return 0==(t=r%4*6)?(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)):18==t?(a.push(n>>10&255),a.push(n>>2&255)):12==t&&a.push(n>>4&255),new Uint8Array(a)}function l_(t){for(var e,r="",i=0,n=t.length,a=US,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)+t[s];return 0==(e=n%3)?r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]:2==e?r=(r=(r=(r+=a[i>>10&63])+a[i>>4&63])+a[i<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[i>>2&63])+a[i<<4&63])+a[64])+a[64]),r}function c_(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function h_(t){if(null!==t)for(var e,r,i,n=[],a=t,s=0,o=a.length;s<o;s+=1){if(e=a[s],i=!1,"[object Object]"!==WS.call(e))return!1;for(r in e)if(jS.call(e,r)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==n.indexOf(r))return!1;n.push(r)}return!0}function u_(t){return null!==t?t:[]}function d_(t){if(null!==t)for(var e,r,i=t,n=new Array(i.length),a=0,s=i.length;a<s;a+=1){if(e=i[a],"[object Object]"!==HS.call(e)||1!==(r=Object.keys(e)).length)return!1;n[a]=[r[0],e[r[0]]]}return!0}function p_(t){if(null===t)return[];for(var e,r,i=t,n=new Array(i.length),a=0,s=i.length;a<s;a+=1)e=i[a],r=Object.keys(e),n[a]=[r[0],e[r[0]]];return n}function g_(t){if(null!==t){var e,r=t;for(e in r)if(XS.call(r,e)&&null!==r[e])return!1}return!0}function f_(t){return null!==t?t:{}}function m_(t){return Object.prototype.toString.call(t)}function y_(t){return 10===t||13===t}function v_(t){return 9===t||32===t}function x_(t){return 9===t||32===t||10===t||13===t}function b_(t){return 44===t||91===t||93===t||123===t||125===t}function w_(t){return 48<=t&&t<=57?t-48:97<=(t|=32)&&t<=102?t-97+10:-1}function k_(t){return 120===t?2:117===t?4:85===t?8:0}function T_(t){return 48<=t&&t<=57?t-48:-1}function E_(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?`
`:118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function C_(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function __(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||ZS,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function S_(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=IS(t),new NS(e,t)}function A_(t,e){throw S_(t,e)}function L_(t,e){t.onWarning&&t.onWarning.call(null,S_(t,e))}function N_(t,e,r,i){var n,a,s,o;if(e<r){if(o=t.input.slice(e,r),i)for(n=0,a=o.length;n<a;n+=1)9===(s=o.charCodeAt(n))||32<=s&&s<=1114111||A_(t,"expected valid JSON character");else sA.test(o)&&A_(t,"the stream contains non-printable characters");t.result+=o}}function I_(t,e,r,i){var n,a,s,o;for(LS.isObject(r)||A_(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(n=Object.keys(r)).length;s<o;s+=1)a=n[s],QS.call(e,a)||(e[a]=r[a],i[a]=!0)}function R_(t,e,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])&&A_(t,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===m_(n[c])&&(n[c]="[object Object]");if("object"==typeof n&&"[object Object]"===m_(n)&&(n="[object Object]"),n=String(n),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)I_(t,e,a[c],r);else I_(t,e,a,r);else t.json||QS.call(r,n)||!QS.call(e,n)||(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,A_(t,"duplicated mapping key")),"__proto__"===n?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[n]=a,delete r[n];return e}function M_(t){var e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):A_(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function D_(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);0!==n;){for(;v_(n);)9===n&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&35===n)for(;10!==(n=t.input.charCodeAt(++t.position))&&13!==n&&0!==n;);if(!y_(n))break;for(M_(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&L_(t,"deficient indentation"),i}function O_(t){var e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||0!==(r=t.input.charCodeAt(e+=3))&&!x_(r))}function P_(t,e){1===e?t.result+=" ":1<e&&(t.result+=LS.repeat(`
`,e-1))}function B_(t,e,r){var i,n,a,s,o,l,c,h=t.kind,u=t.result,d=t.input.charCodeAt(t.position);if(x_(d)||b_(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)&&(x_(i=t.input.charCodeAt(t.position+1))||r&&b_(i)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,s=!1;0!==d;){if(58===d){if(x_(i=t.input.charCodeAt(t.position+1))||r&&b_(i))break}else if(35===d){if(x_(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&O_(t)||r&&b_(d))break;if(y_(d)){if(o=t.line,l=t.lineStart,c=t.lineIndent,D_(t,!1,-1),e<=t.lineIndent){s=!0,d=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&(N_(t,n,a,!1),P_(t,t.line-o),n=a=t.position,s=!1),v_(d)||(a=t.position+1),d=t.input.charCodeAt(++t.position)}return N_(t,n,a,!1),!!t.result||(t.kind=h,t.result=u,!1)}function F_(t,e){var r,i,n=t.input.charCodeAt(t.position);if(39!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(N_(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else y_(n)?(N_(t,r,i,!0),P_(t,D_(t,!1,e)),r=i=t.position):t.position===t.lineStart&&O_(t)?A_(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);A_(t,"unexpected end of the stream within a single quoted scalar")}function $_(t,e){var r,i,n,a,s,o=t.input.charCodeAt(t.position);if(34!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return N_(t,r,t.position,!0),t.position++,!0;if(92===o){if(N_(t,r,t.position,!0),y_(o=t.input.charCodeAt(++t.position)))D_(t,!1,e);else if(o<256&&uA[o])t.result+=dA[o],t.position++;else if(0<(s=k_(o))){for(n=s,a=0;0<n;n--)0<=(s=w_(o=t.input.charCodeAt(++t.position)))?a=(a<<4)+s:A_(t,"expected hexadecimal character");t.result+=C_(a),t.position++}else A_(t,"unknown escape sequence");r=i=t.position}else y_(o)?(N_(t,r,i,!0),P_(t,D_(t,!1,e)),r=i=t.position):t.position===t.lineStart&&O_(t)?A_(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}A_(t,"unexpected end of the stream within a double quoted scalar")}function z_(t,e){var r,i,n,a,s,o,l,c,h,u,d,p=!0,g=t.tag,f=t.anchor,m=Object.create(null),y=t.input.charCodeAt(t.position);if(91===y)c=!(s=93),a=[];else{if(123!==y)return!1;s=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);0!==y;){if(D_(t,!0,e),(y=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=f,t.kind=c?"mapping":"sequence",t.result=a,!0;p?44===y&&A_(t,"expected the node content, but found ','"):A_(t,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&x_(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,D_(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,H_(t,e,JS,!1,!0),u=t.tag,h=t.result,D_(t,!0,e),y=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==y||(o=!0,y=t.input.charCodeAt(++t.position),D_(t,!0,e),H_(t,e,JS,!1,!0),d=t.result),c?R_(t,a,m,u,h,d,r,i,n):o?a.push(R_(t,null,m,u,h,d,r,i,n)):a.push(h),D_(t,!0,e),44===(y=t.input.charCodeAt(t.position))?(p=!0,y=t.input.charCodeAt(++t.position)):p=!1}A_(t,"unexpected end of the stream within a flow collection")}function G_(t,e){var r,i,n,a=iA,s=!1,o=!1,l=e,c=0,h=!1,u=t.input.charCodeAt(t.position);if(124===u)i=!1;else{if(62!==u)return!1;i=!0}for(t.kind="scalar",t.result="";0!==u;)if(43===(u=t.input.charCodeAt(++t.position))||45===u)iA===a?a=43===u?aA:nA:A_(t,"repeat of a chomping mode identifier");else{if(!(0<=(n=T_(u))))break;0===n?A_(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?A_(t,"repeat of an indentation width identifier"):(l=e+n-1,o=!0)}if(v_(u)){for(;v_(u=t.input.charCodeAt(++t.position)););if(35===u)for(;!y_(u=t.input.charCodeAt(++t.position))&&0!==u;);}for(;0!==u;){for(M_(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<l)&&32===u;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>l&&(l=t.lineIndent),y_(u))c++;else{if(t.lineIndent<l){a===aA?t.result+=LS.repeat(`
`,s?1+c:c):a===iA&&s&&(t.result+=`
`);break}for(i?v_(u)?(h=!0,t.result+=LS.repeat(`
`,s?1+c:c)):h?(h=!1,t.result+=LS.repeat(`
`,c+1)):0===c?s&&(t.result+=" "):t.result+=LS.repeat(`
`,c):t.result+=LS.repeat(`
`,s?1+c:c),o=s=!0,c=0,r=t.position;!y_(u)&&0!==u;)u=t.input.charCodeAt(++t.position);N_(t,r,t.position,!1)}}return!0}function U_(t,e){var r,i,n=t.tag,a=t.anchor,s=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,A_(t,"tab characters must not be used in indentation")),45===i)&&x_(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,D_(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,H_(t,e,eA,!1,!0),s.push(t.result),D_(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)A_(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!o&&(t.tag=n,t.anchor=a,t.kind="sequence",t.result=s,!0)}function q_(t,e,r){var i,n,a,s,o,l,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,A_(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!x_(i)){if(s=t.line,o=t.lineStart,l=t.position,!H_(t,r,tA,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);v_(c);)c=t.input.charCodeAt(++t.position);if(58===c)x_(c=t.input.charCodeAt(++t.position))||A_(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(R_(t,d,p,g,f,null,s,o,l),g=f=m=null),n=y=!(v=!0),g=t.tag,f=t.result;else{if(!v)return t.tag=h,t.anchor=u,!0;A_(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=h,t.anchor=u,!0;A_(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(R_(t,d,p,g,f,null,s,o,l),g=f=m=null),n=y=v=!0):y?n=!(y=!1):A_(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=i;if((t.line===a||t.lineIndent>e)&&(y&&(s=t.line,o=t.lineStart,l=t.position),H_(t,e,rA,!0,n)&&(y?f=t.result:m=t.result),y||(R_(t,d,p,g,f,m,s,o,l),g=f=m=null),D_(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)A_(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&R_(t,d,p,g,f,null,s,o,l),v&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),v}function j_(t){var e,r,i,n=!1,a=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;if(null!==t.tag&&A_(t,"duplication of a tag property"),60===(s=t.input.charCodeAt(++t.position))?(n=!0,s=t.input.charCodeAt(++t.position)):33===s?(a=!0,r="!!",s=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){for(;0!==(s=t.input.charCodeAt(++t.position))&&62!==s;);t.position<t.length?(i=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):A_(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!x_(s);)33===s&&(a?A_(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),cA.test(r)||A_(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),lA.test(i)&&A_(t,"tag suffix cannot contain flow indicator characters")}i&&!hA.test(i)&&A_(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{A_(t,"tag name is malformed: "+i)}return n?t.tag=i:QS.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:A_(t,'undeclared tag handle "'+r+'"'),!0}function W_(t){var e,r=t.input.charCodeAt(t.position);if(38!==r)return!1;for(null!==t.anchor&&A_(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!x_(r)&&!b_(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&A_(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Y_(t){var e,r=t.input.charCodeAt(t.position);if(42!==r)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!x_(r)&&!b_(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&A_(t,"name of an alias node must contain at least one character"),e=t.input.slice(e,t.position),QS.call(t.anchorMap,e)||A_(t,'unidentified alias "'+e+'"'),t.result=t.anchorMap[e],D_(t,!0,-1),!0}function H_(t,e,r,i,n){var a,s,o,l,c,h,u,d=1,p=!1,g=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=rA===r||eA===r,i&&D_(t,!0,-1)&&(p=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;j_(t)||W_(t);)D_(t,!0,-1)?(p=!0,o=a,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):o=!1;if(o=o&&(p||n),1!==d&&rA!==r||(i=JS===r||tA===r?e:e+1,n=t.position-t.lineStart,1===d?o&&(U_(t,n)||q_(t,n,i))||z_(t,i)?g=!0:(s&&G_(t,i)||F_(t,i)||$_(t,i)?g=!0:Y_(t)?(g=!0,null===t.tag&&null===t.anchor||A_(t,"alias node should not have any properties")):B_(t,i,JS===r)&&(g=!0,null===t.tag)&&(t.tag="?"),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===d&&(g=o&&U_(t,n))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&A_(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(QS.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||A_(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&A_(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):A_(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function V_(t){var e,r,i,n,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(D_(t,!0,-1),n=t.input.charCodeAt(t.position),!(0<t.lineIndent||37!==n));){for(s=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!x_(n);)n=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&A_(t,"directive name must not be less than one character in length");0!==n;){for(;v_(n);)n=t.input.charCodeAt(++t.position);if(35===n){for(;0!==(n=t.input.charCodeAt(++t.position))&&!y_(n););break}if(y_(n))break;for(e=t.position;0!==n&&!x_(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&M_(t),QS.call(gA,r)?gA[r](t,r,i):L_(t,'unknown document directive "'+r+'"')}D_(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,D_(t,!0,-1)):s&&A_(t,"directives end mark is expected"),H_(t,t.lineIndent-1,rA,!1,!0),D_(t,!0,-1),t.checkLineBreaks&&oA.test(t.input.slice(a,t.position))&&L_(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&O_(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,D_(t,!0,-1)):t.position<t.length-1&&A_(t,"end of the stream or a document separator is expected")}function X_(t,e){e=e||{};var r=new __(t=0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+=`
`),65279===t.charCodeAt(0))?t.slice(1):t,e);for(-1!==(e=t.indexOf("\0"))&&(r.position=e,A_(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;)V_(r);return r.documents}function K_(t,e,r){null!==e&&"object"==typeof e&&"u"<typeof r&&(r=e,e=null);var i=X_(t,r);if("function"!=typeof e)return i;for(var n=0,a=i.length;n<a;n+=1)e(i[n])}function Z_(t,e){if(0!==(t=X_(t,e)).length){if(1===t.length)return t[0];throw new NS("expected a single document in the stream, but found more")}}function Q_(t,e){var r,i,n,a,s,o,l;if(null===e)return{};for(r={},n=0,a=(i=Object.keys(e)).length;n<a;n+=1)s=i[n],o=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&yA.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function J_(t){var e,r,i=t.toString(16).toUpperCase();if(t<=255)e="x",r=2;else if(t<=65535)e="u",r=4;else{if(!(t<=4294967295))throw new NS("code point within a string may not be greater than 0xFFFFFFFF");e="U",r=8}return"\\"+e+LS.repeat("0",r-i.length)+i}function tS(t){this.schema=t.schema||ZS,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=LS.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Q_(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?TA:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function eS(t,e){for(var r,i,n=LS.repeat(" ",e),a=0,s="",o=t.length;a<o;)a=-1===(r=t.indexOf(`
`,a))?(i=t.slice(a),o):(i=t.slice(a,r+1),r+1),i.length&&i!==`
`&&(s+=n),s+=i;return s}function rS(t,e){return`
`+LS.repeat(" ",t.indent*e)}function iS(t,e){for(var r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function nS(t){return 32===t||9===t}function aS(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==vA||65536<=t&&t<=1114111}function sS(t){return aS(t)&&t!==vA&&13!==t&&t!==xA}function oS(t,e,r){var i=sS(t),n=i&&!nS(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!n)||sS(e)&&!nS(e)&&35===t||58===e&&n}function lS(t){return aS(t)&&t!==vA&&!nS(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function cS(t){return!nS(t)&&58!==t}function hS(t,e){var r=t.charCodeAt(e);return 55296<=r&&r<=56319&&e+1<t.length&&56320<=(t=t.charCodeAt(e+1))&&t<=57343?1024*(r-55296)+t-56320+65536:r}function uS(t){return/^\n* /.test(t)}function dS(t,e,r,i,n,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==i,g=-1,f=lS(hS(t,0))&&cS(hS(t,t.length-1));if(e||s)for(l=0;l<t.length;65536<=c?l+=2:l++){if(!aS(c=hS(t,l)))return AA;f=f&&oS(c,h,o),h=c}else{for(l=0;l<t.length;65536<=c?l+=2:l++){if((c=hS(t,l))===xA)u=!0,p&&(d=d||i<l-g-1&&" "!==t[g+1],g=l);else if(!aS(c))return AA;f=f&&oS(c,h,o),h=c}d=d||p&&i<l-g-1&&" "!==t[g+1]}return u||d?9<r&&uS(t)?AA:s?a===TA?AA:CA:d?SA:_A:!f||s||n(t)?a===TA?AA:CA:EA}function pS(n,a,s,o,l){n.dump=(()=>{if(0===a.length)return n.quotingType===TA?'""':"''";if(!n.noCompatMode&&(-1!==wA.indexOf(a)||kA.test(a)))return n.quotingType===TA?'"'+a+'"':"'"+a+"'";var t=n.indent*Math.max(1,s),e=-1===n.lineWidth?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-t),r=o||-1<n.flowLevel&&s>=n.flowLevel;function i(t){return iS(n,t)}switch(me(i,"testAmbiguity"),dS(a,r,n.indent,e,i,n.quotingType,n.forceQuotes&&!o,l)){case EA:return a;case CA:return"'"+a.replace(/'/g,"''")+"'";case _A:return"|"+gS(a,n.indent)+fS(eS(a,t));case SA:return">"+gS(a,n.indent)+fS(eS(mS(a,e),t));case AA:return'"'+vS(a)+'"';default:throw new NS("impossible error: invalid scalar style")}})()}function gS(t,e){var e=uS(t)?String(e):"",r=t[t.length-1]===`
`;return e+(!r||t[t.length-2]!==`
`&&t!==`
`?r?"":"-":"+")+`
`}function fS(t){return t[t.length-1]===`
`?t.slice(0,-1):t}function mS(t,e){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=t.indexOf(`
`))?r:t.length,i.lastIndex=r,yS(t.slice(0,r),e)),a=t[0]===`
`||" "===t[0];o=i.exec(t);){var s=o[1],o=o[2],l=" "===o[0];n+=s+(a||l||""===o?"":`
`)+yS(o,e),a=l}return n}function yS(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,a=0,s=0,o="";i=n.exec(t);)e<(i=i.index)-a&&(o+=`
`+t.slice(a,r=a<s?s:i),a=r+1),s=i;return o+=`
`,t.length-a>e&&a<s?o+=t.slice(a,s)+`
`+t.slice(s+1):o+=t.slice(a),o.slice(1)}function vS(t){for(var e,r,i="",n=0;n<t.length;65536<=e?n+=2:n++)e=hS(t,n),!(r=bA[e])&&aS(e)?(i+=t[n],65536<=e&&(i+=t[n+1])):i+=r||J_(e);return i}function xS(t,e,r){for(var i,n="",a=t.tag,s=0,o=r.length;s<o;s+=1)i=r[s],t.replacer&&(i=t.replacer.call(r,String(s),i)),(ES(t,e,i,!1,!1)||"u"<typeof i&&ES(t,e,null,!1,!1))&&(""!==n&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=a,t.dump="["+n+"]"}function bS(t,e,r,i){for(var n,a="",s=t.tag,o=0,l=r.length;o<l;o+=1)n=r[o],t.replacer&&(n=t.replacer.call(r,String(o),n)),(ES(t,e+1,n,!0,!0,!1,!0)||"u"<typeof n&&ES(t,e+1,null,!0,!0,!1,!0))&&(i&&""===a||(a+=rS(t,e)),t.dump&&xA===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=s,t.dump=a||"[]"}function wS(t,e,r){for(var i,n,a,s="",o=t.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==s&&(a+=", "),t.condenseFlow&&(a+='"'),n=r[i=l[c]],t.replacer&&(n=t.replacer.call(r,i,n)),ES(t,e,i,!1,!1)&&(1024<t.dump.length&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ES(t,e,n,!1,!1))&&(s+=a+=t.dump);t.tag=o,t.dump="{"+s+"}"}function kS(t,e,r,i){var n,a,s,o,l,c="",h=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new NS("sortKeys must be a boolean or a function");for(n=0,a=u.length;n<a;n+=1)l="",i&&""===c||(l+=rS(t,e)),s=r[o=u[n]],t.replacer&&(s=t.replacer.call(r,o,s)),ES(t,e+1,o,!0,!0,!0)&&((o=null!==t.tag&&"?"!==t.tag||t.dump&&1024<t.dump.length)&&(t.dump&&xA===t.dump.charCodeAt(0)?l+="?":l+="? "),l+=t.dump,o&&(l+=rS(t,e)),ES(t,e+1,s,!0,o))&&(t.dump&&xA===t.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=t.dump);t.tag=h,t.dump=c||"{}"}function TS(t,e,r){for(var i,n,a,s=r?t.explicitTypes:t.implicitTypes,o=0,l=s.length;o<l;o+=1)if(((n=s[o]).instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof e&&e instanceof n.instanceOf)&&(!n.predicate||n.predicate(e))){if(r?n.multi&&n.representName?t.tag=n.representName(e):t.tag=n.tag:t.tag="?",n.represent){if(a=t.styleMap[n.tag]||n.defaultStyle,"[object Function]"===mA.call(n.represent))i=n.represent(e,a);else{if(!yA.call(n.represent,a))throw new NS("!<"+n.tag+'> tag resolver accepts not "'+a+'" style');i=n.represent[a](e,a)}t.dump=i}return!0}return!1}function ES(t,e,r,i,n,a,s){t.tag=null,t.dump=r,TS(t,r,!1)||TS(t,r,!0);var o,l,c=mA.call(t.dump),h=i,u=(i=i&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0<e)&&(n=!1),l&&t.usedDuplicates[o])t.dump="*ref_"+o;else{if(u&&l&&!t.usedDuplicates[o]&&(t.usedDuplicates[o]=!0),"[object Object]"===c)i&&0!==Object.keys(t.dump).length?(kS(t,e,t.dump,n),l&&(t.dump="&ref_"+o+t.dump)):(wS(t,e,t.dump),l&&(t.dump="&ref_"+o+" "+t.dump));else if("[object Array]"===c)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&0<e?bS(t,e-1,t.dump,n):bS(t,e,t.dump,n),l&&(t.dump="&ref_"+o+t.dump)):(xS(t,e,t.dump),l&&(t.dump="&ref_"+o+" "+t.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(t.skipInvalid)return!1;throw new NS("unacceptable kind of an object to dump "+c)}"?"!==t.tag&&pS(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(r=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),r="!"===t.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",t.dump=r+" "+t.dump)}return!0}function CS(t,e){var r,i,n=[],a=[];for(_S(t,n,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(n[a[r]]);e.usedDuplicates=new Array(i)}function _S(t,e,r){var i,n,a;if(null!==t&&"object"==typeof t)if(-1!==(n=e.indexOf(t)))-1===r.indexOf(n)&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,a=t.length;n<a;n+=1)_S(t[n],e,r);else for(n=0,a=(i=Object.keys(t)).length;n<a;n+=1)_S(t[i[n]],e,r)}function SS(t,e){return(e=new tS(e=e||{})).noRefs||CS(t,e),e.replacer&&(t=e.replacer.call({"":t},"",t)),ES(e,0,t,!0,!0)?e.dump+`
`:""}function AS(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var LS,NS,IS,RS,MS,DS,OS,PS,BS,FS,$S,zS,GS,US,qS,jS,WS,YS,HS,VS,XS,KS,ZS,QS,JS,tA,eA,rA,iA,nA,aA,sA,oA,lA,cA,hA,uA,dA,pA,gA,fA,mA,yA,vA,xA,bA,wA,kA,TA,EA,CA,_A,SA,AA,LA,NA,IA=t(()=>{for(me(EC,"isNothing"),me(CC,"isObject"),me(_C,"toArray"),me(SC,"extend"),me(AC,"repeat"),me(LC,"isNegativeZero"),LS={isNothing:EC,isObject:CC,toArray:_C,repeat:AC,isNegativeZero:LC,extend:SC},me(NC,"formatError"),me(IC,"YAMLException$1"),((IC.prototype=Object.create(Error.prototype)).constructor=IC).prototype.toString=me(function(t){return this.name+": "+NC(this,t)},"toString"),NS=IC,me(RC,"getLine"),me(MC,"padStart"),me(DC,"makeSnippet"),IS=DC,RS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],MS=["scalar","sequence","mapping"],me(OC,"compileStyleAliases"),me(PC,"Type$1"),DS=PC,me(BC,"compileList"),me(FC,"compileMap"),me($C,"Schema$1"),$C.prototype.extend=me(function(t){var e=[],r=[];if(t instanceof DS)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new NS("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof DS))throw new NS("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new NS("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new NS("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof DS))throw new NS("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create($C.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=BC(t,"implicit"),t.compiledExplicit=BC(t,"explicit"),t.compiledTypeMap=FC(t.compiledImplicit,t.compiledExplicit),t},"extend"),BS=$C,fA=new DS("tag:yaml.org,2002:str",{kind:"scalar",construct:me(function(t){return null!==t?t:""},"construct")}),zS=new DS("tag:yaml.org,2002:seq",{kind:"sequence",construct:me(function(t){return null!==t?t:[]},"construct")}),GS=new DS("tag:yaml.org,2002:map",{kind:"mapping",construct:me(function(t){return null!==t?t:{}},"construct")}),BS=new BS({explicit:[fA,zS,GS]}),me(zC,"resolveYamlNull"),me(GC,"constructYamlNull"),me(UC,"isNull"),fA=new DS("tag:yaml.org,2002:null",{kind:"scalar",resolve:zC,construct:GC,predicate:UC,represent:{canonical:me(function(){return"~"},"canonical"),lowercase:me(function(){return"null"},"lowercase"),uppercase:me(function(){return"NULL"},"uppercase"),camelcase:me(function(){return"Null"},"camelcase"),empty:me(function(){return""},"empty")},defaultStyle:"lowercase"}),me(qC,"resolveYamlBoolean"),me(jC,"constructYamlBoolean"),me(WC,"isBoolean"),zS=new DS("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qC,construct:jC,predicate:WC,represent:{lowercase:me(function(t){return t?"true":"false"},"lowercase"),uppercase:me(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:me(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),me(YC,"isHexCode"),me(HC,"isOctCode"),me(VC,"isDecCode"),me(XC,"resolveYamlInteger"),me(KC,"constructYamlInteger"),me(ZC,"isInteger"),GS=new DS("tag:yaml.org,2002:int",{kind:"scalar",resolve:XC,construct:KC,predicate:ZC,represent:{binary:me(function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:me(function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:me(function(t){return t.toString(10)},"decimal"),hexadecimal:me(function(t){return 0<=t?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),OS=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),me(QC,"resolveYamlFloat"),me(JC,"constructYamlFloat"),PS=/^[-+]?[0-9]+e/,me(t_,"representYamlFloat"),me(e_,"isFloat"),qS=new DS("tag:yaml.org,2002:float",{kind:"scalar",resolve:QC,construct:JC,predicate:e_,represent:t_,defaultStyle:"lowercase"}),BS=BS.extend({implicit:[fA,zS,GS,qS]}),fA=BS,FS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$S=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]))?))?$"),me(r_,"resolveYamlTimestamp"),me(i_,"constructYamlTimestamp"),me(n_,"representYamlTimestamp"),zS=new DS("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r_,construct:i_,instanceOf:Date,represent:n_}),me(a_,"resolveYamlMerge"),GS=new DS("tag:yaml.org,2002:merge",{kind:"scalar",resolve:a_}),US=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`,me(s_,"resolveYamlBinary"),me(o_,"constructYamlBinary"),me(l_,"representYamlBinary"),me(c_,"isBinary"),qS=new DS("tag:yaml.org,2002:binary",{kind:"scalar",resolve:s_,construct:o_,predicate:c_,represent:l_}),jS=Object.prototype.hasOwnProperty,WS=Object.prototype.toString,me(h_,"resolveYamlOmap"),me(u_,"constructYamlOmap"),YS=new DS("tag:yaml.org,2002:omap",{kind:"sequence",resolve:h_,construct:u_}),HS=Object.prototype.toString,me(d_,"resolveYamlPairs"),me(p_,"constructYamlPairs"),VS=new DS("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:d_,construct:p_}),XS=Object.prototype.hasOwnProperty,me(g_,"resolveYamlSet"),me(f_,"constructYamlSet"),KS=new DS("tag:yaml.org,2002:set",{kind:"mapping",resolve:g_,construct:f_}),ZS=fA.extend({implicit:[zS,GS],explicit:[qS,YS,VS,KS]}),QS=Object.prototype.hasOwnProperty,rA=4,iA=JS=1,nA=tA=2,aA=eA=3,sA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oA=/[\x85\u2028\u2029]/,lA=/[,\[\]\{\}]/,cA=/^(?:!|!!|![a-z\-]+!)$/i,hA=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,me(m_,"_class"),me(y_,"is_EOL"),me(v_,"is_WHITE_SPACE"),me(x_,"is_WS_OR_EOL"),me(b_,"is_FLOW_INDICATOR"),me(w_,"fromHexCode"),me(k_,"escapedHexLen"),me(T_,"fromDecimalCode"),me(E_,"simpleEscapeSequence"),me(C_,"charFromCodepoint"),uA=new Array(256),dA=new Array(256),pA=0;pA<256;pA++)uA[pA]=E_(pA)?1:0,dA[pA]=E_(pA);me(__,"State$1"),me(S_,"generateError"),me(A_,"throwError"),me(L_,"throwWarning"),gA={YAML:me(function(t,e,r){var i,n;null!==t.version&&A_(t,"duplication of %YAML directive"),1!==r.length&&A_(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&A_(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&A_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&L_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:me(function(t,e,r){var i;2!==r.length&&A_(t,"TAG directive accepts exactly two arguments"),i=r[1],cA.test(r=r[0])||A_(t,"ill-formed tag handle (first argument) of the TAG directive"),QS.call(t.tagMap,r)&&A_(t,'there is a previously declared suffix for "'+r+'" tag handle'),hA.test(i)||A_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{A_(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i},"handleTagDirective")},me(N_,"captureSegment"),me(I_,"mergeMappings"),me(R_,"storeMappingPair"),me(M_,"readLineBreak"),me(D_,"skipSeparationSpace"),me(O_,"testDocumentSeparator"),me(P_,"writeFoldedLines"),me(B_,"readPlainScalar"),me(F_,"readSingleQuotedScalar"),me($_,"readDoubleQuotedScalar"),me(z_,"readFlowCollection"),me(G_,"readBlockScalar"),me(U_,"readBlockSequence"),me(q_,"readBlockMapping"),me(j_,"readTagProperty"),me(W_,"readAnchorProperty"),me(Y_,"readAlias"),me(H_,"composeNode"),me(V_,"readDocument"),me(X_,"loadDocuments"),me(K_,"loadAll$1"),me(Z_,"load$1"),fA={loadAll:K_,load:Z_},mA=Object.prototype.toString,yA=Object.prototype.hasOwnProperty,vA=65279,xA=10,bA={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"},wA=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],kA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,me(Q_,"compileStyleMap"),me(J_,"encodeHex"),TA=2,me(tS,"State"),me(eS,"indentString"),me(rS,"generateNextLine"),me(iS,"testImplicitResolving"),me(nS,"isWhitespace"),me(aS,"isPrintable"),me(sS,"isNsCharOrWhitespace"),me(oS,"isPlainSafe"),me(lS,"isPlainSafeFirst"),me(cS,"isPlainSafeLast"),me(hS,"codePointAt"),me(uS,"needIndentIndicator"),EA=1,CA=2,_A=3,SA=4,AA=5,me(dS,"chooseScalarStyle"),me(pS,"writeScalar"),me(gS,"blockHeader"),me(fS,"dropEndingNewline"),me(mS,"foldString"),me(yS,"foldLine"),me(vS,"escapeString"),me(xS,"writeFlowSequence"),me(bS,"writeBlockSequence"),me(wS,"writeFlowMapping"),me(kS,"writeBlockMapping"),me(TS,"detectType"),me(ES,"writeNode"),me(CS,"getDuplicateReferences"),me(_S,"inspectNode"),me(SS,"dump$1"),me(AS,"renamed"),LA=BS,NA=fA.load,AS("safeLoad","load"),AS("safeLoadAll","loadAll"),AS("safeDump","dump")});function RA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function MA(t){qA=t}function DA(t,e=""){let i="string"==typeof t?t:t.source,n={replace:me((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(WA.caret,"$1"),i=i.replace(t,r),n},"replace"),getRegex:me(()=>new RegExp(i,e),"getRegex")};return n}function OA(t,e){if(e){if(WA.escapeTest.test(t))return t.replace(WA.escapeReplace,m9)}else if(WA.escapeTestNoEncode.test(t))return t.replace(WA.escapeReplaceNoEncode,m9);return t}function PA(t){try{t=encodeURI(t).replace(WA.percentDecode,"%")}catch{return null}return t}function BA(t,e){let r=t.replace(WA.findPipe,(t,e,r)=>{let i=!1,n=e;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(WA.splitPipe),n=0;if(i[0].trim()||i.shift(),0<i.length&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(WA.slashPipe,"|");return i}function FA(t,e,r){var i=t.length;if(0===i)return"";let n=0;for(;n<i&&t.charAt(i-n-1)===e;)n++;return t.slice(0,i-n)}function $A(r,i){if(-1!==r.indexOf(i[1])){let e=0;for(let t=0;t<r.length;t++)if("\\"===r[t])t++;else if(r[t]===i[0])e++;else if(r[t]===i[1]&&--e<0)return t}return-1}function zA(t,e,r,i,n){var a=e.href,e=e.title||null,n=t[1].replace(n.other.outputLinkReplace,"$1");return"!"!==t[0].charAt(0)?(i.state.inLink=!0,t={type:"link",raw:r,href:a,title:e,text:n,tokens:i.inlineTokens(n)},i.state.inLink=!1,t):{type:"image",raw:r,href:a,title:e,text:n}}function GA(t,e,r){if(null===(t=t.match(r.other.indentCodeCompensation)))return e;let i=t[1];return e.split(`
`).map(t=>{var e=t.match(r.other.beginningSpace);return null!==e&&([e]=e,e.length>=i.length)?t.slice(i.length):t}).join(`
`)}function UA(t,e){return E9.parse(t,e)}var qA,jA,WA,YA,HA,VA,XA,KA,ZA,QA,JA,t9,e9,r9,i9,n9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9=t(()=>{me(RA,"_getDefaults"),qA=RA(),me(MA,"changeDefaults"),jA={exec:me(()=>null,"exec")},me(DA,"edit"),WA={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:me(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},ZA=/^(?:[ \t]*(?:\n|$))+/,QA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,VA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,r9=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,KA=/(?:[*+-]|\d{1,9}[.)])/,u9=DA(s9=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,KA).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(),s9=DA(s9).replace(/bull/g,KA).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(),c9=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,i9=/^[^\n]+/,o9=/(?!\s*\])(?:\\.|[^\[\]\\])+/,HA=DA(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",o9).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),KA=DA(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,KA).getRegex(),h9="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",a9=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,d9=DA("^ {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",a9).replace("tag",h9).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n9=DA(c9).replace("hr",r9).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",h9).getRegex(),YA={blockquote:DA(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",n9).getRegex(),code:QA,def:HA,fences:VA,heading:XA,hr:r9,html:d9,lheading:u9,list:KA,newline:ZA,paragraph:n9,table:jA,text:i9},QA=DA("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",r9).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",h9).getRegex(),HA={...YA,lheading:s9,table:QA,paragraph:DA(c9).replace("hr",r9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QA).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",h9).getRegex()},VA={...YA,html:DA(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",a9).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:jA,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:DA(c9).replace("hr",r9).replace("heading",` *#{1,6} *[^
]`).replace("lheading",u9).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},XA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,d9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,KA=/^( {2,}|\\)\n(?!\s*$)/,ZA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,n9=/[\p{P}\p{S}]/u,i9=/[\s\p{P}\p{S}]/u,s9=/[^\s\p{P}\p{S}]/u,QA=DA(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,i9).getRegex(),h9=/(?!~)[\p{P}\p{S}]/u,c9=/(?!~)[\s\p{P}\p{S}]/u,r9=/(?:[^\s\p{P}\p{S}]|~)/u,u9=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,T9=DA(JA=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,n9).getRegex(),JA=DA(JA,"u").replace(/punct/g,h9).getRegex(),t9=DA(e9="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,s9).replace(/punctSpace/g,i9).replace(/punct/g,n9).getRegex(),e9=DA(e9,"gu").replace(/notPunctSpace/g,r9).replace(/punctSpace/g,c9).replace(/punct/g,h9).getRegex(),r9=DA("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,s9).replace(/punctSpace/g,i9).replace(/punct/g,n9).getRegex(),c9=DA(/\\(punct)/,"gu").replace(/punct/g,n9).getRegex(),h9=DA(/^<(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(),s9=DA(a9).replace("(?:--\x3e|$)","--\x3e").getRegex(),i9=DA("^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",s9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),n9=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,a9=DA(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",n9).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),s9=DA(/^!?\[(label)\]\[(ref)\]/).replace("label",n9).replace("ref",o9).getRegex(),o9=DA(/^!?\[(ref)\](?:\[\])?/).replace("ref",o9).getRegex(),l9=DA("reflink|nolink(?!\\()","g").replace("reflink",s9).replace("nolink",o9).getRegex(),h9={...c9={_backpedal:jA,anyPunctuation:c9,autolink:h9,blockSkip:u9,br:KA,code:d9,del:jA,emStrongLDelim:T9,emStrongRDelimAst:t9,emStrongRDelimUnd:r9,escape:XA,link:a9,nolink:o9,punctuation:QA,reflink:s9,reflinkSearch:l9,tag:i9,text:ZA,url:jA},link:DA(/^!?\[(label)\]\((.*?)\)/).replace("label",n9).getRegex(),reflink:DA(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n9).getRegex()},u9={...c9,emStrongRDelimAst:e9,emStrongLDelim:JA,url:DA(/^((?: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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},d9={...u9,br:DA(KA).replace("{2,}","*").getRegex(),text:DA(u9.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},p9={normal:YA,gfm:HA,pedantic:VA},g9={normal:c9,gfm:u9,breaks:d9,pedantic:h9},f9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m9=me(t=>f9[t],"getEscapeReplacement"),me(OA,"escape"),me(PA,"cleanUrl"),me(BA,"splitCells"),me(FA,"rtrim"),me($A,"findClosingBracket"),me(zA,"outputLink"),me(GA,"indentCodeCompensation"),y9=class{static{me(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||qA}space(t){if((t=this.rules.block.newline.exec(t))&&0<t[0].length)return{type:"space",raw:t[0]}}code(t){var e;if(t=this.rules.block.code.exec(t))return e=t[0].replace(this.rules.other.codeRemoveIndent,""),{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:FA(e,`
`)}}fences(t){var e,r;if(t=this.rules.block.fences.exec(t))return r=GA(e=t[0],t[3]||"",this.rules),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(e){var r;if(e=this.rules.block.heading.exec(e)){let t=e[2].trim();return this.rules.other.endingHash.test(t)&&(r=FA(t,"#"),!this.options.pedantic&&r&&!this.rules.other.endingSpaceChar.test(r)||(t=r.trim())),{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){if(t=this.rules.block.hr.exec(t))return{type:"hr",raw:FA(t[0],`
`)}}blockquote(t){if(t=this.rules.block.blockquote.exec(t)){let i=FA(t[0],`
`).split(`
`),n="",a="",s=[];for(;0<i.length;){let t=!1,e=[],r;for(r=0;r<i.length;r++)if(this.rules.other.blockquoteStart.test(i[r]))e.push(i[r]),t=!0;else{if(t)break;e.push(i[r])}i=i.slice(r);var o,l=(c=e.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 t=p[1].trim(),e=1<t.length,c={type:"list",raw:"",ordered:e,start:e?+t.slice(0,-1):"",loose:!1,items:[]},h=(t=e?"\\d{1,9}\\"+t.slice(-1):"\\"+t,this.options.pedantic&&(t=e?t:"[*+-]"),this.rules.other.listItemRegex(t)),u=!1;for(;d;){let t=!1,e="",r="";if(!(p=h.exec(d))||this.rules.block.hr.test(d))break;e=p[0],d=d.substring(e.length);let i=p[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.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)&&(e+=n+`
`,d=d.substring(n.length+1),t=!0),!t)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 x,b=d.split(`
`,1)[0];if(n=b,x=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(x.search(this.rules.other.nonSpaceChar)>=s||!n.trim())r+=`
`+x.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),e+=b+`
`,d=d.substring(b.length+1),i=x.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(e)&&(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:e,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}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 t=0;t<c.items.length;t++)this.lexer.state.top=!1,c.items[t].tokens=this.lexer.blockTokens(c.items[t].text,[]),c.loose||(r=0<(r=c.items[t].tokens.filter(t=>"space"===t.type)).length&&r.some(t=>this.rules.other.anyLine.test(t.raw)),c.loose=r);if(c.loose)for(let t=0;t<c.items.length;t++)c.items[t].loose=!0;return c}}}html(t){if(t=this.rules.block.html.exec(t))return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(t){var e,r,i;if(t=this.rules.block.def.exec(t))return e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:r,title:i}}table(n){if((n=this.rules.block.table.exec(n))&&this.rules.other.tableDelimiter.test(n[2])){let e=BA(n[1]),t=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(e.length===t.length){for(var a of t)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 t=0;t<e.length;t++)i.header.push({text:e[t],tokens:this.lexer.inline(e[t]),header:!0,align:i.align[t]});for(var s of r)i.rows.push(BA(s,i.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]})));return i}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:t[1]}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var 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=FA(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else-1<(a=$A(r[2],"()"))&&(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 t=r[2],e="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),zA(r,{href:(t=this.rules.other.startAngleBracket.test(t)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?zA(r,t,r[0],this.lexer,this.rules):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,i=t,n=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])i+=r;else if((l[5]||l[6])&&t%3&&!((t+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,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(i){if(i=this.rules.inline.code.exec(i)){let t=i[2].replace(this.rules.other.newLineCharGlobal," "),e=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return e&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:i[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,i;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=r[0],e="mailto:"+t;else{for(;i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",i!==r[0];);t=r[0],e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock,{type:"text",raw:t[0],text:t[0],escaped:e}}},v9=class r{static{me(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qA,this.options.tokenizer=this.options.tokenizer||new y9,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={other:WA,block:p9.normal,inline:g9.normal},this.options.pedantic?(t.block=p9.pedantic,t.inline=g9.pedantic):this.options.gfm&&(t.block=p9.gfm,this.options.breaks?t.inline=g9.breaks:t.inline=g9.gfm),this.tokenizer.rules=t}static get rules(){return{block:p9,inline:g9}}static lex(t,e){return new r(e).lex(t)}static lexInline(t,e){return new r(e).inlineTokens(t)}lex(t){t=t.replace(WA.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){var e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,r=[],i=!1){for(this.options.pedantic&&(n=n.replace(WA.tabCharGlobal," ").replace(WA.spaceLine,""));n;){let e;if(!this.options.extensions?.block?.some(t=>!!(e=t.call({lexer:this},n,r))&&(n=n.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.space(n)){n=n.substring(e.raw.length);var t=r.at(-1);1===e.raw.length&&void 0!==t?t.raw+=`
`:r.push(e)}else if(e=this.tokenizer.code(n))n=n.substring(e.raw.length),"paragraph"===(t=r.at(-1))?.type||"text"===t?.type?(t.raw+=`
`+e.raw,t.text+=`
`+e.text,this.inlineQueue.at(-1).src=t.text):r.push(e);else if(e=this.tokenizer.fences(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.heading(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.hr(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.blockquote(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.list(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.html(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.def(n)){n=n.substring(e.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=`
`+e.raw,a.text+=`
`+e.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title})}else if(e=this.tokenizer.table(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.lheading(n))n=n.substring(e.raw.length),r.push(e);else{let t=n;if(this.options.extensions?.startBlock){let e=1/0,r=n.slice(1),i;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(i=t.call({lexer:this},r))&&0<=i&&(e=Math.min(e,i))}),e<1/0&&0<=e&&(t=n.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(t)))a=r.at(-1),i&&"paragraph"===a?.type?(a.raw+=`
`+e.raw,a.text+=`
`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(e),i=t.length!==n.length,n=n.substring(e.raw.length);else if(e=this.tokenizer.text(n)){n=n.substring(e.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=`
`+e.raw,s.text+=`
`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(e)}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(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(n,r=[]){let t=n,e=null;if(this.tokens.links){var i=Object.keys(this.tokens.links);if(0<i.length)for(;null!=(e=this.tokenizer.rules.inline.reflinkSearch.exec(t));)i.includes(e[0].slice(e[0].lastIndexOf("[")+1,-1))&&(t=t.slice(0,e.index)+"["+"a".repeat(e[0].length-2)+"]"+t.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(e=this.tokenizer.rules.inline.blockSkip.exec(t));)t=t.slice(0,e.index)+"["+"a".repeat(e[0].length-2)+"]"+t.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(e=this.tokenizer.rules.inline.anyPunctuation.exec(t));)t=t.slice(0,e.index)+"++"+t.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a=!1,s="";for(;n;){a||(s=""),a=!1;let e;if(!this.options.extensions?.inline?.some(t=>!!(e=t.call({lexer:this},n,r))&&(n=n.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.escape(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.link(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(e.raw.length);var o=r.at(-1);"text"===e.type&&"text"===o?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e)}else if(e=this.tokenizer.emStrong(n,t,s))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.codespan(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(n))n=n.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.autolink(n))n=n.substring(e.raw.length),r.push(e);else if(!this.state.inLink&&(e=this.tokenizer.url(n)))n=n.substring(e.raw.length),r.push(e);else{let t=n;if(this.options.extensions?.startInline){let e=1/0,r=n.slice(1),i;this.options.extensions.startInline.forEach(t=>{"number"==typeof(i=t.call({lexer:this},r))&&0<=i&&(e=Math.min(e,i))}),e<1/0&&0<=e&&(t=n.substring(0,e+1))}if(e=this.tokenizer.inlineText(t))n=n.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(s=e.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e);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}},x9=class{static{me(this,"_Renderer")}options;parser;constructor(t){this.options=t||qA}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(WA.notSpaceStart)?.[0],t=t.replace(WA.endingNewline,"")+`
`,e?'<pre><code class="language-'+OA(e)+'">'+(r?t:OA(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:OA(t,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(e){let t=e.ordered,r=e.start,i="";for(let t=0;t<e.items.length;t++){var n=e.items[t];i+=this.listitem(n)}var a=t?"ol":"ul";return"<"+a+(t&&1!==r?' start="'+r+'"':"")+`>
`+i+"</"+a+`>
`}listitem(t){let e="",r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+OA(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "),`<li>${e+=this.parser.parse(t.tokens,!!t.loose)}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let i="";for(let t=0;t<e.rows.length;t++){var n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.tablecell(n[t]);i+=this.tablerow({text:r})}return`<table>
<thead>
`+t+`</thead>
`+(i=i&&`<tbody>${i}</tbody>`)+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${OA(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),i=PA(t);if(null===i)return r;let n='<a href="'+(t=i)+'"';return e&&(n+=' title="'+OA(e)+'"'),n+=">"+r+"</a>"}image({href:t,title:e,text:r}){var i=PA(t);if(null===i)return OA(r);let n=`<img src="${t=i}" alt="${r}"`;return e&&(n+=` title="${OA(e)}"`),n+=">"}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:OA(t.text)}},b9=class{static{me(this,"_TextRenderer")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},w9=class i{static{me(this,"_Parser")}options;renderer;textRenderer;constructor(t){this.options=t||qA,this.options.renderer=this.options.renderer||new x9,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new b9}static parse(t,e){return new i(e).parse(t)}static parseInline(t,e){return new i(e).parseInline(t)}parse(i,n=!0){let a="";for(let r=0;r<i.length;r++){var t=i[r];if(this.options.extensions?.renderers?.[t.type]){var e=t,s=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){a+=s||"";continue}}var o=t;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"paragraph":a+=this.renderer.paragraph(o);continue;case"text":{let t=o,e=this.renderer.text(t);for(;r+1<i.length&&"text"===i[r+1].type;)t=i[++r],e+=`
`+this.renderer.text(t);a+=n?this.renderer.paragraph({type:"paragraph",raw:e,text:e,tokens:[{type:"text",raw:e,text:e,escaped:!0}]}):e;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(e,r=this.renderer){let i="";for(let t=0;t<e.length;t++){var n=e[t];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}},k9=class{static{me(this,"_Hooks")}options;block;constructor(t){this.options=t||qA}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?v9.lex:v9.lexInline}provideParser(){return this.block?w9.parse:w9.parseInline}},T9=class{static{me(this,"Marked")}defaults=RA();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=w9;Renderer=x9;TextRenderer=b9;Lexer=v9;Tokenizer=y9;Hooks=k9;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(var n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":var e,a,s=n;for(e of s.header)i=i.concat(this.walkTokens(e.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 e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(t=>{t=e[t].flat(1/0),i=i.concat(this.walkTokens(t,r))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,r)))}}return i}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(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(...t){var e=i.renderer.apply(this,t);return!1===e?r.apply(this,t):e}: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 t=n[i.level];t?t.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)}),t.extensions=n),e.renderer){let n=this.defaults.renderer||new x9(this.defaults);for(var a in e.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],i=n[t];n[t]=(...t)=>{var e=r.apply(n,t);return(!1===e?i.apply(n,t):e)||""}}}t.renderer=n}if(e.tokenizer){let n=this.defaults.tokenizer||new y9(this.defaults);for(var s in e.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,r=e.tokenizer[t],i=n[t];n[t]=(...t)=>{var e=r.apply(n,t);return!1===e?i.apply(n,t):e}}}t.tokenizer=n}if(e.hooks){let n=this.defaults.hooks||new k9;for(var o in e.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let t=o,r=e.hooks[t],i=n[t];k9.passThroughHooks.has(o)?n[t]=t=>this.defaults.async?Promise.resolve(r.call(n,t)).then(t=>i.call(n,t)):(t=r.call(n,t),i.call(n,t)):n[t]=(...t)=>{var e=r.apply(n,t);return!1===e?i.apply(n,t):e}}}t.hooks=n}if(e.walkTokens){let r=this.defaults.walkTokens,i=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(i.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return v9.lex(t,e??this.defaults)}parser(t,e){return w9.parse(t,e??this.defaults)}parseMarkdown(o){return me((r,t)=>{let e={...t},i={...this.defaults,...e},n=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===e.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?v9.lex:v9.lexInline,s=i.hooks?i.hooks.provideParser():o?w9.parse:w9.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(t=>a(t,i)).then(t=>i.hooks?i.hooks.processAllTokens(t):t).then(t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then(()=>t):t).then(t=>s(t,i)).then(t=>i.hooks?i.hooks.postprocess(t):t).catch(n);try{i.hooks&&(r=i.hooks.preprocess(r));let t=a(r,i),e=(i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens),s(t,i));return i.hooks?i.hooks.postprocess(e):e}catch(t){return n(t)}},"parse")}onError(r,i){return t=>{var e;if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,r)return e="<p>An error occurred:</p><pre>"+OA(t.message+"",!0)+"</pre>",i?Promise.resolve(e):e;if(i)return Promise.reject(t);throw t}}},E9=new T9,me(UA,"marked"),UA.options=UA.setOptions=function(t){return E9.setOptions(t),MA(UA.defaults=E9.defaults),UA},UA.getDefaults=RA,UA.defaults=qA,UA.use=function(...t){return E9.use(...t),MA(UA.defaults=E9.defaults),UA},UA.walkTokens=function(t,e){return E9.walkTokens(t,e)},UA.parseInline=E9.parseInline,UA.Parser=w9,UA.parser=w9.parse,UA.Renderer=x9,UA.TextRenderer=b9,UA.Lexer=v9,UA.lexer=v9.lex,UA.Tokenizer=y9,UA.Hooks=k9,UA.parse=UA,v9.lex});function _9(t,{markdownAutoWrap:e}){return t=jt(t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`)),!1===e?t.replace(/ /g,"&nbsp;"):t}function S9(t,e={}){let r=_9(t,e),i=UA.lexer(r),n=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(`
`).forEach((t,e)=>{0!==e&&(a++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&n[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&n[a].push({content:e.text,type:"normal"})}return me(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&n[a].push({content:t.text,type:"normal"})}),n}function A9(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:"Unsupported markdown: "+t.type}return t=UA.lexer(t),me(r,"output"),t.map(r).join("")}var L9=t(()=>{C9(),Fr(),me(_9,"preprocessMarkdown"),me(S9,"markdownToLines"),me(A9,"markdownToHTML")});function N9(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function I9(t,e){return R9(t,[],N9(e.content),e.type)}function R9(t,e,r,i){var n,a,s;return 0===r.length?[{content:e.join(""),type:i},{content:"",type:i}]:([n,...a]=r,t([{content:(s=[...e,n]).join(""),type:i}])?R9(t,s,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}]))}function M9(t,e){if(t.some(({content:t})=>t.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return D9(t,e)}function D9(t,e,r=[],i=[]){if(0===t.length)return 0<i.length&&r.push(i),0<r.length?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());var a=t.shift()??{content:" ",type:"normal"},s=[...i];return""!==n&&s.push({content:n,type:"normal"}),s.push(a),e(s)?D9(t,e,r,s):(0<i.length?(r.push(i),t.unshift(a)):a.content&&([s,i]=I9(e,a),r.push([s]),i.content)&&t.unshift(i),D9(t,e,r))}var O9=t(()=>{me(N9,"splitTextToChars"),me(I9,"splitWordToFitWidth"),me(R9,"splitWordToFitWidthRecursion"),me(M9,"splitLineToFitWidth"),me(D9,"splitLineToFitWidthRecursion")});function P9(t,e){e&&t.attr("style",e)}async function B9(t,e,r,i,n=!1){(t=t.append("foreignObject")).attr("width",10*r+"px"),t.attr("height",10*r+"px");let a=t.append("xhtml:div"),s=e.label;e.label&&Uc(e.label)&&(s=await jc(e.label.replace(L.lineBreakRegex,`
`),D()));var o=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),P9(l,e.labelStyle),l.attr("class",o+" "+i),P9(a,e.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",r+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&a.attr("class","labelBkg"),(l=a.node().getBoundingClientRect()).width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),l=a.node().getBoundingClientRect()),t.node()}function F9(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function $9(t,e,r){return U9(e=F9(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function z9(t,e,r){return U9(e=F9(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function G9(e,t,r,i=!1){let n=t.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=me(t=>$9(n,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:M9(l,h))U9(F9(s,o,1.1),c),o++}return(i?(t=s.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),n):s).node()}function U9(i,t){i.text(""),t.forEach((t,e)=>{var r=i.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}function q9(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`)}var j9,W9=t(()=>{fu(),Jc(),Z3(),e(),L9(),KE(),O9(),me(P9,"applyStyle"),me(B9,"addHtmlSpan"),me(F9,"createTspan"),me($9,"computeWidthOfText"),me(z9,"computeDimensionOfText"),me(G9,"createFormattedText"),me(U9,"updateTextContentAndStyles"),me(q9,"replaceIconSubstring"),j9=me(async(t,e="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",e,r,i,n,a,s,"addSvgBackground: ",l),a?(i=A9(e,c),a=q9(VE(i)),i=e.replace(/\\\\/g,"\\"),B9(t,{isNode:s,label:Uc(e)?i:a,labelStyle:r.replace("fill:","color:")},o,n,l)):(i=G9(o,t,S9(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!e&&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:"),j(i).attr("style",a)):(n=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),j(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:"),j(i).select("text").attr("style",o)),i)),"createText")});function Y9(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function H9(e,t,r,i,n,a){var s=[],o=r-e,l=2*Math.PI/(o/a),c=t+(i-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*o,u=c+n*Math.sin(l*(h-e));s.push({x:h,y:u})}return s}function V9(e,r,i,n,t,a){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;t<n;t++){var c=o+t*l,h=e+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}var X9,K9,Z9,Q9,n=t(()=>{W9(),fu(),Z3(),_i(),Jc(),KE(),X9=me(async(t,e,r)=>{let i,n=e.useHtmlLabels||Mc(D()?.htmlLabels),a=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id)),s=a.insert("g").attr("class","label").attr("style",bE(e.labelStyle)),o,l=(o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],await j9(s,_c(VE(o),D()),{useHtmlLabels:n,width:e.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})),c=l.getBBox(),h=(e?.padding??0)/2;if(n){var r=l.children[0],t=j(l),u=r.getElementsByTagName("img");if(u){let i=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",i?(t=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,[t=mr.fontSize]=WE(t),r.style.minWidth=t=5*t+"px",r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=r.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.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"),K9=me(async(t,e,r)=>{let i=r.useHtmlLabels||Mc(D()?.flowchart?.htmlLabels),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await j9(n,_c(VE(e),D()),{useHtmlLabels:i,width:r.width||D()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Mc(D()?.flowchart?.htmlLabels)&&(e=a.children[0],l=j(a),s=e.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:t,bbox:s,halfPadding:o,label:n}},"insertLabel"),Z9=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),Q9=me((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),me(Y9,"createPathFromPoints"),me(H9,"generateFullSineWavePoints"),me(V9,"generateCirclePoints")});function J9(t,e){return t.intersect(e)}var tL,eL=t(()=>{me(J9,"intersectNode"),tL=J9});function rL(t,e,r,i){var n=t.x,t=t.y,a=n-i.x,s=t-i.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(i.x<n&&(a=-a),Math.abs(e*r*s/o));return{x:n+a,y:t+(e=i.y<t?-e:e)}}var iL,nL=t(()=>{me(rL,"intersectEllipse"),iL=rL});function aL(t,e,r){return iL(t,e,e,r)}var sL,oL=t(()=>{nL(),me(aL,"intersectCircle"),sL=aL});function lL(t,e,r,i){var n,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.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)*t.x+(a=r.x-i.x)*t.y+(s=i.x*r.y-r.x*i.y),d=n*e.x+a*e.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-n*c)))return t=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-t)/o:(r+t)/o,y:(r=n*h-l*s)<0?(r-t)/o:(r+t)/o}}function cL(t,e){return 0<t*e}var hL,uL=t(()=>{me(lL,"intersectLine"),me(cL,"sameSign"),hL=lL});function dL(e,r,i){let t=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=n-e.height/2-o;for(let t=0;t<r.length;t++){var h=r[t],u=r[t<r.length-1?t+1:0];(h=hL(e,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(t,e){var r=t.x-i.x,t=t.y-i.y,r=Math.sqrt(r*r+t*t),t=e.x-i.x,e=e.y-i.y;return r<(t=Math.sqrt(t*t+e*e))?-1:r===t?0:1}),a[0]):e}var pL,gL,fL,mL,yL,vL,xL,bL,wL,kL,TL=t(()=>{uL(),me(dL,"intersectPolygon"),pL=dL}),EL=t(()=>{gL=me((t,e)=>{var r,i=t.x,n=t.y,a=e.x-i,e=e.y-n,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:i+r,y:n+t}},"intersectRect"),fL=gL}),CL=t(()=>{eL(),oL(),nL(),TL(),EL(),mL={node:tL,circle:sL,ellipse:iL,polygon:pL,rect:fL}}),_L=t(()=>{fu(),yL=me(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),vL=me(t=>({stylesMap:t=xL([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),xL=me(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),bL=me(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),wL=me(t=>{let e=vL(t).stylesArray,r=[],i=[],n=[],a=[];return e.forEach(t=>{var e=t[0];bL(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),kL=me((t,e)=>{var{themeVariables:r,handDrawnSeed:i}=D(),{nodeBorder:r,mainBkg:n}=r,t=vL(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:i,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides")});function SL(t,e,r){if(t&&t.length){var i,[n,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(i of t){var[l,c]=i;i[0]=(l-n)*s-(c-a)*o+n,i[1]=(l-n)*o+(c-a)*s+a}}}function AL(t,e){return t[0]===e[0]&&t[1]===e[1]}function LL(t,r,i,e=1){var n=i,i=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(n)for(var s of p)SL(s,a,n);if(r=((e,n)=>{var t,r=[];for(t of p){var i=[...t];AL(i[0],i[i.length-1])||i.push([i[0][0],i[0][1]]),2<i.length&&r.push(i)}var a,s=[],o=(e=Math.max(e,.1),[]);for(a of r)for(let t=0;t<a.length-1;t++){var l,c=a[t],h=a[t+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((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],i=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>i);t++)e=t;o.splice(0,e+1).forEach(t=>{r.push({s:i,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=i))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==n||t%e==0)&&1<r.length)for(let t=0;t<r.length&&!((d=t+1)>=r.length);t+=2){var u=r[t].edge,d=r[d].edge;s.push([[Math.round(u.x),i],[Math.round(d.x),i]])}i+=n,r.forEach(t=>{t.edge.x=t.edge.x+n*t.edge.islope}),t++}}return s})(i,e),n){for(var o of p)SL(o,a,-n);{t=a,i=-n;let e=[];r.forEach(t=>e.push(...t)),SL(e,t,i)}}return r}function NL(t,e){let r,i=e.hachureAngle+90,n=e.hachureGap,a=(n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=n),LL(t,n,i,a||1)}function IL(t){var e=t[0],t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function RL(t,e){return t.type===e}function ML(t){let i=[],n=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:kN,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:TN,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:EN,text:""},e})(t),a="BOD",s=0,o=n[s];for(;!RL(o,EN);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return ML("M0,0"+t);s++,e=CN[o.text],a=o.text}else RL(o,TN)?e=CN[a]:(s++,e=CN[o.text],a=o.text);if(!(s+e<n.length))throw new Error("Path data ended short");for(let t=s;t<s+e;t++){var l=n[t];if(!RL(l,TN))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof CN[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};i.push(c),s+=e,o=n[s],"m"===(a="M"===a?"L":a)&&(a="l")}return i}function DL(t){let r=0,i=0,e=0,n=0,a=[];for(var{key:s,data:o}of t)switch(s){case"M":a.push({key:"M",data:[...o]}),[r,i]=o,[e,n]=o;break;case"m":r+=o[0],i+=o[1],a.push({key:"M",data:[r,i]}),e=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((t,e)=>e%2?t+i:t+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((t,e)=>e%2?t+i:t+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((t,e)=>e%2?t+i:t+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=e,i=n}return a}function OL(t){let n=[],a="",s=0,o=0,e=0,r=0,l=0,c=0;for(var{key:i,data:h}of t){switch(i){case"M":n.push({key:"M",data:[...h]}),[s,o]=h,[e,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 t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),n.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=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=t+2*(r-t)/3,g=e+2*(i-e)/3;n.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=i,s=t,o=e;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],x=h[4],b=h[5],w=h[6];0===f||0===m?(n.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(BL(s,o,b,w,f,m,y,v,x).forEach(function(t){n.push({key:"C",data:t})}),s=b,o=w);break;case"Z":n.push({key:"Z",data:[]}),s=e,o=r}a=i}return n}function PL(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function BL(t,e,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:([t,e]=PL(t,e,-h),[r,i]=PL(r,i,-h),1<(m=(y=(t-r)/2)*y/(n*n)+(v=(e-i)/2)*v/(a*a))&&(n*=m=Math.sqrt(m),a*=m),m=n*n,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*n*v/a+(t+r)/2,f=o*-a*y/n+(e+i)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((i-f)/a).toFixed(9))),t<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&&(x=p,v=r,o=i,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=BL(r=g+n*Math.cos(p),i=f+a*Math.sin(p),v,o,n,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*n*(l=Math.tan(m/4)),n=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,i-m*o],t=[r,i];if(a[0]=2*n[0]-a[0],a[1]=2*n[1]-a[1],c)return[a,l,t].concat(u);u=[a,l,t].concat(u);var b=[];for(let t=0;t<u.length;t+=3){var w=PL(u[t][0],u[t][1],h),k=PL(u[t+1][0],u[t+1][1],h),T=PL(u[t+2][0],u[t+2][1],h);b.push([w[0],w[1],k[0],k[1],T[0],T[1]])}return b}function FL(t,e,r,i,n){return{type:"path",ops:QL(t,e,r,i,n)}}function $L(e,t,r){var i=(e||[]).length;if(2<i){var n=[];for(let t=0;t<i-1;t++)n.push(...QL(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&n.push(...QL(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return 2===i?FL(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function zL(t,e,r,i,n){return $L([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,n)}function GL(t,e){if(t.length){var r="number"==typeof t[0][0]?[t]:t,i=tN(r[0],1+.2*e.roughness,e),n=e.disableMultiStroke?[]:tN(r[0],1.5*(1+.22*e.roughness),VL(e));for(let t=1;t<r.length;t++)if((l=r[t]).length){var a,s,o=tN(l,1+.2*e.roughness,e),l=e.disableMultiStroke?[]:tN(l,1.5*(1+.22*e.roughness),VL(e));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 UL(t,e,r){var i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),i=2*Math.PI/i,t=Math.abs(t/2),e=Math.abs(e/2),n=1-r.curveFitting;return{increment:i,rx:t+=ZL(t*n,r),ry:e+=ZL(e*n,r)}}function qL(t,e,r,i){let[n,a]=rN(i.increment,t,e,i.rx,i.ry,1,i.increment*KL(.1,KL(.4,1,r),r),r),s=eN(n,null,r);return r.disableMultiStroke||0===r.roughness||([t]=rN(i.increment,t,e,i.rx,i.ry,1.5,0,r),e=eN(t,null,r),s=s.concat(e)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function jL(t,e,r,i,n,a,s,o,l){r=Math.abs(r/2),i=Math.abs(i/2),r+=ZL(.01*r,l),i+=ZL(.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=iN(a=Math.min(n/2,(h-c)/2),t,e,r,i,c,h,1,l),l.disableMultiStroke||(a=iN(a,t,e,r,i,c,h,1.5,l),n.push(...a)),s&&(o?n.push(...QL(t,e,t+r*Math.cos(c),e+i*Math.sin(c),l),...QL(t,e,t+r*Math.cos(h),e+i*Math.sin(h),l)):n.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+i*Math.sin(c)]})),{type:"path",ops:n}}function WL(t,e){let r=OL(DL(ML(t))),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(...QL(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;i.push(...nN(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":i.push(...QL(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function YL(t,e){var r,i=[];for(r of t)if(r.length){var n=e.maxRandomnessOffset||0,a=r.length;if(2<a){i.push({op:"move",data:[r[0][0]+ZL(n,e),r[0][1]+ZL(n,e)]});for(let t=1;t<a;t++)i.push({op:"lineTo",data:[r[t][0]+ZL(n,e),r[t][1]+ZL(n,e)]})}}return{type:"fillPath",ops:i}}function HL(t,r){return(t=>{let e=r.fillStyle||"hachure";if(!bN[e])switch(e){case"zigzag":bN[e]||(bN[e]=new fN(t));break;case"cross-hatch":bN[e]||(bN[e]=new mN(t));break;case"dots":bN[e]||(bN[e]=new yN(t));break;case"dashed":bN[e]||(bN[e]=new vN(t));break;case"zigzag-line":bN[e]||(bN[e]=new xN(t));break;default:e="hachure",bN[e]||(bN[e]=new gN(t))}return bN[e]})(_N).fillPolygons(t,r)}function VL(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function XL(t){return t.randomizer||(t.randomizer=new wN(t.seed||0)),t.randomizer.next()}function KL(t,e,r,i=1){return r.roughness*i*(XL(r)*(e-t)+t)}function ZL(t,e,r=1){return KL(-t,t,e,r)}function QL(t,e,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=JL(t,e,r,i,n,!0,!1);return a?s:(a=JL(t,e,r,i,n,!0,!0),s.concat(a))}function JL(t,e,r,i,n,a,s){let o=Math.pow(t-r,2)+Math.pow(e-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*XL(n),p=n.bowing*n.maxRandomnessOffset*(i-e)/200,g=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=ZL(p,n,c),g=ZL(g,n,c);var f=[],m=me(()=>ZL(u,n,c),"M"),y=me(()=>ZL(h,n,c),"k"),v=n.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:ZL(h,n,c)),e+(v?0:ZL(h,n,c))]}),f.push(s?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(i-e)*d+m(),r+(v?0:m()),i+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(i-e)*d+y(),r+(v?0:y()),i+(v?0:y())]}),f}function tN(e,r,i){if(!e.length)return[];var n=[];n.push([e[0][0]+ZL(r,i),e[0][1]+ZL(r,i)]),n.push([e[0][0]+ZL(r,i),e[0][1]+ZL(r,i)]);for(let t=1;t<e.length;t++)n.push([e[t][0]+ZL(r,i),e[t][1]+ZL(r,i)]),t===e.length-1&&n.push([e[t][0]+ZL(r,i),e[t][1]+ZL(r,i)]);return eN(n,null,i)}function eN(e,t,r){var i=e.length,n=[];if(3<i){var a,s=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<i;t++){var l=e[t];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[t+1][0]-o*e[t-1][0])/6,l[1]+(o*e[t+1][1]-o*e[t-1][1])/6],s[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],s[3]=[e[t+1][0],e[t+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]]})}t&&2===t.length&&(a=r.maxRandomnessOffset,n.push({op:"lineTo",data:[t[0]+ZL(a,r),t[1]+ZL(a,r)]}))}else 3===i?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===i&&n.push(...JL(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function rN(e,r,i,n,a,s,t,o){var l=[],c=[];if(0===o.roughness){e/=4,c.push([r+n*Math.cos(-e),i+a*Math.sin(-e)]);for(let t=0;t<=2*Math.PI;t+=e){var h=[r+n*Math.cos(t),i+a*Math.sin(t)];l.push(h),c.push(h)}c.push([r+n*Math.cos(0),i+a*Math.sin(0)]),c.push([r+n*Math.cos(e),i+a*Math.sin(e)])}else{var u=ZL(.5,o)-Math.PI/2,d=(c.push([ZL(s,o)+r+.9*n*Math.cos(u-e),ZL(s,o)+i+.9*a*Math.sin(u-e)]),2*Math.PI+u-.01);for(let t=u;t<d;t+=e){var p=[ZL(s,o)+r+n*Math.cos(t),ZL(s,o)+i+a*Math.sin(t)];l.push(p),c.push(p)}c.push([ZL(s,o)+r+n*Math.cos(u+2*Math.PI+.5*t),ZL(s,o)+i+a*Math.sin(u+2*Math.PI+.5*t)]),c.push([ZL(s,o)+r+.98*n*Math.cos(u+t),ZL(s,o)+i+.98*a*Math.sin(u+t)]),c.push([ZL(s,o)+r+.9*n*Math.cos(u+.5*t),ZL(s,o)+i+.9*a*Math.sin(u+.5*t)])}return[c,l]}function iN(e,r,i,n,a,s,o,l,c){var s=s+ZL(.1,c),h=[];h.push([ZL(l,c)+r+.9*n*Math.cos(s-e),ZL(l,c)+i+.9*a*Math.sin(s-e)]);for(let t=s;t<=o;t+=e)h.push([ZL(l,c)+r+n*Math.cos(t),ZL(l,c)+i+a*Math.sin(t)]);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)]),eN(h,null,c)}function nN(e,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 t=0;t<d;t++)0===t?h.push({op:"move",data:[o[0],o[1]]}):h.push({op:"move",data:[o[0]+(p?0:ZL(u[0],l)),o[1]+(p?0:ZL(u[0],l))]}),c=p?[a,s]:[a+ZL(u[t],l),s+ZL(u[t],l)],h.push({op:"bcurveTo",data:[e+ZL(u[t],l),r+ZL(u[t],l),i+ZL(u[t],l),n+ZL(u[t],l),c[0],c[1]]});return h}function aN(t){return[...t]}function sN(e,t=0){var r=e.length;if(r<3)throw new Error("A curve must have at least three points.");var i=[];if(3===r)i.push(aN(e[0]),aN(e[1]),aN(e[2]),aN(e[2]));else{var n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);var a=[],s=1-t;i.push(aN(n[0]));for(let t=1;t+2<n.length;t++){var o=n[t];a[0]=[o[0],o[1]],a[1]=[o[0]+(s*n[t+1][0]-s*n[t-1][0])/6,o[1]+(s*n[t+1][1]-s*n[t-1][1])/6],a[2]=[n[t+1][0]+(s*n[t][0]-s*n[t+2][0])/6,n[t+1][1]+(s*n[t][1]-s*n[t+2][1])/6],a[3]=[n[t+1][0],n[t+1][1]],i.push(a[1],a[2],a[3])}}return i}function oN(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function lN(t,e,r){var i=oN(e,r);return 0===i?oN(t,e):(i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i,oN(t,cN(e,r,Math.max(0,Math.min(1,i)))))}function cN(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function hN(l,c,t,e){var r,i,n,a,s,o,e=e||[];return(()=>{let t=l[c+0],e=l[c+1],r=l[c+2],i=l[c+3],n=3*e[0]-2*t[0]-i[0],a=(n*=n,3*e[1]-2*t[1]-i[1]);a*=a;var s=3*r[0]-2*i[0]-t[0],o=(s*=s,3*r[1]-2*i[1]-t[1]);return o*=o,n<s&&(n=s),a<o&&(a=o),n+a})()<t?(r=l[c+0],(!e.length||(o=e[e.length-1],1<Math.sqrt(oN(o,r))))&&e.push(r),e.push(l[c+3])):(i=cN(o=l[c+0],r=l[c+1],.5),s=cN(r,r=l[c+2],.5),n=cN(r,r=l[c+3],.5),a=cN(i,s,.5),s=cN(s,n,.5),hN([o,i,a,o=cN(a,s,.5)],0,t,e),hN([o,s,n,r],0,t,e)),e}function uN(t,e){return dN(t,0,t.length,e)}function dN(e,r,i,t,n){let a=n||[],s=e[r],o=e[i-1],l=0,c=1;for(let t=r+1;t<i-1;++t){var h=lN(e[t],s,o);h>l&&(l=h,c=t)}return Math.sqrt(l)>t?(dN(e,r,c+1,t,a),dN(e,c,i,t,a)):(a.length||a.push(s),a.push(o)),a}function pN(e,r=.15,t){var i=[],n=(e.length-1)/3;for(let t=0;t<n;t++)hN(e,3*t,r,i);return t&&0<t?dN(i,0,i.length,t):i}var gN,fN,mN,yN,vN,xN,bN,wN,kN,TN,EN,CN,_N,SN,AN,LN,NN,IN,RN,MN=t(()=>{me(SL,"t"),me(AL,"e"),me(LL,"s"),me(NL,"n"),gN=class{static{me(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=NL(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,i=[];for(r of t)i.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return i}},me(IL,"a"),fN=class extends gN{static{me(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var i,n,t=NL(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([i,n]of t)IL([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,e)}}},mN=class extends gN{static{me(this,"r")}fillPolygons(t,e){var r=this._fillPolygons(t,e),e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}},yN=class{static{me(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=NL(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],i=e.hachureGap,n=(i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1),e.fillWeight);n<0&&(n=e.strokeWidth/2);var a,s=i/4;for(a of t){var o=IL(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 t=0;t<c;t++){var p=d+h+t*i,g=u-s+2*Math.random()*s,p=p-s+2*Math.random()*s,g=this.helper.ellipse(g,p,n,n,e);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},vN=class{static{me(this,"c")}constructor(t){this.helper=t}fillPolygons(t,e){return t=NL(t,e),{type:"fillSketch",ops:this.dashedLine(t,e)}}dashedLine(t,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 t.forEach(t=>{let e=IL(t),r=Math.floor(e/(h+u)),i=(e+u-r*(h+u))/2,n=t[0],a=t[1];n[0]>a[0]&&(n=t[1],a=t[0]);var s=Math.atan((a[1]-n[1])/(a[0]-n[0]));for(let t=0;t<r;t++){var o=(l=t*(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}},xN=class{static{me(this,"l")}constructor(t){this.helper=t}fillPolygons(t,e){var r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,t=NL(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(t,i,e)}}zigzagLines(t,c,h){let u=[];return t.forEach(t=>{let e=IL(t),r=Math.round(e/(2*c)),i=t[0],n=t[1];i[0]>n[0]&&(i=t[1],n=t[0]);var a=Math.atan((n[1]-i[1])/(n[0]-i[0]));for(let t=0;t<r;t++){var s=2*t*c,o=2*(t+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}},bN={},wN=class{static{me(this,"p")}constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},CN={A:7,a:7,C:6,c:6,H:TN=1,h:1,L:EN=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:kN=0,z:0},me(RL,"k"),me(ML,"b"),me(DL,"y"),me(OL,"m"),me(PL,"w"),me(BL,"x"),_N={randOffset:me(function(t,e){return ZL(t,e)},"randOffset"),randOffsetWithRange:me(function(t,e,r){return KL(t,e,r)},"randOffsetWithRange"),ellipse:me(function(t,e,r,i,n){return qL(t,e,n,UL(r,i,n)).opset},"ellipse"),doubleLineOps:me(function(t,e,r,i,n){return QL(t,e,r,i,n,!0)},"doubleLineOps")},me(FL,"v"),me($L,"S"),me(zL,"O"),me(GL,"L"),me(UL,"T"),me(qL,"D"),me(jL,"A"),me(WL,"_"),me(YL,"I"),me(HL,"C"),me(VL,"z"),me(XL,"W"),me(KL,"E"),me(ZL,"G"),me(QL,"$"),me(JL,"R"),me(tN,"j"),me(eN,"q"),me(rN,"F"),me(iN,"V"),me(nN,"Z"),me(aN,"Q"),me(sN,"H"),me(oN,"N"),me(lN,"B"),me(cN,"J"),me(hN,"K"),me(uN,"U"),me(dN,"X"),me(pN,"Y"),SN="none",AN=class{static{me(this,"et")}constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){return n=this._o(n),this._d("line",[FL(t,e,r,i,n)],n)}rectangle(t,e,r,i,n){var a=[],s=zL(t,e,r,i,n=this._o(n));return n.fill&&(r=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]],"solid"===n.fillStyle?a.push(YL([r],n)):a.push(HL([r],n))),n.stroke!==SN&&a.push(s),this._d("rectangle",a,n)}ellipse(t,e,r,i,n){var a=[],i=qL(t,e,n=this._o(n),r=UL(r,i,n));return n.fill&&("solid"===n.fillStyle?((t=qL(t,e,n,r).opset).type="fillPath",a.push(t)):a.push(HL([i.estimatedPoints],n))),n.stroke!==SN&&a.push(i.opset),this._d("ellipse",a,n)}circle(t,e,r,i){return(t=this.ellipse(t,e,r,r,i)).shape="circle",t}linearPath(t,e){return e=this._o(e),this._d("linearPath",[$L(t,!1,e)],e)}arc(d,p,g,t,e,r,i=!1,n){var n=this._o(n),a=[],s=jL(d,p,g,t,e,r,i,!0,n);return i&&n.fill&&("solid"===n.fillStyle?(i=Object.assign({},n),(i=jL(d,p,g,t,e,r,i.disableMultiStroke=!0,!1,i)).type="fillPath",a.push(i)):a.push(((t,e,r,i)=>{var n=d,a=p,s=Math.abs(g/2),o=Math.abs(t/2);s+=ZL(.01*s,i),o+=ZL(.01*o,i);let l=e,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 t=l;t<=c;t+=h)u.push([n+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([n+s*Math.cos(c),a+o*Math.sin(c)]),u.push([n,a]),HL([u],i)})(t,e,r,n))),n.stroke!==SN&&a.push(s),this._d("arc",a,n)}curve(t,e){var r=this._o(e),e=[],i=GL(t,r);if(r.fill&&r.fill!==SN)if("solid"===r.fillStyle){var n=GL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{var a,s=[];if((n=t).length)for(a of"number"==typeof n[0][0]?[n]:n)a.length<3?s.push(...a):3===a.length?s.push(...pN(sN([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...pN(sN(a),10,(1+r.roughness)/2));s.length&&e.push(HL([s],r))}return r.stroke!==SN&&e.push(i),this._d("curve",e,r)}polygon(t,e){var r=[],i=$L(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(YL([t],e)):r.push(HL([t],e))),e.stroke!==SN&&r.push(i),this._d("polygon",r,e)}path(t,e){let r=this._o(e),i=[];var n,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==SN,n=r.stroke!==SN,s=((t,e)=>{let r=OL(DL(ML(t))),i=[],n=[],a=[0,0],s=[],o=me(()=>{4<=s.length&&n.push(...pN(s,1)),s=[]},"i"),l=me(()=>{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(),!e)return i;var d,p=[];for(d of i){var g=uN(d,e);g.length&&p.push(g)}return p})(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=WL(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=WL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),i.push({type:"fillPath",ops:this._mergedShape(e.ops)})):i.push(YL(s,r)):i.push(HL(s,r))),n)&&(a?s.forEach(t=>{i.push($L(t,!1,r))}):i.push(o)),this._d("path",i,r)}opsToPath(t,e){let r="";for(var i of t.ops){var n="number"==typeof e&&0<=e?i.data.map(t=>+t.toFixed(e)):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(t){var e,r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:SN};break;case"fillPath":t={d:this.opsToPath(e),stroke:SN,strokeWidth:0,fill:i.fill||SN};break;case"fillSketch":t=this.fillSketch(e,i)}t&&n.push(t)}return n}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||SN,strokeWidth:r,fill:SN}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},LN=class{static{me(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new AN(e)}draw(t){var e,r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.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,e,a),n.restore();break;case"fillPath":n.save(),n.fillStyle=i.fill||"";var s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,e,a,s),n.restore();break;case"fillSketch":this.fillSketch(n,e,i)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(var n of e.ops){var a="number"==typeof r&&0<=r?n.data.map(t=>+t.toFixed(r)):n.data;switch(n.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,n){return t=this.gen.line(t,e,r,i,n),this.draw(t),t}rectangle(t,e,r,i,n){return t=this.gen.rectangle(t,e,r,i,n),this.draw(t),t}ellipse(t,e,r,i,n){return t=this.gen.ellipse(t,e,r,i,n),this.draw(t),t}circle(t,e,r,i){return t=this.gen.circle(t,e,r,i),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,i,n,a,s=!1,o){return t=this.gen.arc(t,e,r,i,n,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},NN="http://www.w3.org/2000/svg",IN=class{static{me(this,"ot")}constructor(t,e){this.svg=t,this.gen=new AN(e)}draw(e){var r,t=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(NN,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=n.createElementNS(NN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke",i.stroke),t.setAttribute("stroke-width",i.strokeWidth+""),t.setAttribute("fill","none"),i.strokeLineDash&&t.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+i.strokeLineDashOffset);break;case"fillPath":(t=n.createElementNS(NN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",i.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(n,r,i)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),(t=t.createElementNS(NN,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",i+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){return t=this.gen.line(t,e,r,i,n),this.draw(t)}rectangle(t,e,r,i,n){return t=this.gen.rectangle(t,e,r,i,n),this.draw(t)}ellipse(t,e,r,i,n){return t=this.gen.ellipse(t,e,r,i,n),this.draw(t)}circle(t,e,r,i){return t=this.gen.circle(t,e,r,i),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,i,n,a,s=!1,o){return t=this.gen.arc(t,e,r,i,n,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},RN={canvas:me((t,e)=>new LN(t,e),"canvas"),svg:me((t,e)=>new IN(t,e),"svg"),generator:me(t=>new AN(t),"generator"),newSeed:me(()=>AN.newSeed(),"newSeed")}});function DN(t,e){var r=wL(e).labelStyles;e.labelStyle=r;let i=Q9(e),n=i,a=(i||(n="anchor"),t.insert("g").attr("class",n).attr("id",e.domId||e.id)),s=e.cssStyles,o=RN.svg(a),l=kL(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",bE(s)),Z9(e,h),e.intersect=function(t){return M.info("Circle intersect",e,1,t),mL.circle(e,1,t)},a}var ON=t(()=>{e(),n(),CL(),_L(),MN(),KE(),me(DN,"anchor")});function PN(t,e,r,i,n,a,s){var o=(t+r)/2,l=(e+i)/2,c=Math.atan2(i-e,r-t),h=Math.sqrt(((r-t)/2/n)**2+((i-e)/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((e-p)/a,(t-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 t=0;t<20;t++){var y=g+t/19*f,v=d+n*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function BN(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,c=l/(2.5+o/50),h=e.cssStyles,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...PN(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...PN(s/2,o/2,s/2,-o/2,c,l,!0)],d=RN.svg(n),p=kL(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),Y9(u)),f=d.path(g,p),m=n.insert(()=>f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${c/2}, 0)`),Z9(e,m),e.intersect=function(t){return mL.polygon(e,u,t)},n}var FN=t(()=>{n(),CL(),_L(),MN(),me(PN,"generateArcPoints"),me(BN,"bowTieRect")});function $N(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var zN=t(()=>{me($N,"insertPolygonShape")});async function GN(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(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 t=RN.svg(a),e=kL(n,{}),r=Y9(h),i=t.path(r,e);u=a.insert(()=>i,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=$N(a,o,s,h);return r&&u.attr("style",r),Z9(n,u),n.intersect=function(t){return mL.polygon(n,h,t)},a}var UN=t(()=>{n(),CL(),_L(),MN(),zN(),n(),me(GN,"card")});function qN(t,e){var r=wL(e).nodeStyles;e.label="";let i=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),n=e.cssStyles,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=RN.svg(i),l=kL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),Y9(s)),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return mL.polygon(e,s,t)},i}var jN=t(()=>{CL(),MN(),_L(),n(),me(qN,"choice")});async function WN(t,i){var{labelStyles:e,nodeStyles:r}=wL(i);i.labelStyle=e;let{shapeSvg:n,bbox:a,halfPadding:s}=await X9(t,i,Q9(i)),o=a.width/2+s,l,c=i.cssStyles;if("handDrawn"===i.look){let t=RN.svg(n),e=kL(i,{}),r=t.circle(0,0,2*o,e);(l=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",bE(c))}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return Z9(i,l),i.intersect=function(t){return M.info("Circle intersect",i,o,t),mL.circle(i,o,t)},n}var YN=t(()=>{e(),n(),CL(),_L(),MN(),KE(),me(WN,"circle")});function HN(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r}
M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function VN(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r,e.label="";let n=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),s=e.cssStyles,o=RN.svg(n),l=kL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=HN(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",i),Z9(e,d),e.intersect=function(t){return M.info("crossedCircle intersect",e,{radius:a,point:t}),mL.circle(e,a,t)},n}var XN=t(()=>{e(),n(),_L(),MN(),CL(),me(HN,"createLine"),me(VN,"crossedCircle")});function KN(e,r,i,n=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;t<n;t++){var c=o+t*l,h=e+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}async function ZN(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...KN(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...KN(o/2+2*c,-c,c,20,-180,-270),...KN(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...KN(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...KN(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...KN(o/2+.1*o,-c,c,20,-180,-270),...KN(o/2+.1*o,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...KN(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],p=RN.svg(n),g=kL(e,{fill:"none"}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),Y9(u).replace("Z","")),m=p.path(f,g),y=Y9(d),v=p.path(y,{...g}),x=n.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Z9(e,x),e.intersect=function(t){return mL.polygon(e,d,t)},n}var QN=t(()=>{n(),CL(),_L(),MN(),me(KN,"generateCirclePoints"),me(ZN,"curlyBraceLeft")});function JN(e,r,i,n=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;t<n;t++){var c=o+t*l,h=e+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:h,y:c})}return s}async function tI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...JN(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...JN(o/2+2*c,-c,c,20,-180,-270),...JN(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...JN(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...JN(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...JN(o/2+2*c,-c,c,20,-180,-270),...JN(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...JN(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],p=RN.svg(n),g=kL(e,{fill:"none"}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),Y9(u).replace("Z","")),m=p.path(f,g),y=Y9(d),v=p.path(y,{...g}),x=n.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Z9(e,x),e.intersect=function(t){return mL.polygon(e,d,t)},n}var eI=t(()=>{n(),CL(),_L(),MN(),me(JN,"generateCirclePoints"),me(tI,"curlyBraceRight")});function rI(e,r,i,n=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let t=0;t<n;t++){var c=o+t*l,h=e+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}async function iI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...rI(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...rI(o/2+2*c,-c,c,20,-180,-270),...rI(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...rI(o/2,l/2,c,20,0,90)],d=[...rI(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...rI(-o/2-c/2,-c,c,20,0,90),...rI(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...rI(-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},...rI(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...rI(o/2+2*c,-c,c,20,-180,-270),...rI(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...rI(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},...rI(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...rI(-o/2-c/2,-c,c,20,0,90),...rI(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...rI(-o/2+c+c/2,l/2,c,30,-180,-270)],g=RN.svg(n),f=kL(e,{fill:"none"}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),Y9(u).replace("Z","")),y=g.path(m,f),v=Y9(d).replace("Z",""),x=g.path(v,f),b=Y9(p),w=g.path(b,{...f}),k=n.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Z9(e,k),e.intersect=function(t){return mL.polygon(e,p,t)},n}var nI=t(()=>{n(),CL(),_L(),MN(),me(rI,"generateCirclePoints"),me(iI,"curlyBraces")});async function aI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await X9(t,e,Q9(e))),n=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,s=e.cssStyles,o=RN.svg(r),l=kL(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=n,h=t,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},...V9(-u,-h/2,a,50,270,90)],g=Y9(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-n/2}, ${-t/2})`),Z9(e,m),e.intersect=function(t){return mL.polygon(e,p,t)},r}var sI=t(()=>{n(),CL(),_L(),MN(),me(aI,"curvedTrapezoid")});async function oI(t,a){var{labelStyles:e,nodeStyles:r}=wL(a);a.labelStyle=e;let{shapeSvg:s,bbox:i,label:n}=await X9(t,a,Q9(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 t=RN.svg(s),e=cI(0,0,o,h,l,c),r=hI(0,c,o,h,l,c),i=t.path(e,kL(a,{})),n=t.path(r,kL(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 e=lI(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",bE(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Z9(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(e){var r=mL.rect(a,e),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 t=c*c*(1-i*i/(l*l));0<t&&(t=Math.sqrt(t)),t=c-t,0<e.y-(a.y??0)&&(t=-t),r.y+=t}return r},s}var lI,cI,hI,uI=t(()=>{n(),CL(),_L(),MN(),KE(),lI=me((t,e,r,i,n,a)=>[`M${t},`+(e+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),cI=me((t,e,r,i,n,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),hI=me((t,e,r,i,n,a)=>[`M${t-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(oI,"cylinder")});async function dI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=t.width+e.padding,s=.2*(o=t.height+e.padding),a=-a/2,o=-o/2-s/2,l=e.cssStyles,c=RN.svg(r),h=kL(e,{});"handDrawn"!==e.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(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),n.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${o+s+(e.padding??0)/2-(t.y-(t.top??0))})`),Z9(e,p),e.intersect=function(t){return mL.rect(e,t)},r}var pI=t(()=>{n(),CL(),_L(),MN(),me(dI,"dividedRectangle")});async function gI(t,e){var r,{labelStyles:i,nodeStyles:n}=wL(e);e.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:o}=await X9(t,e,Q9(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(i=RN.svg(a),t=kL(e,{roughness:.2,strokeWidth:2.5}),r=kL(e,{roughness:.2,strokeWidth:1.5}),t=i.circle(0,0,2*l,t),i=i.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",bE(e.cssClasses)).attr("style",bE(u)),h.node()?.appendChild(t),h.node()?.appendChild(i)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=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),t.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)),Z9(e,h),e.intersect=function(t){return M.info("DoubleCircle intersect",e,l,t),mL.circle(e,l,t)},a}var fI=t(()=>{e(),n(),CL(),_L(),MN(),KE(),me(gI,"doublecircle")});function mI(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=wL(e);e.label="",e.labelStyle=i;let a=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),s=e.cssStyles,o=RN.svg(a),l=r.nodeBorder,c=kL(e,{fillStyle:"solid"}),h=("handDrawn"!==e.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"!==e.look&&u.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),Z9(e,u),e.intersect=function(t){return M.info("filledCircle intersect",e,{radius:7,point:t}),mL.circle(e,7,t)},a}var yI=t(()=>{MN(),e(),CL(),_L(),n(),me(mI,"filledCircle")});async function vI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=a.width+(e.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=e.cssStyles,d=RN.svg(n),p=kL(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),Y9(h)),f=d.path(g,p),m=n.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=o,e.height=l,Z9(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return M.info("Triangle intersect",e,h,t),mL.polygon(e,h,t)},n}var xI=t(()=>{e(),n(),CL(),_L(),MN(),n(),me(vI,"flippedTriangle")});function bI(t,e,{dir:r,config:{state:i,themeVariables:n}}){var a=wL(e).nodeStyles;e.label="";let s=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),o=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=RN.svg(s),n=kL(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(n.roughness=0,n.fillStyle="solid");let u=h.rectangle(t,r,l,c,n),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Z9(e,d),h=i?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return mL.rect(e,t)},s}var wI=t(()=>{MN(),CL(),_L(),n(),me(bI,"forkJoin")});async function kI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,c=e.cssStyles,h=RN.svg(n),u=kL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...V9(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=Y9(d),g=h.path(p,u),f=n.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),Z9(e,f),e.intersect=function(t){return M.info("Pill intersect",e,{radius:l,point:t}),mL.polygon(e,d,t)},n}var TI=t(()=>{e(),n(),CL(),_L(),MN(),me(kI,"halfRoundedRectangle")});async function EI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.height+n.padding,o=s/4,l=i.width+2*o+n.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=CI(0,0,l,s,o),i=t.path(r,e);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=$N(a,l,s,c);return r&&h.attr("style",r),n.width=l,n.height=s,Z9(n,h),n.intersect=function(t){return mL.polygon(n,c,t)},a}var CI,_I=t(()=>{n(),CL(),_L(),MN(),zN(),CI=me((t,e,r,i,n)=>[`M${t+n},`+e,`L${t+r-n},`+e,`L${t+r},`+(e-i/2),`L${t+r-n},`+(e-i),`L${t+n},`+(e-i),`L${t},`+(e-i/2),"Z"].join(" "),"createHexagonPathD"),me(EI,"hexagon")});async function SI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),r=(e.label="",e.labelStyle=r,(await X9(t,e,Q9(e))).shapeSvg),t=Math.max(30,e?.width??0),n=Math.max(30,e?.height??0),a=e.cssStyles,s=RN.svg(r),o=kL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:n},{x:t,y:n}],c=Y9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-t/2}, ${-n/2})`),Z9(e,u),e.intersect=function(t){return M.info("Pill intersect",e,{points:l}),mL.polygon(e,l,t)},r}var AI=t(()=>{e(),n(),CL(),_L(),MN(),me(SI,"hourglass")});async function LI(t,n,{config:{themeVariables:e,flowchart:r}}){var i,a=wL(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 X9(t,n,"icon-shape default"),c="t"===n.pos,h=a,u=a,d=e.nodeBorder,p=vL(n).stylesMap,g=-u/2,f=-h/2,m=n.label?8:0,y=RN.svg(s),v=kL(n,{stroke:"none",fill:"none"}),x=("handDrawn"!==n.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),E=s.insert(()=>k);return n.icon&&((r=s.append("g")).html(`<g>${await Bt(n.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),e=(t=r.node().getBBox()).width,a=t.height,i=t.y,r.attr("transform",`translate(${-e/2-t.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})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),Z9(n,E),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=c?[{x:i-o.width/2,y:e-r/2},{x:i+o.width/2,y:e-r/2},{x:i+o.width/2,y:e-r/2+o.height+m},{x:i+u/2,y:e-r/2+o.height+m},{x:i+u/2,y:e+r/2},{x:i-u/2,y:e+r/2},{x:i-u/2,y:e-r/2+o.height+m},{x:i-o.width/2,y:e-r/2+o.height+m}]:[{x:i-u/2,y:e-r/2},{x:i+u/2,y:e-r/2},{x:i+u/2,y:e-r/2+h},{x:i+o.width/2,y:e-r/2+h},{x:i+o.width/2/2,y:e+r/2},{x:i-o.width/2,y:e+r/2},{x:i-o.width/2,y:e-r/2+h},{x:i-u/2,y:e-r/2+h}],mL.polygon(n,i,t)):mL.rect(n,t)},s}var NI=t(()=>{MN(),e(),qt(),CL(),_L(),n(),me(LI,"icon")});async function II(t,e,{config:{themeVariables:r,flowchart:i}}){var n=wL(e).labelStyles,n=(e.labelStyle=n,e.assetHeight??48),n=Math.max(n,e.assetWidth??48),i=i?.wrappingWidth,{shapeSvg:i,bbox:t,label:a}=(e.width=Math.max(n,i??0),await X9(t,e,"icon-shape default")),s=e.label?8:0,o="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=vL(e).stylesMap,h=RN.svg(i),u=kL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,i.append("g"));e.icon&&d.html(`<g>${await Bt(e.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,x=h.circle(0,0,v,u),b=Math.max(v,t.width),w=v+t.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=i.insert(()=>x,":first-child"),E=i.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?t.height/2+s/2-f/2-y:-t.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${o?-w/2:w/2-t.height})`),T.attr("transform",`translate(0,${o?t.height/2+s/2:-t.height/2-s/2})`),Z9(e,E),e.intersect=function(t){return M.info("iconSquare intersect",e,t),mL.rect(e,t)},i}var RI,MI=t(()=>{MN(),e(),qt(),CL(),_L(),n(),me(II,"iconCircle")}),DI=t(()=>{RI=me((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD")});async function OI(t,n,{config:{themeVariables:e,flowchart:r}}){var i=wL(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 X9(t,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=e,g=vL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=RN.svg(a),x=kL(n,{});"handDrawn"!==n.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(RI(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child").attr("class","icon-shape2"),_=a.insert(()=>E);return n.icon&&((t=a.append("g")).html(`<g>${await Bt(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),r=(e=t.node().getBBox()).width,i=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-i/2-b:-s.height/2-y/2-i/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),Z9(n,_),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2+s.height+y},{x:i+u/2,y:e-r/2+s.height+y},{x:i+u/2,y:e+r/2},{x:i-u/2,y:e+r/2},{x:i-u/2,y:e-r/2+s.height+y},{x:i-s.width/2,y:e-r/2+s.height+y}]:[{x:i-u/2,y:e-r/2},{x:i+u/2,y:e-r/2},{x:i+u/2,y:e-r/2+h},{x:i+s.width/2,y:e-r/2+h},{x:i+s.width/2/2,y:e+r/2},{x:i-s.width/2,y:e+r/2},{x:i-s.width/2,y:e-r/2+h},{x:i-u/2,y:e-r/2+h}],mL.polygon(n,i,t)):mL.rect(n,t)},a}var PI=t(()=>{MN(),e(),qt(),CL(),_L(),DI(),n(),me(OI,"iconRounded")});async function BI(t,n,{config:{themeVariables:e,flowchart:r}}){var i=wL(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 X9(t,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=e,g=vL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=RN.svg(a),x=kL(n,{});"handDrawn"!==n.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(RI(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child"),_=a.insert(()=>E);return n.icon&&((t=a.append("g")).html(`<g>${await Bt(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),r=(e=t.node().getBBox()).width,i=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-i/2-b:-s.height/2-y/2-i/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),Z9(n,_),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2},{x:i+s.width/2,y:e-r/2+s.height+y},{x:i+u/2,y:e-r/2+s.height+y},{x:i+u/2,y:e+r/2},{x:i-u/2,y:e+r/2},{x:i-u/2,y:e-r/2+s.height+y},{x:i-s.width/2,y:e-r/2+s.height+y}]:[{x:i-u/2,y:e-r/2},{x:i+u/2,y:e-r/2},{x:i+u/2,y:e-r/2+h},{x:i+s.width/2,y:e-r/2+h},{x:i+s.width/2/2,y:e+r/2},{x:i-s.width/2,y:e+r/2},{x:i-s.width/2,y:e-r/2+h},{x:i-u/2,y:e-r/2+h}],mL.polygon(n,i,t)):mL.rect(n,t)},a}var FI=t(()=>{MN(),e(),qt(),CL(),DI(),_L(),n(),me(BI,"iconSquare")});async function $I(t,n,{config:{flowchart:e}}){(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,wL(n).labelStyles),a=(n.labelStyle=a,e?.wrappingWidth);n.defaultWidth=e?.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 X9(t,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=RN.svg(c),y=kL(n,{}),v=("handDrawn"!==n.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return n.img&&((e=c.append("image")).attr("href",n.img),e.attr("width",o),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-o/2},${d?b/2-l:-b/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})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),Z9(n,T),n.intersect=function(t){var e,r,i;return M.info("iconSquare intersect",n,t),n.label?(i=n.x??0,e=n.y??0,r=n.height??0,i=d?[{x:i-h.width/2,y:e-r/2},{x:i+h.width/2,y:e-r/2},{x:i+h.width/2,y:e-r/2+h.height+f},{x:i+o/2,y:e-r/2+h.height+f},{x:i+o/2,y:e+r/2},{x:i-o/2,y:e+r/2},{x:i-o/2,y:e-r/2+h.height+f},{x:i-h.width/2,y:e-r/2+h.height+f}]:[{x:i-o/2,y:e-r/2},{x:i+o/2,y:e-r/2},{x:i+o/2,y:e-r/2+l},{x:i+h.width/2,y:e-r/2+l},{x:i+h.width/2/2,y:e+r/2},{x:i-h.width/2,y:e+r/2},{x:i-h.width/2,y:e-r/2+l},{x:i-o/2,y:e-r/2+l}],mL.polygon(n,i,t)):mL.rect(n,t)},c}var zI=t(()=>{MN(),e(),CL(),_L(),n(),me($I,"imageSquare")});async function GI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(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 t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var UI=t(()=>{n(),CL(),_L(),MN(),zN(),me(GI,"inv_trapezoid")});async function qI(t,i,e){var{labelStyles:r,nodeStyles:n}=wL(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await X9(t,i,Q9(i)),o=Math.max(s.width+2*e.labelPaddingX,i?.width||0),l=Math.max(s.height+2*e.labelPaddingY,i?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=i,g=i.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===i.look){let t=RN.svg(a),e=kL(i,{}),r=d||p?t.path(RI(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",bE(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",bE(d)).attr("ry",bE(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Z9(i,u),i.intersect=function(t){return mL.rect(i,t)},a}var jI=t(()=>{n(),CL(),DI(),_L(),MN(),KE(),me(qI,"drawRect")});async function WI(t,e){var{shapeSvg:t,bbox:r,label:i}=await X9(t,e,"label"),n=t.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),Z9(e,n),e.intersect=function(t){return mL.rect(e,t)},t}var YI=t(()=>{jI(),n(),CL(),me(WI,"labelRect")});async function HI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(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 t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var VI=t(()=>{n(),CL(),_L(),MN(),zN(),me(HI,"lean_left")});async function XI(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(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 t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var KI=t(()=>{n(),CL(),_L(),MN(),zN(),me(XI,"lean_right")});function ZI(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.label="",e.labelStyle=r;let n=t.insert("g").attr("class",Q9(e)).attr("id",e.domId??e.id),a=e.cssStyles,s=Math.max(35,e?.width??0),o=Math.max(35,e?.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=RN.svg(n),h=kL(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),Y9(l)),d=c.path(u,h),p=n.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-o})`),Z9(e,p),e.intersect=function(t){return M.info("lightningBolt intersect",e,t),mL.polygon(e,l,t)},n}var QI=t(()=>{e(),n(),_L(),MN(),CL(),n(),me(ZI,"lightningBolt")});async function JI(t,s){var{labelStyles:e,nodeStyles:r}=wL(s);s.labelStyle=e;let{shapeSvg:o,bbox:i,label:n}=await X9(t,s,Q9(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 t=RN.svg(o),e=eR(0,0,l,u,c,h,d),r=rR(0,h,l,u,c,h),i=kL(s,{}),n=t.path(e,i),a=t.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 e=tR(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",bE(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),Z9(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(e){var r=mL.rect(s,e),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 t=h*h*(1-i*i/(c*c));0<t&&(t=Math.sqrt(t)),t=h-t,0<e.y-(s.y??0)&&(t=-t),r.y+=t}return r},o}var tR,eR,rR,iR=t(()=>{n(),CL(),_L(),MN(),KE(),tR=me((t,e,r,i,n,a,s)=>[`M${t},`+(e+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${t},`+(e+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),eR=me((t,e,r,i,n,a,s)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},`+(e+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),rR=me((t,e,r,i,n,a)=>[`M${t-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(JI,"linedCylinder")});async function nR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=s+o,c=e.cssStyles,h=RN.svg(r),u=kL(e,{});"handDrawn"!==e.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},...H9(-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(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Z9(e,g),e.intersect=function(t){return mL.polygon(e,d,t)},r}var aR=t(()=>{n(),CL(),MN(),_L(),me(nR,"linedWaveEdgedRect")});async function sR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=RN.svg(n),p=kL(e,{}),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"!==e.look&&(p.roughness=0,p.fillStyle="solid"),Y9(g)),y=d.path(m,p),v=Y9(f),x=d.path(v,{...p,fill:"none"}),b=n.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.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))})`),Z9(e,b),e.intersect=function(t){return mL.polygon(e,g,t)},n}var oR=t(()=>{n(),_L(),MN(),CL(),me(sR,"multiRect")});async function lR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=e.cssStyles,g=H9(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=RN.svg(n),x=kL(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),Y9(m)),w=v.path(b,x),k=Y9(y),T=v.path(k,x),E=n.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),Z9(e,E),e.intersect=function(t){return mL.polygon(e,m,t)},n}var cR=t(()=>{n(),CL(),MN(),_L(),me(lR,"multiWaveEdgedRectangle")});async function hR(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=wL(e),{shapeSvg:i,bbox:t}=(e.labelStyle=i,e.useHtmlLabels||!1!==Nr().flowchart?.htmlLabels||(e.centerLabel=!0),await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=-a/2,o=-(t=Math.max(t.height+2*(e.padding??0),e?.height??0))/2,l=e.cssStyles,c=RN.svg(i),r=kL(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(s,o,a,t,r),u=i.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),Z9(e,u),e.intersect=function(t){return mL.rect(e,t)},i}var uR=t(()=>{MN(),CL(),_L(),n(),Ai(),me(hR,"note")});async function dR(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(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 t=RN.svg(a),e=kL(n,{}),r=pR(0,0,l),i=t.path(r,e);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=$N(a,l,l,c);return r&&h.attr("style",r),Z9(n,h),n.intersect=function(t){return M.debug(`APA12 Intersect called SPLIT
point:`,t,`
node:
`,n,`
res:`,mL.polygon(n,c,t)),mL.polygon(n,c,t)},a}var pR,gR=t(()=>{e(),n(),CL(),_L(),MN(),zN(),pR=me((t,e,r)=>[`M${t+r/2},`+e,`L${t+r},`+(e-r/2),`L${t+r/2},`+(e-r),`L${t},`+(e-r/2),"Z"].join(" "),"createDecisionBoxPathD"),me(dR,"question")});async function fR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.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=e.cssStyles,g=RN.svg(n),f=kL(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),Y9(d)),y=g.path(m,f),v=n.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),i&&"handDrawn"!==e.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))})`),Z9(e,v),e.intersect=function(t){return mL.polygon(e,d,t)},n}var mR=t(()=>{n(),CL(),_L(),MN(),me(fR,"rect_left_inv_arrow")});function yR(t,e){e&&t.attr("style",e)}async function vR(t){let e=j(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label;return t.label&&Uc(t.label)&&(i=await jc(t.label.replace(L.lineBreakRegex,`
`),D())),r.html('<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),yR(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var xR,bR,wR=t(()=>{Z3(),e(),fu(),Jc(),KE(),me(yR,"applyStyle"),me(vR,"addHtmlLabel"),xR=me(async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),Mc(D().flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"<br />"),M.info("vertexText"+n),vR({isNode:i,label:VE(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.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"),bR=xR});async function kR(n,a){var{labelStyles:t,nodeStyles:e}=wL(a);a.labelStyle=t;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",e),l=a.description,c=a.label,h=o.node().appendChild(await bR(c,a.labelStyle,!0,!0)),u={width:0,height:0};Mc(D()?.flowchart?.htmlLabels)&&(t=h.children[0],n=j(h),u=t.getBoundingClientRect(),n.attr("width",u.width),n.attr("height",u.height)),M.info("Text 2",l);var t=l||[],n=h.getBBox(),d=(t=o.node().appendChild(await bR(t.join?t.join("<br/>"):t,a.labelStyle,!0,!0))).children[0],p=j(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);j(t).attr("transform","translate( "+(u.width>n.width?0:(n.width-u.width)/2)+", "+(n.height+d+5)+")"),j(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,x;if("handDrawn"===a.look){let t=RN.svg(s),e=kL(a,{}),r=t.path(RI(m,y,g,f,a.rx||0),e),i=t.line(-u.width/2-d,-u.height/2-d+n.height+d,u.width/2+d,-u.height/2-d+n.height+d,e);x=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"),x=i.insert("line"),v.attr("class","outer title-state").attr("style",e).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)),x.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 Z9(a,v),a.intersect=function(t){return mL.rect(a,t)},s}var TR=t(()=>{Z3(),Jc(),n(),wR(),CL(),_L(),MN(),fu(),DI(),e(),me(kR,"rectWithTitle")});async function ER(t,e){return qI(t,e,{rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var CR=t(()=>{jI(),me(ER,"roundedRect")});async function _R(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=e?.padding??0,s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=RN.svg(r),u=kL(e,{});"handDrawn"!==e.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(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",bE(c)),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),n.attr("transform",`translate(${-s/2+4+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-(t.y-(t.top??0))})`),Z9(e,g),e.intersect=function(t){return mL.rect(e,t)},r}var SR=t(()=>{n(),CL(),_L(),MN(),KE(),me(_R,"shadedProcess")});async function AR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=-a/2,l=-s/2,c=e.cssStyles,h=RN.svg(r),u=kL(e,{});"handDrawn"!==e.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=Y9(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(0, ${s/4})`),n.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-s/4+(e.padding??0)-(t.y-(t.top??0))})`),Z9(e,f),e.intersect=function(t){return mL.polygon(e,d,t)},r}var LR=t(()=>{n(),CL(),_L(),MN(),me(AR,"slopedRect")});async function NR(t,e){return qI(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var IR=t(()=>{jI(),me(NR,"squareRect")});async function RR(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(n)),s=i.height+n.padding,o=i.width+s/4+n.padding,l,c=n.cssStyles;if("handDrawn"===n.look){let t=RN.svg(a),e=kL(n,{}),r=RI(-o/2,-s/2,o,s,s/2),i=t.path(r,e);(l=a.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",bE(c))}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return Z9(n,l),n.intersect=function(t){return mL.rect(n,t)},a}var MR=t(()=>{n(),CL(),_L(),MN(),DI(),KE(),me(RR,"stadium")});async function DR(t,e){return qI(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var OR=t(()=>{jI(),me(DR,"state")});function PR(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=wL(e),i=(e.labelStyle=i,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=RN.svg(t),l=kL(e,{});"handDrawn"!==e.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=t.insert(()=>c,":first-child");return d.insert(()=>u),i&&d.selectAll("path").attr("style",i),n&&d.selectAll("path").attr("style",n),Z9(e,d),e.intersect=function(t){return mL.circle(e,7,t)},t}var BR=t(()=>{MN(),CL(),_L(),n(),me(PR,"stateEnd")});function FR(t,e,{config:{themeVariables:r}}){let i=r.lineColor,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=RN.svg(n).circle(0,0,14,yL(i));(a=n.insert(()=>t)).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 Z9(e,a),e.intersect=function(t){return mL.circle(e,7,t)},n}var $R=t(()=>{MN(),CL(),_L(),n(),me(FR,"stateStart")});async function zR(a,s){var{labelStyles:o,nodeStyles:t}=wL(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await X9(a,s,Q9(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.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 t=RN.svg(l),e=kL(s,{}),r=t.rectangle(u-8,d,c+16,h,e),i=t.line(u,d,u,d+h,e),n=t.line(u+c,d,u+c,d+h,e);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",bE(a)),Z9(s,o)}else a=$N(l,c,h,i),t&&a.attr("style",t),Z9(s,a);return s.intersect=function(t){return mL.polygon(s,i,t)},l}var GR=t(()=>{n(),CL(),_L(),MN(),zN(),KE(),me(zR,"subroutine")});async function UR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=e.cssStyles,p=RN.svg(n),g=kL(e,{}),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"!==e.look&&(g.roughness=0,g.fillStyle="solid"),Y9(f)),v=p.path(y,g),x=Y9(m),b=p.path(x,{...g,fillStyle:"solid"}),w=n.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),Z9(e,w),e.intersect=function(t){return mL.polygon(e,f,t)},n}var qR=t(()=>{n(),_L(),MN(),CL(),me(UR,"taggedRect")});async function jR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=e.cssStyles,d=RN.svg(r),p=kL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...H9(-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)},...H9(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=Y9(g),x=d.path(v,p),b=Y9(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Z9(e,k),e.intersect=function(t){return mL.polygon(e,g,t)},r}var WR=t(()=>{n(),CL(),MN(),_L(),me(jR,"taggedWaveEdgedRectangle")});async function YR(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await X9(t,e,Q9(e))),n=Math.max(t.width+e.padding,e?.width||0),a=-n/2,s=-(t=Math.max(t.height+e.padding,e?.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",t),Z9(e,o),e.intersect=function(t){return mL.rect(e,t)},r}var HR=t(()=>{n(),CL(),_L(),me(YR,"text")});async function VR(t,a){var{labelStyles:e,nodeStyles:r}=wL(a);a.labelStyle=e;let{shapeSvg:s,bbox:i,label:n,halfPadding:o}=await X9(t,a,Q9(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 t=RN.svg(s),e=KR(0,0,d,c,u,h),r=ZR(0,0,d,c,u,h),i=t.path(e,kL(a,{})),n=t.path(r,kL(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 e=XR(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",bE(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))})`),Z9(a,g),a.intersect=function(e){var r=mL.rect(a,e),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 t=u*u*(1-i*i/(h*h));0!=t&&(t=Math.sqrt(Math.abs(t))),t=u-t,0<e.x-(a.x??0)&&(t=-t),r.x+=t}return r},s}var XR,KR,ZR,QR=t(()=>{n(),_L(),MN(),CL(),KE(),XR=me((t,e,r,i,n,a)=>`M${t},${e}
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"),KR=me((t,e,r,i,n,a)=>[`M${t},`+e,`M${t+r},`+e,`a${n},${a} 0,0,0 0,`+-i,`l${-r},0`,`a${n},${a} 0,0,0 0,`+i,`l${r},0`].join(" "),"createOuterCylinderPathD"),ZR=me((t,e,r,i,n,a)=>[`M${t+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),me(VR,"tiltedCylinder")});async function JR(t,n){var{labelStyles:e,nodeStyles:r}=wL(n);n.labelStyle=e;let{shapeSvg:a,bbox:i}=await X9(t,n,Q9(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 t=RN.svg(a),e=kL(n,{}),r=Y9(l),i=t.path(r,e);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$N(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,Z9(n,c),n.intersect=function(t){return mL.polygon(n,l,t)},a}var tM=t(()=>{n(),CL(),_L(),MN(),zN(),me(JR,"trapezoid")});async function eM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await X9(t,e,Q9(e))),n=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,s=RN.svg(r),o=kL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-n/2*.8,y:-t/2},{x:n/2*.8,y:-t/2},{x:n/2,y:-t/2*.6},{x:n/2,y:t/2},{x:-n/2,y:t/2},{x:-n/2,y:-t/2*.6}],c=Y9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",i),Z9(e,u),e.intersect=function(t){return mL.polygon(e,l,t)},r}var rM=t(()=>{n(),CL(),_L(),MN(),me(eM,"trapezoidalPentagon")});async function iM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Mc(D().flowchart?.htmlLabels),l=a.width+(e.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=e.cssStyles,p=RN.svg(n),g=kL(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),Y9(u)),m=p.path(f,g),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),e.width=l,e.height=c,Z9(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return M.info("Triangle intersect",e,u,t),mL.polygon(e,u,t)},n}var nM=t(()=>{e(),n(),CL(),_L(),MN(),n(),Jc(),fu(),me(iM,"triangle")});async function aM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e),{shapeSvg:r,bbox:t,label:n}=(e.labelStyle=r,await X9(t,e,Q9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/8,l=s+o,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=RN.svg(r),d=kL(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...H9(-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=Y9(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o-(t.y-(t.top??0))})`),Z9(e,m),e.intersect=function(t){return mL.polygon(e,p,t)},r}var sM=t(()=>{n(),CL(),MN(),_L(),me(aM,"waveEdgedRectangle")});async function oM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await X9(t,e,Q9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.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),t=h+2*r,u=e.cssStyles,d=RN.svg(n),p=kL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...H9(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...H9(c/2,-t/2,-c/2,-t/2,r,-1)],f=Y9(g),m=d.path(f,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),Z9(e,y),e.intersect=function(t){return mL.polygon(e,g,t)},n}var lM=t(()=>{n(),CL(),_L(),MN(),me(oM,"waveRectangle")});async function cM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await X9(t,e,Q9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=RN.svg(n),p=kL(e,{}),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"!==e.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"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.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))})`),Z9(e,y),e.intersect=function(t){return mL.polygon(e,g,t)},n}var hM=t(()=>{n(),_L(),MN(),CL(),me(cM,"windowPane")});async function uM(t,e){var r,i=e,n=(i.alias&&(e.label=i.alias),"handDrawn"===e.look&&(A=(A=Nr().themeVariables).background,await uM(t,{...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),Nr());e.useHtmlLabels=n.htmlLabels;let o=n.er?.diagramPadding??10,l=n.er?.entityPadding??6,a=e.cssStyles,s=wL(e).labelStyles;if(0===i.attributes.length&&e.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},yE(e.label,n)+2*A.labelPaddingX<n.er.minEntityWidth&&(e.width=n.er.minEntityWidth),A=await qI(t,e,A),Mc(n.htmlLabels)||(T=(S=A.select("text")).node()?.getBBox(),S.attr("transform",`translate(${-T.width/2}, 0)`)),A;n.htmlLabels||(o*=1.25,l*=1.25);let c=Q9(e),h=(c=c||"node default",t.insert("g").attr("class",c).attr("id",e.domId||e.id)),u=await dM(h,e.label??"",n,0,0,["name"],s),d=(u.height+=l,0),p=[],g=0,f=0,m=0,y=0,v=!0,x=!0;for(r of i.attributes){var b=await dM(h,r.type,n,0,d,["attribute-type"],s),w=(g=Math.max(g,b.width+o),await dM(h,r.name,n,0,d,["attribute-name"],s)),P=(f=Math.max(f,w.width+o),await dM(h,r.keys.join(),n,0,d,["attribute-keys"],s)),B=(m=Math.max(m,P.width+o),await dM(h,r.comment,n,0,d,["attribute-comment"],s));y=Math.max(y,B.width+o),d+=Math.max(b.height,w.height,P.height,B.height)+l,p.push(d)}p.pop();let k=4;m<=o&&(v=!1,m=0,k--),y<=o&&(x=!1,y=0,k--);var T,E,C,_,S=h.node().getBBox(),A=(0<u.width+2*o-(g+f+m+y)&&(T=u.width+2*o-(g+f+m+y),g+=T/k,f+=T/k,0<m&&(m+=T/k),0<y)&&(y+=T/k),g+f+m+y),L=RN.svg(h),N=kL(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let I=Math.max(S.width+2*o,e?.width||0,A),R=Math.max(S.height+(p[0]||d)+l,e?.height||0),M=-I/2,D=-R/2,F=(h.selectAll("g:not(:first-child)").each((t,e,r)=>{let i=j(r[e]),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+=g:i.attr("class").includes("attribute-keys")?a+=g+f:i.attr("class").includes("attribute-comment")&&(a+=g+f+m)),i.attr("transform",`translate(${M+o/2+a}, ${s+D+u.height+l/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),$=h.insert(()=>F,":first-child").attr("style",a.join("")),z=Nr().themeVariables,{rowEven:G,rowOdd:U,nodeBorder:q}=z;p.push(0);for([E,C]of p.entries())if(!(0===E&&1<p.length)){let t=E%2==0&&0!==C,e=L.rectangle(M,u.height+D+C,I,u.height,{...N,fill:t?G:U,stroke:q});h.insert(()=>e,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(E%2==0?"even":"odd"))}let O=L.line(M,u.height+D,I+M,u.height+D,N);h.insert(()=>O).attr("class","divider"),O=L.line(g+M,u.height+D,g+M,R+D,N),h.insert(()=>O).attr("class","divider"),v&&(O=L.line(g+f+M,u.height+D,g+f+M,R+D,N),h.insert(()=>O).attr("class","divider")),x&&(O=L.line(g+f+m+M,u.height+D,g+f+m+M,R+D,N),h.insert(()=>O).attr("class","divider"));for(_ of p)O=L.line(M,u.height+D+_,I+M,u.height+D+_,N),h.insert(()=>O).attr("class","divider");return Z9(e,$),e.intersect=function(t){return mL.rect(e,t)},h}async function dM(t,e,r,i=0,n=0,a=[],s=""){if(t=t.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${i}, ${n})`).attr("style",s),e!==Pc(e)&&(e=(e=Pc(e)).replaceAll("<","&lt;").replaceAll(">","&gt;")),a=t.node().appendChild(await j9(t,e,{width:yE(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("&lt;")||e.includes("&gt;")){let t=a.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let o=a.getBBox();return Mc(r.htmlLabels)&&((i=a.children[0]).style.textAlign="start",n=j(a),o=i.getBoundingClientRect(),n.attr("width",o.width),n.attr("height",o.height)),o}var pM=t(()=>{n(),CL(),_L(),MN(),jI(),Ai(),W9(),Jc(),Z3(),KE(),me(uM,"erBox"),me(dM,"addText")});async function gM(t,e,r,i,n=r.class.padding??12){let a=i?0:3,s=t.insert("g").attr("class",Q9(e)).attr("id",e.domId||e.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<e.annotations.length&&(i=e.annotations[0],await fM(o,{text:`«${i}»`},0),u=o.node().getBBox().height),await fM(l=s.insert("g").attr("class","label-group text"),e,0,["font-weight: bolder"]),d=(t=l.node().getBBox()).height,c=s.insert("g").attr("class","members-group text");let m=0;for(g of e.members){var y=await fM(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 e.methods){var x=await fM(h,f,v,[f.parseClassifier()]);v+=x+a}return s.node().getBBox(),null!==o&&(i=o.node().getBBox(),o.attr("transform",`translate(${-i.width/2})`)),l.attr("transform",`translate(${-t.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)})`),e=s.node().getBBox(),{shapeSvg:s,bbox:e}}async function fM(t,e,r,i=[]){let n=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=Nr(),s="useHtmlLabels"in e?e.useHtmlLabels:Mc(a.htmlLabels)??!0,o="",l=(o="text"in e?e.text:e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Uc(o)&&(s=!0),await j9(n,vh(VE(o)),{width:yE(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),c,h=1;if(s){var t=l.children[0],e=j(l),u=(h=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(h+=t.innerHTML.split("<mrow>").length-1),t.getElementsByTagName("img"));if(u){let i=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",i?(t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}else i.includes("font-weight: bolder")&&j(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes("&gt")||(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").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 mM=t(()=>{Z3(),Ai(),n(),KE(),fu(),W9(),Jc(),me(gM,"textHelper"),me(fM,"addText")});async function yM(e,r){let t=D(),s=t.class.padding??12,i=s,o=r.useHtmlLabels??Mc(t.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:n}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await gM(e,r,t,o,i)),{labelStyles:a,nodeStyles:h}=wL(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",e=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=e.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!t.class?.hideEmptyMembersBox),d=RN.svg(c),p=kL(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),x=c.insert(()=>v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((t,e,r)=>{let i=(e=j(r[e])).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);(e.attr("class").includes("label-group")||e.attr("class").includes("annotation-group"))&&(a=-e.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(a=0)})),e.attr("transform",`translate(${a}, ${n})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0<l.members.length||0<l.methods.length||u){let t=d.line(b.x,w+k+y+s,b.x+b.width,w+k+y+s,p);c.insert(()=>t).attr("class","divider").attr("style",e)}if(u||0<l.members.length||0<l.methods.length){let t=d.line(b.x,w+k+T+y+2*i+s,b.x+b.width,w+k+T+y+s+2*i,p);c.insert(()=>t).attr("class","divider").attr("style",e)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",e),x.select(":nth-child(2)").attr("style",e),c.selectAll(".divider").select("path").attr("style",e),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",e),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(e))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(e=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",e))),Z9(r,x),r.intersect=function(t){return mL.rect(r,t)},c}var vM=t(()=>{n(),fu(),Z3(),MN(),_L(),CL(),mM(),Jc(),me(yM,"classBox")});async function xM(t,e){var{labelStyles:r,nodeStyles:i}=wL(e);e.labelStyle=r;let n=e,a=e,s="verifyMethod"in e,o=Q9(e),l=t.insert("g").attr("class",o).attr("id",e.domId??e.id),c,h=c=s?await bM(l,`&lt;&lt;${n.type}&gt;&gt;`,0,e.labelStyle):await bM(l,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle),u=await bM(l,n.name,h,e.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await bM(l,n.requirementId?"Id: "+n.requirementId:"",h,e.labelStyle),h+=r,t=await bM(l,n.text?"Text: "+n.text:"",h,e.labelStyle),h+=t,r=await bM(l,n.risk?"Risk: "+n.risk:"",h,e.labelStyle),h+=r,await bM(l,n.verifyMethod?"Verification: "+n.verifyMethod:"",h,e.labelStyle)):(t=await bM(l,a.type?"Type: "+a.type:"",h,e.labelStyle),h+=t,await bM(l,a.docRef?"Doc Ref: "+a.docRef:"",h,e.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=RN.svg(l),y=kL(e,{}),v=("handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),x=l.insert(()=>v,":first-child");if(x.attr("class","basic label-container").attr("style",i),l.selectAll(".label").each((t,e,r)=>{let i=j(r[e]),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!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let t=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>t).attr("style",i)}return Z9(e,x),e.intersect=function(t){return mL.rect(e,t)},l}async function bM(t,e,r,i=""){if(""===e)return 0;let n=t.insert("g").attr("class","label").attr("style",i),a=D(),s=a.htmlLabels??!0,o=await j9(n,vh(VE(e)),{width:yE(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),l;if(s)t=o.children[0],e=j(o),l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),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 wM=t(()=>{n(),CL(),_L(),MN(),KE(),fu(),W9(),Z3(),me(xM,"requirementBox"),me(bM,"addText")});async function kM(t,i,{config:e}){var{labelStyles:n,nodeStyles:r}=wL(i),n=(i.labelStyle=n||"",i.width);i.width=(i.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await X9(t,i,Q9(i)),l=i.padding||10,c,h,u=("ticket"in i&&i.ticket&&e?.kanban?.ticketBaseUrl&&(c=e?.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 K9(h,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await K9(a,"ticket"in i&&i.ticket||"",u);var{label:t,bbox:e}=await K9(a,"assigned"in i&&i.assigned||"",u),n=(i.width=n,i?.width||0),g=Math.max(p.height,e.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)+")"),t.attr("transform","translate("+(l+n/2-e.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=i,w=i.cssStyles;if("handDrawn"===i.look){let t=RN.svg(a),e=kL(i,{}),r=x||b?t.path(RI(m,y,n,f,x||0),e):t.rectangle(m,y,n,f,e);(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",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",n).attr("height",f),(t="priority"in i&&i.priority)&&(e=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),n=y+f-Math.floor((x??0)/2),e.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",n).attr("stroke-width","4").attr("stroke",TM(t)));return Z9(i,v),i.height=f,i.intersect=function(t){return mL.rect(i,t)},a}var TM,EM=t(()=>{n(),CL(),DI(),_L(),MN(),TM=me(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),me(kM,"kanbanItem")});function CM(t){return t in AM}var _M,SM,AM,LM,NM,IM,RM,MM,DM,OM,PM,BM,FM,$M,zM,GM=t(()=>{ON(),FN(),UN(),jN(),YN(),XN(),QN(),eI(),nI(),sI(),uI(),pI(),fI(),yI(),xI(),wI(),TI(),_I(),AI(),NI(),MI(),PI(),FI(),zI(),UI(),YI(),VI(),KI(),QI(),iR(),aR(),oR(),cR(),uR(),gR(),mR(),TR(),CR(),SR(),LR(),IR(),MR(),OR(),BR(),$R(),GR(),qR(),WR(),HR(),QR(),tM(),rM(),nM(),sM(),lM(),hM(),pM(),vM(),wM(),EM(),_M=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:NR},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ER},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:RR},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zR},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:oI},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:WN},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:dR},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:EI},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:XI},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:HI},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:JR},{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:GI},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:gI},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:YR},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:GN},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:_R},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:FR},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:PR},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:bI},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:SI},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ZN},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tI},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iI},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ZI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:aM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:kI},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:VR},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:JI},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:aI},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dI},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:iM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:cM},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:mI},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:vI},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:AR},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:lR},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:sR},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:BN},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:VN},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jR},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:UR},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:oM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:fR},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:nR}],SM=me(()=>{var t=[...Object.entries({state:DR,choice:qN,note:hR,rectWithTitle:kR,labelRect:WI,iconSquare:BI,iconCircle:II,icon:LI,iconRounded:OI,imageSquare:$I,anchor:DN,kanbanItem:kM,classBox:yM,erBox:uM,requirementBox:xM}),..._M.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),AM=SM(),me(CM,"isValidShape")}),UM=t(()=>{Z3(),IA(),fu(),e(),GM(),KE(),Jc(),gu(),LM=class{constructor(){this.vertexCounter=0,this.config=D(),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=lh,this.setAccDescription=hh,this.setDiagramTitle=dh,this.getAccTitle=ch,this.getAccDescription=uh,this.getDiagramTitle=ph,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{me(this,"FlowDB")}sanitizeText(t){return L.sanitizeText(t,this.config)}lookUpDomId(t){for(var e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(i,n,a,s,o,l,c={},t){if(i&&0!==i.trim().length){let r;var e;if(void 0!==t&&(e=t.includes(`
`)?t+`
`:`{
`+t+`
}`,r=NA(e,{schema:LA})),t=this.edges.find(t=>t.id===i))void 0!==(e=r)?.animate&&(t.animate=e.animate),void 0!==e?.animation&&(t.animation=e.animation);else{let t,e=this.vertices.get(i);if(void 0===e&&(e={id:i,labelType:"text",domId:"flowchart-"+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,e)),this.vertexCounter++,void 0!==n?(this.config=D(),t=this.sanitizeText(n.text.trim()),e.labelType=n.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=i),void 0!==a&&(e.type=a),s?.forEach(t=>{e.styles.push(t)}),o?.forEach(t=>{e.classes.push(t)}),void 0!==l&&(e.dir=l),void 0===e.props?e.props=c:void 0!==c&&Object.assign(e.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(!CM(r.shape))throw new Error(`No such shape: ${r.shape}.`);e.type=r?.shape}r?.label&&(e.text=r?.label),r?.icon&&(e.icon=r?.icon,!r.label?.trim())&&e.text===i&&(e.text=""),r?.form&&(e.form=r?.form),r?.pos&&(e.pos=r?.pos),r?.img&&(e.img=r?.img,!r.label?.trim())&&e.text===i&&(e.text=""),r?.constraint&&(e.constraint=r.constraint),r.w&&(e.assetWidth=Number(r.w)),r.h&&(e.assetHeight=Number(r.h))}}}}addSingleLink(t,e,r,i){let n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",n),void 0!==(t=r.text)&&(n.text=this.sanitizeText(t.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=t.type),void 0!==r&&(n.type=r.type,n.stroke=r.stroke,n.length=10<r.length?10:r.length),i&&!this.edges.some(t=>t.id===i)?(n.id=i,n.isUserDefinedId=!0):0===(e=this.edges.filter(t=>t.start===n.start&&t.end===n.end)).length?n.id=XE(n.start,n.end,{counter:0,prefix:"L"}):n.id=XE(n.start,n.end,{counter:e.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(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){var i,n=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",t,e,n);for(i of t)for(var a of e){var s=i===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,0<(this.edges[t]?.style?.length??0)&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){let i=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),i?.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setDirection(t){this.direction=t,/.*</.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(t,r){for(let e of t.split(",")){var i=this.vertices.get(e);i&&i.classes.push(r),(i=this.edges.find(t=>t.id===e))&&i.classes.push(r),(i=this.subGraphLookup.get(e))&&i.classes.push(r)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(var r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,i){let n=this.lookUpDomId(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),(i=this.vertices.get(t))&&(i.haveCallback=!0,this.funs.push(()=>{var t=document.querySelector(`[id="${n}"]`);null!==t&&t.addEventListener("click",()=>{YE.runFunc(e,...r)},!1)}))}}setLink(t,e,r){t.split(",").forEach(t=>{void 0!==(t=this.vertices.get(t))&&(t.link=YE.formatUrl(e,this.config),t.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=j(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=j("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),j(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e=j(t.currentTarget);null!==e.attr("title")&&(t=t.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.bottom+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),j(t.currentTarget).classed("hover",!1)})}clear(t="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=t,this.config=D(),oh()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let i=t.text.trim(),n=r.text;t===r&&/\s/.exec(r.text)&&(i=void 0);var{nodeList:a,dir:t}=me(t=>{let r={boolean:{},number:{},string:{}},i=[],n;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!i.includes(t)&&i.push(t))}),dir:n}},"uniq")(e.flat());if("gen-1"===this.version)for(let t=0;t<a.length;t++)a[t]=this.lookUpDomId(a[t]);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(t){for(var[e,r]of this.subGraphs.entries())if(r.id===t)return e;return-1}indexNodes2(t,e){var r=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,2e3<this.secCount)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)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(t,a)).result)return{result:!0,count:n+a.count};n+=a.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}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(t){let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:r,stroke:i}}countChar(e,r){let i=r.length,n=0;for(let t=0;t<i;++t)r[t]===e&&++n;return n}destructEndLink(t){let e=t.trim(),r=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e.startsWith("x")&&(i="double_"+i,r=r.slice(1));break;case">":i="arrow_point",e.startsWith("<")&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",e.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"),(t=this.countChar(".",r))&&(n="dotted",a=t),{type:i,stroke:n,length:a}}destructLink(t,e){if(t=this.destructEndLink(t),e){if((e=this.destructStartLink(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t}exists(t,e){for(var r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(r,i){let n=[];return r.nodes.forEach((t,e)=>{this.exists(i,t)||n.push(r.nodes[e])}),{nodes:n}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,i,n,a){var r=r.get(t.id),i=i.get(t.id)??!1,s=this.findNode(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=this.getCompiledStyles(t.classes),s.cssClasses=t.classes.join(" ")):(s={id:t.id,label:t.text,labelStyle:"",parentId:r,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},i?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)}))}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}getData(){let a=D(),e=[],s=[],r=this.getSubGraphs(),i=new Map,n=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0<l.nodes.length&&n.set(l.id,!0);for(o of l.nodes)i.set(o,l.id)}for(let t=r.length-1;0<=t;t--){var c=r[t];e.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(t=>{this.addNodeFromVertex(t,e,i,n,a,a.look||"classic")});let h=this.getEdges();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:i}=this.destructEdgeType(t.type),n=[...h.defaultStyle??[]],e=(t.style&&n.push(...t.style),{id:XE(t.start,t.end,{counter:e,prefix:"L"},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??"normal",label:t.text,labelpos:"c",thickness:t.stroke,minlen:t.length,classes:"invisible"===t?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":r,arrowTypeEnd:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":i,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:n,style:n,pattern:t.stroke,look:a.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(e)}),{nodes:e,edges:s,other:{},config:a}}defaultConfig(){return yh.flowchart}}}),qM=t(()=>{Z3(),NM=me((t,e)=>{let r;return"sandbox"===e&&(r=j("#i"+t)),j("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),jM=t(()=>{IM=me(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")}),WM=t(()=>{fu(),Jc(),e(),jM(),Z3(),MN(),W9(),EL(),wR(),DI(),_L(),RM=me(async(i,n)=>{M.info("Creating subgraph rect for ",n.id,n);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=wL(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.id).attr("data-look",n.look),d=Mc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await j9(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Mc(t.flowchart.htmlLabels)&&(i=g.children[0],m=j(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 x;if("handDrawn"===n.look){let t=RN.svg(u),e=kL(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path(RI(y,v,i,m,0),e);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=IM(t).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=x.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(t){return fL(n,t)},{cluster:u,labelBBox:f}},"rect"),MM=me((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),i=0*e.padding,n=i/2,n=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none"),r.node().getBBox());return e.width=n.width,e.height=n.height,e.intersect=function(t){return fL(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),DM=me(async(n,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,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 bR(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Mc(t.flowchart.htmlLabels)&&(n=p.children[0],f=j(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,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let t=a.cssClasses.includes("statediagram-cluster-alt"),e=RN.svg(u),r=a.rx||a.ry?e.path(RI(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),i=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,n,{fill:t?o:l,fillStyle:t?"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",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",n);return i.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Mc(t.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(t){return fL(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),OM=me(async(i,n)=>{M.info("Creating subgraph rect for ",n.id,n);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=wL(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.id).attr("data-look",n.look),d=Mc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await j9(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();Mc(t.flowchart.htmlLabels)&&(i=g.children[0],m=j(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 x;if("handDrawn"===n.look){let t=RN.svg(u),e=kL(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=t.path(RI(y,v,i,m,n.rx),e);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=IM(t).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=x.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(t){return fL(n,t)},{cluster:u,labelBBox:f}},"kanbanSection"),PM=me((e,r)=>{var{themeVariables:i,handDrawnSeed:n}=D(),i=i.nodeBorder,t=(e=e.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 t=RN.svg(e).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});c=e.insert(()=>t,":first-child")}else(c=t.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(t){return fL(r,t)},{cluster:e,labelBBox:{}}},"divider"),BM={rect:RM,squareRect:RM,roundedWithTitle:DM,noteGroup:MM,divider:PM,kanbanSection:OM},FM=new Map,$M=me(async(t,e)=>{var r=e.shape||"rect",r=await BM[r](t,e);return FM.set(e.id,r),r},"insertCluster"),zM=me(()=>{FM=new Map},"clear")});function YM(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=VM(t),e=VM(e);var[t,r]=[t.x,t.y],[e,i]=[e.x,e.y],e=e-t,t=i-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var HM,VM,XM,KM,ZM,QM,JM=t(()=>{HM={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},me(YM,"calculateDeltaAndAngle"),VM=me(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),XM=me(c=>({x:me(function(t,e,r){let i=0,n=VM(r[0]).x<VM(r[r.length-1]).x?"left":"right";0===e&&Object.hasOwn(HM,c.arrowTypeStart)?({angle:a,deltaX:s}=YM(r[0],r[1]),i=HM[c.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):e===r.length-1&&Object.hasOwn(HM,c.arrowTypeEnd)&&({angle:a,deltaX:s}=YM(r[r.length-1],r[r.length-2]),i=HM[c.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var e=Math.abs(VM(t).x-VM(r[r.length-1]).x),a=Math.abs(VM(t).y-VM(r[r.length-1]).y),s=Math.abs(VM(t).x-VM(r[0]).x),r=Math.abs(VM(t).y-VM(r[0]).y),o=HM[c.arrowTypeStart],l=HM[c.arrowTypeEnd];return e<l&&0<e&&a<l&&(a=l+1-e,a*="right"==n?-1:1,i-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="right"==n?-1:1,i+=l),VM(t).x+i},"x"),y:me(function(t,e,r){let i=0,n=VM(r[0]).y<VM(r[r.length-1]).y?"down":"up";0===e&&Object.hasOwn(HM,c.arrowTypeStart)?({angle:a,deltaY:s}=YM(r[0],r[1]),i=HM[c.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):e===r.length-1&&Object.hasOwn(HM,c.arrowTypeEnd)&&({angle:a,deltaY:s}=YM(r[r.length-1],r[r.length-2]),i=HM[c.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var e=Math.abs(VM(t).y-VM(r[r.length-1]).y),a=Math.abs(VM(t).x-VM(r[r.length-1]).x),s=Math.abs(VM(t).y-VM(r[0]).y),r=Math.abs(VM(t).x-VM(r[0]).x),o=HM[c.arrowTypeStart],l=HM[c.arrowTypeEnd];return e<l&&0<e&&a<l&&(a=l+1-e,a*="up"==n?-1:1,i-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="up"==n?-1:1,i+=l),VM(t).y+i},"y")}),"getLineFunctionsWithOffset")}),tD=t(()=>{e(),KM=me((t,e,r,i,n,a)=>{e.arrowTypeStart&&QM(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&QM(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),ZM={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}},QM=me((t,e,r,i,n,a,s)=>{let o=ZM[r],l,c;o?(n=n+`_${a}-`+o.type+("start"===e?"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(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),t.attr("marker-"+e,`url(${i}#${a})`)):t.attr("marker-"+e,`url(${i}#${n})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function eD(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function rD(e){var r=[],i=[];for(let t=1;t<e.length-1;t++){var n=e[t-1],a=e[t],s=e[t+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(t))}return{cornerPoints:r,cornerPointPositions:i}}var iD,nD,aD,sD,oD,lD,cD,hD,uD,dD,pD,gD,fD,mD,yD,vD,xD,bD,wD,kD,TD,ED,CD,_D,SD,AD,LD,ND,ID,RD,MD=t(()=>{fu(),Jc(),e(),W9(),KE(),JM(),jM(),Z3(),MN(),wR(),tD(),_L(),iD=new Map,nD=new Map,aD=me(()=>{iD.clear(),nD.clear()},"clear"),sD=me(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),oD=me(async(t,e)=>{var r,i=Mc(D().flowchart.htmlLabels),n=await j9(t,e.label,{style:sD(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1}),a=(M.info("abc82",e,e.labelType),t.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=j(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),iD.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=await bR(e.startLabelLeft,sD(e.labelStyle)),s=(r=t.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+")"),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).startLeft=r,eD(l,e.startLabelLeft)),e.startLabelRight&&(i=await bR(e.startLabelRight,sD(e.labelStyle)),a=(s=t.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+")"),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).startRight=s,eD(l,e.startLabelRight)),e.endLabelLeft&&(i=await bR(e.endLabelLeft,sD(e.labelStyle)),r=(a=t.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),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).endLeft=a,eD(l,e.endLabelLeft)),e.endLabelRight&&(r=await bR(e.endLabelRight,sD(e.labelStyle)),i=(s=t.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),nD.get(e.id)||nD.set(e.id,{}),nD.get(e.id).endRight=s,eD(l,e.endLabelRight)),n},"insertEdgeLabel"),me(eD,"setTerminalWidth"),lD=me((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,iD.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=D(),o=IM(o).subGraphTitleTotalMargin;if(i.label){let t=iD.get(i.id),e=i.x,r=i.y;s&&(a=YE.calcLabelPosition(s),M.debug("Moving label "+i.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(i.startLabelLeft){let t=nD.get(i.id).startLeft,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.startLabelRight){let t=nD.get(i.id).startRight,e=i.x,r=i.y;s&&(a=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelLeft){let t=nD.get(i.id).endLeft,e=i.x,r=i.y;s&&(o=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelRight){let t=nD.get(i.id).endRight,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),cD=me((t,e)=>{var r=t.x,i=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-i);return t.width/2<=r||t.height/2<=e},"outsideNode"),hD=me((t,i,n)=>{M.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(i)}
insidePoint : ${JSON.stringify(n)}
node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-n.x),s=t.width/2,o=n.x<i.x?s-r:s+r,l=t.height/2,c=Math.abs(i.y-n.y),h=Math.abs(i.x-n.x),u;if(Math.abs(e-i.y)*s>Math.abs(a-i.x)*l)return t=n.y<i.y?i.y-l-e:e-l-i.y,o=h*t/c,u={x:n.x<i.x?n.x+o:n.x-h+o,y:n.y<i.y?n.y+c-t:n.y-c+t},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 ${t}, R ${h}, r `+o,u),u;{let t=c*(o=n.x<i.x?i.x-s-a:a-s-i.x)/h,e=n.x<i.x?n.x+h-o:n.x-h+o,r=n.y<i.y?n.y+t:n.y-t;return M.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+o,{_x:e,_y:r}),0===o&&(e=i.x,r=i.y),0===h&&(e=i.x),0===c&&(r=i.y),{x:e,y:r}}},"intersection"),uD=me((t,i)=>{M.warn("abc88 cutPathAtIntersect",t,i);let n=[],a=t[0],s=!1;return t.forEach(t=>{if(M.info("abc88 checking point",t,i),cD(i,t)||s)M.warn("abc88 outside",t,a),a=t,s||n.push(t);else{let e=hD(i,a,t),r=(M.debug("abc88 inside",t,a,e),M.debug("abc88 intersection",e,i),!1);n.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),n.some(t=>t.x===e.x&&t.y===e.y)?M.warn("abc88 no intersect",e,n):n.push(e),s=!0}}),M.debug("returning points",n),n},"cutPathAtIntersect"),me(rD,"extractCornerPoints"),dD=me(function(t,e,r){var i=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(i*i+t*t);return{x:e.x-r*i,y:e.y-r*t}},"findAdjacentPoint"),pD=me(function(i){var t=rD(i).cornerPointPositions,n=[];for(let r=0;r<i.length;r++)if(t.includes(r)){var a=i[r-1],s=i[r+1],o=i[r],l=dD(a,o,5),c=dD(s,o,5),h=c.x-l.x,u=c.y-l.y;n.push(l);let t=2*Math.sqrt(2),e={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)),e=o.x===l.x?{x:h<0?l.x-5+t:l.x+5-t,y:u<0?l.y-t:l.y+t}:{x:h<0?l.x-t:l.x+t,y:u<0?l.y-5+t:l.y+5-t}):M.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),n.push(e,c)}else n.push(i[r]);return n},"fixCorners"),gD=me(function(i,n,t,e,r,a,s){let o=D().handDrawnSeed,l=n.points,c=!1,h=r,u=a;var d,p=[];for(d in n.cssCompiledStyles)bL(d)||p.push(n.cssCompiledStyles[d]);u.intersect&&h.intersect&&((l=l.slice(1,n.points.length-1)).unshift(h.intersect(l[0])),M.debug("Last point APA12",n.start,"--\x3e",n.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),n.toCluster&&(M.info("to cluster abc88",t.get(n.toCluster)),l=uD(n.points,t.get(n.toCluster).node),c=!0),n.fromCluster&&(M.debug("from cluster abc88",t.get(n.fromCluster),JSON.stringify(l,null,2)),l=uD(l.reverse(),t.get(n.fromCluster).node).reverse(),c=!0),r=l.filter(t=>!Number.isNaN(t.y)),r=pD(r);let g=u5;switch(g=j4,n.curve){case"linear":g=j4;break;case"basis":g=u5;break;case"cardinal":g=E5;break;case"bumpX":g=i5;break;case"bumpY":g=n5;break;case"catmullRom":g=D5;break;case"monotoneX":g=Q5;break;case"monotoneY":g=J5;break;case"natural":g=i3;break;case"step":g=s3;break;case"stepAfter":g=l3;break;case"stepBefore":g=o3;break;default:g=u5}let{x:f,y:m}=XM(n),y=X4().x(f).y(m).curve(g),v;switch(n.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(n.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let x,b=y(r),w=Array.isArray(n.style)?n.style:[n.style],k=w.find(t=>t?.startsWith("stroke:"));if("handDrawn"===n.look)a=RN.svg(i),Object.assign([],r),t=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=j(t).select("path").attr("id",n.id).attr("class"," "+v+(n.classes?" "+n.classes:"")).attr("style",w?w.reduce((t,e)=>t+";"+e,""):"")).attr("d"),x.attr("d",r),i.node().appendChild(x.node());else{let t=p.join(";"),e=w?w.reduce((t,e)=>t+e+";",""):"",r="";n.animate&&(r=" edge-animation-fast"),n.animation&&(r=" edge-animation-"+n.animation),a=t?t+";"+e+";":e,x=i.append("path").attr("d",b).attr("id",n.id).attr("class"," "+v+(n.classes?" "+n.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1]}let T="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(T=(T=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),KM(x,n,T,s,e,k),t={},c&&(t.updatedPath=l),t.originalPath=n.points,t},"insertEdge")}),DD=t(()=>{e(),fD=me((e,t,r,i)=>{t.forEach(t=>{ID[t](e,r,i)})},"insertMarkers"),mD=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),yD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),vD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),xD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),bD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),wD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),kD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),TD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),ED=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),CD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),_D=me((t,e,r)=>{var i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).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"),SD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),AD=me((t,e,r)=>{var i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).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"),LD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),ND=me((t,e,r)=>{(t=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ID={extension:mD,composition:yD,aggregation:vD,dependency:xD,lollipop:bD,point:wD,circle:kD,cross:TD,barb:ED,only_one:CD,zero_or_one:_D,one_or_more:SD,zero_or_more:AD,requirement_arrow:LD,requirement_contains:ND},RD=fD});async function OD(e,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?AM[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===i.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),a=await s(n,r,i)}else a=await s(e,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),PD.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var PD,BD,FD,$D,zD,GD=t(()=>{e(),GM(),PD=new Map,me(OD,"insertNode"),BD=me((t,e)=>{PD.set(e.id,t)},"setNodeElem"),FD=me(()=>{PD.clear()},"clear"),$D=me(t=>{var e=PD.get(t.id),r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),UD=t(()=>{Ai(),Jc(),e(),WM(),MD(),DD(),GD(),n(),KE(),zD={common:L,getConfig:Nr,insertCluster:$M,insertEdge:gD,insertEdgeLabel:oD,insertMarkers:RD,insertNode:OD,interpolateToCurve:lE,labelHelper:X9,log:M,positionEdgeLabel:lD}});function qD(t){return"symbol"==typeof t||GT(t)&&"[object Symbol]"==x6(t)}var jD,WD=t(()=>{b6(),UT(),me(qD,"isSymbol"),jD=qD});function YD(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var HD,VD=t(()=>{me(YD,"arrayMap"),HD=YD});function XD(t){var e;return"string"==typeof t?t:KT(t)?HD(t,XD)+"":jD(t)?QD?QD.call(t):"":"0"==(e=t+"")&&1/t==-KD?"-0":e}var KD,ZD,QD,JD,tO=t(()=>{n6(),VD(),JT(),WD(),KD=1/0,ZD=Y3?Y3.prototype:void 0,QD=ZD?ZD.toString:void 0,me(XD,"baseToString"),JD=XD});function eO(t){for(var e=t.length;e--&&rO.test(t.charAt(e)););return e}var rO,iO,nO=t(()=>{rO=/\s/,me(eO,"trimmedEndIndex"),iO=eO});function aO(t){return t&&t.slice(0,iO(t)+1).replace(sO,"")}var sO,oO,lO=t(()=>{nO(),sO=/^\s+/,me(aO,"baseTrim"),oO=aO});function cO(t){if("number"==typeof t)return t;if(jD(t))return hO;if(k6(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=k6(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=oO(t);var e=dO.test(t);return e||pO.test(t)?gO(t.slice(2),e?2:8):uO.test(t)?hO:+t}var hO,uO,dO,pO,gO,fO,mO=t(()=>{lO(),T6(),WD(),hO=NaN,uO=/^[-+]0x[0-9a-f]+$/i,dO=/^0b[01]+$/i,pO=/^0o[0-7]+$/i,gO=parseInt,me(cO,"toNumber"),fO=cO});function yO(t){return t?(t=fO(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var vO,xO=t(()=>{mO(),me(yO,"toFinite"),vO=yO});function bO(t){var e=(t=vO(t))%1;return t==t?e?t-e:t:0}var wO,kO,TO,EO=t(()=>{xO(),me(bO,"toInteger"),wO=bO}),CO=t(()=>{tw(),i6(),kO=Z6(j3,"WeakMap"),TO=kO});function _O(){}var SO,AO=t(()=>{me(_O,"noop"),SO=_O});function LO(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r,t););return t}var NO,IO=t(()=>{me(LO,"arrayEach"),NO=LO});function RO(t,e,r,i){for(var n=t.length,a=r+(i?1:-1);i?a--:++a<n;)if(e(t[a],a,t))return a;return-1}var MO,DO=t(()=>{me(RO,"baseFindIndex"),MO=RO});function OO(t){return t!=t}var PO,BO=t(()=>{me(OO,"baseIsNaN"),PO=OO});function FO(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}var $O,zO=t(()=>{me(FO,"strictIndexOf"),$O=FO});function GO(t,e,r){return e==e?$O(t,e,r):MO(t,PO,r)}var UO,qO=t(()=>{DO(),BO(),zO(),me(GO,"baseIndexOf"),UO=GO});function jO(t,e){return!(null==t||!t.length)&&-1<UO(t,e,0)}var WO,YO,HO,VO=t(()=>{qO(),me(jO,"arrayIncludes"),WO=jO}),XO=t(()=>{IT(),YO=AT(Object.keys,Object),HO=YO});function KO(t){if(!OT(t))return HO(t);var e,r=[];for(e in Object(t))QO.call(t,e)&&"constructor"!=e&&r.push(e);return r}var ZO,QO,JO,tP=t(()=>{PT(),XO(),ZO=Object.prototype,QO=ZO.hasOwnProperty,me(KO,"baseKeys"),JO=KO});function eP(t){return(n7(t)?s8:JO)(t)}var rP,iP,nP,aP,sP=t(()=>{o8(),tP(),a7(),me(eP,"keys"),rP=eP}),oP=t(()=>{Y7(),X7(),sE(),a7(),PT(),sP(),nP=Object.prototype,iP=nP.hasOwnProperty,nP=iE(function(t,e){if(OT(e)||n7(e))V7(e,rP(e),t);else for(var r in e)iP.call(e,r)&&W7(t,r,e[r])}),aP=nP});function lP(t,e){var r;return!KT(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!jD(t))||hP.test(t)||!cP.test(t)||null!=e&&t in Object(e))}var cP,hP,uP,dP=t(()=>{JT(),WD(),cP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hP=/^\w*$/,me(lP,"isKey"),uP=lP});function pP(t){var e=(t=Ck(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var gP,fP,mP,yP,vP,xP=t(()=>{_k(),me(pP,"memoizeCapped"),gP=pP}),bP=t(()=>{xP(),fP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mP=/\\(\\)?/g,yP=gP(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(fP,function(t,e,r,i){n.push(r?i.replace(mP,"$1"):e||t)}),n}),vP=yP});function wP(t){return null==t?"":JD(t)}var kP,TP=t(()=>{tO(),me(wP,"toString"),kP=wP});function EP(t,e){return KT(t)?t:uP(t,e)?[t]:vP(kP(t))}var CP,_P=t(()=>{JT(),dP(),bP(),TP(),me(EP,"castPath"),CP=EP});function SP(t){var e;return"string"==typeof t||jD(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var AP,LP=t(()=>{WD(),me(SP,"toKey"),AP=SP});function NP(t,e){for(var r=0,i=(e=CP(e,t)).length;null!=t&&r<i;)t=t[AP(e[r++])];return r&&r==i?t:void 0}var IP,RP=t(()=>{_P(),LP(),me(NP,"baseGet"),IP=NP});function MP(t,e,r){return void 0===(t=null==t?void 0:IP(t,e))?r:t}var DP,OP=t(()=>{RP(),me(MP,"get"),DP=MP});function PP(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var BP,FP=t(()=>{me(PP,"arrayPush"),BP=PP});function $P(t){return KT(t)||VT(t)||!!(zP&&t&&t[zP])}var zP,GP,UP=t(()=>{n6(),QT(),JT(),zP=Y3?Y3.isConcatSpreadable:void 0,me($P,"isFlattenable"),GP=$P});function qP(t,e,r,i,n){var a=-1,s=t.length;for(r=r||GP,n=n||[];++a<s;){var o=t[a];0<e&&r(o)?1<e?qP(o,e-1,r,i,n):BP(n,o):i||(n[n.length]=o)}return n}var jP,WP=t(()=>{FP(),UP(),me(qP,"baseFlatten"),jP=qP});function YP(t){return null!=t&&t.length?jP(t,1):[]}var HP,VP=t(()=>{WP(),me(YP,"flatten"),HP=YP});function XP(t){return H8(P8(t,void 0,HP),t+"")}var KP,ZP=t(()=>{VP(),B8(),X8(),me(XP,"flatRest"),KP=XP});function QP(t,e,r){var i=-1,n=t.length;(r=n<r?n:r)<0&&(r+=n),n=r<(e=e<0?n<-e?0:n+e:e)?0:r-e>>>0,e>>>=0;for(var a=Array(n);++i<n;)a[i]=t[i+e];return a}var JP,tB=t(()=>{me(QP,"baseSlice"),JP=QP});function eB(t){return rB.test(t)}var rB,iB,nB=t(()=>{rB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),me(eB,"hasUnicode"),iB=eB});function aB(t,e,r,i){var n=-1,a=null==t?0:t.length;for(i&&a&&(r=t[++n]);++n<a;)r=e(r,t[n],n,t);return r}var sB,oB=t(()=>{me(aB,"arrayReduce"),sB=aB});function lB(t,e){return t&&V7(e,rP(e),t)}var cB,hB=t(()=>{X7(),sP(),me(lB,"baseAssign"),cB=lB});function uB(t,e){return t&&V7(e,y8(e),t)}var dB,pB=t(()=>{X7(),v8(),me(uB,"baseAssignIn"),dB=uB});function gB(t,e){for(var r=-1,i=null==t?0:t.length,n=0,a=[];++r<i;){var s=t[r];e(s,r,t)&&(a[n++]=s)}return a}var fB,mB=t(()=>{me(gB,"arrayFilter"),fB=gB});function yB(){return[]}var vB,xB,bB,wB,kB,TB=t(()=>{me(yB,"stubArray"),vB=yB}),EB=t(()=>{mB(),TB(),xB=Object.prototype,bB=xB.propertyIsEnumerable,kB=(wB=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),fB(wB(e),function(t){return bB.call(e,t)}))}:vB});function CB(t,e){return V7(t,kB(t),e)}var _B,SB,AB,LB=t(()=>{X7(),EB(),me(CB,"copySymbols"),_B=CB}),NB=t(()=>{FP(),RT(),EB(),TB(),SB=Object.getOwnPropertySymbols,AB=SB?function(t){for(var e=[];t;)BP(e,kB(t)),t=NT(t);return e}:vB});function IB(t,e){return V7(t,AB(t),e)}var RB,MB=t(()=>{X7(),NB(),me(IB,"copySymbolsIn"),RB=IB});function DB(t,e,r){return e=e(t),KT(t)?e:BP(e,r(t))}var OB,PB=t(()=>{FP(),JT(),me(DB,"baseGetAllKeys"),OB=DB});function BB(t){return OB(t,rP,kB)}var FB,$B=t(()=>{PB(),EB(),sP(),me(BB,"getAllKeys"),FB=BB});function zB(t){return OB(t,y8,AB)}var GB,UB,qB,jB,WB,YB,HB,VB,XB,KB,ZB,QB,JB,tF,eF,rF,iF,nF,aF,sF=t(()=>{PB(),NB(),v8(),me(zB,"getAllKeysIn"),GB=zB}),oF=t(()=>{tw(),i6(),UB=Z6(j3,"DataView"),qB=UB}),lF=t(()=>{tw(),i6(),jB=Z6(j3,"Promise"),WB=jB}),cF=t(()=>{tw(),i6(),YB=Z6(j3,"Set"),HB=YB}),hF=t(()=>{oF(),Qw(),lF(),cF(),CO(),b6(),F6(),VB="[object Map]",XB="[object Promise]",KB="[object Set]",ZB="[object WeakMap]",QB="[object DataView]",JB=B6(qB),tF=B6(Kw),eF=B6(WB),rF=B6(HB),iF=B6(TO),nF=x6,(qB&&nF(new qB(new ArrayBuffer(1)))!=QB||Kw&&nF(new Kw)!=VB||WB&&nF(WB.resolve())!=XB||HB&&nF(new HB)!=KB||TO&&nF(new TO)!=ZB)&&(nF=me(function(t){var e=x6(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?B6(t):"")switch(t){case JB:return QB;case tF:return VB;case eF:return XB;case rF:return KB;case iF:return ZB}return e},"getTag")),aF=nF});function uF(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&pF.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var dF,pF,gF,fF=t(()=>{dF=Object.prototype,pF=dF.hasOwnProperty,me(uF,"initCloneArray"),gF=uF});function mF(t,e){return e=e?mT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var yF,vF=t(()=>{yT(),me(mF,"cloneDataView"),yF=mF});function xF(t){var e=new t.constructor(t.source,bF.exec(t));return e.lastIndex=t.lastIndex,e}var bF,wF,kF=t(()=>{bF=/\w*$/,me(xF,"cloneRegExp"),wF=xF});function TF(t){return CF?Object(CF.call(t)):{}}var EF,CF,_F,SF=t(()=>{n6(),EF=Y3?Y3.prototype:void 0,CF=EF?EF.valueOf:void 0,me(TF,"cloneSymbol"),_F=TF});function AF(t,e,r){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return mT(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return yF(t,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 xT(t,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return wF(t);case"[object Set]":return new i;case"[object Symbol]":return _F(t)}}var LF,NF=t(()=>{yT(),vF(),kF(),SF(),bT(),me(AF,"initCloneByTag"),LF=AF});function IF(t){return GT(t)&&"[object Map]"==aF(t)}var RF,MF,DF,OF=t(()=>{hF(),UT(),me(IF,"baseIsMap"),RF=IF}),PF=t(()=>{OF(),P7(),B7(),MF=(MF=M7&&M7.isMap)?L7(MF):RF,DF=MF});function BF(t){return GT(t)&&"[object Set]"==aF(t)}var FF,$F,zF,GF=t(()=>{hF(),UT(),me(BF,"baseIsSet"),FF=BF}),UF=t(()=>{GF(),P7(),B7(),$F=($F=M7&&M7.isSet)?L7($F):FF,zF=$F});function qF(r,i,n,t,e,a){var s,o=i&jF,l=i&WF,c=i&YF;if(void 0===(s=n?e?n(r,t,e,a):n(r):s)){if(!k6(r))return r;if(t=KT(r)){if(s=gF(r),!o)return kT(r,s)}else{var h=aF(r),u=h==VF||h==XF;if(p7(r))return hT(r,o);if(h==KF||h==HF||u&&!e){if(s=l||u?{}:FT(r),!o)return l?RB(r,dB(s,r)):_B(r,cB(s,r))}else{if(!ZF[h])return e?r:{};s=LF(r,h,o)}}if(u=(a=a||new qk).get(r))return u;a.set(r,s),zF(r)?r.forEach(function(t){s.add(qF(t,i,n,t,r,a))}):DF(r)&&r.forEach(function(t,e){s.set(e,qF(t,i,n,e,r,a))});var d=t?void 0:(c?l?GB:FB:l?y8:rP)(r);NO(d||r,function(t,e){d&&(t=r[e=t]),W7(s,e,qF(t,i,n,e,r,a))})}return s}var jF,WF,YF,HF,VF,XF,KF,ZF,QF,JF=t(()=>{Yk(),IO(),Y7(),hB(),pB(),pT(),CT(),LB(),MB(),$B(),sF(),hF(),fF(),NF(),$T(),JT(),f7(),PF(),T6(),UF(),sP(),v8(),jF=1,WF=2,YF=4,VF="[object Function]",XF="[object GeneratorFunction]",KF="[object Object]",(ZF={})[HF="[object Arguments]"]=ZF["[object Array]"]=ZF["[object ArrayBuffer]"]=ZF["[object DataView]"]=ZF["[object Boolean]"]=ZF["[object Date]"]=ZF["[object Float32Array]"]=ZF["[object Float64Array]"]=ZF["[object Int8Array]"]=ZF["[object Int16Array]"]=ZF["[object Int32Array]"]=ZF["[object Map]"]=ZF["[object Number]"]=ZF[KF]=ZF["[object RegExp]"]=ZF["[object Set]"]=ZF["[object String]"]=ZF["[object Symbol]"]=ZF["[object Uint8Array]"]=ZF["[object Uint8ClampedArray]"]=ZF["[object Uint16Array]"]=ZF["[object Uint32Array]"]=!0,ZF["[object Error]"]=ZF[VF]=ZF["[object WeakMap]"]=!1,me(qF,"baseClone"),QF=qF});function t$(t){return QF(t,4)}var e$,r$=t(()=>{JF(),me(t$,"clone"),e$=t$});function i$(t){return QF(t,5)}var n$,a$=t(()=>{JF(),me(i$,"cloneDeep"),n$=i$});function s$(t){for(var e=-1,r=null==t?0:t.length,i=0,n=[];++e<r;){var a=t[e];a&&(n[i++]=a)}return n}var o$,l$=t(()=>{me(s$,"compact"),o$=s$});function c$(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var h$,u$=t(()=>{me(c$,"setCacheAdd"),h$=c$});function d$(t){return this.__data__.has(t)}var p$,g$=t(()=>{me(d$,"setCacheHas"),p$=d$});function f$(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new wk;++e<r;)this.add(t[e])}var m$,y$=t(()=>{kk(),u$(),g$(),me(f$,"SetCache"),f$.prototype.add=f$.prototype.push=h$,f$.prototype.has=p$,m$=f$});function v$(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}var x$,b$=t(()=>{me(v$,"arraySome"),x$=v$});function w$(t,e){return t.has(e)}var k$,T$=t(()=>{me(w$,"cacheHas"),k$=w$});function E$(t,e,r,i,n,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o<l))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var h=-1,u=!0,d=2&r?new m$:void 0;for(a.set(t,e),a.set(e,t);++h<o;){var p,g=t[h],f=e[h];if(void 0!==(p=i?s?i(f,g,h,e,t,a):i(g,f,h,t,e,a):p)){if(p)continue;u=!1;break}if(d){if(!x$(e,function(t,e){if(!k$(d,e)&&(g===t||n(g,t,r,i,a)))return d.push(e)})){u=!1;break}}else if(g!==f&&!n(g,f,r,i,a)){u=!1;break}}return a.delete(t),a.delete(e),u}var C$,_$=t(()=>{y$(),b$(),T$(),me(E$,"equalArrays"),C$=E$});function S$(t){var r=-1,i=Array(t.size);return t.forEach(function(t,e){i[++r]=[e,t]}),i}var A$,L$=t(()=>{me(S$,"mapToArray"),A$=S$});function N$(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var I$,R$=t(()=>{me(N$,"setToArray"),I$=N$});function M$(t,e,r,i,n,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new dT(t),new dT(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Aw(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=A$;case"[object Set]":var l,o=o||I$;return!!(t.size==e.size||1&i)&&((l=s.get(t))?l==e:(i|=2,s.set(t,e),l=C$(o(t),o(e),i,n,a,s),s.delete(t),l));case"[object Symbol]":if(O$)return O$.call(t)==O$.call(e)}return!1}var D$,O$,P$,B$=t(()=>{n6(),gT(),Lw(),_$(),L$(),R$(),D$=Y3?Y3.prototype:void 0,O$=D$?D$.valueOf:void 0,me(M$,"equalByTag"),P$=M$});function F$(t,e,r,i,n,a){var s=1&r,o=FB(t),l=o.length;if(l!=FB(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:z$.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c<l;){var f,m=t[h=o[c]],y=e[h];if(!(void 0===(f=i?s?i(y,m,h,e,t,a):i(m,y,h,t,e,a):f)?m===y||n(m,y,r,i,a):f)){p=!1;break}g=g||"constructor"==h}return p&&!g&&(u=t.constructor)!=(d=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof u&&u instanceof u&&"function"==typeof d&&d instanceof d)&&(p=!1),a.delete(t),a.delete(e),p}var $$,z$,G$,U$=t(()=>{$B(),$$=Object.prototype,z$=$$.hasOwnProperty,me(F$,"equalObjects"),G$=F$});function q$(t,e,r,i,n,a){var s=KT(t),o=KT(e),l=s?W$:aF(t),o=o?W$:aF(e),c=(l=l==j$?Y$:l)==Y$,h=(o=o==j$?Y$:o)==Y$;if((o=l==o)&&p7(t)){if(!p7(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new qk,s||O7(t)?C$(t,e,r,i,n,a):P$(t,e,l,r,i,n,a)):1&r||(s=c&&V$.call(t,"__wrapped__"),l=h&&V$.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new qk,G$(t,e,r,i,n,a)):n(s?t.value():t,l?e.value():e,r,i,a=a||new qk)}var j$,W$,Y$,H$,V$,X$,K$=t(()=>{Yk(),_$(),B$(),U$(),hF(),JT(),f7(),F7(),j$="[object Arguments]",W$="[object Array]",Y$="[object Object]",H$=Object.prototype,V$=H$.hasOwnProperty,me(q$,"baseIsEqualDeep"),X$=q$});function Z$(t,e,r,i,n){return t===e||(null==t||null==e||!GT(t)&&!GT(e)?t!=t&&e!=e:X$(t,e,r,i,Z$,n))}var Q$,J$=t(()=>{K$(),UT(),me(Z$,"baseIsEqual"),Q$=Z$});function tz(t,e,r,i){var n=r.length,a=n,s=!i;if(null==t)return!a;for(t=Object(t);n--;){var o=r[n];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<a;){var l=(o=r[n])[0],c=t[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in t))return!1}else{var u,d=new qk;if(!(void 0===(u=i?i(c,h,l,t,e,d):u)?Q$(h,c,3,i,d):u))return!1}}return!0}var ez,rz=t(()=>{Yk(),J$(),me(tz,"baseIsMatch"),ez=tz});function iz(t){return t==t&&!k6(t)}var nz,az=t(()=>{T6(),me(iz,"isStrictComparable"),nz=iz});function sz(t){for(var e=rP(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,nz(n)]}return e}var oz,lz=t(()=>{az(),sP(),me(sz,"getMatchData"),oz=sz});function cz(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var hz,uz=t(()=>{me(cz,"matchesStrictComparable"),hz=cz});function dz(e){var r=oz(e);return 1==r.length&&r[0][2]?hz(r[0][0],r[0][1]):function(t){return t===e||ez(t,e,r)}}var pz,gz=t(()=>{rz(),lz(),uz(),me(dz,"baseMatches"),pz=dz});function fz(t,e){return null!=t&&e in Object(t)}var mz,yz=t(()=>{me(fz,"baseHasIn"),mz=fz});function vz(t,e,r){for(var i=-1,n=(e=CP(e,t)).length,a=!1;++i<n;){var s=AP(e[i]);if(!(a=null!=t&&r(t,s)))break;t=t[s]}return a||++i!=n?a:!!(n=null==t?0:t.length)&&e7(n)&&e8(s,n)&&(KT(t)||VT(t))}var xz,bz=t(()=>{_P(),QT(),JT(),r8(),r7(),LP(),me(vz,"hasPath"),xz=vz});function wz(t,e){return null!=t&&xz(t,e,mz)}var kz,Tz=t(()=>{yz(),bz(),me(wz,"hasIn"),kz=wz});function Ez(r,i){return uP(r)&&nz(i)?hz(AP(r),i):function(t){var e=DP(t,r);return void 0===e&&e===i?kz(t,r):Q$(i,e,3)}}var Cz,_z=t(()=>{J$(),OP(),Tz(),dP(),az(),uz(),LP(),me(Ez,"baseMatchesProperty"),Cz=Ez});function Sz(e){return function(t){return t?.[e]}}var Az,Lz=t(()=>{me(Sz,"baseProperty"),Az=Sz});function Nz(e){return function(t){return IP(t,e)}}var Iz,Rz=t(()=>{RP(),me(Nz,"basePropertyDeep"),Iz=Nz});function Mz(t){return uP(t)?Az(AP(t)):Iz(t)}var Dz,Oz=t(()=>{Lz(),Rz(),dP(),LP(),me(Mz,"property"),Dz=Mz});function Pz(t){return"function"==typeof t?t:null==t?L8:"object"==typeof t?KT(t)?Cz(t[0],t[1]):pz(t):Dz(t)}var Bz,Fz=t(()=>{gz(),_z(),N8(),JT(),Oz(),me(Pz,"baseIteratee"),Bz=Pz});function $z(t,e,r,i){for(var n=-1,a=null==t?0:t.length;++n<a;){var s=t[n];e(i,s,r(s),t)}return i}var zz,Gz=t(()=>{me($z,"arrayAggregator"),zz=$z});function Uz(t,e){return t&&iT(t,e,rP)}var qz,jz=t(()=>{aT(),sP(),me(Uz,"baseForOwn"),qz=Uz});function Wz(a,s){return function(t,e){if(null!=t){if(!n7(t))return a(t,e);for(var r=t.length,i=s?r:-1,n=Object(t);(s?i--:++i<r)&&!1!==e(n[i],i,n););}return t}}var Yz,Hz,Vz,Xz=t(()=>{a7(),me(Wz,"createBaseEach"),Yz=Wz}),Kz=t(()=>{jz(),Xz(),Hz=Yz(qz),Vz=Hz});function Zz(t,i,n,a){return Vz(t,function(t,e,r){i(a,t,n(t),r)}),a}var Qz,Jz=t(()=>{Kz(),me(Zz,"baseAggregator"),Qz=Zz});function tG(n,a){return function(t,e){var r=KT(t)?zz:Qz,i=a?a():{};return r(t,n,Bz(e,2),i)}}var eG,rG,iG,nG,aG,sG,oG,lG=t(()=>{Gz(),Jz(),Fz(),JT(),me(tG,"createAggregator"),eG=tG}),cG=t(()=>{i6(),rG=me(function(){return j3.Date.now()},"now"),iG=rG}),hG=t(()=>{Q8(),Lw(),eE(),v8(),nG=Object.prototype,aG=nG.hasOwnProperty,sG=Z8(function(t,e){t=Object(t);var r=-1,i=e.length,n=2<i?e[2]:void 0;for(n&&tE(e[0],e[1],n)&&(i=1);++r<i;)for(var a=e[r],s=y8(a),o=-1,l=s.length;++o<l;){var c=s[o],h=t[c];(void 0===h||Aw(h,nG[c])&&!aG.call(t,c))&&(t[c]=a[c])}return t}),oG=sG});function uG(t,e,r){for(var i=-1,n=null==t?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}var dG,pG=t(()=>{me(uG,"arrayIncludesWith"),dG=uG});function gG(t,e,r,i){var n=-1,a=WO,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=HD(e,L7(r))),i?(a=dG,s=!1):200<=e.length&&(a=k$,s=!1,e=new m$(e));t:for(;++n<o;){var h=t[n],u=null==r?h:r(h),h=i||0!==h?h:0;if(s&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;l.push(h)}else a(e,u,i)||l.push(h)}}return l}var fG,mG,yG,vG=t(()=>{y$(),VO(),pG(),VD(),P7(),T$(),me(gG,"baseDifference"),fG=gG}),xG=t(()=>{vG(),WP(),Q8(),l7(),mG=Z8(function(t,e){return o7(t)?fG(t,jP(e,1,o7,!0)):[]}),yG=mG});function bG(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var wG,kG=t(()=>{me(bG,"last"),wG=bG});function TG(t,e,r){var i=null==t?0:t.length;return i?(e=r||void 0===e?1:wO(e),JP(t,e<0?0:e,i)):[]}var EG,CG=t(()=>{tB(),EO(),me(TG,"drop"),EG=TG});function _G(t,e,r){var i=null==t?0:t.length;return i?(e=r||void 0===e?1:wO(e),JP(t,0,(e=i-e)<0?0:e)):[]}var SG,AG=t(()=>{tB(),EO(),me(_G,"dropRight"),SG=_G});function LG(t){return"function"==typeof t?t:L8}var NG,IG=t(()=>{N8(),me(LG,"castFunction"),NG=LG});function RG(t,e){return(KT(t)?NO:Vz)(t,NG(e))}var v,MG=t(()=>{IO(),Kz(),IG(),JT(),me(RG,"forEach"),v=RG}),DG=t(()=>{MG()});function OG(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(!e(t[r],r,t))return!1;return!0}var PG,BG=t(()=>{me(OG,"arrayEvery"),PG=OG});function FG(t,i){var n=!0;return Vz(t,function(t,e,r){return n=!!i(t,e,r)}),n}var $G,zG=t(()=>{Kz(),me(FG,"baseEvery"),$G=FG});function GG(t,e,r){var i=KT(t)?PG:$G;return r&&tE(t,e,r)&&(e=void 0),i(t,Bz(e,3))}var UG,qG=t(()=>{BG(),zG(),Fz(),JT(),eE(),me(GG,"every"),UG=GG});function jG(t,i){var n=[];return Vz(t,function(t,e,r){i(t,e,r)&&n.push(t)}),n}var WG,YG=t(()=>{Kz(),me(jG,"baseFilter"),WG=jG});function HG(t,e){return(KT(t)?fB:WG)(t,Bz(e,3))}var VG,XG=t(()=>{mB(),YG(),Fz(),JT(),me(HG,"filter"),VG=HG});function KG(a){return function(t,e,r){var i,n=Object(t);return n7(t)||(i=Bz(e,3),t=rP(t),e=me(function(t){return i(n[t],t,n)},"predicate")),-1<(e=a(t,e,r))?n[i?t[e]:e]:void 0}}var ZG,QG=t(()=>{Fz(),a7(),sP(),me(KG,"createFind"),ZG=KG});function JG(t,e,r){var i=null==t?0:t.length;return i?((r=null==r?0:wO(r))<0&&(r=tU(i+r,0)),MO(t,Bz(e,3),r)):-1}var tU,eU,rU,iU,nU=t(()=>{DO(),Fz(),EO(),tU=Math.max,me(JG,"findIndex"),eU=JG}),aU=t(()=>{QG(),nU(),rU=ZG(eU),iU=rU});function sU(t){return t&&t.length?t[0]:void 0}var oU,lU=t(()=>{me(sU,"head"),oU=sU}),cU=t(()=>{lU()});function hU(t,i){var n=-1,a=n7(t)?Array(t.length):[];return Vz(t,function(t,e,r){a[++n]=i(t,e,r)}),a}var uU,dU=t(()=>{Kz(),a7(),me(hU,"baseMap"),uU=hU});function pU(t,e){return(KT(t)?HD:uU)(t,Bz(e,3))}var x,gU=t(()=>{VD(),Fz(),dU(),JT(),me(pU,"map"),x=pU});function fU(t,e){return jP(x(t,e),1)}var mU,yU=t(()=>{WP(),gU(),me(fU,"flatMap"),mU=fU});function vU(t,e){return null==t?t:iT(t,NG(e),y8)}var xU,bU=t(()=>{aT(),IG(),v8(),me(vU,"forIn"),xU=vU});function wU(t,e){return t&&qz(t,NG(e))}var kU,TU,EU,CU,_U=t(()=>{jz(),IG(),me(wU,"forOwn"),kU=wU}),SU=t(()=>{Kk(),lG(),EU=Object.prototype,TU=EU.hasOwnProperty,EU=eG(function(t,e,r){TU.call(t,r)?t[r].push(e):Xk(t,r,[e])}),CU=EU});function AU(t,e){return e<t}var LU,NU=t(()=>{me(AU,"baseGt"),LU=AU});function IU(t,e){return null!=t&&MU.call(t,e)}var RU,MU,DU,OU=t(()=>{RU=Object.prototype,MU=RU.hasOwnProperty,me(IU,"baseHas"),DU=IU});function PU(t,e){return null!=t&&xz(t,e,DU)}var BU,FU=t(()=>{OU(),bz(),me(PU,"has"),BU=PU});function $U(t){return"string"==typeof t||!KT(t)&&GT(t)&&"[object String]"==x6(t)}var zU,GU=t(()=>{b6(),JT(),UT(),me($U,"isString"),zU=$U});function UU(e,t){return HD(t,function(t){return e[t]})}var qU,jU=t(()=>{VD(),me(UU,"baseValues"),qU=UU});function WU(t){return null==t?[]:qU(t,rP(t))}var YU,HU=t(()=>{jU(),sP(),me(WU,"values"),YU=WU});function VU(t,e,r,i){return t=n7(t)?t:YU(t),r=r&&!i?wO(r):0,i=t.length,r<0&&(r=XU(i+r,0)),zU(t)?r<=i&&-1<t.indexOf(e,r):!!i&&-1<UO(t,e,r)}var XU,KU,ZU=t(()=>{qO(),a7(),GU(),EO(),HU(),XU=Math.max,me(VU,"includes"),KU=VU});function QU(t,e,r){var i=null==t?0:t.length;return i?((r=null==r?0:wO(r))<0&&(r=JU(i+r,0)),UO(t,e,r)):-1}var JU,tq,eq=t(()=>{qO(),EO(),JU=Math.max,me(QU,"indexOf"),tq=QU});function rq(t){if(null!=t){if(n7(t)&&(KT(t)||"string"==typeof t||"function"==typeof t.splice||p7(t)||O7(t)||VT(t)))return!t.length;var e,r=aF(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(OT(t))return!JO(t).length;for(e in t)if(nq.call(t,e))return!1}return!0}var iq,nq,aq,sq=t(()=>{tP(),hF(),QT(),JT(),a7(),f7(),PT(),F7(),iq=Object.prototype,nq=iq.hasOwnProperty,me(rq,"isEmpty"),aq=rq});function oq(t){return GT(t)&&"[object RegExp]"==x6(t)}var lq,cq,hq,uq=t(()=>{b6(),UT(),me(oq,"baseIsRegExp"),lq=oq}),dq=t(()=>{uq(),P7(),B7(),cq=(cq=M7&&M7.isRegExp)?L7(cq):lq,hq=cq});function pq(t){return void 0===t}var gq,fq=t(()=>{me(pq,"isUndefined"),gq=pq});function mq(t,e){return t<e}var yq,vq=t(()=>{me(mq,"baseLt"),yq=mq});function xq(t,i){var n={};return i=Bz(i,3),qz(t,function(t,e,r){Xk(n,e,i(t,e,r))}),n}var bq,wq=t(()=>{Kk(),jz(),Fz(),me(xq,"mapValues"),bq=xq});function kq(t,e,r){for(var i=-1,n=t.length;++i<n;){var a,s,o=t[i],l=e(o);null!=l&&(void 0===a?l==l&&!jD(l):r(l,a))&&(a=l,s=o)}return s}var Tq,Eq=t(()=>{WD(),me(kq,"baseExtremum"),Tq=kq});function Cq(t){return t&&t.length?Tq(t,L8,LU):void 0}var _q,Sq=t(()=>{Eq(),NU(),N8(),me(Cq,"max"),_q=Cq});function Aq(t){return t&&t.length?Tq(t,L8,yq):void 0}var Lq,Nq=t(()=>{Eq(),vq(),N8(),me(Aq,"min"),Lq=Aq});function Iq(t,e){return t&&t.length?Tq(t,Bz(e,2),yq):void 0}var Rq,Mq=t(()=>{Eq(),Fz(),vq(),me(Iq,"minBy"),Rq=Iq});function Dq(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Oq,Pq=t(()=>{me(Dq,"negate"),Oq=Dq});function Bq(t,e,r,i){if(k6(t))for(var n=-1,a=(e=CP(e,t)).length,s=a-1,o=t;null!=o&&++n<a;){var l,c=AP(e[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=k6(l)?l:e8(e[n+1])?[]:{}),W7(o,c,h),o=o[c]}return t}var Fq,$q=t(()=>{Y7(),_P(),r8(),T6(),LP(),me(Bq,"baseSet"),Fq=Bq});function zq(t,e,r){for(var i=-1,n=e.length,a={};++i<n;){var s=e[i],o=IP(t,s);r(o,s)&&Fq(a,CP(s,t),o)}return a}var Gq,Uq=t(()=>{RP(),$q(),_P(),me(zq,"basePickBy"),Gq=zq});function qq(t,r){var e;return null==t?{}:(e=HD(GB(t),function(t){return[t]}),r=Bz(r),Gq(t,e,function(t,e){return r(t,e[0])}))}var jq,Wq=t(()=>{VD(),Fz(),Uq(),sF(),me(qq,"pickBy"),jq=qq});function Yq(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Hq,Vq=t(()=>{me(Yq,"baseSortBy"),Hq=Yq});function Xq(t,e){if(t!==e){var r=void 0!==t,i=null===t,n=t==t,a=jD(t),s=void 0!==e,o=null===e,l=e==e,c=jD(e);if(!o&&!c&&!a&&e<t||a&&s&&l&&!o&&!c||i&&s&&l||!r&&l||!n)return 1;if(!i&&!a&&!c&&t<e||c&&r&&n&&!i&&!a||o&&r&&n||!s&&n||!l)return-1}return 0}var Kq,Zq=t(()=>{WD(),me(Xq,"compareAscending"),Kq=Xq});function Qq(t,e,r){for(var i=-1,n=t.criteria,a=e.criteria,s=n.length,o=r.length;++i<s;){var l=Kq(n[i],a[i]);if(l)return o<=i?l:l*("desc"==r[i]?-1:1)}return t.index-e.index}var Jq,tj=t(()=>{Zq(),me(Qq,"compareMultiple"),Jq=Qq});function ej(t,i,r){i=i.length?HD(i,function(e){return KT(e)?function(t){return IP(t,1===e.length?e[0]:e)}:e}):[L8];var n=-1,t=(i=HD(i,L7(Bz)),uU(t,function(e,t,r){return{criteria:HD(i,function(t){return t(e)}),index:++n,value:e}}));return Hq(t,function(t,e){return Jq(t,e,r)})}var rj,ij,nj,aj=t(()=>{VD(),RP(),Fz(),dU(),Vq(),P7(),tj(),N8(),JT(),me(ej,"baseOrderBy"),rj=ej}),sj=t(()=>{Lz(),ij=Az("length"),nj=ij});function oj(t){for(var e=fj.lastIndex=0;fj.test(t);)++e;return e}var lj,cj,hj,uj,dj,pj,gj,fj,mj,yj=t(()=>{lj="["+(uj="\\ud800-\\udfff")+"]",cj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",hj="\\ud83c[\\udffb-\\udfff]",gj="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",pj="[\\ufe0e\\ufe0f]?",dj="(?:\\u200d(?:"+[uj="[^"+uj+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+pj+gj+")*",pj=pj+gj+dj,gj="(?:"+[uj+cj+"?",cj,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",lj].join("|")+")",fj=RegExp(hj+"(?="+hj+")|"+gj+pj,"g"),me(oj,"unicodeSize"),mj=oj});function vj(t){return(iB(t)?mj:nj)(t)}var xj,bj=t(()=>{sj(),nB(),yj(),me(vj,"stringSize"),xj=vj});function wj(r,t){return Gq(r,t,function(t,e){return kz(r,e)})}var kj,Tj,Ej,Cj=t(()=>{Uq(),Tz(),me(wj,"basePick"),kj=wj}),_j=t(()=>{Cj(),ZP(),Tj=KP(function(t,e){return null==t?{}:kj(t,e)}),Ej=Tj});function Sj(t,e,r,i){for(var n=-1,a=Lj(Aj((e-t)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=t,t+=r;return s}var Aj,Lj,Nj,Ij=t(()=>{Aj=Math.ceil,Lj=Math.max,me(Sj,"baseRange"),Nj=Sj});function Rj(i){return function(t,e,r){return r&&"number"!=typeof r&&tE(t,e,r)&&(e=r=void 0),t=vO(t),void 0===e?(e=t,t=0):e=vO(e),r=void 0===r?t<e?1:-1:vO(r),Nj(t,e,r,i)}}var Mj,Dj,Oj,Pj=t(()=>{Ij(),eE(),xO(),me(Rj,"createRange"),Mj=Rj}),Bj=t(()=>{Pj(),Dj=Mj(),Oj=Dj});function Fj(t,i,n,a,e){return e(t,function(t,e,r){n=a?(a=!1,t):i(n,t,e,r)}),n}var $j,zj=t(()=>{me(Fj,"baseReduce"),$j=Fj});function Gj(t,e,r){var i=KT(t)?sB:$j,n=arguments.length<3;return i(t,Bz(e,4),r,n,Vz)}var Uj,qj=t(()=>{oB(),Kz(),Fz(),zj(),JT(),me(Gj,"reduce"),Uj=Gj});function jj(t,e){return(KT(t)?fB:WG)(t,Oq(Bz(e,3)))}var Wj,Yj=t(()=>{mB(),YG(),Fz(),JT(),Pq(),me(jj,"reject"),Wj=jj});function Hj(t){var e;return null==t?0:n7(t)?zU(t)?xj(t):t.length:"[object Map]"==(e=aF(t))||"[object Set]"==e?t.size:JO(t).length}var Vj,Xj=t(()=>{tP(),hF(),a7(),GU(),bj(),me(Hj,"size"),Vj=Hj});function Kj(t,i){var n;return Vz(t,function(t,e,r){return!(n=i(t,e,r))}),!!n}var Zj,Qj=t(()=>{Kz(),me(Kj,"baseSome"),Zj=Kj});function Jj(t,e,r){var i=KT(t)?x$:Zj;return r&&tE(t,e,r)&&(e=void 0),i(t,Bz(e,3))}var tW,eW,rW,iW,nW,aW=t(()=>{b$(),Fz(),Qj(),JT(),eE(),me(Jj,"some"),tW=Jj}),sW=t(()=>{WP(),aj(),Q8(),eE(),eW=Z8(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&tE(t,e[0],e[1])?e=[]:2<r&&tE(e[0],e[1],e[2])&&(e=[e[0]]),rj(t,jP(e,1),[]))}),rW=eW}),oW=t(()=>{cF(),AO(),R$(),iW=HB&&1/I$(new HB([,-0]))[1]==1/0?function(t){return new HB(t)}:SO,nW=iW});function lW(t,e,r){var i=-1,n=WO,a=t.length,s=!0,o=[],l=o;if(r)s=!1,n=dG;else if(200<=a){var c=e?null:nW(t);if(c)return I$(c);s=!1,n=k$,l=new m$}else l=e?[]:o;t:for(;++i<a;){var h=t[i],u=e?e(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),o.push(h)}else n(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var cW,hW,uW,dW=t(()=>{y$(),VO(),pG(),T$(),oW(),R$(),me(lW,"baseUniq"),cW=lW}),pW=t(()=>{WP(),Q8(),dW(),l7(),hW=Z8(function(t){return cW(jP(t,1,o7,!0))}),uW=hW});function gW(t){return t&&t.length?cW(t):[]}var fW,mW=t(()=>{dW(),me(gW,"uniq"),fW=gW});function yW(t,e){return t&&t.length?cW(t,Bz(e,2)):[]}var vW,xW=t(()=>{Fz(),dW(),me(yW,"uniqBy"),vW=yW});function bW(t){var e=++wW;return kP(t)+e}var wW,kW,TW=t(()=>{TP(),wW=0,me(bW,"uniqueId"),kW=bW});function EW(t,e,r){for(var i=-1,n=t.length,a=e.length,s={};++i<n;){var o=i<a?e[i]:void 0;r(s,t[i],o)}return s}var CW,_W=t(()=>{me(EW,"baseZipObject"),CW=EW});function SW(t,e){return CW(t||[],e||[],W7)}var AW,LW=t(()=>{Y7(),_W(),me(SW,"zipObject"),AW=SW}),NW=t(()=>{oP(),r$(),a$(),l$(),G8(),hG(),xG(),CG(),AG(),DG(),qG(),XG(),aU(),cU(),yU(),VP(),MG(),bU(),_U(),SU(),FU(),N8(),ZU(),eq(),JT(),sq(),A6(),T6(),dq(),GU(),fq(),sP(),kG(),gU(),wq(),Sq(),oE(),Nq(),Mq(),AO(),cG(),_j(),Wq(),Bj(),qj(),Yj(),Xj(),aW(),sW(),pW(),mW(),TW(),HU(),LW()});function IW(t,e){t[e]?t[e]++:t[e]=1}function RW(t,e){--t[e]||delete t[e]}function MW(t,e,r,i){return e=""+e,r=""+r,!t&&r<e&&(t=e,e=r,r=t),e+""+r+""+(gq(i)?"\0":i)}function DW(t,e,r,i){return e=""+e,r=""+r,!t&&r<e&&(t=e,e=r,r=t),t={v:e,w:r},i&&(t.name=i),t}function OW(t,e){return MW(t,e.v,e.w,e.name)}var PW,BW,FW=t(()=>{NW(),PW="\0",(BW=class{static{me(this,"Graph")}constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=$8(void 0),this._defaultEdgeLabelFn=$8(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[PW]={}),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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return C6(t)||(t=$8(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return rP(this._nodes)}sources(){var e=this;return VG(this.nodes(),function(t){return aq(e._in[t])})}sinks(){var e=this;return VG(this.nodes(),function(t){return aq(e._out[t])})}setNodes(t,e){var r=arguments,i=this;return v(t,function(t){1<r.length?i.setNode(t,e):i.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?1<arguments.length&&(this._nodes[t]=e):(this._nodes[t]=1<arguments.length?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=PW,this._children[t]={},this._children[PW][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount),this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){var e;return Object.prototype.hasOwnProperty.call(this._nodes,t)&&(e=me(t=>this.removeEdge(this._edgeObjs[t]),"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),v(rP(this._in[t]),e),delete this._in[t],delete this._preds[t],v(rP(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount),this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(gq(e))e=PW;else{for(var r=e+="";!gq(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound&&(t=this._parent[t])!==PW)return t}children(t){var e;return gq(t)&&(t=PW),this._isCompound?(e=this._children[t])?rP(e):void 0:t===PW?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return rP(t)}successors(t){if(t=this._sucs[t])return rP(t)}neighbors(t){var e=this.predecessors(t);if(e)return uW(e,this.successors(t))}isLeaf(t){return 0===(t=this.isDirected()?this.successors(t):this.neighbors(t)).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(t,e){r(e)&&i.setNode(e,t)}),v(this._edgeObjs,function(t){i.hasNode(t.v)&&i.hasNode(t.w)&&i.setEdge(t,n.edge(t))}),{});function s(t){var e=n.parent(t);return void 0===e||i.hasNode(e)?a[t]=e:e in a?a[e]:s(e)}return me(s,"findParent"),this._isCompound&&v(i.nodes(),function(t){i.setParent(t,s(t))}),i}setDefaultEdgeLabel(t){return C6(t)||(t=$8(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return YU(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return Uj(t,function(t,e){return 1<n.length?i.setEdge(t,e,r):i.setEdge(t,e),e}),this}setEdge(){var t,e,r=!1,i=("object"==typeof(i=arguments[0])&&null!==i&&"v"in i?(n=i.v,a=i.w,t=i.name,2===arguments.length&&(e=arguments[1],r=!0)):(n=i,a=arguments[1],t=arguments[3],2<arguments.length&&(e=arguments[2],r=!0)),n=""+n,a=""+a,gq(t)||(t=""+t),MW(this._isDirected,n,a,t));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i))r&&(this._edgeLabels[i]=e);else{if(!gq(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(a),this._edgeLabels[i]=r?e:this._defaultEdgeLabelFn(n,a,t);var n=(r=DW(this._isDirected,n,a,t)).v,a=r.w;Object.freeze(r),this._edgeObjs[i]=r,IW(this._preds[a],n),IW(this._sucs[n],a),this._in[a][i]=r,this._out[n][i]=r,this._edgeCount++}return this}edge(t,e,r){return t=1===arguments.length?OW(this._isDirected,t):MW(this._isDirected,t,e,r),this._edgeLabels[t]}hasEdge(t,e,r){return t=1===arguments.length?OW(this._isDirected,t):MW(this._isDirected,t,e,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,t)}removeEdge(t,e,r){var r=1===arguments.length?OW(this._isDirected,arguments[0]):MW(this._isDirected,t,e,r),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],RW(this._preds[e],t),RW(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){if(t=this._in[t])return t=YU(t),e?VG(t,function(t){return t.v===e}):t}outEdges(t,e){if(t=this._out[t])return t=YU(t),e?VG(t,function(t){return t.w===e}):t}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}).prototype._nodeCount=0,BW.prototype._edgeCount=0,me(IW,"incrementOrInitEntry"),me(RW,"decrementOrRemoveEntry"),me(MW,"edgeArgsToId"),me(DW,"edgeArgsToObj"),me(OW,"edgeObjToId")}),$W=t(()=>{FW()});function zW(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function GW(t,e){if("_next"!==t&&"_prev"!==t)return e}var UW,qW=t(()=>{UW=class{static{me(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return zW(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&zW(t),t._next=e._next,e._next._prev=t,(e._next=t)._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,GW)),r=r._prev;return"["+t.join(", ")+"]"}},me(zW,"unlink"),me(GW,"filterOutLinks")});function jW(e,t){return e.nodeCount()<=1?[]:(t=WW((t=HW(e,t||XW)).graph,t.buckets,t.zeroIdx),HP(x(t,function(t){return e.outEdges(t.v,t.w)})))}function WW(t,e,r){for(var i,n=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;i=s.dequeue();)YW(t,e,r,i);for(;i=a.dequeue();)YW(t,e,r,i);if(t.nodeCount())for(var o=e.length-2;0<o;--o)if(i=e[o].dequeue()){n=n.concat(YW(t,e,r,i,!0));break}}return n}function YW(i,n,a,t,s){var o=s?[]:void 0;return v(i.inEdges(t.v),function(t){var e=i.edge(t),r=i.node(t.v);s&&o.push({v:t.v,w:t.w}),r.out-=e,VW(n,a,r)}),v(i.outEdges(t.v),function(t){var e=i.edge(t),t=t.w;(t=i.node(t)).in-=e,VW(n,a,t)}),i.removeNode(t.v),o}function HW(t,i){var n=new BW,a=0,s=0,e=(v(t.nodes(),function(t){n.setNode(t,{v:t,in:0,out:0})}),v(t.edges(),function(t){var e=n.edge(t.v,t.w)||0,r=i(t);n.setEdge(t.v,t.w,e+r),s=Math.max(s,n.node(t.v).out+=r),a=Math.max(a,n.node(t.w).in+=r)}),Oj(s+a+3).map(function(){return new UW})),r=a+1;return v(n.nodes(),function(t){VW(e,r,n.node(t))}),{graph:n,buckets:e,zeroIdx:r}}function VW(t,e,r){(r.out?r.in?t[r.out-r.in+e]:t[t.length-1]:t[0]).enqueue(r)}var XW,KW=t(()=>{NW(),$W(),qW(),XW=$8(1),me(jW,"greedyFAS"),me(WW,"doGreedyFAS"),me(YW,"removeNode"),me(HW,"buildState"),me(VW,"assignBucket")});function ZW(r){var t="greedy"===r.graph().acyclicer?jW(r,e(r)):QW(r);function e(e){return function(t){return e.edge(t).weight}}v(t,function(t){var e=r.edge(t);r.removeEdge(t),e.forwardName=t.name,e.reversed=!0,r.setEdge(t.w,t.v,e,kW("rev"))}),me(e,"weightFn")}function QW(e){var r=[],i={},n={};function a(t){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,i[t]=!0,v(e.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(i,t.w)?r.push(t):a(t.w)}),delete i[t])}return me(a,"dfs"),v(e.nodes(),a),r}function JW(i){v(i.edges(),function(t){var e,r=i.edge(t);r.reversed&&(i.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,i.setEdge(t.w,t.v,r,e))})}var tY=t(()=>{NW(),KW(),me(ZW,"run"),me(QW,"dfsFAS"),me(JW,"undo")});function eY(t,e,r,i){for(var n;n=kW(i),t.hasNode(n););return r.dummy=e,t.setNode(n,r),n}function rY(i){var n=(new BW).setGraph(i.graph());return v(i.nodes(),function(t){n.setNode(t,i.node(t))}),v(i.edges(),function(t){var e=n.edge(t.v,t.w)||{weight:0,minlen:1},r=i.edge(t);n.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),n}function iY(e){var r=new BW({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(t){e.children(t).length||r.setNode(t,e.node(t))}),v(e.edges(),function(t){r.setEdge(t,e.edge(t))}),r}function nY(t,e){var r,i=t.x,n=t.y,a=e.x-i,e=e.y-n,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:i+r,y:n+t};throw new Error("Not possible to find intersection inside of the rectangle")}function aY(i){var n=x(Oj(cY(i)+1),function(){return[]});return v(i.nodes(),function(t){var e=i.node(t),r=e.rank;gq(r)||(n[r][e.order]=t)}),n}function sY(e){var r=Lq(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),BU(t,"rank")&&(t.rank-=r)})}function oY(r){var i=Lq(x(r.nodes(),function(t){return r.node(t).rank})),n=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-i;n[e]||(n[e]=[]),n[e].push(t)}),0),s=r.graph().nodeRankFactor;v(n,function(t,e){gq(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function lY(t,e,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),eY(t,"border",n,e)}function cY(e){return _q(x(e.nodes(),function(t){if(t=e.node(t).rank,!gq(t))return t}))}function hY(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function uY(t,e){var r=iG();try{return e()}finally{console.log(t+" time: "+(iG()-r)+"ms")}}function dY(t,e){return e()}var pY=t(()=>{NW(),$W(),me(eY,"addDummyNode"),me(rY,"simplify"),me(iY,"asNonCompoundGraph"),me(nY,"intersectRect"),me(aY,"buildLayerMatrix"),me(sY,"normalizeRanks"),me(oY,"removeEmptyRanks"),me(lY,"addBorderNode"),me(cY,"maxRank"),me(hY,"partition"),me(uY,"time"),me(dY,"notime")});function gY(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,n=r.maxRank+1;i<n;++i)fY(a,"borderLeft","_bl",t,r,i),fY(a,"borderRight","_br",t,r,i)}}me(s,"dfs"),v(a.children(),s)}function fY(t,e,r,i,n,a){var s=n[e][a-1],r=eY(t,"border",{width:0,height:0,rank:a,borderType:e},r);n[e][a]=r,t.setParent(r,i),s&&t.setEdge(s,r,{weight:1})}var mY=t(()=>{NW(),pY(),me(gY,"addBorderSegments"),me(fY,"addBorderNode")});function yY(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||xY(t)}function vY(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||wY(t),"lr"!==e&&"rl"!==e||(TY(t),xY(t))}function xY(e){v(e.nodes(),function(t){bY(e.node(t))}),v(e.edges(),function(t){bY(e.edge(t))})}function bY(t){var e=t.width;t.width=t.height,t.height=e}function wY(e){v(e.nodes(),function(t){kY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,kY),Object.prototype.hasOwnProperty.call(t,"y")&&kY(t)})}function kY(t){t.y=-t.y}function TY(e){v(e.nodes(),function(t){EY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,EY),Object.prototype.hasOwnProperty.call(t,"x")&&EY(t)})}function EY(t){var e=t.x;t.x=t.y,t.y=e}var CY=t(()=>{NW(),me(yY,"adjust"),me(vY,"undo"),me(xY,"swapWidthHeight"),me(bY,"swapWidthHeightOne"),me(wY,"reverseY"),me(kY,"reverseYOne"),me(TY,"swapXY"),me(EY,"swapXYOne")});function _Y(e){e.graph().dummyChains=[],v(e.edges(),function(t){SY(e,t)})}function SY(t,e){var r=e.v,i=t.node(r).rank,n=e.w,a=t.node(n).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==i+1){t.removeEdge(e);var c,h=void 0,u=0;for(++i;i<a;++u,++i)o.points=[],c=eY(t,"edge",h={width:0,height:0,edgeLabel:o,edgeObj:e,rank:i},"_d"),i===l&&(h.width=o.width,h.height=o.height,h.dummy="edge-label",h.labelpos=o.labelpos),t.setEdge(r,c,{weight:o.weight},s),0===u&&t.graph().dummyChains.push(c),r=c;t.setEdge(r,n,{weight:o.weight},s)}}function AY(n){v(n.graph().dummyChains,function(t){var e,r=n.node(t),i=r.edgeLabel;for(n.setEdge(r.edgeObj,i);r.dummy;)e=n.successors(t)[0],n.removeNode(t),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(t=e)})}var LY=t(()=>{NW(),pY(),me(_Y,"run"),me(SY,"normalizeEdge"),me(AY,"undo")});function NY(r){var i={};function n(t){var e=r.node(t);return Object.prototype.hasOwnProperty.call(i,t)?e.rank:(i[t]=!0,(t=Lq(x(r.outEdges(t),function(t){return n(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}me(n,"dfs"),v(r.sources(),n)}function IY(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var RY=t(()=>{NW(),me(NY,"longestPath"),me(IY,"slack")});function MY(t){var e,r=new BW({directed:!1}),i=t.nodes()[0],n=t.nodeCount();for(r.setNode(i,{});DY(r,t)<n;)e=OY(r,t),e=r.hasNode(e.v)?IY(t,e):-IY(t,e),PY(r,t,e);return r}function DY(i,n){function a(r){v(n.nodeEdges(r),function(t){var e=t.v,e=r===e?t.w:e;i.hasNode(e)||IY(n,t)||(i.setNode(e,{}),i.setEdge(r,e,{}),a(e))})}return me(a,"dfs"),v(i.nodes(),a),i.nodeCount()}function OY(e,r){return Rq(r.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return IY(r,t)})}function PY(t,e,r){v(t.nodes(),function(t){e.node(t).rank+=r})}var BY=t(()=>{NW(),$W(),RY(),me(MY,"feasibleTree"),me(DY,"tightTree"),me(OY,"findMinSlackEdge"),me(PY,"shiftRanks")}),FY=t(()=>{}),$Y=t(()=>{}),zY=t(()=>{NW(),$Y(),$8(1)}),GY=t(()=>{zY()}),UY=t(()=>{}),qY=t(()=>{UY()}),jY=t(()=>{NW(),$8(1)});function WY(e){var r={},i={},n=[];function a(t){if(Object.prototype.hasOwnProperty.call(i,t))throw new YY;Object.prototype.hasOwnProperty.call(r,t)||(i[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete i[t],n.push(t))}if(me(a,"visit"),v(e.sinks(),a),Vj(r)!==e.nodeCount())throw new YY;return n}function YY(){}var HY=t(()=>{NW(),WY.CycleException=YY,me(WY,"topsort"),me(YY,"CycleException"),YY.prototype=new Error}),VY=t(()=>{HY()});function XY(e,t,r){KT(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);KY(e,t,"post"===r,a,i,n)}),n}function KY(e,t,r,i,n,a){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,r||a.push(t),v(n(t),function(t){KY(e,t,r,i,n,a)}),r&&a.push(t))}var ZY=t(()=>{NW(),me(XY,"dfs"),me(KY,"doDfs")});function QY(t,e){return XY(t,e,"post")}var JY=t(()=>{ZY(),me(QY,"postorder")});function tH(t,e){return XY(t,e,"pre")}var eH=t(()=>{ZY(),me(tH,"preorder")}),rH=t(()=>{$Y(),FW()}),iH=t(()=>{FY(),zY(),GY(),qY(),jY(),VY(),JY(),eH(),rH(),UY(),HY()});function nH(t){NY(t=rY(t));var e,r=MY(t);for(lH(r),aH(r,t);e=hH(r);)dH(r,t,e,uH(r,t,e))}function aH(e,r){var t=(t=QY(e,e.nodes())).slice(0,t.length-1);v(t,function(t){sH(e,r,t)})}function sH(t,e,r){var i=t.node(r).parent;t.edge(r,i).cutvalue=oH(t,e,r)}function oH(i,n,a){var s=i.node(a).parent,o=!0,t=n.edge(a,s),l=0;return t||(o=!1,t=n.edge(s,a)),l=t.weight,v(n.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=n.edge(t).weight,l+=e?t:-t,gH(i,a,r))&&(t=i.edge(a,r).cutvalue,l+=e?-t:t)}),l}function lH(t,e){arguments.length<2&&(e=t.nodes()[0]),cH(t,{},1,e)}function cH(e,r,i,n,t){var a=i,s=e.node(n);return r[n]=!0,v(e.neighbors(n),function(t){Object.prototype.hasOwnProperty.call(r,t)||(i=cH(e,r,i,t,n))}),s.low=a,s.lim=i++,t?s.parent=t:delete s.parent,i}function hH(e){return iU(e.edges(),function(t){return e.edge(t).cutvalue<0})}function uH(e,r,t){var i=t.v,n=t.w,t=(r.hasEdge(i,n)||(i=t.w,n=t.v),e.node(i)),i=e.node(n),a=t,s=!1,n=(t.lim>i.lim&&(a=i,s=!0),VG(r.edges(),function(t){return s===fH(0,e.node(t.v),a)&&s!==fH(0,e.node(t.w),a)}));return Rq(n,function(t){return IY(r,t)})}function dH(t,e,r,i){var n=r.v;t.removeEdge(n,r.w),t.setEdge(i.v,i.w,{}),lH(t),aH(t,e),pH(t,e)}function pH(n,a){var t=iU(n.nodes(),function(t){return!a.node(t).parent}),t=(t=tH(n,t)).slice(1);v(t,function(t){var e=n.node(t).parent,r=a.edge(t,e),i=!1;r||(r=a.edge(e,t),i=!0),a.node(t).rank=a.node(e).rank+(i?r.minlen:-r.minlen)})}function gH(t,e,r){return t.hasEdge(e,r)}function fH(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var mH=t(()=>{NW(),iH(),pY(),BY(),RY(),nH.initLowLimValues=lH,nH.initCutValues=aH,nH.calcCutValue=oH,nH.leaveEdge=hH,nH.enterEdge=uH,nH.exchangeEdges=dH,me(nH,"networkSimplex"),me(aH,"initCutValues"),me(sH,"assignCutValue"),me(oH,"calcCutValue"),me(lH,"initLowLimValues"),me(cH,"dfsAssignLowLim"),me(hH,"leaveEdge"),me(uH,"enterEdge"),me(dH,"exchangeEdges"),me(pH,"updateRanks"),me(gH,"isTreeEdge"),me(fH,"isDescendant")});function yH(t){switch(t.graph().ranker){case"network-simplex":xH(t);break;case"tight-tree":vH(t);break;case"longest-path":bH(t);break;default:xH(t)}}function vH(t){NY(t),MY(t)}function xH(t){nH(t)}var bH,wH=t(()=>{BY(),mH(),RY(),me(yH,"rank"),bH=NY,me(vH,"tightTreeRanker"),me(xH,"networkSimplexRanker")});function kH(e){var r=eY(e,"root",{},"_root"),i=EH(e),n=_q(YU(i))-1,a=2*n+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),CH(e)+1);v(e.children(),function(t){TH(e,r,a,s,n,i,t)}),e.graph().nodeRankFactor=a}function TH(n,a,s,o,l,c,h){var u,d,t,e=n.children(h);e.length?(u=lY(n,"_bt"),d=lY(n,"_bb"),t=n.node(h),n.setParent(u,h),t.borderTop=u,n.setParent(d,h),t.borderBottom=d,v(e,function(t){TH(n,a,s,o,l,c,t);var e=n.node(t),r=e.borderTop||t,i=r!==(t=e.borderBottom||t)?1:l-c[h]+1;n.setEdge(u,r,{weight:e=e.borderTop?o:2*o,minlen:i,nestingEdge:!0}),n.setEdge(t,d,{weight:e,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 EH(i){var n={};function a(t,e){var r=i.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),n[t]=e}return me(a,"dfs"),v(i.children(),function(t){a(t,1)}),n}function CH(r){return Uj(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function _H(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var SH=t(()=>{NW(),pY(),me(kH,"run"),me(TH,"dfs"),me(EH,"treeDepths"),me(CH,"sumWeights"),me(_H,"cleanup")});function AH(n,a,t){var s,o={};v(t,function(t){for(var e,r,i=n.parent(t);i;){if((e=n.parent(i))?(r=o[e],o[e]=i):(r=s,s=i),r&&r!==i)return void a.setEdge(r,i);i=e}})}var LH=t(()=>{NW(),me(AH,"addSubgraphConstraints")});function NH(n,r,a){var s=IH(n),o=new BW({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return n.node(t)});return v(n.nodes(),function(i){var t=n.node(i),e=n.parent(i);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(o.setNode(i),o.setParent(i,e||s),v(n[a](i),function(t){var e=t.v===i?t.w:t.v,r=o.edge(e,i),r=gq(r)?0:r.weight;o.setEdge(e,i,{weight:n.edge(t).weight+r})}),Object.prototype.hasOwnProperty.call(t,"minRank"))&&o.setNode(i,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function IH(t){for(var e;t.hasNode(e=kW("_root")););return e}var RH=t(()=>{NW(),$W(),me(NH,"buildLayerGraph"),me(IH,"createRootNode")});function MH(t,e){for(var r=0,i=1;i<e.length;++i)r+=DH(t,e[i-1],e[i]);return r}function DH(e,t,r){for(var i=AW(r,x(r,function(t,e){return e})),t=HP(x(t,function(t){return rW(x(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),"pos")})),n=1;n<r.length;)n<<=1;var a=2*n-1,s=(--n,x(new Array(a),function(){return 0})),o=0;return v(t.forEach(function(t){var e=t.pos+n;s[e]+=t.weight;for(var r=0;0<e;)e%2&&(r+=s[e+1]),s[e=e-1>>1]+=t.weight;o+=t.weight*r})),o}var OH=t(()=>{NW(),me(MH,"crossCount"),me(DH,"twoLayerCrossCount")});function PH(r){var i={},t=VG(r.nodes(),function(t){return!r.children(t).length}),e=_q(x(t,function(t){return r.node(t).rank})),n=x(Oj(e+1),function(){return[]});function a(t){var e;BU(i,t)||(i[t]=!0,e=r.node(t),n[e.rank].push(t),v(r.successors(t),a))}return me(a,"dfs"),e=rW(t,function(t){return r.node(t).rank}),v(e,a),n}var BH=t(()=>{NW(),me(PH,"initOrder")});function FH(i,t){return x(t,function(t){var e=i.inEdges(t);return e.length?{v:t,barycenter:(e=Uj(e,function(t,e){var r=i.edge(e),e=i.node(e.v);return{sum:t.sum+r.weight*e.order,weight:t.weight+r.weight}},{sum:0,weight:0})).sum/e.weight,weight:e.weight}:{v:t}})}var $H=t(()=>{NW(),me(FH,"barycenter")});function zH(t,e){var i={};return v(t,function(t,e){e=i[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},gq(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=i[t.v],r=i[t.w];gq(e)||gq(r)||(r.indegree++,e.out.push(i[t.w]))}),GH(VG(i,function(t){return!t.indegree}))}function GH(r){var t=[];function e(e){return function(t){t.merged||(gq(t.barycenter)||gq(e.barycenter)||t.barycenter>=e.barycenter)&&UH(e,t)}}function i(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(me(e,"handleIn"),me(i,"handleOut");r.length;){var n=r.pop();t.push(n),v(n.in.reverse(),e(n)),v(n.out,i(n))}return x(VG(t,function(t){return!t.merged}),function(t){return Ej(t,["vs","i","barycenter","weight"])})}function UH(t,e){var r=0,i=0;t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}var qH=t(()=>{NW(),me(zH,"resolveConflicts"),me(GH,"doResolveConflicts"),me(UH,"mergeEntries")});function jH(t,e){var r=(t=hY(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})).lhs,i=rW(t.rhs,function(t){return-t.i}),n=[],a=0,s=0,o=0,t=(r.sort(YH(!!e)),o=WH(n,i,o),v(r,function(t){o+=t.vs.length,n.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=WH(n,i,o)}),{vs:HP(n)});return s&&(t.barycenter=a/s,t.weight=s),t}function WH(t,e,r){for(var i;e.length&&(i=wG(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function YH(r){return function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:r?e.i-t.i:t.i-e.i}}var HH=t(()=>{NW(),pY(),me(jH,"sort"),me(WH,"consumeUnsortable"),me(YH,"compareWithBias")});function VH(r,t,i,n){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=VG(a,function(t){return t!==s&&t!==o})),FH(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=VH(r,t.v,i,n),l[t.v]=e,Object.prototype.hasOwnProperty.call(e,"barycenter"))&&KH(t,e)}),XH(a=zH(t,i),l),t=jH(a,n),s&&(t.vs=HP([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function XH(t,e){v(t,function(t){t.vs=HP(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function KH(t,e){gq(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var ZH=t(()=>{NW(),$H(),qH(),HH(),me(VH,"sortSubgraph"),me(XH,"expandSubgraphs"),me(KH,"mergeBarycenters")});function QH(t){var e=cY(t),r=JH(t,Oj(1,e+1),"inEdges"),i=JH(t,Oj(e-1,-1,-1),"outEdges");eV(t,PH(t));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){tV(s%2?r:i,2<=s%4);var l,c=MH(t,l=aY(t));c<a&&(o=0,n=n$(l),a=c)}eV(t,n)}function JH(e,t,r){return x(t,function(t){return NH(e,t,r)})}function tV(t,e){var i=new BW;v(t,function(r){var t=r.graph().root,t=VH(r,t,i,e);v(t.vs,function(t,e){r.node(t).order=e}),AH(r,i,t.vs)})}function eV(r,t){v(t,function(t){v(t,function(t,e){r.node(t).order=e})})}var rV=t(()=>{NW(),$W(),pY(),LH(),RH(),OH(),BH(),ZH(),me(QH,"order"),me(JH,"buildLayerGraphs"),me(tV,"sweepLayerGraphs"),me(eV,"assignOrder")});function iV(c){var h=aV(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,i=nV(c,h,r.v,r.w),n=i.path,a=i.lca,s=0,o=n[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=n[s])!==a&&c.node(o).maxRank<e.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<n.length-1&&c.node(o=n[s+1]).minRank<=e.rank;)s++;o=n[s]}c.setParent(t,o),t=c.successors(t)[0]}})}function nV(t,e,r,i){for(var n,a=[],s=[],o=Math.min(e[r].low,e[i].low),l=Math.max(e[r].lim,e[i].lim),c=r;c=t.parent(c),a.push(c),c&&(e[c].low>o||l>e[c].lim););for(n=c,c=i;(c=t.parent(c))!==n;)s.push(c);return{path:a.concat(s.reverse()),lca:n}}function aV(r){var i={},n=0;function a(t){var e=n;v(r.children(t),a),i[t]={low:e,lim:n++}}return me(a,"dfs"),v(r.children(),a),i}var sV=t(()=>{NW(),me(iV,"parentDummyChains"),me(nV,"findPath"),me(aV,"postorder")});function oV(c,t){var h={};function e(t,i){var a=0,s=0,o=t.length,l=wG(i);return v(i,function(t,e){var r=cV(c,t),n=r?c.node(r).order:o;!r&&t!==l||(v(i.slice(s,e+1),function(i){v(c.predecessors(i),function(t){var e=c.node(t),r=e.order;!(r<a||n<r)||e.dummy&&c.node(i).dummy||hV(h,t,i)})}),s=e+1,a=n)}),i}return me(e,"visitLayer"),Uj(t,e),h}function lV(o,t){var s={};function l(e,t,r,i,n){var a;v(Oj(t,r),function(t){a=e[t],o.node(a).dummy&&v(o.predecessors(a),function(t){var e=o.node(t);e.dummy&&(e.order<i||e.order>n)&&hV(s,t,a)})})}function e(r,i){var n,a=-1,s=0;return v(i,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(n=o.node(t[0]).order,l(i,s,e,a,n),s=e,a=n),l(i,s,i.length,n,r.length)}),i}return me(l,"scan"),me(e,"visitLayer"),Uj(t,e),s}function cV(e,t){if(e.node(t).dummy)return iU(e.predecessors(t),function(t){return e.node(t).dummy})}function hV(t,e,r){r<e&&(i=e,e=r,r=i);var i=t[e];i||(t[e]=i={}),i[r]=!0}function uV(t,e,r){var i;return r<e&&(i=e,e=r,r=i),!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function dV(t,e,o,l){var c={},h={},u={};return v(e,function(t){v(t,function(t,e){u[h[c[t]=t]=t]=e})}),v(e,function(t){var s=-1;v(t,function(t){var e=l(t);if(e.length)for(var r=((e=rW(e,function(t){return u[t]})).length-1)/2,i=Math.floor(r),n=Math.ceil(r);i<=n;++i){var a=e[i];h[t]===t&&s<u[a]&&!uV(o,t,a)&&(h[a]=t,h[t]=c[t]=c[a],s=u[a])}})}),{root:c,align:h}}function pV(i,t,e,r,n){var a={},s=gV(i,t,e,n),o=n?"borderLeft":"borderRight";function l(t,e){for(var r=s.nodes(),i=r.pop(),n={};i;)n[i]?t(i):(n[i]=!0,r.push(i),r=r.concat(e(i))),i=r.pop()}function c(t){a[t]=s.inEdges(t).reduce(function(t,e){return Math.max(t,a[e.v]+s.edge(e))},0)}function h(t){var e=s.outEdges(t).reduce(function(t,e){return Math.min(t,a[e.w]-s.edge(e))},Number.POSITIVE_INFINITY),r=i.node(t);e!==Number.POSITIVE_INFINITY&&r.borderType!==o&&(a[t]=Math.max(a[t],e))}return me(l,"iterate"),me(c,"pass1"),me(h,"pass2"),l(c,s.predecessors.bind(s)),l(h,s.successors.bind(s)),v(r,function(t){a[t]=a[e[t]]}),a}function gV(a,t,s,e){var o=new BW,r=a.graph(),l=xV(r.nodesep,r.edgesep,e);return v(t,function(t){var n;v(t,function(t){var e,r,i=s[t];o.setNode(i),n&&(e=s[n],r=o.edge(e,i),o.setEdge(e,i,Math.max(l(a,t,n),r||0))),n=t})}),o}function fV(n,t){return Rq(YU(t),function(t){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return xU(t,function(t,e){e=bV(n,e)/2,r=Math.max(t+e,r),i=Math.min(t-e,i)}),r-i})}function mV(s,o){var t=YU(o),l=Lq(t),c=_q(t);v(["u","d"],function(a){v(["l","r"],function(t){var e,r,i=a+t,n=s[i];n!==o&&(e=YU(n),r="l"===t?l-Lq(e):c-_q(e))&&(s[i]=bq(n,function(t){return t+r}))})})}function yV(r,i){return bq(r.ul,function(t,e){return i?r[i.toLowerCase()][e]:((e=rW(x(r,e)))[1]+e[2])/2})}function vV(i){var n,t=aY(i),a=aE(oV(i,t),lV(i,t)),s={},e=(v(["u","d"],function(r){n="u"===r?t:YU(t).reverse(),v(["l","r"],function(t){"r"===t&&(n=x(n,function(t){return YU(t).reverse()}));var e=("u"===r?i.predecessors:i.successors).bind(i),e=dV(0,n,a,e),e=pV(i,n,e.root,e.align,"r"===t);"r"===t&&(e=bq(e,function(t){return-t})),s[r+t]=e})}),fV(i,s));return mV(s,e),yV(s,i.graph().align)}function xV(s,o,l){return function(t,e,r){var i,n=t.node(e),a=t.node(r),e=0;if(e+=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&&(e+=l?i:-i),i=0,e=(e=(e+=(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&&(e+=l?i:-i),i=0,e}}function bV(t,e){return t.node(e).width}var wV=t(()=>{NW(),$W(),pY(),me(oV,"findType1Conflicts"),me(lV,"findType2Conflicts"),me(cV,"findOtherInnerSegmentNode"),me(hV,"addConflict"),me(uV,"hasConflict"),me(dV,"verticalAlignment"),me(pV,"horizontalCompaction"),me(gV,"buildBlockGraph"),me(fV,"findSmallestWidthAlignment"),me(mV,"alignCoordinates"),me(yV,"balance"),me(vV,"positionX"),me(xV,"sep"),me(bV,"width")});function kV(r){TV(r=iY(r)),kU(vV(r),function(t,e){r.node(e).x=t})}function TV(r){var t=aY(r),i=r.graph().ranksep,n=0;v(t,function(t){var e=_q(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=n+e/2}),n+=e+i})}var EV=t(()=>{NW(),pY(),wV(),me(kV,"position"),me(TV,"positionY")});function CV(e,t){var r=t&&t.debugTiming?uY:dY;r("layout",()=>{var t=r(" buildLayoutGraph",()=>AV(e));r(" runLayout",()=>_V(t,r)),r(" updateInputGraph",()=>SV(e,t))})}function _V(t,e){e(" makeSpaceForEdgeLabels",()=>LV(t)),e(" removeSelfEdges",()=>FV(t)),e(" acyclic",()=>ZW(t)),e(" nestingGraph.run",()=>kH(t)),e(" rank",()=>yH(iY(t))),e(" injectEdgeLabelProxies",()=>NV(t)),e(" removeEmptyRanks",()=>oY(t)),e(" nestingGraph.cleanup",()=>_H(t)),e(" normalizeRanks",()=>sY(t)),e(" assignRankMinMax",()=>IV(t)),e(" removeEdgeLabelProxies",()=>RV(t)),e(" normalize.run",()=>_Y(t)),e(" parentDummyChains",()=>iV(t)),e(" addBorderSegments",()=>gY(t)),e(" order",()=>QH(t)),e(" insertSelfEdges",()=>$V(t)),e(" adjustCoordinateSystem",()=>yY(t)),e(" position",()=>kV(t)),e(" positionSelfEdges",()=>zV(t)),e(" removeBorderNodes",()=>BV(t)),e(" normalize.undo",()=>AY(t)),e(" fixupEdgeLabelCoords",()=>OV(t)),e(" undoCoordinateSystem",()=>vY(t)),e(" translateGraph",()=>MV(t)),e(" assignNodeIntersects",()=>DV(t)),e(" reversePoints",()=>PV(t)),e(" acyclic.undo",()=>JW(t))}function SV(i,n){v(i.nodes(),function(t){var e=i.node(t),r=n.node(t);e&&(e.x=r.x,e.y=r.y,n.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(i.edges(),function(t){var e=i.edge(t),t=n.edge(t);e.points=t.points,Object.prototype.hasOwnProperty.call(t,"x")&&(e.x=t.x,e.y=t.y)}),i.graph().width=n.graph().width,i.graph().height=n.graph().height}function AV(r){var i=new BW({multigraph:!0,compound:!0}),t=UV(r.graph());return i.setGraph(aE({},jV,GV(t,qV),Ej(t,WV))),v(r.nodes(),function(t){var e=UV(r.node(t));i.setNode(t,oG(GV(e,YV),HV)),i.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=UV(r.edge(t));i.setEdge(t,aE({},XV,GV(e,VV),Ej(e,KV)))}),i}function LV(e){var r=e.graph();r.ranksep/=2,v(e.edges(),function(t){(t=e.edge(t)).minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function NV(r){v(r.edges(),function(t){var e=r.edge(t);e.width&&e.height&&(e=r.node(t.v),e={rank:(r.node(t.w).rank-e.rank)/2+e.rank,e:t},eY(r,"edge-proxy",e,"_ep"))})}function IV(e){var r=0;v(e.nodes(),function(t){(t=e.node(t)).borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=_q(r,t.maxRank))}),e.graph().maxRank=r}function RV(r){v(r.nodes(),function(t){var e=r.node(t);"edge-proxy"===e.dummy&&(r.edge(e.e).labelRank=e.rank,r.removeNode(t))})}function MV(e){var n=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,t=e.graph(),r=t.marginx||0,i=t.marginy||0;function l(t){var e=t.x,r=t.y,i=t.width,t=t.height;n=Math.min(n,e-i/2),a=Math.max(a,e+i/2),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}me(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),Object.prototype.hasOwnProperty.call(t,"x")&&l(t)}),n-=r,s-=i,v(e.nodes(),function(t){(t=e.node(t)).x-=n,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=n,t.y-=s}),Object.prototype.hasOwnProperty.call(t,"x")&&(t.x-=n),Object.prototype.hasOwnProperty.call(t,"y")&&(t.y-=s)}),t.width=a-n+r,t.height=o-s+i}function DV(a){v(a.edges(),function(t){var e,r=a.edge(t),i=a.node(t.v),t=a.node(t.w),n=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,i);r.points.unshift(nY(i,e)),r.points.push(nY(t,n))})}function OV(r){v(r.edges(),function(t){var e=r.edge(t);if(Object.prototype.hasOwnProperty.call(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function PV(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function BV(a){v(a.nodes(),function(t){var e,r,i,n;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),i=a.node(wG(t.borderLeft)),n=a.node(wG(t.borderRight)),t.width=Math.abs(n.x-i.x),t.height=Math.abs(r.y-e.y),t.x=i.x+t.width/2,t.y=e.y+t.height/2)}),v(a.nodes(),function(t){"border"===a.node(t).dummy&&a.removeNode(t)})}function FV(r){v(r.edges(),function(t){var e;t.v===t.w&&((e=r.node(t.v)).selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:t,label:r.edge(t)}),r.removeEdge(t))})}function $V(n){var t=aY(n);v(t,function(t){var i=0;v(t,function(t,e){var r=n.node(t);r.order=e+i,v(r.selfEdges,function(t){eY(n,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++i,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function zV(s){v(s.nodes(),function(t){var e,r,i,n,a=s.node(t);"selfedge"===a.dummy&&(e=(n=s.node(a.e.v)).x+n.width/2,r=n.y,i=a.x-e,n=n.height/2,s.setEdge(a.e,a.label),s.removeNode(t),a.label.points=[{x:e+2*i/3,y:r-n},{x:e+5*i/6,y:r-n},{x:e+i,y:r},{x:e+5*i/6,y:r+n},{x:e+2*i/3,y:r+n}],a.label.x=a.x,a.label.y=a.y)})}function GV(t,e){return bq(Ej(t,e),Number)}function UV(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var qV,jV,WV,YV,HV,VV,XV,KV,ZV=t(()=>{NW(),$W(),mY(),CY(),tY(),LY(),wH(),SH(),rV(),sV(),EV(),pY(),me(CV,"layout"),me(_V,"runLayout"),me(SV,"updateInputGraph"),qV=["nodesep","edgesep","ranksep","marginx","marginy"],jV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},WV=["acyclicer","ranker","rankdir","align"],YV=["width","height"],HV={width:0,height:0},VV=["minlen","weight","width","height","labeloffset"],XV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},KV=["labelpos"],me(AV,"buildLayoutGraph"),me(LV,"makeSpaceForEdgeLabels"),me(NV,"injectEdgeLabelProxies"),me(IV,"assignRankMinMax"),me(RV,"removeEdgeLabelProxies"),me(MV,"translateGraph"),me(DV,"assignNodeIntersects"),me(OV,"fixupEdgeLabelCoords"),me(PV,"reversePointsForReversedEdges"),me(BV,"removeBorderNodes"),me(FV,"removeSelfEdges"),me($V,"insertSelfEdges"),me(zV,"positionSelfEdges"),me(GV,"selectNumberAttrs"),me(UV,"canonicalize")}),QV=t(()=>{tY(),ZV(),LY(),wH()});function JV(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:tX(t),edges:eX(t)};return gq(t.graph())||(e.value=e$(t.graph())),e}function tX(i){return x(i.nodes(),function(t){var e=i.node(t),r=i.parent(t),t={v:t};return gq(e)||(t.value=e),gq(r)||(t.parent=r),t})}function eX(i){return x(i.edges(),function(t){var e=i.edge(t),r={v:t.v,w:t.w};return gq(t.name)||(r.name=t.name),gq(e)||(r.value=e),r})}var rX,iX,nX,aX,sX,oX,lX,cX,hX,uX,dX,pX,gX,fX,mX,yX=t(()=>{NW(),FW(),me(JV,"write"),me(tX,"writeNodes"),me(eX,"writeEdges")}),vX=t(()=>{e(),$W(),yX(),rX=new Map,iX=new Map,nX=new Map,aX=me(()=>{iX.clear(),nX.clear(),rX.clear()},"clear"),sX=me((t,e)=>{var r=iX.get(e)||[];return M.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),oX=me((t,e)=>{var r=iX.get(e)||[];return M.info("Descendants of ",e," is ",r),M.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||sX(t.v,e)||sX(t.w,e)||r.includes(t.w):(M.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),lX=me((r,i,n,a)=>{M.warn("Copying children of ",r,"root",a,"data",i.node(r),a);var t=i.children(r)||[];r!==a&&t.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0<i.children(t).length?lX(t,i,n,a):(e=i.node(t),M.info("cp ",t," to ",a," with parent ",r),n.setNode(t,e),a!==i.parent(t)&&(M.warn("Setting parent",t,i.parent(t)),n.setParent(t,i.parent(t))),r!==a&&t!==r?(M.debug("Setting parent",t,r),n.setParent(t,r)):(M.info("In copy ",r,"root",a,"data",i.node(r),a),M.debug("Not Setting parent for node=",t,"cluster!==rootId",r!==a,"node!==clusterId",t!==r)),e=i.edges(t),M.debug("Copying Edges",e),e.forEach(t=>{M.info("Edge",t);var e=i.edge(t.v,t.w,t.name);M.info("Edge data",e,a);try{oX(t,a)?(M.info("Copying as ",t.v,t.w,e,t.name),n.setEdge(t.v,t.w,e,t.name),M.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):M.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){M.error(t)}})),M.debug("Removing node",t),i.removeNode(t)})},"copy"),cX=me((t,e)=>{let r=e.children(t),i=[...r];for(var n of r)nX.set(n,t),i=[...i,...cX(n,e)];return i},"extractDescendants"),hX=me((t,e,r)=>{let i=t.edges().filter(t=>t.v===e||t.w===e),n=t.edges().filter(t=>t.v===r||t.w===r),a=i.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=n.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),uX=me((t,e,r)=>{var i,n=e.children(t);if(M.trace("Searching children of id ",t,n),n.length<1)return t;let a;for(i of n){var s=uX(i,e,r),o=hX(e,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),dX=me(t=>rX.has(t)&&rX.get(t).externalConnections&&rX.has(t)?rX.get(t).id:t,"getAnchorId"),pX=me((a,t)=>{if(!a||10<t)M.debug("Opting out, no graph ");else{M.debug("Opting in, graph "),a.nodes().forEach(function(t){0<a.children(t).length&&(M.warn("Cluster identified",t," Replacement id in edges: ",uX(t,a,t)),iX.set(t,cX(t,a)),rX.set(t,{id:uX(t,a,t),clusterData:a.node(t)}))}),a.nodes().forEach(function(e){var t=a.children(e),r=a.edges();0<t.length?(M.debug("Cluster identified",e,iX),r.forEach(t=>{sX(t.v,e)^sX(t.w,e)&&(M.warn("Edge: ",t," leaves cluster ",e),M.warn("Descendants of XXX ",e,": ",iX.get(e)),rX.get(e).externalConnections=!0)})):M.debug("Not a cluster ",e,iX)});for(var e of rX.keys()){var r=rX.get(e).id;(r=a.parent(r))!==e&&rX.has(r)&&!rX.get(r).externalConnections&&(rX.get(e).id=r)}a.edges().forEach(function(t){var e,r,i,n=a.edge(t);M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),t.v,M.warn("Fix XXX",rX,"ids:",t.v,t.w,"Translating: ",rX.get(t.v)," --- ",rX.get(t.w)),(rX.get(t.v)||rX.get(t.w))&&(M.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=dX(t.v),r=dX(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(i=a.parent(e),rX.get(i).externalConnections=!0,n.fromCluster=t.v),r!==t.w&&(i=a.parent(r),rX.get(i).externalConnections=!0,n.toCluster=t.w),M.warn("Fix Replacing with XXX",e,r,t.name),a.setEdge(e,r,n,t.name))}),M.warn("Adjusted Graph",JV(a)),gX(a,0),M.trace(rX)}},"adjustClustersAndEdges"),gX=me((r,i)=>{if(M.warn("extractor - ",i,JV(r),r.children("D")),10<i)M.error("Bailing out");else{let t=r.nodes(),e=!1;for(var n of t)n=r.children(n),e=e||0<n.length;if(e){M.debug("Nodes = ",t,i);for(var a of t)if(M.debug("Extracting node",a,rX,rX.has(a)&&!rX.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",i),rX.has(a))if(!rX.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 t="TB"===r.graph().rankdir?"LR":"TB";rX.get(a)?.clusterData?.dir&&(t=rX.get(a).clusterData.dir,M.warn("Fixing dir",rX.get(a).clusterData.dir,t));var s=new BW({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});M.warn("Old graph before copy",JV(r)),lX(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:rX.get(a).clusterData,label:rX.get(a).label,graph:s}),M.warn("New graph after copy node: (",a,")",JV(s)),M.debug("Old graph after copy",JV(r))}else M.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!rX.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),i),M.debug(rX);else M.debug("Not a cluster",a,i);t=r.nodes(),M.warn("New list of nodes",t);for(var o of t){var l=r.node(o);M.warn(" Now next level",o,l),l?.clusterNode&&gX(l.graph,i+1)}}else M.debug("Done, no node has children",r.nodes())}},"extractor"),fX=me((e,t)=>{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=fX(e,t),r=[...r,...t]}),r},"sorter"),mX=me(t=>fX(t,t.children()),"sortNodesByHierarchy")}),xX={};lPt(xX,{render:()=>wX});var bX,wX,kX,TX,EX,CX,_X,SX,AX,LX,NX,IX,RX,MX,DX,OX,PX,BX,FX,$X=t(()=>{QV(),yX(),$W(),DD(),n(),vX(),GD(),WM(),MD(),e(),jM(),fu(),bX=me(async(t,n,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",JV(n),o);let c=n.graph().rankdir,i=(M.trace("Dir in recursive render - dir:",c),t=t.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])),t.insert("g").attr("class","clusters")),h=t.insert("g").attr("class","edgePaths"),r=t.insert("g").attr("class","edgeLabels"),u=t.insert("g").attr("class","nodes"),d=(await Promise.all(n.nodes().map(async function(t){var e,r,i=n.node(t);void 0!==o&&(e=JSON.parse(JSON.stringify(o.clusterData)),M.trace(`Setting data for parent cluster XXX
Node.id = `,t,`
data=`,e.height,`
Parent cluster`,o.height),n.setNode(o.id,e),n.parent(t)||(M.trace("Setting parent",t,o.id),n.setParent(t,o.id,e))),M.info("(Insert) Node XXX"+t+": "+JSON.stringify(n.node(t))),i?.clusterNode?(M.info("Cluster identified XBX",t,i.width,n.node(t)),{ranksep:e,nodesep:r}=n.graph(),i.graph.setGraph({...i.graph.graph(),ranksep:e+25,nodesep:r}),r=(e=await bX(u,i.graph,a,s,n.node(t),l)).elem,Z9(i,r),i.diff=e.diff||0,M.info("New compound node after recursive render XAX",t,"width",i.width,"height",i.height),BD(r,i)):0<n.children(t).length?(M.trace("Cluster - the non recursive path XBX",t,i.id,i,i.width,"Graph:",n),M.trace(uX(i.id,n)),rX.set(i.id,{id:uX(i.id,n),node:i})):(M.trace("Node - the non recursive path XAX",t,u,n.node(t),c),await OD(u,n.node(t),{config:l,dir:c}))})),await me(async()=>{var t=n.edges().map(async function(t){var e=n.edge(t.v,t.w,t.name);M.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),M.info("Fix",rX,"ids:",t.v,t.w,"Translating: ",rX.get(t.v),rX.get(t.w)),await oD(r,e)});await Promise.all(t)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(JV(n))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),CV(n),M.info("Graph after layout:",JSON.stringify(JV(n))),0),p=IM(l).subGraphTitleTotalMargin;return await Promise.all(mX(n).map(async function(t){var e,r=n.node(t);M.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,n.parent(t)),rX.get(r.id).node=r,$D(r)):0<n.children(t).length?(M.info("A pure cluster node XBX1",t,r.id,r.x,r.y,r.width,r.height,n.parent(t)),r.height+=p,n.node(r.parentId),t=r?.padding/2||0,e=r?.labelBBox?.height||0,M.debug("OffsetY",e-t||0,"labelHeight",e,"halfPadding",t),await $M(i,r),rX.get(r.id).node=r):(e=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",e,e?.offsetY,r),$D(r))})),n.edges().forEach(function(t){var e=n.edge(t),r=(M.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),n.node(t.v)),t=n.node(t.w),r=gD(h,e,rX,a,r,t,s);lD(e,r)}),n.nodes().forEach(function(t){var e=n.node(t);M.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),M.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),wX=me(async(t,e)=>{let l=new BW({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");RD(r,t.markers,t.type,t.diagramId),FD(),aD(),zM(),aX(),t.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),M.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,i,n,a,s,o;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",i=e+"---"+e+"---2",n=l.node(e),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(t),s=structuredClone(t),o=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",o.label="",n.isGroup&&(a.fromCluster=e,o.toCluster=e),o.id=e+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,i,s,e+"-cyclic-special-1"),l.setEdge(i,e,o,e+"-cyc<lic-special-2")):l.setEdge(t.start,t.end,{...t},t.id)}),M.warn("Graph at first:",JSON.stringify(JV(l))),pX(l),M.warn("Graph after XAX:",JSON.stringify(JV(l))),e=D(),await bX(r,l,t.type,t.diagramId,void 0,e)},"render")}),zX=t(()=>{UD(),e(),kX={},TX=me(t=>{for(var e of t)kX[e.name]=e},"registerLayoutLoaders"),me(()=>{TX([{name:"dagre",loader:me(async()=>Promise.resolve().then(()=>($X(),xX)),"loader")}])},"registerDefaultLayoutLoaders")(),EX=me(async(t,e)=>{var r;if(t.layoutAlgorithm in kX)return(await(r=kX[t.layoutAlgorithm]).loader()).render(t,e,zD,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),CX=me((t="",{fallback:e="dagre"}={})=>{if(t in kX)return t;if(e in kX)return M.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")}),GX=t(()=>{th(),e(),_X=me((t,e,r,i)=>{t.attr("class",r);var{width:r,height:n,x:a,y:s}=SX(t,e),i=(Hc(t,n,r,i),AX(a,s,r,n,e));t.attr("viewBox",i),M.debug(`viewBox configured: ${i} with padding: `+e)},"setupViewPortForSVG"),SX=me((t,e)=>({width:(t=t.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*e,height:t.height+2*e,x:t.x,y:t.y}),"calculateDimensionsWithPadding"),AX=me((t,e,r,i,n)=>t-n+` ${e-n} ${r} `+i,"createViewBox")}),UX=t(()=>{Z3(),fu(),e(),qM(),zX(),GX(),KE(),LX=me(function(t,e){return e.db.getClasses()},"getClasses"),NX=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);let{securityLevel:n,flowchart:a,layout:s}=D(),o;"sandbox"===n&&(o=j("#i"+e));var l,c="sandbox"===n?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),i.db.getData()),u=(M.debug("Data: ",h),NM(e,n)),d=i.db.getDirection(),d=(h.type=i.type,h.layoutAlgorithm=CX(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=e,M.debug("REF1:",h),await EX(h,u),h.config.flowchart?.diagramPadding??8);YE.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),_X(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=j(`#${e} [id="${l.id}"]`);if(p&&l.link){let t=c.createElementNS("http://www.w3.org/2000/svg","a"),e=(t.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===n?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return t},":first-child")),r=p.select(".label-container"),i=(r&&e.append(function(){return r.node()}),p.select(".label"));i&&e.append(function(){return i.node()})}}},"draw"),IX={getClasses:LX,draw:NX}}),qX=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),B=[1,4],F=[1,3],$=[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],G=[2,2],U=[1,13],q=[1,14],j=[1,15],W=[1,16],Y=[1,23],H=[1,25],V=[1,26],X=[1,27],e=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],tt=[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],et=[1,34],rt=[1,35],it=[1,36],nt=[1,37],at=[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],st=[8,9,11,75,77,78],ot=[1,78],lt=[1,91],ct=[1,96],ht=[1,95],ut=[1,92],dt=[1,88],pt=[1,94],gt=[1,90],ft=[1,97],mt=[1,93],yt=[1,98],vt=[1,89],xt=[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],bt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],wt=[44,60,89,102,105,106,109,111,114,115,116],kt=[1,121],Tt=[1,122],Et=[1,124],Ct=[1,123],_t=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,133],At=[1,147],Lt=[1,148],Nt=[1,149],It=[1,150],Rt=[1,135],Mt=[1,137],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,144],Ft=[1,145],$t=[1,146],zt=[1,151],Gt=[1,152],Ut=[1,131],qt=[1,132],jt=[1,139],Wt=[1,134],Yt=[1,138],Ht=[1,136],Vt=[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],Xt=[1,154],Kt=[1,156],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,176],w=[1,172],k=[1,173],T=[1,177],E=[1,174],C=[1,175],Zt=[77,116,119],_=[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],Qt=[10,106],Jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],S=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],te=[1,268],ee=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:me(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:me(function(t,e,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:B,10:F,12:$},{1:[3]},t(z,G,{5:6}),{4:7,9:B,10:F,12:$},{4:8,9:B,10:F,12:$},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:it,124:nt},t(z,[2,9]),t(z,[2,10]),t(z,[2,11]),{8:[1,54],9:[1,55],10:at,15:53,18:56},t(d,[2,3]),t(d,[2,4]),t(d,[2,5]),t(d,[2,6]),t(d,[2,7]),t(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},t(d,[2,36]),{35:[1,74]},{37:[1,75]},t(d,[2,39]),t(st,[2,50],{18:76,39:77,10:at,40:ot}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:lt,44:ct,60:ht,80:[1,86],89:ut,95:[1,83],97:[1,84],101:85,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt,120:87},t(d,[2,185]),t(d,[2,186]),t(d,[2,187]),t(d,[2,188]),t(xt,[2,51]),t(xt,[2,54],{46:[1,99]}),t(m,[2,72],{113:112,29:[1,100],44:e,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}),t(y,[2,181]),t(y,[2,142]),t(y,[2,143]),t(y,[2,144]),t(y,[2,145]),t(y,[2,146]),t(y,[2,147]),t(y,[2,148]),t(y,[2,149]),t(y,[2,150]),t(y,[2,151]),t(y,[2,152]),t(z,[2,12]),t(z,[2,18]),t(z,[2,19]),{9:[1,113]},t(bt,[2,26],{18:114,10:at}),t(d,[2,27]),{42:115,43:38,44:e,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},t(d,[2,40]),t(d,[2,41]),t(d,[2,42]),t(wt,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:kt,81:Tt,116:Et,119:Ct},{75:[1,125],77:[1,126]},t(_t,[2,83]),t(d,[2,28]),t(d,[2,29]),t(d,[2,30]),t(d,[2,31]),t(d,[2,32]),{10:St,12:At,14:Lt,27:Nt,28:127,32:It,44:Rt,60:Mt,75:Dt,80:[1,129],81:[1,130],83:140,84:Ot,85:Pt,86:Bt,87:Ft,88:$t,89:zt,90:Gt,91:128,105:Ut,109:qt,111:jt,114:Wt,115:Yt,116:Ht},t(Vt,G,{5:153}),t(d,[2,37]),t(d,[2,38]),t(st,[2,48],{44:Xt}),t(st,[2,49],{18:155,10:at,40:Kt}),t(xt,[2,44]),{44:e,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:e,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:e,47:162,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},t(v,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(v,[2,115],{120:167,10:[1,166],14:lt,44:ct,60:ht,89:ut,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt}),t(v,[2,117],{10:[1,168]}),t(x,[2,183]),t(x,[2,170]),t(x,[2,171]),t(x,[2,172]),t(x,[2,173]),t(x,[2,174]),t(x,[2,175]),t(x,[2,176]),t(x,[2,177]),t(x,[2,178]),t(x,[2,179]),t(x,[2,180]),{44:e,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:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:178,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:180,50:[1,179],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:181,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:182,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:183,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{109:[1,184]},{30:185,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:186,65:[1,187],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:188,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:189,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:190,67:b,80:w,81:k,82:171,116:T,117:E,118:C},t(y,[2,182]),t(z,[2,20]),t(bt,[2,25]),t(st,[2,46],{39:191,18:192,10:at,40:ot}),t(wt,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{77:[1,196],79:197,116:Et,119:Ct},t(Zt,[2,79]),t(Zt,[2,81]),t(Zt,[2,82]),t(Zt,[2,168]),t(Zt,[2,169]),{76:198,79:120,80:kt,81:Tt,116:Et,119:Ct},t(_t,[2,84]),{8:p,9:g,10:St,11:f,12:At,14:Lt,21:200,27:Nt,29:[1,199],32:It,44:Rt,60:Mt,75:Dt,83:140,84:Ot,85:Pt,86:Bt,87:Ft,88:$t,89:zt,90:Gt,91:201,105:Ut,109:qt,111:jt,114:Wt,115:Yt,116:Ht},t(_,[2,101]),t(_,[2,103]),t(_,[2,104]),t(_,[2,157]),t(_,[2,158]),t(_,[2,159]),t(_,[2,160]),t(_,[2,161]),t(_,[2,162]),t(_,[2,163]),t(_,[2,164]),t(_,[2,165]),t(_,[2,166]),t(_,[2,167]),t(_,[2,90]),t(_,[2,91]),t(_,[2,92]),t(_,[2,93]),t(_,[2,94]),t(_,[2,95]),t(_,[2,96]),t(_,[2,97]),t(_,[2,98]),t(_,[2,99]),t(_,[2,100]),{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,202],33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:it,124:nt},{10:at,18:203},{44:[1,204]},t(xt,[2,43]),{10:[1,205],44:e,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]},t(Qt,[2,128]),{10:[1,209],44:e,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:e,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]},t(v,[2,109],{10:[1,212]}),t(v,[2,111],{10:[1,213]}),{80:[1,214]},t(x,[2,184]),{80:[1,215],98:[1,216]},t(xt,[2,55],{113:112,44:e,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),{31:[1,217],67:b,82:218,116:T,117:E,118:C},t(Jt,[2,86]),t(Jt,[2,88]),t(Jt,[2,89]),t(Jt,[2,153]),t(Jt,[2,154]),t(Jt,[2,155]),t(Jt,[2,156]),{49:[1,219],67:b,82:218,116:T,117:E,118:C},{30:220,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{51:[1,221],67:b,82:218,116:T,117:E,118:C},{53:[1,222],67:b,82:218,116:T,117:E,118:C},{55:[1,223],67:b,82:218,116:T,117:E,118:C},{57:[1,224],67:b,82:218,116:T,117:E,118:C},{60:[1,225]},{64:[1,226],67:b,82:218,116:T,117:E,118:C},{66:[1,227],67:b,82:218,116:T,117:E,118:C},{30:228,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{31:[1,229],67:b,82:218,116:T,117:E,118:C},{67:b,69:[1,230],71:[1,231],82:218,116:T,117:E,118:C},{67:b,69:[1,233],71:[1,232],82:218,116:T,117:E,118:C},t(st,[2,45],{18:155,10:at,40:Kt}),t(st,[2,47],{44:Xt}),t(wt,[2,75]),t(wt,[2,74]),{62:[1,234],67:b,82:218,116:T,117:E,118:C},t(wt,[2,77]),t(Zt,[2,80]),{77:[1,235],79:197,116:Et,119:Ct},{30:236,67:b,80:w,81:k,82:171,116:T,117:E,118:C},t(Vt,G,{5:237}),t(_,[2,102]),t(d,[2,35]),{43:238,44:e,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:at,18:239},{10:S,60:A,84:L,92:240,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:S,60:A,84:L,92:251,104:[1,252],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:S,60:A,84:L,92:253,104:[1,254],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{105:[1,255]},{10:S,60:A,84:L,92:256,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{44:e,47:257,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},t(v,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(v,[2,116]),t(v,[2,118],{10:[1,261]}),t(v,[2,119]),t(m,[2,56]),t(Jt,[2,87]),t(m,[2,57]),{51:[1,262],67:b,82:218,116:T,117:E,118:C},t(m,[2,64]),t(m,[2,59]),t(m,[2,60]),t(m,[2,61]),{109:[1,263]},t(m,[2,63]),t(m,[2,65]),{66:[1,264],67:b,82:218,116:T,117:E,118:C},t(m,[2,67]),t(m,[2,68]),t(m,[2,70]),t(m,[2,69]),t(m,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(wt,[2,78]),{31:[1,265],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,266],33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:it,124:nt},t(xt,[2,53]),{43:267,44:e,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},t(v,[2,121],{106:te}),t(ee,[2,130],{108:269,10:S,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),t(O,[2,132]),t(O,[2,134]),t(O,[2,135]),t(O,[2,136]),t(O,[2,137]),t(O,[2,138]),t(O,[2,139]),t(O,[2,140]),t(O,[2,141]),t(v,[2,122],{106:te}),{10:[1,270]},t(v,[2,123],{106:te}),{10:[1,271]},t(Qt,[2,129]),t(v,[2,105],{106:te}),t(v,[2,106],{113:112,44:e,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),t(v,[2,110]),t(v,[2,112],{10:[1,272]}),t(v,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:p,9:g,11:f,21:277},t(d,[2,34]),t(xt,[2,52]),{10:S,60:A,84:L,105:N,107:278,108:242,109:I,110:R,111:M,112:D},t(O,[2,133]),{14:lt,44:ct,60:ht,89:ut,101:279,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt,120:87},{14:lt,44:ct,60:ht,89:ut,101:280,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt,120:87},{98:[1,281]},t(v,[2,120]),t(m,[2,58]),{30:282,67:b,80:w,81:k,82:171,116:T,117:E,118:C},t(m,[2,66]),t(Vt,G,{5:283}),t(ee,[2,131],{108:269,10:S,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),t(v,[2,126],{120:167,10:[1,284],14:lt,44:ct,60:ht,89:ut,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt}),t(v,[2,127],{120:167,10:[1,285],14:lt,44:ct,60:ht,89:ut,105:dt,106:pt,109:gt,111:ft,114:mt,115:yt,116:vt}),t(v,[2,114]),{31:[1,286],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:W,20:17,22:18,23:19,24:20,25:21,26:22,27:Y,32:[1,287],33:24,34:H,36:V,38:X,42:28,43:38,44:e,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:tt,89:i,102:n,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:et,122:rt,123:it,124:nt},{10:S,60:A,84:L,92:288,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:S,60:A,84:L,92:289,105:N,107:241,108:242,109:I,110:R,111:M,112:D},t(m,[2,62]),t(d,[2,33]),t(v,[2,124],{106:te}),t(v,[2,125],{106:te})],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},F={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,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"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return e.yytext=e.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 t.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}}};B.lexer=F,me(P,"Parser"),(RX=new((P.prototype=B).Parser=P)).parser=RX,MX=RX}),jX=t(()=>{qX(),(DX=Object.assign({},MX)).parse=t=>(t=t.replace(/}\s*\n/g,`}
`),MX.parse(t)),OX=DX}),WX=t(()=>{mi(),PX=me((t,e)=>{var r=(n=Pe)(t,"r"),i=n(t,"g"),n=n(t,"b");return De(r,i,n,e)},"fade"),BX=me(t=>`.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span {
color: ${t.titleColor};
}
.cluster-label span p {
background-color: transparent;
}
.label text,span {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.rough-node .label text , .node .label text, .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: ${t.lineColor} !important;
stroke-width: 0;
stroke: ${t.lineColor};
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
p {
background-color: ${t.edgeLabelBackground};
}
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${PX(t.edgeLabelBackground,.5)};
// background-color:
}
.cluster rect {
fill: ${t.clusterBkg};
stroke: ${t.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
rect.text {
fill: none;
stroke-width: 0;
}
.icon-shape, .image-shape {
background-color: ${t.edgeLabelBackground};
p {
background-color: ${t.edgeLabelBackground};
padding: 2px;
}
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
`,"getStyles"),FX=BX}),YX={};lPt(YX,{diagram:()=>HX});var HX,VX,XX,KX,ZX=t(()=>{fu(),UM(),UX(),jX(),WX(),HX={parser:OX,get db(){return new LM},renderer:IX,styles:FX,init:me(t=>{t.flowchart||(t.flowchart={}),t.layout&&mh({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mh({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}),QX=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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],x=[1,37],B=[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],b=[1,42],w=[1,43],k=[1,52],T=[40,50,68,69],E=[1,63],C=[1,61],_=[1,58],S=[1,62],A=[1,64],L=[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],F=[63,64,65,66,67],$=[1,81],z=[1,80],G=[1,78],U=[1,79],q=[6,10,42,47],N=[6,10,13,41,42,47,48,49],I=[1,89],R=[1,88],M=[1,87],D=[19,56],j=[1,98],W=[1,97],O=[19,56,58,60],i={trace:me(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:me(function(t,e,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]},e(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},e(r,[2,7],{1:[2,1]}),e(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},e(r,[2,5]),e(r,[2,6]),e(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:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(r,[2,27]),e(r,[2,28]),e(r,[2,29]),e(r,[2,30]),e(r,[2,31]),e(B,[2,54]),e(B,[2,55]),e(r,[2,32]),e(r,[2,33]),e(r,[2,34]),e(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},e(r,[2,4]),{11:46,40:d,50:g},{16:47,40:b,41:w},{18:48,19:[1,49],51:50,52:51,56:k},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),{13:E,38:57,41:C,42:_,45:59,46:60,48:S,49:A},e(L,[2,37]),e(L,[2,38]),{16:65,40:b,41:w,42:_},{13:E,38:66,41:C,42:_,45:59,46:60,48:S,49:A},{13:[1,67],15:[1,68]},e(r,[2,17],{61:32,12:69,17:[1,70],42:_,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},e(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:k},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:x},e(F,[2,74]),e(F,[2,75]),{6:$,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},e(q,[2,43],{46:84,13:E,41:C,48:S,49:A}),e(N,[2,45]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(r,[2,41],{42:_}),{6:$,10:z,39:85,42:G,47:U},{14:86,40:I,50:R,70:M},{16:90,40:b,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:k},e(r,[2,12]),{19:[2,57]},e(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),e([19,56,59,60],[2,63]),e(r,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(r,[2,36]),{13:E,41:C,45:101,46:60,48:S,49:A},e(r,[2,47]),e(r,[2,48]),e(r,[2,49]),e(L,[2,39]),e(L,[2,40]),e(N,[2,46]),e(r,[2,42]),e(r,[2,8]),e(r,[2,76]),e(r,[2,77]),e(r,[2,78]),{13:[1,102],42:_},{13:[1,104],15:[1,103]},{19:[1,105]},e(r,[2,15]),e(D,[2,59],{55:106,58:[1,107],60:W}),e(D,[2,60]),e(O,[2,64]),e(D,[2,67]),e(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},e(q,[2,44],{46:84,13:E,41:C,48:S,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},e(r,[2,13]),e(D,[2,61]),{57:114,59:j},{19:[1,115]},e(r,[2,20]),e(r,[2,23],{17:[1,116],42:_}),e(r,[2,11]),{13:[1,117],42:_},e(r,[2,10]),e(O,[2,65]),e(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:k},{14:120,40:I,50:R,70:M},{19:[1,121]},e(r,[2,21]),e(r,[2,9]),e(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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 e.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 e.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,me(t,"Parser"),(VX=new((t.prototype=i).Parser=t)).parser=VX,XX=VX}),JX=t(()=>{e(),fu(),gu(),KE(),KX=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=lh,this.getAccTitle=ch,this.setAccDescription=hh,this.getAccDescription=uh,this.setDiagramTitle=dh,this.getDiagramTitle=ph,this.getConfig=me(()=>D().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{me(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,M.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:D().look??"default",cssClasses:"default",cssStyles:[]}),M.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let r=this.addEntity(t),i;for(i=e.length-1;0<=i;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),r.attributes.push(e[i]),M.debug("Added attribute ",e[i].name)}addRelationship(t,e,r,i){t=this.entities.get(t),r=this.entities.get(r),t&&r&&(t={entityA:t.id,roleA:e,entityB:r.id,relSpec:i},this.relationships.push(t),M.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}addCssStyles(t,e){for(var r of t){var i,n=this.entities.get(r);if(!e||!n)return;for(i of e)n.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setClass(t,e){for(var r of t){var i=this.entities.get(r);if(i)for(var n of e)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],oh()}getData(){var t,e,r=[],i=[],n=D();for(t of this.entities.keys()){var a=this.entities.get(t);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(e of this.relationships){var o={id:XE(e.entityA,e.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:e.entityA,end:e.entityB,label:e.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==e.relSpec.relType?"solid":"dashed",look:n.look};i.push(o)}return{nodes:r,edges:i,other:{},config:n,direction:"TB"}}}}),tK={};lPt(tK,{draw:()=>eK});var eK,rK,iK,nK,aK=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),Z3(),eK=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing er diagram (unified)",e);let{securityLevel:n,er:a,layout:s}=D(),o=i.db.getData(),l=NM(e,n);o.type=i.type,o.layoutAlgorithm=CX(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=e,await EX(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),e=l.selectAll('[id*="-background"]'),0<Array.from(e).length&&e.each(function(){var t=j(this),e=t.attr("id").replace("-background","");(e=l.select("#"+CSS.escape(e))).empty()||(e=e.attr("transform"),t.attr("transform",e))}),YE.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),sK=t(()=>{mi(),rK=me((t,e)=>{var r=(n=Pe)(t,"r"),i=n(t,"g"),n=n(t,"b");return De(r,i,n,e)},"fade"),iK=me(t=>`
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.labelBkg {
background-color: ${rK(t.tertiaryColor,.5)};
}
.edgeLabel .label {
fill: ${t.nodeBorder};
font-size: 14px;
}
.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.edge-pattern-dashed {
stroke-dasharray: 8,8;
}
.node rect,
.node circle,
.node ellipse,
.node polygon
{
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.relationshipLine {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.marker {
fill: none !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
`,"getStyles"),nK=iK}),oK={};lPt(oK,{diagram:()=>lK});var lK,cK=t(()=>{QX(),JX(),aK(),sK(),lK={parser:XX,get db(){return new KX},renderer:tK,styles:nK}});function hK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function uK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function dK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function pK(t){return"object"==typeof t&&null!==t&&hK(t.container)&&uK(t.reference)&&"string"==typeof t.message}function gK(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function fK(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function mK(t){return gK(t)&&"string"==typeof t.fullText}var yK,vK=t(()=>{me(hK,"isAstNode"),me(uK,"isReference"),me(dK,"isAstNodeDescription"),me(pK,"isLinkingError"),yK=class{static{me(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return hK(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,i;return t===e||(void 0!==(i=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?i:(i=this.computeIsSubtype(t,e),r[e]=i))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,i=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&i.push(r);return this.allSubtypes[t]=i}},me(gK,"isCompositeCstNode"),me(fK,"isLeafCstNode"),me(mK,"isRootCstNode")});function xK(t){return"string"==typeof t?t:"u"<typeof t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function bK(t){return!!t&&"function"==typeof t[Symbol.iterator]}function wK(...r){if(1===r.length){let e=r[0];if(e instanceof kK)return e;if(bK(e))return new kK(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new kK(()=>({index:0}),t=>t.index<e.length?{done:!1,value:e[t.index++]}:EK)}return 1<r.length?new kK(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}}while(t.collIndex<r.length&&(bK(e=r[t.collIndex++])?t.iterator=e[Symbol.iterator]():e&&"number"==typeof e.length&&(t.array=e)),t.iterator||t.array||t.collIndex<r.length);return EK}):TK}var kK,TK,EK,CK,_K,SK=t(()=>{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function i(t){return t.reduce((t,e)=>Math.max(t,e))}var n;kK=class a{static{me(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=t.iterator.next()).done)return e}while(!e.done);return EK})}join(t=","){let e=this.iterator(),r="",i,n=!1;for(;(i=e.next()).done||(n&&(r+=t),r+=xK(i.value)),n=!0,!i.done;);return r}indexOf(t,e=0){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(i>=e&&n.value===t)return i;n=r.next(),i++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,i=e.next();for(;!i.done;)t(i.value,r),i=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?EK:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return EK})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),i=e,n=r.next();for(;!n.done;)i=void 0===i?n.value:t(i,n.value),n=r.next();return i}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var i=t.next();return i.done?r:void 0===(t=this.recursiveReduce(t,e,r))?i.value:e(t,i.value)}find(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){let e=this.iterator(),r=0,i=e.next();for(;!i.done;){if(t(i.value))return r;i=e.next(),r++}return-1}includes(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(i){return new a(()=>({this:this.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=this.nextFn(t.this);if(!e){if(!bK(r=i(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return EK})}flat(t){if((t=void 0===t?1:t)<=0)return this;let i=1<t?this.flat(t-1):this;return new a(()=>({this:i.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=i.nextFn(t.this);if(!e){if(!bK(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return EK})}head(){var t=this.iterator().next();if(!t.done)return t.value}tail(r=1){return new a(()=>{var e=this.startFn();for(let t=0;t<r;t++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(e){return new a(()=>({size:0,state:this.startFn()}),t=>(t.size++,e<t.size?EK:this.nextFn(t.state)))}distinct(i){return new a(()=>({set:new Set,internalState:this.startFn()}),t=>{var e;do{if(!(e=this.nextFn(t.internalState)).done){var r=i?i(e.value):e.value;if(!t.set.has(r))return t.set.add(r),e}}while(!e.done);return EK})}exclude(t,e){let r=new Set;for(var i of t)i=e?e(i):i,r.add(i);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},me(xK,"toString"),me(bK,"isIterable"),TK=new kK(()=>{},()=>EK),EK=Object.freeze({done:!0,value:void 0}),me(wK,"stream"),CK=class extends kK{static{me(this,"TreeStreamImpl")}constructor(t,r,e){super(()=>({iterators:e?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);0<t.iterators.length;){var e=t.iterators[t.iterators.length-1].next();if(!e.done)return t.iterators.push(r(e.value)[Symbol.iterator]()),e;t.iterators.pop()}return EK})}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),prune:me(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},n=_K=_K||{},me(t,"sum"),n.sum=t,me(e,"product"),n.product=e,me(r,"min"),n.min=r,me(i,"max"),n.max=i}),AK={};function LK(t){return new CK(t,t=>gK(t)?t.content:[],{includeRoot:!0})}function NK(t){return LK(t).filter(fK)}function IK(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function RK(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function MK(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function DK(t,e){var r;return t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character?VK.Before:t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character?VK.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character,r&&t?VK.Inside:r?VK.OverlapBack:t?VK.OverlapFront:VK.Outside)}function OK(t,e){return DK(t,e)>VK.After}function PK(t,e,r=XK){var i;if(t)return 0<e&&(i=e-t.offset,i=t.text.charAt(i),r.test(i)||e--),$K(t,e)}function BK(e,r){if(e){var t=UK(e,!0);if(t&&FK(t,r))return t;if(mK(e))for(let t=e.content.findIndex(t=>!t.hidden)-1;0<=t;t--){var i=e.content[t];if(FK(i,r))return i}}}function FK(t,e){return fK(t)&&e.includes(t.tokenType.name)}function $K(t,e){return fK(t)?t:gK(t)&&(t=GK(t,e,!1))?$K(t,e):void 0}function zK(t,e){return fK(t)?t:gK(t)&&(t=GK(t,e,!0))?zK(t,e):void 0}function GK(t,e,r){let i=0,n=t.content.length-1,a;for(;i<=n;){var s=Math.floor((i+n)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,i=s+1):n=s-1}return a}function UK(r,i=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0<e;){e--;var n=t.content[e];if(i||!n.hidden)return n}r=t}}function qK(i,n=!0){for(;i.container;){let t=i.container,e=t.content.indexOf(i),r=t.content.length-1;for(;e<r;){e++;var a=t.content[e];if(n||!a.hidden)return a}i=t}}function jK(t){if(0===t.range.start.character)return t;let e=t.range.start.line,r=t,i;for(;t.container;){var n=t.container,a=i??n.content.indexOf(t);if(0===a?(t=n,i=void 0):(i=a-1,t=n.content[i]),t.range.start.line!==e)break;r=t}return r}function WK(t,e){return(t=YK(t,e))?t.parent.content.slice(t.a+1,t.b):[]}function YK(t,e){let r=HK(t),i=HK(e),n;for(let t=0;t<r.length&&t<i.length;t++){var a=r[t],s=i[t];if(a.parent!==s.parent)break;n={parent:a.parent,a:a.index,b:s.index}}return n}function HK(t){for(var e=[];t.container;){var r=t.container,i=r.content.indexOf(t);e.push({parent:r,index:i}),t=r}return e.reverse()}lPt(AK,{DefaultNameRegexp:()=>XK,RangeComparison:()=>VK,compareRange:()=>DK,findCommentNode:()=>BK,findDeclarationNodeAtOffset:()=>PK,findLeafNodeAtOffset:()=>$K,findLeafNodeBeforeOffset:()=>zK,flattenCst:()=>NK,getInteriorNodes:()=>WK,getNextNode:()=>qK,getPreviousNode:()=>UK,getStartlineNode:()=>jK,inRange:()=>OK,isChildNode:()=>IK,isCommentNode:()=>FK,streamCst:()=>LK,toDocumentSegment:()=>MK,tokenToRange:()=>RK});var VK,XK,KK=t(()=>{var t;vK(),SK(),me(LK,"streamCst"),me(NK,"flattenCst"),me(IK,"isChildNode"),me(RK,"tokenToRange"),me(MK,"toDocumentSegment"),(t=VK=VK||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside",me(DK,"compareRange"),me(OK,"inRange"),XK=/^[\w\p{L}]$/u,me(PK,"findDeclarationNodeAtOffset"),me(BK,"findCommentNode"),me(FK,"isCommentNode"),me($K,"findLeafNodeAtOffset"),me(zK,"findLeafNodeBeforeOffset"),me(GK,"binarySearch"),me(UK,"getPreviousNode"),me(qK,"getNextNode"),me(jK,"getStartlineNode"),me(WK,"getInteriorNodes"),me(YK,"getCommonParent"),me(HK,"getParentChain")});function ZK(t){throw new Error("Error! The input value was not handled.")}var QK,JK=t(()=>{QK=class extends Error{static{me(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},me(ZK,"assertUnreachable")}),tZ={};function eZ(t){return qQ.isInstance(t,KZ)}function rZ(t){return qQ.isInstance(t,ZZ)}function iZ(t){return qQ.isInstance(t,QZ)}function nZ(t){return aZ(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function aZ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function sZ(t){return qQ.isInstance(t,JZ)}function oZ(t){return qQ.isInstance(t,tQ)}function lZ(t){return qQ.isInstance(t,eQ)}function cZ(t){return qQ.isInstance(t,rQ)}function hZ(t){return qQ.isInstance(t,iQ)}function uZ(t){return qQ.isInstance(t,nQ)}function dZ(t){return qQ.isInstance(t,aQ)}function pZ(t){return qQ.isInstance(t,sQ)}function gZ(t){return qQ.isInstance(t,oQ)}function fZ(t){return qQ.isInstance(t,lQ)}function mZ(t){return qQ.isInstance(t,cQ)}function yZ(t){return qQ.isInstance(t,hQ)}function vZ(t){return qQ.isInstance(t,uQ)}function xZ(t){return qQ.isInstance(t,dQ)}function bZ(t){return qQ.isInstance(t,pQ)}function wZ(t){return qQ.isInstance(t,gQ)}function kZ(t){return qQ.isInstance(t,fQ)}function TZ(t){return qQ.isInstance(t,mQ)}function EZ(t){return qQ.isInstance(t,yQ)}function CZ(t){return qQ.isInstance(t,vQ)}function _Z(t){return qQ.isInstance(t,xQ)}function SZ(t){return qQ.isInstance(t,bQ)}function AZ(t){return qQ.isInstance(t,wQ)}function LZ(t){return qQ.isInstance(t,kQ)}function NZ(t){return qQ.isInstance(t,TQ)}function IZ(t){return qQ.isInstance(t,EQ)}function RZ(t){return qQ.isInstance(t,CQ)}function MZ(t){return qQ.isInstance(t,_Q)}function DZ(t){return qQ.isInstance(t,SQ)}function OZ(t){return qQ.isInstance(t,AQ)}function PZ(t){return qQ.isInstance(t,LQ)}function BZ(t){return qQ.isInstance(t,NQ)}function FZ(t){return qQ.isInstance(t,IQ)}function $Z(t){return qQ.isInstance(t,RQ)}function zZ(t){return qQ.isInstance(t,MQ)}function GZ(t){return qQ.isInstance(t,DQ)}function UZ(t){return qQ.isInstance(t,OQ)}function qZ(t){return qQ.isInstance(t,PQ)}function jZ(t){return qQ.isInstance(t,BQ)}function WZ(t){return qQ.isInstance(t,FQ)}function YZ(t){return qQ.isInstance(t,$Q)}function HZ(t){return qQ.isInstance(t,zQ)}function VZ(t){return qQ.isInstance(t,GQ)}lPt(tZ,{AbstractElement:()=>eQ,AbstractRule:()=>KZ,AbstractType:()=>ZZ,Action:()=>CQ,Alternatives:()=>_Q,ArrayLiteral:()=>rQ,ArrayType:()=>iQ,Assignment:()=>SQ,BooleanLiteral:()=>nQ,CharacterRange:()=>AQ,Condition:()=>QZ,Conjunction:()=>aQ,CrossReference:()=>LQ,Disjunction:()=>sQ,EndOfFile:()=>NQ,Grammar:()=>oQ,GrammarImport:()=>lQ,Group:()=>IQ,InferredType:()=>cQ,Interface:()=>hQ,Keyword:()=>RQ,LangiumGrammarAstReflection:()=>UQ,LangiumGrammarTerminals:()=>XZ,NamedArgument:()=>uQ,NegatedToken:()=>MQ,Negation:()=>dQ,NumberLiteral:()=>pQ,Parameter:()=>gQ,ParameterReference:()=>fQ,ParserRule:()=>mQ,ReferenceType:()=>yQ,RegexToken:()=>DQ,ReturnType:()=>vQ,RuleCall:()=>OQ,SimpleType:()=>xQ,StringLiteral:()=>bQ,TerminalAlternatives:()=>PQ,TerminalGroup:()=>BQ,TerminalRule:()=>wQ,TerminalRuleCall:()=>FQ,Type:()=>kQ,TypeAttribute:()=>TQ,TypeDefinition:()=>JZ,UnionType:()=>EQ,UnorderedGroup:()=>$Q,UntilToken:()=>zQ,ValueLiteral:()=>tQ,Wildcard:()=>GQ,isAbstractElement:()=>lZ,isAbstractRule:()=>eZ,isAbstractType:()=>rZ,isAction:()=>RZ,isAlternatives:()=>MZ,isArrayLiteral:()=>cZ,isArrayType:()=>hZ,isAssignment:()=>DZ,isBooleanLiteral:()=>uZ,isCharacterRange:()=>OZ,isCondition:()=>iZ,isConjunction:()=>dZ,isCrossReference:()=>PZ,isDisjunction:()=>pZ,isEndOfFile:()=>BZ,isFeatureName:()=>nZ,isGrammar:()=>gZ,isGrammarImport:()=>fZ,isGroup:()=>FZ,isInferredType:()=>mZ,isInterface:()=>yZ,isKeyword:()=>$Z,isNamedArgument:()=>vZ,isNegatedToken:()=>zZ,isNegation:()=>xZ,isNumberLiteral:()=>bZ,isParameter:()=>wZ,isParameterReference:()=>kZ,isParserRule:()=>TZ,isPrimitiveType:()=>aZ,isReferenceType:()=>EZ,isRegexToken:()=>GZ,isReturnType:()=>CZ,isRuleCall:()=>UZ,isSimpleType:()=>_Z,isStringLiteral:()=>SZ,isTerminalAlternatives:()=>qZ,isTerminalGroup:()=>jZ,isTerminalRule:()=>AZ,isTerminalRuleCall:()=>WZ,isType:()=>LZ,isTypeAttribute:()=>NZ,isTypeDefinition:()=>sZ,isUnionType:()=>IZ,isUnorderedGroup:()=>YZ,isUntilToken:()=>HZ,isValueLiteral:()=>oZ,isWildcard:()=>VZ,reflection:()=>qQ});var XZ,KZ,ZZ,QZ,JZ,tQ,eQ,rQ,iQ,nQ,aQ,sQ,oQ,lQ,cQ,hQ,uQ,dQ,pQ,gQ,fQ,mQ,yQ,vQ,xQ,bQ,wQ,kQ,TQ,EQ,CQ,_Q,SQ,AQ,LQ,NQ,IQ,RQ,MQ,DQ,OQ,PQ,BQ,FQ,$Q,zQ,GQ,UQ,qQ,jQ=t(()=>{vK(),XZ={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]*/},KZ="AbstractRule",me(eZ,"isAbstractRule"),ZZ="AbstractType",me(rZ,"isAbstractType"),QZ="Condition",me(iZ,"isCondition"),me(nZ,"isFeatureName"),me(aZ,"isPrimitiveType"),JZ="TypeDefinition",me(sZ,"isTypeDefinition"),tQ="ValueLiteral",me(oZ,"isValueLiteral"),eQ="AbstractElement",me(lZ,"isAbstractElement"),rQ="ArrayLiteral",me(cZ,"isArrayLiteral"),iQ="ArrayType",me(hZ,"isArrayType"),nQ="BooleanLiteral",me(uZ,"isBooleanLiteral"),aQ="Conjunction",me(dZ,"isConjunction"),sQ="Disjunction",me(pZ,"isDisjunction"),oQ="Grammar",me(gZ,"isGrammar"),lQ="GrammarImport",me(fZ,"isGrammarImport"),cQ="InferredType",me(mZ,"isInferredType"),hQ="Interface",me(yZ,"isInterface"),uQ="NamedArgument",me(vZ,"isNamedArgument"),dQ="Negation",me(xZ,"isNegation"),pQ="NumberLiteral",me(bZ,"isNumberLiteral"),gQ="Parameter",me(wZ,"isParameter"),fQ="ParameterReference",me(kZ,"isParameterReference"),mQ="ParserRule",me(TZ,"isParserRule"),yQ="ReferenceType",me(EZ,"isReferenceType"),vQ="ReturnType",me(CZ,"isReturnType"),xQ="SimpleType",me(_Z,"isSimpleType"),bQ="StringLiteral",me(SZ,"isStringLiteral"),wQ="TerminalRule",me(AZ,"isTerminalRule"),kQ="Type",me(LZ,"isType"),TQ="TypeAttribute",me(NZ,"isTypeAttribute"),EQ="UnionType",me(IZ,"isUnionType"),CQ="Action",me(RZ,"isAction"),_Q="Alternatives",me(MZ,"isAlternatives"),SQ="Assignment",me(DZ,"isAssignment"),AQ="CharacterRange",me(OZ,"isCharacterRange"),LQ="CrossReference",me(PZ,"isCrossReference"),NQ="EndOfFile",me(BZ,"isEndOfFile"),IQ="Group",me(FZ,"isGroup"),RQ="Keyword",me($Z,"isKeyword"),MQ="NegatedToken",me(zZ,"isNegatedToken"),DQ="RegexToken",me(GZ,"isRegexToken"),OQ="RuleCall",me(UZ,"isRuleCall"),PQ="TerminalAlternatives",me(qZ,"isTerminalAlternatives"),BQ="TerminalGroup",me(jZ,"isTerminalGroup"),FQ="TerminalRuleCall",me(WZ,"isTerminalRuleCall"),$Q="UnorderedGroup",me(YZ,"isUnorderedGroup"),zQ="UntilToken",me(HZ,"isUntilToken"),GQ="Wildcard",me(VZ,"isWildcard"),UQ=class extends yK{static{me(this,"LangiumGrammarAstReflection")}getAllTypes(){return[eQ,KZ,ZZ,CQ,_Q,rQ,iQ,SQ,nQ,AQ,QZ,aQ,LQ,sQ,NQ,oQ,lQ,IQ,cQ,hQ,RQ,uQ,MQ,dQ,pQ,gQ,fQ,mQ,yQ,DQ,vQ,OQ,xQ,bQ,PQ,BQ,wQ,FQ,kQ,TQ,JZ,EQ,$Q,zQ,tQ,GQ]}computeIsSubtype(t,e){switch(t){case CQ:case _Q:case SQ:case AQ:case LQ:case NQ:case IQ:case RQ:case MQ:case DQ:case OQ:case PQ:case BQ:case FQ:case $Q:case zQ:case GQ:return this.isSubtype(eQ,e);case rQ:case pQ:case bQ:return this.isSubtype(tQ,e);case iQ:case yQ:case xQ:case EQ:return this.isSubtype(JZ,e);case nQ:return this.isSubtype(QZ,e)||this.isSubtype(tQ,e);case aQ:case sQ:case dQ:case fQ:return this.isSubtype(QZ,e);case cQ:case hQ:case kQ:return this.isSubtype(ZZ,e);case mQ:return this.isSubtype(KZ,e)||this.isSubtype(ZZ,e);case wQ:return this.isSubtype(KZ,e);default:return!1}}getReferenceType(t){var e=t.container.$type+":"+t.property;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return ZZ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return KZ;case"Grammar:usedGrammars":return oQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return gQ;case"TerminalRuleCall:rule":return wQ;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case eQ:return{name:eQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case rQ:return{name:rQ,properties:[{name:"elements",defaultValue:[]}]};case iQ:return{name:iQ,properties:[{name:"elementType"}]};case nQ:return{name:nQ,properties:[{name:"true",defaultValue:!1}]};case aQ:return{name:aQ,properties:[{name:"left"},{name:"right"}]};case sQ:return{name:sQ,properties:[{name:"left"},{name:"right"}]};case oQ:return{name:oQ,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case lQ:return{name:lQ,properties:[{name:"path"}]};case cQ:return{name:cQ,properties:[{name:"name"}]};case hQ:return{name:hQ,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case uQ:return{name:uQ,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case dQ:return{name:dQ,properties:[{name:"value"}]};case pQ:return{name:pQ,properties:[{name:"value"}]};case gQ:return{name:gQ,properties:[{name:"name"}]};case fQ:return{name:fQ,properties:[{name:"parameter"}]};case mQ:return{name:mQ,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case yQ:return{name:yQ,properties:[{name:"referenceType"}]};case vQ:return{name:vQ,properties:[{name:"name"}]};case xQ:return{name:xQ,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case bQ:return{name:bQ,properties:[{name:"value"}]};case wQ:return{name:wQ,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case kQ:return{name:kQ,properties:[{name:"name"},{name:"type"}]};case TQ:return{name:TQ,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case EQ:return{name:EQ,properties:[{name:"types",defaultValue:[]}]};case CQ:return{name:CQ,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case _Q:return{name:_Q,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case SQ:return{name:SQ,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case AQ:return{name:AQ,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case LQ:return{name:LQ,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case NQ:return{name:NQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case IQ:return{name:IQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case RQ:return{name:RQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case MQ:return{name:MQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case DQ:return{name:DQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case OQ:return{name:OQ,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case PQ:return{name:PQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case BQ:return{name:BQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case FQ:return{name:FQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case $Q:return{name:$Q,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case zQ:return{name:zQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case GQ:return{name:GQ,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},qQ=new UQ}),WQ={};function YQ(i){for(let[r,t]of Object.entries(i))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{hK(t)&&(t.$container=i,t.$containerProperty=r,t.$containerIndex=e)}):hK(t)&&(t.$container=i,t.$containerProperty=r))}function HQ(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function VQ(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function XQ(t){if(t=KQ(t).$document)return t;throw new Error("AST node has no document.")}function KQ(t){for(;t.$container;)t=t.$container;return t}function ZQ(n,t){if(!n)throw new Error("Node must be an AstNode.");let a=t?.range;return new kK(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){var e=t.keys[t.keyIndex];if(!e.startsWith("$")){var r=n[e];if(hK(r)){if(t.keyIndex++,tJ(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;t.arrayIndex<r.length;){var i=r[t.arrayIndex++];if(hK(i)&&tJ(i,a))return{done:!1,value:i}}t.arrayIndex=0}}t.keyIndex++}return EK})}function QQ(t,e){if(t)return new CK(t,t=>ZQ(t,e));throw new Error("Root node must be an AstNode.")}function JQ(t,e){if(t)return e?.range&&!tJ(t,e.range)?new CK(t,()=>[]):new CK(t,t=>ZQ(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function tJ(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&OK(t,e)}function eJ(a){return new kK(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){var e=t.keys[t.keyIndex];if(!e.startsWith("$")){var r=a[e];if(uK(r))return t.keyIndex++,{done:!1,value:{reference:r,container:a,property:e}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){var i=t.arrayIndex++,n=r[i];if(uK(n))return{done:!1,value:{reference:n,container:a,property:e,index:i}}}t.arrayIndex=0}}t.keyIndex++}return EK})}function rJ(e,t=XQ(e).parseResult.value){let r=[];return JQ(t).forEach(t=>{eJ(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),wK(r)}function iJ(t,e){var r,i=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===i[r.name]&&(i[r.name]=nJ(r.defaultValue))}function nJ(t){return Array.isArray(t)?[...t.map(nJ)]:t}function aJ(t,e){var r,i,n={$type:t.$type};for([r,i]of Object.entries(t))if(!r.startsWith("$"))if(hK(i))n[r]=aJ(i,e);else if(uK(i))n[r]=e(n,r,i.$refNode,i.$refText);else if(Array.isArray(i)){var a,s=[];for(a of i)hK(a)?s.push(aJ(a,e)):uK(a)?s.push(e(n,r,a.$refNode,a.$refText)):s.push(a);n[r]=s}else n[r]=i;return YQ(n),n}lPt(WQ,{assignMandatoryProperties:()=>iJ,copyAstNode:()=>aJ,findLocalReferences:()=>rJ,findRootNode:()=>KQ,getContainerOfType:()=>HQ,getDocument:()=>XQ,hasContainerOfType:()=>VQ,linkContentToContainer:()=>YQ,streamAllContents:()=>QQ,streamAst:()=>JQ,streamContents:()=>ZQ,streamReferences:()=>eJ});var sJ=t(()=>{vK(),SK(),KK(),me(YQ,"linkContentToContainer"),me(HQ,"getContainerOfType"),me(VQ,"hasContainerOfType"),me(XQ,"getDocument"),me(KQ,"findRootNode"),me(ZQ,"streamContents"),me(QQ,"streamAllContents"),me(JQ,"streamAst"),me(tJ,"isAstNodeInRange"),me(eJ,"streamReferences"),me(rJ,"findLocalReferences"),me(iJ,"assignMandatoryProperties"),me(nJ,"copyDefaultValue"),me(aJ,"copyAstNode")});function oJ(t){return t.charCodeAt(0)}function lJ(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function cJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function hJ(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function uJ(){throw Error("Internal Error - Should never get here!")}function dJ(t){return"Character"===t.type}var pJ,gJ,fJ,mJ,yJ,vJ,xJ,bJ,wJ=t(()=>{me(oJ,"cc"),me(lJ,"insertToSet"),me(cJ,"addFlag"),me(hJ,"ASSERT_EXISTS"),me(uJ,"ASSERT_NEVER_REACH_HERE"),me(dJ,"isCharacter")}),kJ=t(()=>{wJ(),pJ=[];for(let t=oJ("0");t<=oJ("9");t++)pJ.push(t);gJ=[oJ("_")].concat(pJ);for(let t=oJ("a");t<=oJ("z");t++)gJ.push(t);for(let t=oJ("A");t<=oJ("Z");t++)gJ.push(t);fJ=[oJ(" "),oJ("\f"),oJ(`
`),oJ("\r"),oJ("\t"),oJ("\v"),oJ("\t"),oJ(" "),oJ(""),oJ(" "),oJ(""),oJ(""),oJ(""),oJ(""),oJ(""),oJ(""),oJ(""),oJ(""),oJ(""),oJ(""),oJ("\u2028"),oJ("\u2029"),oJ(""),oJ(""),oJ(" "),oJ("\ufeff")]}),TJ=t(()=>{wJ(),kJ(),mJ=/[0-9a-fA-F]/,yJ=/[0-9]/,vJ=/[1-9]/,xJ=class{static{me(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":cJ(r,"global");break;case"i":cJ(r,"ignoreCase");break;case"m":cJ(r,"multiLine");break;case"u":cJ(r,"unicode");break;case"y":cJ(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}hJ(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return uJ()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var i=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:i,atMost:i};break;case",":e=this.isDigit()?{atLeast:i,atMost:this.integerIncludingZero()}:{atLeast:i,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;hJ(e)}if((!0!==t||void 0!==e)&&hJ(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return hJ(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):uJ()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[oJ(`
`),oJ("\r"),oJ("\u2028"),oJ("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=pJ;break;case"D":t=pJ,e=!0;break;case"s":t=fJ;break;case"S":t=fJ,e=!0;break;case"w":t=gJ;break;case"W":t=gJ,e=!0}return hJ(t)?{type:"Set",value:t,complement:e}:uJ()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=oJ("\f");break;case"n":t=oJ(`
`);break;case"r":t=oJ("\r");break;case"t":t=oJ("\t");break;case"v":t=oJ("\v")}return hJ(t)?{type:"Character",value:t}:uJ()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:oJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:oJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:oJ(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,dJ(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,dJ(i)){if(i.value<r.value)throw Error("Range out of order in character class");t.push({from:r.value,to:i.value})}else lJ(r.value,t),t.push(oJ("-")),lJ(i.value,t)}else lJ(r.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:oJ("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),t=!1):this.groupIdx++;var e=this.disjunction(),e=(this.consumeChar(")"),{type:"Group",capturing:t,value:e});return t&&(e.idx=this.groupIdx),e}positiveInteger(){let t=this.popChar();if(!1===vJ.test(t))throw Error("Expecting a positive integer");for(;yJ.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===yJ.test(t))throw Error("Expecting an integer");for(;yJ.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){var t=this.popChar();switch(t){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:oJ(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return yJ.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){var t=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let t=0;t<e;t++){var i=this.popChar();if(!1===mJ.test(i))throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){var t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),EJ=t(()=>{bJ=class{static{me(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),CJ=t(()=>{TJ(),EJ()}),_J={};function SJ(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=OJ.pattern(t),i=[];for(e of r.value.value)BJ.reset(t),BJ.visit(e),i.push({start:BJ.startRegexp,end:BJ.endRegex});return i}catch{return[]}}function AJ(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),BJ.reset(t),BJ.visit(OJ.pattern(t)),BJ.multiline}catch{return!1}}function LJ(t){let e="string"==typeof t?new RegExp(t):t;return FJ.some(t=>e.test(t))}function NJ(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function IJ(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:NJ(t)).join("")}function RJ(t,e){return t=MJ(t),!!(e=e.match(t))&&0<e[0].length}function MJ(t){let n=t="string"==typeof t?new RegExp(t):t,a=t.source,s=0;function o(){let e="",t;function r(t){e+=a.substr(s,t),s+=t}function i(t){e+="(?:"+a.substr(s,t)+"|$)",s+=t}for(me(r,"appendRaw"),me(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"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,i((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):i(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:i(1)}return e}return me(o,"process"),new RegExp(o(),t.flags)}lPt(_J,{NEWLINE_REGEXP:()=>DJ,escapeRegExp:()=>NJ,getCaseInsensitivePattern:()=>IJ,getTerminalParts:()=>SJ,isMultilineComment:()=>AJ,isWhitespace:()=>LJ,partialMatches:()=>RJ,partialRegExp:()=>MJ,whitespaceCharacters:()=>FJ});var DJ,OJ,PJ,BJ,FJ,$J=t(()=>{CJ(),DJ=/\r?\n/gm,OJ=new xJ,PJ=class extends bJ{static{me(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){var e=String.fromCharCode(t.value);this.multiline||e!==`
`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=NJ(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!`
`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},BJ=new PJ,me(SJ,"getTerminalParts"),me(AJ,"isMultilineComment"),FJ=`
\r    `.split(""),me(LJ,"isWhitespace"),me(NJ,"escapeRegExp"),me(IJ,"getCaseInsensitivePattern"),me(RJ,"partialMatches"),me(MJ,"partialRegExp")}),zJ={};function GJ(t){return t.rules.find(t=>TZ(t)&&t.entry)}function UJ(t){return t.rules.filter(t=>AZ(t)&&t.hidden)}function qJ(t,e){var r,i=new Set,n=GJ(t);if(!n)return new Set(t.rules);for(r of[n].concat(UJ(t)))jJ(r,i,e);var a,s=new Set;for(a of t.rules)(i.has(a.name)||AZ(a)&&a.hidden)&&s.add(a);return s}function jJ(t,e,r){e.add(t.name),QQ(t).forEach(t=>{(UZ(t)||r&&WZ(t))&&(t=t.rule.ref)&&!e.has(t.name)&&jJ(t,e,r)})}function WJ(t){return t.terminal||(t.type.ref?ttt(t.type.ref)?.terminal:void 0)}function YJ(t){return t.hidden&&!LJ(ftt(t))}function HJ(t,e){return t&&e?XJ(t,e,t.astNode,!0):[]}function VJ(t,e,r){return t&&e&&0!==(e=XJ(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function XJ(t,e,r,i){return!i&&(i=HQ(t.grammarSource,DZ))&&i.feature===e?[t]:gK(t)&&t.astNode===r?t.content.flatMap(t=>XJ(t,e,r,!1)):[]}function KJ(t,e){return t?QJ(t,e,t?.astNode):[]}function ZJ(t,e,r){return t&&0!==(e=QJ(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function QJ(t,e,r){if(t.astNode!==r)return[];if($Z(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var i,n,a=LK(t).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?$Z(i.grammarSource)&&i.grammarSource.value===e&&s.push(i):a.prune()),!n.done;);return s}function JJ(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=HQ(t.grammarSource,DZ);if(r)return r;t=t.container}}function ttt(t){let e=t;return mZ(e)&&(RZ(e.$container)?e=e.$container.$container:TZ(e.$container)?e=e.$container:ZK(e.$container)),ett(t,e,new Map)}function ett(i,t,n){var e,r;function a(t,e){let r;return HQ(t,DZ)||(r=ett(e,e,n)),n.set(i,r),r}if(me(a,"go"),n.has(i))return n.get(i);n.set(i,void 0);for(r of QQ(t)){if(DZ(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(UZ(r)&&TZ(r.rule.ref))return a(r,r.rule.ref);if(_Z(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function rtt(e){var t=e.$container;if(FZ(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var i=r[t];if(RZ(i))return i;if(i=QQ(r[t]).find(RZ))return i}}if(lZ(t))return rtt(t)}function itt(t,e){return"?"===t||"*"===t||FZ(e)&&!!e.guardCondition}function ntt(t){return"*"===t||"+"===t}function att(t){return"+="===t}function stt(t){return ott(t,new Set)}function ott(t,e){if(e.has(t))return!0;e.add(t);for(var r of QQ(t))if(UZ(r)){if(!r.rule.ref||TZ(r.rule.ref)&&!ott(r.rule.ref,e))return!1}else{if(DZ(r))return!1;if(RZ(r))return!1}return!!t.definition}function ltt(t){return ctt(t.type,new Set)}function ctt(t,e){return!!e.has(t)||(e.add(t),!hZ(t)&&!EZ(t)&&(IZ(t)?t.types.every(t=>ctt(t,e)):!!_Z(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!LZ(t=t.typeRef.ref)&&ctt(t.type,e))))}function htt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(TZ(t)||yZ(t)||LZ(t))?t.name:void 0)}function utt(t){if(TZ(t))return stt(t)||null==(e=htt(t))?t.name:e;if(yZ(t)||LZ(t)||CZ(t))return t.name;if(RZ(t)){var e=dtt(t);if(e)return e}else if(mZ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function dtt(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?utt(t.type.ref):void 0}function ptt(t){var e;return AZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":stt(t)||null==(e=htt(t))?t.name:e}function gtt(t){var e;return AZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":null!=(e=htt(t))?e:t.name}function ftt(t){var t=mtt(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function mtt(t,e){if(qZ(t))return ytt(t);if(jZ(t))return vtt(t);if(OZ(t))return wtt(t);if(WZ(t)){var r=t.rule.ref;if(r)return Ttt(mtt(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(zZ(t))return btt(t);if(HZ(t))return xtt(t);var i;if(GZ(t))return r=t.regex.lastIndexOf("/"),i=t.regex.substring(1,r),r=t.regex.substring(r+1),e&&(e.i=r.includes("i"),e.s=r.includes("s"),e.u=r.includes("u")),Ttt(i,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(VZ(t))return Ttt(Ett,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function ytt(t){return Ttt(t.elements.map(t=>mtt(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function vtt(t){return Ttt(t.elements.map(t=>mtt(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function xtt(t){return Ttt(Ett+"*?"+mtt(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function btt(t){return Ttt(`(?!${mtt(t.terminal)})${Ett}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function wtt(t){return t.right?Ttt(`[${ktt(t.left)}-${ktt(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Ttt(ktt(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function ktt(t){return NJ(t.value)}function Ttt(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}lPt(zJ,{findAssignment:()=>JJ,findNameAssignment:()=>ttt,findNodeForKeyword:()=>ZJ,findNodeForProperty:()=>VJ,findNodesForKeyword:()=>KJ,findNodesForKeywordInternal:()=>QJ,findNodesForProperty:()=>HJ,getActionAtElement:()=>rtt,getActionType:()=>dtt,getAllReachableRules:()=>qJ,getCrossReferenceTerminal:()=>WJ,getEntryRule:()=>GJ,getExplicitRuleType:()=>htt,getHiddenRules:()=>UJ,getRuleType:()=>gtt,getRuleTypeName:()=>ptt,getTypeName:()=>utt,isArrayCardinality:()=>ntt,isArrayOperator:()=>att,isCommentTerminal:()=>YJ,isDataType:()=>ltt,isDataTypeRule:()=>stt,isOptionalCardinality:()=>itt,terminalRegex:()=>ftt});var Ett,Ctt=t(()=>{JK(),jQ(),vK(),sJ(),KK(),$J(),me(GJ,"getEntryRule"),me(UJ,"getHiddenRules"),me(qJ,"getAllReachableRules"),me(jJ,"ruleDfs"),me(WJ,"getCrossReferenceTerminal"),me(YJ,"isCommentTerminal"),me(HJ,"findNodesForProperty"),me(VJ,"findNodeForProperty"),me(XJ,"findNodesForPropertyInternal"),me(KJ,"findNodesForKeyword"),me(ZJ,"findNodeForKeyword"),me(QJ,"findNodesForKeywordInternal"),me(JJ,"findAssignment"),me(ttt,"findNameAssignment"),me(ett,"findNameAssignmentInternal"),me(rtt,"getActionAtElement"),me(itt,"isOptionalCardinality"),me(ntt,"isArrayCardinality"),me(att,"isArrayOperator"),me(stt,"isDataTypeRule"),me(ott,"isDataTypeRuleInternal"),me(ltt,"isDataType"),me(ctt,"isDataTypeInternal"),me(htt,"getExplicitRuleType"),me(utt,"getTypeName"),me(dtt,"getActionType"),me(ptt,"getRuleTypeName"),me(gtt,"getRuleType"),me(ftt,"terminalRegex"),Ett=/[\s\S]/.source,me(mtt,"abstractElementToRegex"),me(ytt,"terminalAlternativesToRegex"),me(vtt,"terminalGroupToRegex"),me(xtt,"untilTokenToRegex"),me(btt,"negateTokenToRegex"),me(wtt,"characterRangeToRegex"),me(ktt,"keywordToRegex"),me(Ttt,"withCardinality")});function _tt(t){var e,r=[];for(e of t.Grammar.rules)AZ(e)&&YJ(e)&&AJ(ftt(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:XK}}var Stt=t(()=>{KK(),Ctt(),$J(),jQ(),me(_tt,"createGrammarConfig")}),Att=t(()=>{});function Ltt(t){console&&console.error&&console.error("Error: "+t)}function Ntt(t){console&&console.warn&&console.warn("Warning: "+t)}var Itt=t(()=>{me(Ltt,"PRINT_ERROR"),me(Ntt,"PRINT_WARNING")});function Rtt(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var Mtt=t(()=>{me(Rtt,"timer")});function Dtt(t){function e(){}me(e,"FakeConstructor"),e.prototype=t;let r=new e;function i(){return typeof r.bar}return me(i,"fakeAccess"),i(),i(),t}var Ott=t(()=>{me(Dtt,"toFastProperties")}),Ptt=t(()=>{Itt(),Mtt(),Ott()});function Btt(t){return Ftt(t)?t.LABEL:t.name}function Ftt(t){return zU(t.LABEL)&&""!==t.LABEL}function $tt(t){return x(t,ztt)}function ztt(t){function e(t){return x(t,ztt)}var r,i;if(me(e,"convertDefinition"),t instanceof Utt)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},zU(t.label)&&(r.label=t.label),r;if(t instanceof jtt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Wtt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ytt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Htt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:ztt(new Ztt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Xtt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:ztt(new Ztt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Vtt)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Ktt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Ztt)return r={type:"Terminal",name:t.terminalType.name,label:Btt(t.terminalType),idx:t.idx},zU(t.label)&&(r.terminalLabel=t.label),i=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=hq(i)?i.source:i),r;if(t instanceof qtt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var Gtt,Utt,qtt,jtt,Wtt,Ytt,Htt,Vtt,Xtt,Ktt,Ztt,Qtt,Jtt=t(()=>{NW(),me(Btt,"tokenLabel"),me(Ftt,"hasTokenLabel"),Gtt=class{static{me(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(e){e.visit(this),v(this.definition,t=>{t.accept(e)})}},Utt=class extends Gtt{static{me(this,"NonTerminal")}constructor(t){super([]),this.idx=1,aP(this,jq(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},qtt=class extends Gtt{static{me(this,"Rule")}constructor(t){super(t.definition),this.orgText="",aP(this,jq(t,t=>void 0!==t))}},jtt=class extends Gtt{static{me(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,aP(this,jq(t,t=>void 0!==t))}},Wtt=class extends Gtt{static{me(this,"Option")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Ytt=class extends Gtt{static{me(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Htt=class extends Gtt{static{me(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Vtt=class extends Gtt{static{me(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Xtt=class extends Gtt{static{me(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,aP(this,jq(t,t=>void 0!==t))}},Ktt=class extends Gtt{static{me(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,aP(this,jq(t,t=>void 0!==t))}},Ztt=class{static{me(this,"Terminal")}constructor(t){this.idx=1,aP(this,jq(t,t=>void 0!==t))}accept(t){t.visit(this)}},me($tt,"serializeGrammar"),me(ztt,"serializeProduction")}),tet=t(()=>{Jtt(),Qtt=class{static{me(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case Utt:return this.visitNonTerminal(e);case jtt:return this.visitAlternative(e);case Wtt:return this.visitOption(e);case Ytt:return this.visitRepetitionMandatory(e);case Htt:return this.visitRepetitionMandatoryWithSeparator(e);case Xtt:return this.visitRepetitionWithSeparator(e);case Vtt:return this.visitRepetition(e);case Ktt:return this.visitAlternation(e);case Ztt:return this.visitTerminal(e);case qtt:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function eet(t){return t instanceof jtt||t instanceof Wtt||t instanceof Vtt||t instanceof Ytt||t instanceof Htt||t instanceof Xtt||t instanceof Ztt||t instanceof qtt}function ret(t,e=[]){return t instanceof Wtt||t instanceof Vtt||t instanceof Xtt||(t instanceof Ktt?tW(t.definition,t=>ret(t,e)):!(t instanceof Utt&&KU(e,t))&&t instanceof Gtt&&(t instanceof Utt&&e.push(t),UG(t.definition,t=>ret(t,e))))}function iet(t){return t instanceof Ktt}function net(t){if(t instanceof Utt)return"SUBRULE";if(t instanceof Wtt)return"OPTION";if(t instanceof Ktt)return"OR";if(t instanceof Ytt)return"AT_LEAST_ONE";if(t instanceof Htt)return"AT_LEAST_ONE_SEP";if(t instanceof Xtt)return"MANY_SEP";if(t instanceof Vtt)return"MANY";if(t instanceof Ztt)return"CONSUME";throw Error("non exhaustive match")}var aet=t(()=>{NW(),Jtt(),me(eet,"isSequenceProd"),me(ret,"isOptionalProd"),me(iet,"isBranchingProd"),me(net,"getProductionDslName")}),set=t(()=>{Jtt(),tet(),aet()});function oet(t,e,r){return[new Wtt({definition:[new Ztt({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var cet,het=t(()=>{NW(),set(),cet=class{static{me(this,"RestWalker")}walk(r,i=[]){v(r.definition,(t,e)=>{if(e=EG(r.definition,e+1),t instanceof Utt)this.walkProdRef(t,e,i);else if(t instanceof Ztt)this.walkTerminal(t,e,i);else if(t instanceof jtt)this.walkFlat(t,e,i);else if(t instanceof Wtt)this.walkOption(t,e,i);else if(t instanceof Ytt)this.walkAtLeastOne(t,e,i);else if(t instanceof Htt)this.walkAtLeastOneSep(t,e,i);else if(t instanceof Xtt)this.walkManySep(t,e,i);else if(t instanceof Vtt)this.walkMany(t,e,i);else{if(!(t instanceof Ktt))throw Error("non exhaustive match");this.walkOr(t,e,i)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){e=e.concat(r),this.walk(t,e)}walkOption(t,e,r){e=e.concat(r),this.walk(t,e)}walkAtLeastOne(t,e,r){e=[new Wtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=oet(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new Wtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=oet(t,e,r),this.walk(t,e)}walkOr(t,e,r){let i=e.concat(r);v(t.definition,t=>{t=new jtt({definition:[t]}),this.walk(t,i)})}},me(oet,"restForRepetitionWithSeparator")});function uet(t){if(t instanceof Utt)return uet(t.referencedRule);if(t instanceof Ztt)return get(t);if(eet(t))return det(t);if(iet(t))return pet(t);throw Error("non exhaustive match")}function det(t){let e=[],r=t.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=ret(a),e=e.concat(uet(a)),i+=1,n=r.length>i;return fW(e)}function pet(t){return t=x(t.definition,t=>uet(t)),fW(HP(t))}function get(t){return[t.terminalType]}var fet,met=t(()=>{NW(),set(),me(uet,"first"),me(det,"firstForSequence"),me(pet,"firstForBranching"),me(get,"firstForTerminal")}),yet=t(()=>{fet="_~IN~_"});function vet(t){let e={};return v(t,t=>{t=new bet(t).startWalking(),aP(e,t)}),e}function xet(t,e){return t.name+e+fet}var bet,wet=t(()=>{het(),met(),NW(),yet(),set(),bet=class extends cet{static{me(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){t=xet(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=uet(new jtt({definition:e})),this.follows[t]=r}},me(vet,"computeAllProdsFollows"),me(xet,"buildBetweenProdsFollowPrefix")});function ket(t){var e,t=t.toString();return Eet.hasOwnProperty(t)?Eet[t]:(e=Cet.pattern(t),Eet[t]=e)}function Tet(){Eet={}}var Eet,Cet,_et=t(()=>{CJ(),Eet={},Cet=new xJ,me(ket,"getRegExpAst"),me(Tet,"clearRegExpParserCache")});function Aet(t,e=!1){try{var r=ket(t);return Let(r.value,{},r.flags.ignoreCase)}catch(r){r.message===Oet?e&&Ntt(`${Pet} Unable to optimize: < ${t.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.`):(e=e?`
This will disable the lexer's first char optimizations.
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",Ltt(`${Pet}
Failed parsing: < ${t.toString()} >
Using the @chevrotain/regexp-to-ast library
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function Let(e,n,a){switch(e.type){case"Disjunction":for(let t=0;t<e.value.length;t++)Let(e.value[t],n,a);break;case"Alternative":var r=e.value;for(let t=0;t<r.length;t++){var i=r[t];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var s=i;switch(s.type){case"Character":Net(s.value,n,a);break;case"Set":if(!0===s.complement)throw Error(Oet);v(s.value,e=>{if("number"==typeof e)Net(e,n,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)Net(t,n,a);else{for(let t=r.from;t<=r.to&&t<brt;t++)Net(t,n,a);if(r.to>=brt){var e=r.from>=brt?r.from:brt,t=r.to,e=urt(e),i=urt(t);for(let t=e;t<=i;t++)n[t]=t}}}});break;case"Group":Let(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===Met(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return YU(n)}function Net(t,e,r){var i=urt(t);e[i]=i,!0===r&&Iet(t,e)}function Iet(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=urt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=urt(r.charCodeAt(0))]=t)}function Ret(t,r){return iU(t.value,t=>{if("number"==typeof t)return KU(r,t);{let e=t;return void 0!==iU(r,t=>e.from<=t&&t<=e.to)}})}function Met(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(KT(t.value)?UG(t.value,Met):Met(t.value))}function Det(e,t){var r,i;return t instanceof RegExp?(r=ket(t),(i=new Bet(e)).visit(r),i.found):void 0!==iU(t,t=>KU(e,t.charCodeAt(0)))}var Oet,Pet,Bet,Fet=t(()=>{CJ(),NW(),Ptt(),_et(),krt(),Oet="Complement Sets are not supported for first char optimization",Pet=`Unable to use "first char" lexer optimizations:
`,me(Aet,"getOptimizedStartCodesIndices"),me(Let,"firstCharOptimizedIndices"),me(Net,"addOptimizedIdxToResult"),me(Iet,"handleIgnoreCase"),me(Ret,"findCode"),me(Met,"isWholeOptional"),Bet=class extends bJ{static{me(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){KU(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Ret(t,this.targetCharCodes)&&(this.found=!0):void 0!==Ret(t,this.targetCharCodes)&&(this.found=!0)}},me(Det,"canMatchCharCode")});function $et(t,n){var e=(n=oG(n,{useSticky:mrt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:me((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{drt()});let r,i=(e("Reject Lexer.NA",()=>{r=Wj(t,t=>t[prt]===Grt.NA)}),!1),a;e("Transform Patterns",()=>{i=!1,a=x(r,t=>{var e,t=t[prt];if(hq(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||KU(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(n.useSticky?ert:trt)(t):e[1]:e;if(C6(t))return i=!0,{exec:t};if("object"==typeof t)return i=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(n.useSticky?ert:trt)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==Grt.SKIPPED){if(zU(t))return t;if(gq(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return KT(t)?x(t,t=>tq(r,t)):[tq(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>BU(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=crt(n.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==n.positionTracking&&(u=x(r,t=>BU(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===ort(t,e)&&Det(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,art),p=x(a,srt),g=Uj(r,(t,e)=>(e=e.GROUP,zU(e)&&e!==Grt.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return n.safeMode||e("First Char Optimization",()=>{y=Uj(r,(r,t,i)=>{if("string"==typeof t.PATTERN){var e=urt(t.PATTERN.charCodeAt(0));hrt(r,e,f[i])}else if(KT(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=urt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,hrt(r,t,f[i]))})}else hq(t.PATTERN)?t.PATTERN.unicode?(m=!1,n.ensureOptimizations&&Ltt(`${Pet} Unable to analyze < ${t.PATTERN.toString()} > pattern.
The regexp unicode flag is not currently supported by the regexp-to-ast library.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=Aet(t.PATTERN,n.ensureOptimizations),aq(e)&&(m=!1),v(e,t=>{hrt(r,t,f[i])})):(n.ensureOptimizations&&Ltt(`${Pet} TokenType: <${t.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:m}}function zet(t,e){let r=[],i=Uet(t);r=r.concat(i.errors);var n=(t=qet(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(Get(n))).concat(Xet(n))).concat(Ket(n,e))).concat(Zet(n))}function Get(t){let e=[],r=VG(t,t=>hq(t[prt]));return e=(e=(e=(e=(e=e.concat(jet(r))).concat(Yet(r))).concat(Het(r))).concat(Vet(r))).concat(Wet(r))}function Uet(t){var e=VG(t,t=>!BU(t,prt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:$rt.MISSING_PATTERN,tokenTypes:[t]})),valid:yG(t,e)}}function qet(t){var e=VG(t,t=>(t=t[prt],!(hq(t)||C6(t)||BU(t,"exec")||zU(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:$rt.INVALID_PATTERN,tokenTypes:[t]})),valid:yG(t,e)}}function jet(t){class i extends bJ{static{me(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=VG(t,t=>{t=t.PATTERN;try{var e=ket(t),r=new i;return r.visit(e),r.found}catch{return yrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error:
Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:$rt.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Wet(t){return t=VG(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:$rt.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function Yet(t){class i extends bJ{static{me(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=VG(t,t=>{t=t.PATTERN;try{var e=ket(t),r=new i;return r.visit(e),r.found}catch{return vrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error:
Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:$rt.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Het(t){return t=VG(t,t=>(t=t[prt])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:$rt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function Vet(t){let i=[],e=x(t,r=>Uj(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||KU(i,e)||e.PATTERN===Grt.NA||(i.push(e),t.push(e)),t),[]));e=o$(e);var r=VG(e,t=>1<t.length);return x(r,t=>{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${oU(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:$rt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function Xet(t){return t=VG(t,t=>!!BU(t,"GROUP")&&(t=t.GROUP)!==Grt.SKIPPED&&t!==Grt.NA&&!zU(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:$rt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function Ket(t,e){return t=VG(t,t=>void 0!==t.PUSH_MODE&&!KU(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:$rt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function Zet(t){let a=[],e=Uj(t,(t,e,r)=>{var i=e.PATTERN;return i!==Grt.NA&&(zU(i)?t.push({str:i,idx:r,tokenType:e}):hq(i)&&Jet(i)&&t.push({str:i.source,idx:r,tokenType:e})),t},[]);return v(t,(i,n)=>{v(e,({str:t,idx:e,tokenType:r})=>{n<e&&Qet(t,i.PATTERN)&&(e=`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:e,type:$rt.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function Qet(t,e){var r;if(hq(e))return null!==(r=e.exec(t))&&0===r.index;if(C6(e))return e(t,0,[],{});if(BU(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function Jet(e){return void 0===iU([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function trt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function ert(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function rrt(t,e,r){let n=[];return BU(t,grt)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+grt+`> property in its definition
`,type:$rt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),BU(t,frt)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+frt+`> property in its definition
`,type:$rt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),BU(t,frt)&&BU(t,grt)&&!BU(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${grt}: <${t.defaultMode}>which does not exist
`,type:$rt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),BU(t,frt)&&v(t.modes,(r,i)=>{v(r,(e,t)=>{gq(e)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${t}>
`,type:$rt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):BU(e,"LONGER_ALT")&&(t=KT(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{gq(t)||KU(r,t)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${i}>
`,type:$rt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function irt(t,e,r){let i=[],n=!1,a=o$(HP(YU(t.modes))),s=Wj(a,t=>t[prt]===Grt.NA),o=crt(r);return e&&v(s,t=>{var e=ort(t,o);!1!==e?(e={message:lrt(t,e),type:e.issue,tokenType:t},i.push(e)):BU(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(n=!0):Det(o,t.PATTERN)&&(n=!0)}),e&&!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:$rt.NO_LINE_BREAKS_FLAGS}),i}function nrt(r){let i={},t=rP(r);return v(t,t=>{var e=r[t];if(!KT(e))throw Error("non exhaustive match");i[t]=[]}),i}function art(t){if(t=t.PATTERN,hq(t))return!1;if(C6(t))return!0;if(BU(t,"exec"))return!0;if(zU(t))return!1;throw Error("non exhaustive match")}function srt(t){return!(!zU(t)||1!==t.length)&&t.charCodeAt(0)}function ort(t,e){if(BU(t,"LINE_BREAKS"))return!1;if(hq(t.PATTERN)){try{Det(e,t.PATTERN)}catch(t){return{issue:$rt.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(zU(t.PATTERN))return!1;if(art(t))return{issue:$rt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function lrt(t,e){if(e.issue===$rt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
The problem is in the <${t.name}> Token Type
Root cause: ${e.errMsg}.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===$rt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
The problem is in the <${t.name}> Token Type
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function crt(t){return x(t,t=>zU(t)?t.charCodeAt(0):t)}function hrt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function urt(t){return t<brt?t:wrt[t]}function drt(){if(aq(wrt)){wrt=new Array(65536);for(let t=0;t<65536;t++)wrt[t]=255<t?255+~~(t/255):t}}var prt,grt,frt,mrt,yrt,vrt,xrt,brt,wrt,krt=t(()=>{CJ(),jrt(),NW(),Ptt(),Fet(),_et(),prt="PATTERN",grt="defaultMode",frt="modes",mrt="boolean"==typeof new RegExp("(?:)").sticky,me($et,"analyzeTokenTypes"),me(zet,"validatePatterns"),me(Get,"validateRegExpPattern"),me(Uet,"findMissingPatterns"),me(qet,"findInvalidPatterns"),yrt=/[^\\][$]/,me(jet,"findEndOfInputAnchor"),me(Wet,"findEmptyMatchRegExps"),vrt=/[^\\[][\^]|^\^/,me(Yet,"findStartOfInputAnchor"),me(Het,"findUnsupportedFlags"),me(Vet,"findDuplicatePatterns"),me(Xet,"findInvalidGroupType"),me(Ket,"findModesThatDoNotExist"),me(Zet,"findUnreachablePatterns"),me(Qet,"testTokenType"),me(Jet,"noMetaChar"),me(trt,"addStartOfInput"),me(ert,"addStickyFlag"),me(rrt,"performRuntimeChecks"),me(irt,"performWarningRuntimeChecks"),me(nrt,"cloneEmptyGroups"),me(art,"isCustomPattern"),me(srt,"isShortPattern"),xrt={test:me(function(e){var r=e.length;for(let t=this.lastIndex;t<r;t++){var i=e.charCodeAt(t);if(10===i)return this.lastIndex=t+1,!0;if(13===i)return 10===e.charCodeAt(t+1)?this.lastIndex=t+2:this.lastIndex=t+1,!0}return!1},"test"),lastIndex:0},me(ort,"checkLineBreaksIssues"),me(lrt,"buildLineBreakIssueMessage"),me(crt,"getCharCodes"),me(hrt,"addToMapOfArrays"),brt=256,wrt=[],me(urt,"charCodeToOptimizedIndex"),me(drt,"initCharCodeToOptimizedIndexMap")});function Trt(t,e){return(t=t.tokenTypeIdx)===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[t]}function Ert(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}function Crt(t){Srt(t=_rt(t)),Lrt(t),Art(t),v(t,t=>{t.isParent=0<t.categoryMatches.length})}function _rt(t){let e=e$(t),r=t,i=!0;for(;i;){r=o$(HP(x(r,t=>t.CATEGORIES)));var n=yG(r,e);e=e.concat(n),aq(n)?i=!1:r=n}return e}function Srt(t){v(t,t=>{Irt(t)||((Brt[Prt]=t).tokenTypeIdx=Prt++),Rrt(t)&&!KT(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Rrt(t)||(t.CATEGORIES=[]),Mrt(t)||(t.categoryMatches=[]),Drt(t)||(t.categoryMatchesMap={})})}function Art(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(Brt[e].tokenTypeIdx)})})}function Lrt(t){v(t,t=>{Nrt([],t)})}function Nrt(r,i){v(r,t=>{i.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(i.CATEGORIES,t=>{var e=r.concat(i);KU(e,t)||Nrt(e,t)})}function Irt(t){return BU(t,"tokenTypeIdx")}function Rrt(t){return BU(t,"CATEGORIES")}function Mrt(t){return BU(t,"categoryMatches")}function Drt(t){return BU(t,"categoryMatchesMap")}function Ort(t){return BU(t,"tokenTypeIdx")}var Prt,Brt,Frt,$rt,zrt,Grt,Urt=t(()=>{NW(),me(Trt,"tokenStructuredMatcher"),me(Ert,"tokenStructuredMatcherNoCategories"),Prt=1,Brt={},me(Crt,"augmentTokenTypes"),me(_rt,"expandCategories"),me(Srt,"assignTokenDefaultProps"),me(Art,"assignCategoriesTokensProp"),me(Lrt,"assignCategoriesMapProp"),me(Nrt,"singleAssignCategoriesToksMap"),me(Irt,"hasShortKeyProperty"),me(Rrt,"hasCategoriesProperty"),me(Mrt,"hasExtendingTokensTypesProperty"),me(Drt,"hasExtendingTokensTypesMapProperty"),me(Ort,"isTokenType")}),qrt=t(()=>{Frt={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,i,n){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),jrt=t(()=>{var t;krt(),NW(),Ptt(),Urt(),qrt(),_et(),(t=$rt=$rt||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",zrt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Frt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(zrt),(Grt=class{static{me(this,"Lexer")}constructor(n,a=zrt){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=(t,e)=>{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+`--> <${t}>`),Rtt(e)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${i}ms`),this.traceInitIndent--,n):e()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=aP({},zrt,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,i=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===zrt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=xrt;else if(this.config.lineTerminatorCharacters===zrt.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=KT(n)?{modes:{defaultMode:e$(n)},defaultMode:grt}:(t=!1,e$(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(rrt(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(irt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=Wj(t,t=>gq(t))}),rP(r.modes)),e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(zet(e,i))}),aq(this.lexerDefinitionErrors)){Crt(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=$et(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=aP({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!aq(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`-----------------------
`),new Error(`Errors detected in definition of Lexer:
`+e);v(this.lexerDefinitionWarning,t=>{Ntt(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(mrt?(this.chopInput=L8,this.match=this.matchWithTest):(this.updateLastIndex=SO,this.match=this.matchWithExec),t&&(this.handleModes=SO),!1===this.trackStartLines&&(this.computeNewColumn=L8),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=SO),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=Uj(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!aq(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Tet()}),this.TRACE_INIT("toFastProperties",()=>{Dtt(this)})})}tokenize(t,e=this.defaultMode){if(aq(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`-----------------------
`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+t)}tokenizeInternal(n,P){let t,a,e,r,i,s,o,l,c,h,B,u,d,F,p,g=n,$=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(n.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=nrt(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],_=[],U=[];Object.freeze(U);let S;function A(){return E}function L(t){return t=urt(t),void 0===(t=C[t])?U:t}me(A,"getPossiblePatternsSlow"),me(L,"getPossiblePatternsOptimized");var q=me(t=>{var e;1===_.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(_.pop(),t=wG(_),E=this.patternIdxToConfig[t],C=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&e?L:A)},"pop_mode");function N(t){_.push(t),C=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&t?L:A}me(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<$;){s=null;var W=g.charCodeAt(f),Y=S(W),H=Y.length;for(t=0;t<H;t++){var R=(I=Y[t]).pattern,V=(o=null,I.short);if(!1!==V?W===V&&(s=R):!0===I.isCustom?null!==(p=R.exec(g,f,y,w))?(s=p[0],void 0!==p.payload&&(o=p.payload)):s=null:(this.updateLastIndex(R,f),s=this.match(R,n,f)),null!==s){if(void 0!==(i=I.longerAlt)){var X=i.length;for(e=0;e<X;e++){var M=E[i[e]],D=M.pattern;if(!(l=null)===M.isCustom?null!==(p=D.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(D,f),r=this.match(D,n,f)),r&&r.length>s.length){s=r,o=l,I=M;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),n=this.chopInput(n,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,i=!1===j;for(;!1===i&&f<$;)for(n=this.chopInput(n,1),f++,a=0;a<T;a++){var O=E[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-t,b=this.computeNewColumn(b,d),F=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,t,d,e,r),v.push({offset:t,line:e,column:r,length:d,message:F}),!1===j)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(t,e,r,i){var n;!0===t.pop?(n=t.push,e(i),void 0!==n&&r.call(this,n)):void 0!==t.push&&r.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}updateTokenEndLineColumnLocation(t,e,r,i,n,a,s){void 0!==e&&(r=(e=r===s-1)?-1:0,1===i&&1==e||(t.endLine=n+r,t.endColumn=a-1-r))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,r,i){return{image:t,startOffset:e,tokenTypeIdx:r,tokenType:i}}createStartOnlyToken(t,e,r,i,n,a){return{image:t,startOffset:e,startLine:n,startColumn:a,tokenTypeIdx:r,tokenType:i}}createFullToken(t,e,r,i,n,a,s){return{image:t,startOffset:e,endOffset:e+s-1,startLine:n,endLine:n,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:i}}addTokenUsingPush(t,e,r){return t.push(r),e}addTokenUsingMemberAccess(t,e,r){return t[e]=r,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,r){return!0===t.test(e)?e.substring(r,t.lastIndex):null}matchWithExec(t,e){return null!==(t=t.exec(e))?t[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",Grt.NA=/NOT_APPLICABLE/});function Wrt(t){return Yrt(t)?t.LABEL:t.name}function Yrt(t){return zU(t.LABEL)&&""!==t.LABEL}function Hrt(t){return Vrt(t)}function Vrt(t){var e=t.pattern,r={};if(r.name=t.name,gq(e)||(r.PATTERN=e),BU(t,Zrt))throw`The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return BU(t,Qrt)&&(r.CATEGORIES=t[Qrt]),Crt([r]),BU(t,Jrt)&&(r.LABEL=t[Jrt]),BU(t,tit)&&(r.GROUP=t[tit]),BU(t,rit)&&(r.POP_MODE=t[rit]),BU(t,eit)&&(r.PUSH_MODE=t[eit]),BU(t,iit)&&(r.LONGER_ALT=t[iit]),BU(t,nit)&&(r.LINE_BREAKS=t[nit]),BU(t,ait)&&(r.START_CHARS_HINT=t[ait]),r}function Xrt(t,e,r,i,n,a,s,o){return{image:e,startOffset:r,endOffset:i,startLine:n,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Krt(t,e){return Trt(t,e)}var Zrt,Qrt,Jrt,tit,eit,rit,iit,nit,ait,sit,oit,lit,cit,hit=t(()=>{NW(),jrt(),Urt(),me(Wrt,"tokenLabel"),me(Yrt,"hasTokenLabel"),Zrt="parent",Qrt="categories",Jrt="label",tit="group",eit="push_mode",rit="pop_mode",iit="longer_alt",nit="line_breaks",ait="start_chars_hint",me(Hrt,"createToken"),me(Vrt,"createTokenInternal"),Crt([sit=Hrt({name:"EOF",pattern:Grt.NA})]),me(Xrt,"createTokenInstance"),me(Krt,"tokenMatcher")}),uit=t(()=>{hit(),NW(),set(),oit={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${Yrt(t)?`--> ${Wrt(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var i="Expecting: ",e=`
but found: '`+oU(e).image+"'";return r?i+r+e:(r=Uj(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>Wrt(t)).join(", ")}]`),i+`one of these possible Token sequences:
`+x(t,(t,e)=>` ${e+1}. `+t).join(`
`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var i="Expecting: ",e=`
but found: '`+oU(e).image+"'";return r?i+r+e:i+`expecting at least one iteration which starts with one of these possible Token sequences::
<${x(t,t=>`[${x(t,t=>Wrt(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(oit),lit={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
inside top level rule: ->`+t.name+"<-"}},cit={buildDuplicateFoundError(t,e){function r(t){return t instanceof Ztt?t.terminalType.name:t instanceof Utt?t.nonTerminalName:""}me(r,"getExtraProductionArgument");let i=t.name,n=oU(e),a=n.idx,s=net(n),o=r(n),l=0<a,c=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""}
appears more than once (${e.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(t){return`Namespace conflict found in grammar.
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
To resolve this make sure each Terminal and Non-Terminal names are unique
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>Wrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>Wrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`},buildEmptyRepetitionError(t){let e=net(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){var e=t.topLevelRule.name;return`Left Recursion found in grammar.
rule: <${e}> can be invoked from itself (directly or indirectly)
without consuming any Tokens. The grammar path that causes this is:
${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")}
To fix this refactor your grammar to remove the left recursion.
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof qtt?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function dit(t,e){return(t=new pit(t,e)).resolveRefs(),t.errors}var pit,git=t(()=>{Rat(),NW(),set(),me(dit,"resolveGrammar"),pit=class extends Qtt{static{me(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(YU(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:Lat.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function fit(e,r,i=[]){i=e$(i);let n=[],a=0;function s(t){return t.concat(EG(e,a+1))}function o(t){return t=fit(s(t),r,i),n.concat(t)}for(me(s,"remainingPathWith"),me(o,"getAlternativesForProd");i.length<r&&a<e.length;){var t=e[a];if(t instanceof jtt)return o(t.definition);if(t instanceof Utt)return o(t.definition);if(t instanceof Wtt)n=o(t.definition);else{if(t instanceof Ytt)return o(t.definition.concat([new Vtt({definition:t.definition})]));if(t instanceof Htt)return o([new jtt({definition:t.definition}),new Vtt({definition:[new Ztt({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof Xtt){var l=t.definition.concat([new Vtt({definition:[new Ztt({terminalType:t.separator})].concat(t.definition)})]);n=o(l)}else if(t instanceof Vtt)l=t.definition.concat([new Vtt({definition:t.definition})]),n=o(l);else{if(t instanceof Ktt)return v(t.definition,t=>{!1===aq(t.definition)&&(n=o(t.definition))}),n;if(!(t instanceof Ztt))throw Error("non exhaustive match");i.push(t.terminalType)}}a++}return n.push({partialPath:i,suffixDef:EG(e,a)}),n}function mit(t,e,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-i-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!aq(u);)if((v=u.pop())===s)o&&wG(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!aq(d)){var m=d[0];if(m===n)v={idx:p,def:EG(d),ruleStack:SG(g),occurrenceStack:SG(f)},u.push(v);else if(m instanceof Ztt)if(p<l-1)r(e[v=p+1],m.terminalType)&&(v={idx:v,def:EG(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 Utt){(v=e$(g)).push(m.nonTerminalName);var y=e$(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,EG(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof Wtt)y={idx:p,def:EG(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(EG(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof Ytt)v=new Vtt({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],EG(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof Htt)v=new Ztt({terminalType:m.separator}),v=new Vtt({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],EG(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof Xtt)v={idx:p,def:EG(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new Ztt({terminalType:m.separator}),v=new Vtt({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],EG(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof Vtt)v={idx:p,def:EG(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new Vtt({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],EG(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof Ktt)for(let t=m.definition.length-1;0<=t;t--){var x={idx:p,def:m.definition[t].definition.concat(EG(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(s)}else if(m instanceof jtt)u.push({idx:p,def:m.definition.concat(EG(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof qtt))throw Error("non exhaustive match");u.push(yit(m,p,g,f))}}}return h}function yit(t,e,r,i){return(r=e$(r)).push(t.name),(i=e$(i)).push(1),{idx:e,def:t.definition,ruleStack:r,occurrenceStack:i}}var vit,xit,bit,wit,kit,Tit,Eit=t(()=>{NW(),met(),het(),set(),xit=class extends cet{static{me(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,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=e$(this.path.ruleStack).reverse(),this.occurrenceStack=e$(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence&&(e=e.concat(r),this.updateExpectedNext(),this.walk(t.referencedRule,e))}updateExpectedNext(){aq(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},vit=class extends xit{static{me(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found&&(t=e.concat(r),e=new jtt({definition:t}),this.possibleTokTypes=uet(e),this.found=!0)}},xit=class extends cet{static{me(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},bit=class extends xit{static{me(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(t,e,r)}},wit=class extends xit{static{me(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(t,e,r)}},kit=class extends xit{static{me(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(t,e,r)}},Tit=class extends xit{static{me(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var i;t.idx===this.occurrence?(i=oU(e.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof Ztt&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(t,e,r)}},me(fit,"possiblePathsFrom"),me(mit,"nextPossibleTokensAfter"),me(yit,"expandTopLevelRule")});function Cit(t){if(t instanceof Wtt||"Option"===t)return zit.OPTION;if(t instanceof Vtt||"Repetition"===t)return zit.REPETITION;if(t instanceof Ytt||"RepetitionMandatory"===t)return zit.REPETITION_MANDATORY;if(t instanceof Htt||"RepetitionMandatoryWithSeparator"===t)return zit.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Xtt||"RepetitionWithSeparator"===t)return zit.REPETITION_WITH_SEPARATOR;if(t instanceof Ktt||"Alternation"===t)return zit.ALTERNATION;throw Error("non exhaustive match")}function _it(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:i}=t;return(r=Cit(r))===zit.ALTERNATION?Oit(t,e,i):Pit(t,e,r,i)}function Sit(t,e,r,i,n,a){return a(t=Oit(t,e,r),i,$it(t)?Ert:Trt,n)}function Ait(t,e,r,i,n,a){return e=$it(t=Pit(t,e,n,r))?Ert:Trt,a(t[0],e,i)}function Lit(c,t,h,e){let u=c.length,r=UG(c,t=>UG(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;e<u;e++){var i=c[e],n=i.length,a=r[e];if(void 0===a||!1!==a.call(this))t:for(let t=0;t<n;t++){var s=i[t],o=s.length;for(let t=0;t<o;t++){var l=this.LA(t+1);if(!1===h(l,s[t]))continue t}return e}}};if(!r||e)return function(){for(let e=0;e<u;e++){var r=c[e],i=r.length;t:for(let t=0;t<i;t++){var n=r[t],a=n.length;for(let t=0;t<a;t++){var s=this.LA(t+1);if(!1===h(s,n[t]))continue t}return e}}};{let t=x(c,t=>HP(t)),e=Uj(t,(e,t,r)=>(v(t,t=>{BU(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{BU(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function Nit(n,a,r){let t=UG(n,t=>1===t.length),s=n.length;if(!t||r)return function(){t:for(let t=0;t<s;t++){var e=n[t],r=e.length;for(let t=0;t<r;t++){var i=this.LA(t+1);if(!1===a(i,e[t]))continue t}return!0}return!1};if(1===(r=HP(n)).length&&aq(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=Uj(r,(e,t,r)=>(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}function Iit(e){var r=new Array(e);for(let t=0;t<e;t++)r[t]=[];return r}function Rit(e){let r=[""];for(let t=0;t<e.length;t++){var i=e[t],n=[];for(let t=0;t<r.length;t++){var a=r[t];n.push(a+"_"+i.tokenTypeIdx);for(let t=0;t<i.categoryMatches.length;t++){var s="_"+i.categoryMatches[t];n.push(a+s)}}r=n}return r}function Mit(e,r,i){for(let t=0;t<e.length;t++)if(t!==i){var n=e[t];for(let t=0;t<r.length;t++)if(!0===n[r[t]])return!1}return!0}function Dit(t,i){let e=x(t,t=>fit([t],1)),n=Iit(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=Rit(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=i;r++){var o=s;s=Iit(o.length);for(let e=0;e<o.length;e++){var l=o[e];for(let t=0;t<l.length;t++){var c=l[t].partialPath,h=l[t].suffixDef,u=Rit(c);if(Mit(a,u,e)||aq(h)||c.length===i){var d=n[e];if(!1===Bit(d,c)){d.push(c);for(let t=0;t<u.length;t++){var p=u[t];a[e][p]=!0}}}else d=fit(h,r+1,c),s[e]=s[e].concat(d),v(d,t=>{t=Rit(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return n}function Oit(t,e,r,i){return t=new Uit(t,zit.ALTERNATION,i),e.accept(t),Dit(t.result,r)}function Pit(t,e,r,i){var n=new Uit(t,r),n=(e.accept(n),n.result),e=new Git(e,t,r).startWalking();return Dit([new jtt({definition:n}),new jtt({definition:e})],i)}function Bit(e,r){t:for(let t=0;t<e.length;t++){var i=e[t];if(i.length===r.length){for(let t=0;t<i.length;t++){var n=r[t],a=i[t];if(0==(n===a||void 0!==a.categoryMatchesMap[n.tokenTypeIdx]))continue t}return!0}}return!1}function Fit(t,r){return t.length<r.length&&UG(t,(t,e)=>t===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function $it(t){return UG(t,t=>UG(t,t=>UG(t,t=>aq(t.categoryMatches))))}var zit,Git,Uit,qit=t(()=>{var t;NW(),Eit(),het(),Urt(),set(),(t=zit=zit||{})[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION",me(Cit,"getProdType"),me(_it,"getLookaheadPaths"),me(Sit,"buildLookaheadFuncForOr"),me(Ait,"buildLookaheadFuncForOptionalProd"),me(Lit,"buildAlternativesLookAheadFunc"),me(Nit,"buildSingleAlternativeLookaheadFunction"),Git=class extends cet{static{me(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,i){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(i),!0)}walkOption(t,e,r){this.checkIsTarget(t,zit.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,zit.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,zit.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,zit.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,zit.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},Uit=class extends Qtt{static{me(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,zit.OPTION)}visitRepetition(t){this.checkIsTarget(t,zit.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,zit.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,zit.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,zit.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,zit.ALTERNATION)}},me(Iit,"initializeArrayOfArrays"),me(Rit,"pathToHashKeys"),me(Mit,"isUniquePrefixHash"),me(Dit,"lookAheadSequenceFromAlternatives"),me(Oit,"getLookaheadPathsForOr"),me(Pit,"getLookaheadPathsForOptionalProd"),me(Bit,"containsPath"),me(Fit,"isStrictPrefixOfPath"),me($it,"areTokenCategoriesNotUsed")});function jit(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:Lat.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Wit(e,t,r,i){var n=mU(e,t=>Yit(t,r)),t=snt(e,t,r),a=mU(e,t=>ent(t,r)),s=mU(e,t=>Xit(t,e,i,r));return n.concat(t,a,s)}function Yit(i,n){var t=new ont,t=(i.accept(t),t.allProductions),t=CU(t,Hit),t=jq(t,t=>1<t.length);return x(YU(t),t=>{var e=oU(t),t=n.buildDuplicateFoundError(i,t),r=net(e),t={message:t,type:Lat.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:e.idx};return(r=Vit(e))&&(t.parameter=r),t})}function Hit(t){return`${net(t)}_#_${t.idx}_#_`+Vit(t)}function Vit(t){return t instanceof Ztt?t.terminalType.name:t instanceof Utt?t.nonTerminalName:""}function Xit(r,t,e,i){var n=[];return 1<Uj(t,(t,e)=>e.name===r.name?t+1:t,0)&&(t=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),n.push({message:t,type:Lat.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function Kit(t,e,r){var i=[];return KU(e,t)||i.push({message:`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:Lat.INVALID_RULE_OVERRIDE,ruleName:t}),i}function Zit(r,t,i,n=[]){var e,a=[],t=Qit(t.definition);return aq(t)?[]:(e=r.name,KU(t,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:Lat.LEFT_RECURSION,ruleName:e}),e=yG(t,n.concat([r])),t=mU(e,t=>{var e=e$(n);return e.push(t),Zit(r,t,i,e)}),a.concat(t))}function Qit(t){let e=[];if(aq(t))return e;if((r=oU(t))instanceof Utt)e.push(r.referencedRule);else if(r instanceof jtt||r instanceof Wtt||r instanceof Ytt||r instanceof Htt||r instanceof Xtt||r instanceof Vtt)e=e.concat(Qit(r.definition));else if(r instanceof Ktt)e=HP(x(r.definition,t=>Qit(t.definition)));else if(!(r instanceof Ztt))throw Error("non exhaustive match");var r=ret(r),i=1<t.length;return r&&i?(r=EG(t),e.concat(Qit(r))):e}function Jit(i,n){var t=new lnt,t=(i.accept(t),t.alternations);return mU(t,r=>{var t=SG(r.definition);return mU(t,(t,e)=>(t=mit([t],[],Trt,1),aq(t)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:e}),type:Lat.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:e+1}]:[]))})}function tnt(i,n,a){var t=new lnt,t=(i.accept(t),t.alternations),t=Wj(t,t=>!0===t.ignoreAmbiguities);return mU(t,t=>{var e=nnt(r=Oit(t.idx,i,t.maxLookahead||n,t),t,i,a),r=ant(r,t,i,a);return e.concat(r)})}function ent(e,r){var t=new lnt,t=(e.accept(t),t.alternations);return mU(t,t=>255<t.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:e,alternation:t}),type:Lat.TOO_MANY_ALTS,ruleName:e.name,occurrence:t.idx}]:[])}function rnt(t,n,a){let s=[];return v(t,i=>{var t=new cnt,t=(i.accept(t),t.allProductions);v(t,t=>{var e=Cit(t),r=t.maxLookahead||n,e=Pit(t.idx,i,e,r)[0];aq(HP(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:t}),s.push({message:r,type:Lat.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function nnt(a,s,r,i){let o=[],t=Uj(a,(t,e,n)=>(!0!==s.definition[n].ignoreAmbiguities&&v(e,r=>{let i=[n];v(a,(t,e)=>{n!==e&&Bit(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&i.push(e)}),1<i.length&&!Bit(o,r)&&(o.push(r),t.push({alts:i,path:r}))}),t),[]);return x(t,t=>{var e=x(t.alts,t=>t+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:Lat.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function ant(t,n,a,s){let o=Uj(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return o$(mU(o,t=>{if(!0===n.definition[t.idx].ignoreAmbiguities)return[];let i=t.idx,e=t.path,r=VG(o,t=>!0!==n.definition[t.idx].ignoreAmbiguities&&t.idx<i&&Fit(t.path,e));return x(r,t=>{var e=[t.idx+1,i+1],r=0===n.idx?"":n.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:n,ambiguityIndices:e,prefixPath:t.path}),type:Lat.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function snt(t,e,r){let i=[],n=x(e,t=>t.name);return v(t,t=>{var e=t.name;KU(n,e)&&(t=r.buildNamespaceConflictError(t),i.push({message:t,type:Lat.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),i}var ont,lnt,cnt,hnt=t(()=>{NW(),Rat(),set(),qit(),Eit(),Urt(),me(jit,"validateLookahead"),me(Wit,"validateGrammar"),me(Yit,"validateDuplicateProductions"),me(Hit,"identifyProductionForDuplicates"),me(Vit,"getExtraProductionArgument"),ont=class extends Qtt{static{me(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}},me(Xit,"validateRuleDoesNotAlreadyExist"),me(Kit,"validateRuleIsOverridden"),me(Zit,"validateNoLeftRecursion"),me(Qit,"getFirstNoneTerminal"),lnt=class extends Qtt{static{me(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},me(Jit,"validateEmptyOrAlternative"),me(tnt,"validateAmbiguousAlternationAlternatives"),cnt=class extends Qtt{static{me(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}},me(ent,"validateTooManyAlts"),me(rnt,"validateSomeNonEmptyLookaheadPath"),me(nnt,"checkAlternativesAmbiguities"),me(ant,"checkPrefixAlternativesAmbiguities"),me(snt,"checkTerminalAndNoneTerminalsNameSpace")});function unt(t){let e=oG(t,{errMsgProvider:lit}),r={};return v(t.rules,t=>{r[t.name]=t}),dit(r,e.errMsgProvider)}function dnt(t){return Wit((t=oG(t,{errMsgProvider:cit})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var pnt=t(()=>{NW(),git(),hnt(),uit(),me(unt,"resolveGrammar"),me(dnt,"validateGrammar")});function gnt(t){return KU(fnt,t.name)}var fnt,mnt,ynt,vnt,xnt,bnt,wnt=t(()=>{NW(),fnt=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(fnt),me(gnt,"isRecognitionException"),mnt=class extends Error{static{me(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},ynt=class extends mnt{static{me(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},vnt=class extends mnt{static{me(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},xnt=class extends mnt{static{me(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},bnt=class extends mnt{static{me(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function knt(t,e,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=sit,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var Tnt,Ent,Cnt,_nt,Snt=t(()=>{hit(),NW(),wnt(),yet(),Rat(),Tnt={},Ent="InRuleRecoveryException",Cnt=class extends Error{static{me(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Ent}},_nt=class{static{me(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(BU(t,"recoveryEnabled")?t:Sat).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=knt)}getTokenToInsert(t){return(t=Xrt(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=me(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new ynt(t,l,this.LA(0))).resyncedTokens=SG(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,i))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,n)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new Cnt("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||aq(e))return!1;let r=this.LA(1);return void 0!==iU(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){var e=this.getCurrFollowKey(),e=this.getFollowSetFromFollowKey(e);return KU(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var i=iU(t,t=>Krt(e,t));if(void 0!==i)return i;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?Tnt:(t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?Tnt:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:i[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return HP(t)}getFollowSetFromFollowKey(t){return t===Tnt?[sit]:(t=t.ruleName+t.idxInCallingRule+fet+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,sit)||e.push(t),e}reSyncTo(t){let e=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return SG(e)}attemptInRepetitionRecovery(t,e,r,i,n,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:e$(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},me(knt,"attemptInRepetitionRecovery")});function Ant(t,e,r){return r|e|t}var Lnt,Nnt=t(()=>{me(Ant,"getKeyForAutomaticLookahead")}),Int=t(()=>{NW(),uit(),Rat(),hnt(),qit(),Lnt=class{static{me(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:Sat.maxLookahead}validate(t){var e,r,i=this.validateNoLeftRecursion(t.rules);return aq(i)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...i,...e,...r,...t]):i}validateNoLeftRecursion(t){return mU(t,t=>Zit(t,t,cit))}validateEmptyOrAlternatives(t){return mU(t,t=>Jit(t,cit))}validateAmbiguousAlternationAlternatives(t,e){return mU(t,t=>tnt(t,e,cit))}validateSomeNonEmptyLookaheadPath(t,e){return rnt(t,e,cit)}buildLookaheadForAlternation(t){return Sit(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Lit)}buildLookaheadForOptional(t){return Ait(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Cit(t.prodType),Nit)}}});function Rnt(t){return Ont.reset(),t.accept(Ont),t=Ont.dslMethods,Ont.reset(),t}var Mnt,Dnt,Ont,Pnt=t(()=>{NW(),Rat(),Nnt(),set(),Int(),Mnt=class{static{me(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(BU(t,"dynamicTokensEnabled")?t:Sat).dynamicTokensEnabled,this.maxLookahead=(BU(t,"maxLookahead")?t:Sat).maxLookahead,this.lookaheadStrategy=BU(t,"lookaheadStrategy")?t.lookaheadStrategy:new Lnt({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:n,repetitionWithSeparator:a}=Rnt(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+net(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=Ant(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,net(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,net(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,net(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,net(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,net(t))})})})}computeLookaheadFunc(r,i,n,a,s,t){this.TRACE_INIT(""+t+(0===i?"":i),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:i,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=Ant(this.fullRuleNameToShort[r.name],n,i);this.setLaFuncCache(e,t)})}getKeyForAutomaticLookahead(t,e){return e|t|this.getLastExplicitRuleShortName()}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},Dnt=class extends Qtt{static{me(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Ont=new Dnt,me(Rnt,"collectMethods")});function Bnt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Fnt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function $nt(t,e,r){void 0===t.children[r]?t.children[r]=[e]:t.children[r].push(e)}function znt(t,e,r){void 0===t.children[e]?t.children[e]=[r]:t.children[e].push(r)}var Gnt=t(()=>{me(Bnt,"setNodeLocationOnlyOffset"),me(Fnt,"setNodeLocationFull"),me($nt,"addTerminalToCst"),me(znt,"addNoneTerminalToCst")});function Unt(t,e){Object.defineProperty(t,qnt,{enumerable:!1,configurable:!0,writable:!1,value:e})}var qnt,jnt=t(()=>{qnt="name",me(Unt,"defineNameProp")});function Wnt(e,r){var i=rP(e),n=i.length;for(let t=0;t<n;t++){var a=e[i[t]],s=a.length;for(let t=0;t<s;t++){var o=a[t];void 0===o.tokenTypeIdx&&this[o.name](o.children,r)}}}function Ynt(t,e){var r=me(function(){},"derivedConstructor"),t=(Unt(r,t+"BaseSemantics"),{visit:me(function(t,e){if(KT(t)&&(t=t[0]),!gq(t))return this[t.name](t.children,e)},"visit"),validateVisitor:me(function(){var t=Vnt(this,e);if(!aq(t))throw t=x(t,t=>t.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
`+t.join(`
`).replace(/\n/g,`
`))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function Hnt(t,e,r){var i=me(function(){},"derivedConstructor");Unt(i,t+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return v(e,t=>{n[t]=Wnt}),i.prototype=n,i.prototype.constructor=i}function Vnt(t,e){return Xnt(t,e)}function Xnt(e,t){return t=VG(t,t=>!1===C6(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Knt.MISSING_METHOD,methodName:t})),o$(t)}var Knt,Znt,Qnt,Jnt,tat,eat,rat,iat=t(()=>{var t;NW(),jnt(),me(Wnt,"defaultVisit"),me(Ynt,"createBaseSemanticVisitorConstructor"),me(Hnt,"createBaseVisitorConstructorWithDefaults"),(t=Knt=Knt||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",me(Vnt,"validateVisitor"),me(Xnt,"validateMissingCstMethods")}),nat=t(()=>{Gnt(),NW(),iat(),Rat(),Znt=class{static{me(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(BU(t,"nodeLocationTracking")?t:Sat).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Fnt,this.setNodeLocationFromNode=Fnt,this.cstPostRule=SO,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=SO,this.setNodeLocationFromNode=SO,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Bnt,this.setNodeLocationFromNode=Bnt,this.cstPostRule=SO,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=SO,this.setNodeLocationFromNode=SO,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=SO,this.setNodeLocationFromNode=SO,this.cstPostRule=SO,this.setInitialNodeLocation=SO}else this.cstInvocationStateUpdate=SO,this.cstFinallyStateUpdate=SO,this.cstPostTerminal=SO,this.cstPostNonTerminal=SO,this.cstPostRule=SO}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];$nt(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];znt(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return gq(this.baseCstVisitorConstructor)?(t=Ynt(this.className,rP(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return gq(this.baseCstVisitorWithDefaultsConstructor)?(t=Hnt(this.className,rP(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}}),aat=t(()=>{Rat(),Qnt=class{static{me(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):_at}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?_at:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),sat=t(()=>{NW(),wnt(),Rat(),uit(),hnt(),set(),Jnt=class{static{me(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Aat){KU(this.definedRulesNames,t)&&(i={message:cit.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Lat.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(i)),this.definedRulesNames.push(t);var i=this.defineRule(t,e,r);return this[t]=i}OVERRIDE_RULE(t,e,r=Aat){var i=Kit(t,this.definedRulesNames,this.className),i=(this.definitionErrors=this.definitionErrors.concat(i),this.defineRule(t,e,r));return this[t]=i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(gnt(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return $tt(YU(this.gastProductionsCache))}}}),oat=t(()=>{NW(),Nnt(),wnt(),qit(),Eit(),Rat(),Snt(),hit(),Urt(),tat=class{static{me(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ert,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},BU(e,"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(KT(t)){if(aq(t))throw Error(`A Token Vocabulary cannot be empty.
Note that the first argument for the parser constructor
is no longer a Token vector (since v4.0).`);if("number"==typeof t[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
For Further details.`)}if(KT(t))this.tokensMap=Uj(t,(t,e)=>(t[e.name]=e,t),{});else if(BU(t,"modes")&&UG(HP(YU(t.modes)),Ort))e=HP(YU(t.modes)),e=fW(e),this.tokensMap=Uj(e,(t,e)=>(t[e.name]=e,t),{});else{if(!k6(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=e$(t)}this.tokensMap.EOF=sit,e=BU(t,"modes")?HP(YU(t.modes)):YU(t),t=UG(e,t=>aq(t.categoryMatches)),this.tokenMatcher=t?Ert:Trt,Crt(YU(this.tokensMap))}defineRule(r,i,t){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called'
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=(BU(t,"resyncEnabled")?t:Aat).resyncEnabled,a=(BU(t,"recoveryValueFunc")?t:Aat).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?me(function(...t){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):me(function(...t){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,t)}catch(t){return this.invokeRuleCatch(t,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:i})}invokeRuleCatch(t,e,r){var i=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(gnt(t)){var n=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return n.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,n.partialCstResult=e)}else if(i)return this.moveToTerminatedState(),r(t);throw n}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let i=this.getLaFuncFromCache(r),n;if("function"!=typeof t){n=t.DEF;let e=t.GATE;if(void 0!==e){let t=i;i=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let i=this.getLaFuncFromCache(e),n;if("function"!=typeof r){n=r.DEF;let e=r.GATE;if(void 0!==e){let t=i;i=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=r;if(!0!==i.call(this))throw this.raiseEarlyExitException(t,zit.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===t;)t=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,kit)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let i=e.DEF,n=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,zit.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(i.call(this),r=me(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,n,r,i,Tit],r,1536,t,Tit)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let i=this.getLaFuncFromCache(e),n;if("function"!=typeof r){n=r.DEF;let e=r.GATE;if(void 0!==e){let t=i;i=me(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else n=r;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,bit,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let i=e.DEF,n=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(i.call(this),e=me(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,n,e,i,wit],e,1280,t,wit)}}repetitionSepSecondInternal(t,e,r,i,n){for(;r();)this.CONSUME(e),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,i,n],r,1536,t,n)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),i=KT(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,i)))return i[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){var t,e;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new xnt(e,t)))}subruleInternal(t,e,r){var i;try{var n=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,i=t.apply(this,n),this.cstPostNonTerminal(i,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),i}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw gnt(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let i;try{var n=this.LA(1);!0===this.tokenMatcher(n,t)?(this.consumeToken(),i=n):this.consumeInternalError(t,n,r)}catch(r){i=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,i),i}consumeInternalError(t,e,r){var i=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ynt(r,e,i))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;e=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,e)}catch(t){throw t.name===Ent?r:t}}saveRecogState(){var t=this.errors,e=e$(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),sit)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),lat=t(()=>{wnt(),NW(),qit(),Rat(),eat=class{static{me(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(BU(t,"errorMessageProvider")?t:Sat).errorMessageProvider}SAVE_ERROR(t){if(gnt(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:e$(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return e$(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var i=this.getCurrRuleFullName(),t=Pit(t,this.getGAstProductions()[i],e,this.maxLookahead)[0],n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:n,previous:this.LA(0),customUserDescription:r,ruleName:i}),this.SAVE_ERROR(new bnt(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=Oit(t,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:i,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new vnt(t,this.LA(1),r))}}}),cat=t(()=>{Eit(),NW(),rat=class{static{me(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(gq(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return mit([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=oU(t.ruleStack),e=this.getGAstProductions()[e];return new vit(e,t).startWalking()}}});function hat(t,e,r,i=!1){pat(r);var n=wG(this.recordingProdStack),a=C6(e)?e:e.DEF,t=new t({definition:[],idx:r});return i&&(t.separator=e.SEP),BU(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),n.definition.push(t),this.recordingProdStack.pop(),gat}function uat(t,e){pat(e);let r=wG(this.recordingProdStack),i=!1===KT(t),n=0==i?t:t.DEF,a=new Ktt({definition:[],idx:e,ignoreAmbiguities:i&&!0===t.IGNORE_AMBIGUITIES});return BU(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=tW(n,t=>C6(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(n,t=>{var e=new jtt({definition:[]});a.definition.push(e),BU(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:BU(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),gat}function dat(t){return 0===t?"":""+t}function pat(t){if(t<0||fat<t)throw(t=new Error(`Invalid DSL Method idx value: <${t}>
Idx value must be a none negative value smaller than `+(fat+1))).KNOWN_RECORDER_ERROR=!0,t}var gat,fat,mat,yat,vat,xat,bat,wat=t(()=>{NW(),set(),jrt(),Urt(),hit(),Rat(),Nnt(),gat={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(gat),fat=Math.pow(2,8)-1,Crt([mat=Hrt({name:"RECORDING_PHASE_TOKEN",pattern:Grt.NA})]),yat=Xrt(mat,`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(yat),vat={name:`This CSTNode indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},xat=class{static{me(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0<r?r:"";this["CONSUME"+t]=function(t,e){return this.consumeInternalRecord(t,r,e)},this["SUBRULE"+t]=function(t,e){return this.subruleInternalRecord(t,r,e)},this["OPTION"+t]=function(t){return this.optionInternalRecord(t,r)},this["OR"+t]=function(t){return this.orInternalRecord(t,r)},this["MANY"+t]=function(t){this.manyInternalRecord(r,t)},this["MANY_SEP"+t]=function(t){this.manySepFirstInternalRecord(r,t)},this["AT_LEAST_ONE"+t]=function(t){this.atLeastOneInternalRecord(r,t)},this["AT_LEAST_ONE_SEP"+t]=function(t){this.atLeastOneSepFirstInternalRecord(r,t)}}this.consume=function(t,e,r){return this.consumeInternalRecord(e,t,r)},this.subrule=function(t,e,r){return this.subruleInternalRecord(e,t,r)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{var e=this;for(let t=0;t<10;t++){var r=0<t?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return _at}topLevelRuleRecord(t,e){try{var r=new qtt({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+`
This error was thrown during the "grammar recording phase" For more info see:
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return hat.call(this,Wtt,t,e)}atLeastOneInternalRecord(t,e){hat.call(this,Ytt,e,t)}atLeastOneSepFirstInternalRecord(t,e){hat.call(this,Htt,e,t,!0)}manyInternalRecord(t,e){hat.call(this,Vtt,e,t)}manySepFirstInternalRecord(t,e){hat.call(this,Xtt,e,t,!0)}orInternalRecord(t,e){return uat.call(this,t,e)}subruleInternalRecord(t,e,r){var i,n;if(pat(e),t&&!1!==BU(t,"ruleName"))return i=wG(this.recordingProdStack),n=t.ruleName,n=new Utt({idx:e,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?vat:gat;throw(r=new Error(`<SUBRULE${dat(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var i;if(pat(e),Irt(t))return i=wG(this.recordingProdStack),r=new Ztt({idx:e,terminalType:t,label:r?.LABEL}),i.definition.push(r),yat;throw(i=new Error(`<CONSUME${dat(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,i}},me(hat,"recordProd"),me(uat,"recordOrProd"),me(dat,"getIdxSuffix"),me(pat,"assertMethodIdxIsValid")}),kat=t(()=>{NW(),Ptt(),Rat(),bat=class{static{me(this,"PerformanceTracer")}initPerformanceTracer(t){var e;BU(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0<t:t):(this.traceInitMaxIdent=0,this.traceInitPerf=Sat.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(t,e){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+`--> <${t}>`),Rtt(e)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${i}ms`),this.traceInitIndent--,n):e()}}});function Tat(n,t){t.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(i,t))&&(e.get||e.set)?Object.defineProperty(n.prototype,t,e):n.prototype[t]=r.prototype[t])})})}var Eat=t(()=>{me(Tat,"applyMixins")});function Cat(t=void 0){return function(){return t}}var _at,Sat,Aat,Lat,Nat,Iat,Rat=t(()=>{var t;NW(),Ptt(),wet(),hit(),uit(),pnt(),Snt(),Pnt(),nat(),aat(),sat(),oat(),lat(),cat(),wat(),kat(),Eat(),hnt(),_at=Xrt(sit,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(_at),Sat=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:oit,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Aat=Object.freeze({recoveryValueFunc:me(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=Lat=Lat||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",me(Cat,"EMPTY_ALT"),(Nat=class e{static{me(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var t;this.selfAnalysisDone=!0;let r=this.className,i=(this.TRACE_INIT("toFastProps",()=>{Dtt(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{i=unt({rules:YU(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;aq(i)&&!1===this.skipValidations&&(t=dnt({rules:YU(this.gastProductionsCache),tokenTypes:YU(this.tokensMap),errMsgProvider:cit,grammarName:r}),e=jit({lookaheadStrategy:this.lookaheadStrategy,rules:YU(this.gastProductionsCache),tokenTypes:YU(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),aq(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=vet(YU(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:YU(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(YU(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!aq(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected:
`+t.join(`
-------------------------------
`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),BU(e,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
For further details.`);this.skipValidations=(BU(e,"skipValidations")?e:Sat).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Tat(Nat,[_nt,Mnt,Znt,Qnt,tat,Jnt,eat,rat,xat,bat]),Iat=class extends Nat{static{me(this,"EmbeddedActionsParser")}constructor(t,e=Sat){(e=e$(e)).outputCst=!1,super(t,e)}}}),Mat=t(()=>{set()}),Dat=t(()=>{}),Oat=t(()=>{Mat(),Dat()}),Pat=t(()=>{Att()}),Bat=t(()=>{Att(),Rat(),jrt(),hit(),qit(),Int(),uit(),wnt(),qrt(),set(),set(),Oat(),Pat()});function Fat(t,e,r){return t.name+`_${e}_`+r}function $at(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},i=(zat(r,e),e.length);for(let t=0;t<i;t++){var n=e[t],a=Vat(r,n,n);void 0!==a&&nst(r,n,a)}return r}function zat(e,r){var i=r.length;for(let t=0;t<i;t++){var n=r[t],a=sst(e,n,void 0,{type:hst}),s=sst(e,n,void 0,{type:pst});a.stop=s,e.ruleToStartState.set(n,a),e.ruleToStopState.set(n,s)}}function Gat(t,e,r){return r instanceof Ztt?rst(t,e,r.terminalType,r):(r instanceof Utt?ist:r instanceof Ktt?Yat:r instanceof Wtt?Hat:r instanceof Vtt?Uat:r instanceof Xtt?qat:r instanceof Ytt?jat:r instanceof Htt?Wat:Vat)(t,e,r)}function Uat(t,e,r){var i=sst(t,e,r,{type:dst});return Qat(t,i),Kat(t,e,r,Jat(t,e,i,r,Vat(t,e,r)))}function qat(t,e,r){var i=sst(t,e,r,{type:dst});return Qat(t,i),Kat(t,e,r,Jat(t,e,i,r,Vat(t,e,r)),rst(t,e,r.separator,r))}function jat(t,e,r){var i=sst(t,e,r,{type:ust});return Qat(t,i),Xat(t,e,r,Jat(t,e,i,r,Vat(t,e,r)))}function Wat(t,e,r){var i=sst(t,e,r,{type:ust});return Qat(t,i),Xat(t,e,r,Jat(t,e,i,r,Vat(t,e,r)),rst(t,e,r.separator,r))}function Yat(e,r,t){var i=sst(e,r,t,{type:cst}),n=(Qat(e,i),x(t.definition,t=>Gat(e,r,t)));return Jat(e,r,i,t,...n)}function Hat(t,e,r){var i=sst(t,e,r,{type:cst});return Qat(t,i),Zat(t,e,r,Jat(t,e,i,r,Vat(t,e,r)))}function Vat(e,r,t){return 1===(t=VG(x(t.definition,t=>Gat(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:est(e,t)}function Xat(t,e,r,i,n){var a=i.left,i=i.right,s=sst(t,e,r,{type:yst}),o=(Qat(t,s),sst(t,e,r,{type:vst}));return a.loopback=s,o.loopback=s,ast(i,t.decisionMap[Fat(e,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(ast(s,a),ast(s,o)):(ast(s,o),ast(s,n.left),ast(n.right,a)),{left:a,right:o}}function Kat(t,e,r,i,n){var a=i.left,i=i.right,s=sst(t,e,r,{type:mst}),o=(Qat(t,s),sst(t,e,r,{type:vst})),l=sst(t,e,r,{type:fst});return s.loopback=l,o.loopback=l,ast(s,a),ast(s,o),ast(i,l),void 0!==n?(ast(l,o),ast(l,n.left),ast(n.right,a)):ast(l,s),{left:t.decisionMap[Fat(e,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function Zat(t,e,r,i){var n=i.left;return ast(n,i.right),t.decisionMap[Fat(e,"Option",r.idx)]=n,i}function Qat(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Jat(t,e,r,i,...n){var a,s=sst(t,e,i,{type:gst,start:r});r.end=s;for(a of n)void 0!==a?(ast(r,a.left),ast(a.right,s)):ast(r,s);return n={left:r,right:s},t.decisionMap[Fat(e,tst(i),i.idx)]=r,n}function tst(t){if(t instanceof Ktt)return"Alternation";if(t instanceof Wtt)return"Option";if(t instanceof Vtt)return"Repetition";if(t instanceof Xtt)return"RepetitionWithSeparator";if(t instanceof Ytt)return"RepetitionMandatory";if(t instanceof Htt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function est(e,r){var i=r.length;for(let t=0;t<i-1;t++){var n,a=r[t],s=(n=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof kst,o=n,l=r[t+1].left;a.left.type===cst&&a.right.type===cst&&void 0!==n&&(s&&o.followState===a.right||n.target===a.right)?(s?o.followState=l:n.target=l,lst(e,a.right)):ast(a.right,l)}return{left:r[0].left,right:r[i-1].right}}function rst(t,e,r,i){var n=sst(t,e,i,{type:cst}),t=sst(t,e,i,{type:cst});return ost(n,new bst(t,r)),{left:n,right:t}}function ist(t,e,r){var i=r.referencedRule,n=t.ruleToStartState.get(i),a=sst(t,e,r,{type:cst}),t=sst(t,e,r,{type:cst});return ost(a,new kst(n,i,t)),{left:a,right:t}}function nst(t,e,r){var i=t.ruleToStartState.get(e),t=(ast(i,r.left),t.ruleToStopState.get(e));return ast(r.right,t),{left:i,right:t}}function ast(t,e){ost(t,new wst(e))}function sst(t,e,r,i){return r=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},i),t.states.push(r),r}function ost(t,e){0===t.transitions.length&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function lst(t,e){t.states.splice(t.states.indexOf(e),1)}var cst,hst,ust,dst,pst,gst,fst,mst,yst,vst,xst,bst,wst,kst,Tst=t(()=>{gU(),XG(),Bat(),me(Fat,"buildATNKey"),cst=1,hst=2,ust=4,dst=5,pst=7,gst=8,fst=9,mst=10,yst=11,vst=12,xst=class{static{me(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},bst=class extends xst{static{me(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},wst=class extends xst{static{me(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},kst=class extends xst{static{me(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},me($at,"createATN"),me(zat,"createRuleStartAndStopATNStates"),me(Gat,"atom"),me(Uat,"repetition"),me(qat,"repetitionSep"),me(jat,"repetitionMandatory"),me(Wat,"repetitionMandatorySep"),me(Yat,"alternation"),me(Hat,"option"),me(Vat,"block"),me(Xat,"plus"),me(Kat,"star"),me(Zat,"optional"),me(Qat,"defineDecisionState"),me(Jat,"makeAlts"),me(tst,"getProdType"),me(est,"makeBlock"),me(rst,"tokenRef"),me(ist,"ruleRef"),me(nst,"buildRuleHandle"),me(ast,"epsilon"),me(sst,"newState"),me(ost,"addTransition"),me(lst,"removeState")});function Est(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Cst,_st,Sst=t(()=>{gU(),Cst={},_st=class{static{me(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Est(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return x(this.configs,t=>t.alt)}get key(){let t="";for(var e in this.map)t+=e+":";return t}},me(Est,"getATNConfigKey")});function Ast(i,n){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:i,decision:n,states:{}},a[e]=r),r}}function Lst(t,e=!0){var r,i=new Set;for(r of t){var n,a,s=new Set;for(n of r){if(void 0===n){if(e)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 Nst(e){var r=e.decisionStates.length,i=Array(r);for(let t=0;t<r;t++)i[t]=Ast(e.decisionStates[t],t);return i}function Ist(t,e,r,i){let n=t[e](r),a=n.start;return void 0===a&&(t=Wst(n.atnStartState),a=jst(n,Ust(t)),n.start=a),Rst.apply(this,[n,a,r,i])}function Rst(t,e,r,i){let n=e,a=1,s=[],o=this.LA(a++);for(;;){var l=Fst(n,o);if((l=void 0===l?Mst.apply(this,[t,n,o,a,r,i]):l)===Cst)return Bst(s,n,o);if(!0===l.isAcceptState)return l.prediction;n=l,s.push(o),o=this.LA(a++)}}function Mst(t,e,r,i,n,a){var s=$st(e.configs,r,n);if(0===s.size)return qst(t,e,r,Cst),Cst;let o=Ust(s),l=Gst(s,n);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):Kst(s)&&(n=Lq(s.alts),o.isAcceptState=!0,o.prediction=n,o.configs.uniqueAlt=n,Dst.apply(this,[t,i,s.alts,a])),o=qst(t,e,r,o)}function Dst(t,e,r,i){var n=[];for(let t=1;t<=e;t++)n.push(this.LA(t).tokenType);i(Ost({topLevelRule:(t=t.atnStartState).rule,ambiguityIndices:r,production:t.production,prefixPath:n}))}function Ost(t){var e=x(t.prefixPath,t=>Wrt(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Pst(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`}function Pst(t){if(t instanceof Utt)return"SUBRULE";if(t instanceof Wtt)return"OPTION";if(t instanceof Ktt)return"OR";if(t instanceof Ytt)return"AT_LEAST_ONE";if(t instanceof Htt)return"AT_LEAST_ONE_SEP";if(t instanceof Xtt)return"MANY_SEP";if(t instanceof Vtt)return"MANY";if(t instanceof Ztt)return"CONSUME";throw Error("non exhaustive match")}function Bst(t,e,r){return e=mU(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:vW(e.filter(t=>t instanceof bst).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Fst(t,e){return t.edges[e.tokenTypeIdx]}function $st(t,e,r){var i,n=new _st,a=[];for(i of t.elements)if(!1!==r.is(i.alt))if(i.state.type===pst)a.push(i);else{var s=i.state.transitions.length;for(let t=0;t<s;t++){var o=zst(i.state.transitions[t],e);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 _st;for(var c of n.elements)Yst(c,l)}if(0<a.length&&!Vst(l))for(var h of a)l.add(h);return l}function zst(t,e){if(t instanceof bst&&Krt(e,t.tokenType))return t.target}function Gst(t,e){let r;for(var i of t.elements)if(!0===e.is(i.alt))if(void 0===r)r=i.alt;else if(r!==i.alt)return;return r}function Ust(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function qst(t,e,r,i){return i=jst(t,i),e.edges[r.tokenTypeIdx]=i}function jst(t,e){var r,i;return e===Cst?e:(r=e.configs.key,void 0!==(i=t.states[r])?i:(e.configs.finalize(),t.states[r]=e))}function Wst(e){var r=new _st,i=e.transitions.length;for(let t=0;t<i;t++)Yst({state:e.transitions[t].target,alt:t,stack:[]},r);return r}function Yst(e,r){var t,i=e.state;if(i.type===pst)0<e.stack.length?Yst({state:(t=[...e.stack]).pop(),alt:e.alt,stack:t},r):r.add(e);else{i.epsilonOnlyTransitions||r.add(e);var n=i.transitions.length;for(let t=0;t<n;t++){var a=Hst(e,i.transitions[t]);void 0!==a&&Yst(a,r)}}}function Hst(t,e){var r;return e instanceof wst?{state:e.target,alt:t.alt,stack:t.stack}:e instanceof kst?(r=[...t.stack,e.followState],{state:e.target,alt:t.alt,stack:r}):void 0}function Vst(t){for(var e of t.elements)if(e.state.type===pst)return!0;return!1}function Xst(t){for(var e of t.elements)if(e.state.type!==pst)return!1;return!0}function Kst(t){return!!Xst(t)||Qst(t=Zst(t.elements))&&!Jst(t)}function Zst(t){var r,i=new Map;for(r of t){let t=Est(r,!1),e=i.get(t);void 0===e&&(e={},i.set(t,e)),e[r.alt]=!0}return i}function Qst(t){for(var e of Array.from(t.values()))if(1<Object.keys(e).length)return!0;return!1}function Jst(t){for(var e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}var tot,eot,rot,iot,not,aot,sot,oot,lot,cot,hot,uot,dot,pot,got,fot,mot,yot,vot,xot,bot,wot,kot,Tot,Eot,Cot,_ot,Sot,Aot,Lot,Not,Iot,Rot,Mot,Dot,Oot,Pot,Bot,Fot,$ot,zot,Got,Uot,qot,jot,Wot,Yot,Hot,Vot,Xot,Kot,Zot,Qot,Jot,tlt,elt,rlt,ilt,nlt,alt,slt,olt,llt,clt,hlt,ult,dlt,plt,glt,flt,mlt,ylt,vlt,xlt,blt,wlt,klt,Tlt,Elt,Clt,_lt,ye,Slt,Alt,Llt,Nlt,Ilt,Rlt,Mlt=t(()=>{Bat(),Tst(),Sst(),Nq(),yU(),xW(),gU(),VP(),MG(),sq(),qj(),me(Ast,"createDFACache"),tot=class{static{me(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;t<r;t++)e+=!0===this.predicates[t]?"1":"0";return e}},eot=new tot,rot=class extends Lnt{static{me(this,"LLStarLookaheadStrategy")}constructor(t){super(),this.logging=null!=(t=t?.logging)?t:t=>console.log(t)}initialize(t){this.atn=$at(t.rules),this.dfas=Nst(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=t,a=this.dfas,s=this.logging,o=Fat(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(_it({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Lst(c,!1)||n)return i?function(e){var r=new tot,i=void 0===e?0:e.length;for(let t=0;t<i;t++){var n=e?.[t].GATE;r.set(t,void 0===n||n.call(this))}var t=Ist.call(this,a,l,r,s);return"number"==typeof t?t:void 0}:function(){var t=Ist.call(this,a,l,eot,s);return"number"==typeof t?t:void 0};{let r=Uj(c,(e,t,r)=>(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return i?function(t){var e=this.LA(1),e=r[e.tokenTypeIdx];if(void 0===t||void 0===e||void 0===(t=null==(t=t[e])?void 0:t.GATE)||!1!==t.call(this))return e}:function(){var t=this.LA(1);return r[t.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:t,rule:e,prodType:i,dynamicTokensEnabled:n}=r,a=this.dfas,s=this.logging,o=Fat(e,i,t),l=this.atn.decisionMap[o].decision,c=x(_it({maxLookahead:1,occurrence:t,prodType:i,rule:e}),t=>x(t,t=>t[0]));if(Lst(c)&&c[0][0]&&!n){if(r=c[0],1===(r=HP(r)).length&&aq(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=Uj(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=Ist.call(this,a,l,eot,s);return"object"!=typeof t&&0===t}}},me(Lst,"isLL1Sequence"),me(Nst,"initATNSimulator"),me(Ist,"adaptivePredict"),me(Rst,"performLookahead"),me(Mst,"computeLookaheadTarget"),me(Dst,"reportLookaheadAmbiguity"),me(Ost,"buildAmbiguityError"),me(Pst,"getProductionDslName"),me(Bst,"buildAdaptivePredictError"),me(Fst,"getExistingTargetState"),me($st,"computeReachSet"),me(zst,"getReachableTarget"),me(Gst,"getUniqueAlt"),me(Ust,"newDFAState"),me(qst,"addDFAEdge"),me(jst,"addDFAState"),me(Wst,"computeStartState"),me(Yst,"closure"),me(Hst,"getEpsilonTarget"),me(Vst,"hasConfigInRuleStopState"),me(Xst,"allConfigsInRuleStopStates"),me(Kst,"hasConflictTerminatingPrediction"),me(Zst,"getConflictingAltSets"),me(Qst,"hasConflictingAltSet"),me(Jst,"hasStateAssociatedWithOneAlt")}),Dlt=t(()=>{Mlt()}),Olt=t(()=>{function t(t){return"string"==typeof t}var e,r,i,n;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?sot.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?sot.MAX_VALUE:e}}function c(t){return ye.objectLiteral(t)&&ye.uinteger(t.line)&&ye.uinteger(t.character)}function h(t,e,r,i){if(ye.uinteger(t)&&ye.uinteger(e)&&ye.uinteger(r)&&ye.uinteger(i))return{start:oot.create(t,e),end:oot.create(r,i)};if(oot.is(t)&&oot.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${i}]`)}function u(t){return ye.objectLiteral(t)&&oot.is(t.start)&&oot.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return ye.objectLiteral(t)&&lot.is(t.range)&&(ye.string(t.uri)||ye.undefined(t.uri))}function g(t,e,r,i){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:i}}function f(t){return ye.objectLiteral(t)&&lot.is(t.targetRange)&&ye.string(t.targetUri)&&lot.is(t.targetSelectionRange)&&(lot.is(t.originSelectionRange)||ye.undefined(t.originSelectionRange))}function m(t,e,r,i){return{red:t,green:e,blue:r,alpha:i}}function y(t){return ye.objectLiteral(t)&&ye.numberRange(t.red,0,1)&&ye.numberRange(t.green,0,1)&&ye.numberRange(t.blue,0,1)&&ye.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return ye.objectLiteral(t)&&lot.is(t.range)&&uot.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.undefined(t.textEdit)||kot.is(t))&&(ye.undefined(t.additionalTextEdits)||ye.typedArray(t.additionalTextEdits,kot.is))}function k(t,e,r,i,n,a){return t={startLine:t,endLine:e},ye.defined(r)&&(t.startCharacter=r),ye.defined(i)&&(t.endCharacter=i),ye.defined(n)&&(t.kind=n),ye.defined(a)&&(t.collapsedText=a),t}function T(t){return ye.objectLiteral(t)&&ye.uinteger(t.startLine)&&ye.uinteger(t.startLine)&&(ye.undefined(t.startCharacter)||ye.uinteger(t.startCharacter))&&(ye.undefined(t.endCharacter)||ye.uinteger(t.endCharacter))&&(ye.undefined(t.kind)||ye.string(t.kind))}function E(t,e){return{location:t,message:e}}function C(t){return ye.defined(t)&&cot.is(t.location)&&ye.string(t.message)}function _(t){return ye.objectLiteral(t)&&ye.string(t.href)}function S(t,e,r,i,n,a){return t={range:t,message:e},ye.defined(r)&&(t.severity=r),ye.defined(i)&&(t.code=i),ye.defined(n)&&(t.source=n),ye.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return ye.defined(t)&&lot.is(t.range)&&ye.string(t.message)&&(ye.number(t.severity)||ye.undefined(t.severity))&&(ye.integer(t.code)||ye.string(t.code)||ye.undefined(t.code))&&(ye.undefined(t.codeDescription)||ye.string(null==(e=t.codeDescription)?void 0:e.href))&&(ye.string(t.source)||ye.undefined(t.source))&&(ye.undefined(t.relatedInformation)||ye.typedArray(t.relatedInformation,mot.is))}function L(t,e,...r){return t={title:t,command:e},ye.defined(r)&&0<r.length&&(t.arguments=r),t}function N(t){return ye.defined(t)&&ye.string(t.title)&&ye.string(t.command)}function I(t,e){return{range:t,newText:e}}function R(t,e){return{range:{start:t,end:t},newText:e}}function M(t){return{range:t,newText:""}}function P(t){return ye.objectLiteral(t)&&ye.string(t.newText)&&lot.is(t.range)}function B(t,e,r){return t={label:t},void 0!==e&&(t.needsConfirmation=e),void 0!==r&&(t.description=r),t}function F(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ye.string(t.description)||void 0===t.description)}function $(t){return ye.string(t)}function z(t,e,r){return{range:t,newText:e,annotationId:r}}function G(t,e,r){return{range:{start:t,end:t},newText:e,annotationId:r}}function U(t,e){return{range:t,newText:"",annotationId:e}}function q(t){return kot.is(t)&&(Tot.is(t.annotationId)||Eot.is(t.annotationId))}function j(t,e){return{textDocument:t,edits:e}}function W(t){return ye.defined(t)&&Mot.is(t.textDocument)&&Array.isArray(t.edits)}function Y(t,e,r){return t={kind:"create",uri:t},void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(t.options=e),void 0!==r&&(t.annotationId=r),t}function H(t){return t&&"create"===t.kind&&ye.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ye.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ye.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Eot.is(t.annotationId))}function V(t,e,r,i){return t={kind:"rename",oldUri:t,newUri:e},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(t.options=r),void 0!==i&&(t.annotationId=i),t}function X(t){return t&&"rename"===t.kind&&ye.string(t.oldUri)&&ye.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ye.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ye.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Eot.is(t.annotationId))}function K(t,e,r){return t={kind:"delete",uri:t},void 0===e||void 0===e.recursive&&void 0===e.ignoreIfNotExists||(t.options=e),void 0!==r&&(t.annotationId=r),t}function Z(t){return t&&"delete"===t.kind&&ye.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ye.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ye.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Eot.is(t.annotationId))}function Q(t){return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(t=>ye.string(t.kind)?Sot.is(t)||Aot.is(t)||Lot.is(t):_ot.is(t)))}function J(t){return{uri:t}}function tt(t){return ye.defined(t)&&ye.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return ye.defined(t)&&ye.string(t.uri)&&ye.integer(t.version)}function it(t,e){return{uri:t,version:e}}function nt(t){return ye.defined(t)&&ye.string(t.uri)&&(null===t.version||ye.integer(t.version))}function at(t,e,r,i){return{uri:t,languageId:e,version:r,text:i}}function st(t){return ye.defined(t)&&ye.string(t.uri)&&ye.string(t.languageId)&&ye.integer(t.version)&&ye.string(t.text)}function ot(t){return t===i.PlainText||t===i.Markdown}function lt(t){var e=t;return ye.objectLiteral(t)&&Oot.is(e.kind)&&ye.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&ye.string(t.newText)&&lot.is(t.insert)&&lot.is(t.replace)}function ut(t){return t&&(ye.string(t.detail)||void 0===t.detail)&&(ye.string(t.description)||void 0===t.description)}function dt(t){return{label:t}}function pt(t,e){return{items:t||[],isIncomplete:!!e}}function gt(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function ft(t){return ye.string(t)||ye.objectLiteral(t)&&ye.string(t.language)&&ye.string(t.value)}function mt(t){var e=t;return!!e&&ye.objectLiteral(e)&&(Pot.is(e.contents)||jot.is(e.contents)||ye.typedArray(e.contents,jot.is))&&(void 0===t.range||lot.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},ye.defined(e)&&(t.documentation=e),ye.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},ye.number(e)&&(t.kind=e),t}function bt(t,e,r,i,n){return t={name:t,kind:e,location:{uri:i,range:r}},n&&(t.containerName=n),t}function wt(t,e,r,i){return void 0!==i?{name:t,kind:e,location:{uri:r,range:i}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,i,n,a){return t={name:t,detail:e,kind:r,range:i,selectionRange:n},void 0!==a&&(t.children=a),t}function Tt(t){return t&&ye.string(t.name)&&ye.number(t.kind)&&lot.is(t.range)&&lot.is(t.selectionRange)&&(void 0===t.detail||ye.string(t.detail))&&(void 0===t.deprecated||ye.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}function Et(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Ct(t){return ye.defined(t)&&ye.typedArray(t.diagnostics,bot.is)&&(void 0===t.only||ye.typedArray(t.only,ye.string))&&(void 0===t.triggerKind||t.triggerKind===elt.Invoked||t.triggerKind===elt.Automatic)}function _t(t,e,r){let i={title:t},n=!0;return"string"==typeof e?(n=!1,i.kind=e):wot.is(e)?i.command=e:i.edit=e,n&&void 0!==r&&(i.kind=r),i}function St(t){return t&&ye.string(t.title)&&(void 0===t.diagnostics||ye.typedArray(t.diagnostics,bot.is))&&(void 0===t.kind||ye.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||wot.is(t.command))&&(void 0===t.isPreferred||ye.boolean(t.isPreferred))&&(void 0===t.edit||Not.is(t.edit))}function At(t,e){return t={range:t},ye.defined(e)&&(t.data=e),t}function Lt(t){return ye.defined(t)&&lot.is(t.range)&&(ye.undefined(t.command)||wot.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return ye.defined(t)&&ye.uinteger(t.tabSize)&&ye.boolean(t.insertSpaces)}function Rt(t,e,r){return{range:t,target:e,data:r}}function Mt(t){return ye.defined(t)&&lot.is(t.range)&&(ye.undefined(t.target)||ye.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return ye.objectLiteral(t)&&lot.is(t.range)&&(void 0===t.parent||n.is(t.parent))}function Pt(t){return ye.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}function Bt(t,e){return{range:t,text:e}}function Ft(t){return null!=t&&lot.is(t.range)&&ye.string(t.text)}function $t(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&lot.is(t.range)&&ye.boolean(t.caseSensitiveLookup)&&(ye.string(t.variableName)||void 0===t.variableName)}function Gt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&lot.is(t.range)&&(ye.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function jt(t){return ye.defined(t)&&lot.is(t.stoppedLocation)}function Wt(t){return 1===t||2===t}function Yt(t){return{value:t}}function Ht(t){return ye.objectLiteral(t)&&(void 0===t.tooltip||ye.string(t.tooltip)||Pot.is(t.tooltip))&&(void 0===t.location||cot.is(t.location))&&(void 0===t.command||wot.is(t.command))}function Vt(t,e,r){return t={position:t,label:e},void 0!==r&&(t.kind=r),t}function Xt(t){return ye.objectLiteral(t)&&oot.is(t.position)&&(ye.string(t.label)||ye.typedArray(t.label,mlt.is))&&(void 0===t.kind||flt.is(t.kind))&&void 0===t.textEdits||ye.typedArray(t.textEdits,kot.is)&&(void 0===t.tooltip||ye.string(t.tooltip)||Pot.is(t.tooltip))&&(void 0===t.paddingLeft||ye.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ye.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,i){return{insertText:t,filterText:e,range:r,command:i}}function Qt(t){return{items:t}}function Jt(t,e){return{range:t,text:e}}function te(t,e){return{triggerKind:t,selectedCompletionInfo:e}}function ee(t){return ye.objectLiteral(t)&&not.is(t.uri)&&ye.string(t.name)}function re(t,e,r,i){return new _lt(t,e,r,i)}function ie(t){return!!(ye.defined(t)&&ye.string(t.uri)&&(ye.undefined(t.languageId)||ye.string(t.languageId))&&ye.uinteger(t.lineCount)&&ye.func(t.getText)&&ye.func(t.positionAt)&&ye.func(t.offsetAt))}function ne(e,t){let r=e.getText(),i=D(t,(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),n=r.length;for(let t=i.length-1;0<=t;t--){var a=i[t],s=e.offsetAt(a.range.start),o=e.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 D(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);D(s,n),D(o,n);let t=0,e=0,r=0;for(;t<s.length&&e<o.length;)n(s[t],o[e])<=0?i[r++]=s[t++]:i[r++]=o[e++];for(;t<s.length;)i[r++]=s[t++];for(;e<o.length;)i[r++]=o[e++]}return i}O=iot=iot||{},me(t,"is"),O.is=t,O=not=not||{},me(a,"is"),O.is=a,(e=aot=aot||{}).MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,me(s,"is"),e.is=s,(r=sot=sot||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,me(o,"is"),r.is=o,O=oot=oot||{},me(l,"create"),O.create=l,me(c,"is"),O.is=c,O=lot=lot||{},me(h,"create"),O.create=h,me(u,"is"),O.is=u,O=cot=cot||{},me(d,"create"),O.create=d,me(p,"is"),O.is=p,O=hot=hot||{},me(g,"create"),O.create=g,me(f,"is"),O.is=f,O=uot=uot||{},me(m,"create"),O.create=m,me(y,"is"),O.is=y,O=dot=dot||{},me(v,"create"),O.create=v,me(x,"is"),O.is=x,O=pot=pot||{},me(b,"create"),O.create=b,me(w,"is"),O.is=w,(O=got=got||{}).Comment="comment",O.Imports="imports",O.Region="region",O=fot=fot||{},me(k,"create"),O.create=k,me(T,"is"),O.is=T,O=mot=mot||{},me(E,"create"),O.create=E,me(C,"is"),O.is=C,(O=yot=yot||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=vot=vot||{}).Unnecessary=1,O.Deprecated=2,O=xot=xot||{},me(_,"is"),O.is=_,O=bot=bot||{},me(S,"create"),O.create=S,me(A,"is"),O.is=A,O=wot=wot||{},me(L,"create"),O.create=L,me(N,"is"),O.is=N,O=kot=kot||{},me(I,"replace"),O.replace=I,me(R,"insert"),O.insert=R,me(M,"del"),O.del=M,me(P,"is"),O.is=P,O=Tot=Tot||{},me(B,"create"),O.create=B,me(F,"is"),O.is=F,O=Eot=Eot||{},me($,"is"),O.is=$,O=Cot=Cot||{},me(z,"replace"),O.replace=z,me(G,"insert"),O.insert=G,me(U,"del"),O.del=U,me(q,"is"),O.is=q,O=_ot=_ot||{},me(j,"create"),O.create=j,me(W,"is"),O.is=W,O=Sot=Sot||{},me(Y,"create"),O.create=Y,me(H,"is"),O.is=H,O=Aot=Aot||{},me(V,"create"),O.create=V,me(X,"is"),O.is=X,O=Lot=Lot||{},me(K,"create"),O.create=K,me(Z,"is"),O.is=Z,O=Not=Not||{},me(Q,"is"),O.is=Q,O=Iot=Iot||{},me(J,"create"),O.create=J,me(tt,"is"),O.is=tt,O=Rot=Rot||{},me(et,"create"),O.create=et,me(rt,"is"),O.is=rt,O=Mot=Mot||{},me(it,"create"),O.create=it,me(nt,"is"),O.is=nt,O=Dot=Dot||{},me(at,"create"),O.create=at,me(st,"is"),O.is=st,(i=Oot=Oot||{}).PlainText="plaintext",i.Markdown="markdown",me(ot,"is"),i.is=ot,O=Pot=Pot||{},me(lt,"is"),O.is=lt,(O=Bot=Bot||{}).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=Fot=Fot||{}).PlainText=1,O.Snippet=2,O=$ot=$ot||{},me(ct,"create"),O.create=ct,me(ht,"is"),O.is=ht,(O=zot=zot||{}).asIs=1,O.adjustIndentation=2,O=Got=Got||{},me(ut,"is"),O.is=ut,O=Uot=Uot||{},me(dt,"create"),O.create=dt,O=qot=qot||{},me(pt,"create"),O.create=pt,O=jot=jot||{},me(gt,"fromPlainText"),O.fromPlainText=gt,me(ft,"is"),O.is=ft,O=Wot=Wot||{},me(mt,"is"),O.is=mt,O=Yot=Yot||{},me(yt,"create"),O.create=yt,O=Hot=Hot||{},me(vt,"create"),O.create=vt,(O=Vot=Vot||{}).Text=1,O.Read=2,O.Write=3,O=Xot=Xot||{},me(xt,"create"),O.create=xt,(O=Kot=Kot||{}).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,O=Zot=Zot||{},me(bt,"create"),O.create=bt,O=Qot=Qot||{},me(wt,"create"),O.create=wt,O=Jot=Jot||{},me(kt,"create"),O.create=kt,me(Tt,"is"),O.is=Tt,(O=tlt=tlt||{}).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=elt=elt||{}).Invoked=1,O.Automatic=2,O=rlt=rlt||{},me(Et,"create"),O.create=Et,me(Ct,"is"),O.is=Ct,O=ilt=ilt||{},me(_t,"create"),O.create=_t,me(St,"is"),O.is=St,O=nlt=nlt||{},me(At,"create"),O.create=At,me(Lt,"is"),O.is=Lt,O=alt=alt||{},me(Nt,"create"),O.create=Nt,me(It,"is"),O.is=It,O=slt=slt||{},me(Rt,"create"),O.create=Rt,me(Mt,"is"),O.is=Mt,n=olt=olt||{},me(Dt,"create"),n.create=Dt,me(Ot,"is"),n.is=Ot,(O=llt=llt||{}).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=clt=clt||{}).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=hlt=hlt||{},me(Pt,"is"),O.is=Pt,O=ult=ult||{},me(Bt,"create"),O.create=Bt,me(Ft,"is"),O.is=Ft,O=dlt=dlt||{},me($t,"create"),O.create=$t,me(zt,"is"),O.is=zt,O=plt=plt||{},me(Gt,"create"),O.create=Gt,me(Ut,"is"),O.is=Ut,O=glt=glt||{},me(qt,"create"),O.create=qt,me(jt,"is"),O.is=jt,(O=flt=flt||{}).Type=1,O.Parameter=2,me(Wt,"is"),O.is=Wt,O=mlt=mlt||{},me(Yt,"create"),O.create=Yt,me(Ht,"is"),O.is=Ht,O=ylt=ylt||{},me(Vt,"create"),O.create=Vt,me(Xt,"is"),O.is=Xt,O=vlt=vlt||{},me(Kt,"createSnippet"),O.createSnippet=Kt,O=xlt=xlt||{},me(Zt,"create"),O.create=Zt,O=blt=blt||{},me(Qt,"create"),O.create=Qt,(O=wlt=wlt||{}).Invoked=0,O.Automatic=1,O=klt=klt||{},me(Jt,"create"),O.create=Jt,O=Tlt=Tlt||{},me(te,"create"),O.create=te,O=Elt=Elt||{},me(ee,"is"),O.is=ee,O=Clt=Clt||{},me(re,"create"),O.create=re,me(ie,"is"),O.is=ie,me(ne,"applyEdits"),O.applyEdits=ne,me(D,"mergeSort"),_lt=class{static{me(this,"FullTextDocument")}constructor(t,e,r,i){this._uri=t,this._languageId=e,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(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){this._content=t.text,this._version=e,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],r=this._content,i=!0;for(let t=0;t<r.length;t++){i&&(e.push(t),i=!1);var n=r.charAt(t);i="\r"===n||n===`
`,"\r"===n&&t+1<r.length&&r.charAt(t+1)===`
`&&t++}i&&0<r.length&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,i=e.length;if(0===i)return oot.create(0,t);for(;r<i;){var n=Math.floor((r+i)/2);e[n]>t?i=n:r=n+1}var a=r-1;return oot.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1<r.length?r[t.line+1]:this._content.length,Math.max(Math.min(e+t.character,r),e))}get lineCount(){return this.getLineOffsets().length}};{var O=ye=ye||{};let i=Object.prototype.toString;function ae(t){return typeof t<"u"}function se(t){return"u"<typeof t}function oe(t){return!0===t||!1===t}function le(t){return"[object String]"===i.call(t)}function ce(t){return"[object Number]"===i.call(t)}function he(t,e,r){return"[object Number]"===i.call(t)&&e<=t&&t<=r}function ue(t){return"[object Number]"===i.call(t)&&-2147483648<=t&&t<=2147483647}function de(t){return"[object Number]"===i.call(t)&&0<=t&&t<=2147483647}function pe(t){return"[object Function]"===i.call(t)}function ge(t){return null!==t&&"object"==typeof t}function fe(t,e){return Array.isArray(t)&&t.every(e)}me(ae,"defined"),O.defined=ae,me(se,"undefined"),O.undefined=se,me(oe,"boolean"),O.boolean=oe,me(le,"string"),O.string=le,me(ce,"number"),O.number=ce,me(he,"numberRange"),O.numberRange=he,me(ue,"integer"),O.integer=ue,me(de,"uinteger"),O.uinteger=de,me(pe,"func"),O.func=pe,me(ge,"objectLiteral"),O.objectLiteral=ge,me(fe,"typedArray"),O.typedArray=fe}}),Plt=t(()=>{Olt(),KK(),Slt=class{static{me(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var t;return null!=(t=this.nodeStack[this.nodeStack.length-1])?t:this.rootNode}buildRootNode(t){return this.rootNode=new Rlt(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Nlt;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Llt(t.startOffset,t.image.length,RK(t),t.tokenType,!e)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}addHiddenNodes(t){var e,r=[];for(e of t){var i=new Llt(e.startOffset,e.image.length,RK(e),e.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(t){var e=this.current;"string"==typeof t.$type&&(this.current.astNode=t),t.$cstNode=e,0===(t=this.nodeStack.pop())?.content.length&&this.removeNode(t)}},Alt=class{static{me(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var t="string"==typeof(null==(t=this._astNode)?void 0:t.$type)?this._astNode:null==(t=this.container)?void 0:t.astNode;if(t)return t;throw new Error("This node has no associated AST element")}set astNode(t){this._astNode=t}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Llt=class extends Alt{static{me(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,r,i,n=!1){super(),this._hidden=n,this._offset=t,this._tokenType=i,this._length=e,this._range=r}},Nlt=class extends Alt{static{me(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new Ilt(this)}get children(){return this.content}get offset(){var t;return null!=(t=null==(t=this.firstNonHiddenNode)?void 0:t.offset)?t:0}get length(){return this.end-this.offset}get end(){var t;return null!=(t=null==(t=this.lastNonHiddenNode)?void 0:t.end)?t:0}get range(){var t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;return t&&e?(void 0===this._rangeCache&&(t=t.range,e=e.range,this._rangeCache={start:t.start,end:e.end.line<t.start.line?t.start:e.end}),this._rangeCache):{start:oot.create(0,0),end:oot.create(0,0)}}get firstNonHiddenNode(){for(var t of this.content)if(!t.hidden)return t;return this.content[0]}get lastNonHiddenNode(){for(let t=this.content.length-1;0<=t;t--){var e=this.content[t];if(!e.hidden)return e}return this.content[this.content.length-1]}},Ilt=class e extends Array{static{me(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,e,...r){return this.addParents(r),super.splice(t,e,...r)}addParents(t){for(var e of t)e.container=this.parent}},Rlt=class extends Nlt{static{me(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}}});function Blt(t){return t.$type===Flt}var Flt,$lt,zlt,Glt,Ult,qlt,jlt,Wlt,Ylt,Hlt=t(()=>{Bat(),Dlt(),jQ(),Ctt(),sJ(),Plt(),Flt=Symbol("Datatype"),me(Blt,"isDataTypeNode"),$lt=me(t=>t.endsWith("")?t:t+"","withRuleSuffix"),zlt=class{static{me(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;this.wrapper=new Ylt(e,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Glt=class extends zlt{static{me(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Slt,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){var r=this.computeRuleType(t),r=this.wrapper.DEFINE_RULE($lt(t.name),this.startImplementation(r,e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}computeRuleType(t){if(!t.fragment)return stt(t)?Flt:htt(t)??t.name}parse(t,e={}){this.nodeBuilder.buildRootNode(t);var t=this.lexerResult=this.lexer.tokenize(t),r=(this.wrapper.input=t.tokens,e.rule?this.allRules.get(e.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(t.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:t.errors,lexerReport:t.report,parserErrors:this.wrapper.errors};throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.")}startImplementation(n,a){return t=>{var e,r=!this.isRecording()&&void 0!==n;r&&(this.stack.push(e={$type:n}),n===Flt)&&(e.value="");let i;try{i=a(t)}catch{i=void 0}return i=void 0===i&&r?this.construct():i}}extractHiddenTokens(t){var e=this.lexerResult.hidden;if(!e.length)return[];var r=t.startOffset;for(let t=0;t<e.length;t++)if(e[t].startOffset>r)return e.splice(0,t);return e.splice(0,e.length)}consume(e,r,i){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.extractHiddenTokens(e),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(e,i)),{assignment:t,isCrossRef:n}=this.getAssignment(i),a=this.current;if(t){var s=$Z(i)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,n)}else if(Blt(a)){let t=e.image;$Z(i)||(t=this.converter.convert(t,r).toString()),a.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,i,n){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(i)),r=this.wrapper.wrapSubrule(t,e,n),!this.isRecording()&&a&&0<a.length&&this.performSubruleAssignment(r,i,a)}performSubruleAssignment(t,e,r){var{assignment:e,isCrossRef:i}=this.getAssignment(e);e?this.assign(e.operator,e.feature,t,r,i):Blt(e=this.current)?e.value+=t.toString():"object"==typeof t&&t&&(r=this.assignWithoutOverride(t,e),this.stack.pop(),this.stack.push(r))}action(e,r){if(!this.isRecording()){let t=this.current;r.feature&&r.operator?(t=this.construct(),this.nodeBuilder.removeNode(t.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(t.$cstNode),this.stack.push({$type:e}),this.assign(r.operator,r.feature,t,t.$cstNode,!1)):t.$type=e}}construct(){var t;if(!this.isRecording())return YQ(t=this.current),this.nodeBuilder.construct(t),this.stack.pop(),Blt(t)?this.converter.convert(t.value,t.$cstNode):(iJ(this.astReflection,t),t)}getAssignment(t){var e;return this.assignmentMap.has(t)||(e=HQ(t,DZ),this.assignmentMap.set(t,{assignment:e,isCrossRef:!!e&&PZ(e.terminal)})),this.assignmentMap.get(t)}assign(t,e,r,i,n){var a=this.current,s=n&&"string"==typeof r?this.linker.buildReference(a,e,i,r):r;switch(t){case"=":a[e]=s;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(s)}}assignWithoutOverride(t,e){for(var[r,i]of Object.entries(e)){var n=t[r];void 0===n?t[r]=i:Array.isArray(n)&&Array.isArray(i)&&(i.push(...n),t[r]=i)}return(e=t.$cstNode)&&(e.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}},Ult=class{static{me(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return oit.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return oit.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return oit.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return oit.buildEarlyExitMessage(t)}},qlt=class extends Ult{static{me(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${e.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},jlt=class extends zlt{static{me(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){return this.resetState(),t=this.lexer.tokenize(t,{mode:"partial"}),this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,e){return e=this.wrapper.DEFINE_RULE($lt(t.name),this.startImplementation(e).bind(this)),this.allRules.set(t.name,e),t.entry&&(this.mainRule=e),e}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(r){return t=>{var e=this.keepStackSize();try{r(t)}finally{this.resetStackSize(e)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var t=this.elementStack.length;return this.stackSize=t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,i,n){this.before(i),this.wrapper.wrapSubrule(t,e,n),this.after(i)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){this.isRecording()||0<=(t=this.elementStack.lastIndexOf(t))&&this.elementStack.splice(t)}get currIdx(){return this.wrapper.currIdx}},Wlt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new qlt},Ylt=class extends Iat{static{me(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},Wlt),{lookaheadStrategy:r?new Lnt({maxLookahead:e.maxLookahead}):new rot({logging:e.skipValidations?()=>{}:void 0})}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}}});function Vlt(t,e,r){return Xlt({parser:e,tokens:r,ruleNames:new Map},t),e}function Xlt(t,e){let r=qJ(e,!1),i=wK(e.rules).filter(TZ).filter(t=>r.has(t));for(var n of i){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(n,Klt(a,n.definition))}}function Klt(e,r,t=!1){let i;if($Z(r))i=sct(e,r);else if(RZ(r))i=Zlt(e,r);else if(DZ(r))i=Klt(e,r.terminal);else if(PZ(r))i=act(e,r);else if(UZ(r))i=Qlt(e,r);else if(MZ(r))i=ect(e,r);else if(YZ(r))i=rct(e,r);else if(FZ(r))i=ict(e,r);else{if(!BZ(r))throw new QK(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;i=me(()=>e.parser.consume(t,sit,r),"method")}}return oct(e,t?void 0:nct(r),i,r.cardinality)}function Zlt(t,e){let r=utt(e);return()=>t.parser.action(r,e)}function Qlt(n,a){let s=a.rule.ref;if(TZ(s)){let e=n.subrule++,r=s.fragment,i=0<a.arguments.length?Jlt(s,a.arguments):()=>({});return t=>n.parser.subrule(e,lct(n,s),r,a,i(t))}if(AZ(s)){let t=n.consume++,e=hct(n,s.name);return()=>n.parser.consume(t,e,a)}if(!s)throw new QK(a.$cstNode,"Undefined rule: "+a.rule.$refText);ZK(s)}function Jlt(a,t){let s=t.map(t=>tct(t.value));return e=>{var r={};for(let t=0;t<s.length;t++){var i=a.parameters[t],n=s[t];r[i.name]=n(e)}return r}}function tct(i){if(pZ(i)){let e=tct(i.left),r=tct(i.right);return t=>e(t)||r(t)}if(dZ(i)){let e=tct(i.left),r=tct(i.right);return t=>e(t)&&r(t)}if(xZ(i)){let e=tct(i.value);return t=>!e(t)}if(kZ(i)){let e=i.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(uZ(i)){let t=!!i.true;return()=>t}ZK()}function ect(r,i){if(1===i.elements.length)return Klt(r,i.elements[0]);{let t=[];for(var n of i.elements){var a={ALT:Klt(r,n,!0)};(n=nct(n))&&(a.GATE=tct(n)),t.push(a)}let e=r.or++;return i=>r.parser.alternatives(e,t.map(t=>{let e={ALT:me(()=>t.ALT(i),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(i)),e}))}}function rct(s,t){if(1===t.elements.length)return Klt(s,t.elements[0]);let e=[];for(var r of t.elements){var i={ALT:Klt(s,r,!0)};(r=nct(r))&&(i.GATE=tct(r)),e.push(i)}let o=s.or++,l=me((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),n=me(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:me(()=>!0,"ALT")},i=s.parser,n=(t.ALT=()=>{var t;e.ALT(a),i.isRecording()||(t=l(o,i),i.unorderedGroups.get(t)||i.unorderedGroups.set(t,[]),"u"<typeof(t=i.unorderedGroups.get(t))?.[r]&&(t[r]=!0))},e.GATE);return n?t.GATE=()=>n(a):t.GATE=()=>!i.unorderedGroups.get(l(o,i))?.[r],t})),"alternatives"),a=oct(s,nct(t),n,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function ict(e,t){let r=t.elements.map(t=>Klt(e,t));return e=>r.forEach(t=>t(e))}function nct(t){if(FZ(t))return t.guardCondition}function act(i,n,a=n.terminal){if(a){if(UZ(a)&&TZ(a.rule.ref)){let e=a.rule.ref,r=i.subrule++;return t=>i.parser.subrule(r,lct(i,e),!1,n,t)}if(UZ(a)&&AZ(a.rule.ref)){let t=i.consume++,e=hct(i,a.rule.ref.name);return()=>i.parser.consume(t,e,n)}if($Z(a)){let t=i.consume++,e=hct(i,a.value);return()=>i.parser.consume(t,e,n)}throw new Error("Could not build cross reference parser")}if(!n.type.ref)throw new Error("Could not resolve reference to type: "+n.type.$refText);if(a=ttt(n.type.ref)?.terminal)return act(i,n,a);throw new Error("Could not find name assignment for type: "+utt(n.type.ref))}function sct(t,e){let r=t.consume++,i=t.tokens[e.value];if(i)return()=>t.parser.consume(r,i,e);throw new Error("Could not find token for keyword: "+e.value)}function oct(i,t,n,e){let a=t&&tct(t);if(!e){if(a){let e=i.or++;return t=>i.parser.alternatives(e,[{ALT:me(()=>n(t),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Cat(),GATE:me(()=>!a(t),"GATE")}])}return n}if("*"===e){let e=i.many++;return t=>i.parser.many(e,{DEF:me(()=>n(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=i.many++;if(a){let e=i.or++;return t=>i.parser.alternatives(e,[{ALT:me(()=>i.parser.atLeastOne(r,{DEF:me(()=>n(t),"DEF")}),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Cat(),GATE:me(()=>!a(t),"GATE")}])}return t=>i.parser.atLeastOne(r,{DEF:me(()=>n(t),"DEF")})}if("?"===e){let e=i.optional++;return t=>i.parser.optional(e,{DEF:me(()=>n(t),"DEF"),GATE:a?()=>a(t):void 0})}ZK()}function lct(t,e){if(e=cct(t,e),t=t.parser.getRule(e))return t;throw new Error(`Rule "${e}" not found."`)}function cct(i,n){if(TZ(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let t=n,e=t.$container,r=n.$type;for(;!TZ(e);)(FZ(e)||MZ(e)||YZ(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,i.ruleNames.set(n,r),r}}function hct(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var uct=t(()=>{Bat(),jQ(),JK(),SK(),Ctt(),me(Vlt,"createParser"),me(Xlt,"buildRules"),me(Klt,"buildElement"),me(Zlt,"buildAction"),me(Qlt,"buildRuleCall"),me(Jlt,"buildRuleCallPredicate"),me(tct,"buildPredicate"),me(ect,"buildAlternatives"),me(rct,"buildUnorderedGroup"),me(ict,"buildGroup"),me(nct,"getGuardCondition"),me(act,"buildCrossReference"),me(sct,"buildKeyword"),me(oct,"wrap"),me(lct,"getRule"),me(cct,"getRuleName"),me(hct,"getToken")});function dct(t){var e=t.Grammar,r=t.parser.Lexer;return Vlt(e,t=new jlt(t),r.definition),t.finalize(),t}var pct=t(()=>{Hlt(),uct(),me(dct,"createCompletionParser")});function gct(t){return(t=fct(t)).finalize(),t}function fct(t){var e=t.Grammar,r=t.parser.Lexer;return Vlt(e,new Glt(t),r.definition)}var mct,yct,vct,xct=t(()=>{Hlt(),uct(),me(gct,"createLangiumParser"),me(fct,"prepareLangiumParser")}),bct=t(()=>{Bat(),jQ(),sJ(),Ctt(),$J(),SK(),mct=class{static{me(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,e){let r=wK(qJ(t,!1)),i=this.buildTerminalTokens(r),n=this.buildKeywordTokens(r,i,e);return i.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&LJ(e)?n.unshift(t):n.push(t)}),n}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(AZ).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=ftt(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,i={name:t.name,PATTERN:r};return"function"==typeof r&&(i.LINE_BREAKS=!0),t.hidden&&(i.GROUP=LJ(e)?Grt.SKIPPED:"hidden"),i}requiresCustomPattern(t){return!!(t.flags.includes("u")||t.flags.includes("s")||t.source.includes("?<=")||t.source.includes("?<!"))}regexPatternFunction(t){let r=new RegExp(t,t.flags+"y");return(t,e)=>(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(TZ).flatMap(t=>QQ(t).filter($Z)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,!!r?.caseInsensitive))}buildKeywordToken(t,e,r){return r=this.buildKeywordPattern(t,r),t={name:t.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(t,e)},"function"==typeof r&&(t.LINE_BREAKS=!0),t}buildKeywordPattern(t,e){return e?new RegExp(IJ(t.value)):t.value}findLongerAlt(i,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&RJ("^"+r.source+"$",i.value)&&t.push(e),t},[])}}}),wct=t(()=>{function t(e){let r="";for(let t=1;t<e.length-1;t++){var i,n=e.charAt(t);"\\"===n?(i=e.charAt(++t),r+=a(i)):r+=n}return r}function a(t){switch(t){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 t}}function e(t){return"^"===t.charAt(0)?t.substring(1):t}function r(t){return parseInt(t)}function i(t){return BigInt(t)}function n(t){return new Date(t)}function s(t){return Number(t)}function o(t){return"true"===t.toLowerCase()}var l;jQ(),Ctt(),yct=class{static{me(this,"DefaultValueConverter")}convert(t,e){var r=e.grammarSource;if(UZ(r=PZ(r)?WJ(r):r)){if(r=r.rule.ref)return this.runConverter(r,t,e);throw new Error("This cst node was not parsed by a rule.")}return t}runConverter(t,e,r){switch(t.name.toUpperCase()){case"INT":return vct.convertInt(e);case"STRING":return vct.convertString(e);case"ID":return vct.convertID(e)}switch(null==(t=gtt(t))?void 0:t.toLowerCase()){case"number":return vct.convertNumber(e);case"boolean":return vct.convertBoolean(e);case"bigint":return vct.convertBigint(e);case"date":return vct.convertDate(e);default:return e}}},l=vct=vct||{},me(t,"convertString"),l.convertString=t,me(a,"convertEscapeCharacter"),me(e,"convertID"),l.convertID=e,me(r,"convertInt"),l.convertInt=r,me(i,"convertBigint"),l.convertBigint=i,me(n,"convertDate"),l.convertDate=n,me(s,"convertNumber"),l.convertNumber=s,me(o,"convertBoolean"),l.convertBoolean=o}),kct=iPt(t=>{var e,r;function i(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function n(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),me(i,"RAL"),r=i,me(n,"install"),r.install=n,t.default=i}),Tct=iPt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function i(t){return"number"==typeof t||t instanceof Number}function n(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,me(e,"boolean"),t.boolean=e,me(r,"string"),t.string=r,me(i,"number"),t.number=i,me(n,"error"),t.error=n,me(a,"func"),t.func=a,me(s,"array"),t.array=s,me(o,"stringArray"),t.stringArray=o}),Ect=iPt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=kct();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var n=class{static{me(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:me(()=>this.remove(t,e),"dispose")})}remove(i,n=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t<e;t++)if(this._callbacks[t]===i){if(this._contexts[t]===n)return this._callbacks.splice(t,1),void this._contexts.splice(t,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var i=[],n=this._callbacks.slice(0),a=this._contexts.slice(0);for(let t=0,e=n.length;t<e;t++)try{i.push(n[t].apply(a[t],r))}catch(t){(0,s.default)().console.error(t)}return i}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{me(this,"Emitter")}constructor(t){this._options=t}get event(){return this._event||(this._event=(t,e,r)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let i={dispose:me(()=>{this._callbacks&&(this._callbacks.remove(t,e),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(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Cct=iPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,i=kct(),n=Tct(),a=Ect();function s(t){return t&&(t===r.None||t===r.Cancelled||n.boolean(t.isCancellationRequested)&&!!t.onCancellationRequested)}(r=e||(t.CancellationToken=e={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),me(s,"is"),r.is=s;var o=Object.freeze(function(t,e){let r=(0,i.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{me(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{me(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=c}),_ct={},Sct=t(()=>{H(_ct,tt(Cct(),1))});function Act(){return new Promise(t=>{"u"<typeof setImmediate?setTimeout(t,0):setImmediate(t)})}function Lct(){return Mct=performance.now(),new _ct.CancellationTokenSource}function Nct(t){Dct=t}function Ict(t){return t===Oct}async function Rct(t){if(t!==_ct.CancellationToken.None){var e=performance.now();if(Dct<=e-Mct&&(Mct=e,await Act(),Mct=performance.now()),t.isCancellationRequested)throw Oct}}var Mct,Dct,Oct,Pct,Bct=t(()=>{Sct(),me(Act,"delayNextTick"),Mct=0,Dct=10,me(Lct,"startCancelableOperation"),me(Nct,"setInterruptionPeriod"),Oct=Symbol("OperationCancelled"),me(Ict,"isOperationCancelled"),me(Rct,"interruptAndCheck"),Pct=class{static{me(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function Fct(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);Fct(s,n),Fct(o,n);let t=0,e=0,r=0;for(;t<s.length&&e<o.length;)n(s[t],o[e])<=0?i[r++]=s[t++]:i[r++]=o[e++];for(;t<s.length;)i[r++]=s[t++];for(;e<o.length;)i[r++]=o[e++]}return i}function $ct(e,t,r=0){var i=t?[r]:[];for(let t=0;t<e.length;t++){var n=e.charCodeAt(t);zct(n)&&(13===n&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,i.push(r+t+1))}return i}function zct(t){return 13===t||10===t}function Gct(t){var e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Uct(t){var e=Gct(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var qct,jct,Wct,Yct,Hct,Vct,Xct,Kct,Zct,Qct,Jct=t(()=>{function t(t,e,r,i){return new qct(t,e,r,i)}function e(t,e,r){if(t instanceof qct)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){let r=t.getText(),i=Fct(e.map(Uct),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),n=0,a=[];for(var s of i){var o=t.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=t.offsetAt(s.range.end)}return a.push(r.substr(n)),a.join("")}var i;qct=class n{static{me(this,"FullTextDocument")}constructor(t,e,r,i){this._uri=t,this._languageId=e,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(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){for(var a of t)if(n.isIncremental(a)){var s=Gct(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),t=Math.max(s.end.line,0),i=this._lineOffsets,n=$ct(a.text,!1,o);if(t-r===n.length)for(let t=0,e=n.length;t<e;t++)i[t+r+1]=n[t];else n.length<1e4?i.splice(r+1,t-r,...n):this._lineOffsets=i=i.slice(0,r+1).concat(n,i.slice(t+1));var c=a.text.length-(l-o);if(0!=c)for(let t=r+1+n.length,e=i.length;t<e;t++)i[t]=i[t]+c}else{if(!n.isFull(a))throw new Error("Unknown change event received");this._content=a.text,this._lineOffsets=void 0}this._version=e}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=$ct(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,i=e.length;if(0===i)return{line:0,character:t};for(;r<i;){var n=Math.floor((r+i)/2);e[n]>t?i=n:r=n+1}var a=r-1;return{line:a,character:(t=this.ensureBeforeEOL(t,e[a]))-e[a]}}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],t.character<=0?e:(r=t.line+1<r.length?r[t.line+1]:this._content.length,t=Math.min(e+t.character,r),this.ensureBeforeEOL(t,e)))}ensureBeforeEOL(t,e){for(;e<t&&zct(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(t){return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}},i=jct=jct||{},me(t,"create"),i.create=t,me(e,"update"),i.update=e,me(r,"applyEdits"),i.applyEdits=r,me(Fct,"mergeSort"),me($ct,"computeLineOffsets"),me(zct,"isEOL"),me(Gct,"getWellformedRange"),me(Uct,"getWellformedEdit")}),tht=t(()=>{var r={470:t=>{function d(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,i="",n=0,a=-1,s=0,o=0;o<=t.length;++o){if(o<t.length)r=t.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}e&&(0<i.length?i+="/..":i="..",n=2)}else 0<i.length?i+="/"+t.slice(a+1,o):i=t.slice(a+1,o),n=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return i}me(d,"e"),me(a,"r");var p={resolve:me(function(){for(var t,e="",r=!1,i=arguments.length-1;-1<=i&&!r;i--){var n=0<=i?arguments[i]:t=void 0===t?process.cwd():t;d(n),0!==n.length&&(e=n+"/"+e,r=47===n.charCodeAt(0))}return e=a(e,!r),r?0<e.length?"/"+e:"/":0<e.length?e:"."},"resolve"),normalize:me(function(t){var e,r;return d(t),0===t.length?".":(e=47===t.charCodeAt(0),r=47===t.charCodeAt(t.length-1),0<(t=0!==(t=a(t,!e)).length||e?t:".").length&&r&&(t+="/"),e?"/"+t:t)},"normalize"),isAbsolute:me(function(t){return d(t),0<t.length&&47===t.charCodeAt(0)},"isAbsolute"),join:me(function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var r=arguments[e];d(r),0<r.length&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":p.normalize(t)},"join"),relative:me(function(t,e){if(d(t),d(e),t===e||(t=p.resolve(t))===(e=p.resolve(e)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var i=t.length,n=i-r,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,o=n<s?n:s,l=-1,c=0;c<=o;++c){if(c===o){if(o<s){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else o<n&&(47===t.charCodeAt(r+c)?l=c:0===c&&(l=0));break}var h=t.charCodeAt(r+c);if(h!==e.charCodeAt(a+c))break;47===h&&(l=c)}for(var u="",c=r+l+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return 0<u.length?u+e.slice(a+l):(47===e.charCodeAt(a+=l)&&++a,e.slice(a))},"relative"),_makeLong:me(function(t){return t},"_makeLong"),dirname:me(function(t){if(d(t),0===t.length)return".";for(var e=47===t.charCodeAt(0),r=-1,i=!0,n=t.length-1;1<=n;--n)if(47===t.charCodeAt(n)){if(!i){r=n;break}}else i=!1;return-1===r?e?"/":".":e&&1===r?"//":t.slice(0,r)},"dirname"),basename:me(function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');d(t);var r=0,i=-1,n=!0;if(void 0!==e&&0<e.length&&e.length<=t.length){if(e.length===t.length&&e===t)return"";for(var a=e.length-1,s=-1,o=t.length-1;0<=o;--o){var l=t.charCodeAt(o);if(47===l){if(!n){r=o+1;break}}else-1===s&&(n=!1,s=o+1),0<=a&&(l===e.charCodeAt(a)?-1==--a&&(i=o):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=t.length),t.slice(r,i)}for(o=t.length-1;0<=o;--o)if(47===t.charCodeAt(o)){if(!n){r=o+1;break}}else-1===i&&(n=!1,i=o+1);return-1===i?"":t.slice(r,i)},"basename"),extname:me(function(t){d(t);for(var e=-1,r=0,i=-1,n=!0,a=0,s=t.length-1;0<=s;--s){var o=t.charCodeAt(s);if(47!==o)-1===i&&(n=!1,i=s+1),46===o?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!n){r=s+1;break}}return-1===e||-1===i||0===a||1===a&&e===i-1&&e===r+1?"":t.slice(e,i)},"extname"),format:me(function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return e=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||""),e?e===t.root?e+r:e+"/"+r:r;var e,r},"format"),parse:me(function(t){d(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0!==t.length){for(var r,i=47===t.charCodeAt(0),n=i?(e.root="/",1):0,a=-1,s=0,o=-1,l=!0,c=t.length-1,h=0;n<=c;--c)if(47!==(r=t.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&&(e.base=e.name=0===s&&i?t.slice(1,o):t.slice(s,o)):(0===s&&i?(e.name=t.slice(1,a),e.base=t.slice(1,o)):(e.name=t.slice(s,a),e.base=t.slice(s,o)),e.ext=t.slice(a,o)),0<s?e.dir=t.slice(0,s-1):i&&(e.dir="/")}return e},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,t.exports=p}},i={};function h(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},r[t](e,e.exports,h)),e.exports}me(h,"r"),h.d=(t,e)=>{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let i,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:me(()=>w,"URI"),Utils:me(()=>u,"Utils")}),"object"==typeof process?i="win32"===process.platform:"object"==typeof navigator&&(i=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),n=/^\//,a=/^\/\//;function g(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!n.test(t.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(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}me(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{me(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,i,n,a=!1){"object"==typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=t||a?t:"file",this.authority=e||"",this.path=((t,e)=>{switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e})(this.scheme,r||""),this.query=i||"",this.fragment=n||"",g(this,a))}get fsPath(){return y(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:i,query:n,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),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=""),e===this.scheme&&r===this.authority&&i===this.path&&n===this.query&&a===this.fragment?this:new k(e,r,i,n,a)}static parse(t,e=!1){return(t=s.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=i?t.replace(/\\/g,"/"):t)[0]&&"/"===t[1]&&(t=-1===(r=t.indexOf("/",2))?(e=t.substring(2),"/"):(e=t.substring(2,r),t.substring(r)||"/")),new k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=i?1:void 0;class k extends w{static{me(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}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 f(e,r,i){let n,a=-1;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);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(e.substring(a,t)),a=-1),void 0!==n&&(n+=e.charAt(t))):(void 0===n&&(n=e.substr(0,t)),void 0!==(s=l[s])?(-1!==a&&(n+=encodeURIComponent(e.substring(a,t)),a=-1),n+=s):-1===a&&(a=t))}return-1!==a&&(n+=encodeURIComponent(e.substring(a))),void 0!==n?n:e}function m(e){let r;for(let t=0;t<e.length;t++){var i=e.charCodeAt(t);35===i||63===i?(void 0===r&&(r=e.substr(0,t)),r+=l[i]):void 0!==r&&(r+=e[t])}return void 0!==r?r:e}function y(t,e){let r;return r=t.authority&&1<t.path.length&&"file"===t.scheme?"//"+t.authority+t.path:47===t.path.charCodeAt(0)&&(65<=t.path.charCodeAt(1)&&t.path.charCodeAt(1)<=90||97<=t.path.charCodeAt(1)&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,r=i?r.replace(/\//g,"\\"):r}function v(e,t){let r=t?m:f,i="",{scheme:n,authority:a,path:s,query:o,fragment:l}=e;if(n&&(i=i+n+":"),!a&&"file"!==n||(i+="//"),a){let t=a.indexOf("@");-1!==t&&(e=a.substr(0,t),a=a.substr(t+1),-1===(t=e.lastIndexOf(":"))?i+=r(e,!1,!1):i=(i=i+r(e.substr(0,t),!1,!1)+":")+r(e.substr(t+1),!1,!0),i+="@"),a=a.toLowerCase(),-1===(t=a.lastIndexOf(":"))?i+=r(a,!1,!0):i=(i+=r(a.substr(0,t),!1,!0))+a.substr(t)}return s&&(3<=s.length&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)?65<=(e=s.charCodeAt(1))&&e<=90&&(s=`/${String.fromCharCode(e+32)}:`+s.substr(3)):2<=s.length&&58===s.charCodeAt(1)&&65<=(e=s.charCodeAt(0))&&e<=90&&(s=String.fromCharCode(e+32)+":"+s.substr(2)),i+=r(s,!0,!1)),o&&(i=(i+="?")+r(o,!1,!1)),i=l?(i+="#")+(t?l:f(l,!1,!1)):i}function x(t){try{return decodeURIComponent(t)}catch{return 3<t.length?t.substr(0,3)+x(t.substr(3)):t}}me(f,"d"),me(m,"p"),me(y,"m"),me(v,"y"),me(x,"v");let e=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(t){return t.match(e)?t.replace(e,t=>x(t)):t}me(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,i=!1,n=("/"!==r[0]&&(r="/"+r,i=!0),c.resolve(r,...e));return i&&"/"===n[0]&&!t.authority&&(n=n.substring(1)),t.with({path:n})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:Wct,Utils:Yct}=p)}),eht=t(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,i="string"==typeof e?e:e.path,n=r.split("/").filter(t=>0<t.length),a=i.split("/").filter(t=>0<t.length),s=0;for(;s<n.length&&n[s]===a[s];s++);return"../".repeat(n.length-s)+a.slice(s).join("/")}function r(t){return Wct.parse(t.toString()).toString()}var i;tht(),(i=Hct=Hct||{}).basename=Yct.basename,i.dirname=Yct.dirname,i.extname=Yct.extname,i.joinPath=Yct.joinPath,i.resolvePath=Yct.resolvePath,me(t,"equals"),i.equals=t,me(e,"relative"),i.relative=e,me(r,"normalize"),i.normalize=r}),rht=t(()=>{var t;Jct(),rht(),Sct(),SK(),eht(),(t=Vct=Vct||{})[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated",Xct=class{static{me(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=_ct.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??Wct.parse(t.uri),_ct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return _ct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){var i;return"string"==typeof e?(i=this.parse(t,e,r),this.createLangiumDocument(i,t,void 0,e)):"$model"in e?(i={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(i,t)):(i=this.parse(t,e.getText(),r),this.createLangiumDocument(i,t,e))}async createAsync(t,e,r){var i;return"string"==typeof e?(i=await this.parseAsync(t,e,r),this.createLangiumDocument(i,t,void 0,e)):(i=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(i,t,e))}createLangiumDocument(e,r,t,i){let n;if(t)n={parseResult:e,uri:r,state:Vct.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,i);n={parseResult:e,uri:r,state:Vct.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=n}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,i=null==(i=this.textDocuments)?void 0:i.get(t.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(t.uri);return i?Object.defineProperty(t,"textDocument",{value:i}):(i=this.createTextDocumentGetter(t.uri,n),Object.defineProperty(t,"textDocument",{get:i})),r!==n&&(t.parseResult=await this.parseAsync(t.uri,n,e),t.parseResult.value.$document=t),t.state=Vct.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,i;return()=>i=i??jct.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},Kct=class{static{me(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.serviceRegistry=t.ServiceRegistry}get all(){return wK(this.documentMap.values())}addDocument(t){var e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){return t=t.toString(),this.documentMap.get(t)}async getOrCreateDocument(t,e){return this.getDocument(t)||(t=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(t),t)}createDocument(t,e,r){return r?this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t)):(r=this.langiumDocumentFactory.fromString(e,t),this.addDocument(r),r)}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){var e=t.toString();return(e=this.documentMap.get(e))&&(this.serviceRegistry.getServices(t).references.Linker.unlink(e),e.state=Vct.Changed,e.precomputedScopes=void 0,e.diagnostics=void 0),e}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=Vct.Changed,this.documentMap.delete(t)),e}}}),iht=t(()=>{Sct(),vK(),sJ(),Bct(),rht(),Zct=Symbol("ref_resolving"),Qct=class{static{me(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(e,t=_ct.CancellationToken.None){for(var r of JQ(e.parseResult.value))await Rct(t),eJ(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref){r._ref=Zct;try{var i,n=this.getCandidate(t);pK(n)?r._ref=n:(r._nodeDescription=n,this.langiumDocuments().hasDocument(n.documentUri)?(i=this.loadAstNode(n),r._ref=i??this.createLinkingError(t,n)):r._ref=void 0)}catch(e){console.error(`An error occurred while resolving reference to '${r.$refText}':`,e),n=null!=(i=e.message)?i:String(e),r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+n})}e.references.push(r)}}unlink(t){for(var e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}buildReference(i,n,t,a){let s=this,o={$refNode:t,$refText:a,get ref(){var t;if(hK(this._ref))return this._ref;if(dK(this._nodeDescription)){var e=s.loadAstNode(this._nodeDescription);this._ref=e??s.createLinkingError({reference:o,container:i,property:n},this._nodeDescription)}else if(void 0===this._ref){this._ref=Zct;var e=KQ(i).$document,r=s.getLinkedNode({reference:o,container:i,property:n});if(r.error&&e&&e.state<Vct.ComputedScopes)return this._ref=void 0;this._ref=null!=(t=r.node)?t:r.error,this._nodeDescription=r.descr,e?.references.push(this)}else if(this._ref===Zct)throw new Error(`Cyclic reference resolution detected: ${s.astNodeLocator.getAstNodePath(i)}/${n} (symbol '${a}')`);return hK(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return pK(this._ref)?this._ref:void 0}};return o}getLinkedNode(e){try{var r,i=this.getCandidate(e);return pK(i)?{error:i}:(r=this.loadAstNode(i))?{node:r,descr:i}:{descr:i,error:this.createLinkingError(e,i)}}catch(t){return console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t),i=null!=(r=t.message)?r:String(t),{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': `+i})}}}loadAstNode(t){var e;return t.node||((e=this.langiumDocuments().getDocument(t.documentUri))?this.astNodeLocator.getAstNode(e.parseResult.value,t.path):void 0)}createLinkingError(t,e){(r=KQ(t.container).$document)&&r.state<Vct.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);var r=this.reflection.getReferenceType(t);return Object.assign(Object.assign({},t),{message:`Could not resolve reference to ${r} named '${t.reference.$refText}'.`,targetDescription:e})}}});function nht(t){return"string"==typeof t.name}var aht,sht,oht,lht,cht,hht,uht,dht,pht,ght,fht,mht,yht,vht,xht=t(()=>{Ctt(),me(nht,"isNamed"),aht=class{static{me(this,"DefaultNameProvider")}getName(t){if(nht(t))return t.name}getNameNode(t){return VJ(t.$cstNode,"name")}}}),bht=t(()=>{Ctt(),vK(),sJ(),KK(),SK(),eht(),sht=class{static{me(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){var e=JJ(t),r=t.astNode;if(e&&r){if(uK(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var i of e)if(uK(i)&&i.$refNode&&i.$refNode.offset<=t.offset&&i.$refNode.end>=t.end)return i.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||IK(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,i=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&i.push(r);let n=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(n=n.filter(t=>Hct.equals(t.sourceUri,e.documentUri))),i.push(...n),wK(i)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=XQ(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:MK(r),local:!0}}}}),wht=t(()=>{SK(),oht=class{static{me(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return _K.sum(wK(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){var r;return void 0===e?this.map.delete(t):!!((r=this.map.get(t))&&0<=(e=r.indexOf(e)))&&(1===r.length?this.map.delete(t):r.splice(e,1),!0)}get(t){return null!=(t=this.map.get(t))?t:[]}has(t,e){return void 0===e?this.map.has(t):!!(t=this.map.get(t))&&0<=t.indexOf(e)}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(r){this.map.forEach((t,e)=>t.forEach(t=>r(t,e,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return wK(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return wK(this.map.keys())}values(){return wK(this.map.values()).flat()}entriesGroupedByKey(){return wK(this.map.entries())}},lht=class{static{me(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(var[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){var e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}}),kht=t(()=>{Sct(),sJ(),wht(),Bct(),cht=class{static{me(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=_ct.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=ZQ,i=_ct.CancellationToken.None){var n,a=[];this.exportNode(t,a,e);for(n of r(t))await Rct(i),this.exportNode(n,a,e);return a}exportNode(t,e,r){var i=this.nameProvider.getName(t);i&&e.push(this.descriptions.createDescription(t,i,r))}async computeLocalScopes(t,e=_ct.CancellationToken.None){var r,i=t.parseResult.value,n=new oht;for(r of QQ(i))await Rct(e),this.processNode(r,t,n);return n}processNode(t,e,r){var i,n=t.$container;n&&(i=this.nameProvider.getName(t))&&r.add(n,this.descriptions.createDescription(t,i,e))}}}),Tht=t(()=>{SK(),hht=class{static{me(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=null!=(t=r?.caseInsensitive)&&t}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e.toLowerCase()):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}},uht=class{static{me(this,"MapScope")}constructor(t,e,r){var i;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(i of t){var n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}this.outerScope=e}getElement(t){var e=this.caseInsensitive?t.toLowerCase():t;return this.elements.get(e)||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=wK(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},dht={getElement(){},getAllElements(){return TK}}}),Eht=t(()=>{pht=class{static{me(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},ght=class extends pht{static{me(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){return this.throwIfDisposed(),this.cache.has(t)?this.cache.get(t):e?(e=e(),this.cache.set(t,e),e):void 0}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},fht=class extends pht{static{me(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){return this.throwIfDisposed(),(t=this.cacheForContext(t)).has(e)?t.get(e):r?(r=r(),t.set(e,r),r):void 0}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){this.throwIfDisposed(),t?(t=this.converter(t),this.cache.delete(t)):this.cache.clear()}cacheForContext(t){let e=this.converter(t),r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},mht=class extends fht{static{me(this,"DocumentCache")}constructor(t,e){super(t=>t.toString()),e?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(e,t=>{this.clear(t.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{for(var r of e)this.clear(r)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},yht=class extends ght{static{me(this,"WorkspaceCache")}constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{0<e.length&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),Cht=t(()=>{Tht(),sJ(),SK(),Eht(),vht=class{static{me(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new yht(t.shared)}getScope(e){let r=[],i=this.reflection.getReferenceType(e),n=XQ(e.container).precomputedScopes;if(n){let t=e.container;do{var a=n.get(t);0<a.length&&r.push(wK(a).filter(t=>this.reflection.isSubtype(t.type,i))),t=t.$container}while(t)}let s=this.getGlobalScope(i,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new hht(wK(t),e,r)}createScopeForNodes(t,e,r){return t=wK(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new hht(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new uht(this.indexManager.allElements(t)))}}});function _ht(t){return"string"==typeof t.$comment}function Sht(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var Aht,Lht,Nht=t(()=>{tht(),vK(),sJ(),Ctt(),me(_ht,"isAstNodeWithComment"),me(Sht,"isIntermediateReference"),Aht=class{static{me(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){let r=e??{},i=e?.replacer,n=me((t,e)=>this.replacer(t,e,r),"defaultReplacer"),a=i?(t,e)=>i(t,e,n):n;try{return this.currentDocument=XQ(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){return e=e??{},t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:i,sourceText:n,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(uK(r)){var l=r.ref,i=i?r.$refText:void 0;if(l){let t=XQ(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:i}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:i}}if(hK(r)){let t;return a&&(t=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!e||r.$document)&&t?.$textRegion&&(t.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),n&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(t=t??Object.assign({},r),i=this.commentProvider.getComment(r))&&(t.$comment=i.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(i){let n=me(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(i.$cstNode){let t=i.$textRegion=n(i.$cstNode),r=t.assignments={};return Object.keys(i).filter(t=>!t.startsWith("$")).forEach(t=>{var e=HJ(i.$cstNode,t).map(n);0!==e.length&&(r[t]=e)}),i}}linkNode(e,r,i,t,n,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t<o.length;t++){var l=o[t];Sht(l)?o[t]=this.reviveReference(e,s,r,l,i):hK(l)&&this.linkNode(l,r,i,e,s,t)}else Sht(o)?e[s]=this.reviveReference(e,s,r,o,i):hK(o)&&this.linkNode(o,r,i,e,s);var c=e;c.$container=t,c.$containerProperty=n,c.$containerIndex=a}reviveReference(t,e,r,i,n){let a=i.$refText,s=i.$error;if(i.$ref){if(hK(r=this.getRefNode(r,i.$ref,n.uriConverter)))return{$refText:(a=a||this.nameProvider.getName(r))??"",ref:r};s=r}return s?((i={$refText:a??""}).error={container:t,property:e,message:s,reference:i},i):void 0}getRefNode(t,e,r){try{var i,n,a,s,o=e.indexOf("#");return 0===o?this.astNodeLocator.getAstNode(t,e.substring(1))||"Could not resolve path: "+e:o<0?(i=r?r(e):Wct.parse(e),(n=this.langiumDocuments.getDocument(i))?n.parseResult.value:"Could not find document for URI: "+e):(a=r?r(e.substring(0,o)):Wct.parse(e.substring(0,o)),(s=this.langiumDocuments.getDocument(a))?o===e.length-1?s.parseResult.value:this.astNodeLocator.getAstNode(s.parseResult.value,e.substring(o+1))||"Could not resolve URI: "+e:"Could not find document for URI: "+e)}catch(t){return String(t)}}}}),Iht=t(()=>{eht(),Lht=class{static{me(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){var e,r=t.LanguageMetaData;for(e of r.fileExtensions)this.fileExtensionMap.has(e)&&console.warn(`The file extension ${e} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(e,t);this.languageIdMap.set(r.languageId,t),1===this.languageIdMap.size?this.singleton=t:this.singleton=void 0}getServices(t){if(void 0!==this.singleton)return this.singleton;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var e=null==(e=null==(e=this.textDocuments)?void 0:e.get(t))?void 0:e.languageId;if(void 0!==e){var r=this.languageIdMap.get(e);if(r)return r}if(r=Hct.extname(t),t=this.fileExtensionMap.get(r))return t;throw e?new Error(`The service registry contains no services for the extension '${r}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Rht(t){return{code:t}}var Mht,Dht,Oht=t(()=>{Pdt(),wht(),Bct(),SK(),me(Rht,"diagnosticData"),(Mht=Mht||{}).all=["fast","slow","built-in"],Dht=class{static{me(this,"ValidationRegistry")}constructor(t){this.entries=new oht,this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[i,n]of Object.entries(t))if(Array.isArray(n))for(var a of n)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(i,a);else"function"==typeof n?(n={check:this.wrapValidationException(n,e),category:r},this.addEntry(i,n)):ZK()}wrapValidationException(i,n){return async(t,e,r)=>{await this.handleException(()=>i.call(n,t,e,r),"An error occurred during validation",e,t)}}async handleException(t,e,r,i){try{await t()}catch(t){if(Ict(t))throw t;console.error(e+":",t),t instanceof Error&&t.stack&&console.error(t.stack),r("error",e+": "+(t instanceof Error?t.message:String(t)),{node:i})}}addEntry(t,e){if("AstNode"===t)this.entries.add("AstNode",e);else for(var r of this.reflection.getAllSubTypes(t))this.entries.add(r,e)}getChecks(t,e){let r=wK(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(n,a,s){return async(t,e,r,i)=>{await this.handleException(()=>n.call(s,t,e,r,i),a,e,t)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function Pht(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=VJ(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=ZJ(t.node.$cstNode,t.keyword,t.index)),(e=e??t.node.$cstNode)?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Bht(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function Fht(t){switch(t){case"error":return Rht(zht.LexingError);case"warning":return Rht(zht.LexingWarning);case"info":return Rht(zht.LexingInfo);case"hint":return Rht(zht.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var $ht,zht,Ght,Uht,qht,jht,Wht,Yht,Hht,Vht,Xht=t(()=>{var t;Sct(),Ctt(),sJ(),KK(),Bct(),Oht(),$ht=class{static{me(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=_ct.CancellationToken.None){var i=t.parseResult,n=[];if(await Rct(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(i,n,e),!(e.stopAfterLexingErrors&&n.some(t=>(null==(t=t.data)?void 0:t.code)===zht.LexingError)||(this.processParsingErrors(i,n,e),e.stopAfterParsingErrors&&n.some(t=>(null==(t=t.data)?void 0:t.code)===zht.ParsingError))||(this.processLinkingErrors(t,n,e),e.stopAfterLinkingErrors&&n.some(t=>(null==(t=t.data)?void 0:t.code)===zht.LinkingError))))){try{n.push(...await this.validateAst(i.value,e,r))}catch(t){if(Ict(t))throw t;console.error("An error occurred during validation:",t)}await Rct(r)}return n}processLexingErrors(t,e,r){var i;for(i of[...t.lexerErrors,...null!=(t=null==(t=t.lexerReport)?void 0:t.diagnostics)?t:[]]){var n={severity:Bht(n=null!=(n=i.severity)?n:"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:Fht(n),source:this.getSource()};e.push(n)}}processParsingErrors(t,e,r){for(var i of t.parserErrors){let t;var n,a;isNaN(i.token.startOffset)?"previousToken"in i&&(a=i.previousToken,t=isNaN(a.startOffset)?{start:n={line:0,character:0},end:n}:{start:n={line:a.endLine-1,character:a.endColumn},end:n}):t=RK(i.token),t&&(a={severity:Bht("error"),range:t,message:i.message,data:Rht(zht.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var i of t.references){var n;(i=i.error)&&(n={node:i.container,property:i.property,index:i.index,data:{code:zht.LinkingError,containerType:i.container.$type,property:i.property,refText:i.reference.$refText}},e.push(this.toDiagnostic("error",i.message,n)))}}async validateAst(t,e,r=_ct.CancellationToken.None){let i=[],n=me((t,e,r)=>{i.push(this.toDiagnostic(t,e,r))},"acceptor");return await this.validateAstBefore(t,e,n,r),await this.validateAstNodes(t,e,n,r),await this.validateAstAfter(t,e,n,r),i}async validateAstBefore(t,e,r,i=_ct.CancellationToken.None){var n,a;for(a of this.validationRegistry.checksBefore)await Rct(i),await a(t,r,null!=(n=e.categories)?n:[],i)}async validateAstNodes(t,r,i,n=_ct.CancellationToken.None){await Promise.all(JQ(t).map(async t=>{var e;await Rct(n);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,i,n)}))}async validateAstAfter(t,e,r,i=_ct.CancellationToken.None){var n,a;for(a of this.validationRegistry.checksAfter)await Rct(i),await a(t,r,null!=(n=e.categories)?n:[],i)}toDiagnostic(t,e,r){return{message:e,range:Pht(r),severity:Bht(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},me(Pht,"getDiagnosticRange"),me(Bht,"toDiagnosticSeverity"),me(Fht,"toDiagnosticData"),(t=zht=zht||{}).LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),Kht=t(()=>{Sct(),vK(),sJ(),KK(),Bct(),eht(),Ght=class{static{me(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r){var r=r??XQ(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=me(()=>{var t;return n=n??MK(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:MK(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},Uht=class{static{me(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=_ct.CancellationToken.None){let r=[],i=t.parseResult.value;for(var n of JQ(i))await Rct(e),eJ(n).filter(t=>!pK(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,i=t.reference.$refNode;if(r&&i)return{sourceUri:e=XQ(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:MK(i),local:Hct.equals(r.documentUri,e)}}}}),Zht=t(()=>{qht=class{static{me(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){var e;return t.$container?(e=this.getAstNodePath(t.$container),t=this.getPathSegment(t),e+this.segmentSeparator+t):""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(t)return void 0!==e?t+this.indexSeparator+e:t;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{var r,i;return t&&0!==e.length?0<(i=e.indexOf(this.indexSeparator))?(r=e.substring(0,i),i=parseInt(e.substring(i+1)),t[r]?.[i]):t[e]:t},t)}}}),Qht={},Jht=t(()=>{H(Qht,tt(Ect(),1))}),tut=t(()=>{Jht(),Bct(),jht=class{static{me(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Pct,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Qht.Emitter,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=null!=(t=null==(t=t.capabilities.workspace)?void 0:t.configuration)&&t}async initialized(e){var t;if(this.workspaceConfig&&(e.register&&(t=this.serviceRegistry.all,e.register({section:t.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})),e.fetchConfiguration)){let t=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}this._ready.resolve()}updateConfiguration(r){r.settings&&Object.keys(r.settings).forEach(t=>{var e=r.settings[t];this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){if(await this.ready,t=this.toSectionName(t),this.settings[t])return this.settings[t][e]}toSectionName(t){return""+t}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),eut=t(()=>{function t(t){return{dispose:me(async()=>t(),"dispose")}}var e=Wht=Wht||{};me(t,"create"),e.create=t}),rut=t(()=>{Sct(),eut(),wht(),Bct(),SK(),Oht(),rht(),Yht=class{static{me(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new oht,this.documentPhaseListeners=new oht,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Vct.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=_ct.CancellationToken.None){var i;for(i of t){var n,a=i.uri.toString();if(i.state===Vct.Validated){if("boolean"==typeof r.validation&&r.validation)i.state=Vct.IndexedReferences,i.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(n=t?.result)?void 0:n.validationChecks;e&&0<(n=(null!=(n=r.validation.categories)?n:Mht.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:n})},result:t.result}),i.state=Vct.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Vct.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=_ct.CancellationToken.None){this.currentState=Vct.Changed;for(var i of e)this.langiumDocuments.deleteDocument(i),this.buildState.delete(i.toString()),this.indexManager.remove(i);for(var n of t){var a;this.langiumDocuments.invalidateDocument(n)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},n)).state=Vct.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(n.toString())}let s=wK(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,Vct.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Rct(r),t=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.state<Vct.Linked||!(null!=(t=this.buildState.get(t.uri.toString()))&&t.completed)).toArray()),await this.buildDocuments(t,this.updateBuildOptions,r)}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(t=>t(e,r)))}sortDocuments(t){let e=0,r=t.length-1;for(;e<r;){for(;e<t.length&&this.hasTextDocument(t[e]);)e++;for(;0<=r&&!this.hasTextDocument(t[r]);)r--;e<r&&([t[e],t[r]]=[t[r],t[e]])}return t}hasTextDocument(t){var e;return!(null==(e=this.textDocuments)||!e.get(t.uri))}shouldRelink(t,e){return!!t.references.some(t=>void 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),Wht.create(()=>{var t=this.updateListeners.indexOf(e);0<=t&&this.updateListeners.splice(t,1)})}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,Vct.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,Vct.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,Vct.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,Vct.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,Vct.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var i,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,Vct.Validated,r,t=>this.validate(t,r));for(i of t){var n=this.buildState.get(i.uri.toString());n&&(n.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),i=this.buildState.get(r);i&&!i.completed||this.buildState.set(r,{completed:!1,options:e,result:i?.result})}}async runCancelable(t,e,r,i){var n;for(n of t.filter(t=>t.state<e))await Rct(r),await i(n),n.state=e,await this.notifyDocumentPhase(n,e,r);t=t.filter(t=>t.state===e),await this.notifyBuildPhase(t,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),Wht.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),Wht.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(n,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??_ct.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>n?Promise.resolve(s):this.currentState>=n?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Oct):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{var t;r.dispose(),i.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(Oct)})})}async notifyDocumentPhase(t,e,r){var i;for(i of this.documentPhaseListeners.get(e).slice())try{await i(t,r)}catch(t){if(!Ict(t))throw t}}async notifyBuildPhase(t,e,r){var i;if(0!==t.length)for(i of this.buildPhaseListeners.get(e).slice())await Rct(r),await i(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,i=this.getBuildOptions(t).validation,r=await r.validateDocument(t,i="object"==typeof i?i:void 0,e);t.diagnostics?t.diagnostics.push(...r):t.diagnostics=r,(e=this.buildState.get(t.uri.toString()))&&(null==e.result&&(e.result={}),t=null!=(r=i?.categories)?r:Mht.all,e.result.validationChecks?e.result.validationChecks.push(...t):e.result.validationChecks=[...t])}getBuildOptions(t){return null!=(t=null==(t=this.buildState.get(t.uri.toString()))?void 0:t.options)?t:{}}}}),iut=t(()=>{sJ(),Eht(),Sct(),SK(),eht(),Hht=class{static{me(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new fht,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=XQ(t).uri,i=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Hct.equals(t.targetUri,r)&&t.targetPath===e&&i.push(t)})}),wK(i)}allElements(e,r){let t=wK(this.symbolIndex.keys());return(t=r?t.filter(t=>!r||r.has(t)):t).map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,r){var t;return r?this.symbolByTypeIndex.get(e,r,()=>{var t;return(null!=(t=this.symbolIndex.get(e))?t:[]).filter(t=>this.astReflection.isSubtype(t.type,r))}):null!=(t=this.symbolIndex.get(e))?t:[]}remove(t){t=t.toString(),this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(t,e=_ct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,e),t=t.uri.toString(),this.symbolIndex.set(t,e),this.symbolByTypeIndex.clear(t)}async updateReferences(t,e=_ct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,e),this.referenceIndex.set(t.uri.toString(),e)}isAffected(t,e){return!!(t=this.referenceIndex.get(t.uri.toString()))&&t.some(t=>!t.local&&e.has(t.targetUri.toString()))}}}),nut=t(()=>{Sct(),Bct(),eht(),Vht=class{static{me(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Pct,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=null!=(t=t.workspaceFolders)?t:void 0}initialized(t){return this.mutex.write(t=>{var e;return this.initializeWorkspace(null!=(e=this.folders)?e:[],t)})}async initializeWorkspace(t,e=_ct.CancellationToken.None){t=await this.performStartup(t),await Rct(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],i=me(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,i),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,i))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return Wct.parse(t.uri)}async traverseFolder(e,t,r,i){t=await this.fileSystemProvider.readDirectory(t),await Promise.all(t.map(async t=>{this.includeEntry(e,t,r)&&(t.isDirectory?await this.traverseFolder(e,t.uri,r,i):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),i(t)))}))}includeEntry(t,e,r){var i=Hct.basename(e.uri);return!i.startsWith(".")&&(e.isDirectory?"node_modules"!==i&&"out"!==i:!!e.isFile&&(i=Hct.extname(e.uri),r.includes(i)))}}});function aut(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function sut(t){return t&&"modes"in t&&"defaultMode"in t}function out(t){return!aut(t)&&!sut(t)}var lut,cut,hut,uut=t(()=>{Bat(),lut=class{static{me(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,e,r,i,n){return Frt.buildUnexpectedCharactersMessage(t,e,r,i,n)}buildUnableToPopLexerModeMessage(t){return Frt.buildUnableToPopLexerModeMessage(t)}},cut={mode:"full"},hut=class{static{me(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;var e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),e=(this.tokenTypes=this.toTokenTypeDictionary(e),out(e)?Object.values(e):e),t="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new Grt(e,{positionTracking:"full",skipValidations:t,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=0){var r,i=this.chevrotainLexer.tokenize(t);return{tokens:i.tokens,errors:i.errors,hidden:null!=(i=i.groups.hidden)?i:[],report:null==(r=(i=this.tokenBuilder).flushLexingReport)?void 0:r.call(i,t)}}toTokenTypeDictionary(t){if(out(t))return t;let e=sut(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},me(aut,"isTokenTypeArray"),me(sut,"isIMultiModeLexerDefinition"),me(out,"isTokenTypeDictionary")});function dut(t,e,r){let i,n;return i="string"==typeof t?(n=e,r):(n=t.range.start,e),n=n||oot.create(0,0),r=gut(t),e=_ut(i),xut({index:0,tokens:fut({lines:r,position:n,options:e}),position:n})}function put(t,e){var r,i,e=_ut(e);return 0!==(t=gut(t)).length&&(r=t[t.length-1],i=e.start,e=e.end,!!i?.exec(t[0]))&&!!e?.exec(r)}function gut(t){return("string"==typeof t?t:t.text).split(DJ)}function fut(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let n=0;n<a.lines.length;n++){let t=0===n,e=n===a.lines.length-1,r=a.lines[n],i=0;var d,p,g,f,m,y;t&&a.options.start?(d=null==(s=a.options.start)?void 0:s.exec(r))&&(i=d.index+d[0].length):(d=null==(o=a.options.line)?void 0:o.exec(r))&&(i=d.index+d[0].length),yut(r=(r=e&&(p=null==(l=a.options.end)?void 0:l.exec(r))?r.substring(0,p.index):r).substring(0,vut(r)),i)>=r.length?0<c.length&&(p=oot.create(h,u),c.push({type:"break",content:"",range:lot.create(p,p)})):(Iut.lastIndex=i,(m=Iut.exec(r))&&(g=m[0],m=m[1],y=oot.create(h,u+i),f=oot.create(h,u+i+g.length),c.push({type:"tag",content:m,range:lot.create(y,f)}),i+=g.length,i=yut(r,i)),i<r.length&&(m=r.substring(i),y=Array.from(m.matchAll(Rut)),c.push(...mut(y,m,h,u+i)))),h++,u=0}return 0<c.length&&"break"===c[c.length-1].type?c.slice(0,-1):c}function mut(t,i,n,a){var s=[];if(0===t.length){var e=oot.create(n,a),r=oot.create(n,a+i.length);s.push({type:"text",content:i,range:lot.create(e,r)})}else{let r=0;for(var o of t){var l=o.index,c=i.substring(r,l);0<c.length&&s.push({type:"text",content:i.substring(r,l),range:lot.create(oot.create(n,r+a),oot.create(n,l+a))});let t=c.length+1,e=o[1];s.push({type:"inline-tag",content:e,range:lot.create(oot.create(n,r+t+a),oot.create(n,r+t+e.length+a))}),t+=e.length,4===o.length?(t+=o[2].length,s.push({type:"text",content:c=o[3],range:lot.create(oot.create(n,r+t+a),oot.create(n,r+t+c.length+a))})):s.push({type:"text",content:"",range:lot.create(oot.create(n,r+t+a),oot.create(n,r+t+a))}),r=l+o[0].length}0<(e=i.substring(r)).length&&s.push({type:"text",content:e,range:lot.create(oot.create(n,r+a),oot.create(n,r+a+e.length))})}return s}function yut(t,e){var r=t.substring(e).match(Mut);return r?e+r.index:t.length}function vut(t){if((t=t.match(Dut))&&"number"==typeof t.index)return t.index}function xut(t){var e=oot.create(t.position.line,t.position.character);if(0===t.tokens.length)return new Out([],lot.create(e,e));for(var r=[];t.index<t.tokens.length;){var i=but(t,r[r.length-1]);i&&r.push(i)}var n=null!=(n=null==(n=r[0])?void 0:n.range.start)?n:e,a=null!=(a=null==(a=r[r.length-1])?void 0:a.range.end)?a:e;return new Out(r,lot.create(n,a))}function but(t,e){var r=t.tokens[t.index];return"tag"===r.type?Eut(t,!1):"text"===r.type||"inline-tag"===r.type?kut(t):(wut(r,e),void t.index++)}function wut(t,e){e&&(t=new Fut("",t.range),("inlines"in e?e:e.content).inlines.push(t))}function kut(t){let e=t.tokens[t.index],r=e,i=e,n=[];for(;e&&"break"!==e.type&&"tag"!==e.type;)n.push(Tut(t)),i=e,e=t.tokens[t.index];return new But(n,lot.create(r.range.start,i.range.end))}function Tut(t){return"inline-tag"===t.tokens[t.index].type?Eut(t,!0):Cut(t)}function Eut(t,e){var r,i=t.tokens[t.index++],n=i.content.substring(1);return"text"===t.tokens[t.index]?.type?e?(r=Cut(t),new Put(n,new But([r],r.range),e,lot.create(i.range.start,r.range.end))):(r=kut(t),new Put(n,r,e,lot.create(i.range.start,r.range.end))):(t=i.range,new Put(n,new But([],t),e,t))}function Cut(t){return t=t.tokens[t.index++],new Fut(t.content,t.range)}function _ut(t){var e,r;return t?({start:t,end:e,line:r}=t,{start:Sut(t,!0),end:Sut(e,!1),line:Sut(r,!0)}):_ut({start:"/**",end:"*/",line:"*"})}function Sut(t,e){var r;return"string"==typeof t||"object"==typeof t?(r="string"==typeof t?NJ(t):t.source,e?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):t}function Aut(r,i,n){var a;if("linkplain"===r||"linkcode"===r||"link"===r){let t=i.indexOf(" "),e=i;return 0<t&&(a=yut(i,t),e=i.substring(a),i=i.substring(0,t)),("linkcode"===r||"link"===r&&"code"===n.link)&&(e=`\`${e}\``),null!=(r=null==(a=n.renderLink)?void 0:a.call(n,i,e))?r:Lut(i,e)}}function Lut(t,e){try{return Wct.parse(t,!0),`[${e}](${t})`}catch{return t}}function Nut(t){return t.endsWith(`
`)?`
`:`
`}var Iut,Rut,Mut,Dut,Out,Put,But,Fut,$ut,zut,Gut,Uut,qut,jut,Wut,Yut=t(()=>{Olt(),$J(),eht(),me(dut,"parseJSDoc"),me(put,"isJSDoc"),me(gut,"getLines"),Iut=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Rut=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,me(fut,"tokenize"),me(mut,"buildInlineTokens"),Mut=/\S/,Dut=/\s*$/,me(yut,"skipWhitespace"),me(vut,"lastCharacter"),me(xut,"parseJSDocComment"),me(but,"parseJSDocElement"),me(wut,"appendEmptyLine"),me(kut,"parseJSDocText"),me(Tut,"parseJSDocInline"),me(Eut,"parseJSDocTag"),me(Cut,"parseJSDocLine"),me(_ut,"normalizeOptions"),me(Sut,"normalizeOption"),Out=class{static{me(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Nut(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Nut(e)+r);return e.trim()}},Put=class{static{me(this,"JSDocTagImpl")}constructor(t,e,r,i){this.name=t,this.content=e,this.inline=r,this.range=i}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1<this.content.inlines.length&&(t=t+`
`+e),this.inline?`{${t}}`:t}toMarkdown(t){var e;return null!=(e=null==(e=t?.renderTag)?void 0:e.call(t,this))?e:this.toMarkdownDefault(t)}toMarkdownDefault(t){var e=this.content.toMarkdown(t);if(this.inline){var r=Aut(this.name,e,t??{});if("string"==typeof r)return r}let i="",n=("italic"===t?.tag||void 0===t?.tag?i="*":"bold"===t?.tag?i="**":"bold-italic"===t?.tag&&(i="***"),i+"@"+this.name+i);return 1===this.content.inlines.length?n=n+" — "+e:1<this.content.inlines.length&&(n=n+`
`+e),this.inline?`{${n}}`:n}},me(Aut,"renderInlineTag"),me(Lut,"renderLinkDefault"),But=class{static{me(this,"JSDocTextImpl")}constructor(t,e){this.inlines=t,this.range=e}toString(){let e="";for(let t=0;t<this.inlines.length;t++){var r=this.inlines[t],i=this.inlines[t+1];e+=r.toString(),i&&i.range.start.line>r.range.start.line&&(e+=`
`)}return e}toMarkdown(e){let r="";for(let t=0;t<this.inlines.length;t++){var i=this.inlines[t],n=this.inlines[t+1];r+=i.toMarkdown(e),n&&n.range.start.line>i.range.start.line&&(r+=`
`)}return r}},Fut=class{static{me(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},me(Nut,"fillNewlines")}),Hut=t(()=>{sJ(),Yut(),$ut=class{static{me(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&put(t))return dut(t).toMarkdown({renderLink:me((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:me(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var i=null!=(i=this.findNameInPrecomputedScopes(t,e))?i:this.findNameInGlobalScope(t,e);return i&&i.nameSegment?(t=i.nameSegment.range.start.line+1,e=i.nameSegment.range.start.character+1,`[${r}](${i.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var i=XQ(e).precomputedScopes;if(i){let t=e;do{var n=i.get(t).find(t=>t.name===r);if(n)return n}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),Vut=t(()=>{Nht(),KK(),zut=class{static{me(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return _ht(t)?t.$comment:null==(t=BK(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),Xut=t(()=>{Bct(),Jht(),Gut=class{static{me(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}},Uut=class{static{me(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{var t;0<this.queue.length&&(t=this.queue.shift())&&(e.lock(),t.resolve(e))}),this.workerPool.push(e)}}async parse(t,e){let r=await this.acquireParserWorker(e),i=new Pct,n,a=e.onCancellationRequested(()=>{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),i.resolve(t)}).catch(t=>{i.reject(t)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new Pct;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Oct)}),this.queue.push(r),r.promise}},qut=class{static{me(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,i){this.onReadyEmitter=new Qht.Emitter,this.deferred=new Pct,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=i,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Oct),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Pct,this.sendMessage(t),this.deferred.promise}}}),Kut=t(()=>{Sct(),Bct(),jut=class{static{me(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new _ct.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=Lct();return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=_ct.CancellationToken.None){var i=new Pct;return t.push({action:e,deferred:i,cancellationToken:r}),this.performNextOperation(),i.promise}async performNextOperation(){if(this.done){var t=[];if(0<this.writeQueue.length)t.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))return;t.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(t.map(async({action:t,deferred:e,cancellationToken:r})=>{try{var i=await Promise.resolve().then(()=>t(r));e.resolve(i)}catch(t){Ict(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),Zut=t(()=>{Plt(),jQ(),vK(),sJ(),wht(),KK(),Wut=class{static{me(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new lht,this.tokenTypeIdMap=new lht,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>Object.assign(Object.assign({},t),{message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){var e,r=new Map,i=new Map;for(e of JQ(t))r.set(e,{});if(t.$cstNode)for(var n of LK(t.$cstNode))i.set(n,{});return{astNodes:r,cstNodes:i}}dehydrateAstNode(t,e){var r,i,n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(n.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)hK(a)?s.push(this.dehydrateAstNode(a,e)):uK(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else hK(i)?n[r]=this.dehydrateAstNode(i,e):uK(i)?n[r]=this.dehydrateReference(i,e):void 0!==i&&(n[r]=i);return n}dehydrateReference(t,e){var r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){var r=e.cstNodes.get(t);return mK(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),gK(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):fK(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){var e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,i=new Map;for(e of JQ(t))r.set(e,{});let n;if(t.$cstNode)for(var a of LK(t.$cstNode)){let t;"fullText"in a?(t=new Rlt(a.fullText),n=t):"content"in a?t=new Nlt:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(i.set(a,t),t.root=n)}return{astNodes:r,cstNodes:i}}hydrateAstNode(t,e){var r,i,n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,t.$cstNode&&(n.$cstNode=e.cstNodes.get(t.$cstNode));for([r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)hK(a)?s.push(this.setParent(this.hydrateAstNode(a,e),n)):uK(a)?s.push(this.hydrateReference(a,n,r,e)):s.push(a)}else hK(i)?n[r]=this.setParent(this.hydrateAstNode(i,e),n):uK(i)?n[r]=this.hydrateReference(i,n,r,e):void 0!==i&&(n[r]=i);return n}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,i){return this.linker.buildReference(e,r,i.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var i=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(i.grammarSource=this.getGrammarElement(t.grammarSource)),i.astNode=e.astNodes.get(t.astNode),gK(i))for(var n of t.content)n=this.hydrateCstNode(n,e,r++),i.content.push(n);return i}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset;return new Llt(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(var e of JQ(this.grammar))lZ(e)&&this.grammarElementIdMap.set(e,t++)}}});function Qut(t){return{documentation:{CommentProvider:me(t=>new zut(t),"CommentProvider"),DocumentationProvider:me(t=>new $ut(t),"DocumentationProvider")},parser:{AsyncParser:me(t=>new Gut(t),"AsyncParser"),GrammarConfig:me(t=>_tt(t),"GrammarConfig"),LangiumParser:me(t=>gct(t),"LangiumParser"),CompletionParser:me(t=>dct(t),"CompletionParser"),ValueConverter:me(()=>new yct,"ValueConverter"),TokenBuilder:me(()=>new mct,"TokenBuilder"),Lexer:me(t=>new hut(t),"Lexer"),ParserErrorMessageProvider:me(()=>new qlt,"ParserErrorMessageProvider"),LexerErrorMessageProvider:me(()=>new lut,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:me(()=>new qht,"AstNodeLocator"),AstNodeDescriptionProvider:me(t=>new Ght(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:me(t=>new Uht(t),"ReferenceDescriptionProvider")},references:{Linker:me(t=>new Qct(t),"Linker"),NameProvider:me(()=>new aht,"NameProvider"),ScopeProvider:me(t=>new vht(t),"ScopeProvider"),ScopeComputation:me(t=>new cht(t),"ScopeComputation"),References:me(t=>new sht(t),"References")},serializer:{Hydrator:me(t=>new Wut(t),"Hydrator"),JsonSerializer:me(t=>new Aht(t),"JsonSerializer")},validation:{DocumentValidator:me(t=>new $ht(t),"DocumentValidator"),ValidationRegistry:me(t=>new Dht(t),"ValidationRegistry")},shared:me(()=>t.shared,"shared")}}function Jut(e){return{ServiceRegistry:me(t=>new Lht(t),"ServiceRegistry"),workspace:{LangiumDocuments:me(t=>new Kct(t),"LangiumDocuments"),LangiumDocumentFactory:me(t=>new Xct(t),"LangiumDocumentFactory"),DocumentBuilder:me(t=>new Yht(t),"DocumentBuilder"),IndexManager:me(t=>new Hht(t),"IndexManager"),WorkspaceManager:me(t=>new Vht(t),"WorkspaceManager"),FileSystemProvider:me(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:me(()=>new jut,"WorkspaceLock"),ConfigurationProvider:me(t=>new jht(t),"ConfigurationProvider")}}}var tdt=t(()=>{Stt(),pct(),xct(),bct(),wct(),iht(),xht(),bht(),kht(),Cht(),Nht(),Iht(),Xht(),Oht(),Kht(),Zht(),tut(),rut(),rht(),iut(),nut(),uut(),Hut(),Vut(),Hlt(),Xut(),Kut(),Zut(),me(Qut,"createDefaultCoreModule"),me(Jut,"createDefaultSharedCoreModule")});function edt(t,e,r,i,n,a,s,o,l){return idt([t,e,r,i,n,a,s,o,l].reduce(adt,{}))}function rdt(t){if(t&&t[odt])for(var e of Object.values(t))rdt(e);return t}function idt(r,i){let n=new Proxy({},{deleteProperty:me(()=>!1,"deleteProperty"),set:me(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:me((t,e)=>e===odt||ndt(t,e,r,i||n),"get"),getOwnPropertyDescriptor:me((t,e)=>(ndt(t,e,r,i||n),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:me((t,e)=>e in r,"has"),ownKeys:me(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return n}function ndt(t,e,r,i){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===ldt)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=ldt;try{t[e]="function"==typeof r?r(i):idt(r,i)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function adt(t,e){if(e)for(var[r,i]of Object.entries(e)){var n;void 0!==i&&(null!==(n=t[r])&&null!==i&&"object"==typeof n&&"object"==typeof i?t[r]=adt(n,i):t[r]=i)}return t}var sdt,odt,ldt,cdt,hdt,udt,ddt,pdt,gdt,fdt=t(()=>{(sdt=sdt||{}).merge=(t,e)=>adt(adt({},t),e),me(edt,"inject"),odt=Symbol("isProxy"),me(rdt,"eagerLoad"),me(idt,"_inject"),ldt=Symbol(),me(ndt,"_resolve"),me(adt,"_merge")}),mdt=t(()=>{}),ydt=t(()=>{Vut(),Hut(),Yut()}),vdt=t(()=>{}),xdt=t(()=>{Stt(),vdt()}),bdt=t(()=>{Bat(),bct(),uut(),cdt={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(hdt=hdt||{}).REGULAR="indentation-sensitive",hdt.IGNORE_INDENTATION="ignore-indentation",udt=class extends mct{static{me(this,"IndentationAwareTokenBuilder")}constructor(t=cdt){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},cdt),t),this.indentTokenType=Hrt({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Hrt({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,e){var r;if(!aut(t=super.buildTokens(t,e)))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 t){for(var[u,d]of s)r.name===u?r.PUSH_MODE=hdt.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:{[hdt.REGULAR]:[o,l,...h,c],[hdt.IGNORE_INDENTATION]:[...h,c]},defaultMode:hdt.REGULAR}:[o,l,c,...h];throw new Error("Some indentation/whitespace tokens not found!")}flushLexingReport(t){var e=super.flushLexingReport(t);return Object.assign(Object.assign({},e),{remainingDedents:this.flushRemainingDedents(t)})}isStartOfLine(t,e){return 0===e||`\r
`.includes(t[e-1])}matchWhitespace(t,e,r,i){return this.whitespaceRegExp.lastIndex=e,{currIndentLevel:null!=(t=(e=this.whitespaceRegExp.exec(t))?.[0].length)?t:0,prevIndentLevel:this.indentationStack.at(-1),match:e}}createIndentationTokenInstance(t,e,r,i){return e=this.getLineNumber(e,i),Xrt(t,r,i,i+r.length,e,e,1,r.length)}getLineNumber(t,e){return t.substring(0,e).split(/\r\n|\r|\n/).length}indentMatcher(t,e,r,i){return!this.isStartOfLine(t,e)||({currIndentLevel:t,prevIndentLevel:e,match:r}=this.matchWhitespace(t,e,r,i),t<=e)?null:(this.indentationStack.push(t),r)}dedentMatcher(e,r,i,t){if(this.isStartOfLine(e,r)){var{currIndentLevel:t,prevIndentLevel:n,match:a}=this.matchWhitespace(e,r,i,t);if(!(n<=t))if(-1===(n=this.indentationStack.lastIndexOf(t)))this.diagnostics.push({severity:"error",message:`Invalid dedent level ${t} at offset: ${r}. Current indentation stack: `+this.indentationStack,offset:r,length:null!=(a=null==(t=a?.[0])?void 0:t.length)?a:0,line:this.getLineNumber(e,r),column:1});else{var s=this.indentationStack.length-n-1,o=null!=(a=null==(t=e.substring(0,r).match(/[\r\n]+$/))?void 0:t[0].length)?a:1;for(let t=0;t<s;t++){var l=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(o-1));i.push(l),this.indentationStack.pop()}}}return null}buildTerminalToken(t){var t=super.buildTerminalToken(t),{indentTokenName:e,dedentTokenName:r,whitespaceTokenName:i}=this.options;return t.name===e?this.indentTokenType:t.name===r?this.dedentTokenType:t.name===i?Hrt({name:i,pattern:this.whitespaceRegExp,group:Grt.SKIPPED}):t}flushRemainingDedents(t){for(var e=[];1<this.indentationStack.length;)e.push(this.createIndentationTokenInstance(this.dedentTokenType,t,"",t.length)),this.indentationStack.pop();return this.indentationStack=[0],e}},ddt=class extends hut{static{me(this,"IndentationAwareLexer")}constructor(t){if(super(t),!(t.parser.TokenBuilder instanceof udt))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=t.parser.TokenBuilder}tokenize(t,e=cut){var r=super.tokenize(t),t=r.report,{indentTokenType:e,dedentTokenType:t}=("full"===e?.mode&&r.tokens.push(...t.remainingDedents),t.remainingDedents=[],this.indentationTokenBuilder),i=e.tokenTypeIdx,n=t.tokenTypeIdx,a=[],s=r.tokens.length-1;for(let t=0;t<s;t++){var o=r.tokens[t],l=r.tokens[t+1];o.tokenTypeIdx===i&&l.tokenTypeIdx===n?t++:a.push(o)}return 0<=s&&a.push(r.tokens[s]),r.tokens=a,r}}}),wdt=t(()=>{}),kdt=t(()=>{Xut(),pct(),Plt(),bdt(),xct(),Hlt(),uut(),uct(),wdt(),bct(),wct()}),Tdt=t(()=>{iht(),xht(),bht(),Tht(),kht(),Cht()}),Edt=t(()=>{Zut(),Nht()}),Cdt=t(()=>{pdt=class{static{me(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},gdt={fileSystemProvider:me(()=>new pdt,"fileSystemProvider")}});function _dt(){var t=edt(Jut(gdt),Ldt),e=edt(Qut({shared:t}),Adt);return t.ServiceRegistry.register(e),e}function Sdt(t){var e=_dt(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,Wct.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Adt,Ldt,Ndt=t(()=>{tdt(),fdt(),jQ(),Cdt(),eht(),Adt={Grammar:me(()=>{},"Grammar"),LanguageMetaData:me(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Ldt={AstReflection:me(()=>new UQ,"AstReflection")},me(_dt,"createMinimalGrammarServices"),me(Sdt,"loadGrammarFromJson")}),Idt={},Rdt=(lPt(Idt,{AstUtils:()=>WQ,BiMap:()=>lht,Cancellation:()=>_ct,ContextCache:()=>fht,CstUtils:()=>AK,DONE_RESULT:()=>EK,Deferred:()=>Pct,Disposable:()=>Wht,DisposableCache:()=>pht,DocumentCache:()=>mht,EMPTY_STREAM:()=>TK,ErrorWithLocation:()=>QK,GrammarUtils:()=>zJ,MultiMap:()=>oht,OperationCancelled:()=>Oct,Reduction:()=>_K,RegExpUtils:()=>_J,SimpleCache:()=>ght,StreamImpl:()=>kK,TreeStreamImpl:()=>CK,URI:()=>Wct,UriUtils:()=>Hct,WorkspaceCache:()=>yht,assertUnreachable:()=>ZK,delayNextTick:()=>Act,interruptAndCheck:()=>Rct,isOperationCancelled:()=>Ict,loadGrammarFromJson:()=>Sdt,setInterruptionPeriod:()=>Nct,startCancelableOperation:()=>Lct,stream:()=>wK}),t(()=>{Eht(),Jht(),H(Idt,Qht),wht(),eut(),JK(),Ndt(),Bct(),SK(),eht(),sJ(),Sct(),KK(),Ctt(),$J()})),Mdt=t(()=>{Xht(),Oht()}),Ddt=t(()=>{Kht(),Zht(),tut(),rut(),rht(),Cdt(),iut(),Kut(),nut()}),Odt={},Pdt=(lPt(Odt,{AbstractAstReflection:()=>yK,AbstractCstNode:()=>Alt,AbstractLangiumParser:()=>zlt,AbstractParserErrorMessageProvider:()=>Ult,AbstractThreadedAsyncParser:()=>Uut,AstUtils:()=>WQ,BiMap:()=>lht,Cancellation:()=>_ct,CompositeCstNodeImpl:()=>Nlt,ContextCache:()=>fht,CstNodeBuilder:()=>Slt,CstUtils:()=>AK,DEFAULT_TOKENIZE_OPTIONS:()=>cut,DONE_RESULT:()=>EK,DatatypeSymbol:()=>Flt,DefaultAstNodeDescriptionProvider:()=>Ght,DefaultAstNodeLocator:()=>qht,DefaultAsyncParser:()=>Gut,DefaultCommentProvider:()=>zut,DefaultConfigurationProvider:()=>jht,DefaultDocumentBuilder:()=>Yht,DefaultDocumentValidator:()=>$ht,DefaultHydrator:()=>Wut,DefaultIndexManager:()=>Hht,DefaultJsonSerializer:()=>Aht,DefaultLangiumDocumentFactory:()=>Xct,DefaultLangiumDocuments:()=>Kct,DefaultLexer:()=>hut,DefaultLexerErrorMessageProvider:()=>lut,DefaultLinker:()=>Qct,DefaultNameProvider:()=>aht,DefaultReferenceDescriptionProvider:()=>Uht,DefaultReferences:()=>sht,DefaultScopeComputation:()=>cht,DefaultScopeProvider:()=>vht,DefaultServiceRegistry:()=>Lht,DefaultTokenBuilder:()=>mct,DefaultValueConverter:()=>yct,DefaultWorkspaceLock:()=>jut,DefaultWorkspaceManager:()=>Vht,Deferred:()=>Pct,Disposable:()=>Wht,DisposableCache:()=>pht,DocumentCache:()=>mht,DocumentState:()=>Vct,DocumentValidator:()=>zht,EMPTY_SCOPE:()=>dht,EMPTY_STREAM:()=>TK,EmptyFileSystem:()=>gdt,EmptyFileSystemProvider:()=>pdt,ErrorWithLocation:()=>QK,GrammarAST:()=>tZ,GrammarUtils:()=>zJ,IndentationAwareLexer:()=>ddt,IndentationAwareTokenBuilder:()=>udt,JSDocDocumentationProvider:()=>$ut,LangiumCompletionParser:()=>jlt,LangiumParser:()=>Glt,LangiumParserErrorMessageProvider:()=>qlt,LeafCstNodeImpl:()=>Llt,LexingMode:()=>hdt,MapScope:()=>uht,Module:()=>sdt,MultiMap:()=>oht,OperationCancelled:()=>Oct,ParserWorker:()=>qut,Reduction:()=>_K,RegExpUtils:()=>_J,RootCstNodeImpl:()=>Rlt,SimpleCache:()=>ght,StreamImpl:()=>kK,StreamScope:()=>hht,TextDocument:()=>jct,TreeStreamImpl:()=>CK,URI:()=>Wct,UriUtils:()=>Hct,ValidationCategory:()=>Mht,ValidationRegistry:()=>Dht,ValueConverter:()=>vct,WorkspaceCache:()=>yht,assertUnreachable:()=>ZK,createCompletionParser:()=>dct,createDefaultCoreModule:()=>Qut,createDefaultSharedCoreModule:()=>Jut,createGrammarConfig:()=>_tt,createLangiumParser:()=>gct,createParser:()=>Vlt,delayNextTick:()=>Act,diagnosticData:()=>Rht,eagerLoad:()=>rdt,getDiagnosticRange:()=>Pht,indentationBuilderDefaultOptions:()=>cdt,inject:()=>edt,interruptAndCheck:()=>Rct,isAstNode:()=>hK,isAstNodeDescription:()=>dK,isAstNodeWithComment:()=>_ht,isCompositeCstNode:()=>gK,isIMultiModeLexerDefinition:()=>sut,isJSDoc:()=>put,isLeafCstNode:()=>fK,isLinkingError:()=>pK,isNamed:()=>nht,isOperationCancelled:()=>Ict,isReference:()=>uK,isRootCstNode:()=>mK,isTokenTypeArray:()=>aut,isTokenTypeDictionary:()=>out,loadGrammarFromJson:()=>Sdt,parseJSDoc:()=>dut,prepareLangiumParser:()=>fct,setInterruptionPeriod:()=>Nct,startCancelableOperation:()=>Lct,stream:()=>wK,toDiagnosticData:()=>Fht,toDiagnosticSeverity:()=>Bht}),t(()=>{tdt(),fdt(),Iht(),mdt(),vK(),ydt(),xdt(),kdt(),Tdt(),Edt(),Rdt(),H(Odt,Idt),Mdt(),Ddt(),jQ()}));function Bdt(t){return p0t.isInstance(t,Xdt)}function Fdt(t){return p0t.isInstance(t,Zdt)}function $dt(t){return p0t.isInstance(t,t0t)}function zdt(t){return p0t.isInstance(t,e0t)}function Gdt(t){return p0t.isInstance(t,r0t)}function Udt(t){return p0t.isInstance(t,i0t)}function qdt(t){return p0t.isInstance(t,a0t)}function jdt(t){return p0t.isInstance(t,o0t)}function Wdt(t){return p0t.isInstance(t,l0t)}function Ydt(t){return p0t.isInstance(t,"Pie")}function Hdt(t){return p0t.isInstance(t,c0t)}var Vdt,s,Xdt,Kdt,Zdt,Qdt,Jdt,t0t,e0t,r0t,i0t,n0t,a0t,s0t,o0t,l0t,c0t,h0t,u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t,w0t,k0t,T0t,E0t,C0t,_0t,S0t,A0t,L0t,N0t,I0t,R0t,M0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,G0t,U0t,q0t=t(()=>{Pdt(),Pdt(),Pdt(),Pdt(),Vdt=Object.defineProperty,s=me((t,e)=>Vdt(t,"name",{value:e,configurable:!0}),"__name"),Xdt="Architecture",me(Bdt,"isArchitecture"),s(Bdt,"isArchitecture"),Kdt="Axis",Zdt="Branch",me(Fdt,"isBranch"),s(Fdt,"isBranch"),Qdt="Checkout",Jdt="CherryPicking",t0t="Commit",me($dt,"isCommit"),s($dt,"isCommit"),e0t="Common",me(zdt,"isCommon"),s(zdt,"isCommon"),r0t="GitGraph",me(Gdt,"isGitGraph"),s(Gdt,"isGitGraph"),i0t="Info",me(Udt,"isInfo"),s(Udt,"isInfo"),n0t="Junction",a0t="Merge",me(qdt,"isMerge"),s(qdt,"isMerge"),s0t="Option",o0t="Packet",me(jdt,"isPacket"),s(jdt,"isPacket"),l0t="PacketBlock",me(Wdt,"isPacketBlock"),s(Wdt,"isPacketBlock"),me(Ydt,"isPie"),s(Ydt,"isPie"),c0t="PieSection",me(Hdt,"isPieSection"),s(Hdt,"isPieSection"),h0t="Service",u0t="Direction",d0t=class extends yK{static{me(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[Xdt,Kdt,Zdt,Qdt,Jdt,t0t,e0t,"Curve",u0t,"Edge","Entry",r0t,"Group",i0t,n0t,a0t,s0t,o0t,l0t,"Pie",c0t,"Radar",h0t,"Statement"]}computeIsSubtype(t,e){switch(t){case Zdt:case Qdt:case Jdt:case t0t:case a0t:return this.isSubtype("Statement",e);case u0t:return this.isSubtype(r0t,e);default:return!1}}getReferenceType(t){if("Entry:axis"!=(t=t.container.$type+":"+t.property))throw new Error(t+" is not a valid reference id.");return Kdt}getTypeMetaData(t){switch(t){case Xdt:return{name:Xdt,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case Kdt:return{name:Kdt,properties:[{name:"label"},{name:"name"}]};case Zdt:return{name:Zdt,properties:[{name:"name"},{name:"order"}]};case Qdt:return{name:Qdt,properties:[{name:"branch"}]};case Jdt:return{name:Jdt,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case t0t:return{name:t0t,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case e0t:return{name:e0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Curve":return{name:"Curve",properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"Entry":return{name:"Entry",properties:[{name:"axis"},{name:"value"}]};case r0t:return{name:r0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case i0t:return{name:i0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case n0t:return{name:n0t,properties:[{name:"id"},{name:"in"}]};case a0t:return{name:a0t,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case s0t:return{name:s0t,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case o0t:return{name:o0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case l0t:return{name:l0t,properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case c0t:return{name:c0t,properties:[{name:"label"},{name:"value"}]};case"Radar":return{name:"Radar",properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case h0t:return{name:h0t,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case u0t:return{name:u0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},p0t=new d0t,f0t=s(()=>g0t=g0t??Sdt('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"InfoGrammar"),y0t=s(()=>m0t=m0t??Sdt(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`),"PacketGrammar"),x0t=s(()=>v0t=v0t??Sdt('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"PieGrammar"),w0t=s(()=>b0t=b0t??Sdt('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@15"},"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@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"ArchitectureGrammar"),T0t=s(()=>k0t=k0t??Sdt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"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@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),C0t=s(()=>E0t=E0t??Sdt(`{"$type":"Grammar","isDeclared":true,"name":"Radar","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@12"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"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@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@12"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@19"},"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@18"},"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@18"},"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@18"},"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@20"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9\\\\-_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),I0t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(N0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(L0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(A0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(S0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(_0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},R0t={AstReflection:s(()=>new d0t,"AstReflection")},M0t={Grammar:s(()=>f0t(),"Grammar"),LanguageMetaData:s(()=>_0t,"LanguageMetaData"),parser:{}},D0t={Grammar:s(()=>y0t(),"Grammar"),LanguageMetaData:s(()=>S0t,"LanguageMetaData"),parser:{}},O0t={Grammar:s(()=>x0t(),"Grammar"),LanguageMetaData:s(()=>A0t,"LanguageMetaData"),parser:{}},P0t={Grammar:s(()=>w0t(),"Grammar"),LanguageMetaData:s(()=>L0t,"LanguageMetaData"),parser:{}},B0t={Grammar:s(()=>T0t(),"Grammar"),LanguageMetaData:s(()=>N0t,"LanguageMetaData"),parser:{}},F0t={Grammar:s(()=>C0t(),"Grammar"),LanguageMetaData:s(()=>I0t,"LanguageMetaData"),parser:{}},$0t={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},z0t=class extends yct{static{me(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var i=this.runCommonConverter(t,e,r);return void 0===(i=void 0===i?this.runCustomConverter(t,e,r):i)?super.runConverter(t,e,r):i}runCommonConverter(t,e,r){return void 0!==(t=$0t[t.name])&&null!==(t=t.exec(e))?void 0!==t[1]?t[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==t[2]?t[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
`):void 0:void 0}},G0t=class extends z0t{static{me(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},U0t=class extends mct{static{me(this,"AbstractMermaidTokenBuilder")}static{s(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends U0t{static{me(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function j0t(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),B0t,Y0t);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var W0t,Y0t,H0t=t(()=>{q0t(),Pdt(),W0t=class extends U0t{static{me(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},Y0t={parser:{TokenBuilder:s(()=>new W0t,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(j0t,"createGitGraphServices"),s(j0t,"createGitGraphServices")});function V0t(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),M0t,K0t);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var X0t,K0t,Z0t=t(()=>{q0t(),Pdt(),X0t=class extends U0t{static{me(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},K0t={parser:{TokenBuilder:s(()=>new X0t,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(V0t,"createInfoServices"),s(V0t,"createInfoServices")});function Q0t(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),D0t,tpt);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var J0t,tpt,ept=t(()=>{q0t(),Pdt(),J0t=class extends U0t{static{me(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},tpt={parser:{TokenBuilder:s(()=>new J0t,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(Q0t,"createPacketServices"),s(Q0t,"createPacketServices")});function rpt(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),O0t,apt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var ipt,npt,apt,spt=t(()=>{q0t(),Pdt(),ipt=class extends U0t{static{me(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},npt=class extends z0t{static{me(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},apt={parser:{TokenBuilder:s(()=>new ipt,"TokenBuilder"),ValueConverter:s(()=>new npt,"ValueConverter")}},me(rpt,"createPieServices"),s(rpt,"createPieServices")});function opt(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),P0t,hpt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var lpt,cpt,hpt,upt=t(()=>{q0t(),Pdt(),lpt=class extends U0t{static{me(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},cpt=class extends z0t{static{me(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},hpt={parser:{TokenBuilder:s(()=>new lpt,"TokenBuilder"),ValueConverter:s(()=>new cpt,"ValueConverter")}},me(opt,"createArchitectureServices"),s(opt,"createArchitectureServices")});function dpt(t=gdt){var t=edt(Jut(t),R0t),e=edt(Qut({shared:t}),F0t,gpt);return t.ServiceRegistry.register(e),{shared:t,Radar:e}}var ppt,gpt,fpt=t(()=>{q0t(),Pdt(),ppt=class extends U0t{static{me(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},gpt={parser:{TokenBuilder:s(()=>new ppt,"TokenBuilder"),ValueConverter:s(()=>new G0t,"ValueConverter")}},me(dpt,"createRadarServices"),s(dpt,"createRadarServices")}),mpt={},ypt=(lPt(mpt,{InfoModule:()=>K0t,createInfoServices:()=>V0t}),t(()=>{Z0t(),q0t()})),vpt={},xpt=(lPt(vpt,{PacketModule:()=>tpt,createPacketServices:()=>Q0t}),t(()=>{ept(),q0t()})),bpt={},wpt=(lPt(bpt,{PieModule:()=>apt,createPieServices:()=>rpt}),t(()=>{spt(),q0t()})),kpt={},Tpt=(lPt(kpt,{ArchitectureModule:()=>hpt,createArchitectureServices:()=>opt}),t(()=>{upt(),q0t()})),Ept={},Cpt=(lPt(Ept,{GitGraphModule:()=>Y0t,createGitGraphServices:()=>j0t}),t(()=>{H0t(),q0t()})),_pt={},Spt=(lPt(_pt,{RadarModule:()=>gpt,createRadarServices:()=>dpt}),t(()=>{fpt(),q0t()}));async function Apt(t,e){var r=Npt[t];if(!r)throw new Error("Unknown diagram type: "+t);if(Lpt[t]||await r(),0<(r=Lpt[t].parse(e)).lexerErrors.length||0<r.parserErrors.length)throw new Ipt(r);return r.value}var Lpt,Npt,Ipt,Rpt=t(()=>{H0t(),Z0t(),ept(),spt(),upt(),fpt(),q0t(),Lpt={},Npt={info:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(ypt(),mpt))).createInfoServices)().Info.parser.LangiumParser;Lpt.info=t},"info"),packet:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(xpt(),vpt))).createPacketServices)().Packet.parser.LangiumParser;Lpt.packet=t},"packet"),pie:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(wpt(),bpt))).createPieServices)().Pie.parser.LangiumParser;Lpt.pie=t},"pie"),architecture:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Tpt(),kpt))).createArchitectureServices)().Architecture.parser.LangiumParser;Lpt.architecture=t},"architecture"),gitGraph:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Cpt(),Ept))).createGitGraphServices)().GitGraph.parser.LangiumParser;Lpt.gitGraph=t},"gitGraph"),radar:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Spt(),_pt))).createRadarServices)().Radar.parser.LangiumParser;Lpt.radar=t},"radar")},me(Apt,"parse"),s(Apt,"parse"),Ipt=class extends Error{static{me(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(`
`)} `+t.parserErrors.map(t=>t.message).join(`
`)),this.result=t}static{s(this,"MermaidParseError")}}});function Mpt(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var Dpt,Opt,Ppt=t(()=>{me(Mpt,"populateCommonDb")}),Bpt=t(()=>{Dpt={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),Fpt=t(()=>{Opt=class{constructor(t){this.init=t,this.records=this.init()}static{me(this,"ImperativeState")}reset(){this.records=this.init()}}});function $pt(){return OE({length:7})}function zpt(t,i){let n=Object.create(null);return t.reduce((t,e)=>{var r=i(e);return n[r]||(n[r]=!0,t.push(e)),t},[])}function Gpt(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function Upt(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var i,n=[r,e.id,e.seq];for(i in b.records.branches)b.records.branches.get(i)===e.id&&n.push(i);if(M.debug(n.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=b.records.commits.get(e.parents[0]);Gpt(t,e,a),e.parents[1]&&t.push(b.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=b.records.commits.get(e.parents[0]),Gpt(t,e,a))}Upt(t=zpt(t,t=>t.id))}var qpt,jpt,b,Wpt,Ypt,Hpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt,tgt,egt,rgt,igt,ngt,agt,sgt,ogt,lgt,cgt,hgt,ugt,dgt,pgt,ggt,fgt,mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,Egt,Cgt,_gt,Sgt,Agt,Lgt,Ngt,Igt,Rgt,Mgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt,zgt,Ggt,Ugt,qgt,jgt,Wgt,Ygt,Hgt,Vgt,Xgt,Kgt=t(()=>{e(),KE(),Ai(),Jc(),gu(),Bpt(),Fpt(),_i(),qpt=mr.gitGraph,jpt=me(()=>xE({...qpt,...Nr().gitGraph}),"getConfig"),b=new Opt(()=>{var t=(e=jpt()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),me($pt,"getID"),me(zpt,"uniqBy"),Wpt=me(function(t){b.records.direction=t},"setDirection"),Ypt=me(function(t){M.debug("options str",t),t=t?.trim()||"{}";try{b.records.options=JSON.parse(t)}catch(t){M.error("error while parsing gitGraph options",t.message)}},"setOptions"),Hpt=me(function(){return b.records.options},"getOptions"),Vpt=me(function(t){let e=t.msg,r=t.id,i=t.type,n=t.tags,a=(M.info("commit",e,r,i,n),M.debug("Entering commit:",e,r,i,n),jpt());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),n=n?.map(t=>L.sanitizeText(t,a)),t={id:r||b.records.seq+"-"+$pt(),message:e,seq:b.records.seq++,type:i??Dpt.NORMAL,tags:n??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=t,M.info("main branch",a.mainBranchName),b.records.commits.set(t.id,t),b.records.branches.set(b.records.currBranch,t.id),M.debug("in pushCommit "+t.id)},"commit"),Xpt=me(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,jpt());if(b.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);b.records.branches.set(e,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(e,{name:e,order:t}),Qpt(e),M.debug("in createBranch")},"branch"),Kpt=me(t=>{var e=t.branch,r=t.id,i=t.type,n=t.tags,a=jpt(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(e),t=t?b.records.commits.get(t):void 0,s=a?b.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(b.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!b.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&b.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id")).hash={text:`merge ${e} ${r} ${i} `+n?.join(" "),token:`merge ${e} ${r} ${i} `+n?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${i} `+n?.join(" ")]},t;var s=a||"",o={id:r||b.records.seq+"-"+$pt(),message:`merged branch ${e} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:Dpt.MERGE,customType:i,customId:!!r,tags:n??[]};b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in mergeBranch")},"merge"),Zpt=me(function(t){let e=t.id,r=t.targetId,i=t.tags,n=t.parent,a=(M.debug("Entering cherryPick:",e,r,i),jpt());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),i=i?.map(t=>L.sanitizeText(t,a)),n=L.sanitizeText(n,a),!e||!b.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=b.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(t.parents)||!t.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=t.branch;if(t.type===Dpt.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||!b.records.commits.has(r)){if(s===b.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=b.records.branches.get(b.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},o;var o=b.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+$pt(),message:`cherry-picked ${t?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,t.id],branch:b.records.currBranch,type:Dpt.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+t.id+(t.type===Dpt.MERGE?"|parent:"+n:"")]},b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in cherryPick")}},"cherryPick"),Qpt=me(function(t){var e;if(t=L.sanitizeText(t,jpt()),!b.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;b.records.currBranch=t,e=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==e&&e?b.records.commits.get(e)??null:null},"checkout"),me(Gpt,"upsert"),me(Upt,"prettyPrintCommitHistory"),Jpt=me(function(){M.debug(b.records.commits),Upt([ngt()[0]])},"prettyPrint"),tgt=me(function(){b.reset(),oh()},"clear"),egt=me(function(){return[...b.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),rgt=me(function(){return b.records.branches},"getBranches"),igt=me(function(){return b.records.commits},"getCommits"),ngt=me(function(){var t=[...b.records.commits.values()];return t.forEach(function(t){M.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),agt=me(function(){return b.records.currBranch},"getCurrentBranch"),sgt=me(function(){return b.records.direction},"getDirection"),ogt=me(function(){return b.records.head},"getHead"),lgt={commitType:Dpt,getConfig:jpt,setDirection:Wpt,setOptions:Ypt,getOptions:Hpt,commit:Vpt,branch:Xpt,merge:Kpt,cherryPick:Zpt,checkout:Qpt,prettyPrint:Jpt,clear:tgt,getBranchesAsObjArray:egt,getBranches:rgt,getCommits:igt,getCommitsArray:ngt,getCurrentBranch:agt,getDirection:sgt,getHead:ogt,setAccTitle:lh,getAccTitle:ch,getAccDescription:uh,setAccDescription:hh,setDiagramTitle:dh,getDiagramTitle:ph}}),Zgt=t(()=>{Rpt(),e(),Ppt(),Kgt(),Bpt(),cgt=me((t,e)=>{Mpt(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)hgt(r,e)},"populate"),hgt=me((t,e)=>{var r={Commit:me(t=>e.commit(ugt(t)),"Commit"),Branch:me(t=>e.branch(dgt(t)),"Branch"),Merge:me(t=>e.merge(pgt(t)),"Merge"),Checkout:me(t=>e.checkout(ggt(t)),"Checkout"),CherryPicking:me(t=>e.cherryPick(fgt(t)),"CherryPicking")}[t.$type];r?r(t):M.error("Unknown statement type: "+t.$type)},"parseStatement"),ugt=me(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?Dpt[t.type]:Dpt.NORMAL,tags:t.tags??void 0}),"parseCommit"),dgt=me(t=>({name:t.name,order:t.order??0}),"parseBranch"),pgt=me(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?Dpt[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),ggt=me(t=>t.branch,"parseCheckout"),fgt=me(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),mgt={parse:me(async t=>{t=await Apt("gitGraph",t),M.debug(t),cgt(t,lgt)},"parse")}}),Qgt=t(()=>{Z3(),fu(),e(),KE(),Bpt(),Ygt=D(),ygt=Ygt?.gitGraph,vgt=new Map,xgt=new Map,bgt=new Map,wgt=[],kgt=0,Tgt="LR",Egt=me(()=>{vgt.clear(),xgt.clear(),bgt.clear(),kgt=0,wgt=[],Tgt="LR"},"clear"),Cgt=me(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),_gt=me(t=>{let r,i,n;return n="BT"===Tgt?(i=me((t,e)=>t<=e,"comparisonFunc"),1/0):(i=me((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===Tgt||"BT"==Tgt?xgt.get(t)?.y:xgt.get(t)?.x;void 0!==e&&i(e,n)&&(r=t,n=e)}),r},"findClosestParent"),Sgt=me(t=>{let r="",i=1/0;return t.forEach(t=>{var e=xgt.get(t).y;e<=i&&(r=t,i=e)}),r||void 0},"findClosestParentBT"),Agt=me((t,i,e)=>{let n=e,a=e,r=[];t.forEach(t=>{var e=i.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(n=Ngt(e),a=Math.max(n,a)):r.push(e),Igt(e,n)}),n=a,r.forEach(t=>{Rgt(t,n,e)}),t.forEach(t=>{var e,r;(t=i.get(t))?.parents.length&&(e=Sgt(t.parents),(n=xgt.get(e).y-40)<=a&&(a=n),e=vgt.get(t.branch).pos,r=n-10,xgt.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),Lgt=me(t=>{var e=_gt(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=xgt.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),Ngt=me(t=>Lgt(t)+40,"calculateCommitPosition"),Igt=me((t,e)=>{var r=vgt.get(t.branch);if(r)return r=r.pos,xgt.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),Rgt=me((t,e,r)=>{var i=vgt.get(t.branch);if(!i)throw new Error("Branch not found for commit "+t.id);i=i.pos,xgt.set(t.id,{x:i,y:e+r})},"setRootPosition"),Mgt=me((t,e,r,i,n,a)=>{var s;a===Dpt.HIGHLIGHT?(t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${n%8} ${i}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${n%8} ${i}-inner`)):a===Dpt.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+i),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+i),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+i),t.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 ${e.id} `+i),t.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 ${e.id} `+i)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===Dpt.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+n%8),a===Dpt.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${i} ${e.id} commit`+n%8)),a===Dpt.REVERSE&&t.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} ${e.id} commit`+n%8))},"drawCommitBullet"),Dgt=me((t,e,r,i)=>{var n,a;e.type!==Dpt.CHERRY_PICK&&(e.customId&&e.type===Dpt.MERGE||e.type!==Dpt.MERGE)&&ygt?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),n=(e=t.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(e.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"===Tgt||"BT"===Tgt?(a.attr("x",r.x-(n.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(n.width+16)).attr("y",r.y+n.height-12)):e.attr("x",r.posWithOffset-n.width/2),ygt.rotateCommitLabel)&&("TB"===Tgt||"BT"===Tgt?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(n.width+10)/25*9.5,a=10+n.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+i+", "+r.y+")")))},"drawCommitLabel"),Ogt=me((n,a,s,o)=>{if(0<a.tags.length){let t=0,e=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-t).attr("class","tag-label").text(l)).node()?.getBBox();if(!u)throw new Error("Tag bbox not found");e=Math.max(e,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:t}),t+=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-e/2-2},${2+y}
${o-e/2-2},${y-2}
${s.posWithOffset-e/2-4},${y-m-2}
${s.posWithOffset+e/2+4},${y-m-2}
${s.posWithOffset+e/2+4},${y+m+2}
${s.posWithOffset-e/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",o-e/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==Tgt&&"BT"!==Tgt||(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+e+4},${y-m-2}
${s.x+10+e+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"),Pgt=me(t=>{switch(t.customType??t.type){case Dpt.NORMAL:return"commit-normal";case Dpt.REVERSE:return"commit-reverse";case Dpt.HIGHLIGHT:return"commit-highlight";case Dpt.MERGE:return"commit-merge";case Dpt.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bgt=me((t,e,r,i)=>{var n,a={x:0,y:0};return 0<t.parents.length?(n=_gt(t.parents))?(n=i.get(n)??a,"TB"===e?n.y+40:"BT"===e?(i.get(t.id)??a).y-40:n.x+40):0:"TB"===e?30:"BT"===e?(i.get(t.id)??a).y-40:0},"calculatePosition"),Fgt=me((t,e,r)=>{var r="BT"===Tgt&&r?e:e+10,e="TB"===Tgt||"BT"===Tgt?r:vgt.get(t.branch)?.pos,i="TB"===Tgt||"BT"===Tgt?vgt.get(t.branch)?.pos:r;if(void 0===i||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:i,y:e,posWithOffset:r}},"getCommitPosition"),$gt=me((t,a,s)=>{if(!ygt)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===Tgt||"BT"===Tgt?30:0,e=[...a.keys()],h=ygt?.parallelCommits??!1,r=me((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),i=e.sort(r);"BT"===Tgt&&(h&&Agt(i,a,c),i=i.reverse()),i.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=Bgt(e,Tgt,c,xgt));var r,i,n,t=Fgt(e,c,h);s&&(r=Pgt(e),i=e.customType??e.type,n=vgt.get(e.branch)?.index??0,Mgt(o,e,t,r,n,i),Dgt(l,e,t,c),Ogt(l,e,t,c)),"TB"===Tgt||"BT"===Tgt?xgt.set(e.id,{x:t.x,y:t.posWithOffset}):xgt.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===Tgt&&h?c+40:c+40+10)>kgt&&(kgt=c)})},"drawCommits"),zgt=me((e,r,t,i,n)=>{let a=(("TB"===Tgt||"BT"===Tgt?t.x<i.x:t.y<i.y)?r:e).branch,s=me(t=>t.branch===a,"isOnBranchToGetCurve"),o=me(t=>t.seq>e.seq&&t.seq<r.seq,"isBetweenCommits");return[...n.values()].some(t=>o(t)&&s(t))},"shouldRerouteArrow"),Ggt=me((t,e,r=0)=>{let i=t+Math.abs(t-e)/2,n;return 5<r?i:wgt.every(t=>10<=Math.abs(t-i))?(wgt.push(i),i):(n=Math.abs(t-e),Ggt(t,e-n/5,r+1))},"findLane"),Ugt=me((t,e,r,i)=>{var n,a=xgt.get(e.id),s=xgt.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=zgt(e,r,a,s,i),l="",c="",h=0,u=0,d=vgt.get(r.branch)?.index;r.type===Dpt.MERGE&&e.id!==r.parents[0]&&(d=vgt.get(e.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?Ggt(a.y,s.y):Ggt(s.y,a.y),n=a.x<s.x?Ggt(a.x,s.x):Ggt(s.x,a.x),p="TB"===Tgt?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=vgt.get(e.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"===Tgt?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=vgt.get(e.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=vgt.get(e.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"===Tgt?(a.x<s.x&&(p=r.type===Dpt.MERGE&&e.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===Dpt.MERGE&&e.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"===Tgt?(a.x<s.x&&(p=r.type===Dpt.MERGE&&e.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===Dpt.MERGE&&e.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===Dpt.MERGE&&e.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===Dpt.MERGE&&e.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");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),qgt=me((t,r)=>{let i=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0<e.parents.length&&e.parents.forEach(t=>{Ugt(i,r.get(t),e,r)})})},"drawArrows"),jgt=me((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=vgt.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(i=a.append("line")).attr("x1",0),i.attr("y1",r),i.attr("x2",kgt),i.attr("y2",r),i.attr("class","branch branch"+e),"TB"===Tgt?(i.attr("y1",30),i.attr("x1",r),i.attr("y2",kgt),i.attr("x2",r)):"BT"===Tgt&&(i.attr("y1",kgt),i.attr("x1",r),i.attr("y2",30),i.attr("x2",r)),wgt.push(r);var i=t.name,t=Cgt(i),i=a.insert("rect"),n=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(n.node().appendChild(t),t.getBBox());i.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===ygt?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),n.attr("transform","translate("+(-t.width-14-(!0===ygt?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===Tgt?(i.attr("x",r-t.width/2-10).attr("y",0),n.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===Tgt?(i.attr("x",r-t.width/2-10).attr("y",kgt),n.attr("transform","translate("+(r-t.width/2-5)+", "+kgt+")")):i.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),Wgt=me(function(t,e,r,i,n){return vgt.set(t,{pos:e,index:r}),e+(50+(n?40:0)+("TB"===Tgt||"BT"===Tgt?i.width/2:0))},"setBranchPosition"),Ygt=me(function(t,e,r,i){if(Egt(),M.debug("in gitgraph renderer",t+`
`,"id:",e,r),!ygt)throw new Error("GitGraph config not found");let s=ygt.rotateCommitLabel??!1,n=i.db,o=(bgt=n.getCommits(),t=n.getBranchesAsObjArray(),Tgt=n.getDirection(),j(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=Cgt(t.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=Wgt(t.name,l,e,r,s),a.remove(),n.remove(),i.remove()}),$gt(o,bgt,!1),ygt.showBranches&&jgt(o,t),qgt(o,bgt),$gt(o,bgt,!0),YE.insertTitle(o,"gitTitleText",ygt.titleTopMargin??0,n.getDiagramTitle()),xh(void 0,o,ygt.diagramPadding,ygt.useMaxWidth)},"draw"),Hgt={draw:Ygt}}),Jgt=t(()=>{Vgt=me(e=>`
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0,1,2,3,4,5,6,7].map(t=>`
.branch-label${t} { fill: ${e["gitBranchLabel"+t]}; }
.commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
.commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
.label${t} { fill: ${e["git"+t]}; }
.arrow${t} { stroke: ${e["git"+t]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${e.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};}
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
.tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; }
.tag-hole { fill: ${e.textColor}; }
.commit-merge {
stroke: ${e.primaryColor};
fill: ${e.primaryColor};
}
.commit-reverse {
stroke: ${e.primaryColor};
fill: ${e.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${e.primaryColor};
fill: ${e.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.textColor};
}
`,"getStyles"),Xgt=Vgt}),t1t={};lPt(t1t,{diagram:()=>e1t});var e1t,r1t,i1t,n1t=t(()=>{Zgt(),Kgt(),Qgt(),Jgt(),e1t={parser:mgt,db:lgt,renderer:Hgt,styles:Xgt}}),a1t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],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],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],_=[1,35],i={trace:me(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:me(function(t,e,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]},e(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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},e(r,[2,7],{1:[2,1]}),e(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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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,me(t,"Parser"),(r1t=new((t.prototype=i).Parser=t)).parser=r1t,i1t=r1t}),s1t=iPt((t,e)=>{function r(){return function(t,e,n){var a=me(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,i;return this.$utils().u(t)?(r=a(this),i=this.isoWeekYear(),e=4-(i=(this.$u?n.utc:n)().year(i).startOf("year")).isoWeekday(),4<i.isoWeekday()&&(e+=7),i=i.add(e,"day"),r.diff(i,"week")+1):this.add(7*(t-this.isoWeek()),"day")},e.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)},e.startOf);e.startOf=function(t,e){var r=this.$utils(),i=!!r.u(e)||e;return"isoweek"===r.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=r()}),o1t=iPt((t,e)=>{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,t=/\d/,e=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,g={},n=me(function(t){return(t=+t)+(68<t?1900:2e3)},"a"),a=me(function(e){return function(t){this[e]=+t}},"f"),s=[/[+-]\d\d:?(\d\d)?|Z/,function(t){var e;(this.zone||(this.zone={})).offset=t&&"Z"!==t&&0!==(e=60*(t=t.match(/([+-]|\d\d)/g))[1]+(+t[2]||0))?"+"===t[0]?-e:e:0}],c=me(function(t){return(t=g[t])&&(t.indexOf?t:t.s.concat(t.f))},"u"),h=me(function(t,e){var r,i=g.meridiem;if(i){for(var n=1;n<=24;n+=1)if(-1<t.indexOf(i(n,0,e))){r=12<n;break}}else r=t===(e?"pm":"PM");return r},"d"),d={A:[i,function(t){this.afternoon=h(t,!1)}],a:[i,function(t){this.afternoon=h(t,!0)}],Q:[t,function(t){this.month=3*(t-1)+1}],S:[t,function(t){this.milliseconds=100*+t}],SS:[e,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],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:[e,a("day")],Do:[i,function(t){var e=g.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[r,a("week")],ww:[e,a("week")],M:[r,a("month")],MM:[e,a("month")],MMM:[i,function(t){var e=c("months");if((e=(c("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1)<1)throw new Error;this.month=e%12||e}],MMMM:[i,function(t){if((t=c("months").indexOf(t)+1)<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[e,function(t){this.year=n(t)}],YYYY:[/\d{4}/,a("year")],Z:s,ZZ:s};function T(t){for(var e=t,n=g&&g.formats,h=(t=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,e,r){var i=r&&r.toUpperCase();return e||n[r]||o[r]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,r){return e||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(t){for(var e,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=t.slice(s),l=l.exec(o)[0],c.call(n,l),t=t.replace(l,""))}return void 0!==(i=(e=n).afternoon)&&(r=e.hours,i?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon),n}}return me(T,"l"),function(t,e,d){d.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(n=t.parseTwoDigitYear);var p=(t=e.prototype).parse;t.parse=function(t){var e=t.date,r=t.utc,i=t.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=((t,e,r,i)=>{try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var n=T(e)(t),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,x=l||0,b=c||0,w=h||0,k=u||0;return d?new Date(Date.UTC(m,y,f,x,b,w,k+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,x,b,w,k)):(v=new Date(m,y,f,x,b,w,k),p?i(v).week(p).toDate():v)}catch{return new Date("")}})(e,n,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),o&&e!=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,t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=r()}),l1t=iPt((t,e)=>{function r(){return function(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,i=this,n=this.$locale();return this.isValid()?(e=this.$utils(),r=(t||"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(t){switch(t){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 e.s(i.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(i.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===i.$H?24:i.$H),"k"===t?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 t}}),a.bind(this)(r)):a.bind(this)(t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=r()});function c1t(r,i,t){let n=!0;for(;n;)n=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(i[t]=!0,r.shift(1),n=!0)})}var h1t,u1t,d1t,p1t,g1t,f1t,m1t,y1t,v1t,x1t,b1t,w1t,k1t,T1t,E1t,C1t,_1t,S1t,A1t,L1t,N1t,I1t,R1t,M1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,G1t,U1t,q1t,j1t,W1t,Y1t,H1t,V1t,X1t,K1t,Z1t,Q1t,J1t,tft,eft,rft,ift,nft,aft,sft,oft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,Eft,Cft,_ft,Sft,Aft,Lft,Nft,Ift,Rft,Mft,Dft,Oft,Pft,Bft=t(()=>{h1t=tt(J3(),1),u1t=tt(et(),1),I1t=tt(s1t(),1),R1t=tt(o1t(),1),M1t=tt(l1t(),1),e(),fu(),KE(),gu(),u1t.default.extend(I1t.default),u1t.default.extend(R1t.default),u1t.default.extend(M1t.default),d1t={friday:5,saturday:6},m1t=g1t=p1t="",y1t=[],v1t=[],x1t=new Map,b1t=[],w1t=[],T1t=k1t="",E1t=["active","done","crit","milestone"],S1t=_1t=!(C1t=[]),A1t="sunday",L1t="saturday",N1t=0,I1t=me(function(){b1t=[],w1t=[],C1t=[],fft=[],f1t=gft=pft=void(cft=0),m1t=T1t=g1t=p1t=k1t="",y1t=[],S1t=_1t=!(v1t=[]),N1t=0,x1t=new Map,oh(),A1t="sunday",L1t="saturday"},"clear"),R1t=me(function(t){g1t=t},"setAxisFormat"),M1t=me(function(){return g1t},"getAxisFormat"),D1t=me(function(t){f1t=t},"setTickInterval"),O1t=me(function(){return f1t},"getTickInterval"),P1t=me(function(t){m1t=t},"setTodayMarker"),B1t=me(function(){return m1t},"getTodayMarker"),F1t=me(function(t){p1t=t},"setDateFormat"),$1t=me(function(){_1t=!0},"enableInclusiveEndDates"),z1t=me(function(){return _1t},"endDatesAreInclusive"),G1t=me(function(){S1t=!0},"enableTopAxis"),U1t=me(function(){return S1t},"topAxisEnabled"),q1t=me(function(t){T1t=t},"setDisplayMode"),j1t=me(function(){return T1t},"getDisplayMode"),W1t=me(function(){return p1t},"getDateFormat"),Y1t=me(function(t){y1t=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),H1t=me(function(){return y1t},"getIncludes"),V1t=me(function(t){v1t=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),X1t=me(function(){return v1t},"getExcludes"),K1t=me(function(){return x1t},"getLinks"),Z1t=me(function(t){k1t=t,b1t.push(t)},"addSection"),Q1t=me(function(){return b1t},"getSections"),J1t=me(function(){let t=bft(),e=0;for(;!t&&e<10;)t=bft(),e++;return w1t=fft},"getTasks"),tft=me(function(t,e,r,i){return!i.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==d1t[L1t]&&t.isoWeekday()!==d1t[L1t]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),eft=me(function(t){A1t=t},"setWeekday"),rft=me(function(){return A1t},"getWeekday"),ift=me(function(t){L1t=t},"setWeekend"),nft=me(function(e,r,i,n){if(i.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,u1t.default)(e.startTime):(0,u1t.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,u1t.default)(e.endTime):(0,u1t.default)(e.endTime,r,!0),[r,i]=aft(t,a,r,i,n);e.endTime=r.toDate(),e.renderEndTime=i}},"checkTaskDates"),aft=me(function(t,e,r,i,n){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=tft(t,r,i,n))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),sft=me(function(t,e,r){r=r.trim();var i=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var n of i.groups.ids.split(" "))void 0!==(n=vft(n))&&(!t||n.endTime>t.endTime)&&(t=n);return t?t.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,u1t.default)(r,e.trim(),!0)).isValid())return i.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+e.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"),oft=me(function(t){return null!==(t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim()))?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),lft=me(function(t,e,r,i=!1){r=r.trim();var n=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var a of n.groups.ids.split(" "))void 0!==(a=vft(a))&&(!t||a.startTime<t.startTime)&&(t=a);return t?t.startTime:((n=new Date).setHours(0,0,0,0),n)}let s=(0,u1t.default)(r,e.trim(),!0);if(s.isValid())return(s=i?s.add(1,"d"):s).toDate();let o=(0,u1t.default)(t),[l,c]=oft(r);return Number.isNaN(l)||(n=o.add(l,c)).isValid()&&(o=n),o.toDate()},"getEndDate"),cft=0,hft=me(function(t){return void 0===t?"task"+(cft+=1):t},"parseId"),uft=me(function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),i={};c1t(r,i,E1t);for(let t=0;t<r.length;t++)r[t]=r[t].trim();let n="";switch(r.length){case 1:i.id=hft(),i.startTime=t.endTime,n=r[0];break;case 2:i.id=hft(),i.startTime=sft(void 0,p1t,r[0]),n=r[1];break;case 3:i.id=hft(r[0]),i.startTime=sft(void 0,p1t,r[1]),n=r[2]}return n&&(i.endTime=lft(i.startTime,p1t,n,_1t),i.manualEndTime=(0,u1t.default)(n,"YYYY-MM-DD",!0).isValid(),nft(i,p1t,v1t,y1t)),i},"compileData"),dft=me(function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),i={};c1t(r,i,E1t);for(let t=0;t<r.length;t++)r[t]=r[t].trim();switch(r.length){case 1:i.id=hft(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=hft(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=hft(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),fft=[],mft={},yft=me(function(t,e){t={section:k1t,type:k1t,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},e=dft(gft,e),t.raw.startTime=e.startTime,t.raw.endTime=e.endTime,t.id=e.id,t.prevTaskId=gft,t.active=e.active,t.done=e.done,t.crit=e.crit,t.milestone=e.milestone,t.order=N1t,N1t++,e=fft.push(t),mft[gft=t.id]=e-1},"addTask"),vft=me(function(t){return fft[mft[t]]},"findTaskById"),xft=me(function(t,e){t={section:k1t,type:k1t,description:t,task:t,classes:[]},e=uft(pft,e),t.startTime=e.startTime,t.endTime=e.endTime,t.id=e.id,t.active=e.active,t.done=e.done,t.crit=e.crit,t.milestone=e.milestone,pft=t,w1t.push(t)},"addTaskOrg"),bft=me(function(){let t=me(function(t){var e=fft[t];switch(fft[t].raw.startTime.type){case"prevTaskEnd":var r=vft(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(r=sft(void 0,p1t,fft[t].raw.startTime.startData))&&(fft[t].startTime=r)}return fft[t].startTime&&(fft[t].endTime=lft(fft[t].startTime,p1t,fft[t].raw.endTime.data,_1t),fft[t].endTime)&&(fft[t].processed=!0,fft[t].manualEndTime=(0,u1t.default)(fft[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),nft(fft[t],p1t,v1t,y1t)),fft[t].processed},"compileTask"),e=!0;for(var[r,i]of fft.entries())t(r),e=e&&i.processed;return e},"compileTasks"),wft=me(function(t,e){let r=e;"loose"!==D().securityLevel&&(r=(0,h1t.sanitizeUrl)(e)),t.split(",").forEach(function(t){void 0!==vft(t)&&(Eft(t,()=>{window.open(r,"_self")}),x1t.set(t,r))}),kft(t,"clickable")},"setLink"),kft=me(function(t,e){t.split(",").forEach(function(t){void 0!==(t=vft(t))&&t.classes.push(e)})},"setClass"),Tft=me(function(t,e,i){if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),void 0!==vft(t)&&Eft(t,()=>{YE.runFunc(e,...r)})}},"setClickFun"),Eft=me(function(e,r){C1t.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){r()})},function(){var t=document.querySelector(`[id="${e}-text"]`);null!==t&&t.addEventListener("click",function(){r()})})},"pushFun"),Cft=me(function(t,e,r){t.split(",").forEach(function(t){Tft(t,e,r)}),kft(t,"clickable")},"setClickEvent"),_ft=me(function(e){C1t.forEach(function(t){t(e)})},"bindFunctions"),Sft={getConfig:me(()=>D().gantt,"getConfig"),clear:I1t,setDateFormat:F1t,getDateFormat:W1t,enableInclusiveEndDates:$1t,endDatesAreInclusive:z1t,enableTopAxis:G1t,topAxisEnabled:U1t,setAxisFormat:R1t,getAxisFormat:M1t,setTickInterval:D1t,getTickInterval:O1t,setTodayMarker:P1t,getTodayMarker:B1t,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,setDisplayMode:q1t,getDisplayMode:j1t,setAccDescription:hh,getAccDescription:uh,addSection:Z1t,getSections:Q1t,getTasks:J1t,addTask:yft,findTaskById:vft,addTaskOrg:xft,setIncludes:Y1t,getIncludes:H1t,setExcludes:V1t,getExcludes:X1t,setClickEvent:Cft,setLink:wft,getLinks:K1t,bindFunctions:_ft,parseDuration:oft,isInvalidDate:tft,setWeekday:eft,getWeekday:rft,setWeekend:ift},me(c1t,"getTaskTags")}),Fft=t(()=>{Aft=tt(et(),1),e(),Z3(),Jc(),fu(),th(),Lft=me(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),Nft={monday:ix,tuesday:nx,wednesday:ax,thursday:sx,friday:ox,saturday:lx,sunday:rx},Ift=me((t,e)=>{let r=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),n=0;for(var a of i)for(let t=0;t<r.length;t++)if(a.startTime>=r[t]){r[t]=a.endTime,a.order=t+e,t>n&&(n=t);break}return n},"getMaxIntersections"),Mft=me(function(t,l,e,d){let p=D().gantt,r=D().securityLevel,i,n=("sandbox"===r&&(i=j("#i"+l)),j("sandbox"===r?i.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?i.nodes()[0].contentDocument:document,a=s.getElementById(l),o=(void 0===(Rft=a.parentElement.offsetWidth)&&(Rft=1200),void 0!==p.useWidth&&(Rft=p.useWidth),d.db.getTasks()),u=[];for(var c of o)u.push(c.type);u=A(u);let h={},g=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of o)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let t=0;for(m of Object.keys(y)){var v=Ift(y[m],t)+1;t+=v,g+=v*(p.barHeight+p.barGap),h[m]=v}}else{g+=o.length*(p.barHeight+p.barGap);for(let e of u)h[e]=o.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+Rft+" "+g);let x=n.select(`[id="${l}"]`),b=s4().domain([Wu(o,function(t){return t.startTime}),qu(o,function(t){return t.endTime})]).rangeRound([0,Rft-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,i=e.startTime,n=0;return i<r?n=1:r<i&&(n=-1),n}function k(t,e,r){var i=p.barHeight,n=i+p.barGap,a=p.topPadding,s=p.leftPadding;Rv().domain([0,u.length]).range(["#00B9FA","#F95002"]).interpolate(ff),E(n,a,s,0,r,t,d.db.getExcludes(),d.db.getIncludes()),C(s,a,0,r),T(t,n,a,s,i,0,e),_(n,a),S(s,0,0,r)}function T(t,r,i,n,c,e,h){var a=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+i-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(t){for(var[e,r]of u.entries())if(t.type===r)return"section section"+e%p.numberSectionStyles;return"section section0"});let s=x.append("g").selectAll("rect").data(t).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+n+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+n}).attr("y",function(t,e){return t.order*r+i}).attr("width",function(t){return t.milestone?c:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",c).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+n+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+i+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0<t.classes.length&&(e=t.classes.join(" ")),0);for(var[i,n]of u.entries())t.type===n&&(r=i%p.numberSectionStyles);let a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),"task"+(a=(a+=r)+(" "+e))}),s.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",p.fontSize).attr("x",function(t){let e=b(t.startTime),r=b(t.renderEndTime||t.endTime);return t.milestone&&(e+=.5*(b(t.endTime)-b(t.startTime))-.5*c),t.milestone&&(r=e+c),(t=this.getBBox().width)>r-e?r+t+1.5*p.leftPadding>h?e+n-5:r+n+5:(r-e)/2+e+n}).attr("y",function(t,e){return t.order*r+p.barHeight/2+(p.fontSize/2-2)+i}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),i=(t.milestone&&(r=e+c),this.getBBox().width),n="",a=(0<t.classes.length&&(n=t.classes.join(" ")),0);for(var[s,o]of u.entries())t.type===o&&(a=s%p.numberSectionStyles);let l="";return t.active&&(l=t.crit?"activeCritText"+a:"activeText"+a),t.done?l=t.crit?l+" doneCritText"+a:l+" doneText"+a:t.crit&&(l=l+" critText"+a),t.milestone&&(l+=" milestoneText"),i>r-e?r+i+1.5*p.leftPadding>h?n+" taskTextOutsideLeft taskTextOutside"+a+" "+l:n+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+i:n+" taskText taskText"+a+" "+l+" width-"+i}),"sandbox"===D().securityLevel){let a=j("#i"+l).nodes()[0].contentDocument;s.filter(function(t){return o.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),i=e.parentNode,n=a.createElement("a");n.setAttribute("xlink:href",o.get(t.id)),n.setAttribute("target","_top"),i.appendChild(n),n.appendChild(e),n.appendChild(r)})}}function E(s,o,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let n,a;for(var{startTime:r,endTime:i}of e)(void 0===n||r<n)&&(n=r),(void 0===a||i>a)&&(a=i);if(n&&a)if(5<(0,Aft.default)(a).diff((0,Aft.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 t=d.db.getDateFormat(),e=[],r=null,i=(0,Aft.default)(n);for(;i.valueOf()<=a;)d.db.isInvalidDate(i,t,h,u)?r?r.end=i:r={start:i,end:i}:r&&(e.push(r),r=null),i=i.add(1,"d");x.append("g").selectAll("rect").data(e).enter().append("rect").attr("id",function(t){return"exclude-"+t.start.format("YYYY-MM-DD")}).attr("x",function(t){return b(t.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(t){var e=t.end.add(1,"day");return b(e)-b(t.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(t,e,r,i){var n=ad(b).tickSize(-i+e+p.gridLineStartPadding).tickFormat(t4(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d")),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||p.tickInterval);if(null!==a){var s=a[1],o=a[2],l=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":n.ticks($v.every(s));break;case"second":n.ticks(zv.every(s));break;case"minute":n.ticks(Gv.every(s));break;case"hour":n.ticks(qv.every(s));break;case"day":n.ticks(Wv.every(s));break;case"week":n.ticks(Nft[l].every(s));break;case"month":n.ticks(mx.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||p.topAxis){var c=nd(b).tickSize(-i+e+p.gridLineStartPadding).tickFormat(t4(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],o=a[2],u=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":c.ticks($v.every(h));break;case"second":c.ticks(zv.every(h));break;case"minute":c.ticks(Gv.every(h));break;case"hour":c.ticks(qv.every(h));break;case"day":c.ticks(Wv.every(h));break;case"week":c.ticks(Nft[u].every(h));break;case"month":c.ticks(mx.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).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(h).map(t=>[t,h[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,i=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,n=s.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",i+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0<e&&a.setAttribute("dy","1em"),a.textContent=r,n.appendChild(a)}return n}).attr("x",10).attr("y",function(t,e){return 0<e?(n+=a[e-1][1],t[1]*r/2+n*r+i):t[1]*r/2+i}).attr("font-size",p.sectionFontSize).attr("class",function(t){for(var[e,r]of u.entries())if(t[0]===r)return"sectionTitle sectionTitle"+e%p.numberSectionStyles;return"sectionTitle"})}function S(t,e,r,i){var n,a,s=d.db.getTodayMarker();"off"!==s&&(a=x.append("g").attr("class","today"),n=new Date,(a=a.append("line")).attr("x1",b(n)+t).attr("x2",b(n)+t).attr("y1",p.titleTopMargin).attr("y2",i-p.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function A(r){var i={},n=[];for(let t=0,e=r.length;t<e;++t)Object.prototype.hasOwnProperty.call(i,r[t])||(i[r[t]]=!0,n.push(r[t]));return n}me(w,"taskCompare"),o.sort(w),k(o,Rft,g),Hc(x,g,Rft,p.useMaxWidth),x.append("text").text(d.db.getDiagramTitle()).attr("x",Rft/2).attr("y",p.titleTopMargin).attr("class","titleText"),me(k,"makeGantt"),me(T,"drawRects"),me(E,"drawExcludeDays"),me(C,"makeGrid"),me(_,"vertLabels"),me(S,"drawToday"),me(A,"checkUnique")},"draw"),Dft={setConf:Lft,draw:Mft}}),$ft=t(()=>{Oft=me(t=>`
.mermaid-main-font {
font-family: ${t.fontFamily};
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: ${t.fontFamily};
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: ${t.fontFamily};
}
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
font-family: ${t.fontFamily};
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.titleColor||t.textColor};
font-family: ${t.fontFamily};
}
`,"getStyles"),Pft=Oft}),zft={};lPt(zft,{diagram:()=>Gft});var Gft,Uft,qft,jft,Wft,Yft,Hft,Vft,Xft,Kft=t(()=>{a1t(),Bft(),Fft(),$ft(),Gft={parser:i1t,db:Sft,renderer:Dft,styles:Pft}}),Zft=t(()=>{Rpt(),e(),Uft={parse:me(async t=>{t=await Apt("info",t),M.debug(t)},"parse")}}),Qft=t(()=>{qft={name:"mermaid",version:"11.6.0",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.0.4","@iconify/utils":"^2.1.33","@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.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@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",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),Jft=t(()=>{Qft(),jft={version:qft.version},Wft=me(()=>jft.version,"getVersion"),Yft={getVersion:Wft}}),tmt=t(()=>{Z3(),fu(),Hft=me(t=>{let e=D().securityLevel,r=j("body"),i;return"sandbox"===e&&(i=j("#i"+t).node()?.contentDocument??document,r=j(i.body)),r.select("#"+t)},"selectSvgElement")}),emt=t(()=>{e(),tmt(),th(),Vft=me((t,e,r)=>{M.debug(`rendering info diagram
`+t),t=Hft(e),Hc(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),Xft={draw:Vft}}),rmt={};lPt(rmt,{diagram:()=>imt});var imt,nmt,amt,smt,omt,lmt,cmt,hmt,umt,dmt,pmt,gmt,fmt,mmt,ymt,vmt,xmt,bmt,wmt,kmt=t(()=>{Zft(),Jft(),emt(),imt={parser:Uft,db:Yft,renderer:Xft}}),Tmt=t(()=>{e(),gu(),_i(),lmt=mr.pie,nmt={sections:new Map,showData:!1,config:lmt},amt=nmt.sections,smt=nmt.showData,omt=structuredClone(lmt),lmt=me(()=>structuredClone(omt),"getConfig"),cmt=me(()=>{amt=new Map,smt=nmt.showData,oh()},"clear"),hmt=me(({label:t,value:e})=>{amt.has(t)||(amt.set(t,e),M.debug(`added new section: ${t}, with value: `+e))},"addSection"),umt=me(()=>amt,"getSections"),dmt=me(t=>{smt=t},"setShowData"),pmt=me(()=>smt,"getShowData"),gmt={getConfig:lmt,clear:cmt,setDiagramTitle:dh,getDiagramTitle:ph,setAccTitle:lh,getAccTitle:ch,setAccDescription:hh,getAccDescription:uh,addSection:hmt,getSections:umt,setShowData:dmt,getShowData:pmt}}),Emt=t(()=>{Rpt(),e(),Ppt(),Tmt(),fmt=me((t,e)=>{Mpt(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),mmt={parse:me(async t=>{t=await Apt("pie",t),M.debug(t),fmt(t,gmt)},"parse")}}),Cmt=t(()=>{ymt=me(t=>`
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieOuterCircle{
stroke: ${t.pieOuterStrokeColor};
stroke-width: ${t.pieOuterStrokeWidth};
fill: none;
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`,"getStyles"),vmt=ymt}),_mt=t(()=>{Z3(),fu(),e(),tmt(),th(),KE(),xmt=me(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),e5().value(t=>t.value)(t)),"createPieArcs"),bmt=me((t,e,r,i)=>{M.debug(`rendering pie chart
`+t);let n=i.db,a=D(),s=xE(n.getConfig(),a.pie),o=Hft(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[i]=WE(t.pieOuterStrokeWidth);i??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=$4().innerRadius(0).outerRadius(h),d=$4().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=xmt(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=hv(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return n.getShowData()?t+` [${e}]`:t}),t=512+(i=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${t} 450`),Hc(o,450,t,s.useMaxWidth)},"draw"),wmt={draw:bmt}}),Smt={};lPt(Smt,{diagram:()=>Amt});var Amt,Lmt,Nmt,Imt,Rmt,Mmt=t(()=>{Emt(),Tmt(),Cmt(),_mt(),Amt={parser:mmt,db:gmt,renderer:wmt,styles:vmt}}),Dmt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],j=[1,21],W=[1,22],Y=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],rt=[1,69],it=[1,70],nt=[1,71],at=[1,72],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],_=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:me(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:me(function(t,e,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},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,F,{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:$,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(P,[2,34]),{27:45,55:n,56:a,57:s},e(o,[2,37]),e(o,F,{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:$,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(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:x,67:b},{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:x,67:b},{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:x,67:b},{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:x,67:b},{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:x,67:b},{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:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:it,10:nt,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),e(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),e(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:it,10:nt,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(E,[2,23]),e(E,[2,1]),e(E,[2,2]),e(E,[2,3]),e(E,[2,4]),e(E,[2,5]),e(E,[2,6]),e(E,[2,7]),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(E,[2,11]),e(E,[2,12]),e(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:x,67:b}),e(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:x,67:b}),{46:[1,85]},{45:[1,86]},{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},e(E,[2,24]),e(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,47],{22:88,16:89,23:100,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},e(O,[2,26]),e(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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,me(t,"Parser"),(Lmt=new((t.prototype=r).Parser=t)).parser=Lmt,Nmt=Lmt}),Omt=t(()=>{Z3(),_i(),e(),wi(),Imt=sr(),Rmt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{me(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:mr.quadrantChart?.chartWidth||500,chartWidth:mr.quadrantChart?.chartHeight||500,titlePadding:mr.quadrantChart?.titlePadding||10,titleFontSize:mr.quadrantChart?.titleFontSize||20,quadrantPadding:mr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:mr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:mr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:mr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:mr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:mr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:mr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:mr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:mr.quadrantChart?.pointLabelFontSize||12,pointRadius:mr.quadrantChart?.pointRadius||5,xAxisPosition:mr.quadrantChart?.xAxisPosition||"top",yAxisPosition:mr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:mr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:mr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Imt.quadrant1Fill,quadrant2Fill:Imt.quadrant2Fill,quadrant3Fill:Imt.quadrant3Fill,quadrant4Fill:Imt.quadrant4Fill,quadrant1TextFill:Imt.quadrant1TextFill,quadrant2TextFill:Imt.quadrant2TextFill,quadrant3TextFill:Imt.quadrant3TextFill,quadrant4TextFill:Imt.quadrant4TextFill,quadrantPointFill:Imt.quadrantPointFill,quadrantPointTextFill:Imt.quadrantPointTextFill,quadrantXAxisTextFill:Imt.quadrantXAxisTextFill,quadrantYAxisTextFill:Imt.quadrantYAxisTextFill,quadrantTitleFill:Imt.quadrantTitleFill,quadrantInternalBorderStrokeFill:Imt.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Imt.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){M.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){M.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,i){var n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,n={left:"left"===this.config.yAxisPosition&&r?e:0,right:"right"===this.config.yAxisPosition&&r?e:0},r=this.config.titleFontSize+2*this.config.titlePadding,e={top:i?r:0},i=this.config.quadrantPadding+n.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-n.left-n.right,s=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:n,titleSpace:e,quadrantSpace:{quadrantLeft:i,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,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&&e&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===t?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&&e&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===t?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(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:n}=t=t.quadrantSpace;for(e 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:t,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:t,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+t,width:i,height:t,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+t,width:i,height:t,fill:this.themeConfig.quadrant4Fill}])e.text.x=e.x+e.width/2,0===this.data.points.length?(e.text.y=e.y+e.height/2,e.text.horizontalPos="middle"):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos="top");return r}getQuadrantPoints(t){let e=t.quadrantSpace,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=e,s=Rv().domain([0,1]).range([i,a+i]),o=Rv().domain([0,1]).range([r+n,n]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-e,y1:a,x2:i+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i+s,y1:a+e,x2:i+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-e,y1:a+r,x2:i+s+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i,y1:a+e,x2:i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+n,y1:a+e,x2:i+n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+e,y1:a+t,x2:i+s-e,y2:a+t}]}getTitle(t){if(t)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 t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=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,t,e,r);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(i,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(r)}}}});function Pmt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function Bmt(t){return!/^\d+$/.test(t)}function Fmt(t){return!/^\d+px$/.test(t)}var $mt,zmt=t(()=>{$mt=class extends Error{static{me(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},me(Pmt,"validateHexCode"),me(Bmt,"validateNumber"),me(Fmt,"validateSizeInPixels")});function Gmt(t){return _c(t.trim(),ryt)}function Umt(t){iyt.setData({quadrant1Text:Gmt(t.text)})}function qmt(t){iyt.setData({quadrant2Text:Gmt(t.text)})}function jmt(t){iyt.setData({quadrant3Text:Gmt(t.text)})}function Wmt(t){iyt.setData({quadrant4Text:Gmt(t.text)})}function Ymt(t){iyt.setData({xAxisLeftText:Gmt(t.text)})}function Hmt(t){iyt.setData({xAxisRightText:Gmt(t.text)})}function Vmt(t){iyt.setData({yAxisTopText:Gmt(t.text)})}function Xmt(t){iyt.setData({yAxisBottomText:Gmt(t.text)})}function Kmt(t){var e,r={};for(e of t){var[i,n]=e.trim().split(/\s*:\s*/);if("radius"===i){if(Bmt(n))throw new $mt(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(Pmt(n))throw new $mt(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(Pmt(n))throw new $mt(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(Fmt(n))throw new $mt(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function Zmt(t,e,r,i,n){n=Kmt(n),iyt.addPoints([{x:r,y:i,text:Gmt(t.text),className:e,...n}])}function Qmt(t,e){iyt.addClass(t,Kmt(e))}function Jmt(t){iyt.setConfig({chartWidth:t})}function tyt(t){iyt.setConfig({chartHeight:t})}function eyt(){var{themeVariables:t,quadrantChart:e}=D();return e&&iyt.setConfig(e),iyt.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),iyt.setData({titleText:ph()}),iyt.build()}var ryt,iyt,nyt,ayt,syt,oyt,lyt=t(()=>{fu(),Jc(),gu(),Omt(),zmt(),ryt=D(),me(Gmt,"textSanitizer"),iyt=new Rmt,me(Umt,"setQuadrant1Text"),me(qmt,"setQuadrant2Text"),me(jmt,"setQuadrant3Text"),me(Wmt,"setQuadrant4Text"),me(Ymt,"setXAxisLeftText"),me(Hmt,"setXAxisRightText"),me(Vmt,"setYAxisTopText"),me(Xmt,"setYAxisBottomText"),me(Kmt,"parseStyles"),me(Zmt,"addPoint"),me(Qmt,"addClass"),me(Jmt,"setWidth"),me(tyt,"setHeight"),me(eyt,"getQuadrantData"),nyt=me(function(){iyt.clear(),oh()},"clear"),ayt={setWidth:Jmt,setHeight:tyt,setQuadrant1Text:Umt,setQuadrant2Text:qmt,setQuadrant3Text:jmt,setQuadrant4Text:Wmt,setXAxisLeftText:Ymt,setXAxisRightText:Hmt,setYAxisTopText:Vmt,setYAxisBottomText:Xmt,parseStyles:Kmt,addPoint:Zmt,addClass:Qmt,getQuadrantData:eyt,clear:nyt,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh}}),cyt=t(()=>{Z3(),fu(),e(),th(),syt=me((t,e,r,i)=>{function n(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(n,"getDominantBaseLine"),me(a,"getTextAnchor"),me(s,"getTransformation");var o=D();M.debug(`Rendering quadrant chart
`+t);let l=o.securityLevel,c;"sandbox"===l&&(c=j("#i"+e));var e=(t=j("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Hc(t,u,h,o.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),i.db.setHeight(u),i.db.setWidth(h),i.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),i=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");o.title&&e.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",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>n(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),i.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>n(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>n(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),oyt={draw:syt}}),hyt={};lPt(hyt,{diagram:()=>uyt});var uyt,dyt,pyt,gyt=t(()=>{Dmt(),lyt(),cyt(),uyt={parser:Nmt,db:ayt,renderer:oyt,styles:me(()=>"","styles")}}),fyt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],i={trace:me(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:me(function(t,e,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:[e(r,i,{3:1,4:2,7:4,5:n,34:a,35:s,36:o}),{1:[3]},e(r,i,{4:2,7:4,3:8,5:n,34:a,35:s,36:o}),e(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]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,i,{4:2,7:4,3:21,5:n,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(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:x,50:b},{11:39,13:38,24:w,27:k,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:x,50:b},{11:45,15:44,27:T,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:x,50:b},{11:49,17:48,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},e(C,[2,18]),{1:[2,2]},e(C,[2,8]),e(C,[2,9]),e(_,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),e(_,[2,38]),e(_,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(C,[2,10]),e(C,[2,22],{30:41,29:56,24:w,27:k}),e(C,[2,24]),e(C,[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:x,50:b},e(C,[2,11]),e(C,[2,30],{33:60,27:T}),e(C,[2,32]),{31:[1,61]},e(C,[2,12]),{17:62,24:E},{25:63,27:A},e(C,[2,14]),{17:65,24:E},e(C,[2,16]),e(C,[2,17]),e(S,[2,41]),e(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(C,[2,31]),{27:[1,69]},e(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(C,[2,15]),e(C,[2,26]),e(C,[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:x,50:b},e(C,[2,33]),e(C,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};i.lexer=n,me(t,"Parser"),(dyt=new((t.prototype=i).Parser=t)).parser=dyt,pyt=dyt});function myt(t){return"bar"===t.type}function yyt(t){return"band"===t.type}function vyt(t){return"linear"===t.type}var xyt,byt,wyt,kyt,Tyt=t(()=>{me(myt,"isBarPlot"),me(yyt,"isBandAxisData"),me(vyt,"isLinearAxisData")}),Eyt=t(()=>{W9(),xyt=class{constructor(t){this.parentGroup=t}static{me(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};var r,i={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(s=z9(n,1,r))?s.width:r.length*e,s=s?s.height:e;i.width=Math.max(i.width,a),i.height=Math.max(i.height,s)}return n.remove(),i}}}),Cyt=t(()=>{byt=class{constructor(t,e,r,i){this.axisConfig=t,this.title=e,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{me(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){var t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;var r,i;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*t.width,this.outerPadding=Math.min(r.width/2,i),i=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,i<=e)&&(e-=i,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=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<=e)&&(e-=i,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,i;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*t.height,this.outerPadding=Math.min(r.height/2,i),(i=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=i,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=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<=e)&&(e-=i,this.showTitle=!0),this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${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(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},`+this.getScaleValue(t),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 t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},`+(e+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 t,r=[];if(this.showAxisLine&&(t=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},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 e=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},`+(e+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():[]}}}),_yt=t(()=>{Z3(),e(),Cyt(),wyt=class extends byt{static{me(this,"BandAxis")}constructor(t,e,r,i,n){super(t,i,n,e),this.categories=r,this.scale=pv().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pv().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(t){return this.scale(t)??this.getRange()[0]}}}),Syt=t(()=>{Z3(),Cyt(),kyt=class extends byt{static{me(this,"LinearAxis")}constructor(t,e,r,i,n){super(t,i,n,e),this.domain=r,this.scale=Rv().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=Rv().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function Ayt(t,e,r,i){return i=new xyt(i),yyt(t)?new wyt(e,r,t.categories,t.title,i):new kyt(e,r,[t.min,t.max],t.title,i)}var Lyt=t(()=>{Tyt(),Eyt(),_yt(),Syt(),me(Ayt,"getAxis")});function Nyt(t,e,r,i){return i=new xyt(i),new Iyt(i,t,e,r)}var Iyt,Ryt,Myt,Dyt=t(()=>{Eyt(),Iyt=class{constructor(t,e,r,i){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{me(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){var e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),t=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=t&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=t,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var t=[];return this.showChartTitle&&t.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}]}),t}},me(Nyt,"getChartTitleComponent")}),Oyt=t(()=>{Z3(),Ryt=class{constructor(t,e,r,i,n){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{me(this,"LinePlot")}getDrawableElement(){var t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);return(t=("horizontal"===this.orientation?X4().y(t=>t[0]).x(t=>t[1]):X4().x(t=>t[0]).y(t=>t[1]))(t))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),Pyt=t(()=>{Myt=class{constructor(t,e,r,i,n,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=i,this.orientation=n,this.plotIndex=a}static{me(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Byt(t,e,r){return new Fyt(t,e,r)}var Fyt,$yt,zyt,Gyt=t(()=>{Oyt(),Pyt(),Fyt=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{me(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.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 t,e,r=[];for([t,e]of this.chartData.plots.entries())switch(e.type){case"line":var i=new Ryt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...i.getDrawableElement());break;case"bar":i=new Myt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...i.getDrawableElement())}return r}},me(Byt,"getPlotComponent")}),Uyt=t(()=>{Lyt(),Dyt(),Gyt(),Tyt(),$yt=class{constructor(t,e,r,i){this.chartConfig=t,this.chartData=e,this.componentStore={title:Nyt(t,e,r,i),plot:Byt(t,e,r),xAxis:Ayt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:Ayt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{me(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,i,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:n,height:a});t-=s.width,i=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(n+=t),0<e&&(a+=e),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(t=>myt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,i,n,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,i=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,n=r+o.height,0<t&&(a+=t),0<e&&(s+=e),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(t=>myt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var t,e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}}}),qyt=t(()=>{Uyt(),zyt=class{static{me(this,"XYChartBuilder")}static build(t,e,r,i){return new $yt(t,e,r,i).getDrawableElement()}}});function jyt(){var t=sr(),e=Nr();return xE(t.xyChart,e.themeVariables.xyChart)}function Wyt(){var t=Nr();return xE(mr.xyChart,t.xyChart)}function Yyt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Hyt(t){var e=Nr();return _c(t.trim(),e)}function Vyt(t){h2t=t}function Xyt(t){u2t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Kyt(t){p2t.xAxis.title=Hyt(t.text)}function Zyt(t,e){p2t.xAxis={type:"linear",title:p2t.xAxis.title,min:t,max:e},f2t=!0}function Qyt(t){p2t.xAxis={type:"band",title:p2t.xAxis.title,categories:t.map(t=>Hyt(t.text))},f2t=!0}function Jyt(t){p2t.yAxis.title=Hyt(t.text)}function t2t(t,e){p2t.yAxis={type:"linear",title:p2t.yAxis.title,min:t,max:e},m2t=!0}function e2t(t){var e=Math.min(...t),t=Math.max(...t),r=vyt(p2t.yAxis)?p2t.yAxis.min:1/0,i=vyt(p2t.yAxis)?p2t.yAxis.max:-1/0;p2t.yAxis={type:"linear",title:p2t.yAxis.title,min:Math.min(r,e),max:Math.max(i,t)}}function r2t(r){let t=[],e;if(0!==r.length&&(f2t||(i=vyt(p2t.xAxis)?p2t.xAxis.min:1/0,e=vyt(p2t.xAxis)?p2t.xAxis.max:-1/0,Zyt(Math.min(i,1),Math.max(e,r.length))),m2t||e2t(r),yyt(p2t.xAxis)&&(t=p2t.xAxis.categories.map((t,e)=>[t,r[e]])),vyt(p2t.xAxis))){var i=p2t.xAxis.min,n=p2t.xAxis.max,a=(n-i)/(r.length-1),s=[];for(let t=i;t<=n;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function i2t(t){return g2t[0===t?0:t%g2t.length]}function n2t(t,e){e=r2t(e),p2t.plots.push({type:"line",strokeFill:i2t(c2t),strokeWidth:2,data:e}),c2t++}function a2t(t,e){e=r2t(e),p2t.plots.push({type:"bar",fill:i2t(c2t),data:e}),c2t++}function s2t(){if(0===p2t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return p2t.title=ph(),zyt.build(u2t,p2t,d2t,h2t)}function o2t(){return d2t}function l2t(){return u2t}var c2t,h2t,u2t,d2t,p2t,g2t,f2t,m2t,y2t,v2t,x2t,b2t,w2t=t(()=>{Ai(),_i(),wi(),KE(),Jc(),gu(),qyt(),Tyt(),c2t=0,u2t=Wyt(),d2t=jyt(),p2t=Yyt(),g2t=d2t.plotColorPalette.split(",").map(t=>t.trim()),m2t=f2t=!1,me(jyt,"getChartDefaultThemeConfig"),me(Wyt,"getChartDefaultConfig"),me(Yyt,"getChartDefaultData"),me(Hyt,"textSanitizer"),me(Vyt,"setTmpSVGG"),me(Xyt,"setOrientation"),me(Kyt,"setXAxisTitle"),me(Zyt,"setXAxisRangeData"),me(Qyt,"setXAxisBand"),me(Jyt,"setYAxisTitle"),me(t2t,"setYAxisRangeData"),me(e2t,"setYAxisRangeFromPlotData"),me(r2t,"transformDataWithoutCategory"),me(i2t,"getPlotColorFromPalette"),me(n2t,"setLineData"),me(a2t,"setBarData"),me(s2t,"getDrawableElem"),me(o2t,"getChartThemeConfig"),me(l2t,"getChartConfig"),y2t=me(function(){oh(),c2t=0,u2t=Wyt(),p2t=Yyt(),d2t=jyt(),g2t=d2t.plotColorPalette.split(",").map(t=>t.trim()),m2t=f2t=!1},"clear"),v2t={getDrawableElem:s2t,clear:y2t,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh,setOrientation:Xyt,setXAxisTitle:Kyt,setXAxisRangeData:Zyt,setXAxisBand:Qyt,setYAxisTitle:Jyt,setYAxisRangeData:t2t,setLineData:n2t,setBarData:a2t,setTmpSVGG:Vyt,getChartThemeConfig:o2t,getChartConfig:l2t}}),k2t=t(()=>{e(),tmt(),th(),x2t=me((t,e,r,i)=>{var n,a=(i=i.db).getChartThemeConfig(),s=i.getChartConfig();function o(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(o,"getDominantBaseLine"),me(l,"getTextAnchor"),me(c,"getTextTransformation"),M.debug(`Rendering xychart chart
`+t);let h=Hft(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),p=(Hc(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} `+s.height),d.attr("fill",a.backgroundColor),i.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),g={};function f(e){let r=u,i="";for(var[n]of e.entries()){let t=u;0<n&&g[i]&&(t=g[i]),i+=e[n],r=(r=g[i])||(g[i]=t.append("g").attr("class",e[n]))}return r}me(f,"getGroup");for(n of p)if(0!==n.data.length){var m=f(n.groupTexts);switch(n.type){case"rect":m.selectAll("rect").data(n.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth);break;case"text":m.selectAll("text").data(n.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":m.selectAll("path").data(n.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),b2t={draw:x2t}}),T2t={};lPt(T2t,{diagram:()=>E2t});var E2t,C2t,_2t,S2t,A2t,L2t,N2t=t(()=>{fyt(),w2t(),k2t(),E2t={parser:pyt,db:v2t,renderer:b2t}}),I2t=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),e=[1,3],r=[1,4],i=[1,5],n=[1,6],B=[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],x=[1,32],b=[1,30],w=[1,39],k=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[89,90],F=[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],$=[27,29],z=[1,70],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],_=[1,83],S=[1,80],H=[1,84],V=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],tt=[1,91],et=[1,92],rt=[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],it=[1,101],nt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[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],N=[1,110],I=[1,106],R=[1,107],M=[1,108],D=[1,109],O=[1,111],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],e={trace:me(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:me(function(t,e,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:e,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(B,[2,6]),{3:12,4:2,6:e,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:x,77:b,89:w,90:k},t(B,[2,4]),t(B,[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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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:x,77:b,89:w,90:k},{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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:w,90:k},{30:63,33:62,75:E,89:w,90:k},{30:64,33:62,75:E,89:w,90:k},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(F,[2,81]),t(F,[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]},t($,[2,79]),t($,[2,80]),{27:[1,67],29:[1,68]},t($,[2,85]),t($,[2,86]),{62:69,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{62:77,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{30:78,33:62,75:E,89:w,90:k},{73:79,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,60]),t(rt,[2,62]),{73:93,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},{30:94,33:62,75:E,76:S,89:w,90:k},{5:[1,95]},{30:96,33:62,75:E,89:w,90:k},{5:[1,97]},{30:98,33:62,75:E,89:w,90:k},{63:[1,99]},t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),t(A,[2,53]),t(A,[2,54]),t(A,[2,55]),t(A,[2,56]),{64:[1,100]},t(T,[2,59],{76:S}),t(T,[2,64],{76:it}),{33:103,75:[1,102],89:w,90:k},t(nt,[2,65],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),t(L,[2,67]),t(L,[2,69]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(T,[2,57],{76:it}),t(T,[2,58],{76:S}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:S},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:S},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:_,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,61]),t(rt,[2,63]),t(L,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:N,28:126,31:I,34:R,36:M,38:D,40:O},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(nt,[2,66],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),{33:132,89:w,90:k},{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]},t(T,[2,27]),{5:N,28:145,31:I,34:R,36:M,38:D,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:N,28:159,31:I,34:R,36:M,38:D,40:O},{5:N,28:160,31:I,34:R,36:M,38:D,40:O},{5:N,28:161,31:I,34:R,36:M,38:D,40:O},{5:N,28:162,31:I,34:R,36:M,38:D,40:O},{5:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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 e.yytext=e.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}}};e.lexer=B,me(P,"Parser"),(C2t=new((P.prototype=e).Parser=P)).parser=C2t,_2t=C2t}),R2t=t(()=>{fu(),e(),gu(),S2t=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=lh,this.getAccTitle=ch,this.setAccDescription=hh,this.getAccDescription=uh,this.setDiagramTitle=dh,this.getDiagramTitle=ph,this.getConfig=me(()=>D().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{me(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}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(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),M.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,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,oh()}setCssStyle(t,e){for(var r of t){var i,n=this.requirements.get(r)??this.elements.get(r);if(!e||!n)return;for(i of e)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(t,e){for(var r of t){var i=this.requirements.get(r)??this.elements.get(r);if(i)for(var n of e)i.classes.push(n),(n=this.classes.get(n)?.styles)&&i.cssStyles.push(...n)}}defineClass(t,i){for(let e of t){let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),i&&i.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.requirements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...i.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...i.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,r,i=D(),n=[],a=[];for(t of this.requirements.values()){var s=t;s.id=t.name,s.cssStyles=t.cssStyles,s.cssClasses=t.classes.join(" "),s.shape="requirementBox",s.look=i.look,n.push(s)}for(e of this.elements.values()){var o=e;o.shape="requirementBox",o.look=i.look,o.id=e.name,o.cssStyles=e.cssStyles,o.cssClasses=e.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:`&lt;&lt;${r.type}&gt;&gt;`,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()}}}}),M2t=t(()=>{A2t=me(t=>`
marker {
fill: ${t.relationColor};
stroke: ${t.relationColor};
}
marker.cross {
stroke: ${t.lineColor};
}
svg {
font-family: ${t.fontFamily};
font-size: ${t.fontSize};
}
.reqBox {
fill: ${t.requirementBackground};
fill-opacity: 1.0;
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${t.requirementTextColor};
}
.reqLabelBox {
fill: ${t.relationLabelBackground};
fill-opacity: 1.0;
}
.req-title-line {
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.relationshipLine {
stroke: ${t.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${t.relationLabelColor};
}
.divider {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.label text,span {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.labelBkg {
background-color: ${t.edgeLabelBackground};
}
`,"getStyles"),L2t=A2t}),D2t={};lPt(D2t,{draw:()=>O2t});var O2t,P2t=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),O2t=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",e);var{securityLevel:n,state:a,layout:s}=D(),o=i.db.getData(),n=NM(e,n);o.type=i.type,o.layoutAlgorithm=CX(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await EX(o,n),YE.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),B2t={};lPt(B2t,{diagram:()=>F2t});var F2t,$2t,z2t,G2t,U2t,q2t,j2t,W2t,Y2t,H2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,ivt,nvt,avt,svt,ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt,kvt,Tvt,Evt=t(()=>{I2t(),R2t(),M2t(),P2t(),F2t={parser:_2t,get db(){return new S2t},renderer:D2t,styles:L2t}}),Cvt=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),e=[1,2],B=[1,3],F=[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],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,39],_=[1,41],S=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],R=[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,54,59,60,61,62,70],M=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[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,54,59,60,61,62,70],G=[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,54,59,60,61,62,70],U=[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,54,59,60,61,62,70],D=[68,69,70],O=[1,122],e={trace:me(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,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$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",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"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],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:me(function(t,e,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:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54: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 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 62:this.$=a[o];break;case 63:this.$=i.PLACEMENT.LEFTOF;break;case 64:this.$=i.PLACEMENT.RIGHTOF;break;case 65: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 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]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67: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 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=i.LINETYPE.SOLID_OPEN;break;case 70:this.$=i.LINETYPE.DOTTED_OPEN;break;case 71:this.$=i.LINETYPE.SOLID;break;case 72:this.$=i.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=i.LINETYPE.DOTTED;break;case 74:this.$=i.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=i.LINETYPE.SOLID_CROSS;break;case 76:this.$=i.LINETYPE.DOTTED_CROSS;break;case 77:this.$=i.LINETYPE.SOLID_POINT;break;case 78:this.$=i.LINETYPE.DOTTED_POINT;break;case 79:this.$=i.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:B,6:F},{1:[3]},{3:5,4:e,5:B,6:F},{3:6,4:e,5:B,6:F},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],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:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},t(R,[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:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:T,52:E,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:I},{22:55,70:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[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,70:I},{22:72,70:I},{22:73,70:I},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:I},{22:90,70:I},{22:91,70:I},{22:92,70:I},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(M,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t($,r,{7:99}),t($,r,{7:100}),t($,r,{7:101}),t(z,r,{40:102,7:103}),t(G,r,{42:104,7:105}),t(G,r,{7:105,42:106}),t(U,r,{45:107,7:108}),t($,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:I},t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),{22:118,70:I},{22:120,58:119,70:I},{70:[2,63]},{70:[2,64]},{56:121,81:O},{56:123,81:O},{56:124,81:O},{56:125,81:O},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:T,52:E,53:C},{5:[1,131]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,132],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:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,133],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:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,134],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:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{16:[1,135]},{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:x,43:b,44:w,46:k,49:[1,136],50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{16:[1,137]},{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:x,43:b,44:w,46:k,48:[1,138],50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{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:x,43:b,44:w,46:k,47:[1,141],50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{4:i,5:n,8:8,9:10,12:12,13:a,14:s,16:[1,142],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:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(R,[2,52]),{22:145,70:I},{22:146,70:I},{56:147,81:O},{56:148,81:O},{56:149,81:O},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(R,[2,16]),t(M,[2,10]),{12:151,50:T,52:E,53:C},t(M,[2,12]),t(M,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:O},{56:158,81:O},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:I},t(M,[2,11]),t(z,r,{7:103,40:160}),t(G,r,{7:105,42:161}),t(U,r,{7:108,45:162}),t(R,[2,48]),t(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};e.lexer=B,me(P,"Parser"),($2t=new((P.prototype=e).Parser=P)).parser=$2t,z2t=$2t}),_vt=t(()=>{fu(),e(),Fpt(),Jc(),gu(),G2t={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},U2t={FILLED:0,OPEN:1},q2t={LEFTOF:0,RIGHTOF:1,OVER:2},j2t=class{constructor(){this.state=new Opt(()=>({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=lh,this.setAccDescription=hh,this.setDiagramTitle=dh,this.getAccTitle=ch,this.getAccDescription=uh,this.getDiagramTitle=ph,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(D().wrap),this.LINETYPE=G2t,this.ARROWTYPE=U2t,this.PLACEMENT=q2t}static{me(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,i){let n=this.state.records.currentBox,a=this.state.records.actors.get(t);if(a){if(this.state.records.currentBox&&a.box&&this.state.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(n=a.box||this.state.records.currentBox,a.box=n,a&&e===a.name&&null==r)return}null==r?.text&&(r={text:e,type:i}),null!=i&&null!=r.text||(r={text:e,type:i}),this.state.records.actors.set(t,{box:n,name:e,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&&(e=this.state.records.actors.get(this.state.records.prevActor))&&(e.nextActor=t),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&r++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&r--;return r}addMessage(t,e,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(t,e,r,i,n=!1){var a;if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1)throw(a=new Error("Trying to inactivate an inactive participant ("+t+")")).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:t,to:e,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(t=>t.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(t){return this.state.records.actors.get(t)}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(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:D().sequence?.wrap??!1}clear(){this.state.reset(),oh()}parseMessage(t){var t=t.trim(),{wrap:t,cleanedText:e}=this.extractWrap(t),e={text:e,wrap:t};return M.debug("parseMessage: "+JSON.stringify(e)),e}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",i=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",i=t.trim()):((n=(new Option).style).color=r,n.color!==r&&(r="transparent",i=t.trim()));var{wrap:n,cleanedText:t}=this.extractWrap(i);return{text:t?_c(t,D()):void 0,color:r,wrap:n}}addNote(t,e,r){var i={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},t=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t[0],to:t[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(e,r){e=this.getActor(e);try{let t=_c(r.text,D());t=(t=t.replace(/&equals;/g,"=")).replace(/&amp;/g,"&");var i=JSON.parse(t);this.insertLinks(e,i)}catch(t){M.error("error while parsing actor link text",t)}}addALink(a,s){a=this.getActor(a);try{let t={},e=_c(s.text,D()),r=e.indexOf("@"),i=(e=(e=e.replace(/&equals;/g,"=")).replace(/&amp;/g,"&")).slice(0,r-1).trim(),n=e.slice(r+1).trim();t[i]=n,this.insertLinks(a,t)}catch(t){M.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}addProperties(t,e){t=this.getActor(t);try{var r=_c(e.text,D()),i=JSON.parse(r);this.insertProperties(t,i)}catch(t){M.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){t=this.getActor(t),e=document.getElementById(e.text);try{var r=e.innerHTML,i=JSON.parse(r);i.properties&&this.insertProperties(t,i.properties),i.links&&this.insertLinks(t,i.links)}catch(t){M.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(this.state.records.actors.has(t.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=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.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(t.to!==this.state.records.lastDestroyed&&t.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(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":lh(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType)}}getConfig(){return D().sequence}}}),Svt=t(()=>{W2t=me(t=>`.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`,"getStyles"),Y2t=W2t}),Avt=t(()=>{function e(t,e,r,i,n,a,s){g(e.append("text").attr("x",r).attr("y",i).style("text-anchor","start").text(t),s)}function l(t,e,r,i,n,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r).attr("y",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[t]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(t,e,r,i,n,a,s,o){(n=(e=e.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(t),l(t,e,r,i,0,a,s,o),g(n,s)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}function i(t,e,r,i,n,a,s){f(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(t),s)}function c(t,e,r,i,n,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:c}=o,[h,u]=WE(o),d=t.split(L.lineBreakRegex);for(let t=0;t<d.length;t++){var p=t*h-h*(d.length-1)/2,g=e.append("text").attr("x",r+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[t]),g.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,s)}}function n(t,e,r,i,n,a,s,o){var l=(e=e.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(t),c(t,e,r,i,n,a,s,o),f(l,s)}async function a(t,e,r,i,n,a,s,o){var l=await qc(t,Nr());(l=(e=e.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 jc(t,Nr())),c(t,e,r,i,n,a,s,o),f(l,s)}function f(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}Jc(),t6(),KE(),H2t=tt(J3(),1),Ai(),V2t=36,X2t="actor-bottom",K2t=me(function(t,e){return y3(t,e)},"drawRect"),Z2t=me(function(t,e,r,i,n){if(null==e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,s=e.actorCnt,o=e.rectData,e="none",l=(n&&(e="block !important"),t.append("g")),n=(l.attr("id","actor"+s+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",e),""),c=(void 0!==o.class&&(n=" "+o.class),o.width>r?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+n),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,H2t.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),kvt(i)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},i),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),Q2t=me(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),J2t=me(async function(i,n,a=null){var s=i.append("foreignObject"),o=await jc(n.text,Nr()),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:t,stopx:e,starty:r}=a;t>e&&(i=t,t=e,e=i),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===n.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),tvt=me(function(t,e){let r=0,i=0,n=e.text.split(L.lineBreakRegex),[a,s]=WE(e.fontSize),o=[],l=0,c=me(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin)switch(e.valign){case"top":case"start":c=me(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=me(()=>Math.round(e.y+(r+i+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=me(()=>Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(var[h,u]of n.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(l=h*a),(h=t.append("text")).attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||kE;(e.tspan?((d=h.append("tspan")).attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d):h).text(u),void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin&&(i+=(h._groups||h)[0][0].getBBox().height,r=i),o.push(h)}return o},"drawText"),evt=me(function(t,e){function r(t,e,r,i,n){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+i-n)+" "+(t+r-1.2*n)+","+(e+i)+" "+t+","+(e+i)}me(r,"genPoints");var i=t.append("polygon");return i.attr("points",r(e.x,e.y,e.width,e.height,7)),i.attr("class","labelBox"),e.y=e.y+e.height/2,tvt(t,e),i},"drawLabel"),rvt=-1,ivt=me((r,i,t,n)=>{r.select&&t.forEach(t=>{var t=i.get(t),e=r.select("#actor"+t.actorCnt);!n.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):n.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),nvt=me(function(t,e,r,i){var n=i?e.stopy:e.starty,a=e.x+e.width/2,s=n+e.height,o=t=t.append("g").lower(),s=(i||(rvt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",Q2t(`actor${rvt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+rvt).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",e.name),o=t.append("g"),e.actorCnt=rvt,null!=e.links&&o.attr("id","root-"+rvt)),k3()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=i?" "+X2t:" actor-top",s.x=e.x,s.y=n,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,K2t(o,s));e.rectData=s,e.properties?.icon&&("@"===(i=e.properties.icon.trim()).charAt(0)?w3(o,s.x+s.width-20,s.y+10,i.substr(1)):b3(o,s.x+s.width-20,s.y+10,i)),wvt(r,Uc(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(n=t.node().getBBox(),e.height=n.height,l=n.height),l},"drawActorTypeParticipant"),avt=me(function(t,e,r,i){var n=i?e.stopy:e.starty,a=e.x+e.width/2,s=n+80,o=t.append("g").lower(),l=(i||(rvt++,o.append("line").attr("id","actor"+rvt).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",e.name),e.actorCnt=rvt),t.append("g")),c="actor-man";return l.attr("class",c+=i?" "+X2t:" actor-top"),l.attr("name",e.name),(o=k3()).x=e.x,o.y=n,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+rvt).attr("x1",a).attr("y1",n+25).attr("x2",a).attr("y2",n+45),l.append("line").attr("id","actor-man-arms"+rvt).attr("x1",a-V2t/2).attr("y1",n+33).attr("x2",a+V2t/2).attr("y2",n+33),l.append("line").attr("x1",a-V2t/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+V2t/2-2).attr("y2",n+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",n+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,wvt(r,Uc(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),svt=me(async function(t,e,r,i){switch(e.type){case"actor":return avt(t,e,r,i);case"participant":return nvt(t,e,r,i)}},"drawActor"),ovt=me(function(t,e,r){t=t.append("g"),uvt(t,e),e.name&&wvt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),lvt=me(function(t){return t.append("g")},"anchorElement"),cvt=me(function(t,e,r,i,n){var a=k3(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+n%3,a.width=e.stopx-e.startx,a.height=r-e.starty,K2t(s,a)},"drawActivation"),hvt=me(async function(t,e,r,i){let{boxMargin:n,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=i,u=t.append("g"),d=me(function(t,e,r,i){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",i).attr("class","loopLine")},"drawLoopLine"),p=(d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}),T3());p.text=r,p.x=e.startx,p.y=e.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",evt(u,p),(p=xvt()).text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.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=Uc(p.text)?await J2t(u,p,e):tvt(u,p);if(void 0!==e.sectionTitles)for(var[f,m]of Object.entries(e.sectionTitles))m.message&&(p.text=m.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.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=e.wrap,Uc(p.text)?(e.starty=e.sections[f].y,await J2t(u,p,e)):tvt(u,p),m=Math.round(g.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e)),e.sections[f].height+=m-(n+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),uvt=me(function(t,e){v3(t,e)},"drawBackgroundRect"),dvt=me(function(t){t.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"),pvt=me(function(t){t.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"),gvt=me(function(t){t.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"),fvt=me(function(t){t.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"),mvt=me(function(t){t.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"),yvt=me(function(t){t.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"),vvt=me(function(t){t.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"),xvt=me(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"),bvt=me(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(i,"byText"),me(c,"byTspan"),me(n,"byFo"),me(a,"byKatex"),me(f,"_setTextAttrs"),wvt=function(t,e=!1){return e?a:"fo"===t.textPlacement?n:"old"===t.textPlacement?i:c},me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),kvt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Tvt={drawRect:K2t,drawText:tvt,drawLabel:evt,drawActor:svt,drawBox:ovt,drawPopup:Z2t,anchorElement:lvt,drawActivation:cvt,drawLoop:hvt,drawBackgroundRect:uvt,insertArrowHead:fvt,insertArrowFilledHead:mvt,insertSequenceNumber:yvt,insertArrowCrossHead:vvt,insertDatabaseIcon:dvt,insertComputerIcon:pvt,insertClockIcon:gvt,getTextObj:xvt,getNoteRect:bvt,fixLifeLineHeights:ivt,sanitizeUrl:H2t.sanitizeUrl}});async function Lvt(t,e){P.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=e,a=L.splitBreaks(n).length,s=Uc(n),n=s?await qc(n,D()):YE.calculateTextDimensions(n,Ovt(O));s||(s=n.height/a,e.height+=s,P.bumpVerticalPos(s));let o,l=n.height-10,c=n.width;return r===i?(o=P.getVerticalPos()+l,O.rightAngles||(l+=O.boxMargin,o=P.getVerticalPos()+l),l+=30,a=L.getMax(c/2,O.width/2),P.insert(r-a,P.getVerticalPos()-10+l,i+a,P.getVerticalPos()+30+l)):(l+=O.boxMargin,o=P.getVerticalPos()+l,P.insert(r,o-10,i,o)),P.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,P.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function Nvt(t,e,r,i,n){P.bumpVerticalPos(r);let a=i;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Ovt(O),e.message=YE.wrapLabel(`[${e.message}]`,r-2*O.wrapPadding,t),e.width=r,e.wrap=!0,r=YE.calculateTextDimensions(e.message,t),t=L.getMax(r.height,O.labelBoxHeight),a=i+t,M.debug(t+" - "+e.message)),n(e),P.bumpVerticalPos(a)}function Ivt(r,i,t,e,n,a,s){function o(t,e){t.x<n.get(r.from).x?(P.insert(i.stopx-e,i.starty,i.startx,i.stopy+t.height/2+O.noteMargin),i.stopx=i.stopx+e):(P.insert(i.startx,i.starty,i.stopx+e,i.stopy+t.height/2+O.noteMargin),i.stopx=i.stopx-e)}function l(t,e){t.x<n.get(r.to).x?(P.insert(i.startx-e,i.starty,i.stopx,i.stopy+t.height/2+O.noteMargin),i.startx=i.startx+e):(P.insert(i.stopx,i.starty,i.startx+e,i.stopy+t.height/2+O.noteMargin),i.startx=i.startx-e)}me(o,"receiverAdjustment"),me(l,"senderAdjustment"),a.get(r.to)==e?(o(a=n.get(r.to),"actor"==a.type?V2t/2+3:a.width/2+3),a.starty=t-a.height/2,P.bumpVerticalPos(a.height/2)):s.get(r.from)==e?(a=n.get(r.from),O.mirrorActors&&l(a,"actor"==a.type?V2t/2:a.width/2),a.stopy=t-a.height/2,P.bumpVerticalPos(a.height/2)):s.get(r.to)==e&&(a=n.get(r.to),O.mirrorActors&&o(a,"actor"==a.type?V2t/2+3:a.width/2+3),a.stopy=t-a.height/2,P.bumpVerticalPos(a.height/2))}async function Rvt(t,e,r){var i,n={};for(i of e)if(t.get(i.to)&&t.get(i.from)){var a=t.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?Pvt:Ovt)(O),l=i.wrap?YE.wrapLabel(i.message,O.width-2*O.wrapPadding,o):i.message,l=(Uc(l)?await qc(i.message,D()):YE.calculateTextDimensions(l,o)).width+2*O.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 Mvt(i,t,e){let r=0;for(var n of i.keys()){(n=i.get(n)).wrap&&(n.description=YE.wrapLabel(n.description,O.width-2*O.wrapPadding,Bvt(O)));var a=Uc(n.description)?await qc(n.description,D()):YE.calculateTextDimensions(n.description,Bvt(O));n.width=n.wrap?O.width:L.getMax(O.width,a.width+2*O.wrapPadding),n.height=n.wrap?L.getMax(a.height,O.height):O.height,r=L.getMax(r,n.height)}for(var s in t){var o,l=i.get(s);l&&(o=(o=i.get(l.nextActor))?t[s]+O.actorMargin-l.width/2-o.width/2:t[s]+O.actorMargin-l.width/2,l.margin=L.getMax(o,O.actorMargin))}let c=0;return e.forEach(t=>{var e=Ovt(O),r=t.actorKeys.reduce((t,e)=>t+(i.get(e).width+(i.get(e).margin||0)),0),e=(r-=2*O.boxTextMargin,t.wrap&&(t.name=YE.wrapLabel(t.name,r-2*O.wrapPadding,e)),YE.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*O.wrapPadding));t.margin=O.boxTextMargin,r<e&&(t.margin+=(e-r)/2)}),e.forEach(t=>t.textMaxHeight=c),L.getMax(r,O.height)}var O,P,Dvt,Ovt,Pvt,Bvt,Fvt,$vt,zvt,Gvt,Uvt,qvt,jvt,Wvt,Yvt,Hvt,Vvt,Xvt,Kvt,Zvt=t(()=>{Z3(),Avt(),e(),Jc(),t6(),fu(),qr(),KE(),th(),O={},P={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:me(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:me(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:me(function(t){this.boxes.push(t)},"addBox"),addActor:me(function(t){this.actors.push(t)},"addActor"),addLoop:me(function(t){this.loops.push(t)},"addLoop"),addMessage:me(function(t){this.messages.push(t)},"addMessage"),addNote:me(function(t){this.notes.push(t)},"addNote"),lastActor:me(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:me(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:me(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:me(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:me(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,Uvt(D())},"init"),updateVal:me(function(t,e,r,i){void 0===t[e]?t[e]=r:t[e]=i(r,t[e])},"updateVal"),updateBounds:me(function(i,n,a,s){let o=this,l=0;function t(r){return me(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",n-e*O.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*O.boxMargin,Math.max),o.updateVal(P.data,"startx",i-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopx",a+e*O.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",i-e*O.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*O.boxMargin,Math.max),o.updateVal(P.data,"starty",n-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopy",s+e*O.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:me(function(t,e,r,i){var n=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,i),e=L.getMax(e,i);this.updateVal(P.data,"startx",n,Math.min),this.updateVal(P.data,"starty",r,Math.min),this.updateVal(P.data,"stopx",t,Math.max),this.updateVal(P.data,"stopy",e,Math.max),this.updateBounds(n,r,t,e)},"insert"),newActivation:me(function(t,e,r){var r=r.get(t.from),i=qvt(t.from).length||0,r=r.x+r.width/2+(i-1)*O.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+O.activationWidth,stopy:void 0,actor:t.from,anchored:Tvt.anchorElement(e)})},"newActivation"),endActivation:me(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:me(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:me(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:me(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:P.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:me(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:me(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return{bounds:this.data,models:this.models}},"getBounds")},Dvt=me(async function(t,e){P.bumpVerticalPos(O.boxMargin),e.height=O.boxMargin,e.starty=P.getVerticalPos();var r=k3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||O.width,r.class="note",t.append("g")),i=Tvt.drawRect(t,r),t=((n=T3()).x=e.startx,n.y=e.starty,n.width=r.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=O.noteFontFamily,n.fontSize=O.noteFontSize,n.fontWeight=O.noteFontWeight,n.anchor=O.noteAlign,n.textMargin=O.noteMargin,n.valign="center",Uc(n.text)?await J2t(t,n):tvt(t,n)),n=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));i.attr("height",n+2*O.noteMargin),e.height+=n+2*O.noteMargin,P.bumpVerticalPos(n+2*O.noteMargin),e.stopy=e.starty+n+2*O.noteMargin,e.stopx=e.startx+r.width,P.insert(e.startx,e.starty,e.stopx,e.stopy),P.models.addNote(e)},"drawNote"),Ovt=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Pvt=me(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Bvt=me(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),me(Lvt,"boundMessage"),Fvt=me(async function(t,e,r,i){var{startx:e,stopx:n,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=YE.calculateTextDimensions(s,Ovt(O)),u=T3();u.x=e,u.y=a+10,u.width=n-e,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=O.messageFontFamily,u.fontSize=O.messageFontSize,u.fontWeight=O.messageFontWeight,u.anchor=O.messageAlign,u.valign="center",u.textMargin=O.wrapPadding,u.tspan=!1,Uc(u.text)?await J2t(t,u,{startx:e,stopx:n,starty:r}):tvt(t,u);let d=h.width,p,g=(e===n?p=O.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(O.width/2,d/2)} V ${r+25} H `+e):t.append("path").attr("d","M "+e+","+r+" C "+(e+60)+","+(r-10)+" "+(e+60)+","+(r+30)+" "+e+","+(r+20)):((p=t.append("line")).attr("x1",e),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"),"");O.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),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||O.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),$vt=me(function(t,e,r,i,n,a,s){let o=0,l=0,c,h=0;for(var u of i){var d=(u=e.get(u)).box;c&&c!=d&&(s||P.models.addBox(c),l+=O.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=n),l+=d.margin),u.width=u.width||O.width,u.height=L.getMax(u.height||O.height,O.height),u.margin=u.margin||O.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=P.getVerticalPos(),P.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,P.models.addActor(u)}c&&!s&&P.models.addBox(c),P.bumpVerticalPos(h)},"addActorRenderingData"),zvt=me(async function(e,r,i,t){if(t){let t=0;P.bumpVerticalPos(2*O.boxMargin);for(var n of i)(n=r.get(n)).stopy||(n.stopy=P.getVerticalPos()),n=await Tvt.drawActor(e,n,O,!0),t=L.getMax(t,n);P.bumpVerticalPos(t+O.boxMargin)}else for(var a of i)a=r.get(a),await Tvt.drawActor(e,a,O,!1)},"drawActors"),Gvt=me(function(t,e,r,i){let n=0,a=0;for(var s of r){var s=e.get(s),o=Yvt(s);(o=Tvt.drawPopup(t,s,o,O,O.forceMenus,i)).height>n&&(n=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),Uvt=me(function(t){ie(O,t),t.fontFamily&&(O.actorFontFamily=O.noteFontFamily=O.messageFontFamily=t.fontFamily),t.fontSize&&(O.actorFontSize=O.noteFontSize=O.messageFontSize=t.fontSize),t.fontWeight&&(O.actorFontWeight=O.noteFontWeight=O.messageFontWeight=t.fontWeight)},"setConf"),qvt=me(function(e){return P.activations.filter(function(t){return t.actor===e})},"actorActivations"),jvt=me(function(t,e){return e=e.get(t),[(t=qvt(t)).reduce(function(t,e){return L.getMin(t,e.startx)},e.x+e.width/2-1),t.reduce(function(t,e){return L.getMax(t,e.stopx)},e.x+e.width/2+1)]},"activationBounds"),me(Nvt,"adjustLoopHeightForWrap"),me(Ivt,"adjustCreatedDestroyedData"),Wvt=me(async function(i,t,e,n){var{securityLevel:r,sequence:a}=D();O=a;let s;"sandbox"===r&&(s=j("#i"+t));var a=j("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;P.init(),M.debug(n.db);let l="sandbox"===r?a.select(`[id="${t}"]`):j(`[id="${t}"]`),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 Rvt(c,g,n);if(O.height=await Mvt(c,v,d),Tvt.insertComputerIcon(l),Tvt.insertDatabaseIcon(l),Tvt.insertClockIcon(l),m&&(P.bumpVerticalPos(O.boxMargin),y)&&P.bumpVerticalPos(d[0].textMaxHeight),!0===O.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}$vt(l,c,h,p,0,g,!1);var x,b,w,k=await Xvt(g,c,v,n);function T(t,e){var r=P.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Tvt.drawActivation(l,r,e,O,qvt(t.from).length),P.insert(r.startx,e-10,r.stopx,e)}Tvt.insertArrowHead(l),Tvt.insertArrowCrossHead(l),Tvt.insertArrowFilledHead(l),Tvt.insertSequenceNumber(l),me(T,"activeEnd");let E=1,C=1,_=[],S=[],A=0;for(x of g){let t,e,r;switch(x.type){case n.db.LINETYPE.NOTE:P.resetVerticalPos(),e=x.noteModel,await Dvt(l,e);break;case n.db.LINETYPE.ACTIVE_START:P.newActivation(x,l,c);break;case n.db.LINETYPE.ACTIVE_END:T(x,P.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.LOOP_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"loop",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.RECT_START:Nvt(k,x,O.boxMargin,O.boxMargin,t=>P.newLoop(void 0,t.message));break;case n.db.LINETYPE.RECT_END:t=P.endLoop(),S.push(t),P.models.addLoop(t),P.bumpVerticalPos(t.stopy-P.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.OPT_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"opt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.ALT_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.ALT_ELSE:Nvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case n.db.LINETYPE.ALT_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"alt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t)),P.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Nvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case n.db.LINETYPE.PAR_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"par",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.CRITICAL_OPTION:Nvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case n.db.LINETYPE.CRITICAL_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"critical",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case n.db.LINETYPE.BREAK_START:Nvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case n.db.LINETYPE.BREAK_END:t=P.endLoop(),await Tvt.drawLoop(l,t,"break",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;default:try{(r=x.msgModel).starty=P.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=n.db.showSequenceNumbers();var L=await Lvt(l,r);Ivt(x,r,L,A,c,h,u),_.push({messageModel:r,lineStartY:L}),P.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(x.type)&&(E+=C),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await zvt(l,c,p,!1);for(b of _)await Fvt(l,b.messageModel,b.lineStartY,n);O.mirrorActors&&await zvt(l,c,p,!0),S.forEach(t=>Tvt.drawBackgroundRect(l,t)),ivt(l,c,p,O);for(w of P.models.boxes)w.height=P.getVerticalPos()-w.y,P.insert(w.x,w.y,w.x+w.width,w.height),w.startx=w.x,w.starty=w.y,w.stopx=w.startx+w.width,w.stopy=w.starty+w.height,w.stroke="rgb(0,0,0, 0.5)",Tvt.drawBox(l,w,O);m&&P.bumpVerticalPos(O.boxMargin),r=Gvt(l,c,p,o),void 0===(a=P.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let N=a.stopy-a.starty,I=(N<r.maxHeight?r.maxHeight:N)+2*O.diagramMarginY,R=(O.mirrorActors&&(I=I-O.boxMargin+O.bottomMarginAdj),a.stopx-a.startx);t=(R<r.maxWidth?r.maxWidth:R)+2*O.diagramMarginX,f&&l.append("text").text(f).attr("x",(a.stopx-a.startx)/2-2*O.diagramMarginX).attr("y",-25),Hc(l,I,t,O.useMaxWidth),o=f?40:0,l.attr("viewBox",a.startx-O.diagramMarginX+" -"+(O.diagramMarginY+o)+" "+t+" "+(I+o)),M.debug("models:",P.models)},"draw"),me(Rvt,"getMaxMessageWidthPerActor"),Yvt=me(function(t){let e=0,r=Bvt(O);for(var i in t.links)i=YE.calculateTextDimensions(i,r).width+2*O.wrapPadding+2*O.boxMargin,e<i&&(e=i);return e},"getRequiredPopupWidth"),me(Mvt,"calculateActorMargins"),Hvt=me(async function(t,e,r){var i=e.get(t.from),e=e.get(t.to),n=i.x,a=e.x,s=t.wrap&&t.message,o=Uc(t.message)?await qc(t.message,D()):YE.calculateTextDimensions(s?YE.wrapLabel(t.message,O.width,Pvt(O)):t.message,Pvt(O)),l={width:s?O.width:L.getMax(O.width,o.width+2*O.noteMargin),height:0,startx:i.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(l.width=s?L.getMax(O.width,o.width):L.getMax(i.width/2+e.width/2,o.width+2*O.noteMargin),l.startx=n+(i.width+O.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(l.width=s?L.getMax(O.width,o.width+2*O.noteMargin):L.getMax(i.width/2+e.width/2,o.width+2*O.noteMargin),l.startx=n-l.width+(i.width-O.actorMargin)/2):t.to===t.from?(o=YE.calculateTextDimensions(s?YE.wrapLabel(t.message,L.getMax(O.width,i.width),Pvt(O)):t.message,Pvt(O)),l.width=s?L.getMax(O.width,i.width):L.getMax(i.width,O.width,o.width+2*O.noteMargin),l.startx=n+(i.width-l.width)/2):(l.width=Math.abs(n+i.width/2-(a+e.width/2))+O.actorMargin,l.startx=n<a?n+i.width/2-O.actorMargin/2:a+e.width/2-O.actorMargin/2),s&&(l.message=YE.wrapLabel(t.message,l.width-2*O.wrapPadding,Pvt(O))),M.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l},"buildNoteModel"),Vvt=me(function(t,e,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(t.type))return{};let[i,n]=jvt(t.from,e),[a,s]=jvt(t.to,e),o=i<=a,l=o?n:i,c=o?a:s,h=2<Math.abs(a-s),u=me(t=>o?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(O.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=u(3)));var e=[i,n,a,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=YE.wrapLabel(t.message,L.getMax(r+2*O.wrapPadding,O.width),Ovt(O))),YE.calculateTextDimensions(t.message,Ovt(O)));return{width:L.getMax(t.wrap?0:d.width+2*O.wrapPadding,r+2*O.wrapPadding,O.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,e),toBounds:Math.max.apply(null,e)}},"buildMessageModel"),Xvt=me(async function(t,i,e,n){let a={},s=[],o,l,c;for(let r of t){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=qvt(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*O.activationWidth/2,stopx:h+O.activationWidth,actor:r.from,enabled:!0};P.activations.push(u);break;case n.db.LINETYPE.ACTIVE_END:h=P.activations.map(t=>t.actor).lastIndexOf(r.from),P.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Hvt(r,i,n),r.noteModel=l,s.forEach(t=>{(o=t).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))-O.labelBoxWidth})):(c=Vvt(r,i,n),(r.msgModel=c).startx&&c.stopx&&0<s.length&&s.forEach(t=>{var e;o=t,c.startx===c.stopx?(t=i.get(r.from),e=i.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-O.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)-O.labelBoxWidth)}))}return P.activations=[],M.debug("Loop type widths:",a),a},"calculateLoopBounds"),Kvt={bounds:P,drawActors:zvt,drawActorsPopup:Gvt,setConf:Uvt,draw:Wvt}}),Qvt={};lPt(Qvt,{diagram:()=>Jvt});var Jvt,txt,ext,rxt,ixt,nxt,axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt=t(()=>{Cvt(),_vt(),Svt(),fu(),Zvt(),Jvt={parser:z2t,get db(){return new j2t},renderer:Kvt,styles:Y2t,init:me(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,mh({sequence:{wrap:t.wrap}}))},"init")}}),fxt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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],B=[1,32],F=[1,33],$=[1,34],c=[1,45],z=[1,35],G=[1,36],U=[1,37],q=[1,38],j=[1,27],W=[1,28],Y=[1,29],H=[1,30],V=[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],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],k=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],T=[13,58,84,99,101,102],E=[13,58,71,72,84,99,101,102],J=[13,58,66,67,68,69,70,84,99,101,102],tt=[1,98],C=[1,115],_=[1,107],S=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],R=[1,112],M=[1,114],et=[22,58,59,80,84,85,86,87,88,89],rt=[1,8,9,39,41,44],D=[1,8,9,22],it=[1,143],nt=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],k={trace:me(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,DOT:17,className:18,classLiteralName: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,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"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",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,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,6],[43,2],[43,3],[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],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:me(function(t,e,r,i,n,a,s){var o=a.length-1;switch(n){case 8:this.$=a[o-1];break;case 9:case 12:case 14:this.$=a[o];break;case 10:case 13:this.$=a[o-2]+"."+a[o];break;case 11:case 15:this.$=a[o-1]+a[o];break;case 16:case 17:this.$=a[o-1]+"~"+a[o]+"~";break;case 18:i.addRelation(a[o]);break;case 19:a[o-1].title=i.cleanupLabel(a[o]),i.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 33:i.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:i.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],i.addNamespace(a[o]);break;case 36:this.$=[a[o]];break;case 37:this.$=[a[o-1]];break;case 38:a[o].unshift(a[o-2]),this.$=a[o];break;case 40:i.setCssClass(a[o-2],a[o]);break;case 41:i.addMembers(a[o-3],a[o-1]);break;case 42:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],i.addClass(a[o]);break;case 44:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 45:i.addAnnotation(a[o],a[o-2]);break;case 46:case 59:this.$=[a[o]];break;case 47:a[o].push(a[o-1]),this.$=a[o];break;case 48:break;case 49:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 50:case 51:break;case 52:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 54:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 55:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 56:i.addNote(a[o],a[o-1]);break;case 57:i.addNote(a[o]);break;case 58:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:i.setDirection("TB");break;case 62:i.setDirection("BT");break;case 63:i.setDirection("RL");break;case 64:i.setDirection("LR");break;case 65:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 66:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 67:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 69:this.$=i.relationType.AGGREGATION;break;case 70:this.$=i.relationType.EXTENSION;break;case 71:this.$=i.relationType.COMPOSITION;break;case 72:this.$=i.relationType.DEPENDENCY;break;case 73:this.$=i.relationType.LOLLIPOP;break;case 74:this.$=i.lineType.LINE;break;case 75:this.$=i.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 91:i.setCssClass(a[o-1],a[o]);break;case 92:this.$=[a[o]];break;case 93:a[o-2].push(a[o]),this.$=a[o-2];break;case 95:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,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,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(X,[2,5],{8:[1,48]}),{8:[1,49]},e(g,[2,18],{22:[1,50]}),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),e(g,[2,29]),{34:[1,51]},{36:[1,52]},e(g,[2,32]),e(g,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:f,67:m,68:y,69:v,70:x,71:K,72:Z}),{39:[1,65]},e(b,[2,39],{39:[1,67],44:[1,66]}),e(g,[2,50]),e(g,[2,51]),{16:68,58:c,84:h,99:u,101:d},{16:39,18:69,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:70,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:71,19:40,58:c,84:h,99:u,101:d,102:p},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:c,84:h,99:u,101:d,102:p},{13:Q,53:75},{56:77,58:[1,78]},e(g,[2,61]),e(g,[2,62]),e(g,[2,63]),e(g,[2,64]),e(w,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:c,84:h,99:u,101:d,102:p}),e(w,[2,14],{20:[1,82]}),{15:83,16:84,58:c,84:h,99:u,101:d},{16:39,18:85,19:40,58:c,84:h,99:u,101:d,102:p},e(k,[2,118]),e(k,[2,119]),e(k,[2,120]),e(k,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(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,18:21,38:22,43:23,16:39,19:40,5:86,33:r,35:i,37:n,42:a,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p}),{5:87,10:5,16:39,18:21,19:40,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,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},e(g,[2,19]),e(g,[2,30]),e(g,[2,31]),{13:[1,89],16:39,18:88,19:40,58:c,84:h,99:u,101:d,102:p},{51:90,64:56,65:57,66:f,67:m,68:y,69:v,70:x,71:K,72:Z},e(g,[2,49]),{65:91,71:K,72:Z},e(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),e(E,[2,69]),e(E,[2,70]),e(E,[2,71]),e(E,[2,72]),e(E,[2,73]),e(J,[2,74]),e(J,[2,75]),{8:[1,94],24:95,40:93,43:23,46:s},{16:96,58:c,84:h,99:u,101:d},{45:97,49:tt},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:C,57:104,58:_,80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},{58:[1,116]},{13:Q,53:117},e(g,[2,57]),e(g,[2,123]),{22:C,57:118,58:_,59:[1,119],80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(et,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},e(rt,[2,43],{11:123,12:[1,124]}),e(X,[2,7]),{9:[1,125]},e(D,[2,52]),{16:39,18:126,19:40,58:c,84:h,99:u,101:d,102:p},{13:[1,128],16:39,18:127,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),e(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},e(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:tt},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},e(g,[2,76],{13:[1,137]}),e(g,[2,78],{13:[1,139],75:[1,138]}),e(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(g,[2,90],{59:it}),e(nt,[2,92],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(O,[2,94]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(O,[2,99]),e(O,[2,100]),e(O,[2,101]),e(O,[2,102]),e(O,[2,103]),e(O,[2,104]),e(g,[2,91]),e(g,[2,56]),e(g,[2,58],{59:it}),{58:[1,145]},e(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},e(rt,[2,44]),{13:[1,147]},{1:[2,4]},e(D,[2,54]),e(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,65]),e(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:tt},e(b,[2,41]),{41:[2,47]},e(g,[2,45]),e(g,[2,77]),e(g,[2,79]),e(g,[2,80],{75:[1,152]}),e(g,[2,83]),e(g,[2,84],{13:[1,153]}),e(g,[2,86],{13:[1,155],75:[1,154]}),{22:C,58:_,80:S,82:156,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(O,[2,95]),e(et,[2,60]),{39:[2,10]},{14:[1,157]},e(D,[2,55]),e(g,[2,34]),{41:[2,38]},{41:[1,158]},e(g,[2,81]),e(g,[2,85]),e(g,[2,87]),e(g,[2,88],{75:[1,159]}),e(nt,[2,93],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(rt,[2,8]),e(b,[2,42]),e(g,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,r,i){switch(r){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;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 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;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 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;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 75;case 68:case 69:return 67;case 70:case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:case 85:return 88;case 86:return 89;case 87:case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:case 96:return 87;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}}};k.lexer=r,me(t,"Parser"),(txt=new((t.prototype=k).Parser=t)).parser=txt,ext=txt}),mxt=t(()=>{fu(),Jc(),rxt=["#","+","~","-",""],ixt=class{static{me(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="",e=_c(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Pc(this.id);"method"===this.memberType&&(t+=`(${Pc(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Pc(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(n=r[1]?r[1].trim():"",rxt.includes(n)&&(this.visibility=n),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(n=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(n))&&(e=n,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,n=t.substring(0,1),i=t.substring(r-1),rxt.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,i,n=(this.visibility?"\\"+this.visibility:"")+Pc(this.id)+("method"===this.memberType?`(${Pc(this.parameters)})`+(this.returnType?" : "+Pc(this.returnType):""):"");this.text=n.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),yxt=t(()=>{Z3(),e(),fu(),Jc(),KE(),gu(),mxt(),nxt="classId-",axt=0,sxt=me(t=>L.sanitizeText(t,D()),"sanitizeText"),oxt=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=me(t=>{let r=j(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=j("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),j(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e;null!==(t=j(t.currentTarget)).attr("title")&&(e=this.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.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),t.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),j(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=lh,this.getAccTitle=ch,this.setAccDescription=hh,this.getAccDescription=uh,this.setDiagramTitle=dh,this.getDiagramTitle=ph,this.getConfig=me(()=>D().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{me(this,"ClassDB")}splitClassNameAndType(t){let e=L.sanitizeText(t,D()),r="",i=e;return 0<e.indexOf("~")&&(t=e.split("~"),i=sxt(t[0]),r=sxt(t[1])),{className:i,type:r}}setClassLabel(t,e){t=L.sanitizeText(t,D()),e=e&&sxt(e),t=this.splitClassNameAndType(t).className,this.classes.get(t).label=e,this.classes.get(t).text=""+e+(this.classes.get(t).type?`<${this.classes.get(t).type}>`:"")}addClass(t){var t=L.sanitizeText(t,D()),{className:t,type:e}=this.splitClassNameAndType(t);this.classes.has(t)||(t=L.sanitizeText(t,D()),this.classes.set(t,{id:t,type:e,label:t,text:t+(e?`&lt;${e}&gt;`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:nxt+t+"-"+axt}),axt++)}addInterface(t,e){t={id:"interface"+this.interfaces.length,label:t,classId:e},this.interfaces.push(t)}lookUpDomId(t){if(t=L.sanitizeText(t,D()),this.classes.has(t))return this.classes.get(t).domId;throw new Error("Class not found: "+t)}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",oh()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){M.debug("Adding relation: "+JSON.stringify(t));var e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),D()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),D()),this.relations.push(t)}addAnnotation(t,e){t=this.splitClassNameAndType(t).className,this.classes.get(t).annotations.push(e)}addMember(t,e){this.addClass(t),t=this.splitClassNameAndType(t).className,t=this.classes.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(sxt(e.substring(2,e.length-2))):0<e.indexOf(")")?t.methods.push(new ixt(e,"method")):e&&t.members.push(new ixt(e,"attribute")))}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(t,e){e={id:"note"+this.notes.length,class:e,text:t},this.notes.push(e)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),sxt(t.trim())}setCssClass(t,r){t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=nxt+e),(t=this.classes.get(e))&&(t.cssClasses+=" "+r)})}defineClass(t,i){for(let e of t){let r=this.styleClasses.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.styleClasses.set(e,r)),i&&i.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.classes.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...i.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=sxt(e))})}getTooltip(t,e){return(e&&this.namespaces.has(e)?this.namespaces.get(e):this).classes.get(t).tooltip}setLink(t,r,i){let n=D();t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=nxt+e),(t=this.classes.get(e))&&(t.link=YE.formatUrl(r,n),"sandbox"===n.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof i?sxt(i):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,i,n){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==i&&this.classes.has(t)){let e=this.lookUpDomId(t),r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(e),this.functions.push(()=>{var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",()=>{YE.runFunc(i,...r)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:nxt+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(var r of e)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=t,this.namespaces.get(t).classes.set(r,this.classes.get(r))}setCssStyle(t,e){var r=this.classes.get(t);if(e&&r)for(var i of e)i.includes(",")?r.styles.push(...i.split(",")):r.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){var t,e,r,i,n,a=[],s=[],o=D();for(t of this.namespaces.keys()){var l=this.namespaces.get(t);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(e of this.classes.keys()){var c,h=this.classes.get(e);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:XE(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()}}}}),vxt=t(()=>{lxt=me(t=>`g.classGroup text {
fill: ${t.nodeBorder||t.classText};
stroke: none;
font-family: ${t.fontFamily};
font-size: 10px;
.title {
font-weight: bolder;
}
}
.nodeLabel, .edgeLabel {
color: ${t.classText};
}
.edgeLabel .label rect {
fill: ${t.mainBkg};
}
.label text {
fill: ${t.classText};
}
.labelBkg {
background: ${t.mainBkg};
}
.edgeLabel .label span {
background: ${t.mainBkg};
}
.classTitle {
font-weight: bolder;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.divider {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.classGroup line {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.classLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.classLabel .label {
fill: ${t.nodeBorder};
font-size: 10px;
}
.relation {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
.dotted-line{
stroke-dasharray: 1 2;
}
#compositionStart, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#compositionEnd, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionStart, .extension {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionEnd, .extension {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationStart, .aggregation {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationEnd, .aggregation {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopStart, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopEnd, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
.edgeTerminals {
font-size: 11px;
line-height: initial;
}
.classTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),cxt=lxt}),xxt=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),hxt=me((t,e="TB")=>{if(!t.doc)return e;let r=e;for(var i of t.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),uxt=me(function(t,e){return e.db.getClasses()},"getClasses"),dxt=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing class diagram (v3)",e);var{securityLevel:n,state:a,layout:s}=D(),o=i.db.getData(),n=NM(e,n);o.type=i.type,o.layoutAlgorithm=CX(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await EX(o,n),YE.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),pxt={getClasses:uxt,draw:dxt,getDir:hxt}}),bxt={};lPt(bxt,{diagram:()=>wxt});var wxt,kxt=t(()=>{fxt(),yxt(),vxt(),xxt(),wxt={parser:ext,get db(){return new oxt},renderer:pxt,styles:cxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),Txt={};lPt(Txt,{diagram:()=>Ext});var Ext,Cxt,_xt,Sxt,Axt,Lxt,Nxt,Ixt,Rxt,Mxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Gxt,Uxt,qxt,jxt,Wxt,Yxt,Hxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,ibt,nbt,abt,sbt,obt,lbt,cbt=t(()=>{fxt(),yxt(),vxt(),xxt(),Ext={parser:ext,get db(){return new oxt},renderer:pxt,styles:cxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),hbt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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,32],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,34],C=[1,35],_=[1,36],S=[1,37],A=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],r={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:me(function(t,e,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:case 33:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 34:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 35:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 36:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 44:case 45: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},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],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:x,37:b,38:w,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,5]),{9:38,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:x,37:b,38:w,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,7]),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(L,[2,11]),e(L,[2,12],{14:[1,39],15:[1,40]}),e(L,[2,16]),{18:[1,41]},e(L,[2,18],{20:[1,42]}),{23:[1,43]},e(L,[2,22]),e(L,[2,23]),e(L,[2,24]),e(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},e(L,[2,28]),{34:[1,48]},{36:[1,49]},e(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},e(N,[2,42],{55:[1,54]}),e(N,[2,43],{55:[1,55]}),e(L,[2,36]),e(L,[2,37]),e(L,[2,38]),e(L,[2,39]),e(L,[2,6]),e(L,[2,13]),{13:56,24:d,54:A},e(L,[2,17]),e(I,a,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},e(L,[2,29]),e(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},e(L,[2,14],{14:[1,67]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},e(L,[2,32]),e(L,[2,33]),e(L,[2,34]),e(L,[2,35]),e(N,[2,44]),e(N,[2,45]),e(L,[2,15]),e(L,[2,19]),e(I,a,{7:72}),e(L,[2,26]),e(L,[2,27]),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:E,49:C,50:_,51:S,54:A},e(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,i){switch(r){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:case 6:break;case 7:return 5;case 8:case 9:case 10:case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?: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:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};r.lexer=i,me(t,"Parser"),(Cxt=new((t.prototype=r).Parser=t)).parser=Cxt,_xt=Cxt}),ubt=t(()=>{Axt=Sxt="TB",Lxt="dir",Ixt="relation",Rxt="classDef",Mxt="style",Dxt="applyClass",Oxt="default",Bxt="fill:none",Fxt="fill: #333",$xt="c",zxt="text",Gxt="normal",Uxt="rect",qxt="rectWithTitle",jxt="stateStart",Wxt="stateEnd",Yxt=Pxt="divider",Hxt="roundedWithTitle",Xxt="noteGroup",Zxt=(Kxt="statediagram")+"-state",Jxt=(Qxt="transition")+" note-edge",tbt=Kxt+"-note",ebt=Kxt+"-cluster",rbt=Kxt+"-cluster-alt",abt=Nxt="state",obt=(sbt="----")+(nbt=Vxt="note"),lbt=""+sbt+(ibt="parent")});function dbt(t="",e=0,r="",i=sbt){return i=null!==r&&0<r.length?""+i+r:"",abt+`-${t}${i}-`+e}function pbt(t,e,r){var i;e.id&&"</join></fork>"!==e.id&&"</choice>"!==e.id&&(e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{r.get(t)&&(t=r.get(t),e.cssCompiledStyles=[...e.cssCompiledStyles,...t.styles])})),(i=t.find(t=>t.id===e.id))?Object.assign(i,e):t.push(e))}function gbt(t){return t?.classes?.join(" ")??""}function fbt(t){return t?.styles??[]}var mbt,ybt,vbt,xbt,bbt,wbt,kbt,Tbt,Ebt,Cbt,_bt=t(()=>{fu(),e(),Jc(),ubt(),mbt=new Map,ybt=0,me(dbt,"stateDomId"),vbt=me((r,t,i,n,a,s,o,l)=>{M.trace("items",t),t.forEach(t=>{switch(t.stmt){case Nxt:case Oxt:bbt(r,t,i,n,a,s,o,l);break;case Ixt:bbt(r,t.state1,i,n,a,s,o,l),bbt(r,t.state2,i,n,a,s,o,l);var e={id:"edge"+ybt,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Bxt,labelStyle:"",label:L.sanitizeText(t.description,D()),arrowheadStyle:Fxt,labelpos:$xt,labelType:zxt,thickness:Gxt,classes:Qxt,look:o};a.push(e),ybt++}})},"setupDoc"),xbt=me((t,e=Axt)=>{let r=e;if(t.doc)for(var i of t.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),me(pbt,"insertOrUpdateNode"),me(gbt,"getClassesFromDbInfo"),me(fbt,"getStylesFromDbInfo"),bbt=me((r,i,t,n,a,e,s,o)=>{var l=i.id,c=t.get(l),h=gbt(c),u=fbt(c);if(M.info("dataFetcher parsedItem",i,c,u),"root"!==l){let t=Uxt;if(!0===i.start?t=jxt:!1===i.start&&(t=Wxt),i.type!==Oxt&&(t=i.type),mbt.get(l)||mbt.set(l,{id:l,shape:t,description:L.sanitizeText(l,D()),cssClasses:h+" "+Zxt,cssStyles:u}),c=mbt.get(l),i.description&&(Array.isArray(c.description)?(c.shape=qxt,c.description.push(i.description)):0<c.description?.length?(c.shape=qxt,c.description===l?c.description=[i.description]:c.description=[c.description,i.description]):(c.shape=Uxt,c.description=i.description),c.description=L.sanitizeTextOrArray(c.description,D())),1===c.description?.length&&c.shape===qxt&&("group"===c.type?c.shape=Hxt:c.shape=Uxt),!c.type&&i.doc&&(M.info("Setting cluster for XCX",l,xbt(i)),c.type="group",c.isGroup=!0,c.dir=xbt(i),c.shape=i.type===Pxt?Yxt:Hxt,c.cssClasses=c.cssClasses+` ${ebt} `+(e?rbt:"")),(h={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:dbt(l,ybt),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s}).shape===Yxt&&(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:Vxt,label:i.note.text,cssClasses:tbt,cssStyles:[],cssCompilesStyles:[],id:l+obt+"-"+ybt,domId:dbt(l,ybt,nbt),type:c.type,isGroup:"group"===c.type,padding:D().flowchart.padding,look:s,position:i.note.position},r=l+lbt,c={labelStyle:"",shape:Xxt,label:i.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+lbt,domId:dbt(l,ybt,ibt),type:"group",isGroup:!0,padding:16,look:s,position:i.note.position},ybt++,u.parentId=c.id=r,pbt(n,c,o),pbt(n,u,o),pbt(n,h,o);let t=l,e=u.id;"left of"===i.note.position&&(t=u.id,e=l),a.push({id:t+"-"+e,start:t,end:e,arrowhead:"none",arrowTypeEnd:"",style:Bxt,labelStyle:"",classes:Jxt,arrowheadStyle:Fxt,labelpos:$xt,labelType:zxt,thickness:Gxt,look:s})}else pbt(n,h,o)}i.doc&&(M.trace("Adding nodes children "),vbt(i,i.doc,t,n,a,!e,s,o))},"dataFetcher"),wbt=me(()=>{mbt.clear(),ybt=0},"reset")}),Sbt=t(()=>{fu(),e(),qM(),zX(),GX(),KE(),ubt(),kbt=me((t,e=Axt)=>{if(!t.doc)return e;let r=e;for(var i of t.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),Tbt=me(function(t,e){return e.db.getClasses()},"getClasses"),Ebt=me(async function(t,e,r,i){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);var{securityLevel:n,state:a,layout:s}=D(),o=(i.db.extract(i.db.getRootDocV2()),i.db.getData()),n=NM(e,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await EX(o,n),YE.insertTitle(n,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),_X(n,8,Kxt,a?.useMaxWidth??!0)},"draw"),Cbt={getClasses:Tbt,draw:Ebt,getDir:kbt}});function Abt(){return new Map}var Lbt,Nbt,Ibt,Rbt,Mbt,Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,Gbt,Ubt,qbt,jbt,Wbt,Ybt,Hbt,Vbt,Xbt,Kbt,Zbt,Qbt,Jbt,t4t,e4t,r4t,i4t,n4t,a4t,s4t=t(()=>{fu(),e(),KE(),Jc(),gu(),_bt(),Sbt(),ubt(),me(Abt,"newClassesList"),Lbt=me(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Nbt=me(t=>JSON.parse(JSON.stringify(t)),"clone"),Ibt=class{static{me(this,"StateDB")}constructor(t){this.clear(),this.version=t,this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}version;nodes=[];edges=[];rootDoc=[];classes=Abt();documents={root:Lbt()};currentDocument=this.documents.root;startEndCount=0;dividerCnt=0;static relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};setRootDoc(t){M.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}getRootDoc(){return this.rootDoc}docTranslator(i,n,t){if(n.stmt===Ixt)this.docTranslator(i,n.state1,!0),this.docTranslator(i,n.state2,!1);else if(n.stmt===Nxt&&("[*]"===n.id?(n.id=t?i.id+"_start":i.id+"_end",n.start=t):n.id=n.id.trim()),n.doc){let t=[],e=[],r;for(r=0;r<n.doc.length;r++){var a;n.doc[r].type===Pxt?((a=Nbt(n.doc[r])).doc=Nbt(e),t.push(a),e=[]):e.push(n.doc[r])}0<t.length&&0<e.length&&(i={stmt:Nxt,id:DE(),type:"divider",doc:Nbt(e)},t.push(Nbt(i)),n.doc=t),n.doc.forEach(t=>this.docTranslator(n,t,!0))}}getRootDocV2(){return this.docTranslator({id:"root"},{id:"root",doc:this.rootDoc},!0),{id:"root",doc:this.rootDoc}}extract(t){var e=t.doc||t,t=(M.info(e),this.clear(!0),M.info("Extract initial document:",e),e.forEach(e=>{switch(M.warn("Statement",e.stmt),e.stmt){case Nxt:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles);break;case Ixt:this.addRelation(e.state1,e.state2,e.description);break;case Rxt:this.addStyleClass(e.id.trim(),e.classes);break;case Mxt:{let t=e.id.trim().split(","),r=e.styleClass.split(",");t.forEach(t=>{let e=this.getState(t);void 0===e&&(t=t.trim(),this.addState(t),e=this.getState(t)),e.styles=r.map(t=>t.replace(/;/g,"")?.trim())})}break;case Dxt:this.setCssClass(e.id.trim(),e.styleClass)}}),this.getStates()),e=D().look;wbt(),bbt(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,e,this.classes),this.nodes.forEach(t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&0<t.description.length)throw new Error("Group nodes can only have label. Remove the additional description for node ["+t.id+"]");t.label=t.label[0]}})}addState(t,e=Oxt,r=null,i=null,n=null,a=null,s=null,o=null){let l=t?.trim();this.currentDocument.states.has(l)?(this.currentDocument.states.get(l).doc||(this.currentDocument.states.get(l).doc=r),this.currentDocument.states.get(l).type||(this.currentDocument.states.get(l).type=e)):(M.info("Adding state ",l,i),this.currentDocument.states.set(l,{id:l,descriptions:[],type:e,doc:r,note:n,classes:[],styles:[],textStyles:[]})),i&&(M.info("Setting state description",l,i),"string"==typeof i&&this.addDescription(l,i.trim()),"object"==typeof i)&&i.forEach(t=>this.addDescription(l,t.trim())),n&&((t=this.currentDocument.states.get(l)).note=n,t.note.text=L.sanitizeText(t.note.text,D())),a&&(M.info("Setting state classes",l,a),("string"==typeof a?[a]:a).forEach(t=>this.setCssClass(l,t.trim()))),s&&(M.info("Setting state styles",l,s),("string"==typeof s?[s]:s).forEach(t=>this.setStyle(l,t.trim()))),o&&(M.info("Setting state styles",l,s),("string"==typeof o?[o]:o).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Lbt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Abt(),t||oh()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}startIdIfNeeded(t=""){let e=t;return"[*]"===t&&(this.startEndCount++,e="start"+this.startEndCount),e}startTypeIfNeeded(t="",e=Oxt){return"[*]"===t?"start":e}endIdIfNeeded(t=""){let e=t;return"[*]"===t&&(this.startEndCount++,e="end"+this.startEndCount),e}endTypeIfNeeded(t="",e=Oxt){return"[*]"===t?"end":e}addRelationObjs(t,e,r){var i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:L.sanitizeText(r,D())})}addRelation(t,e,r){var i,n;"object"==typeof t?this.addRelationObjs(t,e,r):(i=this.startIdIfNeeded(t.trim()),t=this.startTypeIfNeeded(t),n=this.endIdIfNeeded(e.trim()),e=this.endTypeIfNeeded(e),this.addState(i,t),this.addState(n,e),this.currentDocument.relations.push({id1:i,id2:n,title:L.sanitizeText(r,D())}))}addDescription(t,e){t=this.currentDocument.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t.descriptions.push(L.sanitizeText(e,D()))}cleanupLabel(t){return(":"===t.substring(0,1)?t.substr(2):t).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let r=this.classes.get(t);e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(t=>{let e=this.getState(t);void 0===e&&(t=t.trim(),this.addState(t),e=this.getState(t)),e.classes.push(r)})}setStyle(t,e){void 0!==(t=this.getState(t))&&t.styles.push(e)}setTextStyle(t,e){void 0!==(t=this.getState(t))&&t.textStyles.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Lxt)}getDirection(){return this.getDirectionStatement()?.value??Sxt}setDirection(t){var e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:Lxt,value:t})}trimColon(t){return(t&&":"===t[0]?t.substr(1):t).trim()}getData(){var t=D();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:kbt(this.getRootDocV2())}}getConfig(){return D().state}getAccTitle=ch;setAccTitle=lh;getAccDescription=uh;setAccDescription=hh;setDiagramTitle=dh;getDiagramTitle=ph}}),o4t=t(()=>{Rbt=me(t=>`
defs #statediagram-barbEnd {
fill: ${t.transitionColor};
stroke: ${t.transitionColor};
}
g.stateGroup text {
fill: ${t.nodeBorder};
stroke: none;
font-size: 10px;
}
g.stateGroup text {
fill: ${t.textColor};
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: ${t.stateLabelColor};
}
g.stateGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.stateGroup line {
stroke: ${t.lineColor};
stroke-width: 1;
}
.transition {
stroke: ${t.transitionColor};
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: ${t.background};
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
text {
fill: ${t.noteTextColor};
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.edgeLabel .label rect {
fill: ${t.labelBackgroundColor};
opacity: 0.5;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
p {
background-color: ${t.edgeLabelBackground};
}
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
.edgeLabel .label text {
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.label div .edgeLabel {
color: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.stateLabel text {
fill: ${t.stateLabelColor};
font-size: 10px;
font-weight: bold;
}
.node circle.state-start {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node .fork-join {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node circle.state-end {
fill: ${t.innerEndBackground};
stroke: ${t.background};
stroke-width: 1.5
}
.end-state-inner {
fill: ${t.compositeBackground||t.background};
// stroke: ${t.background};
stroke-width: 1.5
}
.node rect {
fill: ${t.stateBkg||t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.node polygon {
fill: ${t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};;
stroke-width: 1px;
}
#statediagram-barbEnd {
fill: ${t.lineColor};
}
.statediagram-cluster rect {
fill: ${t.compositeTitleBackground};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.cluster-label, .nodeLabel {
color: ${t.stateLabelColor};
// line-height: 1;
}
.statediagram-cluster rect.outer {
rx: 5px;
ry: 5px;
}
.statediagram-state .divider {
stroke: ${t.stateBorder||t.nodeBorder};
}
.statediagram-state .title-state {
rx: 5px;
ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
fill: ${t.compositeBackground||t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
fill: ${t.altBackground||"#efefef"};
}
.statediagram-cluster .inner {
rx:0;
ry:0;
}
.statediagram-state rect.basic {
rx: 5px;
ry: 5px;
}
.statediagram-state rect.divider {
stroke-dasharray: 10,10;
fill: ${t.altBackground||"#efefef"};
}
.note-edge {
stroke-dasharray: 5;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note text {
fill: ${t.noteTextColor};
}
.statediagram-note .nodeLabel {
color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
color: red; // ${t.noteTextColor};
}
#dependencyStart, #dependencyEnd {
fill: ${t.lineColor};
stroke: ${t.lineColor};
stroke-width: 1;
}
.statediagramTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),Mbt=Rbt}),l4t=t(()=>{Dbt={},Obt=me((t,e)=>{Dbt[t]=e},"set"),Pbt=me(t=>Dbt[t],"get"),Bbt=me(()=>Object.keys(Dbt),"keys"),Fbt=me(()=>Bbt().length,"size"),$bt={get:Pbt,set:Obt,keys:Bbt,size:Fbt}}),c4t=t(()=>{Z3(),l4t(),s4t(),KE(),Jc(),fu(),e(),zbt=me(t=>t.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),Gbt=me(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),Ubt=me((t,e)=>{var r=(e=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),e},"drawSimpleState"),qbt=me((t,e)=>{let r=me(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,a=t.append("text").attr("x",D().state.padding).attr("y",n+.4*D().state.padding+D().state.dividerMargin+D().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+n+D().state.dividerMargin/2).attr("y2",D().state.padding+n+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,i.width);return e.attr("x2",c+3*D().state.padding),t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+n+2*D().state.padding).attr("rx",D().state.radius),t},"drawDescrState"),jbt=me((t,e,r)=>{let i=D().state.padding,n=2*D().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+n,h=Math.max(c,s);h===s&&(h+=n);let u,d=t.node().getBBox();return e.doc,u=o-i,s<c&&(u=(s-h)/2+i),Math.abs(o-d.x)<i&&s<c&&(u=o-(c-s)/2),e=1-D().state.textHeight,t.insert("rect",":first-child").attr("x",u).attr("y",e).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+D().state.textHeight+D().state.titleShift+1).attr("rx","0"),l.attr("x",u+i),c<=s&&l.attr("x",o+(h-n)/2-c/2+i),t.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",3*D().state.textHeight).attr("rx",D().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",d.height+3+2*D().state.textHeight).attr("rx",D().state.radius),t},"addTitleAndBox"),Wbt=me(t=>(t.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),Ybt=me((t,e)=>{let r=D().state.forkWidth,i=D().state.forkHeight;return e.parentId&&(e=r,r=i,i=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),Hbt=me((t,e,r,i)=>{let n=0,a=i.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"<br/>")),o=(s=s.replace(/\n/g,"<br/>")).split(L.lineBreakRegex),l=1.25*D().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",e+D().state.noteMargin),h.attr("y",r+n+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),Vbt=me((t,e)=>{e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",D().state.padding),e=e.append("g"),{textWidth:t,textHeight:e}=Hbt(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),Xbt=me(function(t,e){var r=e.id,i={id:r,label:e.id,width:0,height:0},t=t.append("g").attr("id",r).attr("class","stateGroup"),e=("start"===e.type&&zbt(t),"end"===e.type&&Wbt(t),"fork"!==e.type&&"join"!==e.type||Ybt(t,e),"note"===e.type&&Vbt(e.note.text,t),"divider"===e.type&&Gbt(t),"default"===e.type&&0===e.descriptions.length&&Ubt(t,e),"default"===e.type&&0<e.descriptions.length&&qbt(t,e),t.node().getBBox());return i.width=e.width+2*D().state.padding,i.height=e.height+2*D().state.padding,$bt.set(r,i),i},"drawState"),Kbt=0,Zbt=me(function(c,h,u){var d=me(function(t){switch(t){case Ibt.relationType.AGGREGATION:return"aggregation";case Ibt.relationType.EXTENSION:return"extension";case Ibt.relationType.COMPOSITION:return"composition";case Ibt.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(t=>!Number.isNaN(t.y));let t=h.points,e=X4().x(function(t){return t.x}).y(function(t){return t.y}).curve(u5),r=c.append("path").attr("d",e(t)).attr("id","edge"+Kbt).attr("class","transition"),i="";if(D().state.arrowMarkerAbsolute&&(i=(i=(i=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.attr("marker-end","url("+i+"#"+d(Ibt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:i}=YE.calcLabelPosition(h.points),n=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let t=0;t<=n.length;t++){var p=e.append("text").attr("text-anchor","middle").text(n[t]).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 t=a*n.length;if(1<n.length){let r=(n.length-1)*a*.5;s.forEach((t,e)=>t.attr("y",i+e*a-r)),t=a*n.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",i-t/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",t+D().state.padding),M.info(d)}Kbt++},"drawEdge")}),h4t=t(()=>{Z3(),QV(),$W(),e(),Jc(),c4t(),fu(),th(),Jbt={},t4t=me(function(){},"setConf"),e4t=me(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),r4t=me(function(t,e,r,i){Qbt=D().state;let n=D().securityLevel,a;"sandbox"===n&&(a=j("#i"+e));var s=j("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===n?a.nodes()[0].contentDocument:document,t=(M.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(e4t(t),i.db.getRootDoc()),e=(n4t(e,t,void 0,!1,s,o,i),Qbt.padding),o=(s=t.node().getBBox()).width+2*e;Hc(t,i=s.height+2*e,1.75*o,Qbt.useMaxWidth),t.attr("viewBox",`${s.x-Qbt.padding} ${s.y-Qbt.padding} `+o+" "+i)},"draw"),i4t=me(t=>t?t.length*Qbt.fontSizeFactor:1,"getLabelWidth"),n4t=me((t,e,r,i,n,a,s)=>{let o=new BW({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){c=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:Qbt.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:Qbt.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 t;f.doc?(g=e.append("g").attr("id",f.id).attr("class","stateGroup"),t=n4t(f.doc,g,f.id,!i,n,a,s),g=(g=jbt(g,f,i)).node().getBBox(),t.width=g.width,t.height=g.height+Qbt.padding/2,Jbt[f.id]={y:Qbt.compositTitleSize}):t=Xbt(e,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=Xbt(e,g,o),"left of"===f.note.position?(o.setNode(t.id+"-note",p),o.setNode(t.id,t)):(o.setNode(t.id,t),o.setNode(t.id+"-note",p)),o.setParent(t.id,t.id+"-group"),o.setParent(t.id+"-note",t.id+"-group")):o.setNode(t.id,t)}M.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(t){m++,M.debug("Setting edge",t),o.setEdge(t.id1,t.id2,{relation:t,width:i4t(t.title),height:Qbt.labelHeight*L.getRows(t.title).length,labelpos:"c"},"id"+m)}),CV(o),M.debug("Graph after layout",o.nodes()),e.node());o.nodes().forEach(function(t){void 0!==t&&void 0!==o.node(t)?(M.warn("Node "+t+": "+JSON.stringify(o.node(t))),n.select("#"+y.id+" #"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y+(Jbt[t]?Jbt[t].y:0)-o.node(t).height/2)+" )"),n.select("#"+y.id+" #"+t).attr("data-x-shift",o.node(t).x-o.node(t).width/2),a.querySelectorAll("#"+y.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,r=0,i=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i))&&(i=0),t.setAttribute("x1",0-i+8),t.setAttribute("x2",r-i-8)})):M.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(M.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Zbt(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*Qbt.padding,v.height=d.height+2*Qbt.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),a4t={setConf:t4t,draw:r4t}}),u4t={};lPt(u4t,{diagram:()=>d4t});var d4t,p4t=t(()=>{hbt(),s4t(),o4t(),h4t(),d4t={parser:_xt,get db(){return new Ibt(1)},renderer:a4t,styles:Mbt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),g4t={};lPt(g4t,{diagram:()=>f4t});var f4t,m4t,y4t,v4t,x4t,b4t,w4t,k4t,T4t,E4t,C4t,_4t,S4t,A4t,L4t,N4t,I4t,R4t,M4t,D4t,O4t,P4t,B4t,F4t,$4t,z4t,G4t,U4t,q4t,j4t,W4t,Y4t=t(()=>{hbt(),s4t(),o4t(),Sbt(),f4t={parser:_xt,get db(){return new Ibt(2)},renderer:Cbt,styles:Mbt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),H4t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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:me(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:me(function(t,e,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]},e(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},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:i,12:n,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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,me(t,"Parser"),(m4t=new((t.prototype=i).Parser=t)).parser=m4t,y4t=m4t}),V4t=t(()=>{fu(),gu(),v4t="",x4t=[],b4t=[],w4t=[],k4t=me(function(){x4t.length=0,b4t.length=0,v4t="",w4t.length=0,oh()},"clear"),T4t=me(function(t){v4t=t,x4t.push(t)},"addSection"),E4t=me(function(){return x4t},"getSections"),C4t=me(function(){let t=L4t(),e=0;for(;!t&&e<100;)t=L4t(),e++;return b4t.push(...w4t),b4t},"getTasks"),_4t=me(function(){let e=[];return b4t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),S4t=me(function(t,e){let r=e.substr(1).split(":"),i=0;e=(1===r.length?(i=Number(r[0]),[]):(i=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:v4t,type:v4t,people:e,task:t,score:i},w4t.push(e)},"addTask"),A4t=me(function(t){t={section:v4t,type:v4t,description:t,task:t,classes:[]},b4t.push(t)},"addTaskOrg"),L4t=me(function(){let t=me(function(t){return w4t[t].processed},"compileTask"),e=!0;for(var[r,i]of w4t.entries())t(r),e=e&&i.processed;return e},"compileTasks"),N4t=me(function(){return _4t()},"getActors"),I4t={getConfig:me(()=>D().journey,"getConfig"),clear:k4t,setDiagramTitle:dh,getDiagramTitle:ph,setAccTitle:lh,getAccTitle:ch,setAccDescription:hh,getAccDescription:uh,addSection:T4t,getSections:E4t,getTasks:C4t,addTask:S4t,addTaskOrg:A4t,getActors:N4t}}),X4t=t(()=>{R4t=me(t=>`.label {
font-family: ${t.fontFamily};
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
font-family: ${t.fontFamily};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0?"fill: "+t.fillType0:""};
}
.task-type-1, .section-type-1 {
${t.fillType0?"fill: "+t.fillType1:""};
}
.task-type-2, .section-type-2 {
${t.fillType0?"fill: "+t.fillType2:""};
}
.task-type-3, .section-type-3 {
${t.fillType0?"fill: "+t.fillType3:""};
}
.task-type-4, .section-type-4 {
${t.fillType0?"fill: "+t.fillType4:""};
}
.task-type-5, .section-type-5 {
${t.fillType0?"fill: "+t.fillType5:""};
}
.task-type-6, .section-type-6 {
${t.fillType0?"fill: "+t.fillType6:""};
}
.task-type-7, .section-type-7 {
${t.fillType0?"fill: "+t.fillType7:""};
}
.actor-0 {
${t.actor0?"fill: "+t.actor0:""};
}
.actor-1 {
${t.actor1?"fill: "+t.actor1:""};
}
.actor-2 {
${t.actor2?"fill: "+t.actor2:""};
}
.actor-3 {
${t.actor3?"fill: "+t.actor3:""};
}
.actor-4 {
${t.actor4?"fill: "+t.actor4:""};
}
.actor-5 {
${t.actor5?"fill: "+t.actor5:""};
}
`,"getStyles"),M4t=R4t}),K4t=t(()=>{function e(t,e,r,i,n,a,s,o){g(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+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[t]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(t,e,r,i,n,a,s,o){var l=(e=e.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(t),c(t,e,r,i,n,a,s,o),g(l,s)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}Z3(),t6(),D4t=me(function(t,e){return y3(t,e)},"drawRect"),O4t=me(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(t){var e=$4().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function n(t){var e=$4().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),me(i,"smile"),me(n,"sad"),me(a,"ambivalent"),(3<r.score?i:r.score<3?n:a)(t),e},"drawFace"),P4t=me(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),B4t=me(function(t,e){return x3(t,e)},"drawText"),F4t=me(function(t,e){function r(t,e,r,i,n){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+i-n)+" "+(t+r-1.2*n)+","+(e+i)+" "+t+","+(e+i)}me(r,"genPoints");var i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,B4t(t,e)},"drawLabel"),$4t=me(function(t,e,r){var t=t.append("g"),i=k3();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,D4t(t,i),q4t(r)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),z4t=-1,G4t=me(function(t,r,e){let i=r.x+e.width/2,n=t.append("g"),a=(z4t++,n.append("line").attr("id","task"+z4t).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"),O4t(n,{cx:i,cy:300+30*(5-r.score),score:r.score}),(t=k3()).x=r.x,t.y=r.y,t.fill=r.fill,t.width=e.width,t.height=e.height,t.class="task task-type-"+r.num,t.rx=3,t.ry=3,D4t(n,t),r.x+14);r.people.forEach(t=>{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};P4t(n,e),a+=10}),q4t(e)(r.task,n,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),U4t=me(function(t,e){v3(t,e)},"drawBackgroundRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),q4t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},j4t=me(function(t){t.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"),W4t={drawRect:D4t,drawCircle:P4t,drawSection:$4t,drawText:B4t,drawLabel:F4t,drawTask:G4t,drawBackgroundRect:U4t,initGraphics:j4t}});function Z4t(r){let i=D().journey,n=60;Object.keys(J4t).forEach(t=>{var e=J4t[t].color,e={cx:20,cy:n,r:7,fill:e,stroke:"#000",pos:J4t[t].position},e=(W4t.drawCircle(r,e),{x:40,y:n+7,fill:"#666",text:t,textMargin:5|i.boxTextMargin});W4t.drawText(r,e),n+=20})}var Q4t,J4t,t5t,e5t,r5t,i5t,n5t,a5t,s5t,o5t,l5t=t(()=>{Z3(),K4t(),fu(),th(),Q4t=me(function(e){Object.keys(e).forEach(function(t){t5t[t]=e[t]})},"setConf"),J4t={},me(Z4t,"drawActorLegend"),t5t=D().journey,e5t=t5t.leftMargin,r5t=me(function(t,e,r,i){let n=D().journey,a=D().securityLevel,s;"sandbox"===a&&(s=j("#i"+e));var o,l=j("sandbox"===a?s.nodes()[0].contentDocument.body:"body"),l=(i5t.init(),l.select("#"+e)),e=(W4t.initGraphics(l),i.db.getTasks()),c=i.db.getDiagramTitle(),i=i.db.getActors();for(o in J4t)delete J4t[o];let h=0;i.forEach(t=>{J4t[t]={color:n.actorColours[h%n.actorColours.length],position:h},h++}),Z4t(l),i5t.insert(0,0,e5t,50*Object.keys(J4t).length),s5t(l,e,0);var i=i5t.getBounds(),e=(c&&l.append("text").text(c).attr("x",e5t).attr("font-size","4ex").attr("font-weight","bold").attr("y",25),i.stopy-i.starty+2*n.diagramMarginY),u=e5t+i.stopx+2*n.diagramMarginX,c=(Hc(l,e,u,n.useMaxWidth),l.append("line").attr("x1",e5t).attr("y1",4*n.height).attr("x2",u-e5t-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),c?70:0);l.attr("viewBox",i.startx+` -25 ${u} `+(e+c)),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",e+c+25)},"draw"),i5t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:me(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:me(function(t,e,r,i){void 0===t[e]?t[e]=r:t[e]=i(r,t[e])},"updateVal"),updateBounds:me(function(i,n,a,s){let o=D().journey,l=this,c=0;function t(r){return me(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(i5t.data,"startx",i-e*o.boxMargin,Math.min),l.updateVal(i5t.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",i-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(i5t.data,"starty",n-e*o.boxMargin,Math.min),l.updateVal(i5t.data,"stopy",s+e*o.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:me(function(t,e,r,i){var n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,i),e=Math.max(e,i);this.updateVal(i5t.data,"startx",n,Math.min),this.updateVal(i5t.data,"starty",r,Math.min),this.updateVal(i5t.data,"stopx",t,Math.max),this.updateVal(i5t.data,"stopy",e,Math.max),this.updateBounds(n,r,t,e)},"insert"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return this.data},"getBounds")},n5t=t5t.sectionFills,a5t=t5t.sectionColours,s5t=me(function(t,i,e){let n=D().journey,a="",r=2*n.height+n.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of i.entries()){if(a!==d.section){l=n5t[o%n5t.length],h=o%n5t.length,c=a5t[o%a5t.length];let e=0,r=d.section;for(let t=u;t<i.length&&i[t].section==r;t++)e+=1;var p={x:u*n.taskMargin+u*n.width+e5t,y:50,text:d.section,fill:l,num:h,colour:c,taskCount:e};W4t.drawSection(t,p,n),a=d.section,o++}p=d.people.reduce((t,e)=>(J4t[e]&&(t[e]=J4t[e]),t),{}),d.x=u*n.taskMargin+u*n.width+e5t,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,W4t.drawTask(t,d,n),i5t.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),o5t={setConf:Q4t,draw:r5t}}),c5t={};lPt(c5t,{diagram:()=>h5t});var h5t,u5t,d5t,p5t=t(()=>{H4t(),V4t(),X4t(),l5t(),h5t={parser:y4t,db:I4t,renderer:o5t,styles:M4t,init:me(t=>{o5t.setConf(t.journey),I4t.clear()},"init")}}),g5t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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:me(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:me(function(t,e,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]},e(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},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:i,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,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]+)/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,me(t,"Parser"),(u5t=new((t.prototype=i).Parser=t)).parser=u5t,d5t=u5t}),f5t={};lPt(f5t,{addEvent:()=>S5t,addSection:()=>T5t,addTask:()=>_5t,addTaskOrg:()=>A5t,clear:()=>k5t,default:()=>N5t,getCommonDb:()=>w5t,getSections:()=>E5t,getTasks:()=>C5t});var m5t,y5t,v5t,x5t,b5t,w5t,k5t,T5t,E5t,C5t,_5t,S5t,A5t,L5t,N5t,I5t=t(()=>{gu(),m5t="",y5t=0,v5t=[],x5t=[],b5t=[],w5t=me(()=>rh,"getCommonDb"),k5t=me(function(){v5t.length=0,x5t.length=0,m5t="",b5t.length=0,oh()},"clear"),T5t=me(function(t){m5t=t,v5t.push(t)},"addSection"),E5t=me(function(){return v5t},"getSections"),C5t=me(function(){let t=L5t(),e=0;for(;!t&&e<100;)t=L5t(),e++;return x5t.push(...b5t),x5t},"getTasks"),_5t=me(function(t,e,r){t={id:y5t++,section:m5t,type:m5t,task:t,score:e||0,events:r?[r]:[]},b5t.push(t)},"addTask"),S5t=me(function(t){b5t.find(t=>t.id===y5t-1).events.push(t)},"addEvent"),A5t=me(function(t){t={section:m5t,type:m5t,description:t,task:t,classes:[]},x5t.push(t)},"addTaskOrg"),L5t=me(function(){let t=me(function(t){return b5t[t].processed},"compileTask"),e=!0;for(var[r,i]of b5t.entries())t(r),e=e&&i.processed;return e},"compileTasks"),N5t={clear:k5t,getCommonDb:w5t,addSection:T5t,getSections:E5t,getTasks:C5t,addTask:_5t,addTaskOrg:A5t,addEvent:S5t}});function R5t(t,o){t.each(function(){var e,r=j(this),i=r.text().split(/(\s+|<br>)/).reverse(),n=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;t<i.length;t++)e=i[i.length-1-t],n.push(e),s.text(n.join(" ").trim()),(s.node().getComputedTextLength()>o||"<br>"===e)&&(n.pop(),s.text(n.join(" ").trim()),n="<br>"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var M5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,G5t,U5t,q5t,j5t,W5t,Y5t,H5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t3t,e3t,r3t,i3t=t(()=>{function e(t,e,r,i,n,a,s,o){g(e.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+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[t]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(t,e,r,i,n,a,s,o){var l=(e=e.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(t),c(t,e,r,i,n,a,s,o),g(l,s)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}Z3(),M5t=me(function(t,e){return(t=t.append("rect")).attr("x",e.x),t.attr("y",e.y),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("width",e.width),t.attr("height",e.height),t.attr("rx",e.rx),t.attr("ry",e.ry),void 0!==e.class&&t.attr("class",e.class),t},"drawRect"),D5t=me(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(t){var e=$4().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function n(t){var e=$4().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),me(i,"smile"),me(n,"sad"),me(a,"ambivalent"),(3<r.score?i:r.score<3?n:a)(t),e},"drawFace"),O5t=me(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),P5t=me(function(t,e){var r=e.text.replace(/<br\s*\/?>/gi," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(r),t},"drawText"),B5t=me(function(t,e){function r(t,e,r,i,n){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+i-n)+" "+(t+r-1.2*n)+","+(e+i)+" "+t+","+(e+i)}me(r,"genPoints");var i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,P5t(t,e)},"drawLabel"),F5t=me(function(t,e,r){var t=t.append("g"),i=q5t();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,M5t(t,i),j5t(r)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),$5t=-1,z5t=me(function(t,e,r){var i=e.x+r.width/2,t=t.append("g");$5t++,t.append("line").attr("id","task"+$5t).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),D5t(t,{cx:i,cy:300+30*(5-e.score),score:e.score}),(i=q5t()).x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="task task-type-"+e.num,i.rx=3,i.ry=3,M5t(t,i),j5t(r)(e.task,t,i.x,i.y,i.width,i.height,{class:"task"},r,e.colour)},"drawTask"),G5t=me(function(t,e){M5t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),U5t=me(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),q5t=me(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),j5t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},W5t=me(function(t){t.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"),me(R5t,"wrap"),Y5t=me(function(t,e,r,i){var r=r%12-1,t=t.append("g"),n=(e.section=r,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(R5t,e.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),V5t(n,e,r,i),e},"drawNode"),H5t=me(function(t,e,r){var i=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(R5t,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),i.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),V5t=me(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),X5t={drawRect:M5t,drawCircle:O5t,drawSection:F5t,drawText:P5t,drawLabel:B5t,drawTask:z5t,drawBackgroundRect:G5t,getTextObj:U5t,getNoteRect:q5t,initGraphics:W5t,drawNode:Y5t,getVirtualNodeHeight:H5t}}),n3t=t(()=>{Z3(),i3t(),e(),fu(),th(),K5t=me(function(t,e,r,i){let n=D(),a=n.leftMargin??50,s=(M.debug("timeline",i.db),n.securityLevel),o,l=("sandbox"===s&&(o=j("#i"+e)),j("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),i.db.getTasks()),h=i.db.getCommonDb().getDiagramTitle();M.debug("task",c),X5t.initGraphics(l);var u,d,e=i.db.getSections();M.debug("sections",e);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(e.forEach(function(t){t={number:v,descr:t,section:v,width:150,padding:20,maxHeight:p},t=X5t.getVirtualNodeHeight(l,t,n),M.debug("sectionHeight before draw",t),p=Math.max(p,t+20)}),0),w=0;M.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=X5t.getVirtualNodeHeight(l,T,n);M.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let t=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=X5t.getVirtualNodeHeight(l,E,n)}w=Math.max(w,t)}M.debug("maxSectionHeight before draw",p),M.debug("maxTaskHeight before draw",g),e&&0<e.length?e.forEach(e=>{var t=c.filter(t=>t.section===e),r={number:v,descr:e,section:v,width:200*Math.max(t.length,1)-50,padding:20,maxHeight:p},i=(M.debug("sectionNode",r),l.append("g")),r=X5t.drawNode(i,r,v,n);M.debug("sectionNode output",r),i.attr("transform",`translate(${m}, 50)`),y+=p+50,0<t.length&&Z5t(l,t,v,m,y,g,n,b,w,p,!1),m+=200*Math.max(t.length,1),y=50,v++}):(x=!1,Z5t(l,c,v,m,y,g,n,b,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=x?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)"),Vc(void 0,l,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),Z5t=me(function(t,e,r,i,n,a,s,o,l,c,h){for(var u of e){var d={descr:u.task,section:r,number:r,width:150,padding:20,maxHeight:a},p=(M.debug("taskNode",d),t.append("g").attr("class","taskWrapper")),d=X5t.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=t.append("g").attr("class","lineWrapper"),n+=100,Q5t(t,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+(h?a:c)+l+120).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"),Q5t=me(function(t,e,r,i,n,a){let s=0,o=n;n+=100;for(var l of e){var l={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50},c=(M.debug("eventNode",l),t.append("g").attr("class","eventWrapper")),l=X5t.drawNode(c,l,r,a).height;s+=l,c.attr("transform",`translate(${i}, ${n})`),n=n+10+l}return n=o,s},"drawEvents"),J5t={setConf:me(()=>{},"setConf"),draw:K5t}}),a3t=t(()=>{mi(),t3t=me(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],Ue(e["lineColor"+t])?e["lineColor"+t]=a(e["lineColor"+t],20):e["lineColor"+t]=He(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var i=""+(17-3*t);r+=`
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} path {
fill: ${e["cScale"+t]};
}
.section-${t-1} text {
fill: ${e["cScaleLabel"+t]};
}
.node-icon-${t-1} {
font-size: 40px;
color: ${e["cScaleLabel"+t]};
}
.section-edge-${t-1}{
stroke: ${e["cScale"+t]};
}
.edge-depth-${t-1}{
stroke-width: ${i};
}
.section-${t-1} line {
stroke: ${e["cScaleInv"+t]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${e["cScaleLabel"+t]} ;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return r},"genSections"),e3t=me(t=>`
.edge {
stroke-width: 3;
}
${t3t(t)}
.section-root rect, .section-root path, .section-root circle {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`,"getStyles"),r3t=e3t}),s3t={};lPt(s3t,{diagram:()=>o3t});var o3t,l3t,c3t,h3t,u3t,d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t,E3t,C3t=t(()=>{g5t(),I5t(),n3t(),a3t(),o3t={db:f5t,renderer:J5t,parser:d5t,styles:r3t}}),_3t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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:me(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:me(function(t,e,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},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(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},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,i){switch(r){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};r.lexer=c,me(t,"Parser"),(l3t=new((t.prototype=r).Parser=t)).parser=l3t,c3t=l3t}),S3t=t(()=>{fu(),Jc(),e(),_i(),h3t=[],u3t=0,d3t={},p3t=me(()=>{h3t=[],u3t=0,d3t={}},"clear"),g3t=me(function(e){for(let t=h3t.length-1;0<=t;t--)if(h3t[t].level<e)return h3t[t];return null},"getParent"),f3t=me(()=>0<h3t.length?h3t[0]:null,"getMindmap"),m3t=me((t,e,r,i)=>{M.info("addNode",t,e,r,i);let n=D(),a=n.mindmap?.padding??mr.mindmap.padding;switch(i){case y3t.ROUNDED_RECT:case y3t.RECT:case y3t.HEXAGON:a*=2}if(e={id:u3t++,nodeId:_c(e,n),level:t,descr:_c(r,n),type:i,children:[],width:n.mindmap?.maxNodeWidth??mr.mindmap.maxNodeWidth,padding:a},r=g3t(t))r.children.push(e);else if(0!==h3t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');h3t.push(e)},"addNode"),y3t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},v3t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return y3t.RECT;case"(":return")"===e?y3t.ROUNDED_RECT:y3t.CLOUD;case"((":return y3t.CIRCLE;case")":return y3t.CLOUD;case"))":return y3t.BANG;case"{{":return y3t.HEXAGON;default:return y3t.DEFAULT}},"getType"),x3t=me((t,e)=>{d3t[t]=e},"setElementForId"),b3t=me(t=>{var e,r;t&&(e=D(),r=h3t[h3t.length-1],t.icon&&(r.icon=_c(t.icon,e)),t.class)&&(r.class=_c(t.class,e))},"decorateNode"),w3t=me(t=>{switch(t){case y3t.DEFAULT:return"no-border";case y3t.RECT:return"rect";case y3t.ROUNDED_RECT:return"rounded-rect";case y3t.CIRCLE:return"circle";case y3t.CLOUD:return"cloud";case y3t.BANG:return"bang";case y3t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),k3t=me(()=>M,"getLogger"),T3t=me(t=>d3t[t],"getElementById"),E3t={clear:p3t,addNode:m3t,getMindmap:f3t,nodeType:y3t,getType:v3t,setElementForId:x3t,decorateNode:b3t,type2Str:w3t,getLogger:k3t,getElementById:T3t}});function A3t(t){return(A3t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L3t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N3t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function I3t(t,e,r){return e&&N3t(t.prototype,e),r&&N3t(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function R3t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M3t(t,e){return P3t(t)||F3t(t,e)||$3t(t,e)||U3t()}function D3t(t){return O3t(t)||B3t(t)||$3t(t)||G3t()}function O3t(t){if(Array.isArray(t))return z3t(t)}function P3t(t){if(Array.isArray(t))return t}function B3t(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function F3t(t,e){var r=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,a=[],s=!0,o=!1;try{for(r=r.call(t);!(s=(i=r.next()).done)&&(a.push(i.value),!e||a.length!==e);s=!0);}catch(t){o=!0,n=t}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return a}}function $3t(t,e){var r;if(t)return"string"==typeof t?z3t(t,e):"Map"===(r="Object"===(r=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z3t(t,e):void 0}function z3t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function G3t(){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 U3t(){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 q3t(t,e){var r,i,n,a,s=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(r=!0),{s:me(function(){s=s.call(t)},"s"),n:me(function(){var t=s.next();return r=t.done,t},"n"),e:me(function(t){i=!0,n=t},"e"),f:me(function(){try{r||null==s.return||s.return()}finally{if(i)throw n}},"f")};if(Array.isArray(t)||(s=$3t(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),a=0,{s:e=me(function(){},"F"),n:me(function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:me(function(t){throw t},"e"),f:e};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j3t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function W3t(t,e){return t(e={exports:{}},e.exports),e.exports}function Y3t(t){for(var e=t.length;e--&&wTt.test(t.charAt(e)););return e}function H3t(t){return t&&t.slice(0,kTt(t)+1).replace(TTt,"")}function V3t(t){var e=CTt.call(t,STt),r=t[STt];try{var i=!(t[STt]=void 0)}catch{}var n=_Tt.call(t);return i&&(e?t[STt]=r:delete t[STt]),n}function X3t(t){return LTt.call(t)}function K3t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(ITt&&ITt in Object(t)?ATt:NTt)(t)}function Z3t(t){return null!=t&&"object"==typeof t}function Q3t(t){return"symbol"==typeof t||MTt(t)&&"[object Symbol]"==RTt(t)}function J3t(t){if("number"==typeof t)return t;if(DTt(t))return OTt;if(yTt(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=yTt(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=ETt(t);var e=BTt.test(t);return e||FTt.test(t)?$Tt(t.slice(2),e?2:8):PTt.test(t)?OTt:+t}function t6t(i,r,t){var n,a,s,o,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function p(t){var e=n,r=a;return n=a=void 0,h=t,o=i.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?UTt(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=bTt();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&n?p(t):(n=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),n=c=a=l=void(h=0)}function b(){return void 0===l?o:v(bTt())}function w(){var t=bTt(),e=m(t);if(n=arguments,a=this,c=t,e){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),o}return r=zTt(r)||0,yTt(t)&&(e=!!t.leading,u="maxWait"in t,s=u?GTt(zTt(t.maxWait)||0,r):s,d="trailing"in t?!!t.trailing:d),me(p,"invokeFunc"),me(g,"leadingEdge"),me(f,"remainingWait"),me(m,"shouldInvoke"),me(y,"timerExpired"),me(v,"trailingEdge"),me(x,"cancel"),me(b,"flush"),me(w,"debounced"),w.cancel=x,w.flush=b,w}function e6t(t,e,r,i,n,a){var s=Bkt(t)?t:gEt[t]||gEt.euclidean;return 0===e&&Bkt(t)?s(n,a):s(e,r,i,n,a)}function r6t(t,e){var r;return!tCt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!DTt(t))||rCt.test(t)||!eCt.test(t)||null!=e&&t in Object(e))}function i6t(t){return!!yTt(t)&&("[object Function]"==(t=RTt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function n6t(t){return!!aCt&&aCt in t}function a6t(t){if(null!=t){try{return oCt.call(t)}catch{}try{return t+""}catch{}}return""}function s6t(t){return!(!yTt(t)||sCt(t))&&(nCt(t)?hCt:cCt).test(lCt(t))}function o6t(t,e){return t?.[e]}function l6t(t,e){return t=dCt(t,e),uCt(t)?t:void 0}function c6t(){this.__data__=gCt?gCt(null):{},this.size=0}function h6t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function u6t(t){var e,r=this.__data__;return gCt?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:fCt.call(r,t)?r[t]:void 0}function d6t(t){var e=this.__data__;return gCt?void 0!==e[t]:mCt.call(e,t)}function p6t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gCt&&void 0===e?"__lodash_hash_undefined__":e,this}function g6t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function f6t(){this.__data__=[],this.size=0}function m6t(t,e){return t===e||t!=t&&e!=e}function y6t(t,e){for(var r=t.length;r--;)if(vCt(t[r][0],e))return r;return-1}function v6t(t){var e=this.__data__;return!((t=xCt(e,t))<0||(t==e.length-1?e.pop():bCt.call(e,t,1),--this.size,0))}function x6t(t){var e=this.__data__;return(t=xCt(e,t))<0?void 0:e[t][1]}function b6t(t){return-1<xCt(this.__data__,t)}function w6t(t,e){var r=this.__data__,i=xCt(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function k6t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function T6t(){this.size=0,this.__data__={hash:new yCt,map:new(kCt||wCt),string:new yCt}}function E6t(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function C6t(t,e){return t=t.__data__,TCt(e)?t["string"==typeof e?"string":"hash"]:t.map}function _6t(t){return t=ECt(this,t).delete(t),this.size-=t?1:0,t}function S6t(t){return ECt(this,t).get(t)}function A6t(t){return ECt(this,t).has(t)}function L6t(t,e){var r=ECt(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function N6t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function I6t(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(_Ct);var a=me(function(){var t=arguments,e=n?n.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=i.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(I6t.Cache||CCt),a}function R6t(t){var e=(t=SCt(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}function M6t(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}function D6t(t){var e;return"string"==typeof t?t:tCt(t)?ICt(t,D6t)+"":DTt(t)?MCt?MCt.call(t):"":"0"==(e=t+"")&&1/t==-RCt?"-0":e}function O6t(t){return null==t?"":DCt(t)}function P6t(t,e){return tCt(t)?t:iCt(t,e)?[t]:NCt(OCt(t))}function B6t(t){var e;return"string"==typeof t||DTt(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}function F6t(t,e){for(var r=0,i=(e=PCt(e,t)).length;null!=t&&r<i;)t=t[BCt(e[r++])];return r&&r==i?t:void 0}function $6t(t,e,r){return void 0===(t=null==t?void 0:FCt(t,e))?r:t}function z6t(t,e,r){"__proto__"==e&&zCt?zCt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function G6t(t,e,r){var i=t[e];UCt.call(t,e)&&vCt(i,r)&&(void 0!==r||e in t)||GCt(t,e,r)}function U6t(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&jCt.test(t))&&-1<t&&t%1==0&&t<e}function q6t(t,e,r,i){if(yTt(t))for(var n=-1,a=(e=PCt(e,t)).length,s=a-1,o=t;null!=o&&++n<a;){var l,c=BCt(e[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=yTt(l)?l:WCt(e[n+1])?[]:{}),qCt(o,c,h),o=o[c]}return t}function j6t(t,e,r){return null==t?t:YCt(t,e,r)}function W6t(t,e){var r=-1,i=t.length;for(e=e||Array(i);++r<i;)e[r]=t[r];return e}function Y6t(t){return tCt(t)?ICt(t,BCt):DTt(t)?[t]:VCt(NCt(OCt(t)))}function H6t(t,e,r,i){for(var n=[],a=new L7t,s=t.cy().hasCompoundNodes(),o=0;o<t.length;o++){var l=t[o];r?n.push(l):s&&i(n,a,l)}for(;0<n.length;){var c=n.shift();e(c),a.add(c.id()),s&&i(n,a,c)}return t}function V6t(t,e,r){if(r.isParent())for(var i=r._private.children,n=0;n<i.length;n++){var a=i[n];e.has(a.id())||t.push(a)}}function X6t(t,e,r){r.isChild()&&(r=r._private.parent,e.has(r.id())||t.push(r))}function K6t(t,e,r){X6t(t,e,r),V6t(t,e,r)}function Z6t(s){return function(t){if(void 0===t&&(t=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var e=0,r=this[0],i=r._private.edges,n=0;n<i.length;n++){var a=i[n];!t&&a.isLoop()||(e+=s(r,a))}return e}}}function Q6t(a,s){return function(t){for(var e,r=this.nodes(),i=0;i<r.length;i++){var n=r[i][a](t);void 0===n||void 0!==e&&!s(n,e)||(e=n)}return e}}function J6t(){return!1}function twt(){return!0}function ewt(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:G_t,e=1<arguments.length?arguments[1]:void 0,r=0;r<z_t.length;r++){var i=z_t[r];this[i]=t[i]||$_t[i]}this.context=e||this.context,this.listeners=[],this.emitting=0}function rwt(t,e,r){var i,n=r._private;return null==(i=(n=n.styleCache=n.styleCache||[])[t])?n[t]=e(r):i}function iwt(e,r){return e=r7t(e),me(function(t){return rwt(e,r,t)},"cachedStyleFunction")}function nwt(e,r){e=r7t(e);var i=me(function(t){return r.call(t)},"selfFn");return me(function(){var t=this[0];if(t)return rwt(e,i,t)},"cachedPrototypeStyleFunction")}function awt(t,e){var r=t._private.data.parent?t.parents():null;if(r)for(var i=0;i<r.length;i++)if(!e(r[i]))return!1;return!0}function swt(t){var i=t.ok,n=t.edgeOkViaNode||t.ok,a=t.parentOk||t.ok;return function(){var t,e,r=this.cy();return!r.styleEnabled()||(t=this[0],r=r.hasCompoundNodes(),t?(e=t._private,!!i(t)&&(t.isNode()?!r||awt(t,a):(t=e.source,e=e.target,n(t)&&(!r||awt(t,n))&&(t===e||n(e)&&(!r||awt(e,n)))))):void 0)}}function owt(l){return function(){var t=[];if(2===(e=arguments).length)this.on(l.event,e[0],e[1]);else if(1===e.length&&Bkt(e[0]))this.on(l.event,e[0]);else if(0===e.length||1===e.length&&Fkt(e[0])){for(var e=1===e.length?e[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)&&t.push(i)}var o=this.spawn(t);o.updateStyle(),o.emit(l.event),e&&o.emit(e)}return this}}function lwt(r){Z_t[r.field]=function(){var t=this[0];if(t){if(r.overrideField){var e=r.overrideField(t);if(void 0!==e)return e}return t._private[r.field]}},Z_t[r.on]=owt({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Z_t[r.off]=owt({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function cwt(n){return me(function(t){for(var e=[],r=0;r<this.length;r++){var i=this[r]._private[n.attr];i&&e.push(i)}return this.spawn(e,!0).filter(t)},"sourceImpl")}function hwt(h){return me(function(t){var e=[],r=this._private.cy,i=h||{};Pkt(t)&&(t=r.$(t));for(var n=0;n<t.length;n++)for(var a=t[n]._private.edges,s=0;s<a.length;s++){var o=a[s],l=o._private.data,c=this.hasElementWithId(l.source)&&t.hasElementWithId(l.target),l=t.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!c&&!l||(i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!c||i.thisIsTgt&&!l)||e.push(o)}return this.spawn(e,!0)},"edgesWithImpl")}function uwt(f){return f=lTt({},{codirected:!1},f),me(function(t){for(var e=[],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))&&e.push(u)}return this.spawn(e,!0).filter(t)},"parallelEdgesImpl")}function dwt(s,e,o,r){var t=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(t?Float32Array:Array)(11);function n(t,e){return 1-3*e+3*t}function l(t,e,r){return((n(e,r)*t+(3*r-6*e))*t+3*e)*t}function c(t,e,r){return 3*n(e,r)*t*t+2*(3*r-6*e)*t+3*e}function h(t,e){for(var r=0;r<4;++r){var i=c(e,s,o);if(0===i)return e;e-=(l(e,s,o)-t)/i}return e}function u(){for(var t=0;t<11;++t)a[t]=l(.1*t,s,o)}function d(t,e,r){for(var i,n,a=0;0<(i=l(n=e+(r-e)/2,s,o)-t)?r=n:e=n,1e-7<Math.abs(i)&&++a<10;);return n}function p(t){for(var e=0,r=1;10!==r&&a[r]<=t;++r)e+=.1;var i=e+(t-a[--r])/(a[r+1]-a[r])*.1,n=c(i,s,o);return.001<=n?h(t,i):0===n?i:d(t,e,e+.1)}me(n,"A"),me(function(t,e){return 3*e-6*t},"B"),me(function(t){return 3*t},"C"),me(l,"calcBezier"),me(c,"getSlope"),me(h,"newtonRaphsonIterate"),me(u,"calcSampleValues"),me(d,"binarySubdivide"),me(p,"getTForX");var g=!1;function f(){g=!0,s===e&&o===r||u()}me(f,"precompute"),(t=me(function(t){return g||f(),s===e&&o===r?t:0===t?0:1===t?1:l(p(t),e,r)},"f")).getControlPoints=function(){return[{x:s,y:e},{x:o,y:r}]};var m="generateBezier("+[s,e,o,r]+")";return t.toString=function(){return m},t}function pwt(t,e,r,i,n){return 1===i||e===r?r:(n=n(e,r,i),null!=t&&((t.roundValue||t.color)&&(n=Math.round(n)),void 0!==t.min&&(n=Math.max(n,t.min)),void 0!==t.max)?Math.min(n,t.max):n)}function gwt(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function fwt(t,e,r,i,n){var a=null!=n?n.type:null,s=(r<0?r=0:1<r&&(r=1),gwt(t,n)),o=gwt(e,n);if(at(s)&&at(o))return pwt(a,s,o,r,i);if(Fkt(s)&&Fkt(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];null!=h&&null!=u?(h=pwt(a,h,u,r,i),l.push(h)):l.push(u)}return l}}function mwt(t,e,r,i){var n=!i,a=t._private,s=e._private,e=s.easing,o=s.startTime,l=(i?t:t.cy()).style(),c=(s.easingImpl||(null==e?s.easingImpl=eSt.linear:(e=Pkt(e)?l.parse("transition-timing-function",e).value:e,0<(e=Pkt(e)?(u=e,[]):(u=e[1],e.slice(2).map(function(t){return+t}))).length?("spring"===u&&e.push(s.duration),s.easingImpl=eSt[u].apply(null,e)):s.easingImpl=eSt[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 e=s.startPosition,o=((u=s.position)&&n&&!t.locked()&&(r={},ywt(e.x,u.x)&&(r.x=fwt(e.x,u.x,h,c)),ywt(e.y,u.y)&&(r.y=fwt(e.y,u.y,h,c)),t.position(r)),s.startPan),e=s.pan,u=a.pan,u=((r=null!=e&&i)&&(ywt(o.x,e.x)&&(u.x=fwt(o.x,e.x,h,c)),ywt(o.y,e.y)&&(u.y=fwt(o.y,e.y,h,c)),t.emit("pan")),s.startZoom),d=((e=null!=(o=s.zoom)&&i)&&(ywt(u,o)&&(a.zoom=i8t(a.minZoom,fwt(u,o,h,c),a.maxZoom)),t.emit("zoom")),(r||e)&&t.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=fwt(f,m,h,c,l.properties[f.name]);l.overrideBypass(t,g,m)}t.emit("style")}}return s.progress=h}function ywt(t,e){return!(null==t||null==e||!(at(t)&&at(e)||t&&e))}function vwt(t,e,r,i){(e=e._private).started=!0,e.startTime=r-e.progress*e.duration}function xwt(h,t){var e=t._private.aniEles,u=[];function r(t,e){var r,i=(n=t._private).animation.current,n=n.animation.queue,a=!1;0===i.length&&(r=n.shift())&&i.push(r);for(var s=me(function(t){for(var e=t.length-1;0<=e;e--)(0,t[e])();t.splice(0,t.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||vwt(0,l,h),mwt(t,l,h,e),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 e||0!==i.length||0!==n.length||u.push(t),a}me(r,"stepOne");for(var i=!1,n=0;n<e.length;n++)var a=r(e[n]),i=i||a;var s=r(t,!0);(i||s)&&(0<e.length?t.notify("draw",e):t.notify("draw")),e.unmerge(u),t.emit("step")}function bwt(t){this.options=lTt({},hSt,uSt,t)}function wwt(t){this.options=lTt({},gSt,t)}function kwt(t){this.options=lTt({},fSt,t)}function Twt(t){this.options=lTt({},ySt,t);var n=(this.options.layout=this).options.eles.nodes(),t=this.options.eles.edges().filter(function(t){var e=t.source().data("id"),r=t.target().data("id"),t=n.some(function(t){return t.data("id")===e}),i=n.some(function(t){return t.data("id")===r});return!t||!i});this.options.eles=this.options.eles.not(t)}function Ewt(t){this.options=lTt({},BSt,t)}function Cwt(t){this.options=lTt({},FSt,t)}function _wt(t){this.options=lTt({},$St,t)}function Swt(t){this.options=lTt({},zSt,t)}function Awt(t){this.options=t,this.notifications=0}function Lwt(t,e){0===e.radius?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Nwt(t,e,r,i){return 0===i||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(sAt(t,e,r,i,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:USt,cy:qSt,radius:XSt,startX:JSt,startY:tAt,stopX:eAt,stopY:rAt,startAngle:jSt.ang+Math.PI/2*YSt,endAngle:WSt.ang-Math.PI/2*YSt,counterClockwise:HSt})}function Iwt(t){var e=[];if(null!=t){for(var r=0;r<t.length;r+=2)e.push({x:t[r],y:t[r+1]});return e}}function Rwt(t,e,r){for(var i=me(function(t,e,r,i){return t8t(t,e,r,i)},"qbezierAt$1"),n=e._private.rstyle.bezierPts,a=0;a<t.bezierProjPcts.length;a++){var s=t.bezierProjPcts[a];n.push({x:i(r[0],r[2],r[4],s),y:i(r[1],r[3],r[5],s)})}}function Mwt(t,e){for(var r=0;r<e.length;r++){var i=e[r];t.lineTo(i.x,i.y)}}function Dwt(t,e,r){for(var i,n=0;n<e.length;n++){var a=e[n];0===n&&(i=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,i.x,i.y)}function Owt(t,e,r){t.beginPath&&t.beginPath();for(var i=e,n=0;n<i.length;n++){var a=i[n];t.lineTo(a.x,a.y)}var s=r,e=r[0];for(t.moveTo(e.x,e.y),n=1;n<s.length;n++)a=s[n],t.lineTo(a.x,a.y);t.closePath&&t.closePath()}function Pwt(t,e,r,i,n){t.beginPath&&t.beginPath(),t.arc(r,i,n,0,2*Math.PI,!1);var a=e,r=a[0];t.moveTo(r.x,r.y);for(var s=0;s<a.length;s++){var o=a[s];t.lineTo(o.x,o.y)}t.closePath&&t.closePath()}function Bwt(t,e,r,i){t.arc(e,r,i,0,2*Math.PI,!1)}function Fwt(t,e,r,i,n){var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,s=6<arguments.length?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+i-a,r),t.quadraticCurveTo(e+i,r,e+i,r+a),t.lineTo(e+i,r+n-a),t.quadraticCurveTo(e+i,r+n,e+i-a,r+n),t.lineTo(e+a,r+n),t.quadraticCurveTo(e,r+n,e,r+n-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),s?t.stroke():t.fill()}function $wt(t,e,r){if(e=t.createShader(e),t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS))return e;throw new Error(t.getShaderInfoLog(e))}function zwt(t,e,r){var e=$wt(t,t.VERTEX_SHADER,e),r=$wt(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,e),t.attachShader(i,r),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS))return i;throw new Error("Could not initialize shaders")}function Gwt(t,e,r){var i=t.makeOffscreenCanvas(e,r=void 0===r?e:r),n=i.context=i.getContext("2d");return i.clear=function(){return n.clearRect(0,0,i.width,i.height)},i.clear(),i}function Uwt(t){var e=t.pixelRatio;return{zoom:t.cy.zoom()*e,pan:{x:(t=t.cy.pan()).x*e,y:t.y*e}}}function qwt(t,e,r,i,n){return i=i*r+e.x,n=n*r+e.y,[i,Math.round(t.canvasHeight-n)]}function jwt(t,e,r){var i=t[0]/255,n=t[1]/255,t=t[2]/255;return(r=r||new Array(4))[0]=i*e,r[1]=n*e,r[2]=t*e,r[3]=e,r}function Wwt(t,e){return(e=e||new Array(4))[0]=(t>>0&255)/255,e[1]=(t>>8&255)/255,e[2]=(t>>16&255)/255,e[3]=(t>>24&255)/255,e}function Ywt(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Hwt(e,t){var r=e.createTexture();return r.buffer=function(t){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function Vwt(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function Xwt(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Kwt(t,e,r,i,n,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*i,n);case t.INT:return new Int32Array(r.buffer,a*i,n)}}function Zwt(t,e,r,i){var n=(e=M3t(Vwt(t,e),2))[0],i=Xwt(t,e=e[1],i),a=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW),e===t.FLOAT?t.vertexAttribPointer(r,n,e,!1,0,0):e===t.INT&&t.vertexAttribIPointer(r,n,e,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),a}function Qwt(e,t,r,i){var n=(r=M3t(Vwt(e,r),3))[0],a=r[1],r=r[2],s=Xwt(e,a,t*n),o=n*r,l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,t*o,e.DYNAMIC_DRAW),e.enableVertexAttribArray(i),a===e.FLOAT?e.vertexAttribPointer(i,n,a,!1,o,0):a===e.INT&&e.vertexAttribIPointer(i,n,a,o,0),e.vertexAttribDivisor(i,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var c=new Array(t),h=0;h<t;h++)c[h]=Kwt(e,a,s,o,n,h);return l.dataArray=s,l.stride=o,l.size=n,l.getView=function(t){return c[t]},l.setPoint=function(t,e,r){(t=c[t])[0]=e,t[1]=r},l.bufferSubData=function(t){e.bindBuffer(e.ARRAY_BUFFER,l),t?e.bufferSubData(e.ARRAY_BUFFER,0,s,0,t*n):e.bufferSubData(e.ARRAY_BUFFER,0,s)},l}function Jwt(r){var t=r.createFramebuffer(),i=(r.bindFramebuffer(r.FRAMEBUFFER,t),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),t.setFramebufferAttachmentSizes=function(t,e){r.bindTexture(r.TEXTURE_2D,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,t,e,0,r.RGBA,r.UNSIGNED_BYTE,null)},t}function tkt(){var t=new FAt(9);return FAt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ekt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function rkt(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],e=e[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 t[0]=u*i+d*s+p*c,t[1]=u*n+d*o+p*h,t[2]=u*a+d*l+p*e,t[3]=g*i+f*s+m*c,t[4]=g*n+f*o+m*h,t[5]=g*a+f*l+m*e,t[6]=y*i+v*s+r*c,t[7]=y*n+v*o+r*h,t[8]=y*a+v*l+r*e,t}function ikt(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],e=e[8],u=r[0],r=r[1];return t[0]=i,t[1]=n,t[2]=a,t[3]=s,t[4]=o,t[5]=l,t[6]=u*i+r*s+c,t[7]=u*n+r*o+h,t[8]=u*a+r*l+e,t}function nkt(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],e=e[8],u=Math.sin(r),r=Math.cos(r);return t[0]=r*i+u*s,t[1]=r*n+u*o,t[2]=r*a+u*l,t[3]=r*s-u*i,t[4]=r*o-u*n,t[5]=r*l-u*a,t[6]=c,t[7]=h,t[8]=e,t}function akt(t,e,r){var i=r[0],r=r[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function skt(t,e,r){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function okt(t,e){return t.intersection?t.intersection(e):new Set(D3t(t).filter(function(t){return e.has(t)}))}function lkt(t,e){return"rgba(".concat(t[0],", ").concat(t[1],", ").concat(t[2],", ").concat(e,")")}function ckt(t){return t=t&&t.style&&t.style.backgroundColor||"white",pTt(t)}function hkt(n){var r=n.render,e=(n.render=function(t){t=t||{};var e=n.cy;n.webgl&&(7.99<e.zoom()?(ukt(n),r.call(n,t)):(dkt(n),bkt(n,t,$At.SCREEN)))},n.matchCanvasSize),t=(n.matchCanvasSize=function(t){e.call(n,t),n.pickingFrameBuffer.setFramebufferAttachmentSizes(n.canvasWidth,n.canvasHeight),n.pickingFrameBuffer.needsDraw=!0},n.findNearestElements=function(t,e,r,i){return xkt(n,t,e)},n.invalidateCachedZSortedEles),i=(n.invalidateCachedZSortedEles=function(){t.call(n),n.pickingFrameBuffer.needsDraw=!0},n.notify);n.notify=function(t,e){i.call(n,t,e),"viewport"===t||"bounds"===t?n.pickingFrameBuffer.needsDraw=!0:"background"===t&&n.eleDrawing.invalidate(e,{type:"node-body"})}}function ukt(t){(t=t.data.contexts[t.WEBGL]).clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function dkt(e){var t=me(function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()},"clear");t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function pkt(t){var e=t.canvasWidth,r=t.canvasHeight,i=(t=Uwt(t)).pan,t=t.zoom,n=tkt();return ikt(n,n,[i.x,i.y]),akt(n,n,[t,t]),skt(i=tkt(),e,r),rkt(t=tkt(),i,n),t}function gkt(t,e){var r=t.canvasWidth,i=t.canvasHeight,n=(t=Uwt(t)).pan,t=t.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,i),e.translate(n.x,n.y),e.scale(t,t)}function fkt(e,t){e.drawSelectionRectangle(t,function(t){return gkt(e,t)})}function mkt(t){var e=t.data.contexts[t.NODE];e.save(),gkt(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function ykt(u){var t=me(function(t,e,r){for(var t=t.atlasManager.getRenderTypeOpts(e),i=u.data.contexts[u.NODE],n=t.atlasCollection.atlases,a=0;a<n.length;a++){var s=n[a].canvas,o=s.width,l=s.height,c=o*a,h=s.height*r;i.save(),i.scale(.125,.125),i.drawImage(s,c,h),i.strokeStyle="black",i.rect(c,h,o,l),i.stroke(),i.restore()}},"draw");t(u.eleDrawing,"node-body",0),t(u.eleDrawing,"node-label",1)}function vkt(t,e,r,i,n){var a,s,o,l=(c=Uwt(t)).pan,c=c.zoom;if(n=void 0===i||void 0===n?(a=(s=M3t(qwt(t,l,c,e,r),2))[0]-3,s=s[1]-3,o=6):(r=(e=M3t(qwt(t,l,c,e,r),2))[0],e=e[1],c=(l=M3t(qwt(t,l,c,i,n),2))[0],a=r,s=i=l[1],o=Math.abs(c-r),Math.abs(i-e)),0===o||0===n)return[];(l=t.data.contexts[t.WEBGL]).bindFramebuffer(l.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(l.viewport(0,0,l.canvas.width,l.canvas.height),bkt(t,null,$At.PICKING),t.pickingFrameBuffer.needsDraw=!1);var h=o*n,u=new Uint8Array(4*h);l.readPixels(a,s,o,n,l.RGBA,l.UNSIGNED_BYTE,u),l.bindFramebuffer(l.FRAMEBUFFER,null);for(var d=new Set,p=0;p<h;p++){var g=Ywt(u.slice(4*p,4*p+4))-1;0<=g&&d.add(g)}return d}function xkt(t,e,r){var i,n,a,e=vkt(t,e,r),s=t.getCachedZSortedEles(),o=q3t(e);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(t){o.e(t)}finally{o.f()}return[i,n].filter(Boolean)}function bkt(t,e,r){t.webglDebug&&(n=[],i=performance.now());var i,n,a=t.eleDrawing,s=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&fkt(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=me(function(t,e){e+=1,t.isNode()?(a.drawTexture(t,e,"node-underlay"),a.drawTexture(t,e,"node-body"),a.drawTexture(t,e,"node-label"),a.drawTexture(t,e,"node-overlay")):(a.drawEdgeLine(t,e),a.drawEdgeArrow(t,e,"source"),a.drawEdgeArrow(t,e,"target"),a.drawTexture(t,e,"edge-label"))},"draw"),e=t.data.contexts[t.WEBGL],e=(r.screen?(e.clearColor(0,0,0,0),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)):e.disable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.viewport(0,0,e.canvas.width,e.canvas.height),pkt(t)),l=t.getCachedZSortedEles(),s=l.length;if(a.startFrame(e,n,r),r.screen){for(var c=0;c<l.nondrag.length;c++)o(l.nondrag[c],c);for(var h=0;h<l.drag.length;h++)o(l.drag[h],-1)}else if(r.picking)for(var u=0;u<l.length;u++)o(l[u],u);a.endFrame(),t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,a.gc()),r.screen&&t.webglDebugShowAtlases&&(mkt(t),ykt(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var d,e=performance.now(),p=0,g=0,f=q3t(n);try{for(f.s();!(d=f.n()).done;)p++,g+=d.value.count}catch(t){f.e(t)}finally{f.f()}Math.ceil(e-i),t="".concat(s," elements, ").concat(g," rectangles, ").concat(p," batches"),console.log("WebGL (".concat(r.name,") - ").concat(t))}}function wkt(t,e){for(var r=atob(t),t=new ArrayBuffer(r.length),i=new Uint8Array(t),n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return new Blob([t],{type:e})}function kkt(t){var e=t.indexOf(",");return t.substr(e+1)}function Tkt(t,i,n){var e=me(function(){return i.toDataURL(n,t.quality)},"getB64Uri");switch(t.output){case"blob-promise":return new QEt(function(e,r){try{i.toBlob(function(t){null!=t?e(t):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},n,t.quality)}catch(t){r(t)}});case"blob":return wkt(kkt(e()),n);case"base64":return kkt(e());default:return e()}}function Ekt(t){var a=this,e=a.cy.window().document,r=(t.webgl&&(i9t.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(i9t.CANVAS_LAYERS),contexts:new Array(i9t.CANVAS_LAYERS),canvasNeedsRedraw:new Array(i9t.CANVAS_LAYERS),bufferCanvases:new Array(i9t.BUFFER_COUNT),bufferContexts:new Array(i9t.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),i="rgba(0,0,0,0)",n=(a.data.canvasContainer=e.createElement("div"),a.data.canvasContainer.style),s=(a.data.canvasContainer.style[r]=i,n.position="relative",n.zIndex="0",n.overflow="hidden",(n=t.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"});Jkt()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<i9t.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=e.createElement("canvas"),c=i9t.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(c),a.data.contexts[o]||p7t("Could not create canvas of type "+c),Object.keys(s).forEach(function(t){l.style[t]=s[t]}),l.style.position="absolute",l.setAttribute("data-id","layer"+o),l.style.zIndex=String(i9t.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[i9t.NODE].setAttribute("data-id","layer"+i9t.NODE+"-node"),a.data.canvases[i9t.SELECT_BOX].setAttribute("data-id","layer"+i9t.SELECT_BOX+"-selectbox"),a.data.canvases[i9t.DRAG].setAttribute("data-id","layer"+i9t.DRAG+"-drag"),a.data.canvases[i9t.WEBGL]&&a.data.canvases[i9t.WEBGL].setAttribute("data-id","layer"+i9t.WEBGL+"-webgl"),o=0;o<i9t.BUFFER_COUNT;o++)a.data.bufferCanvases[o]=e.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=n8t(),u=me(function(t){return{x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2}},"getBoxCenter"),d=me(function(t){return{x:-t.w/2,y:-t.h/2}},"getCenterOffset"),n=me(function(t){return!((t=t[0]._private).oldBackgroundTimestamp===t.backgroundTimestamp)},"backgroundTimestampHasChanged"),r=me(function(t){return t[0]._private.nodeKey},"getStyleKey"),i=me(function(t){return t[0]._private.labelStyleKey},"getLabelKey"),p=me(function(t){return t[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),g=me(function(t){return t[0]._private.targetLabelStyleKey},"getTargetLabelKey"),f=me(function(t,e,r,i,n){return a.drawElement(t,e,r,!1,!1,n)},"drawElement"),m=me(function(t,e,r,i,n){return a.drawElementText(t,e,r,i,"main",n)},"drawLabel"),y=me(function(t,e,r,i,n){return a.drawElementText(t,e,r,i,"source",n)},"drawSourceLabel"),v=me(function(t,e,r,i,n){return a.drawElementText(t,e,r,i,"target",n)},"drawTargetLabel"),x=me(function(t){return t.boundingBox(),t[0]._private.bodyBounds},"getElementBox"),b=me(function(t){return t.boundingBox(),t[0]._private.labelBounds.main||h},"getLabelBox"),w=me(function(t){return t.boundingBox(),t[0]._private.labelBounds.source||h},"getSourceLabelBox"),k=me(function(t){return t.boundingBox(),t[0]._private.labelBounds.target||h},"getTargetLabelBox"),T=me(function(t,e){return e},"isLabelVisibleAtScale"),E=me(function(t){return u(x(t))},"getElementRotationPoint"),C=me(function(t,e,r){return{x:e.x+r.pstyle((t=t?t+"-":"")+"text-margin-x").pfValue,y:e.y+r.pstyle(t+"text-margin-y").pfValue}},"addTextMargin"),_=me(function(t,e,r){return{x:(t=t[0]._private.rscratch)[e],y:t[r]}},"getRsPt"),S=me(function(t){return C("",_(t,"labelX","labelY"),t)},"getLabelRotationPoint"),A=me(function(t){return C("source",_(t,"sourceLabelX","sourceLabelY"),t)},"getSourceLabelRotationPoint"),P=me(function(t){return C("target",_(t,"targetLabelX","targetLabelY"),t)},"getTargetLabelRotationPoint"),L=me(function(t){return d(x(t))},"getElementRotationOffset"),B=me(function(t){return d(w(t))},"getSourceLabelRotationOffset"),F=me(function(t){return d(k(t))},"getTargetLabelRotationOffset"),N=me(function(t){var e=b(t),r=d(b(t));if(t.isNode()){switch(t.pstyle("text-halign").value){case"left":r.x=-e.w-(e.leftPad||0);break;case"right":r.x=-(e.rightPad||0)}switch(t.pstyle("text-valign").value){case"top":r.y=-e.h-(e.topPad||0);break;case"bottom":r.y=-(e.botPad||0)}}return r},"getLabelRotationOffset"),I=a.data.eleTxrCache=new vAt(a,{getKey:r,doesEleInvalidateKey:n,drawElement:f,getBoundingBox:x,getRotationPoint:E,getRotationOffset:L,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),R=a.data.lblTxrCache=new vAt(a,{getKey:i,drawElement:m,getBoundingBox:b,getRotationPoint:S,getRotationOffset:N,isVisible:T}),M=a.data.slbTxrCache=new vAt(a,{getKey:p,drawElement:y,getBoundingBox:w,getRotationPoint:A,getRotationOffset:B,isVisible:T}),D=a.data.tlbTxrCache=new vAt(a,{getKey:g,drawElement:v,getBoundingBox:k,getRotationPoint:P,getRotationOffset:F,isVisible:T}),O=a.data.lyrTxrCache=new xAt(a),n=(a.onUpdateEleCalcs(me(function(t,e){I.invalidateElements(e),R.invalidateElements(e),M.invalidateElements(e),D.invalidateElements(e),O.invalidateElements(e);for(var r=0;r<e.length;r++){var i=e[r]._private;i.oldBackgroundTimestamp=i.backgroundTimestamp}},"invalidateTextureCaches")),me(function(t){for(var e=0;e<t.length;e++)O.enqueueElementRefinement(t[e].ele)},"refineInLayers"));I.onDequeue(n),R.onDequeue(n),M.onDequeue(n),D.onDequeue(n),t.webgl&&a.initWebgl(t,{getStyleKey:r,getLabelKey:i,drawElement:f,drawLabel:m,getElementBox:x,getLabelBox:b,getElementRotationPoint:E,getElementRotationOffset:L,getLabelRotationPoint:S,getLabelRotationOffset:N})}function Ckt(e,r,i){var t=i,n=me(function(t){f7t("Can not register `"+r+"` for `"+e+"` since `"+t+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===e){if(lSt.prototype[r])return n(r);lSt.prototype[r]=i}else if("collection"===e){if(Q_t.prototype[r])return n(r);Q_t.prototype[r]=i}else if("layout"===e){for(var a=(g=me(function(t){this.options=t,i.call(this,t),$kt(this._private)||(this._private={}),this._private.cy=t.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 t=this.options;if(t&&t.animate){var e=this.animations;if(e)for(var r=0;r<e.length;r++)e[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},me(function(t){return t._private.cy},"getCy")),u={addEventFields:me(function(t,e){e.layout=t,e.cy=h(t),e.target=t},"addEventFields"),bubble:me(function(){return!0},"bubble"),parent:me(function(t){return h(t)},"parent")};lTt(a,{createEmitter:me(function(){return this._private.emitter=new ewt(u,this),this},"createEmitter"),emitter:me(function(){return this._private.emitter},"emitter"),on:me(function(t,e){return this.emitter().on(t,e),this},"on"),one:me(function(t,e){return this.emitter().one(t,e),this},"one"),once:me(function(t,e){return this.emitter().one(t,e),this},"once"),removeListener:me(function(t,e){return this.emitter().removeListener(t,e),this},"removeListener"),removeAllListeners:me(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:me(function(t,e){return this.emitter().emit(t,e),this},"emit")}),KCt.eventAliasesOn(a),t=g}else if("renderer"===e&&"null"!==r&&"base"!==r){var d,p,g,f=_kt("renderer","base"),m=f.prototype,y=i,v=i.prototype,x=(g=me(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var b=m[d];if(null!=v[d])return n(d);x[d]=b}for(p in v)x[p]=v[p];m.clientFunctions.forEach(function(t){x[t]=x[t]||function(){p7t("Renderer does not implement `renderer."+t+"()` on its prototype")}}),t=g}else if("__proto__"===e||"constructor"===e||"prototype"===e)return p7t(e+" is an illegal type to be registered, possibly lead to prototype pollutions");return fTt({map:s9t,keys:[e,r],value:t})}function _kt(t,e){return mTt({map:s9t,keys:[t,e]})}function Skt(t,e,r,i,n){return fTt({map:o9t,keys:[t,e,r,i],value:n})}function Akt(t,e,r,i){return mTt({map:o9t,keys:[t,e,r,i]})}var Lkt,Nkt,Ikt,Rkt,Mkt,Dkt,Okt,Pkt,Bkt,Fkt,$kt,zkt,at,Gkt,Ukt,qkt,jkt,Wkt,Ykt,Hkt,Vkt,Xkt,Kkt,Zkt,Qkt,Jkt,tTt,eTt,rTt,iTt,nTt,aTt,sTt,oTt,lTt,cTt,hTt,uTt,dTt,pTt,gTt,fTt,mTt,yTt,vTt,xTt,bTt,wTt,kTt,TTt,ETt,CTt,_Tt,STt,ATt,LTt,NTt,ITt,RTt,MTt,DTt,OTt,PTt,BTt,FTt,$Tt,zTt,GTt,UTt,qTt,jTt,WTt,YTt,HTt,VTt,XTt,KTt,ZTt,QTt,JTt,t7t,e7t,r7t,i7t,n7t,a7t,s7t,o7t,l7t,c7t,h7t,u7t,d7t,p7t,g7t,f7t,m7t,y7t,v7t,x7t,b7t,w7t,k7t,T7t,E7t,C7t,_7t,S7t,A7t,L7t,N7t,I7t,R7t,M7t,D7t,O7t,P7t,B7t,F7t,$7t,z7t,G7t,U7t,q7t,j7t,W7t,Y7t,H7t,V7t,X7t,K7t,Z7t,Q7t,J7t,t8t,e8t,r8t,i8t,n8t,a8t,s8t,o8t,l8t,c8t,h8t,u8t,d8t,p8t,g8t,f8t,m8t,y8t,v8t,x8t,b8t,w8t,k8t,T8t,E8t,C8t,_8t,S8t,A8t,L8t,N8t,I8t,R8t,M8t,D8t,O8t,P8t,B8t,F8t,$8t,z8t,G8t,U8t,q8t,j8t,W8t,Y8t,H8t,V8t,X8t,K8t,Z8t,Q8t,J8t,tEt,eEt,rEt,iEt,nEt,aEt,sEt,oEt,lEt,cEt,hEt,uEt,dEt,pEt,gEt,fEt,mEt,yEt,vEt,xEt,bEt,wEt,kEt,TEt,EEt,CEt,_Et,SEt,AEt,LEt,NEt,IEt,REt,MEt,DEt,OEt,PEt,BEt,FEt,$Et,zEt,GEt,UEt,qEt,jEt,WEt,YEt,HEt,VEt,XEt,KEt,ZEt,QEt,JEt,tCt,eCt,rCt,iCt,nCt,aCt,sCt,oCt,lCt,cCt,hCt,uCt,dCt,pCt,gCt,fCt,mCt,yCt,vCt,xCt,bCt,wCt,kCt,TCt,ECt,CCt,_Ct,SCt,ACt,LCt,NCt,ICt,RCt,MCt,DCt,OCt,PCt,BCt,FCt,$Ct,zCt,GCt,UCt,qCt,jCt,WCt,YCt,HCt,VCt,XCt,KCt,ZCt,QCt,V,JCt,t_t,e_t,r_t,i_t,n_t,a_t,s_t,o_t,l_t,c_t,h_t,u_t,d_t,p_t,g_t,f_t,m_t,y_t,v_t,x_t,b_t,w_t,k_t,T_t,E_t,C_t,__t,S_t,A_t,L_t,N_t,I_t,R_t,M_t,D_t,O_t,P_t,B_t,F_t,$_t,z_t,G_t,U_t,q_t,j_t,W_t,Y_t,H_t,V_t,X_t,K_t,Z_t,Q_t,J_t,tSt,eSt,rSt,iSt,nSt,aSt,sSt,oSt,lSt,cSt,hSt,uSt,dSt,pSt,gSt,fSt,mSt,ySt,vSt,xSt,bSt,wSt,kSt,TSt,ESt,CSt,_St,SSt,ASt,LSt,NSt,ISt,RSt,MSt,DSt,OSt,PSt,BSt,FSt,$St,zSt,GSt,USt,qSt,jSt,WSt,YSt,HSt,VSt,XSt,KSt,ZSt,QSt,JSt,tAt,eAt,rAt,iAt,nAt,aAt,sAt,oAt,lAt,cAt,hAt,uAt,dAt,pAt,gAt,fAt,mAt,yAt,vAt,xAt,bAt,wAt,kAt,TAt,EAt,CAt,_At,SAt,AAt,LAt,NAt,IAt,RAt,MAt,DAt,OAt,Q,PAt,BAt,FAt,$At,zAt,GAt,UAt,qAt,jAt,WAt,YAt,HAt,VAt,XAt,KAt,ZAt,QAt,JAt,t9t,e9t,r9t,i9t,n9t,a9t,s9t,o9t,l9t,J,c9t,h9t,u9t=t(()=>{function i(t){if(L3t(this,i),this._obj=Object.create(null),this.size=0,null!=t)for(var e=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r<e.length;r++)this.add(e[r])}function t(){L3t(this,t),this._obj={}}me(A3t,"_typeof"),me(L3t,"_classCallCheck"),me(N3t,"_defineProperties"),me(I3t,"_createClass"),me(R3t,"_defineProperty$1"),me(M3t,"_slicedToArray"),me(D3t,"_toConsumableArray"),me(O3t,"_arrayWithoutHoles"),me(P3t,"_arrayWithHoles"),me(B3t,"_iterableToArray"),me(F3t,"_iterableToArrayLimit"),me($3t,"_unsupportedIterableToArray"),me(z3t,"_arrayLikeToArray"),me(G3t,"_nonIterableSpread"),me(U3t,"_nonIterableRest"),me(q3t,"_createForOfIteratorHelper"),Lkt="u"<typeof window?null:window,Nkt=Lkt?Lkt.navigator:null,Lkt&&Lkt.document,Ikt=A3t(""),Rkt=A3t({}),Mkt=A3t(function(){}),Dkt="u"<typeof HTMLElement?"undefined":A3t(HTMLElement),Okt=me(function(t){return t&&t.instanceString&&Bkt(t.instanceString)?t.instanceString():null},"instanceStr"),Pkt=me(function(t){return null!=t&&A3t(t)==Ikt},"string"),Bkt=me(function(t){return null!=t&&A3t(t)===Mkt},"fn"),Fkt=me(function(t){return!qkt(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},"array"),$kt=me(function(t){return null!=t&&A3t(t)===Rkt&&!Fkt(t)&&t.constructor===Object},"plainObject"),zkt=me(function(t){return null!=t&&A3t(t)===Rkt},"object"),at=me(function(t){return null!=t&&A3t(t)===A3t(1)&&!isNaN(t)},"number"),Gkt=me(function(t){return at(t)&&Math.floor(t)===t},"integer"),Ukt=me(function(t){if("undefined"!==Dkt)return null!=t&&t instanceof HTMLElement},"htmlElement"),qkt=me(function(t){return jkt(t)||Wkt(t)},"elementOrCollection"),jkt=me(function(t){return"collection"===Okt(t)&&t._private.single},"element"),Wkt=me(function(t){return"collection"===Okt(t)&&!t._private.single},"collection"),Ykt=me(function(t){return"core"===Okt(t)},"core"),Hkt=me(function(t){return"stylesheet"===Okt(t)},"stylesheet"),Vkt=me(function(t){return"event"===Okt(t)},"event"),Xkt=me(function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},"emptyString"),Kkt=me(function(t){return!("u"<typeof HTMLElement)&&t instanceof HTMLElement},"domElement"),Zkt=me(function(t){return $kt(t)&&at(t.x1)&&at(t.x2)&&at(t.y1)&&at(t.y2)},"boundingBox"),Qkt=me(function(t){return zkt(t)&&Bkt(t.then)},"promise"),Jkt=me(function(){return Nkt&&Nkt.userAgent.match(/msie|trident|edge/i)},"ms"),tTt=me(function(n,a){a=a||me(function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return t.join("$")},"keyFn");var t=me(function t(){var e=arguments,r=a.apply(this,e),i=t.cache;return i[r]||(i[r]=n.apply(this,e))},"memoizedFn");return t.cache={},t},"memoize"),eTt=tTt(function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}),rTt=tTt(function(t){return t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}),iTt=tTt(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),nTt=me(function(t){return Xkt(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},"capitalize"),aTt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",sTt=me(function(t,e){return t<e?-1:e<t?1:0},"ascending"),oTt=me(function(t,e){return-1*sTt(t,e)},"descending"),lTt=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var i=e[r];if(null!=i)for(var n=Object.keys(i),a=0;a<n.length;a++){var s=n[a];t[s]=i[s]}}return t},cTt=me(function(t){var e,r;if((4===t.length||7===t.length)&&"#"===t[0])return t=4===t.length?(e=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)):(e=parseInt(t[1]+t[2],16),r=parseInt(t[3]+t[4],16),parseInt(t[5]+t[6],16)),[e,r,t]},"hex2tuple"),hTt=me(function(t){var e,r,i,n,a,s,o;function l(t,e,r){return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(me(l,"hue2rgb"),t=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(t)){if((e=parseInt(t[1]))<0?e=(360- -1*e%360)%360:360<e&&(e%=360),e/=360,(r=parseFloat(t[2]))<0||100<r||(r/=100,(n=parseFloat(t[3]))<0)||100<n||(n/=100,void 0!==(i=t[4])&&((i=parseFloat(i))<0||1<i)))return;0===r?a=s=o=Math.round(255*n):(n=2*n-(t=n<.5?n*(1+r):n+r-n*r),a=Math.round(255*l(n,t,e+1/3)),s=Math.round(255*l(n,t,e)),o=Math.round(255*l(n,t,e-1/3))),r=[a,s,o,i]}return r},"hsl2tuple"),uTt=me(function(t){var e=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(t);if(e){for(var r=[],i=[],n=1;n<=3;n++){var a=e[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!==(t=e[4])){if((t=parseFloat(t))<0||1<t)return;r.push(t)}}return r},"rgb2tuple"),dTt=me(function(t){return gTt[t.toLowerCase()]},"colorname2tuple"),pTt=me(function(t){return(Fkt(t)?t:null)||dTt(t)||cTt(t)||uTt(t)||hTt(t)},"color2tuple"),gTt={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]},fTt=me(function(t){for(var e=t.map,r=t.keys,i=r.length,n=0;n<i;n++){var a=r[n];if($kt(a))throw Error("Tried to set map with object key");n<r.length-1?(null==e[a]&&(e[a]={}),e=e[a]):e[a]=t.value}},"setMap"),mTt=me(function(t){for(var e=t.map,r=t.keys,i=r.length,n=0;n<i;n++){var a=r[n];if($kt(a))throw Error("Tried to get map with object key");if(null==(e=e[a]))return e}return e},"getMap"),me(j3t,"isObject"),yTt=j3t,vTt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},me(W3t,"createCommonjsModule"),c7t="object"==typeof vTt&&vTt&&vTt.Object===Object&&vTt,Q="object"==typeof self&&self&&self.Object===Object&&self,c7t=c7t||Q||Function("return this")(),xTt=c7t,Q=me(function(){return xTt.Date.now()},"now"),bTt=Q,wTt=/\s/,me(Y3t,"trimmedEndIndex"),kTt=Y3t,TTt=/^\s+/,me(H3t,"baseTrim"),ETt=H3t,c7t=xTt.Symbol,Q=c7t,CTt=(c7t=Object.prototype).hasOwnProperty,_Tt=c7t.toString,STt=Q?Q.toStringTag:void 0,me(V3t,"getRawTag"),ATt=V3t,LTt=Object.prototype.toString,me(X3t,"objectToString"),NTt=X3t,ITt=Q?Q.toStringTag:void 0,me(K3t,"baseGetTag"),RTt=K3t,me(Z3t,"isObjectLike"),MTt=Z3t,me(Q3t,"isSymbol"),DTt=Q3t,OTt=NaN,PTt=/^[-+]0x[0-9a-f]+$/i,BTt=/^0b[01]+$/i,FTt=/^0o[0-7]+$/i,$Tt=parseInt,me(J3t,"toNumber"),zTt=J3t,GTt=Math.max,UTt=Math.min,me(t6t,"debounce"),qTt=t6t,jTt=Lkt?Lkt.performance:null,WTt=jTt&&jTt.now?function(){return jTt.now()}:function(){return Date.now()},YTt=(()=>{if(Lkt){if(Lkt.requestAnimationFrame)return function(t){Lkt.requestAnimationFrame(t)};if(Lkt.mozRequestAnimationFrame)return function(t){Lkt.mozRequestAnimationFrame(t)};if(Lkt.webkitRequestAnimationFrame)return function(t){Lkt.webkitRequestAnimationFrame(t)};if(Lkt.msRequestAnimationFrame)return function(t){Lkt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(WTt())},1e3/60)}})(),HTt=me(function(t){return YTt(t)},"requestAnimationFrame"),VTt=WTt,XTt=me(function(t){for(var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261;!(e=t.next()).done;)r=65599*r+e.value|0;return r},"hashIterableInts"),KTt=me(function(t){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+t|0},"hashInt"),ZTt=me(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(e<<5)+e+t|0},"hashIntAlt"),QTt=me(function(t,e){return 2097152*t+e},"combineHashes"),JTt=me(function(t){return 2097152*t[0]+t[1]},"combineHashesArray"),t7t=me(function(t,e){return[KTt(t[0],e[0]),ZTt(t[1],e[1])]},"hashArrays"),e7t=me(function(t,e){var r={value:0,done:!1},i=0,n=t.length,a={next:me(function(){return i<n?r.value=t[i++]:r.done=!0,r},"next")};return XTt(a,e)},"hashIntsArray"),r7t=me(function(t,e){var r={value:0,done:!1},i=0,n=t.length,a={next:me(function(){return i<n?r.value=t.charCodeAt(i++):r.done=!0,r},"next")};return XTt(a,e)},"hashString"),i7t=me(function(){return n7t(arguments)},"hashStrings"),n7t=me(function(t){for(var e=0;e<t.length;e++)var r=t[e],i=0===e?r7t(r):r7t(r,i);return i},"hashStringsArray"),a7t=!0,s7t=null!=console.warn,o7t=null!=console.trace,l7t=Number.MAX_SAFE_INTEGER||9007199254740991,c7t=me(function(){return!0},"trueify"),h7t=me(function(){return!1},"falsify"),u7t=me(function(){return 0},"zeroify"),d7t=me(function(){},"noop"),p7t=me(function(t){throw new Error(t)},"error"),g7t=me(function(t){if(void 0===t)return a7t;a7t=!!t},"warnings"),f7t=me(function(t){g7t()&&(s7t?console.warn(t):(console.log(t),o7t&&console.trace()))},"warn"),m7t=me(function(t){return lTt({},t)},"clone"),y7t=me(function(t){return null==t?t:Fkt(t)?t.slice():$kt(t)?m7t(t):t},"copy"),v7t=me(function(t){return t.slice()},"copyArray"),x7t=me(function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e},"uuid"),b7t={},w7t=me(function(){return b7t},"staticEmptyObject"),k7t=me(function(a){var s=Object.keys(a);return function(t){for(var e={},r=0;r<s.length;r++){var i=s[r],n=t?.[i];e[i]=void 0===n?a[i]:n}return e}},"defaults"),T7t=me(function(t,e,r){for(var i=t.length-1;0<=i&&(t[i]!==e||(t.splice(i,1),!r));i--);},"removeFromArray"),E7t=me(function(t){t.splice(0,t.length)},"clearArray"),C7t=me(function(t,e){for(var r=0;r<e.length;r++)t.push(e[r])},"push"),_7t=me(function(t,e,r){return t[e=r?iTt(r,e):e]},"getPrefixedProperty"),S7t=me(function(t,e,r,i){t[e=r?iTt(r,e):e]=i},"setPrefixedProperty"),me(t,"ObjectMap"),I3t(t,[{key:"set",value:me(function(t,e){return this._obj[t]=e,this},"set")},{key:"delete",value:me(function(t){return this._obj[t]=void 0,this},"_delete")},{key:"clear",value:me(function(){this._obj={}},"clear")},{key:"has",value:me(function(t){return void 0!==this._obj[t]},"has")},{key:"get",value:me(function(t){return this._obj[t]},"get")}]),r9t=t,A7t=typeof Map<"u"?Map:r9t,me(i,"ObjectSet"),I3t(i,[{key:"instanceString",value:me(function(){return"set"},"instanceString")},{key:"add",value:me(function(t){var e=this._obj;1!==e[t]&&(e[t]=1,this.size++)},"add")},{key:"delete",value:me(function(t){var e=this._obj;1===e[t]&&(e[t]=0,this.size--)},"_delete")},{key:"clear",value:me(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:me(function(t){return 1===this._obj[t]},"has")},{key:"toArray",value:me(function(){var e=this;return Object.keys(this._obj).filter(function(t){return e.has(t)})},"toArray")},{key:"forEach",value:me(function(t,e){return this.toArray().forEach(t,e)},"forEach")}]),r9t=i,L7t="undefined"!==("u"<typeof Set?"undefined":A3t(Set))?Set:r9t,N7t=me(function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&Ykt(t)){var i=e.group;if("nodes"!==(i=null==i?e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes":i)&&"edges"!==i)p7t("An element must be of type `nodes` or `edges`; you specified `"+i+"`");else{this.length=1;var n,a=(this[0]=this)._private={cy:t,single:!0,data:e.data||{},position:e.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:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===i:!!e.pannable,active:!1,classes:new L7t,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.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),e.renderedPosition&&(i=e.renderedPosition,n=t.pan(),t=t.zoom(),a.position={x:(i.x-n.x)/t,y:(i.y-n.y)/t}),[]);Fkt(e.classes)?s=e.classes:Pkt(e.classes)&&(s=e.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(),(i=e.style||e.css)&&(f7t("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(i)),void 0!==r&&!r||this.restore()}}else p7t("An element must have a core reference and parameters set")},"Element"),(r9t={breadthFirstSearch:(r9t=me(function(T){return T={bfs:T.bfs||!T.dfs,dfs:T.dfs||!T.bfs},me(function(t,u,d){$kt(t)&&!qkt(t)&&(t=(e=t).roots||e.root,u=e.visit,d=e.directed),d=2!==arguments.length||Bkt(u)?d:u,u=Bkt(u)?u:function(){};for(var p,e=this._private.cy,r=t=Pkt(t)?this.filter(t):t,g=[],f=[],m={},y={},v={},x=0,t=this.byGroup(),b=t.nodes,w=t.edges,i=0;i<r.length;i++){var n=r[i],a=n.id();n.isNode()&&(g.unshift(n),T.bfs&&(v[a]=!0,f.push(n)),y[a]=0)}for(var s=me(function(){var e=T.bfs?g.shift():g.pop(),t=e.id();if(T.dfs){if(v[t])return"continue";v[t]=!0,f.push(e)}var r=y[t],i=m[t],n=null!=i?i.source():null,a=null!=i?i.target():null,a=null==i?void 0:(e.same(n)?a:n)[0];if(!0===(n=u(e,i,a,x++,r)))return p=e,"break";if(!1===n)return"break";for(var s=e.connectedEdges().filter(function(t){return(!d||t.source().same(e))&&w.has(t)}),o=0;o<s.length;o++){var l=s[o],c=l.connectedNodes().filter(function(t){return!t.same(e)&&b.has(t)}),h=c.id();0===c.length||v[h]||(c=c[0],g.push(c),T.bfs&&(v[h]=!0,f.push(c)),m[h]=l,y[h]=y[t]+1)}},"_loop");0!==g.length;){var o=s();if("continue"!==o&&"break"===o)break}for(var l=e.collection(),c=0;c<f.length;c++){var h=f[c],k=m[h.id()];null!=k&&l.push(k),l.push(h)}return{path:e.collection(l),found:e.collection(p)}},"searchFn")},"defineSearch"))({bfs:!0}),depthFirstSearch:r9t({dfs:!0})}).bfs=r9t.breadthFirstSearch,r9t.dfs=r9t.depthFirstSearch,DAt=W3t(function(s,t){!function(){var d,l,p,g,e,c,r,f,m,t,i,n,h,u;function a(t){this.cmp=t??d,this.nodes=[]}l=Math.floor,m=Math.min,d=me(function(t,e){return t<e?-1:e<t?1:0},"defaultCmp"),f=me(function(t,e,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=t.length);r<i;)n(e,t[a=l((r+i)/2)])<0?i=a:r=a+1;return[].splice.apply(t,[r,r-r].concat(e)),e},"insort"),e=me(function(t,e,r){return null==r&&(r=d),t.push(e),h(t,0,t.length-1,r)},"heappush"),g=me(function(t,e){var r,i;return null==e&&(e=d),r=t.pop(),t.length?(i=t[0],t[0]=r,u(t,0,e)):i=r,i},"heappop"),r=me(function(t,e,r){var i;return null==r&&(r=d),i=t[0],t[0]=e,u(t,0,r),i},"heapreplace"),c=me(function(t,e,r){var i;return null==r&&(r=d),t.length&&r(t[0],e)<0&&(e=(i=[t[0],e])[0],t[0]=i[1],u(t,0,r)),e},"heappushpop"),p=me(function(r,t){var e,i,n,a,s,o;for(null==t&&(t=d),s=[],i=0,n=(a=function(){o=[];for(var t=0,e=l(r.length/2);0<=e?t<e:e<t;0<=e?t++:t--)o.push(t);return o}.apply(this).reverse()).length;i<n;i++)e=a[i],s.push(u(r,e,t));return s},"heapify"),n=me(function(t,e,r){if(null==r&&(r=d),-1!==(e=t.indexOf(e)))return h(t,0,e,r),u(t,e,r)},"updateItem"),t=me(function(t,e,r){var i,n,a,s,o;if(null==r&&(r=d),!(n=t.slice(0,e)).length)return n;for(p(n,r),a=0,s=(o=t.slice(e)).length;a<s;a++)i=o[a],c(n,i,r);return n.sort(r).reverse()},"nlargest"),i=me(function(t,e,r){var i,n,a,s,o,l,c,h,u;if(null==r&&(r=d),10*e<=t.length){if((a=t.slice(0,e).sort(r)).length)for(n=a[a.length-1],s=0,l=(c=t.slice(e)).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(t,r),u=[],o=0,h=m(e,t.length);0<=h?o<h:h<o;0<=h?++o:--o)u.push(g(t,r));return u},"nsmallest"),h=me(function(t,e,r,i){var n,a,s;for(null==i&&(i=d),n=t[r];e<r&&i(n,a=t[s=r-1>>1])<0;)t[r]=a,r=s;return t[r]=n},"_siftdown"),u=me(function(t,e,r){var i,n,a,s,o;for(null==r&&(r=d),n=t.length,a=t[o=e],i=2*e+1;i<n;)(s=i+1)<n&&!(r(t[i],t[s])<0)&&(i=s),t[e]=t[i],i=2*(e=i)+1;return t[e]=a,h(t,o,e,r)},"_siftup"),a.push=e,a.pop=g,a.replace=r,a.pushpop=c,a.heapify=p,a.updateItem=n,a.nlargest=t,a.nsmallest=i,me(a,"Heap"),a.prototype.push=function(t){return e(this.nodes,t,this.cmp)},a.prototype.pop=function(){return g(this.nodes,this.cmp)},a.prototype.peek=function(){return this.nodes[0]},a.prototype.contains=function(t){return-1!==this.nodes.indexOf(t)},a.prototype.replace=function(t){return r(this.nodes,t,this.cmp)},a.prototype.pushpop=function(t){return c(this.nodes,t,this.cmp)},a.prototype.heapify=function(){return p(this.nodes,this.cmp)},a.prototype.updateItem=function(t){return n(this.nodes,t,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 t=new a;return t.nodes=this.nodes.slice(0),t},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(vTt)}),I7t=DAt,R7t=k7t({root:null,weight:me(function(t){return 1},"weight"),directed:!1}),DAt={dijkstra:me(function(t){$kt(t)||(t={root:(e=arguments)[0],weight:e[1],directed:e[2]});var e=R7t(t),t=e.root,l=e.directed,a=this,c=e.weight,r=(Pkt(t)?this.filter(t):t)[0],i={},s={},n={},o=(e=this.byGroup()).nodes,h=e.edges;h.unmergeBy(function(t){return t.isLoop()});for(var u=me(function(t){return i[t.id()]},"getDist"),d=me(function(t,e){i[t.id()]=e,p.updateItem(t)},"setDist"),p=new I7t(function(t,e){return u(t)-u(e)}),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=me(function(t,e){for(var r,i=(l?t.edgesTo(e):t.edgesWith(e)).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),x=y.id();if((n[x]=v)!==1/0)for(var b=y.neighborhood().intersect(o),w=0;w<b.length;w++){var k=b[w],T=k.id(),E=m(y,k),C=v+E.dist;C<u(k)&&(d(k,C),s[T]={node:y,edge:E.edge})}}return{distanceTo:me(function(t){return t=(Pkt(t)?o.filter(t):t)[0],n[t.id()]},"distanceTo"),pathTo:me(function(t){var e=[],r=t=(Pkt(t)?o.filter(t):t)[0],i=r.id();if(0<t.length)for(e.unshift(t);s[i];){var n=s[i];e.unshift(n.edge),e.unshift(n.node),i=(r=n.node).id()}return a.spawn(e)},"pathTo")}},"dijkstra")},c9t={kruskal:me(function(r){r=r||function(t){return 1};for(var t=(e=this.byGroup()).nodes,e=e.edges,i=t.length,n=new Array(i),a=t,s=me(function(t){for(var e=0;e<n.length;e++)if(n[e].has(t))return e},"findSetIndex"),o=0;o<i;o++)n[o]=this.spawn(t[o]);for(var l=e.sort(function(t,e){return r(t)-r(e)}),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")},M7t=k7t({root:null,goal:null,weight:me(function(t){return 1},"weight"),heuristic:me(function(t){return 0},"heuristic"),directed:!1}),PAt={aStar:me(function(t){var e,r,i=this.cy(),n=(t=M7t(t)).root,a=t.goal,s=t.heuristic,o=t.directed,l=t.weight,n=i.collection(n)[0],a=i.collection(a)[0],t=n.id(),c=a.id(),h={},u={},d={},p=new I7t(function(t,e){return u[t.id()]-u[e.id()]}),g=new L7t,f={},m={},y=me(function(t,e){p.push(t),g.add(e)},"addToOpenSet"),v=me(function(){e=p.pop(),r=e.id(),g.delete(r)},"popFromOpenSet"),x=me(function(t){return g.has(t)},"isInOpenSet");y(n,t),h[t]=0,u[t]=s(n);for(var b=0;0<p.size();){if(v(),b++,r===c){for(var w=[],k=a,T=c,E=m[T];w.unshift(k),null!=E&&w.unshift(E),null!=(k=f[T]);)E=m[T=k.id()];return{found:!0,distance:h[r],path:this.spawn(w),steps:b}}d[r]=!0;for(var C=e._private.edges,_=0;_<C.length;_++){var S,A,L,N=C[_];!this.hasElementWithId(N.id())||o&&N.data("source")!==r||(S=N.source(),A=N.target(),A=(S=S.id()!==r?S:A).id(),this.hasElementWithId(A)&&!d[A]&&(L=h[r]+l(N),x(A)?L<h[A]&&(u[A]=(h[A]=L)+s(S),f[A]=e,m[A]=N):(u[A]=(h[A]=L)+s(S),y(S,A),f[A]=e,m[A]=N)))}}return{found:!1,distance:void 0,path:void 0,steps:b}},"aStar")},D7t=k7t({weight:me(function(t){return 1},"weight"),directed:!1}),HAt={floydWarshall:me(function(t){for(var s=this.cy(),e=(t=D7t(t)).weight,r=t.directed,i=e,n=(t=this.byGroup()).nodes,a=t.edges,o=n.length,l=o*o,c=me(function(t){return n.indexOf(t)},"indexOf"),h=me(function(t){return n[t]},"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,x=a[m],b=x.source()[0],w=x.target()[0];b!==w&&(b=c(b),w=c(w),v=b*o+w,y=i(x),u[v]>y&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k<o;k++)for(var T=0;T<o;T++)for(var E=T*o+k,C=0;C<o;C++){var _=T*o+C,S=k*o+C;u[E]+u[S]<u[_]&&(u[_]=u[E]+u[S],g[_]=g[E])}var A=me(function(t){return(Pkt(t)?s.filter(t):t)[0]},"getArgEle"),L=me(function(t){return c(A(t))},"indexOfArgEle");return{distance:me(function(t,e){return t=L(t),e=L(e),u[t*o+e]},"distance"),path:me(function(t,e){var r=L(t),i=L(e),t=h(r);if(r===i)return t.collection();if(null==g[r*o+i])return s.collection();var n,a=s.collection();for(a.merge(t);r!==i;)r=g[(n=r)*o+i],n=f[n*o+r],a.merge(n),a.merge(h(r));return a},"path")}},"floydWarshall")},O7t=k7t({weight:me(function(t){return 1},"weight"),directed:!1,root:null}),IAt={bellmanFord:me(function(t){var P=this,e=(m=O7t(t)).weight,r=m.directed,s=m.root,i=e,o=this,n=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new A7t,u=!1,d=[],s=n.collection(s)[0];a.unmergeBy(function(t){return t.isLoop()});for(var p=a.length,g=me(function(t){var e=h.get(t.id());return e||(e={},h.set(t.id(),e)),e},"getInfo"),f=me(function(t){return(Pkt(t)?n.$(t):t)[0]},"getNodeFromTo"),e=me(function(t){return g(f(t)).dist},"distanceTo"),m=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s,r=[],i=f(t);;){if(null==i)return P.spawn();var n=(a=g(i)).edge,a=a.pred;if(r.unshift(i[0]),i.same(e)&&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],x=g(v);v.same(s)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var b=!1,B=me(function(t,e,r,i,n,a){(a=i.dist+a)<n.dist&&!r.same(i.edge)&&(n.dist=a,n.pred=t,n.edge=r,b=!0)},"checkForEdgeReplacement"),F=1;F<c;F++){for(var b=!1,w=0;w<p;w++){var k=a[w],T=k.source(),E=k.target(),$=i(k),z=g(T),G=g(E);B(T,E,k,z,G,$),r||B(E,T,k,G,z,$)}if(!b)break}if(b)for(var U=[],C=0;C<p;C++){var q=(_=a[C]).source(),j=_.target(),_=i(_),S=g(q).dist,A=g(j).dist;if(S+_<A||!r&&A+_<S){if(u||(f7t("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===t.findNegativeWeightCycles)break;var L=[];S+_<A&&L.push(q),!r&&A+_<S&&L.push(j);for(var W=L.length,N=0;N<W;N++){var I=L[N],R=[I];R.push(g(I).edge);for(var M=g(I).pred;-1===R.indexOf(M);)R.push(M),R.push(g(M).edge),M=g(M).pred;for(var Y=(R=R.slice(R.indexOf(M)))[0].id(),D=0,O=2;O<R.length;O+=2)R[O].id()<Y&&(Y=R[O].id(),D=O);(R=R.slice(D).concat(R.slice(0,D))).push(R[0]),I=R.map(function(t){return t.id()}).join(","),-1===U.indexOf(I)&&(d.push(o.spawn(R)),U.push(I))}}}return{distanceTo:e,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},P7t=Math.sqrt(2),B7t=me(function(t,e,r){0===r.length&&p7t("Karger-Stein must be run on a connected (sub)graph");for(var i=e[(t=r[t])[1]],n=e[t[2]],a=r,s=a.length-1;0<=s;s--){var o=(l=a[s])[1],l=l[2];(e[o]===i&&e[l]===n||e[o]===n&&e[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<e.length;u++)e[u]===n&&(e[u]=i);return a},"collapse"),F7t=me(function(t,e,r,i){for(;i<r;){var n=Math.floor(Math.random()*e.length);e=B7t(n,t,e),r--}return e},"contractUntil"),OAt={kargerStein:me(function(){var r=this,t=this.byGroup(),e=t.nodes,i=t.edges,n=(i.unmergeBy(function(t){return t.isLoop()}),e.length),a=i.length,s=Math.ceil(Math.pow(Math.log(n)/Math.LN2,2)),o=Math.floor(n/P7t);if(!(n<2)){for(var l=[],c=0;c<a;c++){var h=i[c];l.push([c,e.indexOf(h.source()),e.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(n),g=new Array(n),f=new Array(n),m=me(function(t,e){for(var r=0;r<n;r++)e[r]=t[r]},"copyNodesMap"),y=0;y<=s;y++){for(var v=0;v<n;v++)g[v]=v;var x=(b=F7t(g,l.slice(),n,o)).slice(),b=(m(g,f),F7t(g,b,o,2)),x=F7t(f,x,o,2);b.length<=x.length&&b.length<u?(u=b.length,d=b,m(g,p)):x.length<=b.length&&x.length<u&&(u=x.length,d=x,m(f,p))}for(var w=this.spawn(d.map(function(t){return i[t[0]]})),k=this.spawn(),T=this.spawn(),E=p[0],C=0;C<p.length;C++){var _=p[C],S=e[C];(_===E?k:T).merge(S)}return t=[(t=me(function(t){var e=r.spawn();return t.forEach(function(t){e.merge(t),t.connectedEdges().forEach(function(t){r.contains(t)&&!w.contains(t)&&e.merge(t)})}),e},"constructComponent"))(k),t(T)],{cut:w,components:t,partition1:k,partition2:T}}p7t("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},$7t=me(function(t){return{x:t.x,y:t.y}},"copyPosition"),z7t=me(function(t,e,r){return{x:t.x*e+r.x,y:t.y*e+r.y}},"modelToRenderedPosition"),G7t=me(function(t,e,r){return{x:(t.x-r.x)/e,y:(t.y-r.y)/e}},"renderedToModelPosition"),U7t=me(function(t){return{x:t[0],y:t[1]}},"array2point"),q7t=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,i=1/0,n=e;n<r;n++){var a=t[n];isFinite(a)&&(i=Math.min(a,i))}return i},"min"),j7t=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,i=-1/0,n=e;n<r;n++){var a=t[n];isFinite(a)&&(i=Math.max(a,i))}return i},"max"),W7t=me(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.length,i=0,n=0,a=e;a<r;a++){var s=t[a];isFinite(s)&&(i+=s,n++)}return i/n},"mean"),Y7t=me(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.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?t=t.slice(e,r):(r<t.length&&t.splice(r,t.length-r),0<e&&t.splice(0,e));for(var s=0,o=t.length-1;0<=o;o--){var l=t[o];a?isFinite(l)||(t[o]=-1/0,s++):t.splice(o,1)}return n&&t.sort(function(t,e){return t-e}),i=t.length,r=Math.floor(i/2),i%2!=0?t[r+1+s]:(t[r-1+s]+t[r+s])/2},"median"),H7t=me(function(t){return Math.PI*t/180},"deg2rad"),V7t=me(function(t,e){return Math.atan2(e,t)-Math.PI/2},"getAngleFromDisp"),X7t=Math.log2||function(t){return Math.log(t)/Math.log(2)},K7t=me(function(t){return 0<t?1:t<0?-1:0},"signum"),Z7t=me(function(t,e){return Math.sqrt(Q7t(t,e))},"dist"),Q7t=me(function(t,e){var r=e.x-t.x;return r*r+(e=e.y-t.y)*e},"sqdist"),J7t=me(function(t){for(var e=t.length,r=0,i=0;i<e;i++)r+=t[i];for(var n=0;n<e;n++)t[n]=t[n]/r;return t},"inPlaceSumNormalize"),t8t=me(function(t,e,r,i){return(1-i)*(1-i)*t+2*(1-i)*i*e+i*i*r},"qbezierAt"),e8t=me(function(t,e,r,i){return{x:t8t(t.x,e.x,r.x,i),y:t8t(t.y,e.y,r.y,i)}},"qbezierPtAt"),r8t=me(function(t,e,r,i){var n=e.x-t.x,a=e.y-t.y,e=Z7t(t,e);return r=r??0,{x:t.x+n/e*(i=i??r*e),y:t.y+a/e*i}},"lineAt"),i8t=me(function(t,e,r){return Math.max(t,Math.min(r,e))},"bound"),n8t=me(function(t){return null==t?{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0}:null!=t.x1&&null!=t.y1?null!=t.x2&&null!=t.y2&&t.x2>=t.x1&&t.y2>=t.y1?{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1}:null!=t.w&&null!=t.h&&0<=t.w&&0<=t.h?{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}:void 0:void 0},"makeBoundingBox"),a8t=me(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),s8t=me(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),o8t=me(function(t,e,r){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+r,y2:t.y2+r,w:t.w,h:t.h}},"shiftBoundingBox"),l8t=me(function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},"updateBoundingBox"),c8t=me(function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),h8t=me(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBox"),u8t=me(function(t){var e,r,i,n,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?e=r=i=n=a[0]:2===a.length?(e=i=a[0],n=r=a[1]):4===a.length&&(e=(a=M3t(a,4))[0],r=a[1],i=a[2],n=a[3]),t.x1-=n,t.x2+=r,t.y1-=e,t.y2+=i,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBoxSides"),d8t=me(function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},"assignBoundingBox"),p8t=me(function(t,e){return!(t.x1>e.x2||e.x1>t.x2||t.x2<e.x1||e.x2<t.x1||t.y2<e.y1||e.y2<t.y1||t.y1>e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),g8t=me(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),f8t=me(function(t,e){return g8t(t,e.x,e.y)},"pointInBoundingBox"),m8t=me(function(t,e){return g8t(t,e.x1,e.y1)&&g8t(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),y8t=me(function(t,e,r,i,n,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?z8t(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=M8t(t,e,r,i,r-n+l-s,u,r+n-l+s,u,!1)).length)return u}return h&&0<(u=M8t(t,e,r,i,o=r+n+s,i-a+l-s,o,i+a-l+s,!1)).length||c&&0<(u=M8t(t,e,r,i,r-n+l-s,o=i+a+s,r+n-l+s,o,!1)).length||h&&0<(u=M8t(t,e,r,i,c=r-n-s,i-a+l-s,c,i+a-l+s,!1)).length?u:0<(c=I8t(t,e,r,i,o=r-n+l,h=i-a+l,l+s)).length&&c[0]<=o&&c[1]<=h||0<(c=I8t(t,e,r,i,u=r+n-l,o=i-a+l,l+s)).length&&c[0]>=u&&c[1]<=o||0<(c=I8t(t,e,r,i,h=r+n-l,u=i+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=I8t(t,e,r,i,o=r-n+l,h=i+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),v8t=me(function(t,e,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<=t&&t<=r+s&&n-s<=e&&e<=i+s},"inLineVicinity"),x8t=me(function(t,e,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!(t<c||r<t||e<s||n<e)},"inBezierVicinity"),b8t=me(function(t,e,r,i){return(i=e*e-4*t*(r-=i))<0?[]:[(-e+(r=Math.sqrt(i)))/(i=2*t),(-e-r)/i]},"solveQuadratic"),w8t=me(function(t,e,r,i,n){var a,s,o;i=-27*(i/=t=0===t?1e-5:t)+(e/=t)*(9*(r/=t)-e*e*2),r=(t=(3*r-e*e)/9)*t*t+(i/=54)*i,e/=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]=-e+a+s,n[4]=n[2]=-(e+=(a+s)/2),e=Math.sqrt(3)*(-s+a)/2,n[3]=e,n[5]=-e):(n[5]=n[3]=0)==r?(o=i<0?-Math.pow(-i,1/3):Math.pow(i,1/3),n[0]=2*o-e,n[4]=n[2]=-(o+e)):(t=-t,s=Math.acos(i/Math.sqrt(t*t*t)),o=2*Math.sqrt(t),n[0]=-e+o*Math.cos(s/3),n[2]=-e+o*Math.cos((s+2*Math.PI)/3),n[4]=-e+o*Math.cos((s+4*Math.PI)/3))},"solveCubic"),k8t=me(function(t,e,r,i,n,a,s,o){var l=[];w8t(+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*t+2*n*n+2*n*t-s*t+3*i*i-6*i*a+i*o-i*e+2*a*a+2*a*e-o*e,+r*n-r*r+r*t-n*t+i*a-i*i+i*e-a*e,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-t,2)+Math.pow(u-e,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),T8t=me(function(t,e,r,i,n,a){var s=[t-r,e-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?(t-n)*(t-n)+(e-a)*(e-a):o-r},"sqdistToFiniteLine"),E8t=me(function(t,e,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])!=t||a!=t){if(!(t<=i&&a<=t||i<=t&&t<=a))continue;e<(t-i)/(a-i)*(s-n)+n&&o++}return o%2!=0},"pointInsidePolygonPoints"),C8t=me(function(t,e,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=A8t(c,-l),S8t(o)):c,E8t(t,e,h)},"pointInsidePolygon"),_8t=me(function(t,e,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-t,2)+Math.pow(h.cy-e,2)<=Math.pow(h.radius,2))return!0}return E8t(t,e,l)},"pointInsideRoundPolygon"),S8t=me(function(t){for(var e,r,i,n=new Array(t.length/2),a=0;a<t.length/4;a++){var s=a<t.length/4-1?(e=t[4*(a+1)],r=t[4*(a+1)+1],i=t[4*(a+1)+2],t[4*(a+1)+3]):(e=t[0],r=t[1],i=t[2],t[3]),s=M8t(t[4*a],t[4*a+1],t[4*a+2],t[4*a+3],e,r,i,s,!0);n[2*a]=s[0],n[2*a+1]=s[1]}return n},"joinLines"),A8t=me(function(t,e){for(var r,i=new Array(2*t.length),n=0;n<t.length/2;n++){var a,s,o,l=(o=n<t.length/2-1?(r=t[2*(n+1)],t[2*(n+1)+1]):(r=t[0],t[1]))-(s=t[2*n+1]),c=-(r-(a=t[2*n])),h=Math.sqrt(l*l+c*c),c=c/h;i[4*n]=a+(l/=h)*e,i[4*n+1]=s+c*e,i[4*n+2]=r+l*e,i[4*n+3]=o+c*e}return i},"expandPolygon"),L8t=me(function(t,e,r,i,n,a){var s=r-t,o=i-e;return s/=n,o/=a,(a=(n=Math.sqrt(s*s+o*o))-1)<0?[]:[(r-t)*(s=a/n)+t,(i-e)*s+e]},"intersectLineEllipse"),N8t=me(function(t,e,r,i,n,a,s){return(t=(t-n)/(r/2+s))*t+(e=(e-a)/(i/2+s))*e<=1},"checkInEllipse"),I8t=me(function(t,e,r,i,n,a,s){return r=[r-t,i-e],i=[t-n,e-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]+t,i=s[0]*r[1]+e,1<s.length&&s[0]!=s[1]?[a,i,s[1]*r[0]+t,s[1]*r[1]+e]:[a,i])},"intersectLineCircle"),R8t=me(function(t,e,r){return e<=t&&t<=r||r<=t&&t<=e?t:t<=e&&e<=r||r<=e&&e<=t?e:r},"midOfThree"),M8t=me(function(t,e,r,i,n,a,s,o,l){var c=t-n,h=r-t,u=s-n,d=i-e,p=o-a,g=u*(f=e-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?[t+u*h,e+u*d]:[]):0==g||0==f?R8t(t,r,s)===s?[s,o]:R8t(t,r,n)===n?[n,a]:R8t(n,s,r)===r?[r,i]:[]:[]},"finiteLinesIntersect"),D8t=me(function(t,e,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=A8t(c,-o),S8t(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=M8t(t,e,i,n,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),O8t=me(function(r,i,t,n,a,e,s,o,l){var c,h=[],u=new Array(2*t.length);l.forEach(function(t,e){0===e?(u[u.length-2]=t.startX,u[u.length-1]=t.startY):(u[4*e-2]=t.startX,u[4*e-1]=t.startY),u[4*e]=t.stopX,u[4*e+1]=t.stopY,0!==(c=I8t(r,i,n,a,t.cx,t.cy,t.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=M8t(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"),P8t=me(function(t,e,r){var t=[t[0]-e[0],t[1]-e[1]],i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=(i-r)/i;return[e[0]+(r=r<0?1e-5:r)*t[0],e[1]+r*t[1]]},"shortenIntersection"),B8t=me(function(t,e){return t=$8t(t,e),F8t(t)},"generateUnitNgonPointsFitToSquare"),F8t=me(function(t){for(var e,r,i=t.length/2,n=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<i;l++)e=t[2*l],r=t[2*l+1],n=Math.min(n,e),s=Math.max(s,e),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++)e=t[2*u]=t[2*u]*c,r=t[2*u+1]=t[2*u+1]*h,n=Math.min(n,e),s=Math.max(s,e),a=Math.min(a,r),o=Math.max(o,r);if(a<-1)for(var d=0;d<i;d++)r=t[2*d+1]=t[2*d+1]+(-1-a);return t},"fitPolygonToSquare"),$8t=me(function(t,e){var r=1/t*2*Math.PI,i=t%2==0?Math.PI/2+r/2:Math.PI/2;i+=e;for(var n,a=new Array(2*t),s=0;s<t;s++)n=s*r+i,a[2*s]=Math.cos(n),a[2*s+1]=Math.sin(-n);return a},"generateUnitNgonPoints"),z8t=me(function(t,e){return Math.min(t/4,e/4,8)},"getRoundRectangleRadius"),G8t=me(function(t,e){return Math.min(t/10,e/10,8)},"getRoundPolygonRadius"),U8t=me(function(){return 8},"getCutRectangleCornerLength"),q8t=me(function(t,e,r){return[t-2*e+r,2*(e-t),t]},"bezierPtsToQuadCoeff"),j8t=me(function(t,e){return{heightOffset:Math.min(15,.05*e),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),W8t=k7t({dampingFactor:.8,precision:1e-6,iterations:200,weight:me(function(t){return 1},"weight")}),GSt={pageRank:me(function(t){for(var e=(t=W8t(t)).dampingFactor,r=t.precision,i=t.iterations,n=t.weight,a=this._private.cy,s=(t=this.byGroup()).nodes,o=t.edges,l=s.length,c=o.length,h=new Array(l*l),u=new Array(l),d=(1-e)/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 x=1/l+d,b=0;b<l;b++)if(0===u[b])for(var w=0;w<l;w++)h[w*l+b]=x;else for(var k=0;k<l;k++){var T=k*l+b;h[T]=h[T]/u[b]+d}for(var E=new Array(l),C=new Array(l),_=0;_<l;_++)E[_]=1;for(var S=0;S<i;S++){for(var A=0;A<l;A++)C[A]=0;for(var L=0;L<l;L++)for(var N=0;N<l;N++)C[L]+=h[L*l+N]*E[N];J7t(C);for(var I=E,E=C,C=I,R=0,M=0;M<l;M++){var D=I[M]-E[M];R+=D*D}if(R<r)break}return{rank:me(function(t){return t=a.collection(t)[0],E[s.indexOf(t)]},"rank")}},"pageRank")},Y8t=k7t({root:null,weight:me(function(t){return 1},"weight"),directed:!1,alpha:0}),(J={degreeCentralityNormalized:me(function(t){t=Y8t(t);var e=this.cy(),r=this.nodes(),i=r.length;if(t.directed){for(var n={},a={},s=0,o=0,l=0;l<i;l++){var c=(h=r[l]).id(),h=(t.root=h,this.degreeCentrality(t));s<h.indegree&&(s=h.indegree),o<h.outdegree&&(o=h.outdegree),n[c]=h.indegree,a[c]=h.outdegree}return{indegree:me(function(t){return 0==s?0:(Pkt(t)&&(t=e.filter(t)),n[t.id()]/s)},"indegree"),outdegree:me(function(t){return 0===o?0:(Pkt(t)&&(t=e.filter(t)),a[t.id()]/o)},"outdegree")}}for(var u={},d=0,p=0;p<i;p++){var g=r[p],f=(t.root=g,this.degreeCentrality(t));d<f.degree&&(d=f.degree),u[g.id()]=f.degree}return{degree:me(function(t){return 0===d?0:(Pkt(t)&&(t=e.filter(t)),u[t.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:me(function(t){t=Y8t(t);var e=this.cy(),r=this,i=t.root,n=t.weight,a=t.directed,t=t.alpha,i=e.collection(i)[0];if(a){for(var s=(e=i.connectedEdges()).filter(function(t){return t.target().same(i)&&r.has(t)}),o=e.filter(function(t){return t.source().same(i)&&r.has(t)}),a=s.length,e=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-t)*Math.pow(l,t),outdegree:Math.pow(e,1-t)*Math.pow(c,t)}}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-t)*Math.pow(p,t)}},"degreeCentrality")}).dc=J.degreeCentrality,J.dcn=J.degreeCentralityNormalised=J.degreeCentralityNormalized,H8t=k7t({harmonic:!0,weight:me(function(){return 1},"weight"),directed:!1,root:null}),(RAt={closenessCentralityNormalized:me(function(t){for(var e=(t=H8t(t)).harmonic,r=t.weight,t=t.directed,i=this.cy(),n={},a=0,s=this.nodes(),o=this.floydWarshall({weight:r,directed:t}),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+=e?1/c:c);a<(h=e?h:1/h)&&(a=h),n[u.id()]=h}return{closeness:me(function(t){return 0==a?0:(t=(Pkt(t)?i.filter(t)[0]:t).id(),n[t]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:me(function(t){for(var e=(t=H8t(t)).root,r=t.weight,i=t.directed,n=t.harmonic,e=this.filter(e)[0],a=this.dijkstra({root:e,weight:r,directed:i}),s=0,o=this.nodes(),l=0;l<o.length;l++){var c=o[l];c.same(e)||(c=a.distanceTo(c),s+=n?1/c:c)}return n?s:1/s},"closenessCentrality")}).cc=RAt.closenessCentrality,RAt.ccn=RAt.closenessCentralityNormalised=RAt.closenessCentralityNormalized,V8t=k7t({weight:null,directed:!1}),(t9t={betweennessCentrality:me(function(t){for(var e=(t=V8t(t)).directed,w=t.weight,k=null!=w,T=this.cy(),E=this.nodes(),C={},r={},i=0,_={set:me(function(t,e){i<(r[t]=e)&&(i=e)},"set"),get:me(function(t){return r[t]},"get")},n=0;n<E.length;n++){var a=E[n],s=a.id();C[s]=(e?a.outgoers():a.openNeighborhood()).nodes(),_.set(s,0)}for(var o=me(function(t){for(var e=E[t].id(),r=[],i={},n={},a={},s=new I7t(function(t,e){return a[t]-a[e]}),o=0;o<E.length;o++){var l=E[o].id();i[l]=[],a[l]=1/(n[l]=0)}for(n[e]=1,a[e]=0,s.push(e);!s.empty();){var c=s.pop();if(r.push(c),k)for(var h=0;h<C[c].length;h++){var u=C[c][h],d=(0<(p=T.getElementById(c)).edgesTo(u).length?p.edgesTo(u):u.edgesTo(p))[0],p=w(d),u=u.id();a[c]+p<a[u]&&(a[u]=a[c]+p,s.nodes.indexOf(u)<0?s.push(u):s.updateItem(u),n[u]=0,i[u]=[]),a[u]==a[c]+p&&(n[u]=n[u]+n[c],i[u].push(c))}else for(var g=0;g<C[c].length;g++){var f=C[c][g].id();a[f]==1/0&&(s.push(f),a[f]=a[c]+1),a[f]==a[c]+1&&(n[f]=n[f]+n[c],i[f].push(c))}}for(var m={},y=0;y<E.length;y++)m[E[y].id()]=0;for(;0<r.length;){for(var v=r.pop(),x=0;x<i[v].length;x++){var b=i[v][x];m[b]=m[b]+n[b]/n[v]*(1+m[v])}v!=E[t].id()&&_.set(v,_.get(v)+m[v])}},"_loop"),l=0;l<E.length;l++)o(l);return(t={betweenness:me(function(t){return t=T.collection(t).id(),_.get(t)},"betweenness"),betweennessNormalized:me(function(t){return 0==i?0:(t=T.collection(t).id(),_.get(t)/i)},"betweennessNormalized")}).betweennessNormalised=t.betweennessNormalized,t},"betweennessCentrality")}).bc=t9t.betweennessCentrality,X8t=k7t({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),K8t=me(function(t){return X8t(t)},"setOptions"),Z8t=me(function(t,e){for(var r=0,i=0;i<e.length;i++)r+=e[i](t);return r},"getSimilarity"),Q8t=me(function(t,e,r){for(var i=0;i<e;i++)t[i*e+i]=r},"addLoops"),J8t=me(function(t,e){for(var r=0;r<e;r++){for(var i=0,n=0;n<e;n++)i+=t[n*e+r];for(var a=0;a<e;a++)t[a*e+r]=t[a*e+r]/i}},"normalize"),tEt=me(function(t,e,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]+=t[n*r+s]*e[s*r+o]}return i},"mmult"),eEt=me(function(t,e,r){for(var i=t.slice(0),n=1;n<r;n++)t=tEt(t,i,e);return t},"expand"),rEt=me(function(t,e,r){for(var i=new Array(e*e),n=0;n<e*e;n++)i[n]=Math.pow(t[n],r);return J8t(i,e),i},"inflate"),iEt=me(function(t,e,r,i){for(var n=0;n<r;n++)if(Math.round(t[n]*Math.pow(10,i))/Math.pow(10,i)!=Math.round(e[n]*Math.pow(10,i))/Math.pow(10,i))return!1;return!0},"hasConverged"),nEt=me(function(t,e,r,i){for(var n=[],a=0;a<e;a++){for(var s=[],o=0;o<e;o++)0<Math.round(1e3*t[a*e+o])/1e3&&s.push(r[o]);0!==s.length&&n.push(i.collection(s))}return n},"assign"),aEt=me(function(t,e){for(var r=0;r<t.length;r++)if(!e[r]||t[r].id()!==e[r].id())return!1;return!0},"isDuplicate"),sEt=me(function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t.length;r++)e!=r&&aEt(t[e],t[r])&&t.splice(r,1);return t},"removeDuplicates"),pAt={markovClustering:pAt=me(function(t){for(var e=this.nodes(),r=this.edges(),i=this.cy(),n=K8t(t),a={},s=0;s<e.length;s++)a[e[s].id()]=s;for(var o,l=e.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=Z8t(f,n.attributes);h[p*l+g]+=f,h[g*l+p]+=f}Q8t(h,l,n.multFactor),J8t(h,l);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,o=eEt(h,l,n.expandFactor),h=rEt(o,l,n.inflateFactor),iEt(h,o,c,4)||(m=!0),y++;return t=nEt(h,l,e,i),sEt(t)},"markovClustering"),mcl:pAt},oEt=me(function(t){return t},"identity"),lEt=me(function(t,e){return Math.abs(e-t)},"absDiff"),cEt=me(function(t,e,r){return t+lEt(e,r)},"addAbsDiff"),hEt=me(function(t,e,r){return t+Math.pow(r-e,2)},"addSquaredDiff"),uEt=me(function(t){return Math.sqrt(t)},"sqrt"),dEt=me(function(t,e,r){return Math.max(t,lEt(e,r))},"maxAbsDiff"),pEt=me(function(t,e,r,i,n){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:oEt,s=i,o=0;o<t;o++)s=n(s,e(o),r(o));return a(s)},"getDistance"),(gEt={euclidean:me(function(t,e,r){return 2<=t?pEt(t,e,r,0,hEt,uEt):pEt(t,e,r,0,cEt)},"euclidean"),squaredEuclidean:me(function(t,e,r){return pEt(t,e,r,0,hEt)},"squaredEuclidean"),manhattan:me(function(t,e,r){return pEt(t,e,r,0,cEt)},"manhattan"),max:me(function(t,e,r){return pEt(t,e,r,-1/0,dEt)},"max")})["squared-euclidean"]=gEt.squaredEuclidean,gEt.squaredeuclidean=gEt.squaredEuclidean,me(e6t,"clusteringDistance"),fEt=k7t({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),mEt=me(function(t){return fEt(t)},"setOptions"),yEt=me(function(t,e,r,i,n){var n="kMedoids"!==n?function(t){return r[t]}:function(t){return i[t](r)},a=me(function(t){return i[t](e)},"getQ");return e6t(t,i.length,n,a,r,e)},"getDist"),vEt=me(function(t,e,r){for(var i=r.length,n=new Array(i),a=new Array(i),s=new Array(e),o=null,l=0;l<i;l++)n[l]=t.min(r[l]).value,a[l]=t.max(r[l]).value;for(var c=0;c<e;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"),xEt=me(function(t,e,r,i,n){for(var a=1/0,s=0,o=0;o<e.length;o++){var l=yEt(r,t,e[o],i,n);l<a&&(a=l,s=o)}return s},"classify"),bEt=me(function(t,e,r){for(var i=[],n=null,a=0;a<e.length;a++)r[(n=e[a]).id()]===t&&i.push(n);return i},"buildCluster"),wEt=me(function(t,e,r){return Math.abs(e-t)<=r},"haveValuesConverged"),kEt=me(function(t,e,r){for(var i=0;i<t.length;i++)for(var n=0;n<t[i].length;n++)if(r<Math.abs(t[i][n]-e[i][n]))return!1;return!0},"haveMatricesConverged"),TEt=me(function(t,e,r){for(var i=0;i<r;i++)if(t===e[i])return!0;return!1},"seenBefore"),EEt=me(function(t,e){var r=new Array(e);if(t.length<50)for(var i=0;i<e;i++){for(var n=t[Math.floor(Math.random()*t.length)];TEt(n,r,i);)n=t[Math.floor(Math.random()*t.length)];r[i]=n}else for(var a=0;a<e;a++)r[a]=t[Math.floor(Math.random()*t.length)];return r},"randomMedoids"),CEt=me(function(t,e,r){for(var i=0,n=0;n<e.length;n++)i+=yEt("manhattan",e[n],t,r,"kMedoids");return i},"findCost"),kAt=me(function(t){for(var e=this.cy(),r=this.nodes(),i=null,n=mEt(t),a=new Array(n.k),s={},o=n.testMode?"number"==typeof n.testCentroids?(n.testCentroids,vEt(r,n.k,n.attributes)):"object"===A3t(n.testCentroids)?n.testCentroids:vEt(r,n.k,n.attributes):vEt(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()]=xEt(i,o,n.distance,n.attributes,"kMeans");for(var l=!1,u=0;u<n.k;u++){var d=bEt(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,wEt(f[y],g[y],n.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=e.collection(d)}}c++}return a},"kMeans"),e9t=me(function(t){var e,r,i=this.cy(),n=this.nodes(),a=null,s=mEt(t),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(e="object"===A3t(s.testCentroids)?s.testCentroids:EEt(n,s.k)):e=EEt(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()]=xEt(a,e,s.distance,s.attributes,"kMedoids");for(var h=!1,p=0;p<e.length;p++){var g=bEt(p,n,l);if(0!==g.length){c[p]=CEt(e[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=CEt(g[f],g,s.attributes))<c[p]&&(c[p]=r,e[p]=g[f],h=!0);o[p]=i.collection(g)}}u++}return o},"kMedoids"),_Et=me(function(t,e,r,i,n){for(var a=0;a<e.length;a++)for(var s=0;s<t.length;s++)i[a][s]=Math.pow(r[a][s],n.m);for(var o=0;o<t.length;o++)for(var l=0;l<n.attributes.length;l++){for(var c=0,h=0,u=0;u<e.length;u++)c+=i[u][o]*n.attributes[l](e[u]),h+=i[u][o];t[o][l]=c/h}},"updateCentroids"),SEt=me(function(t,e,r,i,n){for(var a=0;a<t.length;a++)e[a]=t[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=yEt(n.distance,i[h],r[c],n.attributes,"cmeans"),o=yEt(n.distance,i[h],r[d],n.attributes,"cmeans"),u+=Math.pow(s/o,l);t[h][c]=1/u}},"updateMembership"),AEt=me(function(t,e,r,i){for(var n=new Array(r.k),a=0;a<n.length;a++)n[a]=[];for(var s=0;s<e.length;s++){for(var o=-1/0,l=-1,c=0;c<e[0].length;c++)e[s][c]>o&&(o=e[s][c],l=c);n[l].push(t[s])}for(var h=0;h<n.length;h++)n[h]=i.collection(n[h]);return n},"assign"),MAt=me(function(t){for(var e=this.cy(),r=this.nodes(),i=mEt(t),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,_Et(d,r,s,g,i),SEt(s,n,d,r,i),kEt(s,n,i.sensitivityThreshold)||(m=!0),y++;return{clusters:AEt(r,s,i,e),degreeOfMembership:s}},"fuzzyCMeans"),LEt=k7t({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(kAt={kMeans:kAt,kMedoids:e9t,fuzzyCMeans:MAt,fcm:MAt}),dendrogramDepth:0,attributes:[]}),NEt={single:"min",complete:"max"},IEt=me(function(t){var t=LEt(t),e=NEt[t.linkage];return null!=e&&(t.linkage=e),t},"setOptions"),REt=me(function(t,e,r,i,n){for(var a,s=0,o=1/0,l=n.attributes,c=me(function(e,r){return e6t(n.distance,l.length,function(t){return l[t](e)},function(t){return l[t](r)},e,r)},"getDist"),h=0;h<t.length;h++){var u=t[h].key,d=r[u][i[u]];d<o&&(s=u,o=d)}if("threshold"===n.mode&&o>=n.threshold||"dendrogram"===n.mode&&1===t.length)return!1;var p=e[s],g=e[i[s]],f="dendrogram"===n.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};t[p.index]=f,t.splice(g.index,1),e[p.key]=f;for(var m=0;m<t.length;m++){var y=t[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<t.length;v++){var x=t[v].key;if(i[x]===p.key||i[x]===g.key){for(var b=x,w=0;w<t.length;w++){var k=t[w].key;r[x][k]<r[x][b]&&(b=k)}i[x]=b}t[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),MEt=me(function t(e,r,i){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},"getAllChildren"),DEt=me(function t(e,r){var i,n,a;return e?e.left&&e.right?(i=t(e.left,r),n=t(e.right,r),a=r.add({group:"nodes",data:{id:i+","+n}}),r.add({group:"edges",data:{source:i,target:a.id()}}),r.add({group:"edges",data:{source:n,target:a.id()}}),a.id()):e.value?e.value.id():void 0:""},"buildDendrogram"),OEt=me(function t(e,r,i){var n,a,s;return e?(n=[],a=[],0===r?(e.left&&MEt(e.left,n),e.right&&MEt(e.right,a),s=n.concat(a),[i.collection(s)]):1===r?e.value?[i.collection(e.value)]:(e.left&&MEt(e.left,n),e.right&&MEt(e.right,a),[i.collection(n),i.collection(a)]):e.value?[i.collection(e.value)]:(e.left&&(n=t(e.left,r-1,i)),e.right&&(a=t(e.right,r-1,i)),n.concat(a))):[]},"buildClustersFromTree"),e9t=me(function(t){for(var r=this.cy(),e=this.nodes(),i=IEt(t),n=i.attributes,a=me(function(e,r){return e6t(i.distance,n.length,function(t){return n[t](e)},function(t){return n[t](r)},e,r)},"getDist"),s=[],o=[],l=[],c=[],h=0;h<e.length;h++){var u={value:"dendrogram"===i.mode?e[h]:[e[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=REt(s,c,o,l,i);m;)m=REt(s,c,o,l,i);return"dendrogram"===i.mode?(f=OEt(s[0],i.dendrogramDepth,r),i.addDendrogram&&DEt(s[0],r)):(f=new Array(s.length),s.forEach(function(t,e){t.key=t.index=null,f[e]=r.collection(t.value)})),f},"hierarchicalClustering"),MAt={hierarchicalClustering:e9t,hca:e9t},PEt=k7t({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),BEt=me(function(t){var e=t.damping,r=t.preference;return.5<=e&&e<1||p7t("Damping must range on [0.5, 1). Got: ".concat(e)),(e=["median","mean","min","max"]).some(function(t){return t===r})||at(r)||p7t("Preference must be one of [".concat(e.map(function(t){return"'".concat(t,"'")}).join(", "),"] or a number. Got: ").concat(r)),PEt(t)},"setOptions"),FEt=me(function(t,e,r,i){var n=me(function(t,e){return i[e](t)},"attr");return-e6t(t,i.length,function(t){return n(e,t)},function(t){return n(r,t)},e,r)},"getSimilarity"),$Et=me(function(t,e){return"median"===e?Y7t(t):"mean"===e?W7t(t):"min"===e?q7t(t):"max"===e?j7t(t):e},"getPreference"),zEt=me(function(t,e,r){for(var i=[],n=0;n<t;n++)0<e[n*t+n]+r[n*t+n]&&i.push(n);return i},"findExemplars"),GEt=me(function(t,e,r){for(var i=[],n=0;n<t;n++){for(var a=-1,s=-1/0,o=0;o<r.length;o++){var l=r[o];e[n*t+l]>s&&(s=e[n*t+(a=l)])}0<a&&i.push(a)}for(var c=0;c<r.length;c++)i[r[c]]=r[c];return i},"assignClusters"),UEt=me(function(t,e,r){for(var i=GEt(t,e,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+=e[a[u]*t+a[c]];l<h&&(o=c,l=h)}r[n]=a[o]}return GEt(t,e,r)},"assign"),e9t=me(function(P){for(var B=this.cy(),t=this.nodes(),e=BEt(P),F={},r=0;r<t.length;r++)F[t[r].id()]=r;for(var i,n=(i=t.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]=FEt(e.distance,t[o],t[l],e.attributes));for(var $=$Et(a,e.preference),c=0;c<i;c++)a[c*i+c]=$;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,x=new Array(i*e.minIterations),z=0;z<x.length;z++)x[z]=0;for(v=0;v<e.maxIterations;v++){for(var b=0;b<i;b++){for(var w,k=-1/0,T=-1/0,E=-1,C=0;C<i;C++)g[C]=h[b*i+C],k<=(w=d[b*i+C]+a[b*i+C])?(T=k,k=w,E=C):T<w&&(T=w);for(var _=0;_<i;_++)h[b*i+_]=(1-e.damping)*(a[b*i+_]-k)+e.damping*g[_];h[b*i+E]=(1-e.damping)*(a[b*i+E]-T)+e.damping*g[E]}for(var S=0;S<i;S++){for(var A=0,L=0;L<i;L++)g[L]=d[L*i+S],f[L]=Math.max(0,h[L*i+S]),A+=f[L];A-=f[S],f[S]=h[S*i+S],A+=f[S];for(var N=0;N<i;N++)d[N*i+S]=(1-e.damping)*Math.min(0,A-f[N])+e.damping*g[N];d[S*i+S]=(1-e.damping)*(A-f[S])+e.damping*g[S]}for(var G=0,I=0;I<i;I++){var U=0<d[I*i+I]+h[I*i+I]?1:0;G+=x[v%e.minIterations*i+I]=U}if(0<G&&(v>=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,R=0;R<i;R++){for(var j=m[R]=0;j<e.minIterations;j++)m[R]+=x[j*i+R];0!==m[R]&&m[R]!==e.minIterations||q++}if(q===i)break}}for(var M=zEt(i,h,d),W=UEt(i,a,M),Y={},H=0;H<M.length;H++)Y[M[H]]=[];for(var D=0;D<t.length;D++){var V=W[F[t[D].id()]];null!=V&&Y[V].push(t[D])}for(var X=new Array(M.length),O=0;O<M.length;O++)X[O]=B.collection(Y[M[O]]);return X},"affinityPropagation"),qEt=k7t({root:void 0,directed:!(e9t={affinityPropagation:e9t,ap:e9t})}),EAt={hierholzer:me(function(t){$kt(t)||(t={root:(r=arguments)[0],directed:r[1]});var a,s,e,r=qEt(t),t=r.root,o=r.directed,l=!1,c=(t&&(e=(Pkt(t)?this.filter(t):t)[0].id()),{}),h={},i=(o?this.forEach(function(t){var e,r,i,n=t.id();t.isNode()?(r=t.indegree(!0),i=(e=t.outdegree(!0))-r,1==(r-=e)?a?l=!0:a=n:1==i?s?l=!0:s=n:(1<i||1<r)&&(l=!0),c[n]=[],t.outgoers().forEach(function(t){t.isEdge()&&c[n].push(t.id())})):h[n]=[void 0,t.target().id()]}):this.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(a?s?l=!0:s=e:a=e),c[e]=[],t.connectedEdges().forEach(function(t){return c[e].push(t.id())})):h[e]=[t.source().id(),t.target().id()]}),{found:!1,trail:void 0});if(!l){if(s&&a)if(o){if(e&&s!=e)return i;e=s}else{if(e&&s!=e&&a!=e)return i;e=e||s}else e=e||this[0].id();for(var n,u=me(function(t){for(var e,r,i,n=t,a=[t];c[n].length;)e=c[n].shift(),r=h[e][0],n!=(i=h[e][1])?(c[i]=c[i].filter(function(t){return t!=e}),n=i):o||n==r||(c[r]=c[r].filter(function(t){return t!=e}),n=r),a.unshift(e),a.unshift(n);return a},"walk"),d=[],p=[],p=u(e);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")},YAt={hopcroftTarjanBiconnected:YAt=me(function(){var o=this,l={},c=0,h=0,u=[],d=[],p={},g=me(function(t,e){for(var r=d.length-1,i=[],n=o.spawn();d[r].x!=t||d[r].y!=e;)i.push(d.pop().edge),r--;i.push(d.pop().edge),i.forEach(function(t){var e=t.connectedNodes().intersection(o);n.merge(t),e.forEach(function(t){var e=t.id(),r=t.connectedEdges().intersection(o);n.merge(t),l[e].cutVertex?n.merge(r.filter(function(t){return t.isLoop()})):n.merge(r)})}),u.push(n)},"buildComponent"),e=me(function e(r,i,n){r===n&&(h+=1),l[i]={id:c,low:c++,cutVertex:!1};var a,s,t=o.getElementById(i).connectedEdges().intersection(o);0===t.size()?u.push(o.spawn(o.getElementById(i))):t.forEach(function(t){s=t.source().id(),a=t.target().id(),(a=s===i?a:s)!==n&&(s=t.id(),p[s]||(p[s]=!0,d.push({x:i,y:a,edge:t})),a in l?l[i].low=Math.min(l[i].low,l[a].id):(e(r,a,i),l[i].low=Math.min(l[i].low,l[a].low),l[i].id<=l[a].low&&(l[i].cutVertex=!0,g(i,a))))})},"biconnectedSearch"),t=(o.forEach(function(t){!t.isNode()||(t=t.id())in l||(h=0,e(t,t),l[t].cutVertex=1<h)}),Object.keys(l).filter(function(t){return l[t].cutVertex}).map(function(t){return o.getElementById(t)}));return{cut:o.spawn(t),components:u}},"hopcroftTarjanBiconnected"),htbc:YAt,htb:YAt,hopcroftTarjanBiconnectedComponents:YAt},a9t=me(function(){var a=this,s={},o=0,l=[],c=[],h=a.spawn(a),e=me(function e(r){if(c.push(r),s[r]={index:o,low:o++,explored:!1},a.getElementById(r).connectedEdges().intersection(a).forEach(function(t){(t=t.target().id())!==r&&(t in s||e(t),s[t].explored||(s[r].low=Math.min(s[r].low,s[t].low)))}),s[r].index===s[r].low){for(var t=a.spawn();;){var i=c.pop();if(t.merge(a.getElementById(i)),s[i].low=s[r].index,s[i].explored=!0,i===r)break}var n=t.edgesWith(t),n=t.merge(n);l.push(n),h=h.difference(n)}},"stronglyConnectedSearch");return a.forEach(function(t){!t.isNode()||(t=t.id())in s||e(t)}),{cut:h,components:l}},"tarjanStronglyConnected"),jEt={},[r9t,DAt,c9t,PAt,HAt,IAt,OAt,GSt,J,RAt,t9t,pAt,kAt,MAt,e9t,EAt,YAt,{tarjanStronglyConnected:a9t,tsc:a9t,tscc:a9t,tarjanStronglyConnectedComponents:a9t}].forEach(function(t){lTt(jEt,t)}),WEt=0,(YEt=me(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=WEt,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:me(function(t){return HEt(this,1,"fulfillValue",t)},"fulfill"),reject:me(function(t){return HEt(this,2,"rejectReason",t)},"reject"),then:me(function(t,e){var r=new YEt;return this.onFulfilled.push(KEt(t,r,"fulfill")),this.onRejected.push(KEt(e,r,"reject")),VEt(this),r.proxy},"then")},HEt=me(function(t,e,r,i){return t.state===WEt&&(t.state=e,t[r]=i,VEt(t)),t},"deliver"),VEt=me(function(t){1===t.state?XEt(t,"onFulfilled",t.fulfillValue):2===t.state&&XEt(t,"onRejected",t.rejectReason)},"execute"),XEt=me(function(t,e,r){var i;0!==t[e].length&&(i=t[e],t[e]=[],t=me(function(){for(var t=0;t<i.length;t++)i[t](r)},"func"),"function"==typeof setImmediate?setImmediate(t):setTimeout(t,0))},"execute_handlers"),KEt=me(function(r,i,n){return function(t){if("function"!=typeof r)i[n].call(i,t);else{var e;try{e=r(t)}catch(t){return void i.reject(t)}ZEt(i,e)}}},"resolver"),ZEt=me(function e(r,i){if(r===i||r.proxy===i)r.reject(new TypeError("cannot resolve promise with itself"));else{var t;if("object"===A3t(i)&&null!==i||"function"==typeof i)try{t=i.then}catch(t){return void r.reject(t)}if("function"==typeof t){var n=!1;try{t.call(i,function(t){n||(n=!0,t===i?r.reject(new TypeError("circular thenable chain")):e(r,t))},function(t){n||(n=!0,r.reject(t))})}catch(t){n||r.reject(t)}}else r.fulfill(i)}},"resolve"),YEt.all=function(o){return new YEt(function(r,i){for(var n=new Array(o.length),a=0,s=me(function(t,e){n[t]=e,++a===o.length&&r(n)},"fulfill"),t=0;t<o.length;t++)(e=>{var t=o[e];null!=t&&null!=t.then?t.then(function(t){s(e,t)},function(t){i(t)}):s(e,t)})(t)})},YEt.resolve=function(r){return new YEt(function(t,e){t(r)})},YEt.reject=function(r){return new YEt(function(t,e){e(r)})},QEt=typeof Promise<"u"?Promise:YEt,JEt=me(function(t,e,r){var i=Ykt(t),n=!i;(e=this._private=lTt({duration:1e3},e,r)).target=t,e.style=e.style||e.css,e.started=!1,e.playing=!1,e.hooked=!1,e.applying=!1,e.progress=0,e.completes=[],e.frames=[],e.complete&&Bkt(e.complete)&&e.completes.push(e.complete),n&&(r=t.position(),e.startPosition=e.startPosition||{x:r.x,y:r.y},e.startStyle=e.startStyle||t.cy().style().getAnimationStartStyle(t,e.style)),i&&(n=t.pan(),e.startPan={x:n.x,y:n.y},e.startZoom=t.zoom()),this.length=1,this[0]=this},"Animation"),r9t=JEt.prototype,lTt(r9t,{instanceString:me(function(){return"animation"},"instanceString"),hook:me(function(){var t,e=this._private;return e.hooked||(t=e.target._private.animation,(e.queue?t.queue:t.current).push(this),qkt(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0),this},"hook"),play:me(function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},"play"),playing:me(function(){return this._private.playing},"playing"),apply:me(function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},"apply"),applying:me(function(){return this._private.applying},"applying"),pause:me(function(){var t=this._private;return t.playing=!1,t.started=!1,this},"pause"),stop:me(function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},"stop"),rewind:me(function(){return this.progress(0)},"rewind"),fastforward:me(function(){return this.progress(1)},"fastforward"),time:me(function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},"time"),progress:me(function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},"progress"),completed:me(function(){return 1===this._private.progress},"completed"),reverse:me(function(){var i=this._private,t=i.playing,e=(t&&this.pause(),i.progress=1-i.progress,i.started=!1,me(function(t,e){var r=i[t];null!=r&&(i[t]=i[e],i[e]=r)},"swap"));if(e("zoom","startZoom"),e("pan","startPan"),e("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 t&&this.play(),this},"reverse"),promise:me(function(t){var r,e=this._private;switch(t){case"frame":r=e.frames;break;default:case"complete":case"completed":r=e.completes}return new QEt(function(t,e){r.push(function(){t()})})},"promise")}),r9t.complete=r9t.completed,r9t.run=r9t.play,r9t.running=r9t.playing,DAt={animated:me(function(){return me(function(){var t=void 0!==this.length?this:[this];return!!(this._private.cy||this).styleEnabled()&&((t=t[0])?0<t._private.animation.current.length:void 0)},"animatedImpl")},"animated"),clearQueue:me(function(){return me(function(){var t=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled())for(var e=0;e<t.length;e++)t[e]._private.animation.queue=[];return this},"clearQueueImpl")},"clearQueue"),delay:me(function(){return me(function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this},"delayImpl")},"delay"),delayAnimation:me(function(){return me(function(t,e){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:e}):this},"delayAnimationImpl")},"delayAnimation"),animation:me(function(){return me(function(t,e){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(t=lTt({},t,e),!(e=0===Object.keys(t).length)){switch(void 0===t.duration&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200}a&&(t.style=s.getPropsList(t.style||t.css),t.css=void 0),a&&null!=t.renderedPosition&&(e=t.renderedPosition,s=n.pan(),a=n.zoom(),t.position=G7t(e,a,s)),r&&null!=t.panBy&&(e=t.panBy,a=n.pan(),t.pan={x:a.x+e.x,y:a.y+e.y}),s=t.center||t.centre,r&&null!=s&&null!=(a=n.getCenterPan(s.eles,t.zoom))&&(t.pan=a),r&&null!=t.fit&&(e=t.fit,null!=(s=n.getFitViewport(e.eles||e.boundingBox,e.padding)))&&(t.pan=s.pan,t.zoom=s.zoom),r&&$kt(t.zoom)&&(null!=(a=n.getZoomedViewport(t.zoom))?(a.zoomed&&(t.zoom=a.zoom),a.panned&&(t.pan=a.pan)):t.zoom=null)}return new JEt(i[0],t)},"animationImpl")},"animation"),animate:me(function(){return me(function(t,e){var r=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled()){e&&(t=lTt({},t,e));for(var i=0;i<r.length;i++){var n=r[i],a=n.animated()&&(void 0===t.queue||t.queue);n.animation(t,a?{queue:!0}:void 0).play()}}return this},"animateImpl")},"animate"),stop:me(function(){return me(function(t,e){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;e&&(l.duration=0)}t&&(a.animation.queue=[]),e||(a.animation.current=[])}i.notify("draw")}return this},"stopImpl")},"stop")},c9t=Array.isArray,tCt=c9t,eCt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rCt=/^\w*$/,me(r6t,"isKey"),iCt=r6t,me(i6t,"isFunction"),nCt=i6t,PAt=xTt["__core-js_shared__"],s=/[^.]+$/.exec((HAt=PAt)&&HAt.keys&&HAt.keys.IE_PROTO||""),aCt=s?"Symbol(src)_1."+s:"",me(n6t,"isMasked"),sCt=n6t,IAt=Function.prototype,oCt=IAt.toString,me(a6t,"toSource"),lCt=a6t,OAt=/[\\^$.*+?()[\]{}|]/g,cCt=/^\[object .+?Constructor\]$/,GSt=Function.prototype,J=Object.prototype,RAt=GSt.toString,t9t=J.hasOwnProperty,hCt=RegExp("^"+RAt.call(t9t).replace(OAt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me(s6t,"baseIsNative"),uCt=s6t,me(o6t,"getValue$1"),dCt=o6t,me(l6t,"getNative"),pAt=(pCt=l6t)(Object,"create"),gCt=pAt,me(c6t,"hashClear"),kAt=c6t,me(h6t,"hashDelete"),MAt=h6t,e9t=Object.prototype,fCt=e9t.hasOwnProperty,me(u6t,"hashGet"),EAt=u6t,mCt=Object.prototype.hasOwnProperty,me(d6t,"hashHas"),YAt=d6t,me(p6t,"hashSet"),a9t=p6t,me(g6t,"Hash"),g6t.prototype.clear=kAt,g6t.prototype.delete=MAt,g6t.prototype.get=EAt,g6t.prototype.has=YAt,g6t.prototype.set=a9t,yCt=g6t,me(f6t,"listCacheClear"),r9t=f6t,me(m6t,"eq"),vCt=m6t,me(y6t,"assocIndexOf"),xCt=y6t,c9t=Array.prototype,bCt=c9t.splice,me(v6t,"listCacheDelete"),PAt=v6t,me(x6t,"listCacheGet"),HAt=x6t,me(b6t,"listCacheHas"),IAt=b6t,me(w6t,"listCacheSet"),GSt=w6t,me(k6t,"ListCache"),k6t.prototype.clear=r9t,k6t.prototype.delete=PAt,k6t.prototype.get=HAt,k6t.prototype.has=IAt,k6t.prototype.set=GSt,wCt=k6t,J=pCt(xTt,"Map"),kCt=J,me(T6t,"mapCacheClear"),RAt=T6t,me(E6t,"isKeyable"),TCt=E6t,me(C6t,"getMapData"),ECt=C6t,me(_6t,"mapCacheDelete"),t9t=_6t,me(S6t,"mapCacheGet"),OAt=S6t,me(A6t,"mapCacheHas"),pAt=A6t,me(L6t,"mapCacheSet"),e9t=L6t,me(N6t,"MapCache"),N6t.prototype.clear=RAt,N6t.prototype.delete=t9t,N6t.prototype.get=OAt,N6t.prototype.has=pAt,N6t.prototype.set=e9t,CCt=N6t,_Ct="Expected a function",me(I6t,"memoize"),I6t.Cache=CCt,SCt=I6t,me(R6t,"memoizeCapped"),ACt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LCt=/\\(\\)?/g,kAt=R6t(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(ACt,function(t,e,r,i){n.push(r?i.replace(LCt,"$1"):e||t)}),n}),NCt=kAt,me(M6t,"arrayMap"),ICt=M6t,RCt=1/0,MAt=Q?Q.prototype:void 0,MCt=MAt?MAt.toString:void 0,me(D6t,"baseToString"),DCt=D6t,me(O6t,"toString$1"),OCt=O6t,me(P6t,"castPath"),PCt=P6t,me(B6t,"toKey"),BCt=B6t,me(F6t,"baseGet"),FCt=F6t,me($6t,"get"),$Ct=$6t,EAt=(()=>{try{var t=pCt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),zCt=EAt,me(z6t,"baseAssignValue"),GCt=z6t,YAt=Object.prototype,UCt=YAt.hasOwnProperty,me(G6t,"assignValue"),qCt=G6t,jCt=/^(?:0|[1-9]\d*)$/,me(U6t,"isIndex"),WCt=U6t,me(q6t,"baseSet"),YCt=q6t,me(j6t,"set"),HCt=j6t,me(W6t,"copyArray"),VCt=W6t,me(Y6t,"toPath"),XCt=Y6t,a9t={data:me(function(b){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:me(function(t){},"beforeGet"),beforeSet:me(function(t,e){},"beforeSet"),onSet:me(function(t){},"onSet"),canSet:me(function(t){return!0},"canSet")};return b=lTt({},t,b),me(function(t,e){var r,i=b,n=this,a=void 0!==n.length,s=a?n:[n],o=a?n[0]:n;if(Pkt(t)){var l,c=-1!==t.indexOf(".")&&XCt(t);if(i.allowGetting&&void 0===e)return o&&(i.beforeGet(o),l=c&&void 0===o._private[i.field][t]?$Ct(o._private[i.field],c):o._private[i.field][t]),l;if(i.allowSetting&&void 0!==e&&!i.immutableKeys[t]){a=R3t({},t,e),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][t]?HCt(d._private[i.field],c,e):d._private[i.field][t]=e)}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}}else if(i.allowSetting&&$kt(t)){var p=t,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 x=s[v];i.canSet(x)&&(x._private[i.field][m]=y)}}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}else if(i.allowBinding&&Bkt(t))n.on(i.bindingEvent,t);else if(i.allowGetting&&void 0===t)return o&&(i.beforeGet(o),r=o._private[i.field]),r;return n},"dataImpl")},"data"),removeData:me(function(f){return f=lTt({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),me(function(t){var e=f,r=void 0!==this.length?this:[this];if(Pkt(t)){for(var i=t.split(/\s+/),n=i.length,a=0;a<n;a++){var s=i[a];if(!Xkt(s)&&!e.immutableKeys[s])for(var o=0,l=r.length;o<l;o++)r[o]._private[e.field][s]=void 0}e.triggerEvent&&this[e.triggerFnName](e.event)}else if(void 0===t){for(var c=0,h=r.length;c<h;c++)for(var u=r[c]._private[e.field],d=Object.keys(u),p=0;p<d.length;p++){var g=d[p];e.immutableKeys[g]||(u[g]=void 0)}e.triggerEvent&&this[e.triggerFnName](e.event)}return this},"removeDataImpl")},"removeData")},c9t={eventAliasesOn:me(function(t){t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(t,e){var n=this,a=Array.prototype.slice.call(arguments,0);return new QEt(function(e,t){var r=me(function(t){n.off.apply(n,i),e(t)},"callback"),i=(r=a.concat([r])).concat([]);n.on.apply(n,r)})}},"eventAliasesOn")},KCt={},[DAt,a9t,c9t].forEach(function(t){lTt(KCt,t)}),r9t={animate:KCt.animate(),animation:KCt.animation(),animated:KCt.animated(),clearQueue:KCt.clearQueue(),delay:KCt.delay(),delayAnimation:KCt.delayAnimation(),stop:KCt.stop()},(PAt={classes:me(function(t){var e;if(void 0===t)return e=[],this[0]._private.classes.forEach(function(t){return e.push(t)}),e;Fkt(t)||(t=(t||"").match(/\S+/g)||[]);for(var r=[],i=new L7t(t),n=0;n<this.length;n++){for(var a=this[n],s=a._private,o=s.classes,l=!1,c=0;c<t.length;c++){var h=t[c];if(!o.has(h)){l=!0;break}}(l=l||o.size!==t.length)&&(s.classes=i,r.push(a))}return 0<r.length&&this.spawn(r).updateStyle().emit("class"),this},"classes"),addClass:me(function(t){return this.toggleClass(t,!0)},"addClass"),hasClass:me(function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},"hasClass"),toggleClass:me(function(t,e){Fkt(t)||(t=t.match(/\S+/g)||[]);for(var r=void 0===e,i=[],n=0,a=this.length;n<a;n++)for(var s=this[n],o=s._private.classes,l=!1,c=0;c<t.length;c++){var h=t[c],u=o.has(h),d=!1;e||r&&!u?(o.add(h),d=!0):(!e||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:me(function(t){return this.toggleClass(t,!1)},"removeClass"),flashClass:me(function(t,e){var r=this;if(null==e)e=250;else if(0===e)return r;return r.addClass(t),setTimeout(function(){r.removeClass(t)},e),r},"flashClass")}).className=PAt.classNames=PAt.classes,(ZCt={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:aTt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+ZCt.metaChar+"))+",ZCt.className="(?:[\\w-]|(?:\\\\"+ZCt.metaChar+"))+",ZCt.value=ZCt.string+"|"+ZCt.number,ZCt.id=ZCt.variable;for(var e,r=ZCt.comparatorOp.split("|"),n=0;n<r.length;n++)e=r[n],ZCt.comparatorOp+="|@"+e;for(r=ZCt.comparatorOp.split("|"),n=0;n<r.length;n++)0<=(e=r[n]).indexOf("!")||"="===e||(ZCt.comparatorOp+="|\\!"+e);function o(t){return-t.tension*t.x-t.friction*t.v}function l(t,e,r){return{dx:(r={x:t.x+r.dx*e,v:t.v+r.dv*e,tension:t.tension,friction:t.friction}).v,dv:o(r)}}function h(t,e){var r=l(t,.5*e,s={dx:t.v,dv:o(t)}),i=l(t,.5*e,r),n=l(t,e,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 t.x=t.x+a*e,t.v=t.v+s*e,t}QCt=me(function(){return{checks:[]}},"newQuery"),V={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},JCt=[{selector:":selected",matches:me(function(t){return t.selected()},"matches")},{selector:":unselected",matches:me(function(t){return!t.selected()},"matches")},{selector:":selectable",matches:me(function(t){return t.selectable()},"matches")},{selector:":unselectable",matches:me(function(t){return!t.selectable()},"matches")},{selector:":locked",matches:me(function(t){return t.locked()},"matches")},{selector:":unlocked",matches:me(function(t){return!t.locked()},"matches")},{selector:":visible",matches:me(function(t){return t.visible()},"matches")},{selector:":hidden",matches:me(function(t){return!t.visible()},"matches")},{selector:":transparent",matches:me(function(t){return t.transparent()},"matches")},{selector:":grabbed",matches:me(function(t){return t.grabbed()},"matches")},{selector:":free",matches:me(function(t){return!t.grabbed()},"matches")},{selector:":removed",matches:me(function(t){return t.removed()},"matches")},{selector:":inside",matches:me(function(t){return!t.removed()},"matches")},{selector:":grabbable",matches:me(function(t){return t.grabbable()},"matches")},{selector:":ungrabbable",matches:me(function(t){return!t.grabbable()},"matches")},{selector:":animated",matches:me(function(t){return t.animated()},"matches")},{selector:":unanimated",matches:me(function(t){return!t.animated()},"matches")},{selector:":parent",matches:me(function(t){return t.isParent()},"matches")},{selector:":childless",matches:me(function(t){return t.isChildless()},"matches")},{selector:":child",matches:me(function(t){return t.isChild()},"matches")},{selector:":orphan",matches:me(function(t){return t.isOrphan()},"matches")},{selector:":nonorphan",matches:me(function(t){return t.isChild()},"matches")},{selector:":compound",matches:me(function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()},"matches")},{selector:":loop",matches:me(function(t){return t.isLoop()},"matches")},{selector:":simple",matches:me(function(t){return t.isSimple()},"matches")},{selector:":active",matches:me(function(t){return t.active()},"matches")},{selector:":inactive",matches:me(function(t){return!t.active()},"matches")},{selector:":backgrounding",matches:me(function(t){return t.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:me(function(t){return!t.backgrounding()},"matches")}].sort(function(t,e){return oTt(t.selector,e.selector)}),t_t=(()=>{for(var t,e={},r=0;r<JCt.length;r++)e[(t=JCt[r]).selector]=t.matches;return e})(),e_t=me(function(t,e){return t_t[t](e)},"stateSelectorMatches"),HAt="("+JCt.map(function(t){return t.selector}).join("|")+")",r_t=me(function(t){return t.replace(new RegExp("\\\\("+ZCt.metaChar+")","g"),function(t,e){return e})},"cleanMetaChars"),i_t=me(function(t,e,r){t[t.length-1]=r},"replaceLastQuery"),(n_t=[{name:"group",query:!0,regex:"("+ZCt.group+")",populate:me(function(t,e,r){r=M3t(r,1)[0],e.checks.push({type:V.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:HAt,populate:me(function(t,e,r){r=M3t(r,1)[0],e.checks.push({type:V.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+ZCt.id+")",populate:me(function(t,e,r){r=M3t(r,1)[0],e.checks.push({type:V.ID,value:r_t(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+ZCt.className+")",populate:me(function(t,e,r){r=M3t(r,1)[0],e.checks.push({type:V.CLASS,value:r_t(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+ZCt.variable+")\\s*\\]",populate:me(function(t,e,r){r=M3t(r,1)[0],e.checks.push({type:V.DATA_EXIST,field:r_t(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+ZCt.variable+")\\s*("+ZCt.comparatorOp+")\\s*("+ZCt.value+")\\s*\\]",populate:me(function(t,e,r){var i=(r=M3t(r,3))[0],n=r[1],r=r[2],r=null!=new RegExp("^"+ZCt.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);e.checks.push({type:V.DATA_COMPARE,field:r_t(i),operator:n,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+ZCt.boolOp+")\\s*("+ZCt.variable+")\\s*\\]",populate:me(function(t,e,r){var i=(r=M3t(r,2))[0];e.checks.push({type:V.DATA_BOOL,field:r_t(r[1]),operator:i})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+ZCt.meta+")\\s*("+ZCt.comparatorOp+")\\s*("+ZCt.number+")\\s*\\]\\]",populate:me(function(t,e,r){var i=(r=M3t(r,3))[0],n=r[1],r=r[2];e.checks.push({type:V.META_COMPARE,field:r_t(i),operator:n,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:ZCt.separator,populate:me(function(t,e){var r=t.currentSubject,i=t.edgeCount,n=t.compoundCount,a=t[t.length-1];return null!=r&&(a.subject=r,t.currentSubject=null),a.edgeCount=i,a.compoundCount=n,t.edgeCount=0,t.compoundCount=0,t[t.length++]=QCt()},"populate")},{name:"directedEdge",separator:!0,regex:ZCt.directedEdge,populate:me(function(t,e){var r,i,n;return null==t.currentSubject?(i=QCt(),r=e,n=QCt(),i.checks.push({type:V.DIRECTED_EDGE,source:r,target:n}),i_t(t,e,i)):(r=QCt(),i=e,n=QCt(),r.checks.push({type:V.NODE_SOURCE,source:i,target:n}),i_t(t,e,r)),t.edgeCount++,n},"populate")},{name:"undirectedEdge",separator:!0,regex:ZCt.undirectedEdge,populate:me(function(t,e){var r,i,n;return null==t.currentSubject?(i=QCt(),r=e,n=QCt(),i.checks.push({type:V.UNDIRECTED_EDGE,nodes:[r,n]}),i_t(t,e,i),t.edgeCount++):(r=QCt(),i=e,n=QCt(),r.checks.push({type:V.NODE_NEIGHBOR,node:i,neighbor:n}),i_t(t,e,r)),n},"populate")},{name:"child",separator:!0,regex:ZCt.child,populate:me(function(t,e){var r,i,n,a,s,o;return null==t.currentSubject?(o=QCt(),a=QCt(),r=t[t.length-1],o.checks.push({type:V.CHILD,parent:r,child:a}),i_t(t,e,o),t.compoundCount++,a):t.currentSubject===e?(r=QCt(),o=t[t.length-1],a=QCt(),i=QCt(),n=QCt(),s=QCt(),r.checks.push({type:V.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=e.checks,e.checks=[{type:V.TRUE}],s.checks.push({type:V.TRUE}),a.checks.push({type:V.PARENT,parent:s,child:n}),i_t(t,o,r),t.currentSubject=i,t.compoundCount++,n):(a=QCt(),s=QCt(),o=[{type:V.PARENT,parent:a,child:s}],a.checks=e.checks,e.checks=o,t.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:ZCt.descendant,populate:me(function(t,e){var r,i,n,a,s,o;return null==t.currentSubject?(o=QCt(),a=QCt(),r=t[t.length-1],o.checks.push({type:V.DESCENDANT,ancestor:r,descendant:a}),i_t(t,e,o),t.compoundCount++,a):t.currentSubject===e?(r=QCt(),o=t[t.length-1],a=QCt(),i=QCt(),n=QCt(),s=QCt(),r.checks.push({type:V.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=e.checks,e.checks=[{type:V.TRUE}],s.checks.push({type:V.TRUE}),a.checks.push({type:V.ANCESTOR,ancestor:s,descendant:n}),i_t(t,o,r),t.currentSubject=i,t.compoundCount++,n):(a=QCt(),s=QCt(),o=[{type:V.ANCESTOR,ancestor:a,descendant:s}],a.checks=e.checks,e.checks=o,t.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:ZCt.subject,populate:me(function(t,e){if(null!=t.currentSubject&&t.currentSubject!==e)return f7t("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=e,(t=null==(e=t[t.length-1].checks[0])?null:e.type)===V.DIRECTED_EDGE?e.type=V.NODE_TARGET:t===V.UNDIRECTED_EDGE&&(e.type=V.NODE_NEIGHBOR,e.node=e.nodes[1],e.neighbor=e.nodes[0],e.nodes=null)},"populate")}]).forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)}),a_t=me(function(t){for(var e=0;e<n_t.length;e++){var r=(o=n_t[e]).name,i=t.match(o.regexObj);if(null!=i){var n=i,a=o,s=r,o=i[0];t=t.substring(o.length);break}}return{expr:a,match:n,name:s,remaining:t}},"consumeExpr"),s_t=me(function(t){var e=t.match(/^\s+/);return e&&(e=e[0],t=t.substring(e.length)),t},"consumeWhitespace"),IAt=me(function(t){var e=this,r=e.inputText=t,i=e[0]=QCt();for(e.length=1,r=s_t(r);;){var n=a_t(r);if(null==n.expr)return f7t("The selector `"+t+"`is invalid"),!1;var a=n.match.slice(1);if(!1===(a=n.expr.populate(e,i,a)))return!1;if(null!=a&&(i=a),(r=n.remaining).match(/^\s*$/))break}var s=e[e.length-1];null!=e.currentSubject&&(s.subject=e.currentSubject),s.edgeCount=e.edgeCount,s.compoundCount=e.compoundCount;for(var o=0;o<e.length;o++){var l=e[o];if(0<l.compoundCount&&0<l.edgeCount)return f7t("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return f7t("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&f7t("The selector `"+t+"` 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"),GSt=me(function(){if(null!=this.toStringCache)return this.toStringCache;for(var o=me(function(t){return t??""},"clean"),l=me(function(t){return Pkt(t)?'"'+t+'"':o(t)},"cleanVal"),c=me(function(t){return" "+t+" "},"space"),a=me(function(t,e){var r=t.type,i=t.value;switch(r){case V.GROUP:return(n=o(i)).substring(0,n.length-1);case V.DATA_COMPARE:return"["+t.field+c(o(t.operator))+l(i)+"]";case V.DATA_BOOL:var n=t.operator,a=t.field;return"["+o(n)+a+"]";case V.DATA_EXIST:return"["+t.field+"]";case V.META_COMPARE:return n=t.operator,"[["+t.field+c(o(n))+l(i)+"]]";case V.STATE:return i;case V.ID:return"#"+i;case V.CLASS:return"."+i;case V.PARENT:case V.CHILD:return h(t.parent,e)+c(">")+h(t.child,e);case V.ANCESTOR:case V.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case V.COMPOUND_SPLIT:var a=h(t.left,e),n=h(t.subject,e),s=h(t.right,e);return a+(0<a.length?" ":"")+n+s;case V.TRUE:return""}},"checkToString"),h=me(function(i,n){return i.checks.reduce(function(t,e,r){return t+(n===i&&0===r?"$":"")+a(e,n)},"")},"queryToString"),t="",e=0;e<this.length;e++){var r=this[e];t+=h(r,r.subject),1<this.length&&e<this.length-1&&(t+=", ")}return this.toStringCache=t},"toString"),J={parse:IAt,toString:GSt},o_t=me(function(t,e,r){var i,n,a,s=Pkt(t),o=at(t),l=Pkt(r),c=!1,h=!1,u=!1;switch(0<=e.indexOf("!")&&(e=e.replace("!",""),h=!0),0<=e.indexOf("@")&&(e=e.replace("@",""),c=!0),(s||l||c)&&(n=s||o?""+t:"",a=""+r),c&&(t=n=n.toLowerCase(),r=a=a.toLowerCase()),e){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=t===r;break;case">":u=!0,i=r<t;break;case">=":u=!0,i=r<=t;break;case"<":u=!0,i=t<r;break;case"<=":u=!0,i=t<=r;break;default:i=!1}return!h||null==t&&u?i:!i},"valCmp"),l_t=me(function(t,e){switch(e){case"?":return!!t;case"!":return!t;case"^":return void 0===t}},"boolCmp"),c_t=me(function(t){return void 0!==t},"existCmp"),h_t=me(function(t,e){return t.data(e)},"data"),u_t=me(function(t,e){return t[e]()},"meta"),d_t=[],p_t=me(function(t,e){return t.checks.every(function(t){return d_t[t.type](t,e)})},"matches"),d_t[V.GROUP]=function(t,e){return"*"===(t=t.value)||t===e.group()},d_t[V.STATE]=function(t,e){return t=t.value,e_t(t,e)},d_t[V.ID]=function(t,e){return t=t.value,e.id()===t},d_t[V.CLASS]=function(t,e){return t=t.value,e.hasClass(t)},d_t[V.META_COMPARE]=function(t,e){var r=t.field,i=t.operator,t=t.value;return o_t(u_t(e,r),i,t)},d_t[V.DATA_COMPARE]=function(t,e){var r=t.field,i=t.operator,t=t.value;return o_t(h_t(e,r),i,t)},d_t[V.DATA_BOOL]=function(t,e){var r=t.field,t=t.operator;return l_t(h_t(e,r),t)},d_t[V.DATA_EXIST]=function(t,e){return t=t.field,c_t(h_t(e,t))},d_t[V.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],t=t.nodes[1],i=e.source(),e=e.target();return p_t(r,i)&&p_t(t,e)||p_t(t,i)&&p_t(r,e)},d_t[V.NODE_NEIGHBOR]=function(e,t){return p_t(e.node,t)&&t.neighborhood().some(function(t){return t.isNode()&&p_t(e.neighbor,t)})},d_t[V.DIRECTED_EDGE]=function(t,e){return p_t(t.source,e.source())&&p_t(t.target,e.target())},d_t[V.NODE_SOURCE]=function(e,t){return p_t(e.source,t)&&t.outgoers().some(function(t){return t.isNode()&&p_t(e.target,t)})},d_t[V.NODE_TARGET]=function(e,t){return p_t(e.target,t)&&t.incomers().some(function(t){return t.isNode()&&p_t(e.source,t)})},d_t[V.CHILD]=function(t,e){return p_t(t.child,e)&&p_t(t.parent,e.parent())},d_t[V.PARENT]=function(e,t){return p_t(e.parent,t)&&t.children().some(function(t){return p_t(e.child,t)})},d_t[V.DESCENDANT]=function(e,t){return p_t(e.descendant,t)&&t.ancestors().some(function(t){return p_t(e.ancestor,t)})},d_t[V.ANCESTOR]=function(e,t){return p_t(e.ancestor,t)&&t.descendants().some(function(t){return p_t(e.descendant,t)})},d_t[V.COMPOUND_SPLIT]=function(t,e){return p_t(t.subject,e)&&p_t(t.left,e)&&p_t(t.right,e)},d_t[V.TRUE]=function(){return!0},d_t[V.COLLECTION]=function(t,e){return t.value.has(e)},d_t[V.FILTER]=function(t,e){return(0,t.value)(e)},RAt=me(function(t){var e,i=this;return 1===i.length&&1===i[0].checks.length&&i[0].checks[0].type===V.ID?t.getElementById(i[0].checks[0].value).collection():(e=me(function(t){for(var e=0;e<i.length;e++){var r=i[e];if(p_t(r,t))return!0}return!1},"selectorFunction"),null==i.text()&&(e=me(function(){return!0},"selectorFunction")),t.filter(e))},"filter"),t9t=me(function(t){for(var e=0;e<this.length;e++){var r=this[e];if(p_t(r,t))return!0}return!1},"matches"),OAt={matches:t9t,filter:RAt},g_t=me(function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==t||Pkt(t)&&t.match(/^\s*$/)||(qkt(t)?this.addQuery({checks:[{type:V.COLLECTION,value:t.collection()}]}):Bkt(t)?this.addQuery({checks:[{type:V.FILTER,value:t}]}):Pkt(t)?this.parse(t)||(this.invalid=!0):p7t("A selector must be created from a string; found "))},"Selector"),f_t=g_t.prototype,[J,OAt].forEach(function(t){return lTt(f_t,t)}),f_t.text=function(){return this.inputText},f_t.size=function(){return this.length},f_t.eq=function(t){return this[t]},f_t.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},f_t.addQuery=function(t){this[this.length++]=t},f_t.selector=f_t.toString,(pAt={allAre:me(function(t){var e=new g_t(t);return this.every(function(t){return e.matches(t)})},"allAre"),is:me(function(t){var e=new g_t(t);return this.some(function(t){return e.matches(t)})},"is"),some:me(function(t,e){for(var r=0;r<this.length;r++)if(e?t.apply(e,[this[r],r,this]):t(this[r],r,this))return!0;return!1},"some"),every:me(function(t,e){for(var r=0;r<this.length;r++)if(!(e?t.apply(e,[this[r],r,this]):t(this[r],r,this)))return!1;return!0},"every"),same:me(function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every(function(t){return e.hasElementWithId(t.id())}))},"same"),anySame:me(function(e){return e=this.cy().collection(e),this.some(function(t){return e.hasElementWithId(t.id())})},"anySame"),allAreNeighbors:me(function(t){t=this.cy().collection(t);var e=this.neighborhood();return t.every(function(t){return e.hasElementWithId(t.id())})},"allAreNeighbors"),contains:me(function(t){t=this.cy().collection(t);var e=this;return t.every(function(t){return e.hasElementWithId(t.id())})},"contains")}).allAreNeighbours=pAt.allAreNeighbors,pAt.has=pAt.contains,pAt.equal=pAt.equals=pAt.same,e9t=me(function(s,o){return me(function(t,e,r,i){var n,a=t;return null==a?n="":qkt(a)&&1===a.length&&(n=a.id()),1===this.length&&n?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[n=r7t(n)]||(a[n]=s.call(this,t,e,r,i)):s.call(this,t,e,r,i)},"traversalCache")},"cache"),kAt={parent:me(function(t){var e=[];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&&e.push(n)}return this.spawn(e,!0).filter(t)},"parent"),parents:me(function(t){for(var e=[],r=this.parent();r.nonempty();){for(var i=0;i<r.length;i++){var n=r[i];e.push(n)}r=r.parent()}return this.spawn(e,!0).filter(t)},"parents"),commonAncestors:me(function(t){for(var e=0;e<this.length;e++)var r=this[e].parents(),i=(i=i||r).intersect(r);return i.filter(t)},"commonAncestors"),orphans:me(function(t){return this.stdFilter(function(t){return t.isOrphan()}).filter(t)},"orphans"),nonorphans:me(function(t){return this.stdFilter(function(t){return t.isChild()}).filter(t)},"nonorphans"),children:e9t(function(t){for(var e=[],r=0;r<this.length;r++)for(var i=this[r]._private.children,n=0;n<i.length;n++)e.push(i[n]);return this.spawn(e,!0).filter(t)},"children"),siblings:me(function(t){return this.parent().children().not(this).filter(t)},"siblings"),isParent:me(function(){var t=this[0];if(t)return t.isNode()&&0!==t._private.children.length},"isParent"),isChildless:me(function(){var t=this[0];if(t)return t.isNode()&&0===t._private.children.length},"isChildless"),isChild:me(function(){var t=this[0];if(t)return t.isNode()&&null!=t._private.parent},"isChild"),isOrphan:me(function(){var t=this[0];if(t)return t.isNode()&&null==t._private.parent},"isOrphan"),descendants:me(function(t){var i=[];function n(t){for(var e=0;e<t.length;e++){var r=t[e];i.push(r),r.children().nonempty()&&n(r.children())}}return me(n,"add"),n(this.children()),this.spawn(i,!0).filter(t)},"descendants")},me(H6t,"forEachCompound"),me(V6t,"addChildren"),kAt.forEachDown=function(t){return H6t(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],V6t)},me(X6t,"addParent"),kAt.forEachUp=function(t){return H6t(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],X6t)},me(K6t,"addParentAndChildren"),kAt.forEachUpAndDown=function(t){return H6t(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],K6t)},kAt.ancestors=kAt.parents,(MAt=Q={data:KCt.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:KCt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:KCt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:KCt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:KCt.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:KCt.removeData({field:"rscratch",triggerEvent:!1}),id:me(function(){var t=this[0];if(t)return t._private.data.id},"id")}).attr=MAt.data,MAt.removeAttr=MAt.removeData,EAt=Q,YAt={},me(Z6t,"defineDegreeFunction"),lTt(YAt,{degree:Z6t(function(t,e){return e.source().same(e.target())?2:1}),indegree:Z6t(function(t,e){return e.target().same(t)?1:0}),outdegree:Z6t(function(t,e){return e.source().same(t)?1:0})}),me(Q6t,"defineDegreeBoundsFunction"),lTt(YAt,{minDegree:Q6t("degree",function(t,e){return t<e}),maxDegree:Q6t("degree",function(t,e){return e<t}),minIndegree:Q6t("indegree",function(t,e){return t<e}),maxIndegree:Q6t("indegree",function(t,e){return e<t}),minOutdegree:Q6t("outdegree",function(t,e){return t<e}),maxOutdegree:Q6t("outdegree",function(t,e){return e<t})}),lTt(YAt,{totalDegree:me(function(t){for(var e=0,r=this.nodes(),i=0;i<r.length;i++)e+=r[i].degree(t);return e},"totalDegree")}),m_t=me(function(t,e,r){for(var i=0;i<t.length;i++){var n,a=t[i];a.locked()||(n=a._private.position,n={x:null!=e.x?e.x-n.x:0,y:null!=e.y?e.y-n.y:0},!a.isParent()||0===n.x&&0===n.y||a.children().shift(n,r),a.dirtyBoundingBoxCache())}},"beforePositionSet"),DAt={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:me(function(t){t.updateCompoundBounds()},"beforeGet"),beforeSet:me(function(t,e){m_t(t,e,!1)},"beforeSet"),onSet:me(function(t){t.dirtyCompoundBoundsCache()},"onSet"),canSet:me(function(t){return!t.locked()},"canSet")},(c9t=a9t={position:KCt.data(DAt),silentPosition:KCt.data(lTt({},DAt,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:me(function(t,e){m_t(t,e,!0)},"beforeSet"),onSet:me(function(t){t.dirtyCompoundBoundsCache()},"onSet")})),positions:me(function(t,e){if($kt(t))e?this.silentPosition(t):this.position(t);else if(Bkt(t)){var r=t;(t=this.cy()).startBatch();for(var i=0;i<this.length;i++){var n,a=this[i];(n=r(a,i))&&(e?a.silentPosition(n):a.position(n))}t.endBatch()}return this},"positions"),silentPositions:me(function(t){return this.positions(t,!0)},"silentPositions"),shift:me(function(t,e,r){var i;if($kt(t)?(i={x:at(t.x)?t.x:0,y:at(t.y)?t.y:0},r=e):Pkt(t)&&at(e)&&((i={x:0,y:0})[t]=e),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:me(function(t,e){return $kt(t)?this.shift(t,!0):Pkt(t)&&at(e)&&this.shift(t,e,!0),this},"silentShift"),renderedPosition:me(function(t,e){var r=this[0],i=(s=this.cy()).zoom(),n=s.pan(),a=$kt(t)?t:void 0,s=void 0!==a||void 0!==e&&Pkt(t);if(r&&r.isNode()){if(!s)return r=r.position(),a=z7t(r,i,n),void 0===t?a:a[t];for(var o=0;o<this.length;o++){var l=this[o];void 0!==e?l.position(t,(e-n[t])/i):void 0!==a&&l.position(G7t(a,i,n))}}else if(!s)return;return this},"renderedPosition"),relativePosition:me(function(t,e){var r,i=this[0],n=this.cy(),a=$kt(t)?t:void 0,s=void 0!==a||void 0!==e&&Pkt(t),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===t?a:a[t];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!==e?c.position(t,e+u[t]):void 0!==a&&c.position({x:a.x+u.x,y:a.y+u.y})}}else if(!s)return;return this},"relativePosition")}).modelPosition=c9t.point=c9t.position,c9t.modelPositions=c9t.points=c9t.positions,c9t.renderedPoint=c9t.renderedPosition,c9t.relativePoint=c9t.relativePosition,HAt=a9t,GSt=IAt={renderedBoundingBox:function(t){var t=this.boundingBox(t),e=(r=this.cy()).zoom(),r=r.pan(),i=t.x1*e+r.x,n=t.x2*e+r.x,a=t.y1*e+r.y;return{x1:i,x2:n,y1:a,y2:t=t.y2*e+r.y,w:n-i,h:t-a}},dirtyCompoundBoundsCache:function(){var r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()&&this.forEachUp(function(t){var e;t.isParent()&&((e=t._private).compoundBoundsClean=!1,e.bbCache=null,r||t.emitAndNotify("bounds"))}),this},updateCompoundBounds:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(e.styleEnabled()&&e.hasCompoundNodes()&&(t||!e.batching())){me(a,"update");for(var r=0;r<this.length;r++){var i=this[r],n=i._private;n.compoundBoundsClean&&!t||(a(i),e.batching())||(n.compoundBoundsClean=!0)}}return this;function a(t){var e,r,i,n,a,s,o,l;function c(t,e,r){var i=0,n=0,a=e+r;return 0<t&&0<a&&(i=e/a*t,n=r/a*t),{biasDiff:i,biasComplementDiff:n}}function h(t,e,r,i){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(i){case"width":return 0<t?r.pfValue*t:0;case"height":return 0<e?r.pfValue*e:0;case"average":return 0<t&&0<e?r.pfValue*(t+e)/2:0;case"min":return 0<t&&0<e?e<t?r.pfValue*e:r.pfValue*t:0;case"max":return 0<t&&0<e?e<t?r.pfValue*t:r.pfValue*e:0;default:return 0}}t.isParent()&&(e=t._private,i=t.children(),n="include"===t.pstyle("compound-sizing-wrt-labels").value,r={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},i=i.boundingBox({includeLabels:n,includeOverlays:!1,useCache:!1}),n=e.position,0!==i.w&&0!==i.h||((i={w:t.pstyle("width").pfValue,h:t.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),me(c,"computeBiasValues"),me(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,e.autoPadding=h(i.w,i.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(i.w,r.width.val),n.x=(-a+i.x1+i.x2+s)/2,e.autoHeight=Math.max(i.h,r.height.val),n.y=(-o+i.y1+i.y2+l)/2)}}},y_t=me(function(t){return t===1/0||t===-1/0?0:t},"noninf"),v_t=me(function(t,e,r,i,n){i-e!=0&&n-r!=0&&null!=e&&null!=r&&null!=i&&null!=n&&(t.x1=e<t.x1?e:t.x1,t.x2=t.x2<i?i:t.x2,t.y1=r<t.y1?r:t.y1,t.y2=t.y2<n?n:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},"updateBounds"),x_t=me(function(t,e){return null==e?t:v_t(t,e.x1,e.y1,e.x2,e.y2)},"updateBoundsFromBox"),b_t=me(function(t,e,r){return _7t(t,e,r)},"prefixedProperty"),w_t=me(function(t,e,r){var i,n,a,s;e.cy().headless()||(i=(a=(s=e._private).rstyle).arrowWidth/2,"none"!==e.pstyle(r+"-arrow-shape").value&&(e="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=e-i,s.x2=n+i,s.y2=e+i,s.w=s.x2-s.x1,s.h=s.y2-s.y1,h8t(s,1),v_t(t,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),k_t=me(function(t,e,r){if(!e.cy().headless()){var i=e._private,n=i.rstyle;if(e.pstyle((p=r?r+"-":"")+"label").strValue){var a=e.pstyle("text-halign"),s=e.pstyle("text-valign"),o=b_t(n,"labelWidth",r),l=b_t(n,"labelHeight",r),c=b_t(n,"labelX",r),h=b_t(n,"labelY",r),n=e.pstyle(p+"text-margin-x").pfValue,u=e.pstyle(p+"text-margin-y").pfValue,d=e.isEdge(),p=e.pstyle(p+"text-rotation"),g=e.pstyle("text-outline-width").pfValue,f=e.pstyle("text-border-width").pfValue/2,e=e.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,x=m/2;if(d)E=c-v,C=c+v,_=h-x,S=h+x;else{switch(a.value){case"left":E=c-y,C=c;break;case"center":E=c-v,C=c+v;break;case"right":C=(E=c)+y}switch(s.value){case"top":_=h-m,S=h;break;case"center":_=h-x,S=h+x;break;case"bottom":S=(_=h)+m}}if(E+=l=n-Math.max(g,f)-e-2,C+=o=n+Math.max(g,f)+e+2,_+=n=u-Math.max(g,f)-e-2,S+=u=u+Math.max(g,f)+e+2,(e=(f=i.labelBounds)[g=r||"main"]=f[g]||{}).x1=E,e.y1=_,e.x2=C,e.y2=S,e.w=C-E,e.h=S-_,e.leftPad=l,e.rightPad=o,e.topPad=n,e.botPad=u,l=d&&"autorotate"===p.strValue,o=null!=p.pfValue&&0!==p.pfValue,l||o){var n=l?b_t(i.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(n),w=Math.sin(n),k=(E+C)/2,T=(_+S)/2;if(!d){switch(a.value){case"left":k=C;break;case"right":k=E}switch(s.value){case"top":T=S;break;case"bottom":T=_}}var u=(e=me(function(t,e){return{x:(t-=k)*b-(e-=T)*w+k,y:t*w+e*b+T}},"rotate"))(E,_),o=e(E,S),l=e(C,_),r=e(C,S),E=Math.min(u.x,o.x,l.x,r.x),C=Math.max(u.x,o.x,l.x,r.x),_=Math.min(u.y,o.y,l.y,r.y),S=Math.max(u.y,o.y,l.y,r.y)}(n=f[p=g+"Rot"]=f[p]||{}).x1=E,n.y1=_,n.x2=C,n.y2=S,n.w=C-E,n.h=S-_,v_t(t,E,_,C,S),v_t(i.labelBounds.all,E,_,C,S)}return t}},"updateBoundsFromLabel"),T_t=me(function(t,e){var r,i,n,a;e.cy().headless()||(r=e.pstyle("outline-opacity").value,n=e.pstyle("outline-width").value,0<r&&0<n&&(r=e.pstyle("outline-offset").value,e=e.pstyle("shape").value,r=(t.w+2*(n+=r))/t.w,a=(t.h+2*n)/t.h,i=0,["diamond","pentagon","round-triangle"].includes(e)?(r=(t.w+2.4*n)/t.w,i=-n/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(e)?r=(t.w+2.4*n)/t.w:"star"===e?(r=(t.w+2.8*n)/t.w,a=(t.h+2.6*n)/t.h,i=-n/3.8):"triangle"===e?(r=(t.w+2.8*n)/t.w,a=(t.h+2.4*n)/t.h,i=-n/1.4):"vee"===e&&(r=(t.w+4.4*n)/t.w,a=(t.h+3.8*n)/t.h,i=.5*-n),e=t.h*a-t.h,n=t.w*r-t.w,u8t(t,[Math.ceil(e/2),Math.ceil(n/2)]),0!==i)&&(a=o8t(t,0,i),l8t(t,a)))},"updateBoundsFromOutline"),E_t=me(function(t,e){var r=(i=t._private.cy).styleEnabled(),i=i.headless(),n=n8t(),a=t._private,s=t.isNode(),o=t.isEdge(),l=a.rstyle,c=s&&r?t.pstyle("bounds-expansion").pfValue:[0],h=me(function(t){return"none"!==t.pstyle("display").value},"isDisplayed");if(h=!r||h(t)&&(!o||h(t.source())&&h(t.target()))){var u=0,d=(r&&e.includeOverlays&&0!==t.pstyle("overlay-opacity").value&&(u=t.pstyle("overlay-padding").value),0),u=(r&&e.includeUnderlays&&0!==t.pstyle("underlay-opacity").value&&(d=t.pstyle("underlay-padding").value),Math.max(u,d)),p=0;if(r&&(p=t.pstyle("width").pfValue/2),s&&e.includeNodes){var s=(d=t.position()).x,d=d.y,g=t.outerWidth()/2,f=t.outerHeight()/2;v_t(n,y=s-g,x=d-f,v=s+g,b=d+f),r&&e.includeOutlines&&T_t(n,t)}else if(o&&e.includeEdges)if(r&&!i){var m,s=t.pstyle("curve-style").strValue,y=Math.min(l.srcX,l.midX,l.tgtX),v=Math.max(l.srcX,l.midX,l.tgtX),x=Math.min(l.srcY,l.midY,l.tgtY),b=Math.max(l.srcY,l.midY,l.tgtY);if(v_t(n,y-=p,x-=p,v+=p,b+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,x=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(b=g[1].y)<x&&(f=x,x=b,b=f),v_t(n,y-p,x-p,v+p,b+p));else if("bezier"===s||"unbundled-bezier"===s||s.endsWith("segments")||s.endsWith("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 k=m[w],y=k.x-p;v_t(n,y,x=k.y-p,v=k.x+p,b=k.y+p)}}}else i=t.source().position(),d=t.target().position(),y=i.x,v=d.x,x=i.y,v<y&&(g=y,y=v,v=g),(b=d.y)<x&&(f=x,x=b,b=f),v_t(n,y-=p,x-=p,v+=p,b+=p);r&&e.includeEdges&&o&&(w_t(n,t,"mid-source"),w_t(n,t,"mid-target"),w_t(n,t,"source"),w_t(n,t,"target")),r&&"yes"===t.pstyle("ghost").value&&(s=t.pstyle("ghost-offset-x").pfValue,i=t.pstyle("ghost-offset-y").pfValue,v_t(n,n.x1+s,n.y1+i,n.x2+s,n.y2+i)),g=a.bodyBounds=a.bodyBounds||{},d8t(g,n),u8t(g,c),h8t(g,1),r&&(y=n.x1,v=n.x2,x=n.y1,b=n.y2,v_t(n,y-u,x-u,v+u,b+u)),d=a.overlayBounds=a.overlayBounds||{},d8t(d,n),u8t(d,c),h8t(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?s8t(f.all):f.all=n8t(),r&&e.includeLabels&&(e.includeMainLabels&&k_t(n,t,null),o)&&(e.includeSourceLabels&&k_t(n,t,"source"),e.includeTargetLabels)&&k_t(n,t,"target")}return n.x1=y_t(n.x1),n.y1=y_t(n.y1),n.x2=y_t(n.x2),n.y2=y_t(n.y2),n.w=y_t(n.x2-n.x1),n.h=y_t(n.y2-n.y1),0<n.w&&0<n.h&&h&&(u8t(n,c),h8t(n,1)),n},"boundingBoxImpl"),C_t=me(function(t){var e=0,r=me(function(t){return(t?1:0)<<e++},"tf"),i=0;return(i+=r(t.incudeNodes))+r(t.includeEdges)+r(t.includeLabels)+r(t.includeMainLabels)+r(t.includeSourceLabels)+r(t.includeTargetLabels)+r(t.includeOverlays)+r(t.includeOutlines)},"getKey"),__t=me(function(t){var e,r;return t.isEdge()?(e=t.source().position(),t=t.target().position(),r=me(function(t){return Math.round(t)},"r"),e7t([r(e.x),r(e.y),r(t.x),r(t.y)])):0},"getBoundingBoxPosKey"),S_t=me(function(t,e){var r,i=t._private,n=t.isEdge(),a=(null==e?L_t:C_t(e))===L_t,s=__t(t),o=i.bbCachePosKey===s,l=e.useCache&&o,c=me(function(t){return null==t._private.bbCache||t._private.styleDirty},"isDirty");return!l||c(t)||n&&(c(t.source())||c(t.target()))?(o||t.recalculateRenderedStyle(l),r=E_t(t,A_t),i.bbCache=r,i.bbCachePosKey=s):r=i.bbCache,a||(c=t.isNode(),r=n8t(),(e.includeNodes&&c||e.includeEdges&&!c)&&(e.includeOverlays?x_t(r,i.overlayBounds):x_t(r,i.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!n||e.includeSourceLabels&&e.includeTargetLabels)?x_t(r,i.labelBounds.all):(e.includeMainLabels&&x_t(r,i.labelBounds.mainRot),e.includeSourceLabels&&x_t(r,i.labelBounds.sourceRot),e.includeTargetLabels&&x_t(r,i.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),L_t=C_t(A_t={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),N_t=k7t(A_t),IAt.boundingBox=function(t){if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==t&&void 0!==t.useCache&&!0!==t.useCache){var e=n8t(),r=N_t(t=t||A_t);if(this.cy().styleEnabled())for(var i=0;i<this.length;i++){var n=this[i],a=n._private,s=__t(n),s=a.bbCachePosKey===s,s=r.useCache&&s&&!a.styleDirty;n.recalculateRenderedStyle(s)}this.updateCompoundBounds(!t.useCache);for(var o=0;o<this.length;o++){var l=this[o];x_t(e,S_t(l,r))}}else t=void 0===t?A_t:N_t(t),e=S_t(this[0],t);return e.x1=y_t(e.x1),e.y1=y_t(e.y1),e.x2=y_t(e.x2),e.y2=y_t(e.y2),e.w=y_t(e.x2-e.x1),e.h=y_t(e.y2-e.y1),e},IAt.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},IAt.boundingBoxAt=function(r){var t,e=this.nodes(),i=this.cy(),n=i.hasCompoundNodes(),a=i.collection(),s=(n&&(a=e.filter(function(t){return t.isParent()}),e=e.not(a)),$kt(r)&&(t=r,r=me(function(){return t},"fn")),me(function(t,e){return t._private.bbAtOldPos=r(t,e)},"storeOldPos")),o=me(function(t){return t._private.bbAtOldPos},"getOldPos"),s=(i.startBatch(),e.forEach(s).silentPositions(r),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),a8t(this.boundingBox({useCache:!1})));return e.silentPositions(o),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),i.endBatch(),s},GSt.boundingbox=GSt.bb=GSt.boundingBox,GSt.renderedBoundingbox=GSt.renderedBoundingBox,t9t=IAt,I_t=RAt={},(J=me(function(i){i.uppercaseName=nTt(i.name),i.autoName="auto"+i.uppercaseName,i.labelName="label"+i.uppercaseName,i.outerName="outer"+i.uppercaseName,i.uppercaseOuterName=nTt(i.outerName),I_t[i.name]=me(function(){var t=this[0],e=t._private,r=e.cy._private.styleEnabled;if(t)return r?t.isParent()?(t.updateCompoundBounds(),e[i.autoName]||0):"label"!==(r=t.pstyle(i.name)).strValue?r.pfValue:(t.recalculateRenderedStyle(),e.rstyle[i.labelName]||0):1},"dimImpl"),I_t["outer"+i.uppercaseName]=me(function(){var t=this[0],e=t._private.cy._private.styleEnabled;if(t)return e?t[i.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},"outerDimImpl"),I_t["rendered"+i.uppercaseName]=me(function(){var t=this[0];if(t)return t[i.name]()*this.cy().zoom()},"renderedDimImpl"),I_t["rendered"+i.uppercaseOuterName]=me(function(){var t=this[0];if(t)return t[i.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),J({name:"height"}),RAt.padding=function(){var t=this[0],e=t._private;return t.isParent()&&(t.updateCompoundBounds(),void 0!==e.autoPadding)?e.autoPadding:t.pstyle("padding").pfValue},RAt.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},RAt.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()},OAt=RAt,R_t=me(function(t,e){if(t.isEdge())return e(t)},"ifEdge"),M_t=me(function(t,e){var r;if(t.isEdge())return r=t.cy(),z7t(e(t),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),D_t=me(function(t,e){var r,i,n;if(t.isEdge())return r=t.cy(),i=r.pan(),n=r.zoom(),e(t).map(function(t){return z7t(t,n,i)})},"ifEdgeRenderedPositions"),MAt=me(function(t){return t.renderer().getControlPoints(t)},"controlPoints"),Q=me(function(t){return t.renderer().getSegmentPoints(t)},"segmentPoints"),DAt=me(function(t){return t.renderer().getSourceEndpoint(t)},"sourceEndpoint"),c9t=me(function(t){return t.renderer().getTargetEndpoint(t)},"targetEndpoint"),a9t=me(function(t){return t.renderer().getEdgeMidpoint(t)},"midpoint"),O_t={controlPoints:{get:MAt,mult:!0},segmentPoints:{get:Q,mult:!0},sourceEndpoint:{get:DAt},targetEndpoint:{get:c9t},midpoint:{get:a9t}},P_t=me(function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)},"renderedName"),GSt=Object.keys(O_t).reduce(function(t,e){var r=O_t[e],i=P_t(e);return t[e]=function(){return R_t(this,r.get)},r.mult?t[i]=function(){return D_t(this,r.get)}:t[i]=function(){return M_t(this,r.get)},t},{}),IAt=lTt({},HAt,t9t,OAt,GSt),B_t=me(function(t,e){this.recycle(t,e)},"Event"),me(J6t,"returnFalse"),me(twt,"returnTrue"),B_t.prototype={instanceString:me(function(){return"event"},"instanceString"),recycle:me(function(t,e){var r,i;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=J6t,null!=t&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?twt:J6t):null!=t&&t.type?e=t:this.type=t,null!=e&&(this.originalEvent=e.originalEvent,this.type=(null!=e.type?e:this).type,this.cy=e.cy,this.target=e.target,this.position=e.position,this.renderedPosition=e.renderedPosition,this.namespace=e.namespace,this.layout=e.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition&&(e=this.position,r=this.cy.zoom(),i=this.cy.pan(),this.renderedPosition={x:e.x*r+i.x,y:e.y*r+i.y}),this.timeStamp=t&&t.timeStamp||Date.now()},"recycle"),preventDefault:me(function(){this.isDefaultPrevented=twt;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},"preventDefault"),stopPropagation:me(function(){this.isPropagationStopped=twt;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},"stopPropagation"),stopImmediatePropagation:me(function(){this.isImmediatePropagationStopped=twt,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:J6t,isPropagationStopped:J6t,isImmediatePropagationStopped:J6t},F_t=/^([^.]+)(\.(?:[^.]+))?$/,$_t={qualifierCompare:me(function(t,e){return t===e},"qualifierCompare"),eventMatches:me(function(){return!0},"eventMatches"),addEventFields:me(function(){},"addEventFields"),callbackContext:me(function(t){return t},"callbackContext"),beforeEmit:me(function(){},"beforeEmit"),afterEmit:me(function(){},"afterEmit"),bubble:me(function(){return!1},"bubble"),parent:me(function(){return null},"parent"),context:null},z_t=Object.keys($_t),G_t={},me(ewt,"Emitter"),J=ewt.prototype,U_t=me(function(t,e,r,i,n,a,s){Bkt(i)&&(n=i,i=null),s&&(a=null==a?s:lTt({},a,s));for(var o=Fkt(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!Xkt(c)){var h=c.match(F_t);if(h&&!1===e(t,c,h[1],h[2]||null,i,n,a))break}}},"forEachEvent"),q_t=me(function(t,e){return t.addEventFields(t.context,e),new B_t(e.type,e)},"makeEventObj"),j_t=me(function(t,e,r){if(Vkt(r))e(t,r);else if($kt(r))e(t,q_t(t,r));else for(var i=Fkt(r)?r:r.split(/\s+/),n=0;n<i.length;n++){var a,s=i[n];Xkt(s)||(s=s.match(F_t))&&(a=s[1],s=s[2]||null,e(t,q_t(t,{type:a,namespace:s,target:t.context})))}},"forEachEventObj"),J.on=J.addListener=function(t,e,r,i,n){return U_t(this,function(t,e,r,i,n,a,s){Bkt(a)&&t.listeners.push({event:e,callback:a,type:r,namespace:i,qualifier:n,conf:s})},t,e,r,i,n),this},J.one=function(t,e,r,i){return this.on(t,e,r,i,{one:!0})},J.removeListener=J.off=function(l,t,e,r){var i=this;0!==this.emitting&&(this.listeners=v7t(this.listeners));for(var c=this.listeners,n=me(function(s){var o=c[s];U_t(i,function(t,e,r,i,n,a){if((o.type===r||"*"===l)&&(!i&&".*"!==o.namespace||o.namespace===i)&&(!n||t.qualifierCompare(o.qualifier,n))&&(!a||o.callback===a))return c.splice(s,1),!1},l,t,e,r)},"_loop"),a=c.length-1;0<=a;a--)n(a);return this},J.removeAllListeners=function(){return this.removeListener("*")},J.emit=J.trigger=function(t,a,r){var s=this.listeners,o=s.length;return this.emitting++,Fkt(a)||(a=[a]),j_t(this,function(i,n){null!=r&&(s=[{event:n.event,type:n.type,namespace:n.namespace,callback:r}],o=s.length);for(var t=me(function(t){var e,r=s[t];r.type!==n.type||r.namespace&&r.namespace!==n.namespace&&".*"!==r.namespace||!i.eventMatches(i.context,r,n)||(t=[n],null!=a&&C7t(t,a),i.beforeEmit(i.context,r,n),r.conf&&r.conf.one&&(i.listeners=i.listeners.filter(function(t){return t!==r})),e=i.callbackContext(i.context,r,n),e=r.callback.apply(e,t),i.afterEmit(i.context,r,n),!1===e&&(n.stopPropagation(),n.preventDefault()))},"_loop2"),e=0;e<o;e++)t(e);i.bubble(i.context)&&!n.isPropagationStopped()&&i.parent(i.context).emit(n,a)},t),this.emitting--,this},W_t={qualifierCompare:me(function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},"qualifierCompare"),eventMatches:me(function(t,e,r){return null==(e=e.qualifier)||t!==r.target&&jkt(r.target)&&e.matches(r.target)},"eventMatches"),addEventFields:me(function(t,e){e.cy=t.cy(),e.target=t},"addEventFields"),callbackContext:me(function(t,e,r){return null!=e.qualifier?r.target:t},"callbackContext"),beforeEmit:me(function(t,e){e.conf&&e.conf.once&&e.conf.onceCollection.removeListener(e.event,e.qualifier,e.callback)},"beforeEmit"),bubble:me(function(){return!0},"bubble"),parent:me(function(t){return t.isChild()?t.parent():t.cy()},"parent")},Y_t=me(function(t){return Pkt(t)?new g_t(t):t},"argSelector"),RAt={createEmitter:me(function(){for(var t=0;t<this.length;t++){var e=this[t],r=e._private;r.emitter||(r.emitter=new ewt(W_t,e))}return this},"createEmitter"),emitter:me(function(){return this._private.emitter},"emitter"),on:me(function(t,e,r){for(var i=Y_t(e),n=0;n<this.length;n++)this[n].emitter().on(t,i,r);return this},"on"),removeListener:me(function(t,e,r){for(var i=Y_t(e),n=0;n<this.length;n++)this[n].emitter().removeListener(t,i,r);return this},"removeListener"),removeAllListeners:me(function(){for(var t=0;t<this.length;t++)this[t].emitter().removeAllListeners();return this},"removeAllListeners"),one:me(function(t,e,r){for(var i=Y_t(e),n=0;n<this.length;n++)this[n].emitter().one(t,i,r);return this},"one"),once:me(function(t,e,r){for(var i=Y_t(e),n=0;n<this.length;n++)this[n].emitter().on(t,i,r,{once:!0,onceCollection:this})},"once"),emit:me(function(t,e){for(var r=0;r<this.length;r++)this[r].emitter().emit(t,e);return this},"emit"),emitAndNotify:me(function(t,e){if(0!==this.length)return this.cy().notify(t,this),this.emit(t,e),this},"emitAndNotify")},KCt.eventAliasesOn(RAt),MAt={nodes:me(function(t){return this.filter(function(t){return t.isNode()}).filter(t)},"nodes"),edges:me(function(t){return this.filter(function(t){return t.isEdge()}).filter(t)},"edges"),byGroup:me(function(){for(var t=this.spawn(),e=this.spawn(),r=0;r<this.length;r++){var i=this[r];(i.isNode()?t:e).push(i)}return{nodes:t,edges:e}},"byGroup"),filter:me(function(t,e){if(void 0===t)return this;if(Pkt(t)||qkt(t))return new g_t(t).filter(this);if(Bkt(t)){for(var r=this.spawn(),i=0;i<this.length;i++){var n=this[i];(e?t.apply(e,[n,i,this]):t(n,i,this))&&r.push(n)}return r}return this.spawn()},"filter"),not:me(function(t){if(t){Pkt(t)&&(t=this.filter(t));for(var e=this.spawn(),r=0;r<this.length;r++){var i=this[r];t.has(i)||e.push(i)}return e}return this},"not"),absoluteComplement:me(function(){return this.cy().mutableElements().not(this)},"absoluteComplement"),intersect:me(function(t){if(Pkt(t))return this.filter(t);for(var e=this.spawn(),r=this.length<t.length,i=r?this:t,n=r?t:this,a=0;a<i.length;a++){var s=i[a];n.has(s)&&e.push(s)}return e},"intersect"),xor:me(function(t){var e=this._private.cy,a=(Pkt(t)&&(t=e.$(t)),this.spawn()),e=t;return(t=me(function(t,e){for(var r=0;r<t.length;r++){var i=t[r],n=i._private.data.id;e.hasElementWithId(n)||a.push(i)}},"add"))(this,e),t(e,this),a},"xor"),diff:me(function(t){var e=this._private.cy,e=(Pkt(t)&&(t=e.$(t)),this.spawn()),r=this.spawn(),s=this.spawn(),i=me(function(t,e,r){for(var i=0;i<t.length;i++){var n=t[i],a=n._private.data.id;e.hasElementWithId(a)?s.merge(n):r.push(n)}},"add");return i(this,t,e),i(t,this,r),{left:e,right:r,both:s}},"diff"),add:me(function(t){var e,r=this._private.cy;if(!t)return this;Pkt(t)&&(e=t,t=r.mutableElements().filter(e));for(var i=this.spawnSelf(),n=0;n<t.length;n++){var a=t[n];this.has(a)||i.push(a)}return i},"add"),merge:me(function(t){var e,r=this._private,i=r.cy;if(t){Pkt(t)&&(e=t,t=i.mutableElements().filter(e));for(var n=r.map,a=0;a<t.length;a++){var s,o=t[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:me(function(t){var e,r,i=this[t].id(),n=this._private.map,i=(this[t]=void 0,n.delete(i),t===this.length-1);return 1<this.length&&!i&&(r=(e=this[i=this.length-1])._private.data.id,this[i]=void 0,this[t]=e,n.set(r,{ele:e,index:t})),this.length--,this},"unmergeAt"),unmergeOne:me(function(t){t=t[0];var e=this._private,t=t._private.data.id;return(e=e.map.get(t))&&(t=e.index,this.unmergeAt(t)),this},"unmergeOne"),unmerge:me(function(t){var e,r=this._private.cy;if(t){Pkt(t)&&(e=t,t=r.mutableElements().filter(e));for(var i=0;i<t.length;i++)this.unmergeOne(t[i])}return this},"unmerge"),unmergeBy:me(function(t){for(var e=this.length-1;0<=e;e--)t(this[e])&&this.unmergeAt(e);return this},"unmergeBy"),map:me(function(t,e){for(var r=[],i=0;i<this.length;i++){var n=this[i],n=e?t.apply(e,[n,i,this]):t(n,i,this);r.push(n)}return r},"map"),reduce:me(function(t,e){for(var r=e,i=0;i<this.length;i++)r=t(r,this[i],i,this);return r},"reduce"),max:me(function(t,e){for(var r,i=-1/0,n=0;n<this.length;n++){var a=this[n],s=e?t.apply(e,[a,n,this]):t(a,n,this);i<s&&(i=s,r=a)}return{value:i,ele:r}},"max"),min:me(function(t,e){for(var r,i=1/0,n=0;n<this.length;n++){var a=this[n],s=e?t.apply(e,[a,n,this]):t(a,n,this);s<i&&(i=s,r=a)}return{value:i,ele:r}},"min")},(Q=MAt).u=Q["|"]=Q["+"]=Q.union=Q.or=Q.add,Q["\\"]=Q["!"]=Q["-"]=Q.difference=Q.relativeComplement=Q.subtract=Q.not,Q.n=Q["&"]=Q["."]=Q.and=Q.intersection=Q.intersect,Q["^"]=Q["(+)"]=Q["(-)"]=Q.symmetricDifference=Q.symdiff=Q.xor,Q.fnFilter=Q.filterFn=Q.stdFilter=Q.filter,Q.complement=Q.abscomp=Q.absoluteComplement,DAt={isNode:me(function(){return"nodes"===this.group()},"isNode"),isEdge:me(function(){return"edges"===this.group()},"isEdge"),isLoop:me(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:me(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:me(function(){var t=this[0];if(t)return t._private.group},"group")},H_t=me(function(t,e){var r=t.cy().hasCompoundNodes();function i(t){var e=t.pstyle("z-compound-depth");return"auto"===e.value?r?t.zDepth():0:"bottom"===e.value?-1:"top"===e.value?l7t:0}me(i,"getDepth");var n=i(t)-i(e);return 0!=n||(me(a,"getEleDepth"),0!=(n=a(t)-a(e)))||0!=(n=t.pstyle("z-index").value-e.pstyle("z-index").value)?n:t.poolIndex()-e.poolIndex();function a(t){return"auto"===t.pstyle("z-index-compare").value&&t.isNode()?1:0}},"zIndexSort"),(V_t={forEach:me(function(t,e){if(Bkt(t))for(var r=this.length,i=0;i<r;i++){var n=this[i];if(!1===(e?t.apply(e,[n,i,this]):t(n,i,this)))break}return this},"forEach"),toArray:me(function(){for(var t=[],e=0;e<this.length;e++)t.push(this[e]);return t},"toArray"),slice:me(function(t,e){var r=[],i=this.length;(e=null==e?i:e)<0&&(e=i+e);for(var n=t=(t=null==t?0:t)<0?i+t:t;0<=n&&n<e&&n<i;n++)r.push(this[n]);return this.spawn(r)},"slice"),size:me(function(){return this.length},"size"),eq:me(function(t){return this[t]||this.spawn()},"eq"),first:me(function(){return this[0]||this.spawn()},"first"),last:me(function(){return this[this.length-1]||this.spawn()},"last"),empty:me(function(){return 0===this.length},"empty"),nonempty:me(function(){return!this.empty()},"nonempty"),sort:me(function(t){return Bkt(t)?(t=this.toArray().sort(t),this.spawn(t)):this},"sort"),sortByZIndex:me(function(){return this.sort(H_t)},"sortByZIndex"),zDepth:me(function(){var t,e,r=this[0];if(r)return"nodes"===(e=r._private).group?(t=e.data.parent?r.parents().size():0,r.isParent()?t:l7t-1):(r=e.source,t=e.target,e=r.zDepth(),r=t.zDepth(),Math.max(e,r,0))},"zDepth")}).each=V_t.forEach,me(function(){"undefined"!=("u"<typeof Symbol?"undefined":A3t(Symbol))&&"undefined"!=A3t(Symbol.iterator)&&(V_t[Symbol.iterator]=function(){var t=this,e={value:void 0,done:!1},r=0,i=this.length;return R3t({next:me(function(){return r<i?e.value=t[r++]:(e.value=void 0,e.done=!0),e},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),X_t=k7t({nodeDimensionsIncludeLabels:!1}),(c9t={layoutDimensions:me(function(t){return t=X_t(t),0!==(t=this.takesUpSpace()?t.nodeDimensionsIncludeLabels?{w:(t=this.boundingBox()).w,h:t.h}:{w:this.outerWidth(),h:this.outerHeight()}:{w:0,h:0}).w&&0!==t.h||(t.w=t.h=1),t},"layoutDimensions"),layoutPositions:me(function(t,i,e){var n=this.nodes().filter(function(t){return!t.isParent()}),r=this.cy(),a=i.eles,s=me(function(t){return t.id()},"getMemoizeKey"),o=tTt(e,s),l=(t.emit({type:"layoutstart",layout:t}),t.animations=[],me(function(t,e,r){var i=e.x1+e.w/2,e=e.y1+e.h/2;return{x:i+(r.x-i)*t,y:e+(r.y-e)*t}},"calculateSpacing")),c=i.spacingFactor&&1!==i.spacingFactor,h=me(function(){if(!c)return null;for(var t=n8t(),e=0;e<n.length;e++){var r=n[e],r=o(r,e);c8t(t,r.x,r.y)}return t},"spacingBb")(),u=tTt(function(t,e){var r,e=o(t,e);return c&&(r=Math.abs(i.spacingFactor),e=l(r,h,e)),null!=i.transform?i.transform(t,e):e},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}),t.animations.push(p)):g.position(f)}i.fit?(e=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:i.padding},duration:i.animationDuration,easing:i.animationEasing}),t.animations.push(e)):void 0!==i.zoom&&void 0!==i.pan&&(s=r.animation({zoom:i.zoom,pan:i.pan,duration:i.animationDuration,easing:i.animationEasing}),t.animations.push(s)),t.animations.forEach(function(t){return t.play()}),t.one("layoutready",i.ready),t.emit({type:"layoutready",layout:t}),QEt.all(t.animations.map(function(t){return t.promise()})).then(function(){t.one("layoutstop",i.stop),t.emit({type:"layoutstop",layout:t})})}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),t.one("layoutready",i.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",i.stop),t.emit({type:"layoutstop",layout:t});return this},"layoutPositions"),layout:me(function(t){return this.cy().makeLayout(lTt({},t,{eles:this}))},"layout")}).createLayout=c9t.makeLayout=c9t.layout,me(rwt,"styleCache"),me(iwt,"cacheStyleFunction"),me(nwt,"cachePrototypeStyleFunction"),a9t={recalculateRenderedStyle:me(function(t){var e=(r=this.cy()).renderer(),r=r.styleEnabled();return e&&r&&e.recalculateRenderedStyle(this,t),this},"recalculateRenderedStyle"),dirtyStyleCache:me(function(){var t=this.cy(),e=me(function(t){return t._private.styleCache=null},"dirty");return t.hasCompoundNodes()?((t=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(t.connectedEdges()),t.forEach(e)):this.forEach(function(t){e(t),t.connectedEdges().forEach(e)}),this},"dirtyStyleCache"),updateStyle:me(function(t){var e,r=this._private.cy;return r.styleEnabled()&&(r.batching()?r._private.batchStyleEles.merge(this):(e=this,t=!(!t&&void 0!==t),r=e=r.hasCompoundNodes()?this.spawnSelf().merge(this.descendants()).merge(this.parents()):e,t?r.emitAndNotify("style"):r.emit("style"),e.forEach(function(t){return t._private.styleDirty=!0}))),this},"updateStyle"),cleanStyle:me(function(){var t=this.cy();if(t.styleEnabled())for(var e=0;e<this.length;e++){var r=this[e];r._private.styleDirty&&(r._private.styleDirty=!1,t.style().apply(r))}},"cleanStyle"),parsedStyle:me(function(t){var e=!(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[t]??(e?i.style().getDefaultProperty(t):null)},"parsedStyle"),numericStyle:me(function(t){var e=this[0];if(e.cy().styleEnabled()&&e)return void 0!==(e=e.pstyle(t)).pfValue?e.pfValue:e.value},"numericStyle"),numericStyleUnits:me(function(t){var e=this[0];if(e.cy().styleEnabled()&&e)return e.pstyle(t).units},"numericStyleUnits"),renderedStyle:me(function(t){var e,r=this.cy();return r.styleEnabled()?(e=this[0])?r.style().getRenderedStyle(e,t):void 0:this},"renderedStyle"),style:me(function(t,e){if((i=this.cy()).styleEnabled()){var r,i=i.style();if($kt(t))i.applyBypass(this,t,!1),this.emitAndNotify("style");else if(Pkt(t)){if(void 0===e)return(r=this[0])?i.getStylePropertyValue(r,t):void 0;i.applyBypass(this,t,e,!1),this.emitAndNotify("style")}else if(void 0===t)return(r=this[0])?i.getRawStyle(r):void 0}return this},"style"),removeStyle:me(function(t){var e=this.cy();if(e.styleEnabled()){var r=e.style();if(void 0===t)for(var i=0;i<this.length;i++){var n=this[i];r.removeAllBypasses(n,!1)}else{t=t.split(/\s+/);for(var a=0;a<this.length;a++){var s=this[a];r.removeBypasses(s,t,!1)}}this.emitAndNotify("style")}return this},"removeStyle"),show:me(function(){return this.css("display","element"),this},"show"),hide:me(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:me(function(){if(!(t=this.cy()).styleEnabled())return 1;var t=t.hasCompoundNodes(),e=this[0];if(e){var r=e._private,i=e.pstyle("opacity").value;if(t){var n=r.data.parent?e.parents():null;if(n)for(var a=0;a<n.length;a++)i*=n[a].pstyle("opacity").value}return i}},"effectiveOpacity"),transparent:me(function(){var t,e;return!!this.cy().styleEnabled()&&(e=(t=this[0]).cy().hasCompoundNodes(),t?e?0===t.effectiveOpacity():0===t.pstyle("opacity").value:void 0)},"transparent"),backgrounding:me(function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding},"backgrounding")},me(awt,"checkCompound"),me(swt,"defineDerivedStateFunction"),K_t=iwt("eleTakesUpSpace",function(t){return"element"===t.pstyle("display").value&&0!==t.width()&&(!t.isNode()||0!==t.height())}),a9t.takesUpSpace=nwt("takesUpSpace",swt({ok:K_t})),HAt=iwt("eleInteractive",function(t){return"yes"===t.pstyle("events").value&&"visible"===t.pstyle("visibility").value&&K_t(t)}),t9t=iwt("parentInteractive",function(t){return"visible"===t.pstyle("visibility").value&&K_t(t)}),a9t.interactive=nwt("interactive",swt({ok:HAt,parentOk:t9t,edgeOkViaNode:K_t})),a9t.noninteractive=function(){var t=this[0];if(t)return!t.interactive()},OAt=iwt("eleVisible",function(t){return"visible"===t.pstyle("visibility").value&&0!==t.pstyle("opacity").pfValue&&K_t(t)}),GSt=K_t,a9t.visible=nwt("visible",swt({ok:OAt,edgeOkViaNode:GSt})),a9t.hidden=function(){var t=this[0];if(t)return!t.visible()},a9t.isBundledBezier=nwt("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),a9t.bypass=a9t.css=a9t.style,a9t.renderedCss=a9t.renderedStyle,a9t.removeBypass=a9t.removeCss=a9t.removeStyle,a9t.pstyle=a9t.parsedStyle,Z_t={},me(owt,"defineSwitchFunction"),me(lwt,"defineSwitchSet"),lwt({field:"locked",overrideField:me(function(t){return!!t.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),lwt({field:"grabbable",overrideField:me(function(t){return!t.cy().autoungrabify()&&!t.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),lwt({field:"selected",ableField:"selectable",overrideAble:me(function(t){return!t.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),lwt({field:"selectable",overrideField:me(function(t){return!t.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),Z_t.deselect=Z_t.unselect,Z_t.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},lwt({field:"active",on:"activate",off:"unactivate"}),lwt({field:"pannable",on:"panify",off:"unpanify"}),Z_t.inactive=function(){var t=this[0];if(t)return!t._private.active},J={},Q=me(function(c){return me(function(t){for(var e=[],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||e.push(i)}}return this.spawn(e,!0).filter(t)},"dagExtremityImpl")},"defineDagExtremity"),HAt=me(function(c){return function(t){for(var e=[],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?(e.push(s),e.push(l)):c.incoming&&l===i&&(e.push(s),e.push(o))}}return this.spawn(e,!0).filter(t)}},"defineDagOneHop"),t9t=me(function(c){return function(t){for(var e=this,r=[],i={};;){var n=c.outgoing?e.outgoers():e.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;e=n}return this.spawn(r,!0).filter(t)}},"defineDagAllHops"),J.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},lTt(J,{roots:Q({noIncomingEdges:!0}),leaves:Q({noOutgoingEdges:!0}),outgoers:e9t(HAt({outgoing:!0}),"outgoers"),successors:t9t({outgoing:!0}),incomers:e9t(HAt({incoming:!0}),"incomers"),predecessors:t9t({incoming:!0})}),lTt(J,{neighborhood:e9t(function(t){for(var e=[],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&&e.push(c[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:me(function(t){return this.neighborhood().add(this).filter(t)},"closedNeighborhood"),openNeighborhood:me(function(t){return this.neighborhood(t)},"openNeighborhood")}),J.neighbourhood=J.neighborhood,J.closedNeighbourhood=J.closedNeighborhood,J.openNeighbourhood=J.openNeighborhood,lTt(J,{source:e9t(me(function(t){var e,r=this[0];return(e=r?r._private.source||r.cy().collection():e)&&t?e.filter(t):e},"sourceImpl"),"source"),target:e9t(me(function(t){var e,r=this[0];return(e=r?r._private.target||r.cy().collection():e)&&t?e.filter(t):e},"targetImpl"),"target"),sources:cwt({attr:"source"}),targets:cwt({attr:"target"})}),me(cwt,"defineSourceFunction"),lTt(J,{edgesWith:e9t(hwt(),"edgesWith"),edgesTo:e9t(hwt({thisIsSrc:!0}),"edgesTo")}),me(hwt,"defineEdgesWithFunction"),lTt(J,{connectedEdges:e9t(function(t){for(var e=[],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];e.push(s)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:e9t(function(t){for(var e=[],r=0;r<this.length;r++){var i=this[r];i.isEdge()&&(e.push(i.source()[0]),e.push(i.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:e9t(uwt(),"parallelEdges"),codirectedEdges:e9t(uwt({codirected:!0}),"codirectedEdges")}),me(uwt,"defineParallelEdgesFunction"),lTt(J,{components:me(function(t){var r=this,i=r.cy(),n=i.collection(),a=(null==t?r:t).nodes(),s=[],o=(null!=t&&a.empty()&&(a=t.sources()),me(function(t,e){n.merge(t),a.unmerge(t),e.merge(t)},"visitInComponent"));if(a.empty())return r.spawn();for(var e=me(function(){var e=i.collection(),t=(s.push(e),a[0]);o(t,e),r.bfs({directed:!1,roots:t,visit:me(function(t){return o(t,e)},"visit")}),e.forEach(function(t){t.connectedEdges().forEach(function(t){r.has(t)&&e.has(t.source())&&e.has(t.target())&&e.merge(t)})})},"_loop");e(),0<a.length;);return s},"components"),component:me(function(){var t=this[0];return t.cy().mutableElements().components(t)[0]},"component")}),J.componentsOf=J.components,Q_t=me(function(t,e){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===t)p7t("A collection must have a reference to the core");else{var n=new A7t,a=!1;if(e){if(0<e.length&&$kt(e[0])&&!jkt(e[0])){for(var a=!0,s=[],o=new L7t,l=0,c=e.length;l<c;l++){var h=e[l],u=(null==h.data&&(h.data={}),h.data);if(null==u.id)u.id=x7t();else if(t.hasElementWithId(u.id)||o.has(u.id))continue;h=new N7t(t,h,!1),s.push(h),o.add(u.id)}e=s}}else e=[];for(var d=this.length=0,p=e.length;d<p;d++){var g,f=e[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:t,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(t){this.lazyMap=t},rebuildMap:me(function(){for(var t=this.lazyMap=new A7t,e=this.eles,r=0;r<e.length;r++){var i=e[r];t.set(i.id(),{index:r,ele:i})}},"rebuildMap")},r&&(this._private.map=n),a&&!i&&this.restore()}},"Collection"),(J_t=N7t.prototype=Q_t.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},J_t.spawn=function(t,e){return new Q_t(this.cy(),t,e)},J_t.spawnSelf=function(){return this.spawn(this)},J_t.cy=function(){return this._private.cy},J_t.renderer=function(){return this._private.cy.renderer()},J_t.element=function(){return this[0]},J_t.collection=function(){return Wkt(this)?this:new Q_t(this._private.cy,[this])},J_t.unique=function(){return new Q_t(this._private.cy,this,!0)},J_t.hasElementWithId=function(t){return this._private.map.has(t=""+t)},J_t.getElementById=function(t){var e=this._private.cy;return(t=this._private.map.get(t=""+t))?t.ele:new Q_t(e)},J_t.$id=J_t.getElementById,J_t.poolIndex=function(){var t=this._private.cy._private.elements,e=this[0]._private.data.id;return t._private.map.get(e).index},J_t.indexOf=function(t){return t=t[0]._private.data.id,this._private.map.get(t).index},J_t.indexOfId=function(t){return this._private.map.get(t=""+t).index},J_t.json=function(n){var a,t,e,r,i,s,o,l,c=this.element(),h=this.cy();return null==c&&n?this:null!=c?(a=c._private,$kt(n)?(h.startBatch(),n.data&&(c.data(n.data),t=a.data,c.isEdge()?(s=!1,e={},r=n.data.source,i=n.data.target,null!=r&&r!=t.source&&(e.source=""+r,s=!0),null!=i&&i!=t.target&&(e.target=""+i,s=!0),s&&(c=c.move(e))):(r="parent"in n.data,i=n.data.parent,!r||null==i&&null==t.parent||i==t.parent||(c=c.move({parent:i=null!=(i=void 0===i?null:i)?""+i:i})))),n.position&&c.position(n.position),(s=me(function(t,e,r){var i=n[t];null!=i&&i!==a[t]&&(i?c[e]():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:y7t(a.data),position:y7t(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(t){return o.classes+=0==l++?t:" "+t}),o):void 0):void 0},J_t.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e].json();t.push(r)}return t},J_t.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var i=this[r].json(),i=new N7t(t,i,!1);e.push(i)}return new Q_t(t,e)},J_t.copy=J_t.clone,J_t.restore=function(){for(var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=!(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];e&&!l.removed()||(l.isNode()?n:a).push(l)}for(var c=n.concat(a),h=me(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(),e||p.removed)if(void 0===g.id)g.id=x7t();else if(at(g.id))g.id=""+g.id;else{if(Xkt(g.id)||!Pkt(g.id)){p7t("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){p7t("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,x=!1,b=0;b<v;b++){var w=y[b],k=g[w];null==(k=at(k)?g[w]=""+g[w]:k)||""===k?(p7t("Can not create edge `"+f+"` with unspecified "+w),x=!0):r.hasElementWithId(k)||(p7t("Can not create edge `"+f+"` with nonexistant "+w+" `"+k+"`"),x=!0)}if(x){h();continue}var T=r.getElementById(g.source),E=r.getElementById(g.target);(T.same(E)?T:(T._private.edges.push(m),E))._private.edges.push(m),m._private.source=T,m._private.target=E}p.map=new A7t,p.map.set(f,{ele:d,index:0}),p.removed=!1,e&&r.addToPool(d)}for(var C=0;C<n.length;C++){var _=n[C],S=_._private.data,A=(at(S.parent)&&(S.parent=""+S.parent),S.parent);if(null!=A||_._private.parent)if((A=_._private.parent?r.collection().merge(_._private.parent):r.getElementById(A)).empty())S.parent=void 0;else if(A[0].removed())f7t("Node added with missing parent, reference to parent removed"),S.parent=void 0,_._private.parent=null;else{for(var L=!1,N=A;!N.empty();){if(_.same(N)){L=!0,S.parent=void 0;break}N=N.parent()}L||(A[0]._private.children.push(_),_._private.parent=A[0],i.hasCompoundNodes=!0)}}if(0<c.length){for(var I=c.length===this.length?this:new Q_t(r,c),R=0;R<I.length;R++){var M=I[R];M.isNode()||(M.parallelEdges().clearTraversalCache(),M.source().clearTraversalCache(),M.target().clearTraversalCache())}(i.hasCompoundNodes?r.collection().merge(I).merge(I.connectedNodes()).merge(I.parent()):I).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?I.emitAndNotify("add"):e&&I.emit("add")}return this},J_t.removed=function(){var t=this[0];return t&&t._private.removed},J_t.inside=function(){var t=this[0];return t&&!t._private.removed},J_t.remove=function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=[],n={},e=this._private.cy;function a(t){for(var e=t._private.edges,r=0;r<e.length;r++)o(e[r])}function s(t){for(var e=t._private.children,r=0;r<e.length;r++)o(e[r])}function o(t){var e=n[t.id()];r&&t.removed()||e||(n[t.id()]=!0,t.isNode()?(i.push(t),a(t),s(t)):i.unshift(t))}me(a,"addConnectedEdges"),me(s,"addChildren"),me(o,"add");for(var l=0,c=this.length;l<c;l++)o(this[l]);function h(t,e){var r=t._private.edges;T7t(r,e),t.clearTraversalCache()}function u(t){t.clearTraversalCache()}me(h,"removeEdgeRef"),me(u,"removeParallelRef");var d=[];function p(t,e){e=e[0];var r=(t=t[0])._private.children,i=t.id();T7t(r,e),e._private.parent=null,d.ids[i]||(d.ids[i]=!0,d.push(t))}d.ids={},me(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&e.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(),x=0;x<v.length;x++){var b=v[x];u(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else 0!==(m=f.parent()).length&&p(m,f);r&&(f._private.removed=!0)}var w=e._private.elements;e._private.hasCompoundNodes=!1;for(var k=0;k<w.length;k++)if(w[k].isParent()){e._private.hasCompoundNodes=!0;break}var T=new Q_t(this.cy(),i);0<T.size()&&(t?T.emitAndNotify("remove"):r&&T.emit("remove"));for(var E=0;E<d.length;E++){var C=d[E];r&&C.removed()||C.updateStyle()}return T},J_t.move=function(t){var i,n,a,s,o,e=this._private.cy,l=this,r=me(function(t){return null==t?t:""+t},"toString");return void 0!==t.source||void 0!==t.target?(i=r(t.source),n=r(t.target),a=null!=i&&e.hasElementWithId(i),s=null!=n&&e.hasElementWithId(n),(a||s)&&(e.batch(function(){l.remove(!1,!1),l.emitAndNotify("moveout");for(var t=0;t<l.length;t++){var e=l[t],r=e._private.data;e.isEdge()&&(a&&(r.source=i),s)&&(r.target=n)}l.restore(!1,!1)}),l.emitAndNotify("move"))):void 0===t.parent||null!==(r=r(t.parent))&&!e.hasElementWithId(r)||(o=null===r?void 0:r,e.batch(function(){var t=l.remove(!1,!1);t.emitAndNotify("moveout");for(var e=0;e<l.length;e++){var r=l[e],i=r._private.data;r.isNode()&&(i.parent=o)}t.restore(!1,!1)}),l.emitAndNotify("move")),this},[jEt,r9t,PAt,pAt,kAt,EAt,YAt,IAt,RAt,MAt,DAt,V_t,c9t,a9t,Z_t,J].forEach(function(t){lTt(J_t,t)}),OAt={add:me(function(t){if(qkt(t)){var e=t;if(e._private.cy===this)a=e.restore();else{for(var r=[],i=0;i<e.length;i++){var n=e[i];r.push(n.json())}a=new Q_t(this,r)}}else if(Fkt(t))var a=new Q_t(this,t);else if($kt(t)&&(Fkt(t.nodes)||Fkt(t.edges))){for(var s=t,o=[],l=["nodes","edges"],c=0,h=l.length;c<h;c++){var u=l[c],d=s[u];if(Fkt(d))for(var p=0,g=d.length;p<g;p++){var f=lTt({group:u},d[p]);o.push(f)}}a=new Q_t(this,o)}else a=new N7t(this,t).collection();return a},"add"),remove:me(function(t){var e;return qkt(t)||Pkt(t)&&(e=t,t=this.$(e)),t.remove()},"remove")},me(dwt,"generateCubicBezier"),me(o,"springAccelerationForState"),me(l,"springEvaluateStateWithDerivative"),me(h,"springIntegrateState"),tSt=me(function t(e,r,i){var n,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(e=parseFloat(e)||500,r=parseFloat(r)||20,i=i||null,o.tension=e,o.friction=r,a=(n=null!==i)?(c=t(e,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(t){return l[t*(l.length-1)|0]}:c},"springRK4Factory"),GSt=me(function(t,e,r,i){var n=dwt(t,e,r,i);return function(t,e,r){return t+(e-t)*n(r)}},"cubicBezier"),eSt={linear:me(function(t,e,r){return t+(e-t)*r},"linear"),ease:GSt(.25,.1,.25,1),"ease-in":GSt(.42,0,1,1),"ease-out":GSt(0,0,.58,1),"ease-in-out":GSt(.42,0,.58,1),"ease-in-sine":GSt(.47,0,.745,.715),"ease-out-sine":GSt(.39,.575,.565,1),"ease-in-out-sine":GSt(.445,.05,.55,.95),"ease-in-quad":GSt(.55,.085,.68,.53),"ease-out-quad":GSt(.25,.46,.45,.94),"ease-in-out-quad":GSt(.455,.03,.515,.955),"ease-in-cubic":GSt(.55,.055,.675,.19),"ease-out-cubic":GSt(.215,.61,.355,1),"ease-in-out-cubic":GSt(.645,.045,.355,1),"ease-in-quart":GSt(.895,.03,.685,.22),"ease-out-quart":GSt(.165,.84,.44,1),"ease-in-out-quart":GSt(.77,0,.175,1),"ease-in-quint":GSt(.755,.05,.855,.06),"ease-out-quint":GSt(.23,1,.32,1),"ease-in-out-quint":GSt(.86,0,.07,1),"ease-in-expo":GSt(.95,.05,.795,.035),"ease-out-expo":GSt(.19,1,.22,1),"ease-in-out-expo":GSt(1,0,0,1),"ease-in-circ":GSt(.6,.04,.98,.335),"ease-out-circ":GSt(.075,.82,.165,1),"ease-in-out-circ":GSt(.785,.135,.15,.86),spring:me(function(t,e,r){var i;return 0===r?eSt.linear:(i=tSt(t,e,r),function(t,e,r){return t+(e-t)*i(r)})},"spring"),"cubic-bezier":GSt},me(pwt,"getEasedValue"),me(gwt,"getValue"),me(fwt,"ease"),me(mwt,"step$1"),me(ywt,"valid"),me(vwt,"startAnimation"),me(xwt,"stepAll"),Q={animate:KCt.animate(),animation:KCt.animation(),animated:KCt.animated(),clearQueue:KCt.clearQueue(),delay:KCt.delay(),delayAnimation:KCt.delayAnimation(),stop:KCt.stop(),addToAnimationPool:me(function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},"addToAnimationPool"),stopAnimationLoop:me(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:me(function(){var t,r=this;function e(){r._private.animationsRunning&&HTt(me(function(t){xwt(t,r),e()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(me(e,"headlessStep"),(t=r.renderer())&&t.beforeRender?t.beforeRender(me(function(t,e){xwt(e,r)},"rendererAnimationStep"),t.beforeRenderPriorities.animations):e())},"startAnimationLoop")},rSt={qualifierCompare:me(function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},"qualifierCompare"),eventMatches:me(function(t,e,r){return null==(e=e.qualifier)||t!==r.target&&jkt(r.target)&&e.matches(r.target)},"eventMatches"),addEventFields:me(function(t,e){e.cy=t,e.target=t},"addEventFields"),callbackContext:me(function(t,e,r){return null!=e.qualifier?r.target:t},"callbackContext")},iSt=me(function(t){return Pkt(t)?new g_t(t):t},"argSelector"),HAt={createEmitter:me(function(){var t=this._private;return t.emitter||(t.emitter=new ewt(rSt,this)),this},"createEmitter"),emitter:me(function(){return this._private.emitter},"emitter"),on:me(function(t,e,r){return this.emitter().on(t,iSt(e),r),this},"on"),removeListener:me(function(t,e,r){return this.emitter().removeListener(t,iSt(e),r),this},"removeListener"),removeAllListeners:me(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:me(function(t,e,r){return this.emitter().one(t,iSt(e),r),this},"one"),once:me(function(t,e,r){return this.emitter().one(t,iSt(e),r),this},"once"),emit:me(function(t,e){return this.emitter().emit(t,e),this},"emit"),emitAndNotify:me(function(t,e){return this.emit(t),this.notify(t,e),this},"emitAndNotify")},KCt.eventAliasesOn(HAt),(t9t={png:me(function(t){return this._private.renderer.png(t=t||{})},"png"),jpg:me(function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)},"jpg")}).jpeg=t9t.jpg,(e9t={layout:me(function(t){if(null==t)p7t("Layout options must be specified to make a layout");else if(null==t.name)p7t("A `name` must be specified to make a layout");else{var e,r=t.name,i=this.extension("layout",r);if(null!=i)return e=Pkt(t.eles)?this.$(t.eles):null!=t.eles?t.eles:this.$(),new i(lTt({},t,{cy:this,eles:e}));p7t("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=e9t.makeLayout=e9t.layout,r9t={notify:me(function(t,e){var r,i=this._private;this.batching()?(i.batchNotifications=i.batchNotifications||{},r=i.batchNotifications[t]=i.batchNotifications[t]||this.collection(),null!=e&&r.merge(e)):i.notificationsEnabled&&(r=this.renderer(),!this.destroyed())&&r&&r.notify(t,e)},"notify"),notifications:me(function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},"notifications"),noNotifications:me(function(t){this.notifications(!1),t(),this.notifications(!0)},"noNotifications"),batching:me(function(){return 0<this._private.batchCount},"batching"),startBatch:me(function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},"startBatch"),endBatch:me(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(t){var e=i.batchNotifications[t];e.empty()?r.notify(t):r.notify(t,e)})),this},"endBatch"),batch:me(function(t){return this.startBatch(),t(),this.endBatch(),this},"batch"),batchData:me(function(n){var a=this;return this.batch(function(){for(var t=Object.keys(n),e=0;e<t.length;e++){var r=t[e],i=n[r];a.getElementById(r).data(i)}})},"batchData")},nSt=k7t({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:12,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),(PAt={renderTo:me(function(t,e,r,i){return this._private.renderer.renderTo(t,e,r,i),this},"renderTo"),renderer:me(function(){return this._private.renderer},"renderer"),forceRender:me(function(){return this.notify("draw"),this},"forceRender"),resize:me(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:me(function(t){var e=this.extension("renderer",t.name);null==e?p7t("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==t.wheelSensitivity&&f7t("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."),((t=nSt(t)).cy=this)._private.renderer=new e(t),this.notify("init"))},"initRenderer"),destroyRenderer:me(function(){this.notify("destroy");var t=this.container();if(t)for(t._cyreg=null;0<t.childNodes.length;)t.removeChild(t.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach(function(t){(t=t._private).rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},"destroyRenderer"),onRender:me(function(t){return this.on("render",t)},"onRender"),offRender:me(function(t){return this.off("render",t)},"offRender")}).invalidateDimensions=PAt.resize,(pAt={collection:me(function(t,e){return Pkt(t)?this.$(t):qkt(t)?t.collection():Fkt(t)?new Q_t(this,t,(e=e||{}).unique,e.removed):new Q_t(this)},"collection"),nodes:me(function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},"nodes"),edges:me(function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},"edges"),$:me(function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},"$"),mutableElements:me(function(){return this._private.elements},"mutableElements")}).elements=pAt.filter=pAt.$,kAt={apply:function(t){for(var e=this._private.cy.collection(),r=0;r<t.length;r++){var i,n=t[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)&&e.push(n))}return e},getPropertiesDiff:function(t,e){var r=this._private.propDiffs=this._private.propDiffs||{},i=t+"-"+e,n=r[i];if(n)return n;for(var a=[],s={},o=0;o<this.length;o++){var l=this[o],c="t"===t[o],h="t"===e[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"===e[y]&&(m=null!=v.properties[g.name]))break}s[f]||m||(s[f]=!0,a.push(f))}}}return r[i]=a},getContextMeta:function(t){for(var e="",r=t._private.styleCxtKey||"",i=0;i<this.length;i++){var n=this[i];e+=n.selector&&n.selector.matches(t)?"t":"f"}return r=this.getPropertiesDiff(r,e),{key:t._private.styleCxtKey=e,diffPropNames:r,empty:0===r.length}},getContextStyle:function(t){var e=t.key;if((t=this._private.contextStyles=this._private.contextStyles||{})[e])return t[e];for(var r={_private:{key:e}},i=0;i<this.length;i++){var n=this[i];if("t"===e[i])for(var a=0;a<n.properties.length;a++){var s=n.properties[a];r[s.name]=s}}return t[e]=r},applyContextStyle:function(t,e,r){for(var i=t.diffPropNames,n={},a=this.types,s=0;s<i.length;s++){var o=i[s],l=e[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(t){var r=t._private,i=this,e=(i.propertyGroupNames,i.propertyGroupKeys),n=me(function(t,e,r){return i.getPropertiesHash(t,e,r)},"propHash"),a=r.styleKey;if(t.removed())return!1;for(var s="nodes"===r.group,o=t._private.style,l=Object.keys(o),c=0;c<e.length;c++){var h=e[c];r.styleKeys[h]=[9261,5381]}for(var u=me(function(t,e){return r.styleKeys[e][0]=KTt(t,r.styleKeys[e][0])},"updateGrKey1"),d=me(function(t,e){return r.styleKeys[e][1]=ZTt(t,r.styleKeys[e][1])},"updateGrKey2"),p=me(function(t,e){u(t,e),d(t,e)},"updateGrKey"),g=me(function(t,e){for(var r=0;r<t.length;r++){var i=t.charCodeAt(r);u(i,e),d(i,e)}},"updateGrKeyWStr"),f=me(function(t){return-128<t&&t<128&&Math.floor(t)!==t?2e9-(1024*t|0):t},"cleanNum"),m=0;m<l.length;m++){var y,v,x,b,w,k=l[m],T=o[k];null!=T&&(y=(k=this.properties[k]).type,v=k.groupKey,x=void 0,null!=k.hashOverride?x=k.hashOverride(t,T):null!=T.pfValue&&(x=T.pfValue),k=null==k.enums?T.value:null,b=null!=x,w=T.units,!y.number||!b&&null==k||y.multiple?g(T.strValue,v):(p(f(b?x:k),v),b||null==w||g(w,v)))}for(var E=[9261,5381],C=0;C<e.length;C++){var _=e[C],_=r.styleKeys[_];E[0]=KTt(_[0],E[0]),E[1]=ZTt(_[1],E[1])}r.styleKey=QTt(E[0],E[1]);var S=r.styleKeys,A=(r.labelDimsKey=JTt(S.labelDimensions),n(t,["label"],S.labelDimensions));return r.labelKey=JTt(A),r.labelStyleKey=JTt(t7t(S.commonLabel,A)),s||(A=n(t,["source-label"],S.labelDimensions),r.sourceLabelKey=JTt(A),r.sourceLabelStyleKey=JTt(t7t(S.commonLabel,A)),A=n(t,["target-label"],S.labelDimensions),r.targetLabelKey=JTt(A),r.targetLabelStyleKey=JTt(t7t(S.commonLabel,A))),s&&(A=[(n=r.styleKeys).nodeBody,n.nodeBorder,n.nodeOutline,n.backgroundImage,n.compound,S=n.pie].filter(function(t){return null!=t}).reduce(t7t,[9261,5381]),r.nodeKey=JTt(A),r.hasPie=null!=S&&9261!==S[0]&&5381!==S[1]),a!==r.styleKey},clearStyleHints:function(t){(t=t._private).styleCxtKey="",t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null},applyParsedProperty:function(r,t){var i=this,n=t,e=r._private.style,a=i.types,s=i.properties[n.name].type,o=n.bypass,l=e[n.name],c=l&&l.bypass,h=r._private,u="mapping",d=me(function(t){return null==t?null:null!=t.pfValue?t.pfValue:t.value},"getVal"),p=me(function(){var t=d(l),e=d(n);i.checkTriggers(r,n.name,t,e)},"checkTriggers");if((n="curve-style"===t.name&&r.isEdge()&&("bezier"!==t.value&&r.isLoop()||"haystack"===t.value&&(r.source().isParent()||r.target().isParent()))?t=this.parse(t.name,"bezier",o):n).delete)e[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&&(e[n.name]=l.bypassed,p(),!0):(p(),!0);var g=me(function(){f7t("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(!at(m))return f7t("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 x=n.valueMin[0],b=n.valueMax[0],w=n.valueMin[1],k=n.valueMax[1],T=n.valueMin[2],E=n.valueMax[2],C=null==n.valueMin[3]?1:n.valueMin[3],_=null==n.valueMax[3]?1:n.valueMax[3],b=[Math.round(x+(b-x)*v),Math.round(w+(k-w)*v),Math.round(T+(E-T)*v),Math.round(C+(_-C)*v)],x={bypass:n.bypass,name:n.name,value:b,strValue:"rgb("+b[0]+", "+b[1]+", "+b[2]+")"};else{if(!s.number)return!1;k=n.valueMin+(n.valueMax-n.valueMin)*v,x=this.parse(n.name,k,n.bypass,u)}if(!x)return g(),!1;x.mapping=n,n=x;break;case a.data:for(var S=n.field.split("."),A=h.data,L=0;L<S.length&&A;L++)A=A[S[L]];if(!(x=null!=A?this.parse(n.name,A,n.bypass,u):x))return g(),!1;x.mapping=n,n=x;break;case a.fn:if(w=n.value,E=null!=n.fnValue?n.fnValue:w(r),null==(n.prevFnValue=E))return f7t("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(x=this.parse(n.name,E,n.bypass,u)))return f7t("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+r.id()+"` is invalid)"),!1;x.mapping=y7t(n),n=x;break;case void 0:break;default:return!1}o?(n.bypassed=c?l.bypassed:l,e[n.name]=n):c?l.bypassed=n:e[n.name]=n}return p(),!0},cleanElements:function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(this.clearStyleHints(i),i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),e)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(e,t){var r=this,i=e._private,n=e.pstyle("transition-property").value,a=e.pstyle("transition-duration").pfValue,s=e.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=e.pstyle(d),g=t[d];g&&(h=g.prev,g=null!=g.next?g.next:p,p=!1,u=void 0,h)&&(at(h.pfValue)&&at(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):at(h.value)&&at(g.value)?(p=g.value-h.value,u=h.value+1e-6*p):Fkt(h.value)&&Fkt(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(e,d,u),l=!0)}l&&(i.transitioning=!0,new QEt(function(t){0<s?e.delayAnimation(s).play().promise().then(t):t()}).then(function(){return e.animation({style:o,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(e,n),e.emitAndNotify("style"),i.transitioning=!1}))}else i.transitioning&&(this.removeBypasses(e,n),e.emitAndNotify("style"),i.transitioning=!1)},checkTrigger:function(t,e,r,i,n,a){null!=(n=n(e=this.properties[e]))&&n(r,i)&&a(e)},checkZOrderTrigger:function(t,e,r,i){var n=this;this.checkTrigger(t,e,r,i,function(t){return t.triggersZOrder},function(){n._private.cy.notify("zorder",t)})},checkBoundsTrigger:function(e,r,i,n){this.checkTrigger(e,r,i,n,function(t){return t.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!t.triggersBoundsOfParallelBeziers||"curve-style"!==r||"bezier"!==i&&"bezier"!==n||e.parallelEdges().forEach(function(t){t.dirtyBoundingBoxCache()}),!t.triggersBoundsOfConnectedEdges||"display"!==r||"none"!==i&&"none"!==n||e.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},checkTriggers:function(t,e,r,i){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,i),this.checkBoundsTrigger(t,e,r,i)}},EAt={applyBypass:function(t,e,r,i){var n=[];if("*"===e||"**"===e){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(Pkt(e)){var o=this.parse(e,r,!0);o&&n.push(o)}else{if(!$kt(e))return!1;var l=e;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[rTt(u)]:d)&&(u=this.parse(u,d,!0))&&n.push(u)}}if(0===n.length)return!1;for(var p=!1,g=0;g<t.length;g++){for(var f=t[g],m={},y=void 0,v=0;v<n.length;v++){var x,b=n[v];i&&(x=f.pstyle(b.name),y=m[b.name]={prev:x}),p=this.applyParsedProperty(f,y7t(b))||p,i&&(y.next=f.pstyle(b.name))}p&&this.updateStyleHints(f),i&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(t,e,r){e=eTt(e);for(var i=0;i<t.length;i++){var n=t[i],a=n._private.style[e],s=(o=this.properties[e].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,e,r),this.checkTriggers(n,e,l,r)}},removeAllBypasses:function(t,e){return this.removeBypasses(t,this.propertyNames,e)},removeBypasses:function(t,e,r){for(var i=0;i<t.length;i++){for(var n=t[i],a={},s=0;s<e.length;s++){var o=e[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)}}},YAt={getEmSizeInPixels:function(){var t=this.containerCss("font-size");return null!=t?parseFloat(t):1},containerCss:function(t){var e=this._private.cy,r=e.container();if((e=e.window())&&r&&e.getComputedStyle)return e.getComputedStyle(r).getPropertyValue(t)}},(IAt={getRenderedStyle:function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},getRawStyle:function(t,e){if(t=t[0]){for(var r={},i=0;i<this.properties.length;i++){var n=this.properties[i],a=this.getStylePropertyValue(t,n.name,e);null!=a&&(r[n.name]=a,r[rTt(n.name)]=a)}return r}},getIndexedStyle:function(t,e,r,i){return t.pstyle(e)[r][i]??t.cy().style().getDefaultProperty(e)[r][0]},getStylePropertyValue:function(t,e,r){if(t=t[0]){var i=(e=(e=this.properties[e]).alias?e.pointsTo:e).type;if(e=t.pstyle(e.name)){var n,a,s,o=e.value,l=e.units,e=e.strValue;if(r&&i.number&&null!=o&&at(o))return n=t.cy().zoom(),a=me(function(t){return t*n},"getRenderedValue"),s=me(function(t,e){return a(t)+e},"getValueStringWithUnits"),((r=Fkt(o))?l.every(function(t){return null!=t}):null!=l)?r?o.map(function(t,e){return s(t,l[e])}).join(" "):s(o,l):r?o.map(function(t){return Pkt(t)?t:""+a(t)}).join(" "):""+a(o);if(null!=e)return e}return null}},getAnimationStartStyle:function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i].name,a=t.pstyle(n);(a=void 0!==a?$kt(a)?this.parse(n,a.strValue):this.parse(n,a):a)&&(r[n]=a)}return r},getPropsList:function(t){var e=[],r=t,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[eTt(o)];(o=this.parse(o.name,s))&&e.push(o)}return e},getNonDefaultPropertiesHash:function(t,e,r){for(var i,n,a,s,o=r.slice(),l=0;l<e.length;l++)if(null!=(i=t.pstyle(e[l],!1)))if(null!=i.pfValue)o[0]=KTt(a,o[0]),o[1]=ZTt(a,o[1]);else for(n=i.strValue,s=0;s<n.length;s++)a=n.charCodeAt(s),o[0]=KTt(a,o[0]),o[1]=ZTt(a,o[1]);return o}}).getPropertiesHash=IAt.getNonDefaultPropertiesHash,RAt={appendFromJson:function(t){for(var e=0;e<t.length;e++){var r=t[e],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(t){return this.resetToDefault(),this.appendFromJson(t),this},json:function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],i=r.selector,n=r.properties,a={},s=0;s<n.length;s++){var o=n[s];a[o.name]=o.strValue}t.push({selector:i?i.toString():"core",style:a})}return t}},MAt={appendFromString:function(t){var e=""+t;function r(){e=e.length>a.length?e.substr(a.length):""}function i(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),me(r,"removeSelAndBlockFromRemaining"),me(i,"removePropAndValFromRem");!e.match(/^\s*$/);){var n=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!n){f7t("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=n[0],s=n[1];if("core"!==s&&new g_t(s).invalid)f7t("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*$)/))){f7t("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}):f7t("Skipping property: Invalid property definition in: "+u):f7t("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(t){return this.resetToDefault(),this.appendFromString(t),this}},aSt={};var a=aTt,s=me(function(t){return"^"+t+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),c=me(function(t){var e=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"^"+t+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+a+")\\s*\\,\\s*("+a+")\\s*,\\s*("+e+")\\s*\\,\\s*("+e+")\\)$"},"mapData"),u=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"],s=(aSt.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"]},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},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"]},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:me(function(t,e){switch(t.length){case 2:return"deg"!==e[0]&&"rad"!==e[0]&&"deg"!==e[1]&&"rad"!==e[1];case 1:return Pkt(t[0])||"deg"===e[0]||"rad"===e[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:me(function(t){return 1===(t=t.length)||2===t||4===t},"validate")}},{zeroNonZero:me(function(t,e){return(null==t||null==e)&&t!==e||0==t&&0!=e||0!=t&&0==e},"zeroNonZero"),any:me(function(t,e){return t!=e},"any"),emptyNonEmpty:me(function(t,e){return t=Xkt(t),e=Xkt(e),t&&!e||!t&&e},"emptyNonEmpty")}),d=aSt.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}],m=[{name:"events",type:d.bool,triggersZOrder:s.any},{name:"text-events",type:d.bool,triggersZOrder:s.any}],y=[{name:"display",type:d.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:!0},{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}],v=[{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}],x=[{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}],P=[{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}],b=me(function(t,e){return"label"===e.value?-t.poolIndex():e.pfValue},"nodeSizeHashOverride"),b=[{name:"height",type:d.nodeSize,triggersBounds:s.any,hashOverride:b},{name:"width",type:d.nodeSize,triggersBounds:s.any,hashOverride:b},{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}],B=[{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}],F=[{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}],$=[{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}],z=[{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,triggersBoundsOfParallelBeziers:!0},{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}],U=[{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}],q=[{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}],w=[];aSt.pieBackgroundN=16,w.push({name:"pie-size",type:d.sizeMaybePercent});for(var k=1;k<=aSt.pieBackgroundN;k++)w.push({name:"pie-"+k+"-background-color",type:d.color}),w.push({name:"pie-"+k+"-background-size",type:d.percent}),w.push({name:"pie-"+k+"-background-opacity",type:d.zeroOneNumber});var T=[],j=aSt.arrowPrefixes=["source","mid-source","target","mid-target"],E=([{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(e){j.forEach(function(t){t=t+"-"+e.name,T.push({name:t,type:e.type,triggersBounds:e.triggersBounds})})},{}),aSt.properties=[].concat(m,P,y,v,x,U,f,g,c,u,p,b,B,F,$,w,z,G,T,q)),C=aSt.propertyGroups={behavior:m,transition:P,visibility:y,overlay:v,underlay:x,ghost:U,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:b,nodeBorder:B,nodeOutline:F,backgroundImage:$,pie:w,compound:z,edgeLine:G,edgeArrow:T,core:q},W=aSt.propertyGroupNames={},Y=((aSt.propertyGroupKeys=Object.keys(C)).forEach(function(e){W[e]=C[e].map(function(t){return t.name}),C[e].forEach(function(t){return t.groupKey=e})}),aSt.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"}]);aSt.propertyNames=E.map(function(t){return t.name});for(var _=0;_<E.length;_++){var H=E[_];E[H.name]=H}for(var S=0;S<Y.length;S++){var A=Y[S],L=E[A.pointsTo];E.push(L={name:A.name,alias:!0,pointsTo:L}),E[A.name]=L}function N(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:h7t;L3t(this,N),this.idsByKey=new A7t,this.keyForId=new A7t,this.cachesByLvl=new A7t,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=e}function I(t,e){L3t(this,I),this.r=t,this.opts=e,this.keyToIds=new Map,this.idToKey=new Map,this.atlases=[],this.styleKeyToAtlas=new Map,this.styleKeyNeedsRedraw=new Set,this.forceGC=!1}function R(t,e){L3t(this,R),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.atlasSize=e.webglTexSize,this.rows=e.webglTexRows,this.enableWrapping=e.enableWrapping,this.texHeight=Math.floor(this.atlasSize/this.rows),this.maxTexWidth=this.atlasSize,this.texture=null,this.canvas=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=e.createTextureCanvas(t,this.atlasSize,this.atlasSize),this.scratch=e.createTextureCanvas(t,this.atlasSize,this.texHeight,"scratch")}function M(t,e,r){L3t(this,M),this.r=t,this.gl=e,this.maxInstances=r.webglBatchSize,this.maxAtlases=r.webglTexPerBatch,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,r.enableWrapping=!0,r.createTextureCanvas=Gwt,this.atlasManager=new qAt(t,r),this.program=this.createShaderProgram($At.SCREEN),this.pickingProgram=this.createShaderProgram($At.PICKING),this.vao=this.createVAO(),this.debugInfo=[]}function D(t,e){L3t(this,D),this.r=t,this.globalOptions=t=e,this.maxAtlases=t.webglTexPerBatch,this.atlasSize=t.webglTexSize,this.renderTypes=new Map,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[],this._cacheScratchCanvas(t)}function O(t){L3t(this,O),this.r=t}for(aSt.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},aSt.getDefaultProperties=function(){var t=this._private;if(null==t.defaultProperties){for(var e=lTt({"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","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","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%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(t,e){for(var r=1;r<=aSt.pieBackgroundN;r++){var i=e.name.replace("{{i}}",r),n=e.value;t[i]=n}return t},{}),{"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(e,r){return aSt.arrowPrefixes.forEach(function(t){t=t+"-"+r.name,e[t]=r.value}),e},{})),r={},i=0;i<this.properties.length;i++){var n,a=this.properties[i];a.pointsTo||(n=e[a=a.name],n=this.parse(a,n),r[a]=n)}t.defaultProperties=r}return t.defaultProperties},aSt.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},DAt={parse:function(t,e,r,i){var n,a,s;return Bkt(e)?this.parseImplWarn(t,e,r,i):(n=i7t(t,""+e,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(t,e,r,i)),(r||"mapping"===i)&&(s=y7t(s))&&(s.value=y7t(s.value)),s)},parseImplWarn:function(t,e,r,i){return(r=this.parseImpl(t,e,r,i))||null==e||f7t("The style property `".concat(t,": ").concat(e,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==e||f7t("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(e,r,i,t){e=eTt(e);var n=this.properties[e],a=r,s=this.types;if(!n||void 0===r)return null;n.alias&&(n=n.pointsTo,e=n.name);var o=Pkt(r),l=(o&&(r=r.trim()),n.type);if(!l)return null;if(i&&(""===r||null===r))return{name:e,value:r,bypass:!0,deleteBypass:!0};if(Bkt(r))return{name:e,value:r,strValue:"fn",mapped:s.fn,bypass:i};if(!(!o||t||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(n=new RegExp(s.data.regex).exec(r)))return!i&&(b=s.data,{name:e,value:n,strValue:""+r,mapped:b,field:n[1],bypass:i});if(10<=r.length&&"m"===r[0]&&(b=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(e,b[4]))||s.mapped)return!1;if(!(w=this.parse(e,b[5]))||w.mapped)return!1;if(s.pfValue===w.pfValue||s.strValue===w.strValue)return f7t("`"+e+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+s.strValue+"`"),this.parse(e,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:e,value:b,strValue:""+r,mapped:n,field:b[1],fieldMin:parseFloat(b[2]),fieldMax:parseFloat(b[3]),valueMin:s.value,valueMax:w.value,bypass:i}}}if(l.multiple&&"multiple"!==t){var u=o?r.split(/\s+/):Fkt(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(e,u[y],i,"multiple"),m=m||Pkt(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&&Pkt(d[0])?{name:e,value:d[0],strValue:d[0],bypass:i}:null:{name:e,value:d,pfValue:g,strValue:f,bypass:i,units:p}}var x,b,c=me(function(){for(var t=0;t<l.enums.length;t++)if(l.enums[t]===r)return{name:e,value:r,strValue:""+r,bypass:i};return null},"checkEnums");if(l.number)return h="px",l.units&&(x=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(o?(n="px|em"+(l.allowPercent?"|\\%":""),x&&(n=x),(b=r.match("^("+aTt+")("+n+")?$"))&&(r=b[1],x=b[2]||h)):x&&!l.implicitUnits||(x=h)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,c()):l.integer&&!Gkt(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:e,value:r,strValue:""+r+(x||""),units:x,bypass:i},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:H7t(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),E=0;E<T.length;E++){var C=T[E].trim();this.properties[C]?k.push(C):f7t("`"+C+"` is not a valid property name")}if(0===k.length)return null}return{name:e,value:k,strValue:0===k.length?"none":k.join(" "),bypass:i}}if(l.color)return(t=pTt(r))?{name:e,value:t,pfValue:t,strValue:"rgb("+t[0]+","+t[1]+","+t[2]+")",bypass:i}:null;if(l.regex||l.regexes){if(l.enums&&(o=c()))return o;for(var _=l.regexes||[l.regex],S=0;S<_.length;S++){var A=new RegExp(_[S]).exec(r);if(A)return{name:e,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:i}}return null}return l.string?{name:e,value:""+r,strValue:""+r,bypass:i}:l.enums?c():null}},sSt=me(function t(e){if(!(this instanceof t))return new t(e);Ykt(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):p7t("A style must have a core reference")},"Style"),(oSt=sSt.prototype).instanceString=function(){return"style"},oSt.clear=function(){for(var t=this._private,e=t.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0),e.forEach(function(t){(t=t[0]._private).styleDirty=!0,t.appliedInitStyle=!1}),this},oSt.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},oSt.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},oSt.selector=function(t){var t="core"===t?null:new g_t(t),e=this.length++;return this[e]={selector:t,properties:[],mappedProperties:[],index:e},this},oSt.css=function(){var t=arguments;if(1===t.length)for(var e=t[0],r=0;r<this.properties.length;r++){var i=this.properties[r],n=e[i.name];void 0!==(n=void 0===n?e[rTt(i.name)]:n)&&this.cssRule(i.name,n)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},oSt.style=oSt.css,oSt.cssRule=function(t,e){return(t=this.parse(t,e))&&(this[e=this.length-1].properties.push(t),(this[e].properties[t.name]=t).name.match(/pie-(\d+)-background-size/)&&t.value&&(this._private.hasPie=!0),t.mapped&&this[e].mappedProperties.push(t),!this[e].selector)&&(this._private.coreStyle[t.name]=t),this},oSt.append=function(t){return Hkt(t)?t.appendToStyle(this):Fkt(t)?this.appendFromJson(t):Pkt(t)&&this.appendFromString(t),this},sSt.fromJson=function(t,e){return(t=new sSt(t)).fromJson(e),t},sSt.fromString=function(t,e){return new sSt(t).fromString(e)},[kAt,EAt,YAt,IAt,RAt,MAt,aSt,DAt].forEach(function(t){lTt(oSt,t)}),sSt.types=oSt.types,sSt.properties=oSt.properties,sSt.propertyGroups=oSt.propertyGroups,sSt.propertyGroupNames=oSt.propertyGroupNames,sSt.propertyGroupKeys=oSt.propertyGroupKeys,c9t={style:me(function(t){return t&&this.setStyle(t).update(),this._private.style},"style"),setStyle:me(function(t){var e=this._private;return Hkt(t)?e.style=t.generateStyle(this):Fkt(t)?e.style=sSt.fromJson(this,t):Pkt(t)?e.style=sSt.fromString(this,t):e.style=sSt(this),e.style},"setStyle"),updateStyle:me(function(){this.mutableElements().updateStyle()},"updateStyle")},(a9t={autolock:me(function(t){return void 0===t?this._private.autolock:(this._private.autolock=!!t,this)},"autolock"),autoungrabify:me(function(t){return void 0===t?this._private.autoungrabify:(this._private.autoungrabify=!!t,this)},"autoungrabify"),autounselectify:me(function(t){return void 0===t?this._private.autounselectify:(this._private.autounselectify=!!t,this)},"autounselectify"),selectionType:me(function(t){var e=this._private;return null==e.selectionType&&(e.selectionType="single"),void 0===t?e.selectionType:("additive"!==t&&"single"!==t||(e.selectionType=t),this)},"selectionType"),panningEnabled:me(function(t){return void 0===t?this._private.panningEnabled:(this._private.panningEnabled=!!t,this)},"panningEnabled"),userPanningEnabled:me(function(t){return void 0===t?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!t,this)},"userPanningEnabled"),zoomingEnabled:me(function(t){return void 0===t?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!t,this)},"zoomingEnabled"),userZoomingEnabled:me(function(t){return void 0===t?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!t,this)},"userZoomingEnabled"),boxSelectionEnabled:me(function(t){return void 0===t?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!t,this)},"boxSelectionEnabled"),pan:me(function(){var t,e,r,i=arguments,n=this._private.pan;switch(i.length){case 0:return n;case 1:if(Pkt(i[0]))return n[t=i[0]];if($kt(i[0])){if(!this._private.panningEnabled)return this;e=(r=i[0]).x,r=r.y,at(e)&&(n.x=e),at(r)&&(n.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=i[1],"x"!==(t=i[0])&&"y"!==t||!at(e)||(n[t]=e),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:me(function(t,e){var r,i,n=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(n.length){case 1:$kt(t)&&(r=(i=n[0]).x,i=i.y,at(r)&&(a.x+=r),at(i)&&(a.y+=i),this.emit("pan viewport"));break;case 2:r=e,"x"!==(i=t)&&"y"!==i||!at(r)||(a[i]+=r),this.emit("pan viewport")}this.notify("viewport")}return this},"panBy"),gc:me(function(){this.notify("gc")},"gc"),fit:me(function(t,e){return(t=this.getFitViewport(t,e))&&((e=this._private).zoom=t.zoom,e.pan=t.pan,this.emit("pan zoom viewport"),this.notify("viewport")),this},"fit"),getFitViewport:me(function(t,e){if(at(t)&&void 0===e&&(e=t,t=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(Pkt(t)?(i=t,t=this.$(i)):Zkt(t)?((r={x1:(i=t).x1,y1:i.y1,x2:i.x2,y2:i.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1):qkt(t)||(t=this.mutableElements()),!qkt(t)||!t.empty())){var r=r||t.boundingBox(),i=this.width(),t=this.height();if(e=at(e)?e:0,!isNaN(i)&&!isNaN(t)&&0<i&&0<t&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:e=(e=(e=Math.min((i-2*e)/r.w,(t-2*e)/r.h))>this._private.maxZoom?this._private.maxZoom:e)<this._private.minZoom?this._private.minZoom:e,pan:{x:(i-e*(r.x1+r.x2))/2,y:(t-e*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:me(function(t,e){var r,i=this._private;return null==e&&(t=(r=t).min,e=r.max),at(t)&&at(e)&&t<=e?(i.minZoom=t,i.maxZoom=e):at(t)&&void 0===e&&t<=i.maxZoom?i.minZoom=t:at(e)&&void 0===t&&e>=i.minZoom&&(i.maxZoom=e),this},"zoomRange"),minZoom:me(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:me(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:me(function(t){var e,r,i=this._private,n=i.pan,a=i.zoom,s=!i.zoomingEnabled;return at(t)?r=t:$kt(t)&&(r=t.level,null!=t.position?e=z7t(t.position,a,n):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!i.panningEnabled&&(s=!0),r=(r=r>i.maxZoom?i.maxZoom:r)<i.minZoom?i.minZoom:r,!s&&at(r)&&r!==a&&(null==e||at(e.x)&&at(e.y))?null!=e?{zoomed:!0,panned:!0,zoom:t=r,pan:{x:-t/a*(e.x-n.x)+e.x,y:-t/a*(e.y-n.y)+e.y}}:{zoomed:!0,panned:!1,zoom:r,pan:n}:null},"getZoomedViewport"),zoom:me(function(t){var e;return void 0===t?this._private.zoom:(t=this.getZoomedViewport(t),e=this._private,null!=t&&t.zoomed&&(e.zoom=t.zoom,t.panned&&(e.pan.x=t.pan.x,e.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport")),this)},"zoom"),viewport:me(function(t){var e=this._private,r=!0,i=!0,n=[],a=!1,s=!1;return t&&(at(t.zoom)||(r=!1),$kt(t.pan)||(i=!1),r||i)&&(r&&((r=t.zoom)<e.minZoom||r>e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,n.push("zoom"))),!i||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,at(r.x)&&(e.pan.x=r.x,s=!1),at(r.y)&&(e.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:me(function(t){return(t=this.getCenterPan(t))&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:me(function(t,e){var r,i;if(this._private.panningEnabled&&(Pkt(t)?(r=t,t=this.mutableElements().filter(r)):qkt(t)||(t=this.mutableElements()),0!==t.length))return r=t.boundingBox(),t=this.width(),i=this.height(),{x:(t-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(i-e*(r.y1+r.y2))/2}},"getCenterPan"),reset:me(function(){return this._private.panningEnabled&&this._private.zoomingEnabled&&this.viewport({pan:{x:0,y:0},zoom:1}),this},"reset"),invalidateSize:me(function(){this._private.sizeCache=null},"invalidateSize"),size:me(function(){var e,t=this._private,r=t.container;return t.sizeCache=t.sizeCache||(r?(e=this.window().getComputedStyle(r),t=me(function(t){return parseFloat(e.getPropertyValue(t))},"val"),{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},"size"),width:me(function(){return this.size().width},"width"),height:me(function(){return this.size().height},"height"),extent:me(function(){var t=this._private.pan,e=this._private.zoom,r=this.renderedExtent();return(r={x1:(r.x1-t.x)/e,x2:(r.x2-t.x)/e,y1:(r.y1-t.y)/e,y2:(r.y2-t.y)/e}).w=r.x2-r.x1,r.h=r.y2-r.y1,r},"extent"),renderedExtent:me(function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},"renderedExtent"),multiClickDebounceTime:me(function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime},"multiClickDebounceTime")}).centre=a9t.center,a9t.autolockNodes=a9t.autolock,a9t.autoungrabifyNodes=a9t.autoungrabify,(J={data:KCt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:KCt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:KCt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:KCt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=J.data,J.removeAttr=J.removeData,lSt=me(function(t){var n=this,r=(o=(o=(t=lTt({},t)).container)&&!Ukt(o)&&Ukt(o[0])?o[0]:o)?o._cyreg:null,i=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),e=(o&&(o._cyreg=r),r.cy=n,void 0!==Lkt&&void 0!==o&&!t.headless),a=t,t=(a.layout=lTt({name:e?"grid":"null"},a.layout),a.renderer=lTt({name:e?"canvas":"null"},a.renderer),me(function(t,e,r){return void 0!==e?e:void 0!==r?r:t},"defVal")),s=this._private={container:o,ready:!1,options:a,elements:new Q_t(this),listeners:[],aniEles:new Q_t(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:t(!0,a.zoomingEnabled),userZoomingEnabled:t(!0,a.userZoomingEnabled),panningEnabled:t(!0,a.panningEnabled),userPanningEnabled:t(!0,a.userPanningEnabled),boxSelectionEnabled:t(!0,a.boxSelectionEnabled),autolock:t(!1,a.autolock,a.autolockNodes),autoungrabify:t(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:t(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?e:a.styleEnabled,zoom:at(a.zoom)?a.zoom:1,pan:{x:$kt(a.pan)&&at(a.pan.x)?a.pan.x:0,y:$kt(a.pan)&&at(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:t(250,a.multiClickDebounceTime)},o=(this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),me(function(t,e){if(t.some(Qkt))return QEt.all(t).then(e);e(t)},"loadExtData")),e=(s.styleEnabled&&n.setStyle([]),lTt({},a,a.renderer)),l=(n.initRenderer(e),me(function(t,e,r){n.notifications(!1);var i=n.mutableElements();0<i.length&&i.remove(),null!=t&&($kt(t)||Fkt(t))&&n.add(t),n.one("layoutready",function(t){n.notifications(!0),n.emit(t),n.one("load",e),n.emitAndNotify("load")}).one("layoutstop",function(){n.one("done",r),n.emit("done")}),(i=lTt({},n._private.options.layout)).eles=n.elements(),n.layout(i).run()},"setElesAndLayout"));o([a.style,a.elements],function(t){var e=t[0],t=t[1];s.styleEnabled&&n.style().append(e),l(t,function(){n.startAnimationLoop(),s.ready=!0,Bkt(a.ready)&&n.on("ready",a.ready);for(var t=0;t<i.length;t++){var e=i[t];n.on("ready",e)}r&&(r.readies=[]),n.emit("ready")},a.done)})},"Core"),cSt=lSt.prototype,lTt(cSt,{instanceString:me(function(){return"core"},"instanceString"),isReady:me(function(){return this._private.ready},"isReady"),destroyed:me(function(){return this._private.destroyed},"destroyed"),ready:me(function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},"ready"),destroy:me(function(){if(!this.destroyed())return this.stopAnimationLoop(),this.destroyRenderer(),this.emit("destroy"),this._private.destroyed=!0,this},"destroy"),hasElementWithId:me(function(t){return this._private.elements.hasElementWithId(t)},"hasElementWithId"),getElementById:me(function(t){return this._private.elements.getElementById(t)},"getElementById"),hasCompoundNodes:me(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:me(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:me(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:me(function(t){return this._private.elements.merge(t),this},"addToPool"),removeFromPool:me(function(t){return this._private.elements.unmerge(t),this},"removeFromPool"),container:me(function(){return this._private.container||null},"container"),window:me(function(){var t;return null!=this._private.container&&void 0!==(t=this._private.container.ownerDocument)&&null!=t&&t.defaultView||Lkt},"window"),mount:me(function(t){var e,r;if(null!=t)return r=(e=this._private).options,!Ukt(t)&&Ukt(t[0])&&(t=t[0]),this.stopAnimationLoop(),this.destroyRenderer(),e.container=t,e.styleEnabled=!0,this.invalidateSize(),this.initRenderer(lTt({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),this.startAnimationLoop(),this.style(r.style),this.emit("mount"),this},"mount"),unmount:me(function(){return this.stopAnimationLoop(),this.destroyRenderer(),this.initRenderer({name:"null"}),this.emit("unmount"),this},"unmount"),options:me(function(){return y7t(this._private.options)},"options"),json:me(function(t){var r,h=this,e=h._private,i=h.mutableElements(),n=me(function(t){return h.getElementById(t.id())},"getFreshRef");if($kt(t)){if(h.startBatch(),t.elements){var u={},a=me(function(t,e){for(var r=[],i=[],n=0;n<t.length;n++){var a,s,o=t[n];o.data.id?(a=""+o.data.id,s=h.getElementById(a),u[a]=!0,0!==s.length?i.push({ele:s,json:o}):(e&&(o.group=e),r.push(o))):f7t("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(Fkt(t.elements))a(t.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],c=t.elements[l];Fkt(c)&&a(c,l)}var d=h.collection();i.filter(function(t){return!u[t.id()]}).forEach(function(t){t.isParent()?d.merge(t):t.remove()}),d.forEach(function(t){return t.children().move({parent:null})}),d.forEach(function(t){return n(t).remove()})}t.style&&h.style(t.style),null!=t.zoom&&t.zoom!==e.zoom&&h.zoom(t.zoom),!t.pan||t.pan.x===e.pan.x&&t.pan.y===e.pan.y||h.pan(t.pan),t.data&&h.data(t.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!=t[f]&&h[f](t[f])}return h.endBatch(),this}return r={},t?r.elements=this.elements().map(function(t){return t.json()}):(r.elements={},i.forEach(function(t){var e=t.group();r.elements[e]||(r.elements[e]=[]),r.elements[e].push(t.json())})),this._private.styleEnabled&&(r.style=h.style().json()),r.data=y7t(h.data()),i=e.options,r.zoomingEnabled=e.zoomingEnabled,r.userZoomingEnabled=e.userZoomingEnabled,r.zoom=e.zoom,r.minZoom=e.minZoom,r.maxZoom=e.maxZoom,r.panningEnabled=e.panningEnabled,r.userPanningEnabled=e.userPanningEnabled,r.pan=y7t(e.pan),r.boxSelectionEnabled=e.boxSelectionEnabled,r.renderer=y7t(i.renderer),r.hideEdgesOnViewport=i.hideEdgesOnViewport,r.textureOnViewport=i.textureOnViewport,r.wheelSensitivity=i.wheelSensitivity,r.motionBlur=i.motionBlur,r.multiClickDebounceTime=i.multiClickDebounceTime,r},"json")}),cSt.$id=cSt.getElementById,[OAt,Q,HAt,t9t,e9t,r9t,PAt,pAt,c9t,a9t,J].forEach(function(t){lTt(cSt,t)}),hSt={fit:!0,directed:!1,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:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},uSt={maximal:!1,acyclic:!1},dSt=me(function(t){return t.scratch("breadthfirst")},"getInfo"),pSt=me(function(t,e){return t.scratch("breadthfirst",e)},"setInfo"),me(bwt,"BreadthFirstLayout"),gSt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(bwt.prototype.run=function(){var l=this.options,t=l.cy,c=l.eles,h=c.nodes().filter(function(t){return t.isChildless()}),e=c,r=l.directed,P=l.acyclic||l.maximal||0<l.maximalAdjustments,n=!!l.boundingBox,i=t.extent(),a=n8t(n?l.boundingBox:{x1:i.x1,y1:i.y1,w:i.w,h:i.h});if(qkt(l.roots))p=l.roots;else if(Fkt(l.roots)){for(var s=[],o=0;o<l.roots.length;o++){var u=l.roots[o],u=t.getElementById(u);s.push(u)}p=t.collection(s)}else if(Pkt(l.roots))p=t.$(l.roots);else if(r)p=h.roots();else for(var d=c.components(),p=t.collection(),B=me(function(t){var e=(t=d[t]).maxDegree(!1),t=t.filter(function(t){return t.degree(!1)===e});p=p.add(t)},"_loop"),g=0;g<d.length;g++)B(g);var f=[],m={},y=me(function(t,e){null==f[e]&&(f[e]=[]);var r=f[e].length;f[e].push(t),pSt(t,{index:r,depth:e})},"addToDepth"),F=me(function(t,e){var r=dSt(t),i=r.depth;f[i][r.index]=null,t.isChildless()&&y(t,e)},"changeDepth");e.bfs({roots:p,directed:l.directed,visit:me(function(t,e,r,i,n){var a=(t=t[0]).id();t.isChildless()&&y(t,n),m[a]=!0},"visit")});for(var v=[],x=0;x<h.length;x++){var b=h[x];m[b.id()]||v.push(b)}var w=me(function(t){for(var e=f[t],r=0;r<e.length;r++){var i=e[r];null==i?(e.splice(r,1),r--):pSt(i,{depth:t,index:r})}},"assignDepthsAt"),$=me(function(t,e){for(var r=dSt(t),i=t.incomers().filter(function(t){return t.isNode()&&c.has(t)}),n=-1,a=t.id(),s=0;s<i.length;s++)var o=i[s],o=dSt(o),n=Math.max(n,o.depth);return r.depth<=n&&(!l.acyclic&&e[a]?null:(F(t,r=n+1),e[a]=r,!0))},"adjustMaximally");if(r&&P){var k=[],z={},G=me(function(t){return k.push(t)},"enqueue"),U=me(function(){return k.shift()},"dequeue");for(h.forEach(function(t){return k.push(t)});0<k.length;){var T=U(),E=$(T,z);if(E)T.outgoers().filter(function(t){return t.isNode()&&c.has(t)}).forEach(G);else if(null===E){f7t("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 _=0;_<h.length;_++)var S=h[_].layoutDimensions(l),q=S.w,C=Math.max(C,q,S.h);var A={},L=me(function(t){if(A[t.id()])return A[t.id()];for(var e=dSt(t).depth,r=t.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=dSt(l))&&(s=l.index,l=l.depth,null!=s)&&null!=l&&(o=f[l].length,l<e)&&(i+=s/o,n++)}return i/=n=Math.max(1,n),0===n&&(i=0),A[t.id()]=i},"getWeightedPercent"),j=me(function(t,e){var r=L(t)-L(e);return 0==r?sTt(t.id(),e.id()):r},"sortFn");void 0!==l.depthSort&&(j=l.depthSort);for(var N=f.length,I=0;I<N;I++)f[I].sort(j),w(I);for(var R=[],M=0;M<v.length;M++)R.push(v[M]);i=me(function(){for(var t=0;t<N;t++)w(t)},"assignDepths"),R.length&&(f.unshift(R),N=f.length,i());for(var W=0,D=0;D<N;D++)W=Math.max(f[D].length,W);var Y=a.x1+a.w/2,H=a.y1+a.h/2,O=h.reduce(function(t,e){return e=e.boundingBox({includeLabels:l.nodeDimensionsIncludeLabels}),{w:-1===t.w?e.w:(t.w+e.w)/2,h:-1===t.h?e.h:(t.h+e.h)/2}},{w:-1,h:-1}),V=Math.max(1===N?0:n?(a.h-2*l.padding-O.h)/(N-1):(a.h-2*l.padding-O.h)/(N+1),C),X=f.reduce(function(t,e){return Math.max(t,e.length)},0),e=me(function(t){var e,r,i=(t=dSt(t)).depth,t=t.index;return l.circle?(e=Math.min(a.w/2/N,a.h/2/N),e=(e=Math.max(e,C))*i+e-(0<N&&f[0].length<=3?e/2:0),r=2*Math.PI/f[i].length*t,0===i&&1===f[0].length&&(e=1),{x:Y+e*Math.cos(r),y:H+e*Math.sin(r)}):(e=f[i].length,r=Math.max(1===e?0:n?(a.w-2*l.padding-O.w)/((l.grid?X:e)-1):(a.w-2*l.padding-O.w)/((l.grid?X:e)+1),C),{x:Y+(t+1-(e+1)/2)*r,y:H+(i+1-(N+1)/2)*V})},"getPosition");return c.nodes().layoutPositions(this,l,e),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:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(wwt,"CircleLayout"),fSt={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(wwt.prototype.run=function(){var i=t=this.options,t=t.cy,e=i.eles,n=void 0!==i.counterclockwise?!i.counterclockwise:i.clockwise,r=e.nodes().not(":parent");i.sort&&(r=r.sort(i.sort));for(var a,s=(t=n8t(i.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()})).x1+t.w/2,o=t.y1+t.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=at(i.radius)?i.radius:r.length<=1?0:Math.min(t.h,t.w)/2-c,1<r.length&&i.avoidOverlap&&(c*=1.75,t=Math.cos(l)-Math.cos(0),p=Math.sin(l)-Math.sin(0),t=Math.sqrt(c*c/(t*t+p*p)),a=Math.max(t,a));var p=me(function(t,e){var e=i.startAngle+e*l*(n?1:-1),r=a*Math.cos(e),e=a*Math.sin(e);return{x:s+r,y:o+e}},"getPos");return e.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:me(function(t){return t.degree()},"concentric"),levelWidth:me(function(t){return t.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(kwt,"ConcentricLayout"),kwt.prototype.run=function(){for(var t=r=this.options,e=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=r.cy,i=t.eles,n=i.nodes().not(":parent"),a=(r=n8t(t.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=t.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(t),l=Math.max(l,p.w,p.h);o.sort(function(t,e){return e.value-t.value});for(var P=t.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,x=l+t.minNodeSpacing;t.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-x,x=Math.min(x,r/(g.length+v?1:0)));for(var b=0,w=0;w<g.length;w++){var k,T=g[w],E=void 0===t.sweep?2*Math.PI-2*Math.PI/T.length:t.sweep,E=T.dTheta=E/Math.max(1,T.length-1);1<T.length&&t.avoidOverlap&&(k=Math.cos(E)-Math.cos(0),E=Math.sin(E)-Math.sin(0),k=Math.sqrt(x*x/(k*k+E*E)),b=Math.max(k,b)),T.r=b,b+=x}if(t.equidistant){for(var C=0,_=0,S=0;S<g.length;S++)var B=g[S].r-_,C=Math.max(C,B);for(var _=0,A=0;A<g.length;A++){var L=g[A];0===A&&(_=L.r),L.r=_,_+=C}}for(var N={},I=0;I<g.length;I++)for(var R=g[I],F=R.dTheta,M=R.r,D=0;D<R.length;D++){var $=R[D],O=t.startAngle+(e?1:-1)*F*D,O={x:a+M*Math.cos(O),y:s+M*Math.sin(O)};N[$.node.id()]=O}return i.nodes().layoutPositions(this,t,function(t){return t=t.id(),N[t]}),this},ySt={ready:me(function(){},"ready"),stop:me(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:me(function(t){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:me(function(t){return 32},"idealEdgeLength"),edgeElasticity:me(function(t){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},me(Twt,"CoseLayout"),Twt.prototype.run=function(){var r=this.options,t=r.cy,i=this,n=(!(i.stopped=!1)!==r.animate&&!1!==r.animate||i.emit({type:"layoutstart",layout:i}),mSt=!0===r.debug,vSt(t,i,r)),a=(mSt&&(void 0)(n),r.randomize&&wSt(n),VTt()),s=me(function(){TSt(n,t,r),!0===r.fit&&t.fit(r.padding)},"refresh"),o=me(function(t){return!(i.stopped||t>=r.numIter||(ESt(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},"mainLoop"),l=me(function(){var t,e;!0===r.animate||!1===r.animate?(s(),i.one("layoutstop",r.stop),i.emit({type:"layoutstop",layout:i})):(t=r.eles.nodes(),e=kSt(n,r,t),t.layoutPositions(i,r,e))},"done"),c=0,h=!0;if(!0===r.animate)me(function t(){for(var e=0;h&&e<r.refresh;)h=o(c),c++,e++;h?(VTt()-a>=r.animationThreshold&&s(),HTt(t)):(PSt(n,r),l())},"frame")();else{for(;h;)h=o(c),c++;PSt(n,r),l()}return this},Twt.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Twt.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},vSt=me(function(t,e,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=n8t(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.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);(I={}).isLocked=y.locked(),I.id=y.data("id"),I.parentId=y.data("parent"),I.cmptId=l[y.id()],I.children=[],I.positionX=y.position("x"),I.positionY=y.position("y"),I.offsetX=0,I.offsetY=0,I.height=d.w,I.width=d.h,I.maxX=I.positionX+I.width/2,I.minX=I.positionX-I.width/2,I.maxY=I.positionY+I.height/2,I.minY=I.positionY-I.height/2,I.padLeft=parseFloat(y.style("padding")),I.padRight=parseFloat(y.style("padding")),I.padTop=parseFloat(y.style("padding")),I.padBottom=parseFloat(y.style("padding")),I.nodeRepulsion=Bkt(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,s.layoutNodes.push(I),s.idToIndex[I.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 x=p[g++],x=s.idToIndex[x],b=s.layoutNodes[x].children;if(0<b.length)for(s.graphSet.push(b),c=0;c<b.length;c++)p[++f]=b[c]}for(c=0;c<s.graphSet.length;c++)for(var w=s.graphSet[c],u=0;u<w.length;u++){var k=s.idToIndex[w[u]];s.indexToGraph[k]=c}for(c=0;c<s.edgeSize;c++){var T=i[c],E={},C=(E.id=T.data("id"),E.sourceId=T.data("source"),E.targetId=T.data("target"),Bkt(r.idealEdgeLength)?r.idealEdgeLength(T):r.idealEdgeLength),T=Bkt(r.edgeElasticity)?r.edgeElasticity(T):r.edgeElasticity,_=s.idToIndex[E.sourceId],S=s.idToIndex[E.targetId];if(s.indexToGraph[_]!=s.indexToGraph[S]){for(var A=xSt(E.sourceId,E.targetId,s),L=s.graphSet[A],N=0,I=s.layoutNodes[_];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;for(I=s.layoutNodes[S];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;C*=N*r.nestingFactor}E.idealLength=C,E.elasticity=T,s.layoutEdges.push(E)}return s},"createLayoutInfo"),xSt=me(function(t,e,r){return(t=bSt(t,e,0,r)).count<2?0:t.graph},"findLCA"),bSt=me(function t(e,r,i,n){var a=n.graphSet[i];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:i};for(var s=0,o=0;o<a.length;o++){var l=a[o],l=n.idToIndex[l];if(0!==(l=n.layoutNodes[l].children).length&&0!==(l=t(e,r,n.indexToGraph[n.idToIndex[l[0]]],n)).count){if(1!==l.count)return l;if(2==++s)break}}return{count:s,graph:i}},"findLCA_aux"),wSt=me(function(t,e){for(var r=t.clientWidth,i=t.clientHeight,n=0;n<t.nodeSize;n++){var a=t.layoutNodes[n];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*i)}},"randomizePositions"),kSt=me(function(n,a,t){var s=n.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(t.forEach(function(t){t=n.layoutNodes[n.idToIndex[t.data("id")]],o.x1=Math.min(o.x1,t.positionX),o.x2=Math.max(o.x2,t.positionX),o.y1=Math.min(o.y1,t.positionY),o.y2=Math.max(o.y2,t.positionY)}),o.w=o.x2-o.x1,o.h=o.y2-o.y1),function(t,e){var r,i,t=n.layoutNodes[n.idToIndex[t.data("id")]];return a.boundingBox?(r=(t.positionX-o.x1)/o.w,i=(t.positionY-o.y1)/o.h,{x:s.x1+r*s.w,y:s.y1+i*s.h}):{x:t.positionX,y:t.positionY}}},"getScaleInBoundsFn"),TSt=me(function(t,e,r){var i=r.layout,n=r.eles.nodes(),a=kSt(t,r,n);n.positions(a),!0!==t.ready&&(t.ready=!0,i.one("layoutready",r.ready),i.emit({type:"layoutready",layout:this}))},"refreshPositions"),ESt=me(function(t,e,r){CSt(t,e),NSt(t),ISt(t,e),RSt(t),MSt(t)},"step"),CSt=me(function(t,e){for(var r=0;r<t.graphSet.length;r++)for(var i=t.graphSet[r],n=i.length,a=0;a<n;a++)for(var s=t.layoutNodes[t.idToIndex[i[a]]],o=a+1;o<n;o++){var l=t.layoutNodes[t.idToIndex[i[o]]];SSt(s,l,t,e)}},"calculateNodeForces"),_St=me(function(t){return-t+2*t*Math.random()},"randomDistance"),SSt=me(function(t,e,r,i){var n,a,s,o;t.cmptId!==e.cmptId&&!r.isCompound||(r=e.positionX-t.positionX,n=e.positionY-t.positionY,0===r&&0===n&&(r=_St(1),n=_St(1)),o=0<(o=ASt(t,e,r,n))?(s=i.nodeOverlap*o)*r/(a=Math.sqrt(r*r+n*n)):(i=LSt(t,r,n),o=(r=(o=LSt(e,-1*r,-1*n)).x-i.x)*r+(n=o.y-i.y)*n,a=Math.sqrt(o),(s=(t.nodeRepulsion+e.nodeRepulsion)/o)*r/a),i=s*n/a,t.isLocked||(t.offsetX-=o,t.offsetY-=i),e.isLocked)||(e.offsetX+=o,e.offsetY+=i)},"nodeRepulsion"),ASt=me(function(t,e,r,i){return r=0<r?t.maxX-e.minX:e.maxX-t.minX,i=0<i?t.maxY-e.minY:e.maxY-t.minY,0<=r&&0<=i?Math.sqrt(r*r+i*i):0},"nodesOverlap"),LSt=me(function(t,e,r){var i=t.positionX,n=t.positionY,a=t.height||1,s=r/e,o=a/(t=t.width||1),l={};return 0===e&&0<r||0===e&&r<0?(l.x=i,l.y=n+a/2):0<e&&-1*o<=s&&s<=o?(l.x=i+t/2,l.y=n+t*r/2/e):e<0&&-1*o<=s&&s<=o?(l.x=i-t/2,l.y=n-t*r/2/e):0<r&&(s<=-1*o||o<=s)?(l.x=i+a*e/2/r,l.y=n+a/2):r<0&&(s<=-1*o||o<=s)&&(l.x=i-a*e/2/r,l.y=n-a/2),l},"findClippingPoint"),NSt=me(function(t,e){for(var r=0;r<t.edgeSize;r++){var i,n,a=t.layoutEdges[r],s=t.idToIndex[a.sourceId],s=t.layoutNodes[s],o=t.idToIndex[a.targetId],l=(o=t.layoutNodes[o]).positionX-s.positionX,c=o.positionY-s.positionY;0==l&&0==c||(i=LSt(s,l,c),c=(l=LSt(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"),ISt=me(function(t,e){if(0!==e.gravity)for(var r=0;r<t.graphSet.length;r++)for(var i,n,a=t.graphSet[r],s=a.length,o=0===r?(n=t.clientHeight/2,t.clientWidth/2):(i=t.layoutNodes[t.idToIndex[a[0]]],n=(i=t.layoutNodes[t.idToIndex[i.parentId]]).positionX,i.positionY),l=0;l<s;l++){var c,h,u,d=t.layoutNodes[t.idToIndex[a[l]]];d.isLocked||(h=n-d.positionX,u=o-d.positionY,1<(c=Math.sqrt(h*h+u*u))&&(h=e.gravity*h/c,u=e.gravity*u/c,d.offsetX+=h,d.offsetY+=u))}},"calculateGravityForces"),RSt=me(function(t,e){var r=[],i=0,n=-1;for(r.push.apply(r,t.graphSet[0]),n+=t.graphSet[0].length;i<=n;){var a=r[i++],a=t.idToIndex[a],s=(a=t.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=t.layoutNodes[t.idToIndex[s[c]]];h.offsetX+=o,h.offsetY+=l,r[++n]=s[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),MSt=me(function(t,e){for(var r=0;r<t.nodeSize;r++)0<(n=t.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<t.nodeSize;r++)0<(n=t.layoutNodes[r]).children.length||n.isLocked||(i=DSt(n.offsetX,n.offsetY,t.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,OSt(n,t));for(var n,r=0;r<t.nodeSize;r++)0<(n=t.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"),DSt=me(function(t,e,r){var i=Math.sqrt(t*t+e*e);return r<i?{x:r*t/i,y:r*e/i}:{x:t,y:e}},"limitForce"),OSt=me(function t(e,r){if(null!=(i=e.parentId)){var i,n=!1;if((null==(i=r.layoutNodes[r.idToIndex[i]]).maxX||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,n=!0),(null==i.minX||e.minX-i.padLeft<i.minX)&&(i.minX=e.minX-i.padLeft,n=!0),(null==i.maxY||e.maxY+i.padBottom>i.maxY)&&(i.maxY=e.maxY+i.padBottom,n=!0),(null==i.minY||e.minY-i.padTop<i.minY)&&(i.minY=e.minY-i.padTop,n=!0),n)return t(i,r)}},"updateAncestryBoundaries"),PSt=me(function(t,e){for(var r=t.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(t,e){return e.w*e.h-t.w*t.h});for(var h,u=0,d=0,p=0,g=0,f=Math.sqrt(o)*t.clientWidth/t.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+e.componentSpacing,p+=h.w+e.componentSpacing,g=Math.max(g,h.h),f<p&&(d+=g+e.componentSpacing,g=p=u=0)}},"separateComponents"),BSt={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:me(function(t){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(Ewt,"GridLayout"),Ewt.prototype.run=function(){var t=e=this.options,e=e.cy,r=(c=t.eles).nodes().not(":parent"),n=(t.sort&&(r=r.sort(t.sort)),n8t(t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}));if(0===n.h||0===n.w)c.nodes().layoutPositions(this,t,function(t){return{x:n.x1,y:n.y1}});else{var i=r.size(),e=Math.sqrt(i*n.h/n.w),a=Math.round(e),s=Math.round(n.w/n.h*e),o=me(function(t){if(null==t)return Math.min(a,s);Math.min(a,s)==a?a=t:s=t},"small"),l=me(function(t){if(null==t)return Math.max(a,s);Math.max(a,s)==a?a=t:s=t},"large"),c=t.rows,e=null!=t.cols?t.cols:t.columns;if(null!=c&&null!=e)a=c,s=e;else if(null!=c&&null==e)a=c,s=Math.ceil(i/a);else if(null==c&&null!=e)s=e,a=Math.ceil(i/s);else if(i<s*a)i<=((c=o())-1)*(e=l())?o(c-1):i<=(e-1)*c&&l(e-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(t.condense&&(p=d=0),t.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(t),m=t.avoidOverlapPadding,y=f.w+m,f=f.h+m,d=Math.max(d,y),p=Math.max(p,f)}for(var v={},x=me(function(t,e){return!!v["c-"+t+"-"+e]},"used"),b=me(function(t,e){v["c-"+t+"-"+e]=!0},"use"),w=0,k=0,T=me(function(){s<=++k&&(k=0,w++)},"moveToNextCell"),E={},C=0;C<r.length;C++){var _=r[C],S=t.position(_);if(S&&(void 0!==S.row||void 0!==S.col)){var A={row:S.row,col:S.col};if(void 0===A.col)for(A.col=0;x(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;x(A.row,A.col);)A.row++;E[_.id()]=A,b(A.row,A.col)}}c=me(function(t,e){var r,i;if(t.locked()||t.isParent())return!1;if(t=E[t.id()])r=t.col*d+d/2+n.x1,i=t.row*p+p/2+n.y1;else{for(;x(w,k);)T();r=k*d+d/2+n.x1,i=w*p+p/2+n.y1,b(w,k),T()}return{x:r,y:i}},"getPos"),r.layoutPositions(this,t,c)}return this},FSt={ready:me(function(){},"ready"),stop:me(function(){},"stop")},me(Cwt,"NullLayout"),Cwt.prototype.run=function(){var t=this.options,e=t.eles;return this.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),this.one("layoutready",t.ready),this.emit("layoutready"),this.one("layoutstop",t.stop),this.emit("layoutstop"),this},$St={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(Cwt.prototype.stop=function(){return this}),animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(_wt,"PresetLayout"),zSt={fit:!0,padding:30,boundingBox:void 0,animate:!(_wt.prototype.run=function(){var e=this.options,t=e.eles.nodes(),r=Bkt(e.positions);function i(t){return null==e.positions?$7t(t.position()):r?e.positions(t):e.positions[t._private.data.id]??null}return me(i,"getPosition"),t.layoutPositions(this,e,function(t,e){var r=i(t);return!t.locked()&&null!=r&&r}),this}),animationDuration:500,animationEasing:void 0,animateFilter:me(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:me(function(t,e){return e},"transform")},me(Swt,"RandomLayout"),Swt.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,i=n8t(t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),e=me(function(t,e){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,t,e),this},GSt=[{name:"breadthfirst",impl:bwt},{name:"circle",impl:wwt},{name:"concentric",impl:kwt},{name:"cose",impl:Twt},{name:"grid",impl:Ewt},{name:"null",impl:Cwt},{name:"preset",impl:_wt},{name:"random",impl:Swt}],me(Awt,"NullRenderer"),kAt=me(function(){},"noop"),EAt=me(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),Awt.prototype={recalculateRenderedStyle:kAt,notify:me(function(){this.notifications++},"notify"),init:kAt,isHeadless:me(function(){return!0},"isHeadless"),png:EAt,jpg:EAt},YAt={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},o=this,i=me(function(t,e,r,i,n,a,s){return n.x-r/2-s<=t&&t<=n.x+r/2+s&&n.y-r/2-s<=e&&e<=n.y+r/2+s},"bbCollide"),l=me(function(t,e,r,i,n){var a=t*Math.cos(i)-e*Math.sin(i),t=t*Math.sin(i)+e*Math.cos(i);return{x:a*r+n.x,y:t*r+n.y}},"transform"),c=me(function(t,e,r,i){for(var n=[],a=0;a<t.length;a+=2)n.push(l(t[a],t[a+1],e,r,i));return n},"transformPoints"),h=me(function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];e.push(i.x,i.y)}return e},"pointsToArr"),n=me(function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").pfValue*2},"standardGap"),t=me(function(t,e){Pkt(e)&&(e=r[e]),r[t]=lTt({name:t,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:me(function(t,e,r,i,n,a){return r=h(c(this.points,r+2*a,i,n)),E8t(t,e,r)},"collide"),roughCollide:i,draw:me(function(t,e,r,i){e=c(this.points,e,r,i),o.arrowShapeImpl("polygon")(t,e)},"draw"),spacing:me(function(t){return 0},"spacing"),gap:n},e)},"defineArrowShape");t("none",{collide:h7t,roughCollide:h7t,draw:d7t,spacing:u7t,gap:u7t}),t("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),t("arrow","triangle"),t("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:i,draw:me(function(t,e,r,i,n){var a=c(this.points,e,r,i),s=this.controlPoint,s=l(s[0],s[1],e,r,i);o.arrowShapeImpl(this.name)(t,a,s)},"draw"),gap:me(function(t){return.8*n(t)},"gap")}),t("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:me(function(t,e,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 E8t(t,e,o)||E8t(t,e,r)},"collide"),draw:me(function(t,e,r,i,n){var a=c(this.points,e,r,i),e=c(this.pointsTee,e,r,i);o.arrowShapeImpl(this.name)(t,a,e)},"draw")}),t("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:me(function(t,e,r,i,n,a,s){var o=n,o=Math.pow(o.x-t,2)+Math.pow(o.y-e,2)<=Math.pow((r+2*s)*this.radius,2),r=h(c(this.points,r+2*s,i,n));return E8t(t,e,r)||o},"collide"),draw:me(function(t,e,r,i,n){r=c(this.pointsTr,e,r,i),o.arrowShapeImpl(this.name)(t,r,i.x,i.y,this.radius*e)},"draw"),spacing:me(function(t){return o.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius},"spacing")}),t("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:me(function(t,e){var r=this.baseCrossLinePts.slice(),e=e/t;return r[3]=r[3]-e,r[5]=r[5]-e,r},"crossLinePts"),collide:me(function(t,e,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 E8t(t,e,o)||E8t(t,e,a)},"collide"),draw:me(function(t,e,r,i,n){var a=c(this.points,e,r,i),n=c(this.crossLinePts(e,n),e,r,i);o.arrowShapeImpl(this.name)(t,a,n)},"draw")}),t("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:me(function(t){return.525*n(t)},"gap")}),t("circle",{radius:.15,collide:me(function(t,e,r,i,n,a,s){return Math.pow(n.x-t,2)+Math.pow(n.y-e,2)<=Math.pow((r+2*s)*this.radius,2)},"collide"),draw:me(function(t,e,r,i,n){o.arrowShapeImpl(this.name)(t,i.x,i.y,this.radius*e)},"draw"),spacing:me(function(t){return o.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius},"spacing")}),t("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:me(function(t){return 1},"spacing"),gap:me(function(t){return 1},"gap")}),t("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),t("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:me(function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").value},"gap")}),t("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:me(function(t){return.95*t.pstyle("width").pfValue*t.pstyle("arrow-scale").value},"gap")})}},IAt={projectIntoViewport:function(t,e){var r=this.cy,i=(a=this.findContainerClientCoords())[0],n=a[1],a=a[4],s=r.pan(),r=r.zoom();return[((t-i)/a-s.x)/r,((e-n)/a-s.y)/r]},findContainerClientCoords:function(){var e,t,r,i,n,a,s,o,l,c,h;return this.containerBB||(h=(o=this.container).getBoundingClientRect(),e=this.cy.window().getComputedStyle(o),t=(s=me(function(t){return parseFloat(e.getPropertyValue(t))},"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+t+c,h=h.top+i+a,this.containerBB=[c,h,s-(t+r),o-(i+n),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(t,e,r,i){return this.findNearestElements(t,e,r,i)[0]},findNearestElements:function(y,v,t,e){var i,n,x=this,b=this,r=b.getCachedZSortedEles(),w=[],a=b.cy.zoom(),k=b.cy.hasCompoundNodes(),T=(e?24:8)/a,l=(e?8:2)/a,g=(e?8:2)/a,s=1/0;function E(t,e){if(t.isNode()){if(n)return;n=t,w.push(t)}if(t.isEdge()&&(null==e||e<s))if(i){if(i.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value)for(var r=0;r<w.length;r++)if(w[r].isEdge()){w[r]=t,i=t,s=e??s;break}}else w.push(t),i=t,s=e??s}function C(t){var e=t.outerWidth()+2*l,r=t.outerHeight()+2*l,i=e/2,n=r/2,a=t.position(),s="auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,o=t._private.rscratch;if(a.x-i<=y&&y<=a.x+i&&a.y-n<=v&&v<=a.y+n&&b.nodeShapes[x.getNodeShape(t)].checkPoint(y,v,0,e,r,a.x,a.y,s,o))return E(t,0),!0}function o(t){var e,r=t._private,i=r.rscratch,n=t.pstyle("width").pfValue,a=t.pstyle("arrow-scale").value,s=(l=n/2+T)*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(v8t(y,v,h[u],h[u+1],h[u+2],h[u+3],o)&&s>(e=T8t(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(t,e),!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(x8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],o)&&s>(e=k8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(t,e),!0;for(var l=l||r.source,c=c||r.target,d=x.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=b.arrowShapes[t.pstyle(g.name+"-arrow-shape").value],m=t.pstyle("width").pfValue;if(f.roughCollide(y,v,d,g.angle,{x:g.x,y:g.y},m,T)&&f.collide(y,v,d,g.angle,{x:g.x,y:g.y},m,T))return E(t),!0}k&&0<w.length&&(C(l),C(c))}function f(t,e,r){return _7t(t,e,r)}function c(t,e){var r=t._private,i=g,n=e?e+"-":"",a=(t.boundingBox(),r.labelBounds[e||"main"]),s=t.pstyle(n+"label").value;if("yes"===t.pstyle("text-events").strValue&&s){var o=f(r.rscratch,"labelX",e),l=f(r.rscratch,"labelY",e),s=f(r.rscratch,"labelAngle",e),r=t.pstyle(n+"text-margin-x").pfValue,e=t.pstyle(n+"text-margin-y").pfValue,n=a.x1-i-r,c=a.x2+i-r,h=a.y1-i-e,i=a.y2+i-e;if(s){var u=Math.cos(s),d=Math.sin(s),p=(s=me(function(t,e){return{x:(t-=o)*u-(e-=l)*d+o,y:t*d+e*u+l}},"rotate"))(n,h),n=s(n,i),h=s(c,h),s=s(c,i),c=[p.x+r,p.y+e,h.x+r,h.y+e,s.x+r,s.y+e,n.x+r,n.y+e];if(E8t(y,v,c))return E(t),!0}else if(g8t(a,y,v))return E(t),!0}}t&&(r=r.interactive),me(E,"addEle"),me(C,"checkNode"),me(o,"checkEdge"),me(f,"preprop"),me(c,"checkLabel");for(var h=r.length-1;0<=h;h--){var u=r[h];u.isNode()?C(u)||c(u):o(u)||c(u)||c(u,"source")||c(u,"target")}return w},getAllInBox:function(t,e,r,i){for(var n=this.getCachedZSortedEles().interactive,a=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,i),c=Math.max(e,i),h=n8t({x1:t=s,y1:e=l,x2:r=o,y2:i=c}),u=0;u<n.length;u++){var d=n[u];if(d.isNode()){var p=d,g=p.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});p8t(h,g)&&!m8t(g,h)&&a.push(p)}else if((null==(d=(p=(g=d)._private).rscratch).startX||null==d.startY||g8t(h,d.startX,d.startY))&&(null==d.endX||null==d.endY||g8t(h,d.endX,d.endY)))if("bezier"===d.edgeType||"multibezier"===d.edgeType||"self"===d.edgeType||"compound"===d.edgeType||"segments"===d.edgeType||"haystack"===d.edgeType){for(var f=p.rstyle.bezierPts||p.rstyle.linePts||p.rstyle.haystackPts,m=!0,y=0;y<f.length;y++)if(!f8t(h,f[y])){m=!1;break}m&&a.push(g)}else"haystack"!==d.edgeType&&"straight"!==d.edgeType||a.push(g)}return a}},(RAt={calculateArrowAngles:function(t){var e,r,i,n,a,s,o,l,c,h,u,d,p,g,f="haystack"===(t=t._private.rscratch).edgeType,m="bezier"===t.edgeType,y="multibezier"===t.edgeType,v="segments"===t.edgeType,x="compound"===t.edgeType,b="self"===t.edgeType,w=f?(d=t.haystackPts[0],g=t.haystackPts[1],e=t.haystackPts[2],t.haystackPts[3]):(d=t.arrowStartX,g=t.arrowStartY,e=t.arrowEndX,t.arrowEndY),k=(k=t.midX,T=t.midY,i=v?(r=d-t.segpts[0],g-t.segpts[1]):y||x||b||m?(p=t.allpts,r=d-t8t(p[0],p[2],p[4],.1),g-t8t(p[1],p[3],p[5],.1)):(r=d-k,g-T),t.srcArrowAngle=V7t(r,i),t.midX),T=t.midY;f&&(k=(d+e)/2,T=(g+w)/2),r=e-d,i=w-g,v?i=(p=t.allpts).length/2%2==0?(n=(u=p.length/2)-2,r=p[u]-p[n],p[u+1]-p[n+1]):t.isRound?(r=t.midVector[1],-t.midVector[0]):(n=(u=p.length/2-1)-2,r=p[u]-p[n],p[u+1]-p[n+1]):(y||x||b)&&(p=t.allpts,f=t.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=t8t(p[c],p[l],p[h],0),s=t8t(p[c+1],p[l+1],p[h+1],0),o=t8t(p[c],p[l],p[h],1e-4),t8t(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=t8t(p[c=l-2],p[l],p[h],.4999),s=t8t(p[c+1],p[l+1],p[h+1],.4999),o=t8t(p[c],p[l],p[h],.5),t8t(p[c+1],p[l+1],p[h+1],.5)),r=o-a,i=f-s),t.midtgtArrowAngle=V7t(r,i),t.midDispX=r,t.midDispY=i,r*=-1,i*=-1,v&&(p=t.allpts).length/2%2!=0&&!t.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),i=-(p[d+1]-p[u+1])),t.midsrcArrowAngle=V7t(r,i),i=v?(r=e-t.segpts[t.segpts.length-2],w-t.segpts[t.segpts.length-1]):y||x||b||m?(g=(p=t.allpts).length,r=e-t8t(p[g-6],p[g-4],p[g-2],.9),w-t8t(p[g-5],p[g-3],p[g-1],.9)):(r=e-k,w-T),t.tgtArrowAngle=V7t(r,i)}}).getArrowWidth=RAt.getArrowHeight=function(t,e){var r,i=this.arrowWidthCache=this.arrowWidthCache||{};return i[t+", "+e]||(r=Math.max(Math.pow(13.37*t,.9),29)*e,i[t+", "+e]=r)},jSt={},WSt={},nAt=me(function(t,e,r){r.x=e.x-t.x,r.y=e.y-t.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"),aAt=me(function(t,e){e.x=-1*t.x,e.y=-1*t.y,e.nx=-1*t.nx,e.ny=-1*t.ny,e.ang=0<t.ang?-(Math.PI-t.ang):Math.PI+t.ang},"invertVec"),sAt=me(function(t,e,r,i,n){t!==iAt?nAt(e,t,jSt):aAt(WSt,jSt),nAt(e,r,WSt),QSt=jSt.nx*WSt.ny-jSt.ny*WSt.nx,VSt=jSt.nx*WSt.nx-jSt.ny*-WSt.ny,QSt=Math.asin(Math.max(-1,Math.min(1,QSt))),Math.abs(QSt)<1e-6?(USt=e.x,qSt=e.y,XSt=ZSt=0):(HSt=!(YSt=1),VSt<0?QSt<0?QSt=Math.PI+QSt:(QSt=Math.PI-QSt,YSt=-1,HSt=!0):0<QSt&&(YSt=-1,HSt=!0),ZSt=void 0!==e.radius?e.radius:i,VSt=QSt/2,QSt=Math.min(jSt.len/2,WSt.len/2),XSt=n?(KSt=Math.abs(Math.cos(VSt)*ZSt/Math.sin(VSt)),QSt<KSt?(KSt=QSt,Math.abs(KSt*Math.sin(VSt)/Math.cos(VSt))):ZSt):(KSt=Math.min(QSt,ZSt),Math.abs(KSt*Math.sin(VSt)/Math.cos(VSt))),eAt=e.x+WSt.nx*KSt,rAt=e.y+WSt.ny*KSt,USt=eAt-WSt.ny*XSt*YSt,qSt=rAt+WSt.nx*XSt*YSt,JSt=e.x+jSt.nx*KSt,tAt=e.y+jSt.ny*KSt,iAt=e)},"calcCornerArc"),me(Lwt,"drawPreparedRoundCorner"),me(Nwt,"getRoundCorner"),MAt={findMidptPtsEtc:function(t,e){var r,i,n,a,s,o,l=e.posPts,c=e.intersectionPts,h=e.vectorNormInverse,u=t.pstyle("source-endpoint"),d=t.pstyle("target-endpoint"),p=null!=u.units&&null!=d.units,g=me(function(t,e,r,i){return i-=e,e=r-t,{x:-i/(r=Math.sqrt(e*e+i*i)),y:e/r}},"recalcVectorNormInverse");switch(t.pstyle("edge-distances").value){case"node-position":o=l;break;case"intersection":o=c;break;case"endpoints":o=p?(s={x1:r=(i=M3t(this.manualEndptToPx(t.source()[0],u),2))[0],y1:i=i[1],x2:n=(a=M3t(this.manualEndptToPx(t.target()[0],d),2))[0],y2:a=a[1]},h=g(r,i,n,a),s):(f7t("Edge ".concat(t.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(t){for(var e=0;e<t.length;e++){var r=t[e],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(t,e){var r=t._private.rscratch,i=t.pstyle("segment-weights"),n=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),s=t.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(t,e),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(t,e,r,i){var n=t._private.rscratch,a=e.dirCounts,e=e.srcPos,s=(s=t.pstyle("control-point-distances"))?s.pfValue[0]:void 0,o=t.pstyle("loop-direction").pfValue,l=t.pstyle("loop-sweep").pfValue,t=t.pstyle("control-point-step-size").pfValue;n.edgeType="self",i&&(r=0,t=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=[e.x+1.4*Math.cos(s)*t*(r/3+1),e.y+1.4*Math.sin(s)*t*(r/3+1),e.x+1.4*Math.cos(i)*t*(r/3+1),e.y+1.4*Math.sin(i)*t*(r/3+1)]},findCompoundLoopPoints:function(t,e,r,i){var n=t._private.rscratch,a=(n.edgeType="compound",e.srcPos),s=e.tgtPos,o=e.srcW,l=e.srcH,c=e.tgtW,e=e.tgtH,h=t.pstyle("control-point-step-size").pfValue,t=(t=t.pstyle("control-point-distances"))?t.pfValue[0]:void 0,i=(i&&(r=0,h=t),{x:a.x-o/2,y:a.y-l/2}),t={x:s.x-c/2,y:s.y-e/2},a={x:Math.min(i.x,t.x),y:Math.min(i.y,t.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(t){t._private.rscratch.edgeType="straight"},findBezierPoints:function(t,e,r,i,n){var a=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,o=t.pstyle("control-point-distances"),l=t.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-e.eles.length/2+r)*s*(n?-1:1),f=K7t(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(t,e),v=y.midptPts,x=v.x1*m+v.x2*g;a.ctrlpts.push(x+(y=y.vectorNormInverse).x*f,v.y1*m+v.y2*g+y.y*f)}},findTaxiPoints:function(t,e){var r=t._private.rscratch,i=(r.edgeType="segments","vertical"),n="horizontal",a=e.posPts,s=e.srcW,o=e.srcH,l=e.tgtW,e=e.tgtH,c="node-position"!==t.pstyle("edge-distances").value,h=t.pstyle("taxi-direction").value,u=h,d=t.pstyle("taxi-turn"),p="%"===d.units,g=(d=d.pfValue)<0,f=t.pstyle("taxi-turn-min-distance").pfValue,m=c?(s+l)/2:0,y=c?(o+e)/2:0,v=a.x2-a.x1,x=a.y2-a.y1,m=(b=me(function(t,e){return 0<t?Math.max(t-e,0):Math.min(t+e,0)},"subDWH"))(v,m),b=b(x,y),y=!1,w=("auto"===u?h=Math.abs(m)>Math.abs(b)?n:i:"upward"===u||"downward"===u?(h=i,y=!0):"leftward"!==u&&"rightward"!==u||(h=n,y=!0),(n=h===i)?b:m),i=K7t(h=n?x:v),b=!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),b=!0),m=p?(d<0?1+d:d)*w:(d<0?w:0)+d*i,g=(y=me(function(t){return Math.abs(t)<f||Math.abs(t)>=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?n?(h=a.y1+m+(c?o/2*i:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,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?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=e/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,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=t.pstyle("taxi-radius").value,g="arc-radius"===t.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(t,e){var r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=t._private.rscratch;"bezier"===E.edgeType&&(m=e.srcPos,r=e.tgtPos,i=e.srcW,n=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!at(E.startX)||!at(E.startY),f=!at(E.arrowStartX)||!at(E.arrowStartY),c=!at(E.endX)||!at(E.endY),h=!at(E.arrowEndX)||!at(E.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=Z7t({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))<u,p=(d=Z7t({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.endX,y:E.endY}))<u,g=!1,(y||f||b)&&(g=!0,y=E.ctrlpts[0]-m.x,f=E.ctrlpts[1]-m.y,k=y/(y=Math.sqrt(y*y+f*f)),f/=y,y=Math.max(i,n),y={x:E.ctrlpts[0]+2*k*y,y:E.ctrlpts[1]+2*f*y},T=T.intersectLine(m.x,m.y,i,n,y.x,y.y,0,v,x),b?(E.ctrlpts[0]=E.ctrlpts[0]+k*(u-w),E.ctrlpts[1]=E.ctrlpts[1]+f*(u-w)):(E.ctrlpts[0]=T[0]+k*u,E.ctrlpts[1]=T[1]+f*u)),(c||h||p)&&(g=!0,m=E.ctrlpts[0]-r.x,y=E.ctrlpts[1]-r.y,x=m/(v=Math.sqrt(m*m+y*y)),b=y/v,w=Math.max(i,n),k={x:E.ctrlpts[0]+2*x*w,y:E.ctrlpts[1]+2*b*w},T=o.intersectLine(r.x,r.y,a,s,k.x,k.y,0,l,e),p?(E.ctrlpts[0]=E.ctrlpts[0]+x*(u-d),E.ctrlpts[1]=E.ctrlpts[1]+b*(u-d)):(E.ctrlpts[0]=T[0]+x*u,E.ctrlpts[1]=T[1]+b*u)),g)&&this.findEndpoints(t)},storeAllpts:function(t){var e,r,i=t._private.rscratch;if("multibezier"===i.edgeType||"bezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType){i.allpts=[],i.allpts.push(i.startX,i.startY);for(var n,a=0;a+1<i.ctrlpts.length;a+=2)i.allpts.push(i.ctrlpts[a],i.ctrlpts[a+1]),a+3<i.ctrlpts.length&&i.allpts.push((i.ctrlpts[a]+i.ctrlpts[a+2])/2,(i.ctrlpts[a+1]+i.ctrlpts[a+3])/2);i.allpts.push(i.endX,i.endY),i.ctrlpts.length/2%2==0?(n=i.allpts.length/2-1,i.midX=i.allpts[n],i.midY=i.allpts[n+1]):(n=i.allpts.length/2-3,i.midX=t8t(i.allpts[n],i.allpts[n+2],i.allpts[n+4],.5),i.midY=t8t(i.allpts[n+1],i.allpts[n+3],i.allpts[n+5],.5))}else if("straight"===i.edgeType)i.allpts=[i.startX,i.startY,i.endX,i.endY],i.midX=(i.startX+i.endX+i.arrowStartX+i.arrowEndX)/4,i.midY=(i.startY+i.endY+i.arrowStartY+i.arrowEndY)/4;else if("segments"===i.edgeType){if(i.allpts=[],i.allpts.push(i.startX,i.startY),i.allpts.push.apply(i.allpts,i.segpts),i.allpts.push(i.endX,i.endY),i.isRound){i.roundCorners=[];for(var s=2;s+3<i.allpts.length;s+=2){var o=i.radii[s/2-1],l=i.isArcRadius[s/2-1];i.roundCorners.push(Nwt({x:i.allpts[s-2],y:i.allpts[s-1]},{x:i.allpts[s],y:i.allpts[s+1],radius:o},{x:i.allpts[s+2],y:i.allpts[s+3]},o,l))}}i.segpts.length%4==0?(t=i.segpts.length/2,i.midX=(i.segpts[n=t-2]+i.segpts[t])/2,i.midY=(i.segpts[1+n]+i.segpts[1+t])/2):(n=i.segpts.length/2-1,i.isRound?(t=i.segpts[n],r=i.segpts[1+n],r=[t-(t=i.roundCorners[n/2]).cx,r-t.cy],e=t.radius/Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)),r=r.map(function(t){return t*e}),i.midX=t.cx+r[0],i.midY=t.cy+r[1],i.midVector=r):(i.midX=i.segpts[n],i.midY=i.segpts[1+n]))}},checkForInvalidEdgeWarning:function(t){var e=t[0]._private.rscratch;e.nodesOverlap||at(e.startX)&&at(e.startY)&&at(e.endX)&&at(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,f7t("Edge `"+t.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(t){var M=this;if(t&&0!==t.length){for(var D=this,O=D.cy.hasCompoundNodes(),P={map:new A7t,get:me(function(t){var e=this.map.get(t[0]);return null!=e?e.get(t[1]):null},"get"),set:me(function(t,e){var r=this.map.get(t[0]);null==r&&(r=new A7t,this.map.set(t[0],r)),r.set(t[1],e)},"set")},B=[],e=[],r=0;r<t.length;r++){var i,n,a=t[r],s=a._private,o=a.pstyle("curve-style").value;!a.removed()&&a.takesUpSpace()&&("haystack"===o?e.push(a):(i="unbundled-bezier"===o||o.endsWith("segments")||"straight"===o||"straight-triangle"===o||o.endsWith("taxi"),o="unbundled-bezier"===o||"bezier"===o,n=s.source,s=s.target,n=[n.poolIndex(),s.poolIndex()].sort(),null==(s=P.get(n))&&(P.set(n,s={eles:[]}),B.push(n)),s.eles.push(a),i&&(s.hasUnbundled=!0),o&&(s.hasBezier=!0)))}for(var l=me(function(t){var e=P.get(B[t]),r=void 0,i=(e.hasUnbundled||(t=e.eles[0].parallelEdges().filter(function(t){return t.isBundledBezier()}),E7t(e.eles),t.forEach(function(t){return e.eles.push(t)}),e.eles.sort(function(t,e){return t.poolIndex()-e.poolIndex()})),(t=e.eles[0]).source()),n=t.target(),a=(i.poolIndex()>n.poolIndex()&&(t=i,i=n,n=t),e.srcPos=i.position()),s=e.tgtPos=n.position(),o=e.srcW=i.outerWidth(),l=e.srcH=i.outerHeight(),c=e.tgtW=n.outerWidth(),h=e.tgtH=n.outerHeight(),u=e.srcShape=D.nodeShapes[M.getNodeShape(i)],d=e.tgtShape=D.nodeShapes[M.getNodeShape(n)],p=e.srcCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,f=e.tgtRs=n._private.rscratch,m=e.srcRs=i._private.rscratch;e.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y<e.eles.length;y++){var v,x,b,w,k,T,E,C,_,S=e.eles[y],A=S[0]._private.rscratch,L=S.pstyle("curve-style").value,N="unbundled-bezier"===L||L.endsWith("segments")||L.endsWith("taxi"),I=!i.same(S.source()),R=(e.calculatedIntersection||i===n||!e.hasBezier&&!e.hasUnbundled||(e.calculatedIntersection=!0,v=u.intersectLine(a.x,a.y,o,l,s.x,s.y,0,p,m),x=e.srcIntn=v,b=d.intersectLine(s.x,s.y,c,h,a.x,a.y,0,g,f),w=e.tgtIntn=b,k=e.intersectionPts={x1:v[0],x2:b[0],y1:v[1],y2:b[1]},T=e.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},C=b[1]-v[1],E=b[0]-v[0],R=Math.sqrt(E*E+C*C),E=e.vector={x:E,y:C},_={x:-(C=e.vectorNorm={x:E.x/R,y:E.y/R}).y,y:C.x},e.nodesOverlap=!at(R)||d.checkPoint(v[0],v[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),e.vectorNormInverse=_,r={nodesOverlap:e.nodesOverlap,dirCounts:e.dirCounts,calculatedIntersection:!0,hasBezier:e.hasBezier,hasUnbundled:e.hasUnbundled,eles:e.eles,srcPos:s,srcRs:f,tgtPos:a,tgtRs:m,srcW:c,srcH:h,tgtW:o,tgtH:l,srcIntn:w,tgtIntn:x,srcShape:d,tgtShape:u,posPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},intersectionPts:{x1:k.x2,y1:k.y2,x2:k.x1,y2:k.y1},vector:{x:-E.x,y:-E.y},vectorNorm:{x:-C.x,y:-C.y},vectorNormInverse:{x:-_.x,y:-_.y}}),I?r:e);A.nodesOverlap=R.nodesOverlap,A.srcIntn=R.srcIntn,A.tgtIntn=R.tgtIntn,A.isRound=L.startsWith("round"),O&&(i.isParent()||i.isChild()||n.isParent()||n.isChild())&&(i.parents().anySame(n)||n.parents().anySame(i)||i.same(n)&&i.isParent())?M.findCompoundLoopPoints(S,R,y,N):i===n?M.findLoopPoints(S,R,y,N):L.endsWith("segments")?M.findSegmentsPoints(S,R):L.endsWith("taxi")?M.findTaxiPoints(S,R):"straight"===L||!N&&e.eles.length%2==1&&y===Math.floor(e.eles.length/2)?M.findStraightEdgePoints(S):M.findBezierPoints(S,R,y,N,I),M.findEndpoints(S),M.tryToCorrectInvalidPoints(S,R),M.checkForInvalidEdgeWarning(S),M.storeAllpts(S),M.storeEdgeProjections(S),M.calculateArrowAngles(S),M.recalculateEdgeLabelProjections(S),M.calculateLabelAngles(S)}},"_loop"),c=0;c<B.length;c++)l(c);this.findHaystackPoints(e)}}},me(Iwt,"getPts"),MAt.getSegmentPoints=function(t){var e=t[0]._private.rscratch;if(this.recalculateRenderedStyle(t),"segments"===e.edgeType)return Iwt(e.segpts)},MAt.getControlPoints=function(t){var e=t[0]._private.rscratch;if(this.recalculateRenderedStyle(t),"bezier"===(t=e.edgeType)||"multibezier"===t||"self"===t||"compound"===t)return Iwt(e.ctrlpts)},MAt.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}},DAt={manualEndptToPx:function(t,e){var r,i=t.position(),n=t.outerWidth(),a=t.outerHeight(),s=t._private.rscratch;return 2===e.value.length?(r=[e.pfValue[0],e.pfValue[1]],"%"===e.units[0]&&(r[0]=r[0]*n),"%"===e.units[1]&&(r[1]=r[1]*a),r[0]+=i.x,r[1]+=i.y,r):(r=e.pfValue[0],r=-Math.PI/2+r,e=2*Math.max(n,a),r=[i.x+Math.cos(r)*e,i.y+Math.sin(r)*e],this.nodeShapes[this.getNodeShape(t)].intersectLine(i.x,i.y,n,a,r[0],r[1],0,"auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,s))},findEndpoints:function(t){var e,r,i,n,a=t.source()[0],s=t.target()[0],o=a.position(),l=s.position(),c=t.pstyle("target-arrow-shape").value,h=t.pstyle("source-arrow-shape").value,u=t.pstyle("target-distance-from-node").pfValue,d=t.pstyle("source-distance-from-node").pfValue,p=a._private.rscratch,g=s._private.rscratch,f=t.pstyle("curve-style").value,m=t._private.rscratch,y="self"===(w=m.edgeType)||"compound"===w,v="bezier"===w||"multibezier"===w||y,x="bezier"!==w,b="straight"===w||"segments"===w,w="segments"===w,k=v||x||b,y=y||"taxi"===f,f=t.pstyle("source-endpoint"),T=y?"outside-to-node":f.value,E="auto"===a.pstyle("corner-radius").value?"auto":a.pstyle("corner-radius").pfValue,C=t.pstyle("target-endpoint"),y=y?"outside-to-node":C.value,_="auto"===s.pstyle("corner-radius").value?"auto":s.pstyle("corner-radius").pfValue,S=(m.srcManEndpt=f,m.tgtManEndpt=C,v?(v=[m.ctrlpts[0],m.ctrlpts[1]],n=x?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:v,i=v):b&&(x=w?m.segpts.slice(0,2):[l.x,l.y],n=w?m.segpts.slice(m.segpts.length-2):[o.x,o.y],i=x),"inside-to-node"===y?e=[l.x,l.y]:C.units?e=this.manualEndptToPx(s,C):"outside-to-line"===y?e=m.tgtIntn:("outside-to-node"===y||"outside-to-node-or-label"===y?S=n:"outside-to-line"!==y&&"outside-to-line-or-label"!==y||(S=[o.x,o.y]),e=this.nodeShapes[this.getNodeShape(s)].intersectLine(l.x,l.y,s.outerWidth(),s.outerHeight(),S[0],S[1],0,_,g),"outside-to-node-or-label"!==y&&"outside-to-line-or-label"!==y||(b=(v=s._private.rscratch).labelWidth,w=v.labelX,x=v.labelY,C=b/2,_=v.labelHeight/2,"top"===(g=s.pstyle("text-valign").value)?x-=_:"bottom"===g&&(x+=_),"left"===(y=s.pstyle("text-halign").value)?w-=C:"right"===y&&(w+=C),0<(b=D8t(S[0],S[1],[w-C,x-_,w+C,x-_,w+C,x+_,w-C,x+_],l.x,l.y)).length&&(g=Q7t(v=o,U7t(e)),(s=Q7t(v,U7t(b)))<(y=g)&&(e=b,y=s),2<b.length)&&Q7t(v,{x:b[2],y:b[3]})<y&&(e=[b[2],b[3]]))),P8t(e,n,this.arrowShapes[c].spacing(t)+u)),w=P8t(e,n,this.arrowShapes[c].gap(t)+u),f=(m.endX=w[0],m.endY=w[1],m.arrowEndX=S[0],m.arrowEndY=S[1],"inside-to-node"===T?e=[o.x,o.y]:f.units?e=this.manualEndptToPx(a,f):"outside-to-line"===T?e=m.srcIntn:("outside-to-node"===T||"outside-to-node-or-label"===T?r=i:"outside-to-line"!==T&&"outside-to-line-or-label"!==T||(r=[l.x,l.y]),e=this.nodeShapes[this.getNodeShape(a)].intersectLine(o.x,o.y,a.outerWidth(),a.outerHeight(),r[0],r[1],0,E,p),"outside-to-node-or-label"!==T&&"outside-to-line-or-label"!==T||(x=(C=a._private.rscratch).labelWidth,_=C.labelX,g=C.labelY,s=x/2,v=C.labelHeight/2,"top"===(y=a.pstyle("text-valign").value)?g-=v:"bottom"===y&&(g+=v),"left"===(b=a.pstyle("text-halign").value)?_-=s:"right"===b&&(_+=s),0<(n=D8t(r[0],r[1],[_-s,g-v,_+s,g-v,_+s,g+v,_-s,g+v],o.x,o.y)).length&&(u=Q7t(c=l,U7t(e)),(w=Q7t(c,U7t(n)))<(S=u)&&(e=[n[0],n[1]],S=w),2<n.length)&&Q7t(c,{x:n[2],y:n[3]})<S&&(e=[n[2],n[3]]))),P8t(e,i,this.arrowShapes[h].spacing(t)+d)),E=P8t(e,i,this.arrowShapes[h].gap(t)+d);m.startX=E[0],m.startY=E[1],m.arrowStartX=f[0],m.arrowStartY=f[1],k&&(at(m.startX)&&at(m.startY)&&at(m.endX)&&at(m.endY)?m.badLine=!1:m.badLine=!0)},getSourceEndpoint:function(t){var e=t[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(t),e.edgeType)?{x:e.arrowStartX,y:e.arrowStartY}:{x:e.haystackPts[0],y:e.haystackPts[1]}},getTargetEndpoint:function(t){var e=t[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(t),e.edgeType)?{x:e.arrowEndX,y:e.arrowEndY}:{x:e.haystackPts[2],y:e.haystackPts[3]}}},OAt={},me(Rwt,"pushBezierPts"),OAt.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,i=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i){e.rstyle.bezierPts=[];for(var n=0;n+5<r.allpts.length;n+=4)Rwt(this,t,r.allpts.slice(n,n+6))}else if("segments"===i)for(var a=e.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,e.rstyle.haystackPts=[{x:i[0],y:i[1]},{x:i[2],y:i[3]}]);e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},OAt.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)},Q={recalculateNodeLabelProjection:function(t){var e=t.pstyle("label").strValue;if(!Xkt(e)){var r,i,e=t._private,n=t.width(),a=t.height(),s=t.padding(),o=t.position(),l=t.pstyle("text-halign").strValue,c=t.pstyle("text-valign").strValue,h=e.rscratch,e=e.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,e.labelX=r,e.labelY=i,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}}},oAt=me(function(t,e){return e=Math.atan(e/t),0===t&&e<0&&(e*=-1),e},"lineAngleFromDelta"),lAt=me(function(t,e){var r=e.x-t.x;return oAt(r,e.y-t.y)},"lineAngle"),cAt=me(function(t,e,r,i){var n=i8t(0,i-.001,1),i=i8t(0,i+.001,1),n=e8t(t,e,r,n),t=e8t(t,e,r,i);return lAt(n,t)},"bezierAngle"),Q.recalculateEdgeLabelProjections=function(E){var C,_,S,t,p=E._private,A=p.rscratch,g=this,L={mid:E.pstyle("label").strValue,source:E.pstyle("source-label").strValue,target:E.pstyle("target-label").strValue};(L.mid||L.source||L.target)&&(C={x:A.midX,y:A.midY},(_=me(function(t,e,r){S7t(p.rscratch,t,e,r),S7t(p.rstyle,t,e,r)},"setRs"))("labelX",null,C.x),_("labelY",null,C.y),t=oAt(A.midDispX,A.midDispY),_("labelAutoAngle",null,t),S=me(function t(){if(t.cache)return t.cache;for(var e=[],r=0;r+5<A.allpts.length;r+=4){var i={x:A.allpts[r],y:A.allpts[r+1]},n={x:A.allpts[r+2],y:A.allpts[r+3]},a={x:A.allpts[r+4],y:A.allpts[r+5]};e.push({p0:i,p1:n,p2:a,startDist:0,length:0,segments:[]})}var s=p.rstyle.bezierPts,o=g.bezierProjPcts.length;function l(t,e,r,i,n){var a=Z7t(e,r),s=t.segments[t.segments.length-1],e={p0:e,p1:r,t0:i,t1:n,startDist:s?s.startDist+s.length:0,length:a};t.segments.push(e),t.length+=a}me(l,"addSegment");for(var c=0;c<e.length;c++){var h=e[c],u=e[c-1];u&&(h.startDist=u.startDist+u.length),l(h,h.p0,s[c*o],0,g.bezierProjPcts[0]);for(var d=0;d<o-1;d++)l(h,s[c*o+d],s[c*o+d+1],g.bezierProjPcts[d],g.bezierProjPcts[d+1]);l(h,s[c*o+o-1],h.p2,g.bezierProjPcts[o-1],1)}return t.cache=e},"createControlPointInfo"),(t=me(function(t){var e,r="source"===t;if(L[t]){var i=E.pstyle(t+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var n,a=S(),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=i8t(0,m,1);C=e8t(p.p0,p.p1,p.p2,m),e=cAt(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,x,b,w=0,k=A.allpts.length,T=0;T+3<k&&(b=r?(x={x:A.allpts[T],y:A.allpts[T+1]},{x:A.allpts[T+2],y:A.allpts[T+3]}):(x={x:A.allpts[k-2-T],y:A.allpts[k-1-T]},{x:A.allpts[k-4-T],y:A.allpts[k-3-T]}),v=w,!(i<=(w+=y=Z7t(x,b))));T+=2);f=i8t(0,(i-v)/y,1),C=r8t(x,b,f),e=lAt(x,b)}_("labelX",t,C.x),_("labelY",t,C.y),_("labelAutoAngle",t,e)}},"calculateEndProjection"))("source"),t("target"),this.applyLabelDimensions(E))},Q.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Q.applyPrefixedLabelDimensions=function(t,e){var r=t._private,i=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,i),n=t.pstyle("line-height").pfValue,t=t.pstyle("text-wrap").strValue,a=_7t(r.rscratch,"labelWrapCachedLines",e)||[],t="wrap"!==t?1:Math.max(a.length,1),s=(a=i.height/t)*n,o=i.width,i=i.height+(t-1)*(n-1)*a;S7t(r.rstyle,"labelWidth",e,o),S7t(r.rscratch,"labelWidth",e,o),S7t(r.rstyle,"labelHeight",e,i),S7t(r.rscratch,"labelHeight",e,i),S7t(r.rscratch,"labelLineHeight",e,s)},Q.getLabelText=function(t,r){var i=t._private,e=t.pstyle((r?r+"-":"")+"label").strValue,n=t.pstyle("text-transform").value,a=me(function(t,e){return e?(S7t(i.rscratch,t,r,e),e):_7t(i.rscratch,t,r)},"rscratch");if(!e)return"";if("none"!=n&&("uppercase"==n?e=e.toUpperCase():"lowercase"==n&&(e=e.toLowerCase())),"wrap"===(n=t.pstyle("text-wrap").value)){var s=a("labelKey");if(null!=s&&a("labelWrapKey")===s)return a("labelWrapCachedText");for(var o=e.split(`
`),l=t.pstyle("text-max-width").pfValue,c="anywhere"===t.pstyle("text-overflow-wrap").value,h=[],u=/[\s\u200b]+|$/g,d=0;d<o.length;d++){var p=o[d],g=this.calculateLabelDimensions(t,p).width;if(c&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=q3t(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],w=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?w:m+w+b;this.calculateLabelDimensions(t,k).width<=l?m+=w+b:(m&&h.push(m),m=w+b)}}catch(t){v.e(t)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),e=a("labelWrapCachedText",h.join(`
`)),a("labelWrapKey",s)}else if("ellipsis"===n){var T=t.pstyle("text-max-width").pfValue,E="",C=!1;if(this.calculateLabelDimensions(t,e).width<T)return e;for(var _=0;_<e.length&&!(T<this.calculateLabelDimensions(t,E+e[_]+"…").width);_++)E+=e[_],_===e.length-1&&(C=!0);return C||(E+="…"),E}return e},Q.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},Q.calculateLabelDimensions=function(t,e){var r=this.cy.window().document,i=r7t(e,t._private.labelDimsKey),n=this.labelDimCache||(this.labelDimCache=[]);if(null!=(a=n[i]))return a;var a=t.pstyle("font-style").strValue,s=t.pstyle("font-size").pfValue,o=t.pstyle("font-family").strValue,t=t.pstyle("font-weight").strValue,l=this.labelCalcCanvas,c=this.labelCalcCanvasContext;l||(l=this.labelCalcCanvas=r.createElement("canvas"),c=this.labelCalcCanvasContext=l.getContext("2d"),(r=l.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),c.font="".concat(a," ").concat(t," ").concat(s,"px ").concat(o);for(var h=0,u=0,d=e.split(`
`),p=0;p<d.length;p++){var g=d[p],g=c.measureText(g),g=Math.ceil(g.width),f=s,h=Math.max(g,h);u+=f}return n[i]={width:h+=0,height:u+=0}},Q.calculateLabelAngle=function(t,e){var r=t._private.rscratch,i=t.isEdge();return"none"===(e=(t=t.pstyle((e?e+"-":"")+"text-rotation")).strValue)?0:i&&"autorotate"===e?r.labelAutoAngle:"autorotate"===e?0:t.pfValue},hAt=!(Q.calculateLabelAngles=function(t){var e=t.isEdge(),r=t._private.rscratch;r.labelAngle=this.calculateLabelAngle(t),e&&(r.sourceLabelAngle=this.calculateLabelAngle(t,"source"),r.targetLabelAngle=this.calculateLabelAngle(t,"target"))}),uAt={},[IAt,RAt,MAt,DAt,OAt,Q,{getNodeShape:function(t){var e=t.pstyle("shape").value;return"cutrectangle"===e&&(t.width()<28||t.height()<28)?(hAt||(f7t("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),hAt=!0),"rectangle"):t.isParent()?"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle":"polygon"===e?(t=t.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(t).name):e}},{registerCalculationListeners:function(){var s=this.cy,o=s.collection(),l=this,c=me(function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(o.merge(t),e)for(var r=0;r<t.length;r++){var i=t[r]._private.rstyle;i.clean=!1,i.cleanConnected=!1}},"enqueue"),t=(l.binder(s).on("bounds.* dirty.*",me(function(t){t=t.target,c(t)},"onDirtyBounds")).on("style.* background.*",me(function(t){t=t.target,c(t,!1)},"onDirtyStyle")),me(function(t){if(t){var e=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(e)for(var a=0;a<e.length;a++)(0,e[a])(t,o);l.recalculateRenderedStyle(o),o=s.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){t(!0)},l.beforeRender(t,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var r=me(function(t){return t._private.rstyle.cleanConnected},"isCleanConnected"),i=[],n=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var s=t[a],o=s._private,l=o.rstyle;!s.isEdge()||r(s.source())&&r(s.target())||(l.clean=!1),e&&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 t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var i=(n=t[r])._private.rscratch;(n.grabbed()&&!n.isParent()?e:i.inDragLayer?t.drag:t.nondrag).push(n)}for(r=0;r<e.length;r++){var n=e[r];t.drag.push(n)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){var e;return t||!this.cachedZSortedEles?((e=this.cy.mutableElements().toArray()).sort(H_t),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()):e=this.cachedZSortedEles,e}}].forEach(function(t){lTt(uAt,t)}),HAt={getCachedImage:function(t,e,r){var i,n=this.imageCache=this.imageCache||{},a=n[t];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((i=(a=n[t]=n[t]||{}).image=new Image).addEventListener("load",r),i.addEventListener("error",function(){i.error=!0}),"data:"!==t.substring(0,"data:".length).toLowerCase()&&(i.crossOrigin=e="null"===e?null:e),i.src=t,i)}},t9t={registerBinding:function(t,e,r,i){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],s=0;s<t.length;s++){var o,l=t[s];void 0!==l&&(o=this.binder(l),a.push(o.on.apply(o,n)))}return a}return(o=this.binder(t)).on.apply(o,n)},binder:function(n){var a=this,t=a.cy.window(),s=n===t||n===t.document||n===t.document.body||Kkt(n);if(null==a.supportsPassiveEvents){var e=!1;try{var r=Object.defineProperty({},"passive",{get:me(function(){return e=!0},"get")});t.addEventListener("test",null,r)}catch{}a.supportsPassiveEvents=e}return{on:t=me(function(t,e,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:t,addListener:t,bind:t}},nodeIsDraggable:function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},nodeIsGrabbable:function(t){return this.nodeIsDraggable(t)&&t.interactive()},load:function(){var c,h,u,N=this,t=N.cy.window(),d=me(function(t){return t.selected()},"isSelected"),w=me(function(t){if((t=t.getRootNode())&&11===t.nodeType&&void 0!==t.host)return t},"getShadowRoot"),I=me(function(t,e,r,i){null==t&&(t=N.cy);for(var n=0;n<e.length;n++)t.emit({originalEvent:r,type:e[n],position:i})},"triggerEvents"),v=me(function(t){return t.shiftKey||t.metaKey||t.ctrlKey},"isMultSelKeyDown"),R=me(function(t,e){var r=!0;if(N.cy.hasCompoundNodes()&&t&&t.pannable()){for(var i=0;e&&i<e.length;i++)if((t=e[i]).isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),k=me(function(t){t[0]._private.grabbed=!0},"setGrabbed"),T=me(function(t){t[0]._private.grabbed=!1},"setFreed"),i=me(function(t){t[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),E=me(function(t){t[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),C=me(function(t){t[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),_=me(function(t){t[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),n=me(function(t,e){(e=e.addToList).has(t)||!t.grabbable()||t.locked()||(e.merge(t),k(t))},"addToDragList"),S=me(function(t,e){!t.cy().hasCompoundNodes()||null==e.inDragLayer&&null==e.addToList||(t=t.descendants(),e.inDragLayer&&(t.forEach(i),t.connectedEdges().forEach(i)),e.addToList&&n(t,e))},"addDescendantsToDrag"),M=me(function(t,e){e=e||{};var r=t.cy().hasCompoundNodes();e.inDragLayer&&(t.forEach(i),t.neighborhood().stdFilter(function(t){return!r||t.isEdge()}).forEach(i)),e.addToList&&t.forEach(function(t){n(t,e)}),S(t,e),L(t,{inDragLayer:e.inDragLayer}),N.updateCachedGrabbedEles()},"addNodesToDrag"),A=M,D=me(function(t){t&&(N.getCachedZSortedEles().forEach(function(t){T(t),E(t),_(t)}),N.updateCachedGrabbedEles())},"freeDraggedElements"),L=me(function(t,e){var r;null==e.inDragLayer&&null==e.addToList||!t.cy().hasCompoundNodes()||(r=t.ancestors().orphans()).same(t)||(t=(r=r.descendants().spawnSelf().merge(r).unmerge(t).unmerge(t.descendants())).connectedEdges(),e.inDragLayer&&(t.forEach(i),r.forEach(i)),e.addToList&&r.forEach(function(t){n(t,e)}))},"updateAncestorsInDragLayer"),W=me(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),e=typeof MutationObserver<"u",Y=typeof ResizeObserver<"u",r=(e?(N.removeObserver=new MutationObserver(function(t){for(var e=0;e<t.length;e++){var r=t[e].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(t){N.destroy()}),qTt(function(){N.cy.resize()},100)),e=(e&&(N.styleObserver=new MutationObserver(r),N.styleObserver.observe(N.container,{attributes:!0})),N.registerBinding(t,"resize",r),Y&&(N.resizeObserver=new ResizeObserver(r),N.resizeObserver.observe(N.container)),me(function(t,e){for(;null!=t;)e(t),t=t.parentNode},"forEachUp")),a=me(function(){N.invalidateContainerClientCoordsCache()},"invalidateCoords"),H=(e(N.container,function(t){N.registerBinding(t,"transitionend",a),N.registerBinding(t,"animationend",a),N.registerBinding(t,"scroll",a)}),N.registerBinding(N.container,"contextmenu",function(t){t.preventDefault()}),me(function(){return 0!==N.selection[4]},"inBoxSelection")),O=me(function(t){for(var e=N.findContainerClientCoords(),r=e[0],i=e[1],n=e[2],a=e[3],s=t.touches||[t],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=t.target.parentNode,d=!1;u;){if(u===h){d=!0;break}u=u.parentNode}return!!d},"eventInContainer"),Y=(N.registerBinding(N.container,"mousedown",me(function(e){var t,r,i,n,a,s,o,l,c,h;!O(e)||1===N.hoverData.which&&1!==e.which||(e.preventDefault(),W(),N.hoverData.capture=!0,N.hoverData.which=e.which,t=N.cy,r=N.projectIntoViewport((s=[e.clientX,e.clientY])[0],s[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=s,s=me(function(){N.hoverData.tapholdCancelled=!1,clearTimeout(N.hoverData.tapholdTimeout),N.hoverData.tapholdTimeout=setTimeout(function(){N.hoverData.tapholdCancelled||(N.hoverData.down||t).emit({originalEvent:e,type:"taphold",position:{x:r[0],y:r[1]}})},N.tapholdDuration)},"checkForTaphold"),3==e.which?(N.hoverData.cxtStarted=!0,l={originalEvent:e,type:"cxttapstart",position:{x:r[0],y:r[1]}},a?(a.activate(),a.emit(l),N.hoverData.down=a):t.emit(l),N.hoverData.downTime=(new Date).getTime(),N.hoverData.cxtDragged=!1):1==e.which&&(a&&a.activate(),null!=a&&N.nodeIsGrabbable(a)&&(o=me(function(t){return{originalEvent:e,type:t,position:{x:r[0],y:r[1]}}},"makeEvent"),l=me(function(t){t.emit(o("grab"))},"triggerGrab"),C(a),a.selected()?(c=N.dragData.possibleDragElements=t.collection(),h=t.$(function(t){return t.isNode()&&t.selected()&&N.nodeIsGrabbable(t)}),M(h,{addToList:c}),a.emit(o("grabon")),h.forEach(l)):(c=N.dragData.possibleDragElements=t.collection(),A(a,{addToList:c}),a.emit(o("grabon")).emit(o("grab"))),N.redrawHint("eles",!0),N.redrawHint("drag",!0)),N.hoverData.down=a,N.hoverData.downs=n,N.hoverData.downTime=(new Date).getTime(),I(a,["mousedown","tapstart","vmousedown"],e,{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),s()),i[0]=i[2]=r[0],i[1]=i[3]=r[1])},"mousedownHandler"),!1),w(N.container)),V=(N.registerBinding([t,Y],"mousemove",me(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),v(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),me(function(){var t=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===t.length?(t.push(f[0]),t.push(f[1])):(t[0]+=f[0],t[1]+=f[1])},"updateDragDelta")),y=(n=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),me(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:l[0],y:l[1]}}),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode"));if(3===N.hoverData.which?e&&(r={originalEvent:t,type:"cxtdrag",position:{x:l[0],y:l[1]}},(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}):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("dragpan"),N.hoverData.dragged=!0),l=N.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit("freeon"),m.emit("free"),N.dragData.didDrag)&&(g.emit("dragfreeon"),m.emit("dragfree")),y()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||M(m,{inDragLayer:!0}),s={x:0,y:0},at(f[0])&&at(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((i=N.hoverData.dragDelta)&&at(i[0])&&at(i[1])&&(s.x+=i[0],s.y+=i[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position 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()&&R(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=U7t(c),N.redrawHint("select",!0),N.redraw()):y(),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(t,"mouseup",me(function(t){var e,r,i,n,a,s,o,l;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,o=N.findNearestElement(r[0],r[1],!0,!1),n=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(t),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),3===N.hoverData.which?(s={originalEvent:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0<n.length&&N.redrawHint("eles",!0),N.dragData.possibleDragElements=n=e.collection()),o!=a||N.dragData.didDrag||N.hoverData.selecting||null==o||!o._private.selectable||(N.hoverData.dragging||("additive"===e.selectionType()||l?o.selected()?o.unselect(["tapunselect"]):o.select(["tapselect"]):l||(e.$(d).unmerge(o).unselect(["tapunselect"]),o.select(["tapselect"]))),N.redrawHint("eles",!0)),N.hoverData.selecting&&(s=e.collection(N.getAllInBox(i[0],i[1],i[2],i[3])),N.redrawHint("select",!0),0<s.length&&N.redrawHint("eles",!0),e.emit({type:"boxend",originalEvent:t,position:{x:r[0],y:r[1]}}),o=me(function(t){return t.selectable()&&!t.selected()},"eleWouldBeSelected"),"additive"===e.selectionType()||l||e.$(d).unmerge(s).unselect(),s.emit("box").stdFilter(o).select().emit("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),l=a&&a.grabbed(),D(n),l&&(a.emit("freeon"),n.emit("free"),N.dragData.didDrag)&&(a.emit("dragfreeon"),n.emit("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),me(function(t){var e,r,i,n;N.scrollingPage||(i=(e=N.cy).zoom(),n=e.pan(),r=[(r=N.projectIntoViewport(t.clientX,t.clientY))[0]*i+n.x,r[1]*i+n.y],N.hoverData.draggingEles||N.hoverData.dragging||N.hoverData.cxtStarted||H()?t.preventDefault():e.panningEnabled()&&e.userPanningEnabled()&&e.zoomingEnabled()&&e.userZoomingEnabled()&&(t.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=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,i*=N.wheelSensitivity,1===t.deltaMode&&(i*=33),n=e.zoom()*Math.pow(10,i),"gesturechange"===t.type&&(n=N.gestureStartZoom*t.scale),e.zoom({level:n,renderedPosition:{x:r[0],y:r[1]}}),e.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")))},"wheelHandler"));N.registerBinding(N.container,"wheel",V,!0),N.registerBinding(t,"scroll",me(function(t){N.scrollingPage=!0,clearTimeout(N.scrollingPageTimeout),N.scrollingPageTimeout=setTimeout(function(){N.scrollingPage=!1},250)},"scrollHandler"),!0),N.registerBinding(N.container,"gesturestart",me(function(t){N.gestureStartZoom=N.cy.zoom(),N.hasTouchStarted||t.preventDefault()},"gestureStartHandler"),!0),N.registerBinding(N.container,"gesturechange",function(t){N.hasTouchStarted||V(t)},!0),N.registerBinding(N.container,"mouseout",me(function(t){var e=N.projectIntoViewport(t.clientX,t.clientY);N.cy.emit({originalEvent:t,type:"mouseout",position:{x:e[0],y:e[1]}})},"mouseOutHandler"),!1),N.registerBinding(N.container,"mouseover",me(function(t){var e=N.projectIntoViewport(t.clientX,t.clientY);N.cy.emit({originalEvent:t,type:"mouseover",position:{x:e[0],y:e[1]}})},"mouseOverHandler"),!1);var P,B,F,$,z,G,U,q,j,p,g,X,K,Z,Q,J,f,m,y,s,o,tt,et,l,rt,x,b,it=me(function(t,e,r,i){return Math.sqrt((r-t)*(r-t)+(i-e)*(i-e))},"distance"),nt=me(function(t,e,r,i){return(r-t)*(r-t)+(i-e)*(i-e)},"distanceSq");N.registerBinding(N.container,"touchstart",K=me(function(e){if(N.hasTouchStarted=!0,O(e)){W(),N.touchData.capture=!0,N.data.bgActivePosistion=void 0;var t,r,i,n=N.cy,a=N.touchData.now,s=N.touchData.earlier;if(e.touches[0]&&(t=N.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),a[0]=t[0],a[1]=t[1]),e.touches[1]&&(t=N.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),a[2]=t[0],a[3]=t[1]),e.touches[2]&&(t=N.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),a[4]=t[0],a[5]=t[1]),e.touches[1]){N.touchData.singleTouchMoved=!0,D(N.dragData.touchDragEles);var o=N.findContainerClientCoords(),o=(q=o[0],j=o[1],p=o[2],g=o[3],P=e.touches[0].clientX-q,B=e.touches[0].clientY-j,F=e.touches[1].clientX-q,$=e.touches[1].clientY-j,X=0<=P&&P<=p&&0<=F&&F<=p&&0<=B&&B<=g&&0<=$&&$<=g,n.pan()),l=n.zoom();if(z=it(P,B,F,$),G=nt(P,B,F,$),U=[((p=[(P+F)/2,(B+$)/2])[0]-o.x)/l,(p[1]-o.y)/l],G<4e4&&!e.touches[2])return o=N.findNearestElement(a[0],a[1],!0,!0),l=N.findNearestElement(a[2],a[3],!0,!0),o&&o.isNode()?(o.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=o):l&&l.isNode()?(l.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=l):n.emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),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(e.touches[2]?n.boxSelectionEnabled()&&e.preventDefault():e.touches[1]||e.touches[0]&&(null!=(l=(o=N.findNearestElements(a[0],a[1],!0,!0))[0])&&(l.activate(),N.touchData.start=l,N.touchData.starts=o,N.nodeIsGrabbable(l))&&(o=N.dragData.touchDragEles=n.collection(),N.redrawHint("eles",!(r=null)),N.redrawHint("drag",!0),l.selected()?(r=n.$(function(t){return t.selected()&&N.nodeIsGrabbable(t)}),M(r,{addToList:o})):A(l,{addToList:o}),C(l),i=me(function(t){return{originalEvent:e,type:t,position:{x:a[0],y:a[1]}}},"makeEvent"),l.emit(i("grabon")),r?r.forEach(function(t){t.emit(i("grab"))}):l.emit(i("grab"))),I(l,["touchstart","tapstart","vmousedown"],e,{x:a[0],y:a[1]}),null==l&&(N.data.bgActivePosistion={x:t[0],y:t[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||I(N.touchData.start,["taphold"],e,{x:a[0],y:a[1]})},N.tapholdDuration)),1<=e.touches.length){for(var c=N.touchData.startPosition=[null,null,null,null,null,null],h=0;h<a.length;h++)c[h]=s[h]=a[h];n=e.touches[0],N.touchData.startGPosition=[n.clientX,n.clientY]}}},"touchstartHandler"),!1),N.registerBinding(t,"touchmove",Z=me(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]&&(S=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=S[0],n[1]=S[1]),t.touches[1]&&(S=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=S[0],n[3]=S[1]),t.touches[2]&&(S=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=S[0],n[5]=S[1]),N.touchData.startGPosition);if(e&&t.touches[0]&&o){for(var l=[],c=0;c<n.length;c++)l[c]=n[c]-a[c];var h=t.touches[0].clientX-o[0],u=t.touches[0].clientY-o[1],d=h*h+u*u>=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,2.25<=(o=nt(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,type:"cxttapend",position:{x:n[0],y:n[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):i.emit(p)),e&&N.touchData.cxt){var p={originalEvent:t,type:"cxtdrag",position:{x:n[0],y:n[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||i).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(n[0],n[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:n[0],y:n[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:n[0],y:n[1]}})}else if(e&&t.touches[2]&&i.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||i.emit({originalEvent:t,type:"boxstart",position:{x:n[0],y:n[1]}}),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),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f<T.length;f++){var m=T[f]._private;m.grabbed=!1,m.rscratch.inDragLayer=!1}}var y,v,o=N.touchData.start,x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,r=(p=it(x,b,w,k))/z;X&&(v=(x-P+(w-F))/2,C=(b-B+(k-$))/2,r=(L=i.zoom())*r,E=i.pan(),A=U[0]*L+E.x,y=U[1]*L+E.y,v={x:-r/L*(A-E.x-v)+A,y:-r/L*(y-E.y-C)+y},o&&o.active()&&(T=N.dragData.touchDragEles,D(T),N.redrawHint("drag",!0),N.redrawHint("eles",!0),o.unactivate().emit("freeon"),T.emit("free"),N.dragData.didDrag)&&(o.emit("dragfreeon"),T.emit("dragfree")),i.viewport({zoom:r,pan:v,cancelOnFailedZoom:!0}),i.emit("pinchzoom"),z=p,P=x,B=b,F=w,$=k,N.pinching=!0),t.touches[0]&&(S=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=S[0],n[1]=S[1]),t.touches[1]&&(S=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=S[0],n[3]=S[1]),t.touches[2]&&(S=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=S[0],n[5]=S[1])}else if(t.touches[0]&&!N.touchData.didSelect){var T,E,C,_,S,A=N.touchData.start,L=N.touchData.last;if(N.hoverData.draggingEles||N.swipePanning||(g=N.findNearestElement(n[0],n[1],!0,!0)),e&&null!=A&&t.preventDefault(),e&&null!=A&&N.nodeIsDraggable(A)&&(d?(T=N.dragData.touchDragEles,(E=!N.dragData.didDrag)&&M(T,{inDragLayer:!0}),N.dragData.didDrag=!0,C={x:0,y:0},at(l[0])&&at(l[1])&&(C.x+=l[0],C.y+=l[1],E)&&(N.redrawHint("eles",!0),(_=N.touchData.dragDelta)&&at(_[0])&&at(_[1])&&(C.x+=_[0],C.y+=_[1])),N.hoverData.draggingEles=!0,T.silentShift(C).emit("position 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(l[0]),_.push(l[1])):(_[0]+=l[0],_[1]+=l[1])),I(A||g,["touchmove","tapdrag","vmousemove"],t,{x:n[0],y:n[1]}),A&&A.grabbed()||g==L||(L&&L.emit({originalEvent:t,type:"tapdragout",position:{x:n[0],y:n[1]}}),!g)||g.emit({originalEvent:t,type:"tapdragover",position:{x:n[0],y:n[1]}}),N.touchData.last=g,e)for(f=0;f<n.length;f++)n[f]&&N.touchData.startPosition[f]&&d&&(N.touchData.singleTouchMoved=!0);e&&(null==A||A.pannable())&&i.panningEnabled()&&i.userPanningEnabled()&&(R(A,N.touchData.starts)&&(t.preventDefault(),N.data.bgActivePosistion||(N.data.bgActivePosistion=U7t(N.touchData.startPosition)),N.swipePanning?(i.panBy({x:l[0]*s,y:l[1]*s}),i.emit("dragpan")):d&&(N.swipePanning=!0,i.panBy({x:h*s,y:u*s}),i.emit("dragpan"),A)&&(A.unactivate(),N.redrawHint("select",!0),N.touchData.start=null)),S=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=S[0],n[1]=S[1])}for(c=0;c<n.length;c++)a[c]=n[c];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(t,"touchcancel",Q=me(function(t){var e=N.touchData.start;N.touchData.capture=!1,e&&e.unactivate()},"touchcancelHandler")),N.registerBinding(t,"touchend",J=me(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;if(t.touches[0]&&(r=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),s[0]=r[0],s[1]=r[1]),t.touches[1]&&(r=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),s[2]=r[0],s[3]=r[1]),t.touches[2]&&(r=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),s[4]=r[0],s[5]=r[1]),e&&e.unactivate(),N.touchData.cxt)r={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}},(e||n).emit(r),N.touchData.cxtDragged||(r={originalEvent:t,type:"cxttap",position:{x:s[0],y:s[1]}},(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({type:"boxend",originalEvent:t,position:{x:s[0],y:s[1]}}),i=me(function(t){return t.selectable()&&!t.selected()},"eleWouldBeSelected"),r.emit("box").stdFilter(i).select().emit("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,D(i),N.redrawHint("drag",!0),N.redrawHint("eles",!0),r&&(e.emit("freeon"),i.emit("free"),N.dragData.didDrag)&&(e.emit("dragfreeon"),i.emit("dragfree")),I(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),I(r,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]})),i=((i=N.touchData.startPosition[0]-s[0])*i+(r=N.touchData.startPosition[1]-s[1])*r)*a*a,N.touchData.singleTouchMoved||(e||n.$(":selected").unselect(["tapunselect"]),I(e,["tap","vclick"],t,{x:s[0],y:s[1]}),f=!1,t.timeStamp-y<=n.multiClickDebounceTime()?(m&&clearTimeout(m),f=!0,y=null,I(e,["dbltap","vdblclick"],t,{x:s[0],y:s[1]})):(m=setTimeout(function(){f||I(e,["onetap","voneclick"],t,{x:s[0],y:s[1]})},n.multiClickDebounceTime()),y=t.timeStamp)),null!=e&&!N.dragData.didDrag&&e._private.selectable&&i<N.touchTapThreshold2&&!N.pinching&&("single"===n.selectionType()?(n.$(d).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 l=0;l<s.length;l++)o[l]=s[l];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=[],o=me(function(t){return{clientX:t.clientX,clientY:t.clientY,force:1,identifier:t.pointerId,pageX:t.pageX,pageY:t.pageY,radiusX:t.width/2,radiusY:t.height/2,screenX:t.screenX,screenY:t.screenY,target:t.target}},"makeTouch"),tt=me(function(t){return{event:t,touch:o(t)}},"makePointer"),et=me(function(t){s.push(tt(t))},"addPointer"),l=me(function(t){for(var e=0;e<s.length;e++)if(s[e].event.pointerId===t.pointerId)return void s.splice(e,1)},"removePointer"),rt=me(function(e){var t=s.filter(function(t){return t.event.pointerId===e.pointerId})[0];t.event=e,t.touch=o(e)},"updatePointer"),x=me(function(t){t.touches=s.map(function(t){return t.touch})},"addTouchesToEvent"),b=me(function(t){return"mouse"===t.pointerType||4===t.pointerType},"pointerIsMouse"),N.registerBinding(N.container,"pointerdown",function(t){b(t)||(t.preventDefault(),et(t),x(t),K(t))}),N.registerBinding(N.container,"pointerup",function(t){b(t)||(l(t),x(t),J(t))}),N.registerBinding(N.container,"pointercancel",function(t){b(t)||(l(t),x(t),Q(t))}),N.registerBinding(N.container,"pointermove",function(t){b(t)||(t.preventDefault(),rt(t),x(t),Z(t))}))}},e9t={generatePolygon:function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:me(function(t,e,r,i,n,a){this.renderer.nodeShapeImpl("polygon",t,e,r,i,n,this.points)},"draw"),intersectLine:me(function(t,e,r,i,n,a,s,o){return D8t(n,a,this.points,t,e,r/2,i/2,s)},"intersectLine"),checkPoint:me(function(t,e,r,i,n,a,s,o){return C8t(t,e,this.points,a,s,i,n,[0,-1],r)},"checkPoint")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:me(function(t,e,r,i,n,a){this.renderer.nodeShapeImpl(this.name,t,e,r,i,n)},"draw"),intersectLine:me(function(t,e,r,i,n,a,s,o){return L8t(n,a,t,e,r/2+s,i/2+s)},"intersectLine"),checkPoint:me(function(t,e,r,i,n,a,s,o){return N8t(t,e,i,n,a,s,r)},"checkPoint")}},generateRoundPolygon:function(t,m){return this.nodeShapes[t]={renderer:this,name:t,points:m,getOrCreateCorners:me(function(t,e,r,i,n,a,s){if(void 0===a[s]||a[s+"-cx"]!==t||a[s+"-cy"]!==e){a[s]=new Array(m.length/2),a[s+"-cx"]=t,a[s+"-cy"]=e;var o=r/2,l=i/2;n="auto"===n?G8t(r,i):n;for(var c=new Array(m.length/2),h=0;h<m.length/2;h++)c[h]={x:t+o*m[2*h],y:e+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]=Nwt(g,u,d,n),g=u}return a[s]},"getOrCreateCorners"),draw:me(function(t,e,r,i,n,a,s){this.renderer.nodeShapeImpl("round-polygon",t,e,r,i,n,this.points,this.getOrCreateCorners(e,r,i,n,a,s,"drawCorners"))},"draw"),intersectLine:me(function(t,e,r,i,n,a,s,o,l){return O8t(n,a,this.points,t,e,r,i,s,this.getOrCreateCorners(t,e,r,i,o,l,"corners"))},"intersectLine"),checkPoint:me(function(t,e,r,i,n,a,s,o,l){return _8t(t,e,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:B8t(4,0),draw:me(function(t,e,r,i,n,a){this.renderer.nodeShapeImpl(this.name,t,e,r,i,n,this.points,a)},"draw"),intersectLine:me(function(t,e,r,i,n,a,s,o){return y8t(n,a,t,e,r,i,s,o)},"intersectLine"),checkPoint:me(function(t,e,r,i,n,a,s,o){var l=i/2,c=n/2,h=(o="auto"===o?z8t(i,n):o,2*(o=Math.min(l,c,o)));return!!(C8t(t,e,this.points,a,s,i,n-h,[0,-1],r)||C8t(t,e,this.points,a,s,i-h,n,[0,-1],r)||N8t(t,e,h,h,a-l+o,s-c+o,r)||N8t(t,e,h,h,a+l-o,s-c+o,r)||N8t(t,e,h,h,a+l-o,s+c-o,r)||N8t(t,e,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:U8t(),points:B8t(4,0),draw:me(function(t,e,r,i,n,a){this.renderer.nodeShapeImpl(this.name,t,e,r,i,n,null,a)},"draw"),generateCutTrianglePts:me(function(t,e,r,i,n){var a=r-(t/=2),r=r+t;return{topLeft:[a,(t=i-(e/=2))+(n="auto"===n?this.cornerLength:n),a+n,t,a+n,t+n],topRight:[r-n,t,r,t+n,r-n,t+n],bottomRight:[r,(i+=e)-n,r-n,i,r-n,i-n],bottomLeft:[a+n,i,a,i-n,a+n,i-n]}},"generateCutTrianglePts"),intersectLine:me(function(t,e,r,i,n,a,s,o){return r=this.generateCutTrianglePts(r+2*s,i+2*s,t,e,o),i=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),D8t(n,a,i,t,e)},"intersectLine"),checkPoint:me(function(t,e,r,i,n,a,s,o){return o="auto"===o?this.cornerLength:o,!(!C8t(t,e,this.points,a,s,i,n-2*o,[0,-1],r)&&!C8t(t,e,this.points,a,s,i-2*o,n,[0,-1],r))||(o=this.generateCutTrianglePts(i,n,a,s),E8t(t,e,o.topLeft))||E8t(t,e,o.topRight)||E8t(t,e,o.bottomRight)||E8t(t,e,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:B8t(4,0),draw:me(function(t,e,r,i,n,a){this.renderer.nodeShapeImpl(this.name,t,e,r,i,n)},"draw"),intersectLine:me(function(t,e,r,i,n,a,s,o){return r=this.generateBarrelBezierPts(r+2*s,i+2*s,t,e),i=me(function(t){var e=e8t({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.15),r=e8t({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.5),i=e8t({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.85);return[t[0],t[1],e.x,e.y,r.x,r.y,i.x,i.y,t[4],t[5]]},"approximateBarrelCurvePts"),s=[].concat(i(r.topLeft),i(r.topRight),i(r.bottomRight),i(r.bottomLeft)),D8t(n,a,s,t,e)},"intersectLine"),generateBarrelBezierPts:me(function(t,e,r,i){var n=e/2,a=r-(s=t/2),r=r+s,s=i-n,i=i+n,e=(n=j8t(t,e)).heightOffset,o=n.widthOffset;return(t={topLeft:[a,s+e,a+(n=n.ctrlPtOffsetPct*t),s,a+o,s],topRight:[r-o,s,r-n,s,r,s+e],bottomRight:[r,i-e,r-n,i,r-o,i],bottomLeft:[a+o,i,a+n,i,a,i-e]}).topLeft.isTop=!0,t.topRight.isTop=!0,t.bottomLeft.isBottom=!0,t.bottomRight.isBottom=!0,t},"generateBarrelBezierPts"),checkPoint:me(function(t,e,r,i,n,a,s,o){var l=(c=j8t(i,n)).heightOffset,c=c.widthOffset;if(C8t(t,e,this.points,a,s,i,n-2*l,[0,-1],r)||C8t(t,e,this.points,a,s,i-2*c,n,[0,-1],r))return!0;for(var h=this.generateBarrelBezierPts(i,n,a,s),u=me(function(t,e,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<=t&&t<=l&&c<=e&&e<=s&&(r=q8t(i,n,a),0<(o=b8t(r[0],r[1],r[2],t).filter(function(t){return 0<=t&&t<=1})).length)?o[0]:null},"getCurveT"),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]],f=u(t,e,g);if(null!=f){var m=g[5],y=g[3],v=g[1],m=t8t(m,y,v,f);if(g.isTop&&m<=e||g.isBottom&&e<=m)return!0}}return!1},"checkPoint")}},generateBottomRoundrectangle:function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:B8t(4,0),draw:me(function(t,e,r,i,n,a){this.renderer.nodeShapeImpl(this.name,t,e,r,i,n,this.points,a)},"draw"),intersectLine:me(function(t,e,r,i,n,a,s,o){var l=e-(i/2+s);return 0<(l=M8t(n,a,t,e,t-(r/2+s),l,t+(r/2+s),l,!1)).length?l:y8t(n,a,t,e,r,i,s,o)},"intersectLine"),checkPoint:me(function(t,e,r,i,n,a,s,o){var l,c,h=2*(o="auto"===o?z8t(i,n):o);return!(!C8t(t,e,this.points,a,s,i,n-h,[0,-1],r)&&!C8t(t,e,this.points,a,s,i-h,n,[0,-1],r)&&!(E8t(t,e,[a-(l=i/2+2*r),s-(c=n/2+2*r),a-l,s,a+l,s,a+l,s-c])||N8t(t,e,h,h,a+i/2-o,s+n/2-o,r)||N8t(t,e,h,h,a-i/2+o,s+n/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var t=this.nodeShapes={},r=this,e=(this.generateEllipse(),this.generatePolygon("triangle",B8t(3,0)),this.generateRoundPolygon("round-triangle",B8t(3,0)),this.generatePolygon("rectangle",B8t(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),i=(this.generatePolygon("diamond",e),this.generateRoundPolygon("round-diamond",e),this.generatePolygon("pentagon",B8t(5,0)),this.generateRoundPolygon("round-pentagon",B8t(5,0)),this.generatePolygon("hexagon",B8t(6,0)),this.generateRoundPolygon("round-hexagon",B8t(6,0)),this.generatePolygon("heptagon",B8t(7,0)),this.generateRoundPolygon("round-heptagon",B8t(7,0)),this.generatePolygon("octagon",B8t(8,0)),this.generateRoundPolygon("round-octagon",B8t(8,0)),new Array(20)),n=$8t(5,0),a=$8t(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=F8t(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",e=[-1,-1,.25,-1,1,0,.25,1,-1,1]),this.generateRoundPolygon("round-tag",e),t.makePolygon=function(t){var e="polygon-"+t.join("$");return this[e]||r.generatePolygon(e,t)}}},r9t={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(t){t=t||w7t(),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=t},beforeRender:function(t,e){var r;this.destroyed||(null==e&&p7t("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:t,priority:e}),r.sort(function(t,e){return e.priority-t.priority}))}},dAt=me(function(t,e,r){for(var i=t.beforeRenderCallbacks,n=0;n<i.length;n++)i[n].fn(e,r)},"beforeRenderCallbacks"),r9t.startRenderLoop=function(){var t,n=this,a=n.cy;n.renderLoopStarted||(n.renderLoopStarted=!0,t=me(function t(e){var r,i;n.destroyed||(a.batching()||(n.requestedFrame&&!n.skipFrame?(dAt(n,!0,e),r=VTt(),n.render(n.renderOptions),i=n.lastDrawTime=VTt(),void 0===n.averageRedrawTime&&(n.averageRedrawTime=i-r),void 0===n.redrawCount&&(n.redrawCount=0),n.redrawCount++,void 0===n.redrawTotalTime&&(n.redrawTotalTime=0),n.redrawTotalTime+=i-=r,n.lastRedrawTime=i,n.averageRedrawTime=n.averageRedrawTime/2+i/2,n.requestedFrame=!1):dAt(n,!1,e)),n.skipFrame=!1,HTt(t))},"renderFn"),HTt(t))},PAt=me(function(t){this.init(t)},"BaseRenderer"),(gAt=(pAt=PAt).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],gAt.init=function(t){var e,r,i,n,a=this,s=(a.options=t,a.cy=t.cy,a.container=t.cy.container()),o=a.cy.window();o&&(r=(e=o.document).head,i="__________cytoscape_container",n=null!=e.getElementById("__________cytoscape_stylesheet"),s.className.indexOf(i)<0&&(s.className=(s.className||"")+" "+i),n||((n=e.createElement("style")).id="__________cytoscape_stylesheet",n.textContent="."+i+" { position: relative; }",r.insertBefore(n,r.children[0])),"static"===o.getComputedStyle(s).getPropertyValue("position"))&&f7t("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=t.showFps,a.debug=t.debug,a.webgl=t.webgl,a.hideEdgesOnViewport=t.hideEdgesOnViewport,a.textureOnViewport=t.textureOnViewport,a.wheelSensitivity=t.wheelSensitivity,a.motionBlurEnabled=t.motionBlur,a.forcedPixelRatio=at(t.pixelRatio)?t.pixelRatio:null,a.motionBlur=t.motionBlur,a.motionBlurOpacity=t.motionBlurOpacity,a.motionBlurTransparency=1-a.motionBlurOpacity,a.motionBlurPxRatio=1,a.mbPxRBlurry=1,a.minMbLowQualFrames=4,a.fullQualityMb=!1,a.clearedForMotionBlur=[],a.desktopTapThreshold=t.desktopTapThreshold,a.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,a.touchTapThreshold=t.touchTapThreshold,a.touchTapThreshold2=t.touchTapThreshold*t.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()},gAt.notify=function(t,e){var r=this,i=r.cy;this.destroyed||("init"===t?r.load():"destroy"===t?r.destroy():(("add"===t||"remove"===t||"move"===t&&i.hasCompoundNodes()||"load"===t||"zorder"===t||"mount"===t)&&r.invalidateCachedZSortedEles(),"viewport"===t&&r.redrawHint("select",!0),"gc"===t&&r.redrawHint("gc",!0),"load"!==t&&"resize"!==t&&"mount"!==t||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()))},gAt.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],i=r.target;(i.off||i.removeEventListener).apply(i,r.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}},gAt.isHeadless=function(){return!1},[YAt,uAt,HAt,t9t,e9t,r9t].forEach(function(t){lTt(gAt,t)}),c9t={setupDequeueing:me(function(f){return me(function(){var d,t,e,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=qTt(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),t=me(function(t,e){var r=VTt(),i=g.averageRedrawTime,n=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(t||g.flushRenderedStyleQueue();;){var l=(c=VTt())-r,c=c-e;if(n<1e3/60){if(c>=f.deqFastCost*(1e3/60-(t?i:0)))break}else if(t){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),!t)&&f.shouldRedraw(p,a,o,s)&&d()},"dequeue"),e=f.priority||d7t,g.beforeRender(t,e(p)))},"setupDequeueingImpl")},"setupDequeueing")},me(N,"ElementTextureCacheLookup"),I3t(N,[{key:"getIdsFor",value:me(function(t){null==t&&p7t("Can not get id list for null key");var e=this.idsByKey,r=this.idsByKey.get(t);return r||(r=new L7t,e.set(t,r)),r},"getIdsFor")},{key:"addIdForKey",value:me(function(t,e){null!=t&&this.getIdsFor(t).add(e)},"addIdForKey")},{key:"deleteIdForKey",value:me(function(t,e){null!=t&&this.getIdsFor(t).delete(e)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:me(function(t){return null==t?0:this.getIdsFor(t).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:me(function(t){var e=t.id(),r=this.keyForId.get(e),t=this.getKey(t);this.deleteIdForKey(r,e),this.addIdForKey(t,e),this.keyForId.set(e,t)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:me(function(t){var t=t.id(),e=this.keyForId.get(t);this.deleteIdForKey(e,t),this.keyForId.delete(t)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:me(function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)},"keyHasChangedFor")},{key:"isInvalid",value:me(function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)},"isInvalid")},{key:"getCachesAt",value:me(function(t){var e=this.cachesByLvl,r=this.lvls,i=e.get(t);return i||(i=new A7t,e.set(t,i),r.push(t)),i},"getCachesAt")},{key:"getCache",value:me(function(t,e){return this.getCachesAt(e).get(t)},"getCache")},{key:"get",value:me(function(t,e){var r=this.getKey(t);return null!=(r=this.getCache(r,e))&&this.updateKeyMappingFor(t),r},"get")},{key:"getForCachedKey",value:me(function(t,e){return t=this.keyForId.get(t.id()),this.getCache(t,e)},"getForCachedKey")},{key:"hasCache",value:me(function(t,e){return this.getCachesAt(e).has(t)},"hasCache")},{key:"has",value:me(function(t,e){return t=this.getKey(t),this.hasCache(t,e)},"has")},{key:"setCache",value:me(function(t,e,r){r.key=t,this.getCachesAt(e).set(t,r)},"setCache")},{key:"set",value:me(function(t,e,r){var i=this.getKey(t);this.setCache(i,e,r),this.updateKeyMappingFor(t)},"set")},{key:"deleteCache",value:me(function(t,e){this.getCachesAt(e).delete(t)},"deleteCache")},{key:"delete",value:me(function(t,e){t=this.getKey(t),this.deleteCache(t,e)},"_delete")},{key:"invalidateKey",value:me(function(e){var r=this;this.lvls.forEach(function(t){return r.deleteCache(e,t)})},"invalidateKey")},{key:"invalidate",value:me(function(t){var e=t.id(),e=this.keyForId.get(e);return this.deleteKeyMappingFor(t),(t=this.doesEleInvalidateKey(t))&&this.invalidateKey(e),t||0===this.getNumberOfIdsForKey(e)},"invalidate")}]),fAt=N,mAt={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},yAt=k7t({getKey:null,doesEleInvalidateKey:h7t,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:c7t,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vAt=me(function(t,e){this.renderer=t,this.onDequeues=[],t=yAt(e),lTt(this,t),this.lookup=new fAt(t.getKey,t.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(a9t=vAt.prototype).reasons=mAt,a9t.getTextureQueue=function(t){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[t]=this.eleImgCaches[t]||[]},a9t.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},a9t.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new I7t(function(t,e){return e.reqs-t.reqs})},a9t.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},a9t.getElement=function(t,e,r,i,n){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if((i=null==i?Math.ceil(X7t(o*r)):i)<-4)i=-4;else if(7.99<=o||3<i)return null;var o=Math.pow(2,i),c=e.h*o,h=e.w*o,u=s.eleTextBiggerThanMin(t,o);if(!this.isVisible(t,u))return null;if((s=l.get(t,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=me(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=me(function(t){return t&&t.scaledLabelShown===u},"scalableFrom"),g=n&&n===mAt.dequeue,y=n&&n===mAt.highQuality,n=n&&n===mAt.downscale,v=i+1;v<=3;v++){var x=l.get(t,v);if(x){f=x;break}}var b,w=f&&f.level===i+1?f:null,k=me(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))k();else if(m(f)){if(!y)return a.queueElement(t,f.level-1),f;for(var T=f.level;i<T;T--)w=a.getElement(t,e,r,T,mAt.downscale);k()}else{if(!g&&!y&&!n)for(var E=i-1;-4<=E;E--){var C=l.get(t,E);if(C){b=C;break}}if(m(b))return a.queueElement(t,i),b;p.context.translate(p.usedWidth,0),p.context.scale(o,o),this.drawElement(p.context,t,e,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(t,i,s),a.checkTextureFullness(p)}return s},a9t.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},a9t.invalidateElement=function(t){var e=this.lookup,r=[];if(e.isInvalid(t)){for(var i=-4;i<=3;i++){var n=e.getForCachedKey(t,i);n&&r.push(n)}if(e.invalidate(t))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(t)}},a9t.checkTextureUtility=function(t){t.invalidatedWidth>=.2*t.width&&this.retireTexture(t)},a9t.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8<t.usedWidth/t.width&&10<=t.fullnessChecks?T7t(e,t):t.fullnessChecks++},a9t.retireTexture=function(t){var e=t.height,r=this.getTextureQueue(e),i=this.lookup;T7t(r,t),t.retired=!0;for(var n=t.eleCaches,a=0;a<n.length;a++){var s=n[a];i.deleteCache(s.key,s.level)}E7t(n),this.getRetiredTextureQueue(e).push(t)},a9t.addTexture=function(t,e){var r={};return this.getTextureQueue(t).push(r),r.eleCaches=[],r.height=t,r.width=Math.max(1024,e),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},a9t.recycleTexture=function(t,e){for(var r=this.getTextureQueue(t),i=this.getRetiredTextureQueue(t),n=0;n<i.length;n++){var a=i[n];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,E7t(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),T7t(i,a),r.push(a),a}},a9t.queueElement=function(t,e){var r=this.getElementQueue(),i=this.getElementKeyToQueue(),n=this.getKey(t),a=i[n];a?(a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a)):(a={eles:t.spawn().merge(t),level:e,reqs:1,key:n},r.push(a),i[n]=a)},a9t.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),i=[],n=this.lookup,a=0;a<1&&0<e.size();a++){var s=e.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,t,s.level,mAt.dequeue))}return i},a9t.removeFromQueue=function(t){var e=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(t),n=r[i];null!=n&&(1===n.eles.length?(n.reqs=l7t,e.updateItem(n),e.pop(),r[i]=null):n.eles.unmerge(t))},a9t.onDequeue=function(t){this.onDequeues.push(t)},a9t.offDequeue=function(t){T7t(this.onDequeues,t)},a9t.setupDequeueing=c9t.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:me(function(t,e,r){return t.dequeue(e,r)},"deq"),onDeqd:me(function(t,e){for(var r=0;r<t.onDequeues.length;r++)(0,t.onDequeues[r])(e)},"onDeqd"),shouldRedraw:me(function(t,e,r,i){for(var n=0;n<e.length;n++)for(var a=e[n].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(p8t(o,i))return!0}return!1},"shouldRedraw"),priority:me(function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),xAt=me(function(t){var r=this,e=(t=r.renderer=t).cy,e=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=VTt()-500,r.skipping=!1,r.eleTxrDeqs=e.collection(),r.scheduleElementRefinement=qTt(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},50),t.beforeRender(function(t,e){e-r.lastInvalidationTime<=250?r.skipping=!0:r.skipping=!1},t.beforeRenderPriorities.lyrTxrSkip),me(function(t,e){return e.reqs-t.reqs},"qSort"));r.layersQueue=new I7t(e),r.setupDequeueing()},"LayeredTextureCache"),J=xAt.prototype,bAt=0,wAt=Math.pow(2,53)-1,J.makeLayer=function(t,e){var r=Math.pow(2,e),i=Math.ceil(t.w*r),n=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(i,n),e=(t={id:bAt=++bAt%wAt,bb:t,level:e,width:i,height:n,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,i=-t.bb.x1,n=-t.bb.y1;return e.scale(r,r),e.translate(i,n),t},J.getLayers=function(n,t,a){var s=this,e=s.renderer.cy.zoom(),r=s.firstGet;if(s.firstGet=!1,null==a)if((a=Math.ceil(X7t(e*t)))<-4)a=-4;else if(3.99<=e||2<a)return null;s.validateLayersElesOrdering(a,n);var o,l,c=s.layersByLevel,h=Math.pow(2,a),u=c[a]=c[a]||[],e=s.levelIsComplete(a,n),i=me(function(){var r=me(function(t){if(s.validateLayersElesOrdering(t,n),s.levelIsComplete(t,n))return l=c[t],!0},"canUseAsTmpLvl"),t=me(function(t){if(!l)for(var e=a+t;-4<=e&&e<=2&&!r(e);e+=t);},"checkLvls");t(1),t(-1);for(var e=u.length-1;0<=e;e--){var i=u[e];i.invalid&&T7t(u,i)}},"checkTempLevels");if(e)return u;i();var d=me(function(){if(!o){o=n8t();for(var t=0;t<n.length;t++)l8t(o,n[t].boundingBox())}return o},"getBb"),p=me(function(t){var e=(t=t||{}).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!=e?(i=u.indexOf(e)+1,u.splice(i,0,r)):void 0!==t.insert&&!t.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],x=v._private.rscratch,b=(x=x.imgLayerCaches=x.imgLayerCaches||{})[a];if(b)g=b;else{if((!g||g.eles.length>=f||!m8t(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return l||(m?null:u)},J.getEleLevelForLayerLevel=function(t,e){return t},J.drawEleInLayer=function(t,e,r,i){var n=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,i),n.setImgSmoothing(t,!1),n.drawCachedElement(t,e,null,null,r,!0),n.setImgSmoothing(t,!0))},J.levelIsComplete=function(t,e){var r=this.layersByLevel[t];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===e.length},J.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var i=0;i<r.length;i++){for(var n=r[i],a=-1,s=0;s<e.length;s++)if(n.eles[0]===e[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]!==e[o+s]){this.invalidateLayer(n);break}}},J.updateElementsInLayers=function(t,e){for(var r=jkt(t[0]),i=0;i<t.length;i++)for(var n=r?null:t[i],a=r?t[i]:t[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||e(c,a,n)}},J.haveLayers=function(){for(var t=!1,e=-4;e<=2;e++){var r=this.layersByLevel[e];if(r&&0<r.length){t=!0;break}}return t},J.invalidateElements=function(t){var i=this;0!==t.length&&(i.lastInvalidationTime=VTt(),0!==t.length)&&i.haveLayers()&&i.updateElementsInLayers(t,me(function(t,e,r){i.invalidateLayer(t)},"invalAssocLayers"))},J.invalidateLayer=function(t){if(this.lastInvalidationTime=VTt(),!t.invalid){var e=t.level,r=t.eles,i=this.layersByLevel[e];T7t(i,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var n=0;n<r.length;n++){var a=r[n]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}},J.refineElementTextures=function(t){var a=this;a.updateElementsInLayers(t,me(function(t,e,r){var i=t.replacement;if(i||((i=t.replacement=a.makeLayer(t.bb,t.level)).replaces=t,i.eles=t.eles),!i.reqs)for(var n=0;n<i.eles.length;n++)a.queueLayer(i,i.eles[n])},"refineEachEle"))},J.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},J.queueLayer=function(t,e){var r=this.layersQueue,i=t.elesQueue,n=i.hasId=i.hasId||{};if(!t.replacement){if(e){if(n[e.id()])return;i.push(e),n[e.id()]=!0}t.reqs?(t.reqs++,r.updateItem(t)):(t.reqs=1,r.push(t))}},J.dequeue=function(t){for(var e=this.layersQueue,r=[],i=0;i<1&&0!==e.size();){var n,a=e.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?e.pop():((n=a.elesQueue.shift())&&(this.drawEleInLayer(a,n,a.level,t),i++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(e.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},J.applyLayerReplacement=function(t){var e=this.layersByLevel[t.level],r=t.replaces,i=e.indexOf(r);if(!(i<0||r.invalid)){e[i]=t;for(var n=0;n<t.eles.length;n++){var a=t.eles[n]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[t.level]=t)}this.requestRedraw()}},J.requestRedraw=qTt(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),J.setupDequeueing=c9t.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:me(function(t,e){return t.dequeue(e)},"deq"),onDeqd:d7t,shouldRedraw:c7t,priority:me(function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),kAt={},me(Mwt,"polygon"),me(Dwt,"triangleBackcurve"),me(Owt,"triangleTee"),me(Pwt,"circleTriangle"),me(Bwt,"circle"),kAt.arrowShapeImpl=function(t){return(TAt=TAt||{polygon:Mwt,"triangle-backcurve":Dwt,"triangle-tee":Owt,"circle-triangle":Pwt,"triangle-cross":Owt,circle:Bwt})[t]},EAt={drawElement:function(t,e,r,i,n,a){e.isNode()?this.drawNode(t,e,r,i,n,a):this.drawEdge(t,e,r,i,n,a)},drawElementOverlay:function(t,e){e.isNode()?this.drawNodeOverlay(t,e):this.drawEdgeOverlay(t,e)},drawElementUnderlay:function(t,e){e.isNode()?this.drawNodeUnderlay(t,e):this.drawEdgeUnderlay(t,e)},drawCachedElementPortion:function(t,e,r,i,n,a,s,o){var l,c,h,u,d,p,g,f=r.getBoundingBox(e);0!==f.w&&0!==f.h&&(null!=(i=r.getElement(e,f,i,n,a))?0!==(n=o(this,e))&&(a=s(this,e),o=f.x1,s=f.y1,l=f.w,f=f.h,p=0!==a?(h=(u=r.getRotationPoint(e)).x,t.translate(h,u=u.y),t.rotate(a),(c=this.getImgSmoothing(t))||this.setImgSmoothing(t,!0),d=(p=r.getRotationOffset(e)).x,p.y):(d=o,s),1!==n&&(g=t.globalAlpha,t.globalAlpha=g*n),t.drawImage(i.texture.canvas,i.x,0,i.width,i.height,d,p,l,f),1!==n&&(t.globalAlpha=g),0!==a)&&(t.rotate(-a),t.translate(-h,-u),c||this.setImgSmoothing(t,!1)):r.drawElement(t,e))}},CAt=me(function(){return 0},"getZeroRotation"),_At=me(function(t,e){return t.getTextAngle(e,null)},"getLabelRotation"),SAt=me(function(t,e){return t.getTextAngle(e,"source")},"getSourceLabelRotation"),AAt=me(function(t,e){return t.getTextAngle(e,"target")},"getTargetLabelRotation"),LAt=me(function(t,e){return e.effectiveOpacity()},"getOpacity"),NAt=me(function(t,e){return e.pstyle("text-opacity").pfValue*e.effectiveOpacity()},"getTextOpacity"),EAt.drawCachedElement=function(t,e,r,i,n,a){var s=(c=this.data).eleTxrCache,o=c.lblTxrCache,l=c.slbTxrCache,c=c.tlbTxrCache,h=e.boundingBox(),a=!0===a?s.reasons.highQuality:null;0===h.w||0===h.h||!e.visible()||i&&!p8t(h,i)||(h=e.isEdge(),i=e.element()._private.rscratch.badLine,this.drawElementUnderlay(t,e),this.drawCachedElementPortion(t,e,s,r,n,a,CAt,LAt),h&&i||this.drawCachedElementPortion(t,e,o,r,n,a,_At,NAt),h&&!i&&(this.drawCachedElementPortion(t,e,l,r,n,a,SAt,NAt),this.drawCachedElementPortion(t,e,c,r,n,a,AAt,NAt)),this.drawElementOverlay(t,e))},EAt.drawElements=function(t,e){for(var r=0;r<e.length;r++)this.drawElement(t,e[r])},EAt.drawCachedElements=function(t,e,r,i){for(var n=0;n<e.length;n++)this.drawCachedElement(t,e[n],r,i)},EAt.drawCachedNodes=function(t,e,r,i){for(var n=0;n<e.length;n++){var a=e[n];a.isNode()&&this.drawCachedElement(t,a,r,i)}},EAt.drawLayeredElements=function(t,e,r,i){var n=this.data.lyrTxrCache.getLayers(e,r);if(n)for(var a=0;a<n.length;a++){var s=n[a],o=s.bb;0!==o.w&&0!==o.h&&t.drawImage(s.canvas,o.x1,o.y1,o.w,o.h)}else this.drawCachedElements(t,e,r,i)},IAt={drawEdge:function(e,r,t){var i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],w=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],k=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],T=this,E=r._private.rscratch;k&&!r.visible()||E.badLine||null==E.allpts||isNaN(E.allpts[0])||(t&&e.translate(-(i=t).x1,-i.y1),d=k?r.pstyle("opacity").value:1,k=k?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*k,d=me(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;"straight-triangle"===n?(T.eleStrokeStyle(e,r,t),T.drawEdgeTrianglePath(r,e,E.allpts)):(e.lineWidth=s,e.lineCap=o,T.eleStrokeStyle(e,r,t),T.drawEdgePath(r,e,E.allpts,a),e.lineCap="butt")},"drawLine"),k=me(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;e.lineWidth=s+l,e.lineCap=o,0<l?(T.colorStrokeStyle(e,c[0],c[1],c[2],t),"straight-triangle"===n?T.drawEdgeTrianglePath(r,e,E.allpts):(T.drawEdgePath(r,e,E.allpts,a),e.lineCap="butt")):e.lineCap="butt"},"drawLineOutline"),p=me(function(){w&&T.drawEdgeOverlay(e,r)},"drawOverlay"),g=me(function(){w&&T.drawEdgeUnderlay(e,r)},"drawUnderlay"),f=me(function(){T.drawArrowheads(e,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=me(function(){T.drawElementText(e,r,null,b)},"drawText"),e.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,x=r.pstyle("ghost-opacity").value,x*=h,e.translate(y,v),d(x),f(x),e.translate(-y,-v)):k(),g(),d(),f(),p(),m(),t&&e.translate(i.x1,i.y1))}},RAt=me(function(o){if(["overlay","underlay"].includes(o))return function(t,e){var r,i,n,a,s;e.visible()&&0!==(r=e.pstyle("".concat(o,"-opacity")).value)&&(i=this.usePaths(),n=e._private.rscratch,a=2*e.pstyle("".concat(o,"-padding")).pfValue,s=e.pstyle("".concat(o,"-color")).value,t.lineWidth=a,"self"!==n.edgeType||i?t.lineCap="round":t.lineCap="butt",this.colorStrokeStyle(t,s[0],s[1],s[2],r),this.drawEdgePath(e,t,n.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),IAt.drawEdgeOverlay=RAt("overlay"),IAt.drawEdgeUnderlay=RAt("underlay"),IAt.drawEdgePath=function(t,e,r,i){var n,a=t._private.rscratch,s=e,o=!1,l=this.usePaths(),c=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l&&(t=r.join("$"),a.pathCacheKey&&a.pathCacheKey===t?(n=e=a.pathCache,o=!0):(n=e=new Path2D,a.pathCacheKey=t,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(e.beginPath&&e.beginPath(),e.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)e.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)e.lineTo(r[d],r[d+1]);break;case"segments":if(a.isRound){var p,g=q3t(a.roundCorners);try{for(g.s();!(p=g.n()).done;)Lwt(e,p.value)}catch(t){g.e(t)}finally{g.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var f=2;f+1<r.length;f+=2)e.lineTo(r[f],r[f+1])}e=s,l?e.stroke(n):e.stroke(),e.setLineDash&&e.setLineDash([])},IAt.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var i=t.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];e.beginPath(),e.moveTo(r[n]-s[0],r[n+1]-s[1]),e.lineTo(r[n]+s[0],r[n+1]+s[1]),e.lineTo(r[n+2],r[n+3]),e.closePath(),e.fill()}},IAt.drawArrowheads=function(t,e,r){var i=e._private.rscratch,n="haystack"===i.edgeType;n||this.drawArrowhead(t,e,"source",i.arrowStartX,i.arrowStartY,i.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",i.midX,i.midY,i.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",i.midX,i.midY,i.midsrcArrowAngle,r),n||this.drawArrowhead(t,e,"target",i.arrowEndX,i.arrowEndY,i.tgtArrowAngle,r)},IAt.drawArrowhead=function(t,e,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=e.pstyle(r+"-arrow-shape").value)&&(l="hollow"===e.pstyle(r+"-arrow-fill").value?"both":"filled",c=e.pstyle(r+"-arrow-fill").value,h=e.pstyle("width").pfValue,u="match-line"===(p=e.pstyle(r+"-arrow-width")).value?h:p.pfValue,"%"===p.units&&(u*=h),p=e.pstyle("opacity").value,d=t.globalCompositeOperation,1===(s=void 0===s?p:s)&&"hollow"!==c||(t.globalCompositeOperation="destination-out",this.colorFillStyle(t,255,255,255,1),this.colorStrokeStyle(t,255,255,255,1),this.drawArrowShape(e,t,l,h,o,u,i,n,a),t.globalCompositeOperation=d),p=e.pstyle(r+"-arrow-color").value,this.colorFillStyle(t,p[0],p[1],p[2],s),this.colorStrokeStyle(t,p[0],p[1],p[2],s),this.drawArrowShape(e,t,c,h,o,u,i,n,a))},IAt.drawArrowShape=function(t,e,r,i,n,a,s,o,l){var c,h,u,d=this.usePaths()&&"triangle-cross"!==n,p=!1,g=e,f={x:s,y:o},t=t.pstyle("arrow-scale").value,t=this.getArrowWidth(i,t),m=this.arrowShapes[n];d&&(null!=(u=(h=this.arrowPathCache=this.arrowPathCache||[])[n=r7t(n)])?(c=e=u,p=!0):(c=e=new Path2D,h[n]=c)),p||(e.beginPath&&e.beginPath(),d?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,t,l,f,i),e.closePath&&e.closePath()),e=g,d&&(e.translate(s,o),e.rotate(l),e.scale(t,t)),"filled"!==r&&"both"!==r||(d?e.fill(c):e.fill()),"hollow"!==r&&"both"!==r||(e.lineWidth=a/(d?t:1),e.lineJoin="miter",d?e.stroke(c):e.stroke()),d&&(e.scale(1/t,1/t),e.rotate(-l),e.translate(-s,-o))},MAt={safeDrawImage:function(t,e,r,i,n,a,s,o,l,c){if(!(n<=0||a<=0||l<=0||c<=0))try{t.drawImage(e,r,i,n,a,s,o,l,c)}catch(t){f7t(t)}},drawInscribedImage:function(t,e,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,x=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),e.width||e.cachedW),b=e.height||e.cachedH,w=(null!=x&&null!=b||(document.body.appendChild(e),x=e.cachedW=e.width||e.offsetWidth,b=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e)),x),k=b;"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)&&(k="%"===h(r,"background-height","units",i)?h(r,"background-height","pfValue",i)*g:h(r,"background-height","pfValue",i)),0!==w&&0!==k&&("contain"===u?(w*=a=Math.min(p/w,g/k),k*=a):"cover"===u&&(w*=a=Math.max(p/w,g/k),k*=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-k)*o:o,s=h(r,"background-offset-y","units",i),o=h(r,"background-offset-y","pfValue",i),a+="%"===s?(g-k)*o:o,f.pathCache&&(u-=l,a-=c,c=l=0),h=t.globalAlpha,t.globalAlpha=n,i=this.getImgSmoothing(t),s=!1,"no"===y&&i?(this.setImgSmoothing(t,!1),s=!0):"yes"!==y||i||(this.setImgSmoothing(t,!0),s=!0),"no-repeat"===d?(m&&(t.save(),f.pathCache?t.clip(f.pathCache):(this.nodeShapes[this.getNodeShape(r)].draw(t,l,c,p,g,v,f),t.clip())),this.safeDrawImage(t,e,0,0,x,b,u,a,w,k),m&&t.restore()):(o=t.createPattern(e,d),t.fillStyle=o,this.nodeShapes[this.getNodeShape(r)].draw(t,l,c,p,g,v,f),t.translate(u,a),t.fill(),t.translate(-u,-a)),t.globalAlpha=h,s)&&this.setImgSmoothing(t,i)}},DAt={eleTextBiggerThanMin:function(t,e){var r,i;return e||(i=t.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(X7t(i*r)),e=Math.pow(2,i)),!(t.pstyle("font-size").pfValue*e<t.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(t,e,r,i,n){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==i){if(a&&!this.eleTextBiggerThanMin(e))return}else if(!1===i)return;if(e.isNode()){if(!(i=e.pstyle("label"))||!i.value)return;i=this.getLabelJustification(e),t.textAlign=i}else{var i=e.element()._private.rscratch.badLine,s=e.pstyle("label"),o=e.pstyle("source-label"),l=e.pstyle("target-label");if(i||(!s||!s.value)&&(!o||!o.value)&&(!l||!l.value))return;t.textAlign="center"}t.textBaseline="bottom";var c,i=!r;r&&t.translate(-(c=r).x1,-c.y1),null==n?(this.drawText(t,e,null,i,a),e.isEdge()&&(this.drawText(t,e,"source",i,a),this.drawText(t,e,"target",i,a))):this.drawText(t,e,n,i,a),r&&t.translate(c.x1,c.y1)},getFontCache:function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((e=this.fontCaches[r]).context===t)return e;return this.fontCaches.push(e={context:t}),e},setupTextStyle:function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],i=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,r=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,o=e.pstyle("text-outline-opacity").value*r,l=e.pstyle("color").value,e=e.pstyle("text-outline-color").value;t.font=i+" "+s+" "+n+" "+a,t.lineJoin="round",this.colorFillStyle(t,l[0],l[1],l[2],r),this.colorStrokeStyle(t,e[0],e[1],e[2],o)}},me(Fwt,"roundRect"),DAt.getTextAngle=function(t,e){var r=t._private.rscratch,i=t.pstyle((e?e+"-":"")+"text-rotation");return"autorotate"===i.strValue?(r=_7t(r,"labelAngle",e),t.isEdge()?r:0):"none"===i.strValue?0:i.pfValue},DAt.drawText=function(t,e,r){var i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=e._private.rscratch,a=(u=!(4<arguments.length&&void 0!==arguments[4])||arguments[4])?e.effectiveOpacity():1;if(!u||0!==a&&0!==e.pstyle("text-opacity").value){var s,o,l=_7t(n,"labelX",r="main"===r?null:r),c=_7t(n,"labelY",r),h=this.getLabelText(e,r);if(null!=h&&""!==h&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(t,e,u);var u=r?r+"-":"",d=_7t(n,"labelWidth",r),p=_7t(n,"labelHeight",r),g=e.pstyle(u+"text-margin-x").pfValue,u=e.pstyle(u+"text-margin-y").pfValue,f=e.isEdge(),m=e.pstyle("text-halign").value,y=e.pstyle("text-valign").value;switch(f&&(y=m="center"),l+=g,c+=u,0!==(f=i?this.getTextAngle(e,r):0)&&(s=l,o=c,t.translate(s,o),t.rotate(f),c=l=0),y){case"top":break;case"center":c+=p/2;break;case"bottom":c+=p}var g=e.pstyle("text-background-opacity").value,u=e.pstyle("text-border-opacity").value,v=e.pstyle("text-border-width").pfValue,i=e.pstyle("text-background-padding").pfValue,x=0===e.pstyle("text-background-shape").strValue.indexOf("round");if(0<g||0<v&&0<u){var b=l-i;switch(m){case"left":b-=d;break;case"center":b-=d/2}var w=c-p-i,k=d+2*i,i=p+2*i;if(0<g&&(E=t.fillStyle,T=e.pstyle("text-background-color").value,t.fillStyle="rgba("+T[0]+","+T[1]+","+T[2]+","+g*a+")",x?Fwt(t,b,w,k,i,2):t.fillRect(b,w,k,i),t.fillStyle=E),0<v&&0<u){var T=t.strokeStyle,g=t.lineWidth,E=e.pstyle("text-border-color").value,C=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+E[0]+","+E[1]+","+E[2]+","+u*a+")",t.lineWidth=v,t.setLineDash)switch(C){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=v/4,t.setLineDash([]);break;case"solid":t.setLineDash([])}x?Fwt(t,b,w,k,i,2,"stroke"):t.strokeRect(b,w,k,i),"double"===C&&(E=v/2,x?Fwt(t,b+E,w+E,k-2*E,i-2*E,2,"stroke"):t.strokeRect(b+E,w+E,k-2*E,i-2*E)),t.setLineDash&&t.setLineDash([]),t.lineWidth=g,t.strokeStyle=T}}var _=2*e.pstyle("text-outline-width").pfValue;if(0<_&&(t.lineWidth=_),"wrap"===e.pstyle("text-wrap").value){var S=_7t(n,"labelWrapCachedLines",r),A=_7t(n,"labelLineHeight",r),u=d/2;switch("auto"!==(a=this.getLabelJustification(e))&&("left"===m?"left"===a?l+=-d:"center"===a&&(l+=-u):"center"===m?"left"===a?l+=-u:"right"===a&&(l+=u):"right"===m&&("center"===a?l+=u:"right"===a&&(l+=d))),y){case"top":c-=(S.length-1)*A;break;case"center":case"bottom":c-=(S.length-1)*A}for(var L=0;L<S.length;L++)0<_&&t.strokeText(S[L],l,c),t.fillText(S[L],l,c),c+=A}else 0<_&&t.strokeText(h,l,c),t.fillText(h,l,c);0!==f&&(t.rotate(-f),t.translate(-s,-o))}}},OAt={drawNode:function(T,E,t){var O=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],e=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],C=this,s=E._private,o=s.rscratch,_=E.position();if(at(_.x)&&at(_.y)&&(!r||E.visible())){var i,l=r?E.effectiveOpacity():1,S=C.usePaths(),n=!1,r=E.padding(),A=E.width()+2*r,L=E.height()+2*r;t&&T.translate(-(i=t).x1,-i.y1);for(var a=E.pstyle("background-image").value,c=new Array(a.length),h=new Array(a.length),P=0,u=0;u<a.length;u++){var B,d=a[u];(c[u]=null!=d&&"none"!==d)&&(B=E.cy().style().getIndexedStyle(E,"background-image-crossorigin","value",u),P++,h[u]=C.getCachedImage(d,B,function(){s.backgroundTimestamp=Date.now(),E.emitAndNotify("background")}))}var p,g,f,m,y,v=E.pstyle("background-blacken").value,N=E.pstyle("border-width").pfValue,F=E.pstyle("background-opacity").value*l,x=E.pstyle("border-color").value,$=E.pstyle("border-style").value,z=E.pstyle("border-join").value,G=E.pstyle("border-cap").value,I=E.pstyle("border-position").value,U=E.pstyle("border-dash-pattern").pfValue,q=E.pstyle("border-dash-offset").pfValue,j=E.pstyle("border-opacity").value*l,R=E.pstyle("outline-width").pfValue,b=E.pstyle("outline-color").value,W=E.pstyle("outline-style").value,Y=E.pstyle("outline-opacity").value*l,M=E.pstyle("outline-offset").value,D=E.pstyle("corner-radius").value,r=("auto"!==D&&(D=E.pstyle("corner-radius").pfValue),me(function(){C.eleFillStyle(T,E,0<arguments.length&&void 0!==arguments[0]?arguments[0]:F)},"setupShapeColor")),H=me(function(){C.colorStrokeStyle(T,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:j)},"setupBorderColor"),V=me(function(){C.colorStrokeStyle(T,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:Y)},"setupOutlineColor"),X=me(function(t,e,r,i){var n,a=C.nodePathCache=C.nodePathCache||[],i=i7t("polygon"===r?r+","+i.join(","):r,""+e,""+t,""+D),e=!1;return null!=(r=a[i])?(e=!0,o.pathCache=n=r):(n=new Path2D,a[i]=o.pathCache=n),{path:n,cacheHit:e}},"getPath"),w=E.pstyle("shape").strValue,k=E.pstyle("shape-polygon-points").pfValue,k=(S&&(T.translate(_.x,_.y),w=X(A,L,w,k),p=w.path,n=w.cacheHit),me(function(){var t;n||(t=S?{x:0,y:0}:_,C.nodeShapes[C.getNodeShape(E)].draw(p||T,t.x,t.y,A,L,D,o)),S?T.fill(p):T.fill()},"drawShape")),w=me(function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=s.backgrounding,i=0,n=0;n<h.length;n++){var a=E.cy().style().getIndexedStyle(E,"background-image-containment","value",n);e&&"over"===a||!e&&"inside"===a?i++:c[n]&&h[n].complete&&!h[n].error&&(i++,C.drawInscribedImage(T,h[n],E,n,t))}s.backgrounding=i!==P,r!==s.backgrounding&&E.updateStyle(!1)},"drawImages"),K=me(function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;C.hasPie(E)&&(C.drawPie(T,E,e),t)&&(S||C.nodeShapes[C.getNodeShape(E)].draw(T,_.x,_.y,A,L,D,o))},"drawPie"),Z=me(function(){var t=0<v?0:255;0!==v&&(C.colorFillStyle(T,t,t,t,(0<v?v:-v)*(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l)),S?T.fill(p):T.fill())},"darken"),Q=me(function(){if(0<N){if(T.lineWidth=N,T.lineCap=G,T.lineJoin=z,T.setLineDash)switch($){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash(U),T.lineDashOffset=q;break;case"solid":case"double":T.setLineDash([])}var t;"center"!==I?(T.save(),T.lineWidth*=2,"inside"===I?S?T.clip(p):T.clip():((t=new Path2D).rect(-A/2-N,-L/2-N,A+2*N,L+2*N),t.addPath(p),T.clip(t,"evenodd")),S?T.stroke(p):T.stroke(),T.restore()):S?T.stroke(p):T.stroke(),"double"===$&&(T.lineWidth=N/3,t=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",S?T.stroke(p):T.stroke(),T.globalCompositeOperation=t),T.setLineDash&&T.setLineDash([])}},"drawBorder"),J=me(function(){if(0<R){if(T.lineWidth=R,T.lineCap="butt",T.setLineDash)switch(W){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash([4,2]);break;case"solid":case"double":T.setLineDash([])}var t,e=_,r=(S&&(e={x:0,y:0}),C.getNodeShape(E)),i="inside"===I?0:N,n=("outside"===I&&(i*=2),(A+i+(R+M))/A),a=(L+i+(R+M))/L,s=A*n,o=L*a,l=C.nodeShapes[r].points;if(S&&(t=X(s,o,r,l).path),"ellipse"===r)C.drawEllipsePath(t||T,e.x,e.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+M+R):"round-heptagon"===r?(c=1.075*(i+M+R),u=-(i/2+M+R)/35):"round-hexagon"===r?c=1.12*(i+M+R):"round-pentagon"===r?(c=1.13*(i+M+R),u=-(i/2+M+R)/15):"round-tag"===r?(c=1.12*(i+M+R),h=.07*(i/2+R+M)):"round-triangle"===r&&(c=(i+M+R)*(Math.PI/2),u=-(i+M/2+R)/Math.PI),0!==c&&(s=A*(n=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(o=L*(a=(L+c)/L)));for(var d=s/2,p=o/2,g=(D="auto"===D?G8t(s,o):D)+(i+R+M)/2,f=new Array(l.length/2),m=new Array(l.length/2),y=0;y<l.length/2;y++)f[y]={x:e.x+h+d*l[2*y],y:e.y+u+p*l[2*y+1]};for(var v,x,b=f.length,w=f[b-1],k=0;k<b;k++)v=f[k%b],x=f[(k+1)%b],m[k]=Nwt(w,v,x,g),w=v;C.drawRoundPolygonPath(t||T,e.x+h,e.y+u,A*n,L*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(D="auto"===D?z8t(s,o):D,C.drawRoundRectanglePath(t||T,e.x,e.y,s,o,D+(i+R+M)/2)):["cutrectangle","cut-rectangle"].includes(r)?(D="auto"===D?U8t():D,C.drawCutRectanglePath(t||T,e.x,e.y,s,o,null,D+(i+R+M)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(D="auto"===D?z8t(s,o):D,C.drawBottomRoundRectanglePath(t||T,e.x,e.y,s,o,D+(i+R+M)/2)):"barrel"===r?C.drawBarrelPath(t||T,e.x,e.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?S8t(A8t(l,(i+R+M)/A)):S8t(A8t(l,-(i+R+M)/A)),C.drawPolygonPath(t||T,e.x,e.y,A,L,l));S?T.stroke(t):T.stroke(),"double"===W&&(T.lineWidth=i/3,c=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",S?T.stroke(t):T.stroke(),T.globalCompositeOperation=c),T.setLineDash&&T.setLineDash([])}},"drawOutline"),tt=me(function(){e&&C.drawNodeOverlay(T,E,_,A,L)},"drawOverlay"),et=me(function(){e&&C.drawNodeUnderlay(T,E,_,A,L)},"drawUnderlay"),rt=me(function(){C.drawElementText(T,E,null,O)},"drawText");"yes"===E.pstyle("ghost").value&&(g=E.pstyle("ghost-offset-x").pfValue,f=E.pstyle("ghost-offset-y").pfValue,y=(m=E.pstyle("ghost-opacity").value)*l,T.translate(g,f),V(),J(),r(m*F),k(),w(y,!0),H(m*j),Q(),K(0!==v||0!==N),w(y,!1),Z(y),T.translate(-g,-f)),S&&T.translate(-_.x,-_.y),et(),S&&T.translate(_.x,_.y),V(),J(),r(),k(),w(l,!0),H(),Q(),K(0!==v||0!==N),w(l,!1),Z(),S&&T.translate(-_.x,-_.y),rt(),tt(),t&&T.translate(i.x1,i.y1)}}},Q=me(function(u){if(["overlay","underlay"].includes(u))return function(t,e,r,i,n){var a,s,o,l,c,h;e.visible()&&(a=e.pstyle("".concat(u,"-padding")).pfValue,s=e.pstyle("".concat(u,"-opacity")).value,o=e.pstyle("".concat(u,"-color")).value,l=e.pstyle("".concat(u,"-shape")).value,c=e.pstyle("".concat(u,"-corner-radius")).value,0<s)&&(r=r||e.position(),null!=i&&null!=n||(h=e.padding(),i=e.width()+2*h,n=e.height()+2*h),this.colorFillStyle(t,o[0],o[1],o[2],s),this.nodeShapes[l].draw(t,r.x,r.y,i+2*a,n+2*a,c),t.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),OAt.drawNodeOverlay=Q("overlay"),OAt.drawNodeUnderlay=Q("underlay"),OAt.hasPie=function(t){return(t=t[0])._private.hasPie},OAt.drawPie=function(t,e,r,i){e=e[0],i=i||e.position();var n=e.cy().style(),a=e.pstyle("pie-size"),s=i.x,o=i.y,i=e.width(),l=e.height(),c=Math.min(i,l)/2,h=0;this.usePaths()&&(o=s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var u=1;u<=n.pieBackgroundN;u++){var d=e.pstyle("pie-"+u+"-background-size").value,p=e.pstyle("pie-"+u+"-background-color").value,g=e.pstyle("pie-"+u+"-background-opacity").value*r,f=d/100,m=(1<f+h&&(f=1-h),1.5*Math.PI+2*Math.PI*h),y=m+2*Math.PI*f;0===d||1<=h||1<h+f||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,c,m,y),t.closePath(),this.colorFillStyle(t,p[0],p[1],p[2],g),t.fill(),h+=f)}},PAt={getPixelRatio:function(){var t,e=this.data.contexts[0];return null!=this.forcedPixelRatio?this.forcedPixelRatio:(t=this.cy.window(),e=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,(t.devicePixelRatio||1)/e)},paintCache:function(t){for(var e,r=this.paintCaches=this.paintCaches||[],i=!0,n=0;n<r.length;n++)if((e=r[n]).context===t){i=!1;break}return i&&r.push(e={context:t}),e},createGradientStyleFor:function(t,e,r,i,n){var a=this.usePaths(),s=r.pstyle(e+"-gradient-stop-colors").value,o=r.pstyle(e+"-gradient-stop-positions").pfValue;if("radial-gradient"===i)i=r.isEdge()?(e=r.sourceEndpoint(),i=r.targetEndpoint(),l=r.midpoint(),e=Z7t(e,l),Z7t(i,l)):(l=a?{x:0,y:0}:r.position(),e=r.paddedWidth(),r.paddedHeight()),c=t.createRadialGradient(l.x,l.y,0,l.x,l.y,Math.max(e,i));else if(r.isEdge())var l=r.sourceEndpoint(),e=r.targetEndpoint(),c=t.createLinearGradient(l.x,l.y,e.x,e.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=t.createLinearGradient(h.x,h.y-d,h.x,h.y+d);break;case"to-top":c=t.createLinearGradient(h.x,h.y+d,h.x,h.y-d);break;case"to-left":c=t.createLinearGradient(h.x+u,h.y,h.x-u,h.y);break;case"to-right":c=t.createLinearGradient(h.x-u,h.y,h.x+u,h.y);break;case"to-bottom-right":case"to-right-bottom":c=t.createLinearGradient(h.x-u,h.y-d,h.x+u,h.y+d);break;case"to-top-right":case"to-right-top":c=t.createLinearGradient(h.x-u,h.y+d,h.x+u,h.y-d);break;case"to-bottom-left":case"to-left-bottom":c=t.createLinearGradient(h.x+u,h.y-d,h.x-u,h.y+d);break;case"to-top-left":case"to-left-top":c=t.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(t,e,r,i){if(!(e=this.createGradientStyleFor(t,"background",e,r,i)))return null;t.fillStyle=e},colorFillStyle:function(t,e,r,i,n){t.fillStyle="rgba("+e+","+r+","+i+","+n+")"},eleFillStyle:function(t,e,r){var i=e.pstyle("background-fill").value;"linear-gradient"===i||"radial-gradient"===i?this.gradientFillStyle(t,e,i,r):(i=e.pstyle("background-color").value,this.colorFillStyle(t,i[0],i[1],i[2],r))},gradientStrokeStyle:function(t,e,r,i){if(!(e=this.createGradientStyleFor(t,"line",e,r,i)))return null;t.strokeStyle=e},colorStrokeStyle:function(t,e,r,i,n){t.strokeStyle="rgba("+e+","+r+","+i+","+n+")"},eleStrokeStyle:function(t,e,r){var i=e.pstyle("line-fill").value;"linear-gradient"===i||"radial-gradient"===i?this.gradientStrokeStyle(t,e,i,r):(i=e.pstyle("line-color").value,this.colorStrokeStyle(t,i[0],i[1],i[2],r))},matchCanvasSize:function(t){var e,r=this,i=r.data,n=(s=r.findContainerClientCoords())[2],a=s[3],s=r.getPixelRatio(),o=r.motionBlurPxRatio,l=n*(s=t!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]&&t!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]?s:o),c=a*s;if(l!==r.canvasWidth||c!==r.canvasHeight){r.fontCaches=null,(t=i.canvasContainer).style.width=n+"px",t.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(e=i.canvases[h]).width=l,e.height=c,e.style.width=n+"px",e.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(e=i.bufferCanvases[h]).width=l,e.height=c,e.style.width=n+"px",e.style.height=a+"px";s<=(r.textureMult=1)&&(e=i.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,e.width=l*r.textureMult,e.height=c*r.textureMult),r.canvasWidth=l,r.canvasHeight=c,r.pixelRatio=s}},renderTo:function(t,e,r,i){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:i})},clearCanvas:function(){var e=this,t=e.data;function r(t){t.clearRect(0,0,e.canvasWidth,e.canvasHeight)}me(r,"clear"),r(t.contexts[e.NODE]),r(t.contexts[e.DRAG])},render:function(t){var s=this,e=(t=t||w7t(),s.cy),o=t.forcedContext,l=t.drawAllLayers,r=t.drawOnlyNodeLayer,c=t.forcedZoom,h=t.forcedPan,i=void 0===t.forcedPxRatio?this.getPixelRatio():t.forcedPxRatio,u=s.data,n=u.canvasNeedsRedraw,a=s.textureOnViewport&&!o&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),d=(void 0!==t.motionBlur?t:s).motionBlur,p=s.motionBlurPxRatio,g=e.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),e.style()),v=e.zoom(),x=void 0!==c?c:v,b=e.pan(),w={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},T=(void 0===(T=s.prevViewport)||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=i,(w=h||w).x*=i,w.y*=i,s.getCachedZSortedEles());function E(t,e,r,i,n){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,s.motionBlurTransparency),t.fillRect(e,r,i,n),t.globalCompositeOperation=a}function C(t,e){var r,i,n,a=s.clearingMotionBlur||t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,i=x,n=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},i=v*p,n=s.canvasWidth*p,s.canvasHeight*p);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?E(t,0,0,n,a):o||void 0!==e&&!e||t.clearRect(0,0,n,a),l||(t.translate(r.x,r.y),t.scale(i,i)),h&&t.translate(h.x,h.y),c&&t.scale(c,c)}me(E,"mbclear"),me(C,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=e.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}),(k=s.textureCache.viewport={zoom:e.zoom(),pan:e.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),n[s.DRAG]=!1,n[s.NODE]=!1,_=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,_.setTransform(1,0,0,1,0,0),d?E(_,0,0,k.width,k.height):_.clearRect(0,0,k.width,k.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(_,f[0],f[1],f[2],m),_.fillRect(0,0,k.width,k.height),v=e.zoom(),C(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i),_.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i)):s.textureOnViewport&&!o&&(s.textureCache=null);var _,S,f=e.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])&&(S=d&&!m[s.NODE]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.nondrag,i,f):s.drawLayeredElements(_,T.nondrag,i,f),s.debug&&s.drawDebugPoints(_,T.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(S=d&&!m[s.DRAG]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.drag,i,f):s.drawCachedElements(_,T.drag,i,f),s.debug&&s.drawDebugPoints(_,T.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(t,C),d&&1!==p&&(r=u.contexts[s.NODE],S=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],i=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=me(function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!y?t.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(t,0,0,s.canvasWidth,s.canvasHeight),r=p,t.drawImage(e,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(n[s.NODE]||m[s.NODE])&&(f(r,S,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=k,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||e.emit("render")},drawSelectionRectangle:function(t,e){var r,i=this,n=i.cy,a=i.data,n=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=a.canvasNeedsRedraw;(i.showFps||!s&&l[i.SELECT_BOX]&&!o)&&(e(s=t.forcedContext||a.contexts[i.SELECT_BOX]),1==i.selection[4]&&(i.hoverData.selecting||i.touchData.selecting)&&(r=i.cy.zoom(),e=n.core("selection-box-border-width").value/r,s.lineWidth=e,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<e)&&(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(),t=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(t.x,t.y,n.core("active-bg-size").pfValue/r,0,2*Math.PI),s.fill()),e=i.lastRedrawTime,i.showFps&&e&&(t="1 frame = "+(e=Math.round(e))+" ms = "+(a=Math.round(1e3/e))+" 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",BAt||(n=s.measureText(t),BAt=n.actualBoundingBoxAscent),s.fillText(t,0,BAt),s.strokeRect(0,BAt+10,250,20),s.fillRect(0,BAt+10,250*Math.min(a/60,1),20)),o||(l[i.SELECT_BOX]=!1))}},me($wt,"compileShader"),me(zwt,"createProgram"),me(Gwt,"createTextureCanvas"),me(Uwt,"getEffectivePanZoom"),me(qwt,"modelToRenderedPosition"),me(jwt,"toWebGLColor"),me(Wwt,"indexToVec4"),me(Ywt,"vec4ToIndex"),me(Hwt,"createTexture"),me(Vwt,"getTypeInfo"),me(Xwt,"createTypedArray"),me(Kwt,"createTypedArrayView"),me(Zwt,"createBufferStaticDraw"),me(Qwt,"createBufferDynamicDraw"),me(Jwt,"createPickingFrameBuffer"),FAt=typeof Float32Array<"u"?Float32Array:Array,Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),me(tkt,"create"),me(ekt,"identity"),me(rkt,"multiply"),me(ikt,"translate"),me(nkt,"rotate"),me(akt,"scale"),me(skt,"projection"),$At={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},zAt=k7t({getKey:null,drawElement:null,getBoundingBox:null,getRotation:null,getRotationPoint:null,getRotationOffset:null,isVisible:null,getPadding:null}),me(R,"Atlas"),I3t(R,[{key:"getKeys",value:me(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:me(function(t){var e=t.w,t=t.h,r=this.texHeight,i=this.maxTexWidth,n=e*(r/=t),a=t*r;return i<n&&(n=e*(r=i/e),a=t*r),{scale:r,texW:n,texH:a}},"getScale")},{key:"draw",value:me(function(t,i,n){var l=this,c=this.atlasSize,e=this.rows,h=this.texHeight,a=(r=this.getScale(i)).scale,u=r.texW,d=r.texH,p=[null,null],g=me(function(t,e){var r;n&&e&&(e=e.context,r=t.x,t=h*t.row,e.save(),e.translate(r,t),e.scale(a,a),n(e,i),e.restore())},"drawAt"),r=me(function(){g(l.freePointer,l.canvas),p[0]={x:l.freePointer.x,y:l.freePointer.row*h,w:u,h:d},p[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=me(function(){var t=l.scratch,e=l.canvas,r=(t.clear(),g({x:0,row:0},t),c-l.freePointer.x),i=u-r,n=h,a=l.freePointer.x,s=l.freePointer.row*h,o=r;e.context.drawImage(t,0,0,o,n,a,s,o,n),p[0]={x:a,y:s,w:o,h:d},a=(l.freePointer.row+1)*h,s=i,e&&e.context.drawImage(t,r,0,s,n,0,a,s,n),p[1]={x:0,y:a,w:s,h:d},l.freePointer.x=i,l.freePointer.row++},"drawWrapped"),o=me(function(){l.freePointer.x=0,l.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+u<=c)r();else{if(this.freePointer.row>=e-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p},"draw")},{key:"getOffsets",value:me(function(t){return this.keyToLocation.get(t)},"getOffsets")},{key:"isEmpty",value:me(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:me(function(t){var e=this.atlasSize,r=this.rows,t=this.getScale(t).texW;return!(this.freePointer.x+t>e)||this.freePointer.row<r-1},"canFit")},{key:"bufferIfNeeded",value:me(function(t){this.texture||(this.texture=Hwt(t,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1)},"bufferIfNeeded")},{key:"dispose",value:me(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null,this.needsBuffer=!0)},"dispose")}]),GAt=R,me(I,"AtlasCollection"),I3t(I,[{key:"getKeys",value:me(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"getIdsFor",value:me(function(t){var e=this.keyToIds.get(t);return e||(e=new Set,this.keyToIds.set(t,e)),e},"getIdsFor")},{key:"_createAtlas",value:me(function(){var t=this.r,e=this.opts;return new GAt(t,e)},"_createAtlas")},{key:"_getScratchCanvas",value:me(function(){var t,e,r,i;return this.scratch||(t=this.r,r=(e=this.opts).webglTexSize,i=Math.floor(r/e.webglTexRows),this.scratch=e.createTextureCanvas(t,r,i,"scratch")),this.scratch},"_getScratchCanvas")},{key:"draw",value:me(function(t,e,r,i){this.styleKeyNeedsRedraw.has(e)&&(this.styleKeyNeedsRedraw.delete(e),this.deleteKey(t,e),(n=this.styleKeyToAtlas.get(e))&&(n.forceGC=!0),this.styleKeyToAtlas.delete(e));var n=this.styleKeyToAtlas.get(e);return n||((n=this.atlases[this.atlases.length-1])&&n.canFit(r)||(n=this._createAtlas(),this.atlases.push(n)),n.draw(e,r,i),this.styleKeyToAtlas.set(e,n),this.getIdsFor(e).add(t),this.idToKey.set(t,e)),n},"draw")},{key:"getAtlas",value:me(function(t){return this.styleKeyToAtlas.get(t)},"getAtlas")},{key:"hasAtlas",value:me(function(t){return this.styleKeyToAtlas.has(t)},"hasAtlas")},{key:"deleteKey",value:me(function(t,e){this.idToKey.delete(t),this.getIdsFor(e).delete(t)},"deleteKey")},{key:"checkKeyIsInvalid",value:me(function(t,e){var r;return!!this.idToKey.has(t)&&(r=this.idToKey.get(t))!=e&&(this.deleteKey(t,r),!0)},"checkKeyIsInvalid")},{key:"_getKeysToCollect",value:me(function(){var t,e=new Set,r=q3t(this.styleKeyToAtlas.keys());try{for(r.s();!(t=r.n()).done;){var i=t.value;0==this.getIdsFor(i).size&&e.add(i)}}catch(t){r.e(t)}finally{r.f()}return e},"_getKeysToCollect")},{key:"gc",value:me(function(){var c=this,t=this.atlases.some(function(t){return t.forceGC}),h=this._getKeysToCollect();if(0!==h.size||t){var u,d=[],p=new Map,g=null,e=q3t(this.atlases);try{var r=me(function(){var e=u.value,t=e.getKeys(),r=okt(h,t);if(0===r.size&&!e.forceGC)return d.push(e),t.forEach(function(t){return p.set(t,e)}),"continue";g||(g=c._createAtlas(),d.push(g));var i,n=q3t(t);try{for(n.s();!(i=n.n()).done;){var a,s,o,l=i.value;r.has(l)||(s=(a=M3t(e.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g=c._createAtlas(),d.push(g)),c._copyTextureToNewAtlas(l,e,g),p.set(l,g))}}catch(t){n.e(t)}finally{n.f()}},"_loop");for(e.s();!(u=e.n()).done;)r()}catch(t){e.e(t)}finally{e.f()}this.atlases=d,this.styleKeyToAtlas=p}else console.log("nothing to garbage collect")},"gc")},{key:"_copyTextureToNewAtlas",value:me(function(t,e,r){var i,n,a,s=M3t(e.getOffsets(t),2),o=s[0];0===(s=s[1]).w?r.draw(t,o,function(t){t.drawImage(e.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h)}):((i=this._getScratchCanvas()).clear(),i.context.drawImage(e.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),i.context.drawImage(e.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(t,{w:n,h:a},function(t){t.drawImage(i,0,0,n,a,0,0,n,a)}))},"_copyTextureToNewAtlas")},{key:"getCounts",value:me(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}]),UAt=I,me(okt,"intersection"),me(D,"AtlasManager"),I3t(D,[{key:"_cacheScratchCanvas",value:me(function(t){var n=-1,a=-1,s=null,o=t.createTextureCanvas;t.createTextureCanvas=function(t,e,r,i){return i?s=s&&e==n&&r==a?s:o(t,n=e,a=r):o(t,e,r)}},"_cacheScratchCanvas")},{key:"addRenderType",value:me(function(t,e){var r=new UAt(this.r,this.globalOptions);this.renderTypes.set(t,lTt({type:t,atlasCollection:r},e))},"addRenderType")},{key:"getRenderTypes",value:me(function(){return D3t(this.renderTypes.values())},"getRenderTypes")},{key:"getRenderTypeOpts",value:me(function(t){return this.renderTypes.get(t)},"getRenderTypeOpts")},{key:"invalidate",value:me(function(t){var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,n=void 0!==i&&i,a=void 0===(i=r.filterEle)?function(){return!0}:i,s=void 0===(i=r.filterType)?function(){return!0}:i,o=!1,l=q3t(t);try{for(l.s();!(e=l.n()).done;){var c=e.value;if(a(c)){var h,u=c.id(),d=q3t(this.getRenderTypes());try{for(d.s();!(h=d.n()).done;){var p,g=h.value;s(g.type)&&(p=g.getKey(c),n?(g.atlasCollection.deleteKey(u,p),g.atlasCollection.styleKeyNeedsRedraw.add(p),o=!0):o|=g.atlasCollection.checkKeyIsInvalid(u,p))}}catch(t){d.e(t)}finally{d.f()}}}}catch(t){l.e(t)}finally{l.f()}return o},"invalidate")},{key:"gc",value:me(function(){var t,e=q3t(this.getRenderTypes());try{for(e.s();!(t=e.n()).done;)t.value.atlasCollection.gc()}catch(t){e.e(t)}finally{e.f()}},"gc")},{key:"isRenderable",value:me(function(t,e){return(e=this.getRenderTypeOpts(e))&&e.isVisible(t)},"isRenderable")},{key:"startBatch",value:me(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:me(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:me(function(){return this.batchAtlases},"getAtlases")},{key:"getOrCreateAtlas",value:me(function(e,r,t){var i=this.renderTypes.get(t),t=i.getKey(e),n=e.id();return i.atlasCollection.draw(n,t,r,function(t){i.drawElement(t,e,r,!0,!0)})},"getOrCreateAtlas")},{key:"getAtlasIndexForBatch",value:me(function(t){var e=this.batchAtlases.indexOf(t);if(e<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(t),e=this.batchAtlases.length-1}return e},"getAtlasIndexForBatch")},{key:"getIndexArray",value:me(function(){return Array.from({length:this.maxAtlases},function(t,e){return e})},"getIndexArray")},{key:"getAtlasInfo",value:me(function(t,e){var r=this.renderTypes.get(e),i=r.getBoundingBox(t),n=this.getOrCreateAtlas(t,i,e),a=this.getAtlasIndexForBatch(n);if(void 0!==a)return r=r.getKey(t),{atlasID:a,tex:a=(t=M3t(n.getOffsets(r),2))[0],tex1:a,tex2:t[1],bb:i,type:e,styleKey:r}},"getAtlasInfo")},{key:"canAddToCurrentBatch",value:me(function(t,e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||(t=(e=this.renderTypes.get(e)).getKey(t),(e=e.atlasCollection.getAtlas(t))&&this.batchAtlases.includes(e))},"canAddToCurrentBatch")},{key:"setTransformMatrix",value:me(function(t,e,r){var i,n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],a=e.bb,s=e.tex1,o=e.tex2,e=this.getRenderTypeOpts(e.type),l=e.getPadding?e.getPadding(r):0,s=s.w/(s.w+o.w),o=this.getAdjustedBB(a,l,n,n?s:1-s);ekt(t),s=0!==(a=e.getRotation?e.getRotation(r):0)?(ikt(t,t,[(l=e.getRotationPoint(r)).x,l.y]),nkt(t,t,a),i=(n=e.getRotationOffset(r)).x+o.xOffset,n.y):(i=o.x1,o.y1),ikt(t,t,[i,s]),akt(t,t,[o.w,o.h])},"setTransformMatrix")},{key:"getTransformMatrix",value:me(function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],i=tkt();return this.setTransformMatrix(i,t,e,r),i},"getTransformMatrix")},{key:"getAdjustedBB",value:me(function(t,e,r,i){var n=t.x1,a=t.y1,s=t.w,t=t.h,e=(e&&(n-=e,a-=e,s+=2*e,t+=2*e),0),o=s*i;return r&&i<1?s=o:!r&&i<1&&(n+=e=s-o,s=o),{x1:n,y1:a,w:s,h:t,xOffset:e}},"getAdjustedBB")},{key:"getDebugInfo",value:me(function(){var t,e=[],r=q3t(this.renderTypes);try{for(r.s();!(t=r.n()).done;){var i=M3t(t.value,2),n=i[0],a=i[1].atlasCollection.getCounts(),s=a.keyCount;e.push({type:n,keyCount:s,atlasCount:a.atlasCount})}}catch(t){r.e(t)}finally{r.f()}return e},"getDebugInfo")}]),qAt=D,me(M,"ElementDrawingWebGL"),I3t(M,[{key:"addTextureRenderType",value:me(function(t,e){this.atlasManager.addRenderType(t,e)},"addTextureRenderType")},{key:"invalidate",value:me(function(t){var e=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return e?r.invalidate(t,{filterType:me(function(t){return t===e},"filterType"),forceRedraw:!0}):r.invalidate(t)},"invalidate")},{key:"gc",value:me(function(){this.atlasManager.gc()},"gc")},{key:"createShaderProgram",value:me(function(t){var e=this.gl,r=`#version 300 es
precision highp float;
uniform mat3 uPanZoomMatrix;
uniform int uAtlasSize;
// instanced
in vec2 aPosition;
// what are we rendering?
in int aVertType;
// for picking
in vec4 aIndex;
// For textures
in int aAtlasId; // which shader unit/atlas to use
in vec4 aTex1; // x/y/w/h of texture in atlas
in vec4 aTex2;
// for any transforms that are needed
in vec4 aScaleRotate1; // vectors use fewer attributes than matrices
in vec2 aTranslate1;
in vec4 aScaleRotate2;
in vec2 aTranslate2;
// for edges
in vec4 aPointAPointB;
in vec4 aPointCPointD;
in float aLineWidth;
in vec4 aEdgeColor;
out vec2 vTexCoord;
out vec4 vEdgeColor;
flat out int vAtlasId;
flat out vec4 vIndex;
flat out int vVertType;
void main(void) {
int vid = gl_VertexID;
vec2 position = aPosition;
if(aVertType == `.concat(0,`) {
float texX;
float texY;
float texW;
float texH;
mat3 texMatrix;
int vid = gl_VertexID;
if(vid <= 5) {
texX = aTex1.x;
texY = aTex1.y;
texW = aTex1.z;
texH = aTex1.w;
texMatrix = mat3(
vec3(aScaleRotate1.xy, 0.0),
vec3(aScaleRotate2.zw, 0.0),
vec3(aTranslate1, 1.0)
);
} else {
texX = aTex2.x;
texY = aTex2.y;
texW = aTex2.z;
texH = aTex2.w;
texMatrix = mat3(
vec3(aScaleRotate2.xy, 0.0),
vec3(aScaleRotate2.zw, 0.0),
vec3(aTranslate2, 1.0)
);
}
if(vid == 1 || vid == 2 || vid == 4 || vid == 7 || vid == 8 || vid == 10) {
texX += texW;
}
if(vid == 2 || vid == 4 || vid == 5 || vid == 8 || vid == 10 || vid == 11) {
texY += texH;
}
float d = float(uAtlasSize);
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
gl_Position = vec4(uPanZoomMatrix * texMatrix * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(1,` && vid < 6) {
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;
vec2 xBasis = target - source;
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y;
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
vEdgeColor = aEdgeColor;
}
else if(aVertType == `).concat(2,` && vid < 6) {
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 = pointA;
vec2 p1 = pointB;
vec2 p2 = pointC;
vec2 pos = position;
if(position.x == 1.0) {
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;
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);
}
vEdgeColor = aEdgeColor;
}
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);
mat3 transform = mat3(
vec3(aScaleRotate1.xy, 0.0),
vec3(aScaleRotate1.zw, 0.0),
vec3(aTranslate1, 1.0)
);
gl_Position = vec4(uPanZoomMatrix * transform * vec3(position, 1.0), 1.0);
vEdgeColor = aEdgeColor;
} else {
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
}
vAtlasId = aAtlasId;
vIndex = aIndex;
vVertType = aVertType;
}
`),i=this.atlasManager.getIndexArray(),n=zwt(e,r,`#version 300 es
precision highp float;
// define texture unit for each node in the batch
`.concat(i.map(function(t){return"uniform sampler2D uTexture".concat(t,";")}).join(`
`),`
uniform vec4 uBGColor;
in vec2 vTexCoord;
in vec4 vEdgeColor;
flat in int vAtlasId;
flat in vec4 vIndex;
flat in int vVertType;
out vec4 outColor;
void main(void) {
if(vVertType == `).concat(0,`) {
`).concat(i.map(function(t){return"if(vAtlasId == ".concat(t,") outColor = texture(uTexture").concat(t,", vTexCoord);")}).join(`
else `),`
} else if(vVertType == `).concat(3,`) {
// blend arrow color with background (using premultiplied alpha)
outColor.rgb = vEdgeColor.rgb + (uBGColor.rgb * (1.0 - vEdgeColor.a));
outColor.a = 1.0; // make opaque, masks out line under arrow
} else {
outColor = vEdgeColor;
}
`).concat(t.picking?`if(outColor.a == 0.0) discard;
else outColor = vIndex;`:"",`
}
`));n.aPosition=e.getAttribLocation(n,"aPosition"),n.aIndex=e.getAttribLocation(n,"aIndex"),n.aVertType=e.getAttribLocation(n,"aVertType"),n.aAtlasId=e.getAttribLocation(n,"aAtlasId"),n.aTex1=e.getAttribLocation(n,"aTex1"),n.aTex2=e.getAttribLocation(n,"aTex2"),n.aScaleRotate1=e.getAttribLocation(n,"aScaleRotate1"),n.aTranslate1=e.getAttribLocation(n,"aTranslate1"),n.aScaleRotate2=e.getAttribLocation(n,"aScaleRotate2"),n.aTranslate2=e.getAttribLocation(n,"aTranslate2"),n.aPointAPointB=e.getAttribLocation(n,"aPointAPointB"),n.aPointCPointD=e.getAttribLocation(n,"aPointCPointD"),n.aLineWidth=e.getAttribLocation(n,"aLineWidth"),n.aEdgeColor=e.getAttribLocation(n,"aEdgeColor"),n.uPanZoomMatrix=e.getUniformLocation(n,"uPanZoomMatrix"),n.uAtlasSize=e.getUniformLocation(n,"uAtlasSize"),n.uBGColor=e.getUniformLocation(n,"uBGColor"),n.uTextures=[];for(var a=0;a<this.atlasManager.maxAtlases;a++)n.uTextures.push(e.getUniformLocation(n,"uTexture".concat(a)));return n},"createShaderProgram")},{key:"createVAO",value:me(function(){var t=[].concat(t=[0,0,1,0,1,1,0,0,1,1,0,1],t),e=(this.vertexCount=t.length/2,this.maxInstances),r=this.gl,i=this.program,n=r.createVertexArray();return r.bindVertexArray(n),Zwt(r,"vec2",i.aPosition,t),this.indexBuffer=Qwt(r,e,"vec4",i.aIndex),this.vertTypeBuffer=Qwt(r,e,"int",i.aVertType),this.atlasIdBuffer=Qwt(r,e,"int",i.aAtlasId),this.tex1Buffer=Qwt(r,e,"vec4",i.aTex1),this.tex2Buffer=Qwt(r,e,"vec4",i.aTex2),this.scaleRotate1Buffer=Qwt(r,e,"vec4",i.aScaleRotate1),this.translate1Buffer=Qwt(r,e,"vec2",i.aTranslate1),this.scaleRotate2Buffer=Qwt(r,e,"vec4",i.aScaleRotate2),this.translate2Buffer=Qwt(r,e,"vec2",i.aTranslate2),this.pointAPointBBuffer=Qwt(r,e,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Qwt(r,e,"vec4",i.aPointCPointD),this.lineWidthBuffer=Qwt(r,e,"float",i.aLineWidth),this.edgeColorBuffer=Qwt(r,e,"vec4",i.aEdgeColor),r.bindVertexArray(null),n},"createVAO")},{key:"buffers",get:me(function(){var e=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(t){return t.endsWith("Buffer")}).map(function(t){return e[t]})),this._buffers},"get")},{key:"startFrame",value:me(function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:$At.SCREEN;this.panZoomMatrix=t,this.debugInfo=e,this.renderTarget=r,this.startBatch()},"startFrame")},{key:"startBatch",value:me(function(){this.instanceCount=0,this.atlasManager.startBatch()},"startBatch")},{key:"endFrame",value:me(function(){this.endBatch()},"endFrame")},{key:"getTempMatrix",value:me(function(){return this.tempMatrix=this.tempMatrix||tkt()},"getTempMatrix")},{key:"drawTexture",value:me(function(t,e,r){var i=this.atlasManager;if(i.isRenderable(t,r)){i.canAddToCurrentBatch(t,r)||this.endBatch();var n=this.instanceCount,a=(this.vertTypeBuffer.getView(n)[0]=0,Wwt(e,this.indexBuffer.getView(n)),i.getAtlasInfo(t,r,a)),e=a.atlasID,r=a.tex1,s=a.tex2;this.atlasIdBuffer.getView(n)[0]=e,(e=this.tex1Buffer.getView(n))[0]=r.x,e[1]=r.y,e[2]=r.w,e[3]=r.h,(e=this.tex2Buffer.getView(n))[0]=s.x,e[1]=s.y,e[2]=s.w,e[3]=s.h;for(var o=this.getTempMatrix(),l=0,c=[1,2];l<c.length;l++){var h=c[l],u=(i.setTransformMatrix(o,a,t,1===h),this["scaleRotate".concat(h,"Buffer")].getView(n));u[0]=o[0],u[1]=o[1],u[2]=o[3],u[3]=o[4],(u=this["translate".concat(h,"Buffer")].getView(n))[0]=o[6],u[1]=o[7]}this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:me(function(t,e,r){var i,n,a,s,o=t._private.rscratch,o="source"===r?(n=o.arrowStartX,a=o.arrowStartY,o.srcArrowAngle):(n=o.arrowEndX,a=o.arrowEndY,o.tgtArrowAngle);isNaN(n)||null==n||isNaN(a)||null==a||isNaN(o)||null==o||"none"!==t.pstyle(r+"-arrow-shape").value&&(r=t.pstyle(r+"-arrow-color").value,i=t.pstyle("opacity").value*t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,t=t.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,t),ekt(t=this.getTempMatrix()),ikt(t,t,[n,a]),akt(t,t,[s,s]),nkt(t,t,o),n=this.instanceCount,this.vertTypeBuffer.getView(n)[0]=3,Wwt(e,this.indexBuffer.getView(n)),jwt(r,i,this.edgeColorBuffer.getView(n)),(a=this.scaleRotate1Buffer.getView(n))[0]=t[0],a[1]=t[1],a[2]=t[3],a[3]=t[4],(s=this.translate1Buffer.getView(n))[0]=t[6],s[1]=t[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:me(function(t,e){var r=t.pstyle("opacity").value,i=t.pstyle("line-opacity").value,n=t.pstyle("width").pfValue,a=t.pstyle("line-color").value,s=r*i,o=this.getEdgePoints(t);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,Wwt(e,this.indexBuffer.getView(r)),jwt(a,s,this.edgeColorBuffer.getView(r)),this.lineWidthBuffer.getView(r)[0]=n,(i=this.pointAPointBBuffer.getView(r))[0]=o[0],i[1]=o[1],i[2]=o[2],i[3]=o[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l<o.length-2;l+=2){var c=this.instanceCount,h=(this.vertTypeBuffer.getView(c)[0]=2,Wwt(e,this.indexBuffer.getView(c)),jwt(a,s,this.edgeColorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=n,o[l-2]),u=o[l-1],d=o[l],p=o[l+1],g=o[l+2],f=o[l+3],m=o[l+4],y=o[l+5],v=(0==l&&(h=2*d-g+.001,u=2*p-f+.001),l==o.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:"getEdgePoints",value:me(function(t){var e=t._private.rscratch.allpts;return 4==e.length?e:(t=this.getNumSegments(t),this.getCurveSegmentPoints(e,t))},"getEdgePoints")},{key:"getNumSegments",value:me(function(t){return Math.min(Math.max(15,5),this.maxInstances)},"getNumSegments")},{key:"getCurveSegmentPoints",value:me(function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),i=0;i<=e;i++)0==i?(r[0]=t[0],r[1]=t[1]):i==e?(r[2*i]=t[t.length-2],r[2*i+1]=t[t.length-1]):this.setCurvePoint(t,i/e,r,2*i);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:me(function(t,e,r,i){if(!(t.length<=2)){for(var n=Array(t.length-2),a=0;a<n.length;a+=2){var s=(1-e)*t[a]+e*t[a+2],o=(1-e)*t[a+1]+e*t[a+3];n[a]=s,n[a+1]=o}return this.setCurvePoint(n,e,r,i)}r[i]=t[0],r[i+1]=t[1]},"setCurvePoint")},{key:"endBatch",value:me(function(){var t=this.gl,e=this.vao,r=this.vertexCount,i=this.instanceCount;if(0!==i){var n,a=this.renderTarget.picking?this.pickingProgram:this.program,s=(t.useProgram(a),t.bindVertexArray(e),q3t(this.buffers));try{for(s.s();!(n=s.n()).done;)n.value.bufferSubData(i)}catch(t){s.e(t)}finally{s.f()}for(var o=this.atlasManager.getAtlases(),l=0;l<o.length;l++)o[l].bufferIfNeeded(t);for(var c=0;c<o.length;c++)t.activeTexture(t.TEXTURE0+c),t.bindTexture(t.TEXTURE_2D,o[c].texture),t.uniform1i(a.uTextures[c],c);t.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),t.uniform1i(a.uAtlasSize,this.atlasManager.atlasSize),e=jwt(this.bgColor,1),t.uniform4fv(a.uBGColor,e),t.drawArraysInstanced(t.TRIANGLES,0,r,i),t.bindVertexArray(null),t.bindTexture(t.TEXTURE_2D,null),this.debugInfo&&this.debugInfo.push({count:i,atlasCount:o.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:me(function(){return this.debugInfo},"getDebugInfo")},{key:"getAtlasDebugInfo",value:me(function(){return this.atlasManager.getDebugInfo()},"getAtlasDebugInfo")}]),jAt=M,me(lkt,"fillStyle"),me(O,"OverlayUnderlayRenderer"),I3t(O,[{key:"getStyleKey",value:me(function(t,e){var r,i=(t=this.getStyle(t,e)).shape,n=t.opacity,t=t.color;return i?(r=e.width(),e=e.height(),t=lkt(t,n),r7t("".concat(i,"-").concat(r,"-").concat(e,"-").concat(t))):null},"getStyleKey")},{key:"isVisible",value:me(function(t,e){return 0<e.pstyle("".concat(t,"-opacity")).value},"isVisible")},{key:"getStyle",value:me(function(t,e){return{opacity:e.pstyle("".concat(t,"-opacity")).value,color:e.pstyle("".concat(t,"-color")).value,shape:e.pstyle("".concat(t,"-shape")).value}},"getStyle")},{key:"getPadding",value:me(function(t,e){return e.pstyle("".concat(t,"-padding")).pfValue},"getPadding")},{key:"draw",value:me(function(t,e,r,i){var n,a,s,o,l;this.isVisible(t,r)&&(n=this.r,s=(a=i.w)/2,o=(i=i.h)/2,r=(t=this.getStyle(t,r)).shape,l=t.color,t=t.opacity,e.save(),e.fillStyle=lkt(l,t),"round-rectangle"===r||"roundrectangle"===r?n.drawRoundRectanglePath(e,s,o,a,i,"auto"):"ellipse"===r&&n.drawEllipsePath(e,s,o,a,i),e.fill(),e.restore())},"draw")}]),WAt=O,me(ckt,"getBGColor"),YAt={initWebgl:function(t,e){var i=this,r=i.data.contexts[i.WEBGL],n=t.cy.container(),n=(t.bgColor=ckt(n),t.webglTexSize=Math.min(t.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),i.webglDebug=t.webglDebug,i.webglDebugShowAtlases=t.webglDebugShowAtlases,console.log("max texture units",r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),console.log("max texture size",r.getParameter(r.MAX_TEXTURE_SIZE)),console.log("webgl options",t),i.pickingFrameBuffer=Jwt(r),i.pickingFrameBuffer.needsDraw=!0,me(function(t){return i.getTextAngle(t,null)},"getLabelRotation")),a=me(function(t){return(t=t.pstyle("label"))&&t.value},"isLabelVisible"),s=(i.eleDrawing=new jAt(i,r,t),new WAt(i)),o=(i.eleDrawing.addTextureRenderType("node-body",zAt({getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement,isVisible:me(function(t){return t.visible()},"isVisible")})),i.eleDrawing.addTextureRenderType("node-label",zAt({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:n,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a})),i.eleDrawing.addTextureRenderType("node-overlay",zAt({getBoundingBox:e.getElementBox,getKey:me(function(t){return s.getStyleKey("overlay",t)},"getKey"),drawElement:me(function(t,e,r){return s.draw("overlay",t,e,r)},"drawElement"),isVisible:me(function(t){return s.isVisible("overlay",t)},"isVisible"),getPadding:me(function(t){return s.getPadding("overlay",t)},"getPadding")})),i.eleDrawing.addTextureRenderType("node-underlay",zAt({getBoundingBox:e.getElementBox,getKey:me(function(t){return s.getStyleKey("underlay",t)},"getKey"),drawElement:me(function(t,e,r){return s.draw("underlay",t,e,r)},"drawElement"),isVisible:me(function(t){return s.isVisible("underlay",t)},"isVisible"),getPadding:me(function(t){return s.getPadding("underlay",t)},"getPadding")})),i.eleDrawing.addTextureRenderType("edge-label",zAt({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:n,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a})),qTt(function(){console.log("garbage collect flag set"),i.data.gc=!0},1e4));i.onUpdateEleCalcs(function(t,e){var r=!1;e&&0<e.length&&(r|=i.eleDrawing.invalidate(e)),r&&o()}),hkt(i)}},me(hkt,"overrideCanvasRendererFunctions"),me(ukt,"clearWebgl"),me(dkt,"clearCanvas"),me(pkt,"createPanZoomMatrix"),me(gkt,"setContextTransform"),me(fkt,"drawSelectionRectangle"),me(mkt,"drawAxes"),me(ykt,"drawAtlases"),me(vkt,"getPickingIndexes"),me(xkt,"findNearestElementsWebgl"),me(bkt,"renderWebgl"),HAt={drawPolygonPath:function(t,e,r,i,n,a){var s=i/2,o=n/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+o*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+s*a[2*l],r+o*a[2*l+1]);t.closePath()},drawRoundPolygonPath:function(e,t,r,i,n,a,s){s.forEach(function(t){return Lwt(e,t)}),e.closePath()},drawRoundRectanglePath:function(t,e,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?z8t(i,n):Math.min(a,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.arcTo(e+s,r-o,e+s,r,i),t.arcTo(e+s,r+o,e,r+o,i),t.arcTo(e-s,r+o,e-s,r,i),t.arcTo(e-s,r-o,e,r-o,i),t.lineTo(e,r-o),t.closePath()},drawBottomRoundRectanglePath:function(t,e,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?z8t(i,n):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.lineTo(e+s,r-o),t.lineTo(e+s,r),t.arcTo(e+s,r+o,e,r+o,i),t.arcTo(e-s,r+o,e-s,r,i),t.lineTo(e-s,r-o),t.lineTo(e,r-o),t.closePath()},drawCutRectanglePath:function(t,e,r,i,n,a,s){i/=2,n/=2,s="auto"===s?U8t():s,t.beginPath&&t.beginPath(),t.moveTo(e-i+s,r-n),t.lineTo(e+i-s,r-n),t.lineTo(e+i,r-n+s),t.lineTo(e+i,r+n-s),t.lineTo(e+i-s,r+n),t.lineTo(e-i+s,r+n),t.lineTo(e-i,r+n-s),t.lineTo(e-i,r-n+s),t.closePath()},drawBarrelPath:function(t,e,r,i,n){var a=e-(s=i/2),e=e+s,s=r-(o=n/2),r=r+o,i=(o=j8t(i,n)).widthOffset,n=o.heightOffset,o=o.ctrlPtOffsetPct*i;t.beginPath&&t.beginPath(),t.moveTo(a,s+n),t.lineTo(a,r-n),t.quadraticCurveTo(a+o,r,a+i,r),t.lineTo(e-i,r),t.quadraticCurveTo(e-o,r,e,r-n),t.lineTo(e,s+n),t.quadraticCurveTo(e-o,s,e-i,s),t.lineTo(a+i,s),t.quadraticCurveTo(a+o,s,a,s+n),t.closePath()}},VAt=Math.sin(0),XAt=Math.cos(0),KAt={},ZAt={},QAt=Math.PI/40,JAt=0*Math.PI;JAt<2*Math.PI;JAt+=QAt)KAt[JAt]=Math.sin(JAt),ZAt[JAt]=Math.cos(JAt);HAt.drawEllipsePath=function(t,e,r,i,n){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,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+=QAt)a=e-o*KAt[c]*VAt+o*ZAt[c]*XAt,s=r+l*ZAt[c]*VAt+l*KAt[c]*XAt,0===c?t.moveTo(a,s):t.lineTo(a,s);t.closePath()},t9t={createBuffer:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]},bufferCanvasImage:function(t){var e=this.cy,r=e.mutableElements().boundingBox(),i=this.findContainerClientCoords(),n=t.full?Math.ceil(r.w):i[2],i=t.full?Math.ceil(r.h):i[3],a=at(t.maxWidth)||at(t.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==t.scale?(n*=t.scale,i*=t.scale,o=t.scale):a&&(c=l=1/0,at(t.maxWidth)&&(l=o*t.maxWidth/n),at(t.maxHeight)&&(c=o*t.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(),t.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=e.pan()).x*o,y:s.y*o},o*=e.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)),t.bg)&&(c.globalCompositeOperation="destination-over",c.fillStyle=t.bg,c.rect(0,0,n,i),c.fill()),l}},me(wkt,"b64ToBlob"),me(kkt,"b64UriToB64"),me(Tkt,"output"),t9t.png=function(t){return Tkt(t,this.bufferCanvasImage(t),"image/png")},t9t.jpg=function(t){return Tkt(t,this.bufferCanvasImage(t),"image/jpeg")},e9t={nodeShapeImpl:function(t,e,r,i,n,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,i,n,a);case"polygon":return this.drawPolygonPath(e,r,i,n,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,i,n,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,i,n,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,i,n,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,i,n,a,o);case"barrel":return this.drawBarrelPath(e,r,i,n,a)}}},(i9t=(r9t=Ekt).prototype).CANVAS_LAYERS=3,i9t.SELECT_BOX=0,i9t.DRAG=1,i9t.NODE=2,i9t.WEBGL=3,i9t.CANVAS_TYPES=["2d","2d","2d","webgl2"],i9t.BUFFER_COUNT=3,i9t.TEXTURE_BUFFER=0,i9t.MOTIONBLUR_BUFFER_NODE=1,i9t.MOTIONBLUR_BUFFER_DRAG=2,me(Ekt,"CanvasRenderer"),i9t.redrawHint=function(t,e){switch(t){case"eles":this.data.canvasNeedsRedraw[i9t.NODE]=e;break;case"drag":this.data.canvasNeedsRedraw[i9t.DRAG]=e;break;case"select":this.data.canvasNeedsRedraw[i9t.SELECT_BOX]=e;break;case"gc":this.data.gc=!0}},n9t=typeof Path2D<"u",i9t.path2dEnabled=function(t){if(void 0===t)return this.pathsEnabled;this.pathsEnabled=!!t},i9t.usePaths=function(){return n9t&&this.pathsEnabled},i9t.setImgSmoothing=function(t,e){null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},i9t.getImgSmoothing=function(t){return null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},i9t.makeOffscreenCanvas=function(t,e){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":A3t(OffscreenCanvas))?r=new OffscreenCanvas(t,e):((r=this.cy.window().document.createElement("canvas")).width=t,r.height=e),r},[kAt,EAt,IAt,MAt,DAt,OAt,PAt,YAt,HAt,t9t,e9t].forEach(function(t){lTt(i9t,t)}),a9t=[{type:"layout",extensions:GSt},{type:"renderer",extensions:[{name:"null",impl:Awt},{name:"base",impl:pAt},{name:"canvas",impl:r9t}]}],s9t={},o9t={},me(Ckt,"setExtension"),me(_kt,"getExtension"),me(Skt,"setModule"),me(Akt,"getModule"),l9t=me(function(){return 2===arguments.length?_kt.apply(null,arguments):3===arguments.length?Ckt.apply(null,arguments):4===arguments.length?Akt.apply(null,arguments):5===arguments.length?Skt.apply(null,arguments):void p7t("Invalid extension access syntax")},"extension"),lSt.prototype.extension=l9t,a9t.forEach(function(e){e.extensions.forEach(function(t){Ckt(e.type,t.name,t.impl)})}),J=me(function t(){if(!(this instanceof t))return new t;this.length=0},"Stylesheet"),(c9t=J.prototype).instanceString=function(){return"stylesheet"},c9t.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this},c9t.css=function(t,e){var r=this.length-1;if(Pkt(t))this[r].properties.push({name:t,value:e});else if($kt(t))for(var i=t,n=Object.keys(i),a=0;a<n.length;a++){var s=n[a],o=i[s];null!=o&&null!=(s=sSt.properties[s]||sSt.properties[rTt(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},c9t.style=c9t.css,c9t.generateStyle=function(t){return t=new sSt(t),this.appendToStyle(t)},c9t.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],i=r.selector,n=r.properties;t.selector(i);for(var a=0;a<n.length;a++){var s=n[a];t.css(s.name,s.value)}}return t},(h9t=me(function(t){return $kt(t=void 0===t?{}:t)?new lSt(t):Pkt(t)?l9t.apply(l9t,arguments):void 0},"cytoscape")).use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(h9t),t.apply(null,e),this},h9t.warnings=function(t){return g7t(t)},h9t.version="3.31.0",h9t.stylesheet=h9t.Stylesheet=J}),d9t=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function i(){}me(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,t.exports=i},function(t,e,r){var i,n=r(2),a=r(8),s=r(9);function o(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(i in me(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(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),i=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=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)},t.exports=o},function(t,e,r){function i(t){this.vGraphObject=t}me(i,"LGraphObject"),t.exports=i},function(t,e,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(t,e,r,i){n.call(this,i=null==r&&null==i?e:i),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(i in me(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(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.target==e){if(t.source!=i)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.source!=i&&t.target!=i)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;r<t.length;r++)t[r].withChildren().forEach(function(t){e.add(t)});return e},h.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),r=0;r<e.length;r++)t+=e[r].getNoOfChildren();return 0==t?1:t},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 t=-o.INITIAL_WORLD_BOUNDARY,e=o.INITIAL_WORLD_BOUNDARY,e=o.WORLD_CENTER_X+l.nextDouble()*(e-t)+t,t=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-t)+t;this.rect.x=e,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var t,e;0!=this.getChild().getNodes().length&&((e=this.getChild()).updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(t=e.getRight()-e.getLeft(),e=e.getBottom()-e.getTop(),this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){function i(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,e,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(t,e,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=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(i in me(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(t,e,r){if(null==e&&null==r){var i=t;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=t,!(-1<this.getNodes().indexOf(e)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(i.source=e,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),r!=e&&r.edges.push(i),i)},u.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,i=e.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(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof l){if(null==(r=t))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,e=r.source.edges.indexOf(r),t=r.target.edges.indexOf(r);if(!(-1<e&&-1<t))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(e,1),r.target!=r.source&&r.target.edges.splice(t,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 t,e=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())<e&&(e=s),(s=o.getLeft())<r&&(r=s)}return e==d.MAX_VALUE?null:(t=null!=i[0].getParent().paddingLeft?i[0].getParent().paddingLeft:this.margin,this.left=r-t,this.top=e-t,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,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];t&&null!=h.child&&h.updateBounds(),(e=h.getLeft())<i&&(i=e),n<(e=h.getRight())&&(n=e),(e=h.getTop())<a&&(a=e),s<(e=h.getBottom())&&(s=e)}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(t){for(var e=d.MAX_VALUE,r=-d.MAX_VALUE,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=t.length,s=0;s<a;s++){var o,l=t[s];(o=l.getLeft())<e&&(e=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<i&&(i=o),n<(o=l.getBottom())&&(n=o)}return new p(e,i,r-e,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 t=0,e=this.nodes,r=e.length,i=0;i<r;i++)t+=e[i].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var e=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,i=new h,n=new Set,t=this.nodes[0];for(t.withChildren().forEach(function(t){i.push(t),n.add(t)});0!==i.length;)for(var a,s,o=(a=(t=i.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(t,this))||n.has(s)||s.withChildren().forEach(function(t){i.push(t),n.add(t)});this.isConnected=!1,n.size>=this.nodes.length&&(r=0,n.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function i(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}me(i,"LGraphManager"),i.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},i.prototype.add=function(t,e,r,i,n){if(null==r&&null==i&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1<this.graphs.indexOf(t))throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return(t.parent=e).child=t}if(n=r,r=t,t=(i=e).getOwner(),e=n.getOwner(),null==t||t.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==e||e.getGraphManager()!=this)throw"Target not in this graph mgr!";if(t==e)return r.isInterGraph=!1,t.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(t){if(t instanceof c){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,i=[],n=(i=i.concat(e.getEdges())).length,a=0;a<n;a++)r=i[a],e.remove(r);for(var s,o=[],n=(o=o.concat(e.getNodes())).length,a=0;a<n;a++)s=o[a],e.remove(s);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof h){if(null==(r=t))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 t=[],e=this.getGraphs(),r=e.length,i=0;i<r;i++)t=t.concat(e[i].getNodes());this.allNodes=t}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 t=[],e=this.getGraphs(),r=(e.length,0);r<e.length;r++)t=t.concat(e[r].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=t).parent&&(t.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,i=t.getOwner();null!=(r=i.getParent());){if(r==e)return!0;if(null==(i=r.getOwner()))break}for(i=e.getOwner();null!=(r=i.getParent());){if(r==t)return!0;if(null==(i=r.getOwner()))break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,i,n,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(e=(t=a[o]).source,r=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=r))t.lca=e.getOwner();else{for(i=e.getOwner();null==t.lca;){for(n=(t.targetInLca=r).getOwner();null==t.lca;){if(n==i){t.lca=n;break}if(n==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=n.getParent(),n=t.targetInLca.getOwner()}if(i==this.rootGraph)break;null==t.lca&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var i=e.getOwner();null!=i;){if(i==r)return i;i=i.getParent().getOwner()}r=r.getParent().getOwner()}return r},i.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var r,i=t.getNodes(),n=i.length,a=0;a<n;a++)(r=i[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},i.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,r=0;r<e;r++)if(t=this.edges[r],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=i},function(t,e,r){var i,n=r(0);function a(){}for(i in me(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,t.exports=a},function(t,e,r){var h=r(12);function i(){}me(i,"IGeometry"),i.calcSeparationAmount=function(t,e,r,i){if(!t.intersects(e))throw"assert failed";var n=new Array(2),a=(this.decideDirectionsForOverlappingNodes(t,e,n),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]<t?t=r[0]:e=r[1],r[0]=-1*n[0]*(t/2+i),r[1]=-1*n[1]*(e/2+i)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var i=t.getCenterX(),n=t.getCenterY(),a=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=i,r[1]=n,r[2]=a,r[3]=s,!0;var o=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),g=t.getHeightHalf(),f=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),x=e.getBottom(),b=e.getRight(),w=e.getWidthHalf(),k=e.getHeightHalf(),T=!1,E=!1;if(i===a){if(s<n)return r[0]=i,r[1]=l,r[2]=a,r[3]=x,!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 t=t.height/t.width,e=e.height/e.width,C=(s-n)/(a-i),_=void 0,S=void 0,A=void 0;if(-t==C?(a<i?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):t==C&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-e==C?(i<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):e==C&&(i<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<i?s<n?(_=this.getCardinalDirection(t,C,4),this.getCardinalDirection(e,C,2)):(_=this.getCardinalDirection(-t,C,3),this.getCardinalDirection(-e,C,1)):s<n?(_=this.getCardinalDirection(-t,C,1),this.getCardinalDirection(-e,C,3)):(_=this.getCardinalDirection(t,C,2),this.getCardinalDirection(e,C,4)),!T)switch(_){case 1:S=l,r[0]=i+-g/C,r[1]=S;break;case 2:S=n+p*C,r[0]=d,r[1]=S;break;case 3:S=u,r[0]=i+g/C,r[1]=S;break;case 4:S=n+-p*C,r[0]=h,r[1]=S}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},i.getCardinalDirection=function(t,e,r){return e<t?r:1+r%4},i.getIntersection=function(t,e,r,i){var n,a,s,o,l,c;return null==i?this.getIntersection2(t,e,r):(n=t.x,a=e.x,l=r.x,o=a*(t=t.y)-n*(e=e.y),c=(s=i.x)*(r=r.y)-l*(i=i.y),0==(i=(e-=t)*(t=l-s)-(l=i-r)*(s=n-a))?null:new h((s*c-t*o)/i,(l*o-e*c)/i))},i.angleOfVector=function(t,e,r,i){var n=void 0;return t!==r?(n=Math.atan((i-e)/(r-t)),r<t?n+=Math.PI:i<e&&(n+=this.TWO_PI)):n=i<e?this.ONE_AND_HALF_PI:this.HALF_PI,n},i.doIntersect=function(t,e,r,i){var n=t.x,t=t.y,a=e.x,e=e.y,s=r.x,r=r.y,o=i.x,l=(a-n)*((i=i.y)-r)-(o-s)*(e-t);return 0!=l&&(e=((t-e)*(o-n)+(a-n)*(i-t))/l,0<(a=((i-r)*(o-n)+(s-o)*(i-t))/l))&&a<1&&0<e&&e<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,t.exports=i},function(t,e,r){function i(){}me(i,"IMath"),i.sign=function(t){return 0<t?1:t<0?-1:0},i.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},i.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=i},function(t,e,r){function i(){}me(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,t.exports=i},function(t,e,r){function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(i,"defineProperties"),me(n,"_classCallCheck");var a,s,o=me(function(t){return{value:t,next:null,prev:null}},"nodeFrom"),l=me(function(t,e,r,i){return null!==t?t.next=e:i.head=e,null!==r?r.prev=e:i.tail=e,e.prev=t,e.next=r,i.length++,e},"add"),c=me(function(t,e){var r=t.prev,i=t.next;return null!==r?r.next=i:e.head=i,null!==i?i.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},"_remove");function h(t){var e=this;n(this,h),this.length=0,this.head=null,this.tail=null,t?.forEach(function(t){return e.push(t)})}me(h,"LinkedList"),a=h,s=[{key:"size",value:me(function(){return this.length},"size")},{key:"insertBefore",value:me(function(t,e){return l(e.prev,o(t),e,this)},"insertBefore")},{key:"insertAfter",value:me(function(t,e){return l(e,o(t),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:me(function(t,e){return l(e.prev,t,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:me(function(t,e){return l(e,t,e.next,this)},"insertNodeAfter")},{key:"push",value:me(function(t){return l(this.tail,o(t),null,this)},"push")},{key:"unshift",value:me(function(t){return l(null,o(t),this.head,this)},"unshift")},{key:"remove",value:me(function(t){return c(t,this)},"remove")},{key:"pop",value:me(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:me(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:me(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:me(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:me(function(t){if(t<=this.length()){for(var e=1,r=this.head;e<t;)r=r.next,e++;return r.value}},"get_object_at")},{key:"set_object_at",value:me(function(t,e){if(t<=this.length()){for(var r=1,i=this.head;r<t;)i=i.next,r++;i.value=e}},"set_object_at")}],i(a.prototype,s),t.exports=h},function(t,e,r){function i(t,e,r){this.x=null,(this.y=null)==t&&null==e&&null==r?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==r?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==r&&(this.x=(r=t).x,this.y=r.y)}me(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(t,e,r){"Point"==t.constructor.name&&null==e&&null==r?this.setLocation((r=t).x,r.y):"number"==typeof t&&"number"==typeof e&&null==r&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},i.prototype.move=function(t,e){this.x=t,this.y=e},i.prototype.translate=function(t,e){this.x+=t,this.y+=e},i.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=i},function(t,e,r){function i(t,e,r,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=i&&(this.x=t,this.y=e,this.width=r,this.height=i)}me(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(t){this.x=t},i.prototype.getY=function(){return this.y},i.prototype.setY=function(t){this.y=t},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.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},t.exports=i},function(t,e,r){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(){}me(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(t){return n.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=n.getString(),n.lastID++),t.uniqueID)},n.getString=function(t){return"Object#"+(null==t?n.lastID:t)},n.isPrimitive=function(t){var e="u"<typeof t?"undefined":i(t);return null==t||"object"!=e&&"function"!=e},t.exports=n},function(t,e,r){function g(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(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(t){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!=t&&(this.isRemoteUse=t)}me(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 t=new n(this);return this.graphManager=t},u.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},u.prototype.newNode=function(t){return new a(this.graphManager,t)},u.prototype.newEdge=function(t){return new s(null,null,t)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},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 t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];for(var r=this.graphManager.getRoot().getNodes(),e=0;e<r.length;e++)r[e];this.update(this.graphManager.getRoot())}},u.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var e=t;if(null!=e.getChild())for(var r=e.getChild().getNodes(),i=0;i<r.length;i++)update(r[i]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof s?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof o&&null!=t.vGraphObject&&t.vGraphObject.update(t)},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(t){if(null==t)this.transform(new l(0,0));else{var e=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(r.x),e.setDeviceOrgY(r.y);for(var i=this.getAllNodes(),n=0;n<i.length;n++)i[n].transform(e)}}},u.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,r,i=t.getNodes(),n=0;n<i.length;n++)null==(r=(e=i[n]).getChild())||0==r.getNodes().length?e.scatter():(this.positionNodesRandomly(r),e.updateBounds())},u.prototype.getFlatForest=function(){for(var t=[],e=!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&&e;){for(s.push(l[0]);0<s.length&&e;){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)){e=!1;break}s.push(u),o.set(u,c)}}}if(e){var d=[].concat(g(a));for(t.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 t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,i=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n<t.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),e.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:i).remove(t),e},u.prototype.createBendpointsFromDummyNodes=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),t=[].concat(g(this.edgeToDummyNodes.keys())).concat(t),e=0;e<t.length;e++){var r=t[e];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(t,e,r,i){var n,a;return null!=r&&null!=i?(n=e,t<=50?n-=(e-e/r)/50*(50-t):n+=(e*i-e)/50*(t-50),n):(r=t<=50?(a=9*e/500,e/10):(a=9*e/50,-8*e),a*t+r)},u.findCenterOfTree=function(t){var e=(e=[]).concat(t),r=[],i=new Map,n=!1,a=null;1!=e.length&&2!=e.length||(n=!0,a=e[0]);for(var s=0;s<e.length;s++){var o=(c=e[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<e.length;s++){var c=e[s],h=e.indexOf(c);0<=h&&e.splice(h,1),c.getNeighborsList().forEach(function(t){var e;r.indexOf(t)<0&&(1==(e=i.get(t)-1)&&l.push(t),i.set(t,e))})}r=r.concat(l),1!=e.length&&2!=e.length||(n=!0,a=e[0])}return a},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,r){function i(){}me(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return(i.x=1e4*Math.sin(i.seed++))-Math.floor(i.x)},t.exports=i},function(t,e,r){var i=r(4);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}me(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=this.lworldExtX;return 0!=e?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/e:0},n.prototype.transformY=function(t){var e=this.lworldExtY;return 0!=e?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/e:0},n.prototype.inverseTransformX=function(t){var e=this.ldeviceExtX;return 0!=e?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/e:0},n.prototype.inverseTransformY=function(t){var e=this.ldeviceExtY;return 0!=e?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/e:0},n.prototype.inverseTransformPoint=function(t){return new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,r){function d(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(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 me(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 t,e,r,i,n,a=this.getGraphManager().getAllEdges(),s=0;s<a.length;s++)(t=a[s]).idealLength=this.idealEdgeLength,t.isInterGraph&&(e=t.getSource(),r=t.getTarget(),i=t.getSourceInLca().getEstimatedSize(),n=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=i+n-2*o.SIMPLE_NODE_SIZE),i=t.getLca().getInclusionTreeDepth(),t.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(e.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*i))},a.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;r<e.length;r++)t=e[r],this.calcSpringForce(t,t.idealLength)},a.prototype.calcRepulsionForces=function(){var t,e,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,t=0;t<o.length;t++)r=o[t],this.calculateRepulsionForceOfANode(r,n,a,s),n.add(r);else for(t=0;t<o.length;t++)for(r=o[t],e=t+1;e<o.length;e++)i=o[e],r.getOwner()==i.getOwner()&&this.calcRepulsionForce(r,i)},a.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),r=0;r<e.length;r++)t=e[r],this.calcGravitationalForce(t)},a.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},a.prototype.calcSpringForce=function(t,e){var r,i,n=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==n.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(i=(e=this.springConstant*(r-e))*(t.lengthX/r),t=t.lengthY/r*e,n.springForceX+=i,n.springForceY+=t,a.springForceX-=i,a.springForceY-=t)},a.prototype.calcRepulsionForce=function(t,e){var r,i,n,a=t.getRect(),s=e.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=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=o*i,t.repulsionForceY-=o*n,e.repulsionForceX+=o*i,e.repulsionForceY+=o*n):(o=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.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*t.noOfChildren*e.noOfChildren/a)*o/s,t.repulsionForceX-=i=l*r/s,t.repulsionForceY-=n,e.repulsionForceX+=i,e.repulsionForceY+=n)},a.prototype.calcGravitationalForce=function(t){var e,r=t.getOwner(),i=(r.getRight()+r.getLeft())/2,n=(r.getTop()+r.getBottom())/2,i=t.getCenterX()-i,n=t.getCenterY()-n,a=Math.abs(i)+t.getWidth()/2,s=Math.abs(n)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=r.getEstimatedSize()*this.gravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*n):((e=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*n*this.compoundGravityConstant)},a.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},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 t,e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)(t=e[r]).noOfChildren=t.getNoOfChildren()},a.prototype.calcGrid=function(t){for(var e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange)),i=new Array(e),n=0;n<e;n++)i[n]=new Array(r);for(n=0;n<e;n++)for(var a=0;a<r;a++)i[n][a]=new Array;return i},a.prototype.addNodeToGrid=function(t,e,r){for(var i=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),n=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange)),o=i;o<=n;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(t),t.setGridCoordinates(i,n,a,s)},a.prototype.updateGrid=function(){var t,e,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<r.length;t++)e=r[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(t,e,r,i){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||i){var n=new Set;t.surrounding=new Array;for(var a=this.grid,s=t.startX-1;s<t.finishX+2;s++)for(var o=t.startY-1;o<t.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];t.getOwner()!=u.getOwner()||t==u||e.has(u)||n.has(u)||(c=Math.abs(t.getCenterX()-u.getCenterX())-(t.getWidth()/2+u.getWidth()/2),h=Math.abs(t.getCenterY()-u.getCenterY())-(t.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&n.add(u))}t.surrounding=[].concat(d(n))}for(s=0;s<t.surrounding.length;s++)this.calcRepulsionForce(t,t.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},t.exports=a},function(t,e,r){var i,n=r(1),a=r(7);function s(t,e,r){n.call(this,t,e,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(i in me(s,"FDLayoutEdge"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];t.exports=s},function(t,e,r){var i,n=r(3);function a(t,e,r,i){n.call(this,t,e,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 me(a,"FDLayoutNode"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.setGridCoordinates=function(t,e,r,i){this.startX=t,this.finishX=e,this.startY=r,this.finishY=i},t.exports=a},function(t,e,r){function i(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}me(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},t.exports=i},function(t,e,r){var i=r(14);function n(){this.map={},this.keys=[]}me(n,"HashMap"),n.prototype.put=function(t,e){var r=i.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},n.prototype.contains=function(t){return i.createID(t),null!=this.map[t]},n.prototype.get=function(t){return t=i.createID(t),this.map[t]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,r){var i=r(14);function n(){this.set={}}me(n,"HashSet"),n.prototype.add=function(t){var e=i.createID(t);this.contains(e)||(this.set[e]=t)},n.prototype.remove=function(t){delete this.set[i.createID(t)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(t){return this.set[i.createID(t)]==t},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,i=0;i<r;i++)t.push(this.set[e[i]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var i=t[r];this.add(i)}},t.exports=n},function(t,e,r){function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(i,"defineProperties"),me(n,"_classCallCheck");var a,s,o=r(11),r=(me(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:me(function(t,e,r){var i;e<r&&(i=this._partition(t,e,r),this._quicksort(t,e,i),this._quicksort(t,i+1,r))},"_quicksort")},{key:"_partition",value:me(function(t,e,r){for(var i=this._get(t,e),n=e,a=r;;){for(;this.compareFunction(i,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,n),i);)n++;if(!(n<a))return a;this._swap(t,n,a),n++,a--}},"_partition")},{key:"_get",value:me(function(t,e){return t instanceof o?t.get_object_at(e):t[e]},"_get")},{key:"_set",value:me(function(t,e,r){t instanceof o?t.set_object_at(e,r):t[e]=r},"_set")},{key:"_swap",value:me(function(t,e,r){var i=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,i)},"_swap")},{key:"_defaultCompareFunction",value:me(function(t,e){return t<e},"_defaultCompareFunction")}],i(a.prototype,s),l);function l(t,e){n(this,l),null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof o?t.size():t.length,this._quicksort(t,0,e-1)}t.exports=r},function(t,e,r){var i,n;function a(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){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=t,this.sequence2=e,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=n,this.iMax=t.length+1,this.jMax=e.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()}me(a,"defineProperties"),me(c,"_classCallCheck"),me(h,"NeedlemanWunsch"),i=h,n=[{key:"getScore",value:me(function(){return this.score},"getScore")},{key:"getAlignments",value:me(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:me(function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][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:me(function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],r=this.tracebackGrid[e.pos[0]][e.pos[1]];r[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),r[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),r[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:me(function(t,e){for(var r=[],i=-1;-1!==(i=t.indexOf(e,i+1));)r.push(i);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:me(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}],a(i.prototype,n),t.exports=h},function(t,e,r){var i=me(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),t.exports=i},function(t,e,r){function i(){this.listeners=[]}me(i,"Emitter");var n=i.prototype;n.addListener=function(t,e){this.listeners.push({event:t,callback:e})},n.removeListener=function(t,e){for(var r=this.listeners.length;0<=r;r--){var i=this.listeners[r];i.event===t&&i.callback===e&&this.listeners.splice(r,1)}},n.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var i=this.listeners[r];t===i.event&&i.callback(e)}},t.exports=i}],n={},me(i,"__webpack_require__"),i.m=r,i.c=n,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26);function i(t){var e;return(n[t]||(e=n[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,i),e.l=!0,e)).exports}var r,n})}),p9t=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e(d9t()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(d9t()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(t,e){t.exports=r},function(t,e,r){var i,n=r(0).FDLayoutConstants;function a(){}for(i in me(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,t.exports=a},function(t,e,r){var i,n=r(0).FDLayoutEdge;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},function(t,e,r){var i,n=r(0).LGraph;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},function(t,e,r){var i,n=r(0).LGraphManager;function a(t){n.call(this,t)}for(i in me(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},function(t,e,r){var i,n=r(0).FDLayoutNode,a=r(0).IMath;function s(t,e,r,i){n.call(this,t,e,r,i)}for(i in me(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.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),t.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(t,e){for(var r,i=this.getChild().getNodes(),n=0;n<i.length;n++)null==(r=i[n]).getChild()?(r.moveBy(t,e),r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},s.prototype.setPred1=function(t){this.pred1=t},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(t){this.next=t},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(t){this.processed=t},s.prototype.isProcessed=function(){return processed},t.exports=s},function(t,e,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 x(){n.call(this),this.toBeTiled={}}for(i in me(x,"CoSELayout"),x.prototype=Object.create(n.prototype),n)x[i]=n[i];x.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},x.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},x.prototype.newNode=function(t){return new h(this.graphManager,t)},x.prototype.newEdge=function(t){return new o(null,null,t)},x.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)},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){var t,e,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(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),this.initSpringEmbedder(),this.runSpringEmbedder(),!0},x.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 e;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(t),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 t=!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(t,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var i=t[r].rect,n=t[r].id;e[n]={id:n,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return e},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},x.prototype.calculateNodesToApplyGravitationTo=function(){for(var t,e=[],r=this.graphManager.getGraphs(),i=r.length,n=0;n<i;n++)(t=r[n]).updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},x.prototype.createBendpoints=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),e=new Set,r=0;r<t.length;r++){var i=t[r];if(!e.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),e.add(i);else{var s=(s=(s=[]).concat(n.getEdgeListToNode(a))).concat(a.getEdgeListToNode(n));if(!e.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(t){e.add(t)})}}}if(e.size==t.length)break}},x.prototype.positionNodesRadially=function(t){for(var e=new p(0,0),r=Math.ceil(Math.sqrt(t.length)),i=0,n=0,a=0,s=new f(0,0),o=0;o<t.length;o++){o%r==0&&(n=i,(a=0)!=o&&(n+=u.DEFAULT_COMPONENT_SEPERATION),i=0);var l=t[o],c=m.findCenterOfTree(l);e.x=a,e.y=n,(s=x.radialLayout(l,c,e)).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))},x.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,i),l.calculateBounds(t)),n=new c;n.setDeviceOrgX(e.getMinX()),n.setDeviceOrgY(e.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(n);return i=new f(e.getMaxX(),e.getMaxY()),n.inverseTransformPoint(i)},x.branchRadialLayout=function(t,e,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=(t.setCenter(o,s),[]),c=(l=l.concat(t.getEdges())).length;null!=e&&c--;for(var h=0,u=l.length,d=t.getEdgesBetween(e);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!=e?(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(t);m!=e&&(x.branchRadialLayout(m,t,m=(r+h*g)%360,(m+g)%360,n+a,a),h++)}},x.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,r=0;r<t.length;r++){var i=t[r].getDiagonal();e<i&&(e=i)}return e},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var t=[],e=this.graphManager.getAllNodes(),r=0;r<e.length;r++){var i=(n=e[r]).getParent();0!==this.getNodeDegreeWithChildren(n)||null!=i.id&&this.getToBeTiled(i)||t.push(n)}for(r=0;r<t.length;r++){var n,a=(n=t[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(n)}Object.keys(c).forEach(function(t){if(1<c[t].length){var e="DummyCompound_"+t,r=(l.memberGroups[e]=c[t],c[t][0].getParent()),i=new h(l.graphManager),n=(i.id=e,i.paddingLeft=r.paddingLeft||0,i.paddingRight=r.paddingRight||0,i.paddingBottom=r.paddingBottom||0,i.paddingTop=r.paddingTop||0,l.idToDummyNode[e]=i,l.getGraphManager().add(l.newGraph(),i)),a=r.getChild();a.add(i);for(var s=0;s<c[t].length;s++){var o=c[t][s];a.remove(o),n.add(o)}}})},x.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[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(t,e)},x.prototype.clearZeroDegreeMembers=function(){var r=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(t){var e=r.idToDummyNode[t];i[t]=r.tileNodes(r.memberGroups[t],e.paddingLeft+e.paddingRight),e.rect.width=i[t].width,e.rect.height=i[t].height})},x.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop)}},x.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(t){var e=i.idToDummyNode[t],r=e.paddingLeft;i.adjustLocations(n[t],e.rect.x,e.rect.y,r,e.paddingTop)})},x.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),i=0;i<r.length;i++){var n=r[i];if(0<this.getNodeDegree(n))return this.toBeTiled[e]=!1;if(null==n.getChild())this.toBeTiled[n.id]=!1;else if(!this.getToBeTiled(n))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},x.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,i=0;i<e.length;i++){var n=e[i];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},x.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null!=t.getChild())for(var r=t.getChild().getNodes(),i=0;i<r.length;i++){var n=r[i];e+=this.getNodeDegreeWithChildren(n)}return e},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},x.prototype.adjustLocations=function(t,e,r,i,n){r+=n;for(var a=e+=i,s=0;s<t.rows.length;s++){var o=t.rows[s];e=a;for(var l=0,c=0;c<o.length;c++){var h=o[c];h.rect.x=e,h.rect.y=r,e+=h.rect.width+t.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}r+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(r,i){var n=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=i[t];n.tiledMemberPack[t]=n.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=n.tiledMemberPack[t].width,e.rect.height=n.tiledMemberPack[t].height})},x.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0});for(var i=0;i<t.length;i++){var n=t[i];0==r.rows.length?this.insertNodeToRow(r,n,0,e):this.canAddHorizontal(r,n.rect.width,n.rect.height)?this.insertNodeToRow(r,n,this.getShortestRowIndex(r),e):this.insertNodeToRow(r,n,r.rows.length,e),this.shiftToLastRow(r)}return r},x.prototype.insertNodeToRow=function(t,e,r,i){r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(i),t.rowHeight.push(0));var i=t.rowWidth[r]+e.rect.width,i=(0<t.rows[r].length&&(i+=t.horizontalPadding),t.rowWidth[r]=i,t.width<i&&(t.width=i),e.rect.height),n=(0<r&&(i+=t.verticalPadding),0);i>t.rowHeight[r]&&(n=t.rowHeight[r],t.rowHeight[r]=i,n=t.rowHeight[r]-n),t.height+=n,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]<r&&(e=i,r=t.rowWidth[i]);return e},x.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]>r&&(e=i,r=t.rowWidth[i]);return e},x.prototype.canAddHorizontal=function(t,e,r){var i,n,a=this.getShortestRowIndex(t);return a<0||(n=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(i=0,t.rowHeight[a]<r&&0<a&&(i=r+t.verticalPadding-t.rowHeight[a]),a=e+t.horizontalPadding<=t.width-n?(t.height+i)/(n+e+t.horizontalPadding):(t.height+i)/t.width,i=r+t.verticalPadding,(a<1?1/a:a)<((n=t.width<e?(t.height+i)/e:(t.height+i)/t.width)<1?1/n:n))},x.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,i=t.rows[e],n=i[i.length-1],a=n.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){i.splice(-1,1),t.rows[r].push(n),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;o<i.length;o++)i[o].height>s&&(s=i[o].height);0<e&&(s+=t.verticalPadding),a=t.rowHeight[e]+t.rowHeight[r],t.rowHeight[e]=s,t.rowHeight[r]<n.height+t.verticalPadding&&(t.rowHeight[r]=n.height+t.verticalPadding),n=t.rowHeight[e]+t.rowHeight[r],t.height+=n-a,this.shiftToLastRow(t)}},x.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var t,e=[],r=!0;r;){for(var i=this.graphManager.getAllNodes(),n=[],r=!1,a=0;a<i.length;a++)1!=(t=i[a]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(n.push([t,t.getEdges()[0],t.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]));e.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},x.prototype.growTree=function(t){for(var e,r=t[t.length-1],i=0;i<r.length;i++)e=r[i],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(t){var e=t[0],r=(t=e==t[1].source?t[1].target:t[1].source).startX,i=t.finishX,n=t.startY,a=t.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?e.setCenter(t.getCenterX(),t.getCenterY()-t.getHeight()/2-g.DEFAULT_EDGE_LENGTH-e.getHeight()/2):1==h?e.setCenter(t.getCenterX()+t.getWidth()/2+g.DEFAULT_EDGE_LENGTH+e.getWidth()/2,t.getCenterY()):2==h?e.setCenter(t.getCenterX(),t.getCenterY()+t.getHeight()/2+g.DEFAULT_EDGE_LENGTH+e.getHeight()/2):e.setCenter(t.getCenterX()-t.getWidth()/2-g.DEFAULT_EDGE_LENGTH-e.getWidth()/2,t.getCenterY())},t.exports=x},function(t,e,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),t.exports=i}],a={},me(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7);function i(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},n[t].call(e.exports,e,e.exports,i),e.l=!0,e)).exports}var n,a})}),g9t=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e(p9t()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(p9t()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(t,e){t.exports=r},function(t,e,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:me(function(){},"ready"),stop:me(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(t,e){var r,i={};for(r in t)i[r]=t[r];for(r in e)i[r]=e[r];return i}function l(t){this.options=o(s,t),c(this.options)}me(o,"extend"),me(l,"_CoSELayout");var c=me(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?i.QUALITY=0:"proof"==t.quality?i.QUALITY=2:i.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=n.ANIMATE=i.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),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&&(t.add(c.newEdge(),a,u).id=n.id())}var d=me(function(t,e){return e=(t="number"==typeof t?e:t).data("id"),{x:(t=h.idToLNode[e]).getRect().getCenterX(),y:t.getRect().getCenterY()}},"getPositions"),p=me(function t(){for(var e,a,r=me(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&&!e;n++)e=h.stopped||h.layout.tick();e?(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(t,e){if(!(t="number"==typeof t?e:t).isParent()){for(var r=t.id(),i=a[r],n=t;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:t.position("x"),y:t.position("y")}}}),r(),o=requestAnimationFrame(t))},"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(t){for(var i={},e=0;e<t.length;e++)i[t[e].id()]=!0;return t.filter(function(t,e){for(var r=(t="number"==typeof t?e:t).parent()[0];null!=r;){if(i[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(t,e,r){for(var i=e.length,n=0;n<i;n++){var a,s,o,l=e[n],c=l.children(),h=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?t.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)))):t.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},me(function(t){t("layout","cose-bilkent",l)},"register"));typeof cytoscape<"u"&&r(cytoscape),t.exports=r}],a={},me(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1);function i(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},n[t].call(e.exports,e,e.exports,i),e.l=!0,e)).exports}var n,a})});function f9t(t,e,r,i,n){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(n.width-e)/2+", "+r+")")}var m9t,y9t,v9t,x9t,b9t,w9t,k9t,T9t,E9t,C9t=t(()=>{W9(),KE(),m9t=me(function(t,e,r,i){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${10-r.height} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+i).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),y9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),v9t=me(function(t,e,r){var i=r.width,n=r.height,a=.15*i,s=.25*i,o=.35*i,l=.2*i;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*i},${-1*i*.1}
a${o},${o} 1 0,1 ${.4*i},${-1*i*.1}
a${s},${s} 1 0,1 ${.35*i},${.2*+i}
a${a},${a} 1 0,1 ${.15*i},${.35*+n}
a${l},${l} 1 0,1 ${-1*i*.15},${.65*+n}
a${s},${a} 1 0,1 ${-1*i*.25},${.15*i}
a${o},${o} 1 0,1 ${-1*i*.5},0
a${a},${a} 1 0,1 ${-1*i*.25},${-1*i*.15}
a${a},${a} 1 0,1 ${-1*i*.1},${-1*n*.35}
a${l},${l} 1 0,1 ${.1*i},${-1*n*.65}
H0 V0 Z`)},"cloudBkg"),x9t=me(function(t,e,r){var i=r.width,n=r.height,a=.15*i;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*i},${-1*n*.1}
a${a},${a} 1 0,0 ${.25*i},0
a${a},${a} 1 0,0 ${.25*i},0
a${a},${a} 1 0,0 ${.25*i},${.1*+n}
a${a},${a} 1 0,0 ${.15*i},${.33*+n}
a${.8*a},${.8*a} 1 0,0 0,${.34*+n}
a${a},${a} 1 0,0 ${-1*i*.15},${.33*+n}
a${a},${a} 1 0,0 ${-1*i*.25},${.15*n}
a${a},${a} 1 0,0 ${-1*i*.25},0
a${a},${a} 1 0,0 ${-1*i*.25},0
a${a},${a} 1 0,0 ${-1*i*.25},${-1*n*.15}
a${a},${a} 1 0,0 ${-1*i*.1},${-1*n*.33}
a${.8*a},${.8*a} 1 0,0 0,${-1*n*.34}
a${a},${a} 1 0,0 ${.1*i},${-1*n*.33}
H0 V0 Z`)},"bangBkg"),b9t=me(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),me(f9t,"insertPolygonShape"),w9t=me(function(t,e,r){var i=r.height,n=i/4,a=r.width-r.padding+2*n;f9t(e,a,i,[{x:n,y:0},{x:a-n,y:0},{x:a,y:-i/2},{x:a-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}],r)},"hexagonBkg"),k9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),T9t=me(async function(t,e,r,i,n){var a=n.htmlLabels,s=i%11,i=e.append("g");let o="section-"+(r.section=s);s<0&&(o+=" section-root"),i.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+o);var l=i.append("g"),e=i.append("g"),c=r.descr.replace(/(<br\/*>)/g,`
`),c=(await j9(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},n),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[n]=WE(n.fontSize);switch(r.height=c.height+1.1*n*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.nodeType.CIRCLE?(r.height+=50,r.width+=50,i.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,n=r.height,r.height=Math.max(n,60),n=Math.abs(r.height-n),i.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+n/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+(25+r.width/2)+", "+(n/2+r.padding/2)+")")):a?(n=(r.width-c.width)/2,a=(r.height-c.height)/2,e.attr("transform","translate("+n+", "+a+")")):(c=r.width/2,e.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case t.nodeType.DEFAULT:m9t(t,l,r,s);break;case t.nodeType.ROUNDED_RECT:k9t(t,l,r,s);break;case t.nodeType.RECT:y9t(t,l,r,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),b9t(t,l,r,s);break;case t.nodeType.CLOUD:v9t(t,l,r,s);break;case t.nodeType.BANG:x9t(t,l,r,s);break;case t.nodeType.HEXAGON:w9t(t,l,r,s)}return t.setElementForId(r.id,i),r.height},"drawNode"),E9t=me(function(t,e){var t=t.getElementById(e.id),r=e.x||0;t.attr("transform","translate("+r+","+(e.y||0)+")")},"positionNode")});async function _9t(r,i,t,n,a){await T9t(r,i,t,n,a),t.children&&await Promise.all(t.children.map((t,e)=>_9t(r,i,t,n<0?e:n,a)))}function S9t(i,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,M.trace("Edge: ",e,r),i.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function A9t(e,r,i,n){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:n,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{A9t(t,r,i,n+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:n,section:t.section}})})}function L9t(i,n){return new Promise(e=>{let t=j("body").append("div").attr("id","cy").attr("style","display:none"),r=h9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),A9t(i,r,n,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{M.info("Ready",t),e(r)})})}function N9t(n,t){t.nodes().map((t,e)=>{var r=t.data(),i=(r.x=t.position().x,r.y=t.position().y,E9t(n,r),n.getElementById(r.nodeId));M.info("Id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),i.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),i.attr("attr",`apa-${e})`)})}var I9t,R9t,M9t,D9t,O9t,P9t=t(()=>{u9t(),I9t=tt(g9t(),1),Z3(),fu(),e(),tmt(),th(),C9t(),_i(),h9t.use(I9t.default),me(_9t,"drawNodes"),me(S9t,"drawEdges"),me(A9t,"addNodes"),me(L9t,"layoutMindmap"),me(N9t,"positionNodes"),I9t=me(async(t,e,r,i)=>{var n,a,s;M.debug(`Rendering mindmap diagram
`+t),(i=(t=i.db).getMindmap())&&((n=D()).htmlLabels=!1,(a=(e=Hft(e)).append("g")).attr("class","mindmap-edges"),(s=e.append("g")).attr("class","mindmap-nodes"),await _9t(t,s,i,-1,n),S9t(a,s=await L9t(i,n)),N9t(t,s),Vc(void 0,e,n.mindmap?.padding??mr.mindmap.padding,n.mindmap?.useMaxWidth??mr.mindmap.useMaxWidth))},"draw"),R9t={draw:I9t}}),B9t=t(()=>{mi(),M9t=me(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],Ue(e["lineColor"+t])?e["lineColor"+t]=a(e["lineColor"+t],20):e["lineColor"+t]=He(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var i=""+(17-3*t);r+=`
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
fill: ${e["cScale"+t]};
}
.section-${t-1} text {
fill: ${e["cScaleLabel"+t]};
}
.node-icon-${t-1} {
font-size: 40px;
color: ${e["cScaleLabel"+t]};
}
.section-edge-${t-1}{
stroke: ${e["cScale"+t]};
}
.edge-depth-${t-1}{
stroke-width: ${i};
}
.section-${t-1} line {
stroke: ${e["cScaleInv"+t]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return r},"genSections"),D9t=me(t=>`
.edge {
stroke-width: 3;
}
${M9t(t)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.mindmap-node-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
`,"getStyles"),O9t=D9t}),F9t={};lPt(F9t,{diagram:()=>$9t});var $9t,z9t,G9t,U9t,q9t,j9t,W9t,Y9t,H9t,V9t,X9t,K9t,Z9t,Q9t,J9t,tLt,eLt,rLt,iLt,nLt,aLt,sLt,oLt,lLt,cLt,hLt=t(()=>{_3t(),S3t(),P9t(),B9t(),$9t={db:E3t,renderer:R9t,parser:c3t,styles:O9t}}),uLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);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],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:me(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:me(function(t,e,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},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(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},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:g}),e(p,[2,22]),e(p,[2,23]),e(f,[2,25]),e(f,[2,26]),e(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},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(p,[2,16],{15:37,24:g}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(f,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(p,[2,15],{24:b}),e(f,[2,30]),{22:[1,41]},e(f,[2,27]),e(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,i){switch(r){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.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:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.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:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.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,me(t,"Parser"),(z9t=new((t.prototype=r).Parser=t)).parser=z9t,G9t=z9t}),dLt=t(()=>{fu(),Jc(),e(),_i(),IA(),U9t=[],q9t=[],j9t=0,W9t={},Y9t=me(()=>{U9t=[],q9t=[],j9t=0,W9t={}},"clear"),H9t=me(t=>{if(0===U9t.length)return null;let e=U9t[0].level,r=null;for(let t=U9t.length-1;0<=t;t--)if(U9t[t].level===e&&(r=r||U9t[t]),U9t[t].level<e)throw new Error('Items without section detected, found section ("'+U9t[t].label+'")');return t===r?.level?null:r},"getSection"),V9t=me(function(){return q9t},"getSections"),X9t=me(function(){var t=[],r=V9t(),i=D();for(let e of r){var n,a={id:e.id,label:_c(e.label??"",i),isGroup:!0,ticket:e.ticket,shape:"kanbanSection",level:e.level,look:i.look};t.push(a);for(n of U9t.filter(t=>t.parentId===e.id)){var s={id:n.id,parentId:e.id,label:_c(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"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:D()}},"getData"),K9t=me((t,e,r,i,n)=>{let a=D(),s=a.mindmap?.padding??mr.mindmap.padding;switch(i){case Z9t.ROUNDED_RECT:case Z9t.RECT:case Z9t.HEXAGON:s*=2}if(i={id:_c(e,a)||"kbn"+j9t++,level:t,label:_c(r,a),width:a.mindmap?.maxNodeWidth??mr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(`
`)?n+`
`:`{
`+n+`
}`,(e=NA(n,{schema:LA})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(i.shape=e?.shape),e?.label&&(i.label=e?.label),e?.icon&&(i.icon=e?.icon.toString()),e?.assigned&&(i.assigned=e?.assigned.toString()),e?.ticket&&(i.ticket=e?.ticket.toString()),e?.priority&&(i.priority=e?.priority)}(r=H9t(t))?i.parentId=r.id||"kbn"+j9t++:q9t.push(i),U9t.push(i)},"addNode"),Z9t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Q9t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return Z9t.RECT;case"(":return")"===e?Z9t.ROUNDED_RECT:Z9t.CLOUD;case"((":return Z9t.CIRCLE;case")":return Z9t.CLOUD;case"))":return Z9t.BANG;case"{{":return Z9t.HEXAGON;default:return Z9t.DEFAULT}},"getType"),J9t=me((t,e)=>{W9t[t]=e},"setElementForId"),tLt=me(t=>{var e,r;t&&(e=D(),r=U9t[U9t.length-1],t.icon&&(r.icon=_c(t.icon,e)),t.class)&&(r.cssClasses=_c(t.class,e))},"decorateNode"),eLt=me(t=>{switch(t){case Z9t.DEFAULT:return"no-border";case Z9t.RECT:return"rect";case Z9t.ROUNDED_RECT:return"rounded-rect";case Z9t.CIRCLE:return"circle";case Z9t.CLOUD:return"cloud";case Z9t.BANG:return"bang";case Z9t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),rLt=me(()=>M,"getLogger"),iLt=me(t=>W9t[t],"getElementById"),nLt={clear:Y9t,addNode:K9t,getSections:V9t,getData:X9t,nodeType:Z9t,getType:Q9t,setElementForId:J9t,decorateNode:tLt,type2Str:eLt,getLogger:rLt,getElementById:iLt}}),pLt=t(()=>{fu(),e(),tmt(),th(),_i(),WM(),GD(),aLt=me(async(t,e,r,i)=>{M.debug(`Rendering kanban diagram
`+t);var n,a=i.db.getData(),s=D(),o=(s.htmlLabels=!1,(t=Hft(e)).append("g")),l=(o.attr("class","sections"),t.append("g"));l.attr("class","items");let c=a.nodes.filter(t=>t.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 $M(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 t=s?.kanban?.sectionWidth||200,e=3*-t/2+d,r=e,i=a.nodes.filter(t=>t.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=t-15;var y=(await OD(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await $D(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-e+30,50)+(d-25);m.attr("height",v)}Vc(void 0,t,s.mindmap?.padding??mr.kanban.padding,s.mindmap?.useMaxWidth??mr.kanban.useMaxWidth)},"draw"),sLt={draw:aLt}}),gLt=t(()=>{mi(),oLt=me(r=>{let e="";for(let t=0;t<r.THEME_COLOR_LIMIT;t++)r["lineColor"+t]=r["lineColor"+t]||r["cScaleInv"+t],Ue(r["lineColor"+t])?r["lineColor"+t]=a(r["lineColor"+t],20):r["lineColor"+t]=He(r["lineColor"+t],20);var i=me((t,e)=>(r.darkMode?He:a)(t,e),"adjuster");for(let t=0;t<r.THEME_COLOR_LIMIT;t++){var n=""+(17-3*t);e+=`
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
fill: ${i(r["cScale"+t],10)};
stroke: ${i(r["cScale"+t],10)};
}
.section-${t-1} text {
fill: ${r["cScaleLabel"+t]};
}
.node-icon-${t-1} {
font-size: 40px;
color: ${r["cScaleLabel"+t]};
}
.section-edge-${t-1}{
stroke: ${r["cScale"+t]};
}
.edge-depth-${t-1}{
stroke-width: ${n};
}
.section-${t-1} line {
stroke: ${r["cScaleInv"+t]} ;
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 e},"genSections"),lLt=me(t=>`
.edge {
stroke-width: 3;
}
${oLt(t)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.cluster-label, .label {
color: ${t.textColor};
fill: ${t.textColor};
}
.kanban-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
`,"getStyles"),cLt=lLt}),fLt={};lPt(fLt,{diagram:()=>mLt});var mLt,yLt,vLt,xLt,bLt,wLt,kLt,TLt,ELt,CLt,_Lt,SLt,ALt,LLt,NLt,ILt=t(()=>{uLt(),dLt(),pLt(),gLt(),mLt={db:nLt,renderer:sLt,parser:G9t,styles:cLt}}),RLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,9],i=[1,10],n=[1,5,10,12],n={trace:me(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:me(function(t,e,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]},e(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(n,[2,8]),e(n,[2,9]),{19:[1,16]},e(n,[2,11]),{1:[2,1]},{1:[2,5]},e(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]},e(i,[2,3]),{12:[1,20]},e(n,[2,10]),{15:21,16:7,17:8,18:r,20:i},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:me(function(t,e,r,i){switch(r){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};n.lexer=r,me(t,"Parser"),(yLt=new((t.prototype=n).Parser=t)).parser=yLt,vLt=yLt}),MLt=t(()=>{fu(),Jc(),gu(),xLt=[],bLt=[],wLt=new Map,kLt=me(()=>{xLt=[],bLt=[],wLt=new Map,oh()},"clear"),TLt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{me(this,"SankeyLink")}},ELt=me((t,e,r)=>{xLt.push(new TLt(t,e,r))},"addLink"),CLt=class{constructor(t){this.ID=t}static{me(this,"SankeyNode")}},_Lt=me(t=>{t=L.sanitizeText(t,D());let e=wLt.get(t);return void 0===e&&(e=new CLt(t),wLt.set(t,e),bLt.push(e)),e},"findOrCreateNode"),SLt=me(()=>bLt,"getNodes"),ALt=me(()=>xLt,"getLinks"),LLt=me(()=>({nodes:bLt.map(t=>({id:t.ID})),links:xLt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),NLt={nodesMap:wLt,getConfig:me(()=>D().sankey,"getConfig"),getNodes:SLt,getLinks:ALt,getGraph:LLt,addLink:ELt,findOrCreateNode:_Lt,getAccTitle:ch,setAccTitle:lh,getAccDescription:uh,setAccDescription:hh,getDiagramTitle:ph,setDiagramTitle:dh,clear:kLt}});function DLt(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i<t||void 0===i&&t<=t)&&(i=t);else{let t=-1;for(var n of e)null!=(n=r(n,++t,e))&&(i<n||void 0===i&&n<=n)&&(i=n)}return i}var OLt=t(()=>{me(DLt,"max")});function PLt(e,r){let i;if(void 0===r)for(var t of e)null!=t&&(i>t||void 0===i&&t<=t)&&(i=t);else{let t=-1;for(var n of e)null!=(n=r(n,++t,e))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var BLt=t(()=>{me(PLt,"min")});function FLt(e,r){let i=0;if(void 0===r)for(var t of e)(t=+t)&&(i+=t);else{let t=-1;for(var n of e)(n=+r(n,++t,e))&&(i+=n)}return i}var $Lt=t(()=>{me(FLt,"sum")}),zLt=t(()=>{OLt(),BLt(),$Lt()});function GLt(t){return t.target.depth}function ULt(t){return t.depth}function qLt(t,e){return e-1-t.height}function jLt(t,e){return t.sourceLinks.length?t.depth:e-1}function WLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?PLt(t.sourceLinks,GLt)-1:0}var YLt=t(()=>{zLt(),me(GLt,"targetDepth"),me(ULt,"left"),me(qLt,"right"),me(jLt,"justify"),me(WLt,"center")});function HLt(t){return function(){return t}}var VLt=t(()=>{me(HLt,"constant")});function XLt(t,e){return ZLt(t.source,e.source)||t.index-e.index}function KLt(t,e){return ZLt(t.target,e.target)||t.index-e.index}function ZLt(t,e){return t.y0-e.y0}function QLt(t){return t.value}function JLt(t){return t.index}function tNt(t){return t.nodes}function eNt(t){return t.links}function rNt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function iNt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var i of r.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(var n of r.targetLinks)n.y1=e+n.width/2,e+=n.width}}function nNt(){let o=0,l=0,c=1,h=1,u=24,n=8,d,p=JLt,g=jLt,f,m,e=tNt,r=eNt,a=6;function i(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),iNt(t),t}function s({nodes:r,links:t}){for(var[e,i]of r.entries())i.index=e,i.sourceLinks=[],i.targetLinks=[];var n,a,s=new Map(r.map((t,e)=>[p(t,e,r),t]));for([n,a]of t.entries()){a.index=n;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=rNt(s,t)),"object"!=typeof e&&(e=a.target=rNt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(FLt(e.sourceLinks,QLt),FLt(e.targetLinks,QLt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),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>e)throw new Error("circular link");r=i,i=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),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>e)throw new Error("circular link");r=i,i=new Set}}function b({nodes:t}){var e,r=DLt(t,t=>t.depth)+1,i=(c-o-u)/(r-1),n=new Array(r);for(e of t){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,e,r))));e.layer=a,e.x0=o+a*i,e.x1=e.x0+u,n[a]?n[a].push(e):n[a]=[e]}if(f)for(var s of n)s.sort(f);return n}function w(t){var r,i=PLt(t,t=>(h-l-(t.length-1)*d)/FLt(t,QLt));for(r of t){let e=l;for(var n of r){n.y0=e,n.y1=e+n.value*i,e=n.y1+d;for(var a of n.sourceLinks)a.width=a.value*i}e=(h-e+d)/(r.length+1);for(let t=0;t<r.length;++t){var s=r[t];s.y0+=e*(t+1),s.y1+=e*(t+1)}L(r)}}function k(t){var e=b(t);d=Math.min(n,(h-l)/(DLt(e,t=>t.length)-1)),w(e);for(let t=0;t<a;++t){var r=Math.pow(.99,t),i=Math.max(1-r,(t+1)/a);E(e,r,i),T(e,r,i)}}function T(r,i,n){for(let t=1,e=r.length;t<e;++t){var a,s,o=r[t];for(a of o){let t=0,e=0;for(var{source:l,value:c}of a.targetLinks)c*=a.layer-l.layer,t+=N(l,a)*c,e+=c;0<e&&(s=(t/e-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(ZLt),C(o,n)}}function E(r,i,n){for(let t=r.length,e=t-2;0<=e;--e){var a,s,o=r[e];for(a of o){let t=0,e=0;for(var{target:l,value:c}of a.sourceLinks)c*=l.layer-a.layer,t+=I(a,l)*c,e+=c;0<e&&(s=(t/e-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(ZLt),C(o,n)}}function C(t,e){var r=t.length>>1,i=t[r];S(t,i.y0-d,r-1,e),_(t,i.y1+d,1+r,e),S(t,h,t.length-1,e),_(t,l,0,e)}function _(t,e,r,i){for(;r<t.length;++r){var n=t[r],a=(e-n.y0)*i;1e-6<a&&(n.y0+=a,n.y1+=a),e=n.y1+d}}function S(t,e,r,i){for(;0<=r;--r){var n=t[r],a=(n.y1-e)*i;1e-6<a&&(n.y0-=a,n.y1-=a),e=n.y0-d}}function A({sourceLinks:t,targetLinks:e}){if(void 0===m){for(var{source:{sourceLinks:r}}of e)r.sort(KLt);for(var{target:{targetLinks:i}}of t)i.sort(XLt)}}function L(t){if(void 0===m)for(var{sourceLinks:e,targetLinks:r}of t)e.sort(KLt),r.sort(XLt)}function N(t,e){let r=t.y0-(t.sourceLinks.length-1)*d/2;for(var{target:i,width:n}of t.sourceLinks){if(i===e)break;r+=n+d}for(var{source:a,width:s}of e.targetLinks){if(a===t)break;r-=s}return r}function I(t,e){let r=e.y0-(e.targetLinks.length-1)*d/2;for(var{source:i,width:n}of e.targetLinks){if(i===t)break;r+=n+d}for(var{target:a,width:s}of t.sourceLinks){if(a===e)break;r-=s}return r}return me(i,"sankey"),i.update=function(t){return iNt(t),t},i.nodeId=function(t){return arguments.length?(p="function"==typeof t?t:HLt(t),i):p},i.nodeAlign=function(t){return arguments.length?(g="function"==typeof t?t:HLt(t),i):g},i.nodeSort=function(t){return arguments.length?(f=t,i):f},i.nodeWidth=function(t){return arguments.length?(u=+t,i):u},i.nodePadding=function(t){return arguments.length?(n=d=+t,i):n},i.nodes=function(t){return arguments.length?(e="function"==typeof t?t:HLt(t),i):e},i.links=function(t){return arguments.length?(r="function"==typeof t?t:HLt(t),i):r},i.linkSort=function(t){return arguments.length?(m=t,i):m},i.size=function(t){return arguments.length?(o=l=0,c=+t[0],h=+t[1],i):[c-o,h-l]},i.extent=function(t){return arguments.length?(o=+t[0][0],c=+t[1][0],l=+t[0][1],h=+t[1][1],i):[[o,l],[c,h]]},i.iterations=function(t){return arguments.length?(a=+t,i):a},me(s,"computeNodeLinks"),me(y,"computeNodeValues"),me(v,"computeNodeDepths"),me(x,"computeNodeHeights"),me(b,"computeNodeLayers"),me(w,"initializeNodeBreadths"),me(k,"computeNodeBreadths"),me(T,"relaxLeftToRight"),me(E,"relaxRightToLeft"),me(C,"resolveCollisions"),me(_,"resolveCollisionsTopToBottom"),me(S,"resolveCollisionsBottomToTop"),me(A,"reorderNodeLinks"),me(L,"reorderLinks"),me(N,"targetTop"),me(I,"sourceTop"),i}var aNt=t(()=>{zLt(),YLt(),VLt(),me(XLt,"ascendingSourceBreadth"),me(KLt,"ascendingTargetBreadth"),me(ZLt,"ascendingBreadth"),me(QLt,"value"),me(JLt,"defaultId"),me(tNt,"defaultNodes"),me(eNt,"defaultLinks"),me(rNt,"find"),me(iNt,"computeLinkBreadths"),me(nNt,"Sankey")});function sNt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function oNt(){return new sNt}var lNt,cNt,hNt,uNt,dNt=t(()=>{lNt=Math.PI,hNt=(cNt=2*lNt)-1e-6,me(sNt,"Path"),me(oNt,"path"),sNt.prototype=oNt.prototype={constructor:sNt,moveTo:me(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:me(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:me(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:me(function(t,e,r,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:me(function(t,e,r,i,n,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:me(function(t,e,r,i,n){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(i=+i)-(e=+e),u=o-t,d=l-e,p=u*u+d*d;if((n=+n)<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):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((lNt-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,1e-6<Math.abs(p-1)&&(this._+="L"+(t+p*u)+","+(e+p*d)),this._+="A"+n+","+n+",0,0,"+ +(u*o<d*r)+","+(this._x1=t+i*c)+","+(this._y1=e+i*h)):this._+="L"+(this._x1=t)+","+(this._y1=e))},"arcTo"),arc:me(function(t,e,r,i,n,a){t=+t,e=+e,a=!!a;var s=(r=+r)*Math.cos(i),o=r*Math.sin(i),l=t+s,c=e+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&&(hNt<(a=a<0?a%cNt+cNt:a)?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +(lNt<=a)+","+h+","+(this._x1=t+r*Math.cos(n))+","+(this._y1=e+r*Math.sin(n))))},"arc"),rect:me(function(t,e,r,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},"rect"),toString:me(function(){return this._},"toString")},uNt=oNt}),pNt=t(()=>{dNt()});function gNt(t){return me(function(){return t},"constant")}var fNt=t(()=>{me(gNt,"default")});function mNt(t){return t[0]}function yNt(t){return t[1]}var vNt,xNt=t(()=>{me(mNt,"x"),me(yNt,"y")}),bNt=t(()=>{vNt=Array.prototype.slice});function wNt(t){return t.source}function kNt(t){return t.target}function TNt(n){var a=wNt,s=kNt,o=mNt,l=yNt,c=null;function e(){var t,e=vNt.call(arguments),r=a.apply(this,e),i=s.apply(this,e);if(c=c||(t=uNt()),n(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.apply(this,(e[0]=i,e)),+l.apply(this,e)),t)return c=null,t+""||null}return me(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:gNt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:gNt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function ENt(t,e,r,i,n){t.moveTo(e,r),t.bezierCurveTo(e=(e+i)/2,r,e,n,i,n)}function CNt(){return TNt(ENt)}var _Nt=t(()=>{pNt(),bNt(),fNt(),xNt(),me(wNt,"linkSource"),me(kNt,"linkTarget"),me(TNt,"link"),me(ENt,"curveHorizontal"),me(CNt,"linkHorizontal")}),SNt=t(()=>{_Nt()});function ANt(t){return[t.source.x1,t.y0]}function LNt(t){return[t.target.x0,t.y1]}function NNt(){return CNt().source(ANt).target(LNt)}var INt,RNt,MNt,DNt,ONt,PNt,BNt,FNt=t(()=>{SNt(),me(ANt,"horizontalSource"),me(LNt,"horizontalTarget"),me(NNt,"default")}),$Nt=t(()=>{aNt(),YLt(),FNt()}),zNt=t(()=>{INt=class e{static{me(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href="#"+t}toString(){return"url("+this.href+")"}}}),GNt=t(()=>{fu(),Z3(),$Nt(),th(),zNt(),RNt={left:ULt,right:qLt,center:WLt,justify:jLt},MNt=me(function(t,e,r,i){let{securityLevel:n,sankey:a}=D(),s=yh.sankey,o,l=("sandbox"===n&&(o=j("#i"+e)),j("sandbox"===n?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===n?l.select(`[id="${e}"]`):j(`[id="${e}"]`),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=RNt[p],x=(nNt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),hv(h4));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=INt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>x(t.id));var e=me(({id:t,value:e})=>m?t+`
`+g+Math.round(100*e)/100+f:t,"getText"),i=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0<h/2?t.x1+6:t.x0-6).attr("y",t=>(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0<h/2?"start":"end").text(e),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((e=i.append("linearGradient").attr("id",t=>(t.uid=INt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=me(t=>t.uid,"coloring");break;case"source":w=me(t=>x(t.source.id),"coloring");break;case"target":w=me(t=>x(t.target.id),"coloring");break;default:w=b}i.append("path").attr("d",NNt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Vc(void 0,c,0,d)},"draw"),DNt={draw:MNt}}),UNt=t(()=>{ONt=me(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing")}),qNt=t(()=>{PNt=me(t=>`.label {
font-family: ${t.fontFamily};
}`,"getStyles"),BNt=PNt}),jNt={};lPt(jNt,{diagram:()=>YNt});var WNt,YNt,HNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt,rIt,iIt,nIt,aIt,sIt,oIt,lIt,cIt=t(()=>{RLt(),MLt(),GNt(),UNt(),qNt(),WNt=vLt.parse.bind(vLt),vLt.parse=t=>WNt(ONt(t)),YNt={styles:BNt,parser:vLt,db:NLt,renderer:DNt}}),hIt=t(()=>{Ai(),_i(),KE(),gu(),HNt={packet:[]},VNt=structuredClone(HNt),XNt=mr.packet,KNt=me(()=>{var t=xE({...XNt,...Nr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),ZNt=me(()=>VNt.packet,"getPacket"),QNt=me(t=>{0<t.length&&VNt.packet.push(t)},"pushWord"),JNt=me(()=>{oh(),VNt=structuredClone(HNt)},"clear"),tIt={pushWord:QNt,getPacket:ZNt,getConfig:KNt,clear:JNt,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh}}),uIt=t(()=>{Rpt(),e(),Ppt(),hIt(),eIt=me(t=>{Mpt(t,tIt);let e=-1,r=[],i=1,n=tIt.getConfig().bitsPerRow;for(var{start:a,end:s,label:o}of t.blocks){if(s&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a!==e+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${e+1}.`);for(e=s??a,M.debug(`Packet block ${a} - ${e} with label `+o);r.length<=n+1&&tIt.getPacket().length<1e4;){var[l,c]=rIt({start:a,end:s,label:o},i,n);if(r.push(l),l.end+1===i*n&&(tIt.pushWord(r),r=[],i++),!c)break;({start:a,end:s,label:o}=c)}}tIt.pushWord(r)},"populate"),rIt=me((t,e,r)=>{if(void 0===t.end&&(t.end=t.start),t.end<t.start)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),iIt={parse:me(async t=>{t=await Apt("packet",t),M.debug(t),eIt(t)},"parse")}}),dIt=t(()=>{tmt(),th(),nIt=me((t,e,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=Hft(e);d.attr("viewbox",`0 0 ${c} `+o),Hc(d,o,c,s.useMaxWidth);for([n,a]of u.entries())aIt(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"),aIt=me((t,e,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(i+a)+a;for(c of e){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"),sIt={draw:nIt}}),pIt=t(()=>{KE(),oIt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},lIt=me(({packet:t}={})=>`
.packetByte {
font-size: ${(t=xE(oIt,t)).byteFontSize};
}
.packetByte.start {
fill: ${t.startByteColor};
}
.packetByte.end {
fill: ${t.endByteColor};
}
.packetLabel {
fill: ${t.labelColor};
font-size: ${t.labelFontSize};
}
.packetTitle {
fill: ${t.titleColor};
font-size: ${t.titleFontSize};
}
.packetBlock {
stroke: ${t.blockStrokeColor};
stroke-width: ${t.blockStrokeWidth};
fill: ${t.blockFillColor};
}
`,"styles")}),gIt={};lPt(gIt,{diagram:()=>fIt});var fIt,mIt,yIt,vIt,xIt,bIt,wIt,kIt,TIt,EIt,CIt,_It,SIt,AIt,LIt,NIt,IIt,RIt=t(()=>{hIt(),uIt(),dIt(),pIt(),fIt={parser:iIt,db:tIt,renderer:sIt,styles:lIt}}),MIt=t(()=>{Ai(),_i(),KE(),gu(),yIt={axes:[],curves:[],options:mIt={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},vIt=structuredClone(yIt),xIt=mr.radar,bIt=me(()=>xE({...xIt,...Nr().radar}),"getConfig"),wIt=me(()=>vIt.axes,"getAxes"),kIt=me(()=>vIt.curves,"getCurves"),TIt=me(()=>vIt.options,"getOptions"),EIt=me(t=>{vIt.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),CIt=me(t=>{vIt.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:_It(t.entries)}))},"setCurves"),_It=me(r=>{if(null==r[0].axis)return r.map(t=>t.value);var t=wIt();if(0===t.length)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{var t=r.find(t=>t.axis?.$refText===e.name);if(void 0===t)throw new Error("Missing entry for axis "+e.label);return t.value})},"computeCurveEntries"),SIt=me(t=>{t=t.reduce((t,e)=>(t[e.name]=e,t),{}),vIt.options={showLegend:t.showLegend?.value??mIt.showLegend,ticks:t.ticks?.value??mIt.ticks,max:t.max?.value??mIt.max,min:t.min?.value??mIt.min,graticule:t.graticule?.value??mIt.graticule}},"setOptions"),AIt=me(()=>{oh(),vIt=structuredClone(yIt)},"clear"),LIt={getAxes:wIt,getCurves:kIt,getOptions:TIt,setAxes:EIt,setCurves:CIt,setOptions:SIt,getConfig:bIt,clear:AIt,setAccTitle:lh,getAccTitle:ch,setDiagramTitle:dh,getDiagramTitle:ph,getAccDescription:uh,setAccDescription:hh}}),DIt=t(()=>{Rpt(),e(),Ppt(),MIt(),NIt=me(t=>{Mpt(t,LIt);var{axes:t,curves:e,options:r}=t;LIt.setAxes(t),LIt.setCurves(e),LIt.setOptions(r)},"populate"),IIt={parse:me(async t=>{t=await Apt("radar",t),M.debug(t),NIt(t)},"parse")}});function OIt(r,t,e,i,n,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;e.forEach((t,e)=>{t.entries.length===o&&(t=t.entries.map((t,e)=>(e=2*Math.PI*e/o-Math.PI/2,{x:(t=PIt(t,i,n,l))*Math.cos(e),y:t*Math.sin(e)})),"circle"===a?r.append("path").attr("d",BIt(t,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===a&&r.append("polygon").attr("points",t.map(t=>t.x+","+t.y).join(" ")).attr("class","radarCurve-"+e))})}function PIt(t,e,r,i){return i*(Math.min(Math.max(t,e),r)-e)/(r-e)}function BIt(e,r){let i=e.length,n=`M${e[0].x},`+e[0].y;for(let t=0;t<i;t++){var a=e[(t-1+i)%i],s=e[t],o=e[(t+1)%i],l=e[(t+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 FIt(a,t,e,r){if(e){let i=3*(r.width/2+r.marginRight)/4,n=3*-(r.height/2+r.marginTop)/4;t.forEach((t,e)=>{var r=a.append("g").attr("transform",`translate(${i}, ${n+20*e})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+e),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(t.label)})}}var $It,zIt,GIt,UIt,qIt,jIt,WIt,YIt,HIt=t(()=>{tmt(),$It=me((t,e,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),e=Hft(e),e=zIt(e,o),l=s.max??Math.max(...a.map(t=>Math.max(...t.entries))),c=s.min,h=Math.min(o.width,o.height)/2;GIt(e,n,h,s.ticks,s.graticule),UIt(e,n,h,o),OIt(e,n,a,c,l,s.graticule,o),FIt(e,a,s.showLegend,o),e.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),zIt=me((t,e)=>{var r=e.width+e.marginLeft+e.marginRight,i=e.height+e.marginTop+e.marginBottom,n=e.marginLeft+e.width/2,e=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${r} `+i).attr("width",r).attr("height",i),t.append("g").attr("transform",`translate(${n}, ${e})`)},"drawFrame"),GIt=me((n,a,s,o,t)=>{if("circle"===t)for(let t=0;t<o;t++){var e=s*(t+1)/o;n.append("circle").attr("r",e).attr("class","radarGraticule")}else if("polygon"===t){let i=a.length;for(let e=0;e<o;e++){let r=s*(e+1)/o,t=a.map((t,e)=>(e=2*e*Math.PI/i-Math.PI/2,r*Math.cos(e)+","+r*Math.sin(e))).join(" ");n.append("polygon").attr("points",t).attr("class","radarGraticule")}}},"drawGraticule"),UIt=me((e,r,i,n)=>{var a=r.length;for(let t=0;t<a;t++){var s=r[t].label,o=2*t*Math.PI/a-Math.PI/2;e.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"),e.append("text").text(s).attr("x",i*n.axisLabelFactor*Math.cos(o)).attr("y",i*n.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes"),me(OIt,"drawCurves"),me(PIt,"relativeRadius"),me(BIt,"closedRoundCurve"),me(FIt,"drawLegend"),qIt={draw:$It}}),VIt=t(()=>{KE(),wi(),Ai(),jIt=me((e,r)=>{let i="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var n=e["cScale"+t];i+=`
.radarCurve-${t} {
color: ${n};
fill: ${n};
fill-opacity: ${r.curveOpacity};
stroke: ${n};
stroke-width: ${r.curveStrokeWidth};
}
.radarLegendBox-${t} {
fill: ${n};
fill-opacity: ${r.curveOpacity};
stroke: ${n};
}
`}return i},"genIndexStyles"),WIt=me(t=>{var e=xE(sr(),Nr().themeVariables);return{themeVariables:e,radarOptions:xE(e.radar,t)}},"buildRadarStyleOptions"),YIt=me(({radar:t}={})=>{var{themeVariables:t,radarOptions:e}=WIt(t);return`
.radarTitle {
font-size: ${t.fontSize};
color: ${t.titleColor};
dominant-baseline: hanging;
text-anchor: middle;
}
.radarAxisLine {
stroke: ${e.axisColor};
stroke-width: ${e.axisStrokeWidth};
}
.radarAxisLabel {
dominant-baseline: middle;
text-anchor: middle;
font-size: ${e.axisLabelFontSize}px;
color: ${e.axisColor};
}
.radarGraticule {
fill: ${e.graticuleColor};
fill-opacity: ${e.graticuleOpacity};
stroke: ${e.graticuleColor};
stroke-width: ${e.graticuleStrokeWidth};
}
.radarLegendText {
text-anchor: start;
font-size: ${e.legendFontSize}px;
dominant-baseline: hanging;
}
${jIt(t,e)}
`},"styles")}),XIt={};lPt(XIt,{diagram:()=>KIt});var KIt,ZIt,QIt,JIt=t(()=>{MIt(),DIt(),HIt(),VIt(),KIt={parser:IIt,db:LIt,renderer:qIt,styles:YIt}}),tRt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},"o"),r=[1,7],i=[1,13],n=[1,14],a=[1,15],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],h={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:me(function(t,e,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],t),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]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,32:s,40:o,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:r,28:i,29:n,31:a,32:s,40:o,44:l,47:c}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,32:s,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},e(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var t=n.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(n=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,me(function(t){i.length=i.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),me(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=i[i.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(i=i.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),i.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0},"parse")},d={EOF:1,parseError:me(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:me(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:me(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:me(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),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===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:me(function(){return this._more=!0,this},"more"),reject:me(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:me(function(t){this.unput(this.match.slice(t))},"less"),pastInput:me(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:me(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:me(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:me(function(t,e){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=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:me(function(){if(this.done)return this.EOF;var t,e,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]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:me(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:me(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:me(function(t){this.begin(t)},"pushState"),stateStackSize:me(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:me(function(t,e,r,i){switch(r){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:case 42:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\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:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};h.lexer=d,me(t,"Parser"),(ZIt=new((t.prototype=h).Parser=t)).parser=ZIt,QIt=ZIt});function eRt(t){switch(M.debug("typeStr2Type",t),t){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 rRt(t){return"=="!==(M.debug("typeStr2Type",t),t)?"normal":"thick"}function iRt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var nRt,aRt,sRt,oRt,lRt,cRt,hRt,uRt,dRt,pRt,gRt,fRt,mRt,yRt,vRt,xRt,bRt,wRt,kRt,TRt,ERt,CRt,_Rt,SRt,ARt,LRt,NRt,IRt,RRt,MRt,DRt,ORt,PRt,BRt,FRt,$Rt,zRt,GRt,URt,qRt,jRt=t(()=>{r$(),Ai(),fu(),e(),Jc(),gu(),nRt=new Map,aRt=[],sRt=new Map,oRt=D(),lRt=new Map,cRt=me(t=>L.sanitizeText(t,oRt),"sanitizeText"),hRt=me(function(t,e=""){let r=lRt.get(t);r||(r={id:t,styles:[],textStyles:[]},lRt.set(t,r)),e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),uRt=me(function(t,e=""){t=nRt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),dRt=me(function(t,r){t.split(",").forEach(function(t){let e=nRt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},nRt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),pRt=me((t,e)=>{var r,i=[];for(r of t.flat())if(r.label&&(r.label=cRt(r.label)),"classDef"===r.type)hRt(r.id,r.css);else if("applyClass"===r.type)dRt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&uRt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var n=(sRt.get(r.id)??0)+1;sRt.set(r.id,n),r.id=n+"-"+r.id,aRt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(n=nRt.get(r.id))?nRt.set(r.id,r):("na"!==r.type&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&pRt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t<a;t++){var s=e$(r);s.id=s.id+"-"+t,nRt.set(s.id,s),i.push(s)}}else void 0===n&&i.push(r);e.children=i},"populateBlockDatabase"),gRt=[],fRt={id:"root",type:"composite",children:[],columns:-1},mRt=me(()=>{M.debug("Clear called"),oh(),fRt={id:"root",type:"composite",children:[],columns:-1},nRt=new Map([["root",fRt]]),gRt=[],lRt=new Map,aRt=[],sRt=new Map},"clear"),me(eRt,"typeStr2Type"),me(rRt,"edgeTypeStr2Type"),me(iRt,"edgeStrToEdgeData"),yRt=0,vRt=me(()=>(yRt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+yRt),"generateId"),xRt=me(t=>{fRt.children=t,pRt(t,fRt),gRt=fRt.children},"setHierarchy"),bRt=me(t=>(t=nRt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),wRt=me(()=>[...nRt.values()],"getBlocksFlat"),kRt=me(()=>gRt||[],"getBlocks"),TRt=me(()=>aRt,"getEdges"),ERt=me(t=>nRt.get(t),"getBlock"),CRt=me(t=>{nRt.set(t.id,t)},"setBlock"),SRt=me(()=>console,"getLogger"),_Rt=me(function(){return lRt},"getClasses"),SRt={getConfig:me(()=>Nr().block,"getConfig"),typeStr2Type:eRt,edgeTypeStr2Type:rRt,edgeStrToEdgeData:iRt,getLogger:SRt,getBlocksFlat:wRt,getBlocks:kRt,getEdges:TRt,setHierarchy:xRt,getBlock:ERt,setBlock:CRt,getColumns:bRt,getClasses:_Rt,clear:mRt,generateId:vRt},ARt=SRt}),WRt=t(()=>{mi(),LRt=me((t,e)=>{var r=(n=Pe)(t,"r"),i=n(t,"g"),n=n(t,"b");return De(r,i,n,e)},"fade"),NRt=me(t=>`.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span,p {
color: ${t.titleColor};
}
.label text,span,p {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.flowchart-label text {
text-anchor: middle;
}
// .flowchart-label .text-outer-tspan {
// text-anchor: middle;
// }
// .flowchart-label .text-inner-tspan {
// text-anchor: start;
// }
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${LRt(t.edgeLabelBackground,.5)};
// background-color:
}
.node .cluster {
// fill: ${LRt(t.mainBkg,.5)};
fill: ${LRt(t.clusterBkg,.5)};
stroke: ${LRt(t.clusterBorder,.2)};
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span,p {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),IRt=NRt}),YRt=t(()=>{e(),RRt=me((e,t,r,i)=>{t.forEach(t=>{URt[t](e,r,i)})},"insertMarkers"),MRt=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),DRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),ORt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),PRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),BRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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"),FRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),$Rt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),zRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),GRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),URt={extension:MRt,composition:DRt,aggregation:ORt,dependency:PRt,lollipop:BRt,point:FRt,circle:$Rt,cross:zRt,barb:GRt},qRt=RRt});function HRt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function VRt(s,o,l=0,c=0){if(M.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"sieblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0<s.children?.length){for(var h of s.children)VRt(h,o);var u,d,p,g,f=JRt(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)+QRt*((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)VRt(p,o,m,u);let t=s.columns??-1,e=0;for(g of s.children)e+=g.widthInColumns??1;let r=s.children.length,i=(0<t&&t<e&&(r=t),Math.ceil(e/r)),n=r*(m+QRt)+QRt,a=i*(u+QRt)+QRt;if(n<l){M.debug(`Detected to small siebling: abc95 ${s.id} sieblingWidth ${l} sieblingHeight ${c} width `+n),n=l,a=c;var y,v=(l-r*QRt-QRt)/r,x=(c-i*QRt-QRt)/i;M.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),M.debug("Size indata abc88",s.id,"childHeight",x,"maxHeight",u),M.debug("Size indata abc88 xSize",r,"padding",QRt);for(y of s.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(M.debug(`abc95 (finale calc) ${s.id} xSize ${r} ySize ${i} columns ${t}${s.children.length} width=`+Math.max(n,s.size?.width||0)),n<(s?.size?.width||0)&&(n=s?.size?.width||0,0<(f=0<t?Math.min(s.children.length,t):s.children.length))){var b,w=(n-f*QRt-QRt)/f;M.debug("abc95 (growing to fit) width",s.id,n,s.size?.width,w);for(b of s.children)b.size&&(b.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 XRt(i,n){M.debug(`abc85 layout blocks (=>layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width);var a=i.columns??-1;if(M.debug("layoutBlocks columns abc95",i.id,"=>",a,i),i.children&&0<i.children.length){var s,o=i?.children[0]?.size?.width??0,o=i.children.length*o+(i.children.length-1)*QRt;M.debug("widthOfChildren 88",o,"posX");let t=0,e=(M.debug("abc91 block?.size?.x",i.id,i?.size?.x),i?.size?.x?i?.size?.x+(-i?.size?.width/2||0):-QRt),r=0;for(s of i.children){var l,c,h,u,d=i;s.size&&({width:l,height:c}=s.size,{px:u,py:h}=HRt(a,t),h!=r&&(r=h,e=i?.size?.x?i?.size?.x+(-i?.size?.width/2||0):-QRt,M.debug("New row in layout for block",i.id," and child ",s.id,r)),M.debug(`abc89 layout blocks (child) id: ${s.id} Pos: ${t} (px, py) ${u},${h} (${d?.size?.x},${d?.size?.y}) parent: ${d.id} width: `+l+QRt),d.size&&(u=l/2,s.size.x=e+QRt+u,M.debug(`abc91 layout blocks (calc) px, pyid:${s.id} startingPos=X${e} new startingPosX${s.size.x} ${u} padding=${QRt} width=${l} halfWidth=${u} => x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),e=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+QRt)+c/2+QRt,M.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${e}${QRt}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&XRt(s,n),t+=s?.widthInColumns??1,M.debug("abc88 columnsPos",s,t))}}M.debug(`layout blocks (<==layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width)}function KRt(t,{minX:e,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2<e&&(e=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),t.children)for(var c of t.children)({minX:e,minY:r,maxX:i,maxY:n}=KRt(c,{minX:e,minY:r,maxX:i,maxY:n}));return{minX:e,minY:r,maxX:i,maxY:n}}function ZRt(t){var e,r,i=t.getBlock("root");if(i)return VRt(i,t,0,0),XRt(i,t),M.debug("getBlocks",JSON.stringify(i,null,2)),{minX:t,minY:i,maxX:e,maxY:r}=KRt(i),{x:t,y:i,width:e-t,height:r-i}}var QRt,JRt,tMt=t(()=>{e(),fu(),QRt=D()?.block?.padding??8,me(HRt,"calculateBlockPosition"),JRt=me(t=>{let e=0,r=0;for(var i of t.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>e&&(e=n/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),me(VRt,"setBlockSizes"),me(XRt,"layoutBlocks"),me(KRt,"findBounds"),me(ZRt,"layout")});function eMt(t,e){e&&t.attr("style",e)}function rMt(t){var e=j(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label,n=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(i),eMt(a,t.labelStyle),a.attr("class",n),eMt(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var iMt,nMt,aMt,sMt,oMt,lMt=t(()=>{Z3(),e(),fu(),Jc(),KE(),W9(),me(eMt,"applyStyle"),me(rMt,"addHtmlLabel"),iMt=me((t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),Mc(D().flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"<br />"),M.debug("vertexText"+n),rMt({isNode:i,label:q9(VE(n)),labelStyle:e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.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"),nMt=iMt}),cMt=t(()=>{e(),aMt=me((t,e,r,i,n)=>{e.arrowTypeStart&&oMt(t,"start",e.arrowTypeStart,r,i,n),e.arrowTypeEnd&&oMt(t,"end",e.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),sMt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},oMt=me((t,e,r,i,n,a)=>{var s=sMt[r];s?t.attr("marker-"+e,`url(${i}#${n}_${a}-${s}${"start"===e?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function hMt(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var uMt,dMt,pMt,gMt,fMt,mMt,yMt,vMt,xMt,bMt,wMt=t(()=>{e(),lMt(),W9(),Z3(),fu(),KE(),Jc(),JM(),jM(),cMt(),uMt={},dMt={},pMt=me((t,e)=>{var r,i=D(),n=Mc(i.flowchart.htmlLabels),i="markdown"===e.labelType?j9(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},i):nMt(e.label,e.labelStyle),a=t.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=j(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),uMt[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=nMt(e.startLabelLeft,e.labelStyle),s=(r=t.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+")"),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].startLeft=r,hMt(l,e.startLabelLeft)),e.startLabelRight&&(n=nMt(e.startLabelRight,e.labelStyle),a=(s=t.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+")"),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].startRight=s,hMt(l,e.startLabelRight)),e.endLabelLeft&&(n=nMt(e.endLabelLeft,e.labelStyle),r=(a=t.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),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].endLeft=a,hMt(l,e.endLabelLeft)),e.endLabelRight&&(r=nMt(e.endLabelRight,e.labelStyle),n=(s=t.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),dMt[e.id]||(dMt[e.id]={}),dMt[e.id].endRight=s,hMt(l,e.endLabelRight)),i},"insertEdgeLabel"),me(hMt,"setTerminalWidth"),gMt=me((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,uMt[i.id],n);var a,s=n.updatedPath||n.originalPath,o=D(),o=IM(o).subGraphTitleTotalMargin;if(i.label){let t=uMt[i.id],e=i.x,r=i.y;s&&(a=YE.calcLabelPosition(s),M.debug("Moving label "+i.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(i.startLabelLeft){let t=dMt[i.id].startLeft,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.startLabelRight){let t=dMt[i.id].startRight,e=i.x,r=i.y;s&&(a=YE.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelLeft){let t=dMt[i.id].endLeft,e=i.x,r=i.y;s&&(o=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(i.endLabelRight){let t=dMt[i.id].endRight,e=i.x,r=i.y;s&&(n=YE.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),e=n.x,r=n.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),fMt=me((t,e)=>{var r=t.x,i=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-i);return t.width/2<=r||t.height/2<=e},"outsideNode"),mMt=me((t,i,n)=>{M.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(i)}
insidePoint : ${JSON.stringify(n)}
node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-n.x),s=t.width/2,o=n.x<i.x?s-r:s+r,l=t.height/2,c=Math.abs(i.y-n.y),h=Math.abs(i.x-n.x),u;if(Math.abs(e-i.y)*s>Math.abs(a-i.x)*l)return t=n.y<i.y?i.y-l-e:e-l-i.y,o=h*t/c,u={x:n.x<i.x?n.x+o:n.x-h+o,y:n.y<i.y?n.y+c-t:n.y-c+t},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 ${t}, R ${h}, r `+o,u),u;{let t=c*(o=n.x<i.x?i.x-s-a:a-s-i.x)/h,e=n.x<i.x?n.x+h-o:n.x-h+o,r=n.y<i.y?n.y+t:n.y-t;return M.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+o,{_x:e,_y:r}),0===o&&(e=i.x,r=i.y),0===h&&(e=i.x),0===c&&(r=i.y),{x:e,y:r}}},"intersection"),yMt=me((t,i)=>{M.debug("abc88 cutPathAtIntersect",t,i);let n=[],a=t[0],s=!1;return t.forEach(t=>{if(fMt(i,t)||s)a=t,s||n.push(t);else{let e=mMt(i,a,t),r=!1;n.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),n.some(t=>t.x===e.x&&t.y===e.y)||n.push(e),s=!0}}),n},"cutPathAtIntersect"),vMt=me(function(t,e,r,i,n,a,s){let o=r.points,l=(M.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=a.node(e.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=yMt(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",i[r.fromCluster]),o=yMt(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),d=u5,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),XM(r)),f=X4().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=t.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),aMt(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),kMt=t(()=>{xMt=me(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),bMt=me((t,e,r)=>{var t=xMt(t),i=e.height+2*r.padding,n=i/2,e=e.width+2*n+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:n,y:0},{x:e/2,y:2*r},{x:e-n,y:0},{x:e,y:0},{x:e,y:-i/3},{x:e+2*r,y:-i/2},{x:e,y:-2*i/3},{x:e,y:-i},{x:e-n,y:-i},{x:e/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}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:n,y:0},{x:e-n,y:0},{x:e,y:-i/2},{x:e-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:n,y:-i},{x:e-n,y:-i},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-n},{x:e,y:n-i},{x:0,y:-i}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-n},{x:0,y:n-i},{x:e,y:-i}]:t.has("right")&&t.has("left")?[{x:n,y:0},{x:n,y:-r},{x:e-n,y:-r},{x:e-n,y:0},{x:e,y:-i/2},{x:e-n,y:-i},{x:e-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:e/2,y:-i},{x:e,y:r-i},{x:e-n,y:r-i},{x:e-n,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-n},{x:0,y:-i}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-i}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-n},{x:e,y:-i}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-i}]:t.has("right")?[{x:n,y:-r},{x:n,y:-r},{x:e-n,y:-r},{x:e-n,y:0},{x:e,y:-i/2},{x:e-n,y:-i},{x:e-n,y:r-i},{x:n,y:r-i},{x:n,y:r-i}]:t.has("left")?[{x:n,y:0},{x:n,y:-r},{x:e-n,y:-r},{x:e-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:t.has("up")?[{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:e/2,y:-i},{x:e,y:r-i},{x:e-n,y:r-i},{x:e-n,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:e-n,y:r-i},{x:e-n,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function TMt(t,e){return t.intersect(e)}var EMt,CMt=t(()=>{me(TMt,"intersectNode"),EMt=TMt});function _Mt(t,e,r,i){var n=t.x,t=t.y,a=n-i.x,s=t-i.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(i.x<n&&(a=-a),Math.abs(e*r*s/o));return{x:n+a,y:t+(e=i.y<t?-e:e)}}var SMt,AMt=t(()=>{me(_Mt,"intersectEllipse"),SMt=_Mt});function LMt(t,e,r){return SMt(t,e,e,r)}var NMt,IMt=t(()=>{AMt(),me(LMt,"intersectCircle"),NMt=LMt});function RMt(t,e,r,i){var n,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.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)*t.x+(a=r.x-i.x)*t.y+(s=i.x*r.y-r.x*i.y),d=n*e.x+a*e.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-n*c)))return t=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-t)/o:(r+t)/o,y:(r=n*h-l*s)<0?(r-t)/o:(r+t)/o}}function MMt(t,e){return 0<t*e}var DMt,OMt=t(()=>{me(RMt,"intersectLine"),me(MMt,"sameSign"),DMt=RMt});function PMt(t,e,i){var r=t.x,n=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=n-t.height/2-o,h=0;h<e.length;h++){var u=e[h],d=e[h<e.length-1?h+1:0];(u=DMt(t,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(t,e){var r=t.x-i.x,t=t.y-i.y,r=Math.sqrt(r*r+t*t),t=e.x-i.x,e=e.y-i.y;return r<(t=Math.sqrt(t*t+e*e))?-1:r===t?0:1}),a[0]):t}var BMt,FMt,$Mt,zMt,GMt=t(()=>{OMt(),me(BMt=PMt,"intersectPolygon")}),UMt=t(()=>{FMt=me((t,e)=>{var r,i=t.x,n=t.y,a=e.x-i,e=e.y-n,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:i+r,y:n+t}},"intersectRect"),$Mt=FMt}),qMt=t(()=>{CMt(),IMt(),AMt(),GMt(),UMt(),zMt={node:EMt,circle:NMt,ellipse:SMt,polygon:BMt,rect:$Mt}});function jMt(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var WMt,YMt,HMt,VMt,XMt=t(()=>{lMt(),W9(),fu(),Z3(),Jc(),KE(),WMt=me(async(t,e,r,n)=>{let a=D(),i,s=e.useHtmlLabels||Mc(a.flowchart.htmlLabels),o=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?j9(l,_c(VE(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(nMt(_c(VE(c),a),e.labelStyle,!1,n))).getBBox(),p=e.padding/2;if(Mc(a.flowchart.htmlLabels)){if(r=u.children[0],t=j(u),n=r.getElementsByTagName("img")){let i=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",i?(t=a.fontSize||window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}d=r.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.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"),YMt=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),me(jMt,"insertPolygonShape")}),KMt=t(()=>{XMt(),e(),fu(),qMt(),HMt=me(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:i}=await WMt(t,e,"node "+e.classes,!0),n=(M.info("Classes = ",e.classes),t.insert("rect",":first-child"));return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},t},"note"),VMt=HMt});function ZMt(t,e,r,i){let n=[],a=me(t=>{n.push(t,0)},"addBorder"),s=me(t=>{n.push(0,t)},"skipBorder");(e.includes("t")?(M.debug("add top border"),a):s)(r),(e.includes("r")?(M.debug("add right border"),a):s)(i),(e.includes("b")?(M.debug("add bottom border"),a):s)(r),(e.includes("l")?(M.debug("add left border"),a):s)(i),t.attr("stroke-dasharray",n.join(" "))}var QMt,JMt,tDt,eDt,rDt,iDt,nDt,aDt,sDt,oDt,lDt,cDt,hDt,uDt,dDt,pDt,gDt,fDt,mDt,yDt,vDt,xDt,bDt,wDt,kDt,TDt,EDt,CDt,_Dt,SDt=t(()=>{Z3(),fu(),Jc(),e(),kMt(),lMt(),qMt(),KMt(),XMt(),QMt=me(t=>t?" "+t:"","formatClass"),JMt=me((t,e)=>`${e||"node default"}${QMt(t.classes)} `+QMt(t.class),"getClassesFromNode"),tDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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)"),(t=jMt(r,s,s,o)).attr("style",e.style),YMt(e,t),e.intersect=function(t){return M.warn("Intersect called"),zMt.polygon(e,o,t)},r},"question"),eDt=me((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.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(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return zMt.circle(e,14,t)},t),"choice"),rDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.height+e.padding,a=n/4,s=i.width+2*a+e.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=jMt(r,s,n,o);return l.attr("style",e.style),YMt(e,l),e.intersect=function(t){return zMt.polygon(e,o,t)},r},"hexagon"),iDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,void 0,!0),n=i.height+2*e.padding,a=n/2,s=i.width+2*a+e.padding,o=bMt(e.directions,i,e),l=jMt(r,s,n,o);return l.attr("style",e.style),YMt(e,l),e.intersect=function(t){return zMt.polygon(e,o,t)},r},"block_arrow"),nDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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 jMt(r,n,a,s).attr("style",e.style),e.width=n+a,e.height=a,e.intersect=function(t){return zMt.polygon(e,s,t)},r},"rect_left_inv_arrow"),aDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e),!0),n=i.width+e.padding,a=i.height+e.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=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"lean_right"),sDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"lean_left"),oDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"trapezoid"),lDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"inv_trapezoid"),cDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"rect_right_inv_arrow"),hDt=me(async(t,n)=>{let{shapeSvg:e,bbox:r}=await WMt(t,n,JMt(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=e.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 YMt(n,c),n.intersect=function(e){var r=zMt.rect(n,e),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 t=s*s*(1-i*i/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0<e.y-n.y&&(t=-t),r.y+=t}return r},e},"cylinder"),uDt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:i}=await WMt(t,e,"node "+e.classes+" "+e.class,!0),n=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-i,r=e.positioned?-s/2:-r.height/2-i;return n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(i=new Set(Object.keys(e.props)),e.props.borders&&(ZMt(n,e.props.borders,a,s),i.delete("borders")),i.forEach(t=>{M.warn("Unknown node property "+t)})),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},t},"rect"),dDt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:i}=await WMt(t,e,"node "+e.classes,!0),n=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-i,r=e.positioned?-s/2:-r.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(i=new Set(Object.keys(e.props)),e.props.borders&&(ZMt(n,e.props.borders,a,s),i.delete("borders")),i.forEach(t=>{M.warn("Unknown node property "+t)})),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},t},"composite"),pDt=me(async(t,e)=>{var r,t=(await WMt(t,e,"label",!0)).shapeSvg,i=(M.trace("Classes = ",e.class),t.insert("rect",":first-child"));return i.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(ZMt(i,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{M.warn("Unknown node property "+t)})),YMt(e,i),e.intersect=function(t){return zMt.rect(e,t)},t},"labelRect"),me(ZMt,"applyNodePropertyBorders"),gDt=me((t,e)=>{let r,i=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(nMt(l,e.labelStyle,!0,!0))),h={width:0,height:0};Mc(D().flowchart.htmlLabels)&&(t=c.children[0],d=j(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(nMt(t.join?t.join("<br/>"):t,e.labelStyle,!0,!0)),p=(Mc(D().flowchart.htmlLabels)&&(p=t.children[0],u=j(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return j(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),j(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+e.padding).attr("height",h.height+e.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),YMt(e,n),e.intersect=function(t){return zMt.rect(e,t)},i},"rectWithTitle"),fDt=me(async(t,e)=>{var{shapeSvg:t,bbox:r}=await WMt(t,e,JMt(e,void 0),!0),i=r.height+e.padding,r=r.width+i/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i);return YMt(e,r),e.intersect=function(t){return zMt.rect(e,t)},t},"stadium"),mDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await WMt(t,e,JMt(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),M.info("Circle main"),YMt(e,a),e.intersect=function(t){return M.info("Circle intersect",e,i.width/2+n,t),zMt.circle(e,i.width/2+n,t)},r},"circle"),yDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await WMt(t,e,JMt(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),M.info("DoubleCircle main"),YMt(e,s),e.intersect=function(t){return M.info("DoubleCircle intersect",e,i.width/2+n+5,t),zMt.circle(e,i.width/2+n+5,t)},r},"doublecircle"),vDt=me(async(t,e)=>{let{shapeSvg:r,bbox:i}=await WMt(t,e,JMt(e,void 0),!0),n=i.width+e.padding,a=i.height+e.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=jMt(r,n,a,s);return o.attr("style",e.style),YMt(e,o),e.intersect=function(t){return zMt.polygon(e,s,t)},r},"subroutine"),xDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),YMt(e,r),e.intersect=function(t){return zMt.circle(e,7,t)},t},"start"),bDt=me((t,e,r)=>{let i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=70,a=10;return"LR"===r&&(n=10,a=70),t=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join"),YMt(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return zMt.rect(e,t)},i},"forkJoin"),wDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),i=t.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),YMt(e,i),e.intersect=function(t){return zMt.circle(e,7,t)},t},"end"),kDt=me((t,s)=>{let e=s.padding/2,r,i=(r=s.classes?"node "+s.classes:"node default",t.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(nMt(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Mc(D().flowchart.htmlLabels)&&(t=g.children[0],y=j(g),f=t.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&&(D().flowchart.htmlLabels?m+="&lt;"+s.classData.type+"&gt;":m+="<"+s.classData.type+">"),j(t=h.node().appendChild(nMt(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Mc(D().flowchart.htmlLabels)&&(y=t.children[0],w=j(t),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,i=(D().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;")),h.node().appendChild(nMt(r,e.cssStyle||s.labelStyle,!0,!0))),n=i.getBBox(),a;Mc(D().flowchart.htmlLabels)&&(t=i.children[0],a=j(i),n=t.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,[]);s.classData.methods.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,i=(D().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;")),h.node().appendChild(nMt(r,e.cssStyle||s.labelStyle,!0,!0))),n=i.getBBox(),a;Mc(D().flowchart.htmlLabels)&&(t=i.children[0],a=j(i),n=t.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,d&&(y=(l-f.width)/2,j(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return j(t).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,x.forEach(t=>{j(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{j(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),n.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),YMt(s,n),s.intersect=function(t){return zMt.rect(s,t)},i},"class_box"),TDt={rhombus:tDt,composite:dDt,question:tDt,rect:uDt,labelRect:pDt,rectWithTitle:gDt,choice:eDt,circle:mDt,doublecircle:yDt,stadium:fDt,hexagon:rDt,block_arrow:iDt,rect_left_inv_arrow:nDt,lean_right:aDt,lean_left:sDt,trapezoid:oDt,inv_trapezoid:lDt,rect_right_inv_arrow:cDt,cylinder:hDt,start:xDt,end:wDt,note:VMt,subroutine:vDt,fork:bDt,join:bDt,class_box:kDt},EDt={},CDt=me(async(e,r,i)=>{let n,a;if(r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await TDt[r.shape](n,r,i)}else a=await TDt[r.shape](e,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),EDt[r.id]=n,r.haveCallback&&EDt[r.id].attr("class",EDt[r.id].attr("class")+" clickable"),n},"insertNode"),_Dt=me(t=>{var e=EDt[t.id],r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")});function ADt(t,e,r=!1){let i=t,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 t=gE(i?.styles??[]),l=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:i.label,rx:a,ry:a,class:n,style:t.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??Nr()?.block?.padding??0}}async function LDt(t,e,r){var i;"group"!==(e=ADt(e,0,!1)).type&&(i=Nr(),i=(t=await CDt(t,e,{config:i})).node().getBBox(),(e=r.getBlock(e.id)).size={width:i.width,height:i.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function NDt(t,e,r){var i=ADt(e,0,!0);"space"!==r.getBlock(i.id).type&&(r=Nr(),await CDt(t,i,{config:r}),e.intersect=i?.intersect,_Dt(i))}async function IDt(t,e,r,i){for(var n of e)await i(t,n,r),n.children&&await IDt(t,n.children,r,i)}async function RDt(t,e,r){await IDt(t,e,r,LDt)}async function MDt(t,e,r){await IDt(t,e,r,NDt)}async function DDt(t,e,r,i,n){var a,s,o,l,c=new BW({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 e)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}],vMt(t,{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 pMt(t,{...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"}),gMt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var ODt,PDt,BDt,FDt=t(()=>{$W(),Ai(),wMt(),SDt(),KE(),me(ADt,"getNodeFromBlock"),me(LDt,"calculateBlockSize"),me(NDt,"insertBlockPositioned"),me(IDt,"performOperations"),me(RDt,"calculateBlockSizes"),me(MDt,"insertBlocks"),me(DDt,"insertEdges")}),$Dt=t(()=>{Z3(),Ai(),YRt(),e(),th(),tMt(),FDt(),ODt=me(function(t,e){return e.db.getClasses()},"getClasses"),PDt=me(async function(t,e,r,i){let{securityLevel:n,block:a}=Nr(),s=i.db,o;"sandbox"===n&&(o=j("#i"+e));var l=j("sandbox"===n?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===n?l.select(`[id="${e}"]`):j(`[id="${e}"]`),i=(qRt(l,["point","circle","cross"],i.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await RDt(u,i,s),ZRt(s));await MDt(u,i,s),await DDt(u,h,c,s,e),d&&(i=d,u=Math.max(1,Math.round(i.width/i.height*.125)),h=i.height+u+10,c=i.width+10,e=a.useMaxWidth,Hc(l,h,c,!!e),M.debug("Here Bounds",d,i),l.attr("viewBox",`${i.x-5} ${i.y-5} ${i.width+10} `+(i.height+10)))},"draw"),BDt={draw:PDt,getClasses:ODt}}),zDt={};lPt(zDt,{diagram:()=>GDt});var GDt,UDt,qDt,jDt,WDt,YDt,HDt,VDt,XDt,KDt,ZDt,QDt,JDt,tOt,eOt,rOt,iOt,nOt,aOt,sOt=t(()=>{tRt(),jRt(),WRt(),$Dt(),GDt={parser:QIt,db:ARt,renderer:BDt,styles:IRt}}),oOt=t(()=>{UDt={L:"left",R:"right",T:"top",B:"bottom"},qDt={L:me(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:me(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:me(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:me(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},jDt={L:me((t,e)=>t-e+2,"L"),R:me((t,e)=>t-2,"R"),T:me((t,e)=>t-e+2,"T"),B:me((t,e)=>t-2,"B")},WDt=me(function(t){return HDt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),YDt=me(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),HDt=me(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),VDt=me(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),XDt=me(function(t,e){var r=HDt(t)&&VDt(e),t=VDt(t)&&HDt(e);return r||t},"isArchitectureDirectionXY"),KDt=me(function(t){var e=t[0],t=t[1],r=HDt(e)&&VDt(t),e=VDt(e)&&HDt(t);return r||e},"isArchitecturePairXY"),ZDt=me(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),QDt=me(function(t,e){return ZDt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),JDt=me(function([t,e],r){var i=r[0],r=r[1];return HDt(i)?VDt(r)?[t+("L"===i?-1:1),e+("T"===r?1:-1)]:[t+("L"===i?-1:1),e]:HDt(r)?[t+("L"===r?1:-1),e+("T"===i?1:-1)]:[t,e+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),tOt=me(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),eOt=me(function(t,e){return XDt(t,e)?"bend":HDt(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),rOt=me(function(t){return"service"===t.type},"isArchitectureService"),iOt=me(function(t){return"junction"===t.type},"isArchitectureJunction"),nOt=me(t=>t.data(),"edgeData"),aOt=me(t=>t.data(),"nodeData")});function lOt(t){var e=D().architecture;return(e?.[t]?e:cOt)[t]}var cOt,hOt,uOt,dOt,pOt,gOt,fOt,mOt,yOt,vOt,xOt,bOt,wOt,kOt,TOt,EOt,COt,_Ot,SOt,AOt,LOt,NOt,IOt,ROt,MOt,DOt,OOt,POt=t(()=>{_i(),fu(),Fpt(),gu(),oOt(),cOt=mr.architecture,hOt=new Opt(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:cOt,dataStructures:void 0,elements:{}})),uOt=me(()=>{hOt.reset(),oh()},"clear"),dOt=me(function({id:t,icon:e,in:r,title:i,iconText:n}){if(void 0!==hOt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+hOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===hOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===hOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}hOt.records.registeredIds[t]="node",hOt.records.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:i,edges:[],in:r}},"addService"),pOt=me(()=>Object.values(hOt.records.nodes).filter(rOt),"getServices"),gOt=me(function({id:t,in:e}){hOt.records.registeredIds[t]="node",hOt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),fOt=me(()=>Object.values(hOt.records.nodes).filter(iOt),"getJunctions"),mOt=me(()=>Object.values(hOt.records.nodes),"getNodes"),yOt=me(t=>hOt.records.nodes[t],"getNode"),vOt=me(function({id:t,icon:e,in:r,title:i}){if(void 0!==hOt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+hOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===hOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===hOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}hOt.records.registeredIds[t]="group",hOt.records.groups[t]={id:t,icon:e,title:i,in:r}},"addGroup"),xOt=me(()=>Object.values(hOt.records.groups),"getGroups"),bOt=me(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:i,lhsInto:n,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!YDt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!YDt(i))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+i);if(void 0===hOt.records.nodes[t]&&void 0===hOt.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===hOt.records.nodes[e]&&void 0===hOt.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=hOt.records.nodes[t].in,h=hOt.records.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] 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 [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);hOt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:e,rhsDir:i,rhsInto:a,rhsGroup:o,title:l}),hOt.records.nodes[t]&&hOt.records.nodes[e]&&(hOt.records.nodes[t].edges.push(hOt.records.edges[hOt.records.edges.length-1]),hOt.records.nodes[e].edges.push(hOt.records.edges[hOt.records.edges.length-1]))},"addEdge"),wOt=me(()=>hOt.records.edges,"getEdges"),kOt=me(()=>{if(void 0===hOt.records.dataStructures){let s={},o=Object.entries(hOt.records.nodes).reduce((t,[a,e])=>(t[a]=e.edges.reduce((t,e)=>{var r,i=yOt(e.lhsId)?.in,n=yOt(e.rhsId)?.in;return i&&n&&i!==n&&"bend"!==(r=eOt(e.lhsDir,e.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),e.lhsId===a?(n=QDt(e.lhsDir,e.rhsDir))&&(t[n]=e.rhsId):(i=QDt(e.rhsDir,e.lhsDir))&&(t[i]=e.lhsId),t},{}),t),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=me(t=>{let n={[t]:[0,0]},a=[t];for(;0<a.length;){var e=a.shift();if(e){l[e]=1,delete c[e];let t=o[e],[r,i]=n[e];Object.entries(t).forEach(([t,e])=>{l[e]||(n[e]=JDt([r,i],t),a.push(e))})}}return n},"BFS"),e=[t(r)];for(;0<Object.keys(c).length;)e.push(t(Object.keys(c)[0]));hOt.records.dataStructures={adjList:o,spatialMaps:e,groupAlignments:s}}return hOt.records.dataStructures},"getDataStructures"),TOt=me((t,e)=>{hOt.records.elements[t]=e},"setElementForId"),EOt=me(t=>hOt.records.elements[t],"getElementById"),COt={clear:uOt,setDiagramTitle:dh,getDiagramTitle:ph,setAccTitle:lh,getAccTitle:ch,setAccDescription:hh,getAccDescription:uh,addService:dOt,getServices:pOt,addJunction:gOt,getJunctions:fOt,getNodes:mOt,getNode:yOt,addGroup:vOt,getGroups:xOt,addEdge:bOt,getEdges:wOt,setElementForId:TOt,getElementById:EOt,getDataStructures:kOt},me(lOt,"getConfigField")}),BOt=t(()=>{Rpt(),e(),Ppt(),POt(),_Ot=me((t,e)=>{Mpt(t,e),t.groups.map(e.addGroup),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),SOt={parse:me(async t=>{t=await Apt("architecture",t),M.debug(t),_Ot(t,COt)},"parse")}}),FOt=t(()=>{AOt=me(t=>`
.edge {
stroke-width: ${t.archEdgeWidth};
stroke: ${t.archEdgeColor};
fill: none;
}
.arrow {
fill: ${t.archEdgeArrowColor};
}
.node-bkg {
fill: none;
stroke: ${t.archGroupBorderColor};
stroke-width: ${t.archGroupBorderWidth};
stroke-dasharray: 8;
}
.node-icon-text {
display: flex;
align-items: center;
}
.node-icon-text > div {
color: #fff;
margin: 1px;
height: fit-content;
text-align: center;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
}
`,"getStyles"),LOt=AOt}),$Ot=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function i(){}me(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,t.exports=i},function(t,e,r){var i,n=r(2),a=r(8),s=r(9);function o(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(i in me(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(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),i=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=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)},t.exports=o},function(t,e,r){function i(t){this.vGraphObject=t}me(i,"LGraphObject"),t.exports=i},function(t,e,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(t,e,r,i){n.call(this,i=null==r&&null==i?e:i),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(i in me(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(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.target==e){if(t.source!=i)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],i=this;return i.edges.forEach(function(t){if(t.source!=i&&t.target!=i)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;r<t.length;r++)t[r].withChildren().forEach(function(t){e.add(t)});return e},h.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),r=0;r<e.length;r++)t+=e[r].getNoOfChildren();return 0==t?1:t},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 t=-o.INITIAL_WORLD_BOUNDARY,e=o.INITIAL_WORLD_BOUNDARY,e=o.WORLD_CENTER_X+l.nextDouble()*(e-t)+t,t=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-t)+t;this.rect.x=e,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var t,e;0!=this.getChild().getNodes().length&&((e=this.getChild()).updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(t=e.getRight()-e.getLeft(),e=e.getBottom()-e.getTop(),this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(t+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>t?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){var i,n=r(0);function a(){}for(i in me(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,t.exports=a},function(t,e,r){function i(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,e,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(t,e,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=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(i in me(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(t,e,r){if(null==e&&null==r){var i=t;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=t,!(-1<this.getNodes().indexOf(e)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(i.source=e,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),r!=e&&r.edges.push(i),i)},u.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,i=e.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(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof l){if(null==(r=t))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,e=r.source.edges.indexOf(r),t=r.target.edges.indexOf(r);if(!(-1<e&&-1<t))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(e,1),r.target!=r.source&&r.target.edges.splice(t,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 t,e=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())<e&&(e=s),(s=o.getLeft())<r&&(r=s)}return e==d.MAX_VALUE?null:(t=null!=i[0].getParent().paddingLeft?i[0].getParent().paddingLeft:this.margin,this.left=r-t,this.top=e-t,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,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];t&&null!=h.child&&h.updateBounds(),(e=h.getLeft())<i&&(i=e),n<(e=h.getRight())&&(n=e),(e=h.getTop())<a&&(a=e),s<(e=h.getBottom())&&(s=e)}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(t){for(var e=d.MAX_VALUE,r=-d.MAX_VALUE,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=t.length,s=0;s<a;s++){var o,l=t[s];(o=l.getLeft())<e&&(e=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<i&&(i=o),n<(o=l.getBottom())&&(n=o)}return new p(e,i,r-e,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 t=0,e=this.nodes,r=e.length,i=0;i<r;i++)t+=e[i].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var e=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,i=new h,n=new Set,t=this.nodes[0];for(t.withChildren().forEach(function(t){i.push(t),n.add(t)});0!==i.length;)for(var a,s,o=(a=(t=i.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(t,this))||n.has(s)||s.withChildren().forEach(function(t){i.push(t),n.add(t)});this.isConnected=!1,n.size>=this.nodes.length&&(r=0,n.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function i(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}me(i,"LGraphManager"),i.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},i.prototype.add=function(t,e,r,i,n){if(null==r&&null==i&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1<this.graphs.indexOf(t))throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return(t.parent=e).child=t}if(n=r,r=t,t=(i=e).getOwner(),e=n.getOwner(),null==t||t.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==e||e.getGraphManager()!=this)throw"Target not in this graph mgr!";if(t==e)return r.isInterGraph=!1,t.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(t){if(t instanceof c){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,i=[],n=(i=i.concat(e.getEdges())).length,a=0;a<n;a++)r=i[a],e.remove(r);for(var s,o=[],n=(o=o.concat(e.getNodes())).length,a=0;a<n;a++)s=o[a],e.remove(s);e==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(e);this.graphs.splice(l,1),e.parent=null}else if(t instanceof h){if(null==(r=t))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 t=[],e=this.getGraphs(),r=e.length,i=0;i<r;i++)t=t.concat(e[i].getNodes());this.allNodes=t}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 t=[],e=this.getGraphs(),r=(e.length,0);r<e.length;r++)t=t.concat(e[r].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=t).parent&&(t.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,i=t.getOwner();null!=(r=i.getParent());){if(r==e)return!0;if(null==(i=r.getOwner()))break}for(i=e.getOwner();null!=(r=i.getParent());){if(r==t)return!0;if(null==(i=r.getOwner()))break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,i,n,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(e=(t=a[o]).source,r=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=r))t.lca=e.getOwner();else{for(i=e.getOwner();null==t.lca;){for(n=(t.targetInLca=r).getOwner();null==t.lca;){if(n==i){t.lca=n;break}if(n==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=n.getParent(),n=t.targetInLca.getOwner()}if(i==this.rootGraph)break;null==t.lca&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var i=e.getOwner();null!=i;){if(i==r)return i;i=i.getParent().getOwner()}r=r.getParent().getOwner()}return r},i.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var r,i=t.getNodes(),n=i.length,a=0;a<n;a++)(r=i[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},i.prototype.includesInvalidEdge=function(){for(var t,e=[],r=this.edges.length,i=0;i<r;i++)t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(i=0;i<e.length;i++)this.remove(e[i]);return!1},t.exports=i},function(t,e,r){var h=r(12);function i(){}me(i,"IGeometry"),i.calcSeparationAmount=function(t,e,r,i){if(!t.intersects(e))throw"assert failed";var n=new Array(2),a=(this.decideDirectionsForOverlappingNodes(t,e,n),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]<t?t=r[0]:e=r[1],r[0]=-1*n[0]*(t/2+i),r[1]=-1*n[1]*(e/2+i)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var i=t.getCenterX(),n=t.getCenterY(),a=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return r[0]=i,r[1]=n,r[2]=a,r[3]=s,!0;var o=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),g=t.getHeightHalf(),f=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),x=e.getBottom(),b=e.getRight(),w=e.getWidthHalf(),k=e.getHeightHalf(),T=!1,E=!1;if(i===a){if(s<n)return r[0]=i,r[1]=l,r[2]=a,r[3]=x,!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 t=t.height/t.width,e=e.height/e.width,C=(s-n)/(a-i),_=void 0,S=void 0,A=void 0;if(-t==C?(a<i?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):t==C&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-e==C?(i<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):e==C&&(i<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<i?s<n?(_=this.getCardinalDirection(t,C,4),this.getCardinalDirection(e,C,2)):(_=this.getCardinalDirection(-t,C,3),this.getCardinalDirection(-e,C,1)):s<n?(_=this.getCardinalDirection(-t,C,1),this.getCardinalDirection(-e,C,3)):(_=this.getCardinalDirection(t,C,2),this.getCardinalDirection(e,C,4)),!T)switch(_){case 1:S=l,r[0]=i+-g/C,r[1]=S;break;case 2:S=n+p*C,r[0]=d,r[1]=S;break;case 3:S=u,r[0]=i+g/C,r[1]=S;break;case 4:S=n+-p*C,r[0]=h,r[1]=S}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},i.getCardinalDirection=function(t,e,r){return e<t?r:1+r%4},i.getIntersection=function(t,e,r,i){var n,a,s,o,l,c;return null==i?this.getIntersection2(t,e,r):(n=t.x,a=e.x,l=r.x,o=a*(t=t.y)-n*(e=e.y),c=(s=i.x)*(r=r.y)-l*(i=i.y),0==(i=(e-=t)*(t=l-s)-(l=i-r)*(s=n-a))?null:new h((s*c-t*o)/i,(l*o-e*c)/i))},i.angleOfVector=function(t,e,r,i){var n=void 0;return t!==r?(n=Math.atan((i-e)/(r-t)),r<t?n+=Math.PI:i<e&&(n+=this.TWO_PI)):n=i<e?this.ONE_AND_HALF_PI:this.HALF_PI,n},i.doIntersect=function(t,e,r,i){var n=t.x,t=t.y,a=e.x,e=e.y,s=r.x,r=r.y,o=i.x,l=(a-n)*((i=i.y)-r)-(o-s)*(e-t);return 0!=l&&(e=((t-e)*(o-n)+(a-n)*(i-t))/l,0<(a=((i-r)*(o-n)+(s-o)*(i-t))/l))&&a<1&&0<e&&e<1},i.findCircleLineIntersections=function(t,e,r,i,n,a,s){var o=(r-t)*(r-t)+(i-e)*(i-e);return 0<=(r=2*((t-n)*(r-t)+(e-a)*(i-e)))*r-4*o*(i=(t-n)*(t-n)+(e-a)*(e-a)-s*s)?(t=(-r+Math.sqrt(r*r-4*o*i))/(2*o),n=(-r-Math.sqrt(r*r-4*o*i))/(2*o),0<=t&&t<=1?[t]: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,t.exports=i},function(t,e,r){function i(){}me(i,"IMath"),i.sign=function(t){return 0<t?1:t<0?-1:0},i.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},i.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=i},function(t,e,r){function i(){}me(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,t.exports=i},function(t,e,r){function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(i,"defineProperties"),me(n,"_classCallCheck");var a,s,o=me(function(t){return{value:t,next:null,prev:null}},"nodeFrom"),l=me(function(t,e,r,i){return null!==t?t.next=e:i.head=e,null!==r?r.prev=e:i.tail=e,e.prev=t,e.next=r,i.length++,e},"add"),c=me(function(t,e){var r=t.prev,i=t.next;return null!==r?r.next=i:e.head=i,null!==i?i.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},"_remove");function h(t){var e=this;n(this,h),this.length=0,this.head=null,this.tail=null,t?.forEach(function(t){return e.push(t)})}me(h,"LinkedList"),a=h,s=[{key:"size",value:me(function(){return this.length},"size")},{key:"insertBefore",value:me(function(t,e){return l(e.prev,o(t),e,this)},"insertBefore")},{key:"insertAfter",value:me(function(t,e){return l(e,o(t),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:me(function(t,e){return l(e.prev,t,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:me(function(t,e){return l(e,t,e.next,this)},"insertNodeAfter")},{key:"push",value:me(function(t){return l(this.tail,o(t),null,this)},"push")},{key:"unshift",value:me(function(t){return l(null,o(t),this.head,this)},"unshift")},{key:"remove",value:me(function(t){return c(t,this)},"remove")},{key:"pop",value:me(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:me(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:me(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:me(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:me(function(t){if(t<=this.length()){for(var e=1,r=this.head;e<t;)r=r.next,e++;return r.value}},"get_object_at")},{key:"set_object_at",value:me(function(t,e){if(t<=this.length()){for(var r=1,i=this.head;r<t;)i=i.next,r++;i.value=e}},"set_object_at")}],i(a.prototype,s),t.exports=h},function(t,e,r){function i(t,e,r){this.x=null,(this.y=null)==t&&null==e&&null==r?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==r?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==r&&(this.x=(r=t).x,this.y=r.y)}me(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(t,e,r){"Point"==t.constructor.name&&null==e&&null==r?this.setLocation((r=t).x,r.y):"number"==typeof t&&"number"==typeof e&&null==r&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},i.prototype.move=function(t,e){this.x=t,this.y=e},i.prototype.translate=function(t,e){this.x+=t,this.y+=e},i.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=i},function(t,e,r){function i(t,e,r,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=i&&(this.x=t,this.y=e,this.width=r,this.height=i)}me(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(t){this.x=t},i.prototype.getY=function(){return this.y},i.prototype.setY=function(t){this.y=t},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.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},t.exports=i},function(t,e,r){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(){}me(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(t){return n.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=n.getString(),n.lastID++),t.uniqueID)},n.getString=function(t){return"Object#"+(null==t?n.lastID:t)},n.isPrimitive=function(t){var e="u"<typeof t?"undefined":i(t);return null==t||"object"!=e&&"function"!=e},t.exports=n},function(t,e,r){function g(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(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(t){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!=t&&(this.isRemoteUse=t)}me(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 t=new n(this);return this.graphManager=t},u.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},u.prototype.newNode=function(t){return new a(this.graphManager,t)},u.prototype.newEdge=function(t){return new s(null,null,t)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},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 t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];for(var r=this.graphManager.getRoot().getNodes(),e=0;e<r.length;e++)r[e];this.update(this.graphManager.getRoot())}},u.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var e=t;if(null!=e.getChild())for(var r=e.getChild().getNodes(),i=0;i<r.length;i++)update(r[i]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof s?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof o&&null!=t.vGraphObject&&t.vGraphObject.update(t)},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(t){if(null==t)this.transform(new l(0,0));else{var e=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(r.x),e.setDeviceOrgY(r.y);for(var i=this.getAllNodes(),n=0;n<i.length;n++)i[n].transform(e)}}},u.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,r,i=t.getNodes(),n=0;n<i.length;n++)null==(r=(e=i[n]).getChild())||0==r.getNodes().length?e.scatter():(this.positionNodesRandomly(r),e.updateBounds())},u.prototype.getFlatForest=function(){for(var t=[],e=!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&&e;){for(s.push(l[0]);0<s.length&&e;){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)){e=!1;break}s.push(u),o.set(u,c)}}}if(e){var d=[].concat(g(a));for(t.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 t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,i=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n<t.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),e.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:i).remove(t),e},u.prototype.createBendpointsFromDummyNodes=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),t=[].concat(g(this.edgeToDummyNodes.keys())).concat(t),e=0;e<t.length;e++){var r=t[e];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(t,e,r,i){var n,a;return null!=r&&null!=i?(n=e,t<=50?n-=(e-e/r)/50*(50-t):n+=(e*i-e)/50*(t-50),n):(r=t<=50?(a=9*e/500,e/10):(a=9*e/50,-8*e),a*t+r)},u.findCenterOfTree=function(t){var e=(e=[]).concat(t),r=[],i=new Map,n=!1,a=null;1!=e.length&&2!=e.length||(n=!0,a=e[0]);for(var s=0;s<e.length;s++){var o=(c=e[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<e.length;s++){var c=e[s],h=e.indexOf(c);0<=h&&e.splice(h,1),c.getNeighborsList().forEach(function(t){var e;r.indexOf(t)<0&&(1==(e=i.get(t)-1)&&l.push(t),i.set(t,e))})}r=r.concat(l),1!=e.length&&2!=e.length||(n=!0,a=e[0])}return a},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,r){function i(){}me(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return(i.x=1e4*Math.sin(i.seed++))-Math.floor(i.x)},t.exports=i},function(t,e,r){var i=r(5);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}me(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=this.lworldExtX;return 0!=e?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/e:0},n.prototype.transformY=function(t){var e=this.lworldExtY;return 0!=e?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/e:0},n.prototype.inverseTransformX=function(t){var e=this.ldeviceExtX;return 0!=e?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/e:0},n.prototype.inverseTransformY=function(t){var e=this.ldeviceExtY;return 0!=e?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/e:0},n.prototype.inverseTransformPoint=function(t){return new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,r){function d(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(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 me(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 t,e,r,i,n,a,s=this.getGraphManager().getAllEdges(),o=0;o<s.length;o++)e=(t=s[o]).idealLength,t.isInterGraph&&(r=t.getSource(),i=t.getTarget(),n=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=n+a-2*l.SIMPLE_NODE_SIZE),n=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+i.getInclusionTreeDepth()-2*n))},a.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;r<e.length;r++)t=e[r],this.calcSpringForce(t,t.idealLength)},a.prototype.calcRepulsionForces=function(){var t,e,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,t=0;t<o.length;t++)r=o[t],this.calculateRepulsionForceOfANode(r,n,a,s),n.add(r);else for(t=0;t<o.length;t++)for(r=o[t],e=t+1;e<o.length;e++)i=o[e],r.getOwner()==i.getOwner()&&this.calcRepulsionForce(r,i)},a.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),r=0;r<e.length;r++)t=e[r],this.calcGravitationalForce(t)},a.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},a.prototype.calcSpringForce=function(t,e){var r,i,n=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==n.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(e=t.edgeElasticity*(r-e),i=t.lengthY/r*e,n.springForceX+=t=t.lengthX/r*e,n.springForceY+=i,a.springForceX-=t,a.springForceY-=i)},a.prototype.calcRepulsionForce=function(t,e){var r,i,n,a=t.getRect(),s=e.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=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=o*i,t.repulsionForceY-=o*n,e.repulsionForceX+=o*i,e.repulsionForceY+=o*n):(o=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.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=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/a)*o/s,t.repulsionForceX-=i=l*r/s,t.repulsionForceY-=n,e.repulsionForceX+=i,e.repulsionForceY+=n)},a.prototype.calcGravitationalForce=function(t){var e,r=t.getOwner(),i=(r.getRight()+r.getLeft())/2,n=(r.getTop()+r.getBottom())/2,i=t.getCenterX()-i,n=t.getCenterY()-n,a=Math.abs(i)+t.getWidth()/2,s=Math.abs(n)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=r.getEstimatedSize()*this.gravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*n):((e=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||e<s)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*n*this.compoundGravityConstant)},a.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},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 t,e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)(t=e[r]).noOfChildren=t.getNoOfChildren()},a.prototype.calcGrid=function(t){for(var e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange)),i=new Array(e),n=0;n<e;n++)i[n]=new Array(r);for(n=0;n<e;n++)for(var a=0;a<r;a++)i[n][a]=new Array;return i},a.prototype.addNodeToGrid=function(t,e,r){for(var i=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),n=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange)),o=i;o<=n;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(t),t.setGridCoordinates(i,n,a,s)},a.prototype.updateGrid=function(){var t,e,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<r.length;t++)e=r[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(t,e,r,i){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||i){var n=new Set;t.surrounding=new Array;for(var a=this.grid,s=t.startX-1;s<t.finishX+2;s++)for(var o=t.startY-1;o<t.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];t.getOwner()!=u.getOwner()||t==u||e.has(u)||n.has(u)||(c=Math.abs(t.getCenterX()-u.getCenterX())-(t.getWidth()/2+u.getWidth()/2),h=Math.abs(t.getCenterY()-u.getCenterY())-(t.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&n.add(u))}t.surrounding=[].concat(d(n))}for(s=0;s<t.surrounding.length;s++)this.calcRepulsionForce(t,t.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},t.exports=a},function(t,e,r){var i,n=r(1),a=r(4);function s(t,e,r){n.call(this,t,e,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(i in me(s,"FDLayoutEdge"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];t.exports=s},function(t,e,r){var i,n=r(3),a=r(4);function s(t,e,r,i){n.call(this,t,e,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 me(s,"FDLayoutNode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.setGridCoordinates=function(t,e,r,i){this.startX=t,this.finishX=e,this.startY=r,this.finishY=i},t.exports=s},function(t,e,r){function i(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}me(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},t.exports=i},function(t,e,r){var i=r(14);function n(){this.map={},this.keys=[]}me(n,"HashMap"),n.prototype.put=function(t,e){var r=i.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},n.prototype.contains=function(t){return i.createID(t),null!=this.map[t]},n.prototype.get=function(t){return t=i.createID(t),this.map[t]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,r){var i=r(14);function n(){this.set={}}me(n,"HashSet"),n.prototype.add=function(t){var e=i.createID(t);this.contains(e)||(this.set[e]=t)},n.prototype.remove=function(t){delete this.set[i.createID(t)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(t){return this.set[i.createID(t)]==t},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,i=0;i<r;i++)t.push(this.set[e[i]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var i=t[r];this.add(i)}},t.exports=n},function(t,e,r){function i(){}me(i,"Matrix"),i.multMat=function(t,e){for(var r=[],i=0;i<t.length;i++){r[i]=[];for(var n=0;n<e[0].length;n++)for(var a=r[i][n]=0;a<t[0].length;a++)r[i][n]+=t[i][a]*e[a][n]}return r},i.transpose=function(t){for(var e=[],r=0;r<t[0].length;r++){e[r]=[];for(var i=0;i<t.length;i++)e[r][i]=t[i][r]}return e},i.multCons=function(t,e){for(var r=[],i=0;i<t.length;i++)r[i]=t[i]*e;return r},i.minusOp=function(t,e){for(var r=[],i=0;i<t.length;i++)r[i]=t[i]-e[i];return r},i.dotProduct=function(t,e){for(var r=0,i=0;i<t.length;i++)r+=t[i]*e[i];return r},i.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},i.normalize=function(t){for(var e=[],r=this.mag(t),i=0;i<t.length;i++)e[i]=t[i]/r;return e},i.multGamma=function(t){for(var e=[],r=0,i=0;i<t.length;i++)r+=t[i];r*=-1/t.length;for(var n=0;n<t.length;n++)e[n]=r+t[n];return e},i.multL=function(t,e,r){for(var i=[],n=[],a=[],s=0;s<e[0].length;s++){for(var o=0,l=0;l<e.length;l++)o+=-.5*e[l][s]*t[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<e.length;d++){for(var p=0,g=0;g<e[0].length;g++)p+=e[d][g]*a[g];i[d]=p}return i},t.exports=i},function(t,e,r){function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(i,"defineProperties"),me(n,"_classCallCheck");var a,s,o=r(11),r=(me(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:me(function(t,e,r){var i;e<r&&(i=this._partition(t,e,r),this._quicksort(t,e,i),this._quicksort(t,i+1,r))},"_quicksort")},{key:"_partition",value:me(function(t,e,r){for(var i=this._get(t,e),n=e,a=r;;){for(;this.compareFunction(i,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,n),i);)n++;if(!(n<a))return a;this._swap(t,n,a),n++,a--}},"_partition")},{key:"_get",value:me(function(t,e){return t instanceof o?t.get_object_at(e):t[e]},"_get")},{key:"_set",value:me(function(t,e,r){t instanceof o?t.set_object_at(e,r):t[e]=r},"_set")},{key:"_swap",value:me(function(t,e,r){var i=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,i)},"_swap")},{key:"_defaultCompareFunction",value:me(function(t,e){return t<e},"_defaultCompareFunction")}],i(a.prototype,s),l);function l(t,e){n(this,l),null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof o?t.size():t.length,this._quicksort(t,0,e-1)}t.exports=r},function(t,e,r){function At(){}me(At,"SVD"),At.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e,P=Math.min(this.m,this.n);this.s=(t=>{for(var e=[];0<t--;)e.push(0);return e})(Math.min(this.m+1,this.n)),this.U=(e=[this.m,P],me(function t(e){if(0==e.length)return 0;for(var r=[],i=0;i<e[0];i++)r.push(t(e.slice(1)));return r},"allocate")(e)),this.V=(e=[this.n,this.n],me(function t(e){if(0==e.length)return 0;for(var r=[],i=0;i<e[0];i++)r.push(t(e.slice(1)));return r},"allocate")(e));for(var B,F,$,r=(t=>{for(var e=[];0<t--;)e.push(0);return e})(this.n),z=(t=>{for(var e=[];0<t--;)e.push(0);return e})(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 G=a;G<this.m;G++)this.s[a]=At.hypot(this.s[a],t[G][a]);if(0!==this.s[a]){t[a][a]<0&&(this.s[a]=-this.s[a]);for(var U=a;U<this.m;U++)t[U][a]/=this.s[a];t[a][a]+=1}this.s[a]=-this.s[a]}for(var s=a+1;s<this.n;s++){if($=0!==this.s[a],a<i&&$){for(var q=0,j=a;j<this.m;j++)q+=t[j][a]*t[j][s];for(var q=-q/t[a][a],W=a;W<this.m;W++)t[W][s]+=q*t[W][a]}r[s]=t[a][s]}if(a<i)for(var Y=a;Y<this.m;Y++)this.U[Y][a]=t[Y][a];if(a<n){r[a]=0;for(var H=a+1;H<this.n;H++)r[a]=At.hypot(r[a],r[H]);if(0!==r[a]){r[a+1]<0&&(r[a]=-r[a]);for(var V=a+1;V<this.n;V++)r[V]/=r[a];r[a+1]+=1}if(r[a]=-r[a],B=a+1<this.m,F=0!==r[a],B&&F){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]*t[Z][K];for(var Q=a+1;Q<this.n;Q++)for(var J=-r[Q]/r[a+1],tt=a+1;tt<this.m;tt++)t[tt][Q]+=J*z[tt]}for(var et=a+1;et<this.n;et++)this.V[et][a]=r[et]}}var o=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=t[i][i]),this.m<o&&(this.s[o-1]=0),n+1<o&&(r[n]=t[n][o-1]),r[o-1]=0;for(var l=i;l<P;l++){for(var rt=0;rt<this.m;rt++)this.U[rt][l]=0;this.U[l][l]=1}for(var c=i-1;0<=c;c--)if(0!==this.s[c]){for(var it=c+1;it<P;it++){for(var nt=0,at=c;at<this.m;at++)nt+=this.U[at][c]*this.U[at][it];for(var nt=-nt/this.U[c][c],st=c;st<this.m;st++)this.U[st][it]+=nt*this.U[st][c]}for(var ot=c;ot<this.m;ot++)this.U[ot][c]=-this.U[ot][c];this.U[c][c]=1+this.U[c][c];for(var lt=0;lt<c-1;lt++)this.U[lt][c]=0}else{for(var ct=0;ct<this.m;ct++)this.U[ct][c]=0;this.U[c][c]=1}for(var ht,h=this.n-1;0<=h;h--){if(ht=0!==r[h],h<n&&ht)for(var ut=h+1;ut<P;ut++){for(var dt=0,pt=h+1;pt<this.n;pt++)dt+=this.V[pt][h]*this.V[pt][ut];for(var dt=-dt/this.V[h+1][h],gt=h+1;gt<this.n;gt++)this.V[gt][ut]+=dt*this.V[gt][h]}for(var ft=0;ft<this.n;ft++)this.V[ft][h]=0;this.V[h][h]=1}for(var mt=o-1,yt=Math.pow(2,-52),vt=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])<=vt+yt*(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 xt=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=vt+yt*xt){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var bt=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=At.hypot(this.s[g],bt),wt=this.s[g]/f,kt=bt/f;this.s[g]=f,g!==u&&(bt=-kt*r[g-1],r[g-1]=wt*r[g-1]);for(var m=0;m<this.n;m++)f=wt*this.V[m][g]+kt*this.V[m][o-1],this.V[m][o-1]=-kt*this.V[m][g]+wt*this.V[m][o-1],this.V[m][g]=f}break;case 2:var Tt=r[u-1];r[u-1]=0;for(var y=u;y<o;y++){var v=At.hypot(this.s[y],Tt),Et=this.s[y]/v,Ct=Tt/v;this.s[y]=v,Tt=-Ct*r[y],r[y]=Et*r[y];for(var x=0;x<this.m;x++)v=Et*this.U[x][y]+Ct*this.U[x][u-1],this.U[x][u-1]=-Ct*this.U[x][y]+Et*this.U[x][u-1],this.U[x][y]=v}break;case 3:var b=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]/b,k=this.s[o-2]/b,T=r[o-2]/b,_t=this.s[u]/b,b=r[u]/b,k=((k+w)*(k-w)+T*T)/2,T=w*T*(w*T),E=0;0==k&&0==T||(E=Math.sqrt(k*k+T),E=T/(k+(k<0?-E:E)));for(var C=(_t+w)*(_t-w)+E,_=_t*b,S=u;S<o-1;S++){var A=At.hypot(C,_),L=C/A,N=_/A;S!==u&&(r[S-1]=A),C=L*this.s[S]+N*r[S],r[S]=L*r[S]-N*this.s[S],_=N*this.s[S+1],this.s[S+1]=L*this.s[S+1];for(var I=0;I<this.n;I++)A=L*this.V[I][S]+N*this.V[I][S+1],this.V[I][S+1]=-N*this.V[I][S]+L*this.V[I][S+1],this.V[I][S]=A;if(L=C/(A=At.hypot(C,_)),N=_/A,this.s[S]=A,C=L*r[S]+N*this.s[S+1],this.s[S+1]=-N*r[S]+L*this.s[S+1],_=N*r[S+1],r[S+1]=L*r[S+1],S<this.m-1)for(var R=0;R<this.m;R++)A=L*this.U[R][S]+N*this.U[R][S+1],this.U[R][S+1]=-N*this.U[R][S]+L*this.U[R][S+1],this.U[R][S]=A}r[o-2]=C;break;case 4:if(this.s[u]<=0&&(this.s[u]=this.s[u]<0?-this.s[u]:0,1))for(var St=0;St<=mt;St++)this.V[St][u]=-this.V[St][u];for(;u<mt&&!(this.s[u]>=this.s[u+1]);){var M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,u<this.n-1)for(var D=0;D<this.n;D++)M=this.V[D][u+1],this.V[D][u+1]=this.V[D][u],this.V[D][u]=M;if(u<this.m-1)for(var O=0;O<this.m;O++)M=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=M;u++}o--}}return{U:this.U,V:this.V,S:this.s}},At.hypot=function(t,e){var r=void 0;return Math.abs(t)>Math.abs(e)?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0},t.exports=At},function(t,e,r){var i,n;function a(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){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=t,this.sequence2=e,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=n,this.iMax=t.length+1,this.jMax=e.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()}me(a,"defineProperties"),me(c,"_classCallCheck"),me(h,"NeedlemanWunsch"),i=h,n=[{key:"getScore",value:me(function(){return this.score},"getScore")},{key:"getAlignments",value:me(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:me(function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][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:me(function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],r=this.tracebackGrid[e.pos[0]][e.pos[1]];r[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),r[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),r[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:me(function(t,e){for(var r=[],i=-1;-1!==(i=t.indexOf(e,i+1));)r.push(i);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:me(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}],a(i.prototype,n),t.exports=h},function(t,e,r){var i=me(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),t.exports=i},function(t,e,r){function i(){this.listeners=[]}me(i,"Emitter");var n=i.prototype;n.addListener=function(t,e){this.listeners.push({event:t,callback:e})},n.removeListener=function(t,e){for(var r=this.listeners.length;0<=r;r--){var i=this.listeners[r];i.event===t&&i.callback===e&&this.listeners.splice(r,1)}},n.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var i=this.listeners[r];t===i.event&&i.callback(e)}},t.exports=i}],n={},me(i,"__webpack_require__"),i.m=r,i.c=n,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?me(function(){return t.default},"getDefault"):me(function(){return t},"getModuleExports");return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28);function i(t){var e;return(n[t]||(e=n[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,i),e.l=!0,e)).exports}var r,n})}),zOt=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e($Ot()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e($Ot()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return i={45:(t,e,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),t.exports=i},806:(t,e,r)=>{var i,n=r(551).FDLayoutConstants;function a(){}for(i in me(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,t.exports=a},767:(t,e,r)=>{var i,n=r(551).FDLayoutEdge;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},880:(t,e,r)=>{var i,n=r(551).LGraph;function a(t,e,r){n.call(this,t,e,r)}for(i in me(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},578:(t,e,r)=>{var i,n=r(551).LGraphManager;function a(t){n.call(this,t)}for(i in me(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];t.exports=a},765:(t,e,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,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){n.call(this),this.toBeTiled={},this.constraints={}}for(i in me(k,"CoSELayout"),k.prototype=Object.create(n.prototype),n)k[i]=n[i];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new o(null,null,t)},k.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)},k.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},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var t,e,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(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),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},k.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 e;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(t),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 t=!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(t,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var i=t[r].rect,n=t[r].id;e[n]={id:n,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return e},k.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===m.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},k.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(0<Object.keys(this.constraints).length&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},k.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var t=this.graphManager.getAllNodes(),e=0;e<t.length;e++){var r=t[e];this.idToNodeMap.set(r.id,r)}var i=me(function t(e){for(var r,i=e.getChild().getNodes(),n=0,a=0;a<i.length;a++)null==(r=i[a]).getChild()?s.fixedNodeSet.has(r.id)&&(n+=100):n+=t(r);return n},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(t){s.fixedNodeSet.add(t.nodeId)});for(var n,t=this.graphManager.getAllNodes(),e=0;e<t.length;e++)null!=(r=t[e]).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(t){s.fixedNodesOnHorizontal.add(t),s.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var d=this.constraints.alignmentConstraint.vertical,e=0;e<d.length;e++)this.dummyToNodeForVerticalAlignment.set("dummy"+e,[]),d[e].forEach(function(t){h.set(t,"dummy"+e),s.dummyToNodeForVerticalAlignment.get("dummy"+e).push(t),s.fixedNodeSet.has(t)&&s.fixedNodesOnHorizontal.add("dummy"+e)});if(this.constraints.alignmentConstraint.horizontal)for(var p=this.constraints.alignmentConstraint.horizontal,e=0;e<p.length;e++)this.dummyToNodeForHorizontalAlignment.set("dummy"+e,[]),p[e].forEach(function(t){u.set(t,"dummy"+e),s.dummyToNodeForHorizontalAlignment.get("dummy"+e).push(t),s.fixedNodeSet.has(t)&&s.fixedNodesOnVertical.add("dummy"+e)})}f.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(t){for(var e,r,i=t.length-1;i>=2*t.length/3;i--)e=Math.floor(Math.random()*(i+1)),r=t[i],t[i]=t[e],t[e]=r;return t},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(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.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(e)||(s.nodesInRelativeHorizontal.push(e),s.nodeToRelativeConstraintMapHorizontal.set(e,[]),s.dummyToNodeForVerticalAlignment.has(e)?s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(e).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),s.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.nodesInRelativeVertical.includes(e)||(s.nodesInRelativeVertical.push(e),s.nodeToRelativeConstraintMapVertical.set(e,[]),s.dummyToNodeForHorizontalAlignment.has(e)?s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(e).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(e).push({bottom:r,gap:t.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.has(e)?o.get(e).push(r):o.set(e,[r]),o.has(r)?o.get(r).push(e):o.set(r,[e]))}),c=(l=me(function(i,n){var a=[],s=[],o=new w,l=new Set,c=0;return i.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],s[c]=!1,o.push(r=e),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(t){l.has(t)||(o.push(t),l.add(t),a[c].push(t))})}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)}},k.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){(t=n.idToNodeMap.get(t.nodeId)).displacementX=0,t.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,e=0;e<t.length;e++){for(var r=0,i=0;i<t[e].length;i++){if(this.fixedNodeSet.has(t[e][i])){r=0;break}r+=this.idToNodeMap.get(t[e][i]).displacementX}for(var a=r/t[e].length,i=0;i<t[e].length;i++)this.idToNodeMap.get(t[e][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var s=this.constraints.alignmentConstraint.horizontal,e=0;e<s.length;e++){for(var o=0,i=0;i<s[e].length;i++){if(this.fixedNodeSet.has(s[e][i])){o=0;break}o+=this.idToNodeMap.get(s[e][i]).displacementY}for(var l=o/s[e].length,i=0;i<s[e].length;i++)this.idToNodeMap.get(s[e][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(t){var e;t.right?(e=n.nodeToTempPositionMapHorizontal.get(t.right)-n.nodeToTempPositionMapHorizontal.get(r)-i)<t.gap&&(i-=t.gap-e):(e=n.nodeToTempPositionMapHorizontal.get(r)-n.nodeToTempPositionMapHorizontal.get(t.left)+i)<t.gap&&(i+=t.gap-e)}),n.nodeToTempPositionMapHorizontal.set(r,n.nodeToTempPositionMapHorizontal.get(r)+i),n.dummyToNodeForVerticalAlignment.has(r)?n.dummyToNodeForVerticalAlignment.get(r).forEach(function(t){n.idToNodeMap.get(t).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(t){var e;t.bottom?(e=n.nodeToTempPositionMapVertical.get(t.bottom)-n.nodeToTempPositionMapVertical.get(r)-i)<t.gap&&(i-=t.gap-e):(e=n.nodeToTempPositionMapVertical.get(r)-n.nodeToTempPositionMapVertical.get(t.top)+i)<t.gap&&(i+=t.gap-e)}),n.nodeToTempPositionMapVertical.set(r,n.nodeToTempPositionMapVertical.get(r)+i),n.dummyToNodeForHorizontalAlignment.has(r)?n.dummyToNodeForHorizontalAlignment.get(r).forEach(function(t){n.idToNodeMap.get(t).displacementY=i}):n.idToNodeMap.get(r).displacementY=i)});else{for(e=0;e<this.componentsOnHorizontal.length;e++){var c=this.componentsOnHorizontal[e];if(this.fixedComponentsOnHorizontal[e])for(i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?this.dummyToNodeForVerticalAlignment.get(c[i]).forEach(function(t){n.idToNodeMap.get(t).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(t){n.idToNodeMap.get(t).displacementX=d}):this.idToNodeMap.get(c[i]).displacementX=d}}for(e=0;e<this.componentsOnVertical.length;e++)if(c=this.componentsOnVertical[e],this.fixedComponentsOnVertical[e])for(i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?this.dummyToNodeForHorizontalAlignment.get(c[i]).forEach(function(t){n.idToNodeMap.get(t).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(t){n.idToNodeMap.get(t).displacementY=d}):this.idToNodeMap.get(c[i]).displacementY=d}}},k.prototype.calculateNodesToApplyGravitationTo=function(){for(var t,e=[],r=this.graphManager.getGraphs(),i=r.length,n=0;n<i;n++)(t=r[n]).updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},k.prototype.createBendpoints=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),e=new Set,r=0;r<t.length;r++){var i=t[r];if(!e.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),e.add(i);else{var s=(s=(s=[]).concat(n.getEdgeListToNode(a))).concat(a.getEdgeListToNode(n));if(!e.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(t){e.add(t)})}}}if(e.size==t.length)break}},k.prototype.positionNodesRadially=function(t){for(var e=new d(0,0),r=Math.ceil(Math.sqrt(t.length)),i=0,n=0,a=0,s=new p(0,0),o=0;o<t.length;o++){o%r==0&&(n=i,(a=0)!=o&&(n+=f.DEFAULT_COMPONENT_SEPERATION),i=0);var l=t[o],c=g.findCenterOfTree(l);e.x=a,e.y=n,(s=k.radialLayout(l,c,e)).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))},k.radialLayout=function(t,e,r){var i=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,i),x.calculateBounds(t)),n=new b;n.setDeviceOrgX(e.getMinX()),n.setDeviceOrgY(e.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(n);return i=new p(e.getMaxX(),e.getMaxY()),n.inverseTransformPoint(i)},k.branchRadialLayout=function(t,e,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=(t.setCenter(o,s),[]),c=(l=l.concat(t.getEdges())).length;null!=e&&c--;for(var h=0,u=l.length,d=t.getEdgesBetween(e);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!=e?(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(t);m!=e&&(k.branchRadialLayout(m,t,m=(r+h*g)%360,(m+g)%360,n+a,a),h++)}},k.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,r=0;r<t.length;r++){var i=t[r].getDiagonal();e<i&&(e=i)}return e},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var t=[],e=this.graphManager.getAllNodes(),r=0;r<e.length;r++){var i=(n=e[r]).getParent();0!==this.getNodeDegreeWithChildren(n)||null!=i.id&&this.getToBeTiled(i)||t.push(n)}for(r=0;r<t.length;r++){var n,a=(n=t[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(n)}Object.keys(c).forEach(function(t){if(1<c[t].length){var e="DummyCompound_"+t,r=(l.memberGroups[e]=c[t],c[t][0].getParent()),i=new h(l.graphManager),n=(i.id=e,i.paddingLeft=r.paddingLeft||0,i.paddingRight=r.paddingRight||0,i.paddingBottom=r.paddingBottom||0,i.paddingTop=r.paddingTop||0,l.idToDummyNode[e]=i,l.getGraphManager().add(l.newGraph(),i)),a=r.getChild();a.add(i);for(var s=0;s<c[t].length;s++){var o=c[t][s];a.remove(o),n.add(o)}}})},k.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[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(t,e)},k.prototype.clearZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(t){var e,r=i.idToDummyNode[t];n[t]=i.tileNodes(i.memberGroups[t],r.paddingLeft+r.paddingRight),r.rect.width=n[t].width,r.rect.height=n[t].height,r.setCenter(n[t].centerX,n[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(t){var e=i.idToDummyNode[t],r=e.paddingLeft;i.adjustLocations(n[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),i=0;i<r.length;i++){var n=r[i];if(0<this.getNodeDegree(n))return this.toBeTiled[e]=!1;if(null==n.getChild())this.toBeTiled[n.id]=!1;else if(!this.getToBeTiled(n))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},k.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,i=0;i<e.length;i++){var n=e[i];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},k.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null!=t.getChild())for(var r=t.getChild().getNodes(),i=0;i<r.length;i++){var n=r[i];e+=this.getNodeDegreeWithChildren(n)}return e},k.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},k.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},k.prototype.adjustLocations=function(t,e,r,i,n,a,s){r+=n+s;for(var o=e+=i+a,l=0;l<t.rows.length;l++){var c=t.rows[l];e=o;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=e,d.rect.y=r,e+=d.rect.width+t.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}r+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(i,n){var a=this;this.tiledMemberPack=[],Object.keys(i).forEach(function(t){var e,r=n[t];a.tiledMemberPack[t]=a.tileNodes(i[t],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[t].width,r.rect.height=a.tiledMemberPack[t].height,r.setCenter(a.tiledMemberPack[t].centerX,a.tiledMemberPack[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(r);return this.getOrgRatio(t)<e?t:r},k.prototype.getOrgRatio=function(t){return(t=t.width/t.height)<1?1/t:t},k.prototype.calcIdealRowWidth=function(t,e){var r,i=f.TILING_PADDING_VERTICAL,n=f.TILING_PADDING_HORIZONTAL,a=t.length,s=0,o=0,l=0,t=(t.forEach(function(t){s+=t.getWidth(),o+=t.getHeight(),t.getWidth()>l&&(l=t.getWidth())}),s/a),c=o/a,c=Math.pow(i-n,2)+4*(t+n)*(c+i)*a,a=(n-i+Math.sqrt(c))/(2*(t+n));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((i=r*(t+n)-n)<l?l:i)+2*n},k.prototype.tileNodesByFavoringDim=function(t,e,r){var i=f.TILING_PADDING_VERTICAL,n=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:i,horizontalPadding:n,centerX:0,centerY:0},o=(a&&(s.idealRowWidth=this.calcIdealRowWidth(t,r)),me(function(t){return t.rect.width*t.rect.height},"getNodeArea")),l=me(function(t,e){return o(e)-o(t)},"areaCompareFcn");t.sort(function(t,e){var r=l;return s.idealRowWidth?(r=a)(t.id,e.id):r(t,e)});for(var c=0,h=0,u=0;u<t.length;u++)c+=(p=t[u]).getCenterX(),h+=p.getCenterY();for(s.centerX=c/t.length,s.centerY=h/t.length,u=0;u<t.length;u++){var d,p=t[u];0==s.rows.length?this.insertNodeToRow(s,p,0,e):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,e)):this.insertNodeToRow(s,p,s.rows.length,e),this.shiftToLastRow(s)}return s},k.prototype.insertNodeToRow=function(t,e,r,i){r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(i),t.rowHeight.push(0));var i=t.rowWidth[r]+e.rect.width,i=(0<t.rows[r].length&&(i+=t.horizontalPadding),t.rowWidth[r]=i,t.width<i&&(t.width=i),e.rect.height),n=(0<r&&(i+=t.verticalPadding),0);i>t.rowHeight[r]&&(n=t.rowHeight[r],t.rowHeight[r]=i,n=t.rowHeight[r]-n),t.height+=n,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]<r&&(e=i,r=t.rowWidth[i]);return e},k.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]>r&&(e=i,r=t.rowWidth[i]);return e},k.prototype.canAddHorizontal=function(t,e,r){var i,n,a;return t.idealRowWidth?(n=t.rows.length-1,t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth):(n=this.getShortestRowIndex(t))<0||(a=t.rowWidth[n])+t.horizontalPadding+e<=t.width||(i=0,t.rowHeight[n]<r&&0<n&&(i=r+t.verticalPadding-t.rowHeight[n]),n=e+t.horizontalPadding<=t.width-a?(t.height+i)/(a+e+t.horizontalPadding):(t.height+i)/t.width,i=r+t.verticalPadding,(n=n<1?1/n:n)<((a=t.width<e?(t.height+i)/e:(t.height+i)/t.width)<1?1/a:a))},k.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,i=t.rows[e],n=i[i.length-1],a=n.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){i.splice(-1,1),t.rows[r].push(n),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;o<i.length;o++)i[o].height>s&&(s=i[o].height);0<e&&(s+=t.verticalPadding),a=t.rowHeight[e]+t.rowHeight[r],t.rowHeight[e]=s,t.rowHeight[r]<n.height+t.verticalPadding&&(t.rowHeight[r]=n.height+t.verticalPadding),n=t.rowHeight[e]+t.rowHeight[r],t.height+=n-a,this.shiftToLastRow(t)}},k.prototype.tilingPreLayout=function(){f.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},k.prototype.tilingPostLayout=function(){f.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},k.prototype.reduceTrees=function(){for(var t=[],e=!0;e;){for(var r,i,n=this.graphManager.getAllNodes(),a=[],e=!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()]),e=!0);if(1==e){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]));t.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},k.prototype.growTree=function(t){for(var e,r=t[t.length-1],i=0;i<r.length;i++)e=r[i],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},k.prototype.findPlaceforPrunedNode=function(t){var e=t[0],r=e==t[1].source?t[1].target:t[1].source;if(f.PURE_INCREMENTAL)e.setCenter(r.getCenterX()+t[3].getWidth(),r.getCenterY()+t[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?e.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-m.DEFAULT_EDGE_LENGTH-e.getHeight()/2):1==u?e.setCenter(r.getCenterX()+r.getWidth()/2+m.DEFAULT_EDGE_LENGTH+e.getWidth()/2,r.getCenterY()):2==u?e.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+m.DEFAULT_EDGE_LENGTH+e.getHeight()/2):e.setCenter(r.getCenterX()-r.getWidth()/2-m.DEFAULT_EDGE_LENGTH-e.getWidth()/2,r.getCenterY())}},t.exports=k},991:(t,e,r)=>{var i,n=r(551).FDLayoutNode,a=r(551).IMath;function s(t,e,r,i){n.call(this,t,e,r,i)}for(i in me(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0<this.child.getNodes().length&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(t,e){for(var r,i=this.getChild().getNodes(),n=0;n<i.length;n++)null==(r=i[n]).getChild()?(r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},s.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.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(t){this.pred1=t},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(t){this.next=t},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(t){this.processed=t},s.prototype.isProcessed=function(){return processed},t.exports=s},902:(t,e,r)=>{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}me(Pt,"_toConsumableArray");var Bt=r(806),Ft=r(551).LinkedList,$t=r(551).Matrix,zt=r(551).SVD;function i(){}me(i,"ConstraintHandler"),i.handleConstraints=function(t){var e={};e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var r=new Map,k=new Map,T=[],E=[],i=t.getAllNodes(),P=0,n=0;n<i.length;n++){var a=i[n];null==a.getChild()&&(k.set(a.id,P++),T.push(a.getCenterX()),E.push(a.getCenterY()),r.set(a.id,a))}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=Bt.DEFAULT_EDGE_LENGTH+r.get(t.left).getWidth()/2+r.get(t.right).getWidth()/2:t.gap=Bt.DEFAULT_EDGE_LENGTH+r.get(t.top).getHeight()/2+r.get(t.bottom).getHeight()/2)});var s,B=me(function(t,e){return{x:t.x-e.x,y:t.y-e.y}},"calculatePositionDiff"),o=me(function(t){var e=0,r=0;return t.forEach(function(t){e+=T[k.get(t)],r+=E[k.get(t)]}),{x:e/t.size,y:r/t.size}},"calculateAvgPosition"),t=me(function(t,x,h,b,e){function n(t,e){var r=new Set(t),i=!0,t=!1,n=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var o=a.value;r.add(o)}}catch(e){t=!0,n=e}finally{try{!i&&s.return&&s.return()}finally{if(t)throw n}}return r}me(n,"setUnion");var a=new Map,w=(t.forEach(function(t,e){a.set(e,0)}),t.forEach(function(t,e){t.forEach(function(t){a.set(t.id,a.get(t.id)+1)})}),new Map),s=new Map,o=new Ft;a.forEach(function(t,e){0==t?(o.push(e),h||("horizontal"==x?w.set(e,k.has(e)?T[k.get(e)]:b.get(e)):w.set(e,k.has(e)?E[k.get(e)]:b.get(e)))):w.set(e,Number.NEGATIVE_INFINITY),h&&s.set(e,new Set([e]))}),h&&e.forEach(function(t){var e,r,i=[];t.forEach(function(t){h.has(t)&&i.push(t)}),0<i.length?(e=0,i.forEach(function(t){"horizontal"==x?w.set(t,k.has(t)?T[k.get(t)]:b.get(t)):w.set(t,k.has(t)?E[k.get(t)]:b.get(t)),e+=w.get(t)}),e/=i.length,t.forEach(function(t){h.has(t)||w.set(t,e)})):(r=0,t.forEach(function(t){r+="horizontal"==x?k.has(t)?T[k.get(t)]:b.get(t):k.has(t)?E[k.get(t)]:b.get(t)}),r/=t.length,t.forEach(function(t){w.set(t,r)}))});for(var u,d,r=me(function(){var i=o.shift();t.get(i).forEach(function(t){var e,r;w.get(t.id)<w.get(i)+t.gap&&(h&&h.has(t.id)?(r="horizontal"==x?k.has(t.id)?T[k.get(t.id)]:b.get(t.id):k.has(t.id)?E[k.get(t.id)]:b.get(t.id),w.set(t.id,r),r<w.get(i)+t.gap&&(e=w.get(i)+t.gap-r,s.get(i).forEach(function(t){w.set(t,w.get(t)-e)}))):w.set(t.id,w.get(i)+t.gap)),a.set(t.id,a.get(t.id)-1),0==a.get(t.id)&&o.push(t.id),h&&s.set(t.id,n(s.get(i),s.get(t.id)))})},"_loop");0!=o.length;)r();return h&&(u=new Set,t.forEach(function(t,e){0==t.length&&u.add(e)}),d=[],s.forEach(function(r,t){if(u.has(t)){var i,n,e=!1,a=!0,t=!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)&&(e=!0)}}catch(e){t=!0,s=e}finally{try{!a&&l.return&&l.return()}finally{if(t)throw s}}e||(i=!1,n=void 0,d.forEach(function(t,e){t.has([].concat(Pt(r))[0])&&(i=!0,n=e)}),i?r.forEach(function(t){d[n].add(t)}):d.push(new Set(r)))}}),d.forEach(function(t,e){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=t[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var u=c.value,d="horizontal"==x?k.has(u)?T[k.get(u)]:b.get(u):k.has(u)?E[k.get(u)]:b.get(u),p=w.get(u);d<r&&(r=d),n<d&&(n=d),p<i&&(i=p),a<p&&(a=p)}}catch(t){o=!0,l=t}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=t[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var v=m.value;w.set(v,w.get(v)+g)}}catch(t){o=!0,l=t}finally{try{!f&&y.return&&y.return()}finally{if(o)throw l}}})),w},"findAppropriatePositionForRelativePlacement"),l=me(function(t){var e=0,r=0,i=0,n=0;if(t.forEach(function(t){t.left?0<=T[k.get(t.left)]-T[k.get(t.right)]?e++:r++:0<=E[k.get(t.top)]-E[k.get(t.bottom)]?i++:n++}),r<e&&n<i)for(var a=0;a<k.size;a++)T[a]=-1*T[a],E[a]=-1*E[a];else if(r<e)for(var s=0;s<k.size;s++)T[s]=-1*T[s];else if(n<i)for(var o=0;o<k.size;o++)E[o]=-1*E[o]},"applyReflectionForRelativePlacement"),F=me(function(i){var n=[],a=new Ft,s=new Set,o=0;return i.forEach(function(t,e){if(!s.has(e)){for(n[o]=[],a.push(r=e),s.add(r),n[o].push(r);0!=a.length;){var r=a.shift();i.get(r).forEach(function(t){s.has(t.id)||(a.push(t.id),s.add(t.id),n[o].push(t.id))})}o++}}),n},"findComponents"),$=me(function(t){var r=new Map;return t.forEach(function(t,e){r.set(e,[])}),t.forEach(function(t,e){t.forEach(function(t){r.get(e).push(t),r.get(t.id).push({id:e,gap:t.gap,direction:t.direction})})}),r},"dagToUndirected"),z=me(function(t){var r=new Map;return t.forEach(function(t,e){r.set(e,[])}),t.forEach(function(t,e){t.forEach(function(t){r.get(t.id).push({id:e,gap:t.gap,direction:t.direction})})}),r},"dagToReversed"),c=[],h=[],u=!1,d=!1,p=new Set,g=new Map,f=new Map,m=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach(function(t){p.add(t.nodeId)}),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach(function(t){t.left?(g.has(t.left)?g.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):g.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),g.has(t.right)||g.set(t.right,[])):(g.has(t.top)?g.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):g.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),g.has(t.bottom)||g.set(t.bottom,[]))}),m=F(f=$(g))),Bt.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&1<e.fixedNodeConstraint.length)e.fixedNodeConstraint.forEach(function(t,e){c[e]=[t.position.x,t.position.y],h[e]=[T[k.get(t.nodeId)],E[k.get(t.nodeId)]]}),u=!0;else if(e.alignmentConstraint){var y=0;if(e.alignmentConstraint.vertical){for(var G=e.alignmentConstraint.vertical,U=me(function(t){var e=new Set,r=(G[t].forEach(function(t){e.add(t)}),new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))),i=0<r.size?T[k.get(r.values().next().value)]:o(e).x;G[t].forEach(function(t){c[y]=[i,E[k.get(t)]],h[y]=[T[k.get(t)],E[k.get(t)]],y++})},"_loop2"),q=0;q<G.length;q++)U(q);u=!0}if(e.alignmentConstraint.horizontal){for(var j=e.alignmentConstraint.horizontal,W=me(function(t){var e=new Set,r=(j[t].forEach(function(t){e.add(t)}),new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))),i=0<r.size?T[k.get(r.values().next().value)]:o(e).y;j[t].forEach(function(t){c[y]=[T[k.get(t)],i],h[y]=[T[k.get(t)],E[k.get(t)]],y++})},"_loop3"),Y=0;Y<j.length;Y++)W(Y);u=!0}e.relativePlacementConstraint&&(d=!0)}else if(e.relativePlacementConstraint){for(var v,x,b,H,V,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(e.relativePlacementConstraint),d=u=!1):(v=new Map,x=new Map,b=[],m[K].forEach(function(e){g.get(e).forEach(function(t){"horizontal"==t.direction?(v.has(e)?v.get(e).push(t):v.set(e,[t]),v.has(t.id)||v.set(t.id,[]),b.push({left:e,right:t.id})):(x.has(e)?x.get(e).push(t):x.set(e,[t]),x.has(t.id)||x.set(t.id,[]),b.push({top:e,bottom:t.id}))})}),l(b),d=!1,H=t(v,"horizontal"),V=t(x,"vertical"),m[K].forEach(function(t,e){h[e]=[T[k.get(t)],E[k.get(t)]],c[e]=[],H.has(t)?c[e][0]=H.get(t):c[e][0]=T[k.get(t)],V.has(t)?c[e][1]=V.get(t):c[e][1]=E[k.get(t)]}),u=!0)}if(u){for(var C=$t.transpose(c),Z=$t.transpose(h),_=0;_<C.length;_++)C[_]=$t.multGamma(C[_]),Z[_]=$t.multGamma(Z[_]);for(var f=$t.multMat(C,$t.transpose(Z)),u=zt.svd(f),S=$t.multMat(u.V,$t.transpose(u.U)),A=0;A<k.size;A++){var Q=[T[A],E[A]],J=[S[0][0],S[1][0]],tt=[S[0][1],S[1][1]];T[A]=$t.dotProduct(Q,J),E[A]=$t.dotProduct(Q,tt)}d&&l(e.relativePlacementConstraint)}}if(Bt.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&0<e.fixedNodeConstraint.length&&(s={x:0,y:0},e.fixedNodeConstraint.forEach(function(t,e){var r={x:T[k.get(t.nodeId)],y:E[k.get(t.nodeId)]},t=t.position,t=B(t,r);s.x+=t.x,s.y+=t.y}),s.x/=e.fixedNodeConstraint.length,s.y/=e.fixedNodeConstraint.length,T.forEach(function(t,e){T[e]+=s.x}),E.forEach(function(t,e){E[e]+=s.y}),e.fixedNodeConstraint.forEach(function(t){T[k.get(t.nodeId)]=t.position.x,E[k.get(t.nodeId)]=t.position.y})),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var et=e.alignmentConstraint.vertical,rt=me(function(t){var e=new Set,r=(et[t].forEach(function(t){e.add(t)}),0<(t=new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))).size?T[k.get(t.values().next().value)]:o(e).x);e.forEach(function(t){p.has(t)||(T[k.get(t)]=r)})},"_loop4"),it=0;it<et.length;it++)rt(it);if(e.alignmentConstraint.horizontal)for(var nt=e.alignmentConstraint.horizontal,at=me(function(t){var e=new Set,r=(nt[t].forEach(function(t){e.add(t)}),0<(t=new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))).size?E[k.get(t.values().next().value)]:o(e).y);e.forEach(function(t){p.has(t)||(E[k.get(t)]=r)})},"_loop5"),st=0;st<nt.length;st++)at(st)}if(e.relativePlacementConstraint){var L=new Map,N=new Map,I=new Map,R=new Map,ot=new Map,lt=new Map,ct=new Set,ht=new Set;if(p.forEach(function(t){ct.add(t),ht.add(t)}),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var ut=e.alignmentConstraint.vertical,dt=me(function(e){I.set("dummy"+e,[]),ut[e].forEach(function(t){L.set(t,"dummy"+e),I.get("dummy"+e).push(t),p.has(t)&&ct.add("dummy"+e)}),ot.set("dummy"+e,T[k.get(ut[e][0])])},"_loop6"),pt=0;pt<ut.length;pt++)dt(pt);if(e.alignmentConstraint.horizontal)for(var gt=e.alignmentConstraint.horizontal,ft=me(function(e){R.set("dummy"+e,[]),gt[e].forEach(function(t){N.set(t,"dummy"+e),R.get("dummy"+e).push(t),p.has(t)&&ht.add("dummy"+e)}),lt.set("dummy"+e,E[k.get(gt[e][0])])},"_loop7"),mt=0;mt<gt.length;mt++)ft(mt)}var M=new Map,D=new Map,yt=me(function(i){g.get(i).forEach(function(t){var e=void 0,r=void 0;"horizontal"==t.direction?(e=L.get(i)?L.get(i):i,r=L.get(t.id)?{id:L.get(t.id),gap:t.gap,direction:t.direction}:t,M.has(e)?M.get(e).push(r):M.set(e,[r]),M.has(r.id)||M.set(r.id,[])):(e=N.get(i)?N.get(i):i,r=N.get(t.id)?{id:N.get(t.id),gap:t.gap,direction:t.direction}:t,D.has(e)?D.get(e).push(r):D.set(e,[r]),D.has(r.id)||D.set(r.id,[]))})},"_loop8"),vt=!0,f=!1,u=void 0;try{for(var xt,bt=g.keys()[Symbol.iterator]();!(vt=(xt=bt.next()).done);vt=!0)yt(xt.value)}catch(t){f=!0,u=t}finally{try{!vt&&bt.return&&bt.return()}finally{if(f)throw u}}var f=$(M),u=$(D),f=F(f),u=F(u),wt=z(M),kt=z(D),Tt=[],Et=[],Ct=(f.forEach(function(t,e){Tt[e]=[],t.forEach(function(t){0==wt.get(t).length&&Tt[e].push(t)})}),u.forEach(function(t,e){Et[e]=[],t.forEach(function(t){0==kt.get(t).length&&Et[e].push(t)})}),t(M,"horizontal",ct,ot,Tt)),_t=t(D,"vertical",ht,lt,Et),St=me(function(e){I.get(e)?I.get(e).forEach(function(t){T[k.get(t)]=Ct.get(e)}):T[k.get(e)]=Ct.get(e)},"_loop9"),At=!0,f=!1,u=void 0;try{for(var Lt,Nt=Ct.keys()[Symbol.iterator]();!(At=(Lt=Nt.next()).done);At=!0)St(Lt.value)}catch(t){f=!0,u=t}finally{try{!At&&Nt.return&&Nt.return()}finally{if(f)throw u}}var It=me(function(e){R.get(e)?R.get(e).forEach(function(t){E[k.get(t)]=_t.get(e)}):E[k.get(e)]=_t.get(e)},"_loop10"),Rt=!0,f=!1,u=void 0;try{for(var Mt,Dt=_t.keys()[Symbol.iterator]();!(Rt=(Mt=Dt.next()).done);Rt=!0)It(Mt.value)}catch(t){f=!0,u=t}finally{try{!Rt&&Dt.return&&Dt.return()}finally{if(f)throw u}}}}for(var Ot=0;Ot<i.length;Ot++){var O=i[Ot];null==O.getChild()&&O.setCenter(T[k.get(O.id)],E[k.get(O.id)])}},t.exports=i},551:t=>{t.exports=e}},n={},me(r,"__webpack_require__"),r(45);function r(t){var e=n[t];return void 0===e&&(e=n[t]={exports:{}},i[t](e,e.exports,r)),e.exports}var i,n})}),GOt=iPt((r,i)=>{me(function(t,e){"object"==typeof r&&"object"==typeof i?i.exports=e(zOt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(zOt()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return i={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var t=arguments.length,e=Array(1<t?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];return e.forEach(function(e){Object.keys(e).forEach(function(t){return r[t]=e[t]})}),r}},548:(t,e,r)=>{me(C,"sliceIterator");var i=r(140).layoutBase.LinkedList;function C(t,e){var r=[],i=!0,n=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(i=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);i=!0);}catch(t){n=!0,a=t}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var i={},e=0;e<t.length;e++)i[t[e].id()]=!0;return t.filter(function(t,e){for(var r=(t="number"==typeof t?e:t).parent()[0];null!=r;){if(i[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,s,o,t){for(var l=new i,c=new Set,h=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],e=me(function(){var i=a.collection(),n=(y.push(i),o[0]),t=a.collection();t.merge(n).merge(n.descendants().intersection(s)),h.push(n),t.forEach(function(t){l.push(t),c.add(t),i.merge(t)});for(var e,r=me(function(){n=l.shift();var e=a.collection();n.neighborhood().nodes().forEach(function(t){0<s.intersection(n.edgesWith(t)).length&&e.merge(t)});for(var t=0;t<e.length;t++){var r=e[t];null==(u=o.intersection(r.union(r.ancestors())))||c.has(u[0])||u.union(u.descendants()).forEach(function(t){l.push(t),c.add(t),i.merge(t),o.has(t)&&h.push(t)})}},"_loop2");0!=l.length;)r();i.forEach(function(t){s.intersection(t.connectedEdges()).forEach(function(t){i.has(t.source())&&i.has(t.target())&&i.merge(t)})}),(!(g=h.length==o.length||g)||1<f)&&(d=h[0],p=d.connectedEdges().length,h.forEach(function(t){t.connectedEdges().length<p&&(p=t.connectedEdges().length,d=t)}),m.push(d.id()),(e=a.collection()).merge(h[0]),h.forEach(function(t){e.merge(t)}),h=[],o=o.difference(e),f++)},"_loop");e(),!g;);return t&&0<m.length&&t.set("dummy"+(t.size+1),m),y},relocateComponent:function(t,n,e){if(!e.fixedNodeConstraint){var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if("draft"==e.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=(t=>{if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return C(t,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=e.cy.getElementById(v);b&&(d=b.boundingBox(),p=n.xCoords[x]-d.w/2,g=n.xCoords[x]+d.w/2,f=n.yCoords[x]-d.h/2,m=n.yCoords[x]+d.h/2,p<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(t){i=!0,c=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw c}}var w=t.x-(s+a)/2,k=t.y-(l+o)/2;n.xCoords=n.xCoords.map(function(t){return t+w}),n.yCoords=n.yCoords.map(function(t){return t+k})}else{Object.keys(n).forEach(function(t){var e=(t=n[t]).getRect().x,r=t.getRect().x+t.getRect().width,i=t.getRect().y,t=t.getRect().y+t.getRect().height;e<a&&(a=e),s<r&&(s=r),i<o&&(o=i),l<t&&(l=t)});var T=t.x-(s+a)/2,E=t.y-(l+o)/2;Object.keys(n).forEach(function(t){(t=n[t]).setCenter(t.getCenterX()+T,t.getCenterY()+E)})}}},calcBoundingBox:function(t,e,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=t.descendants().not(":parent"),c=l.length,h=0;h<c;h++){var u,d=l[h];(u=e[i.get(d.id())]-d.width()/2)<n&&(n=u),a<(u=e[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(t={}).topLeftX=n,t.topLeftY=s,t.width=a-n,t.height=o-s,t},calcParentsWithoutChildren:function(t,e){var r=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||r.merge(t)}),r}}},816:(t,e,r)=>{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=me(function(c,t){var e=c.cy,r=(n=c.eles).nodes(),i=n.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),me(function(t){return"function"==typeof t},"isFn")),m=me(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,n),t=me(function t(e,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?e.add(new x(i.graphManager,new b(o.topLeftX,o.topLeftY),new w(o.width,o.height))):e.add(new x(i.graphManager,new b(o.topLeftX,o.topLeftY),new w(parseFloat(u.w),parseFloat(u.h))))):e.add(new x(i.graphManager,new b(p[d.get(l.id())]-u.w/2,g[d.get(l.id())]-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):e.add(new x(i.graphManager,new b(l.position("x")-u.w/2,l.position("y")-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):e.add(new x(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&&t(i.getGraphManager().add(i.newGraph(),h),c,i,n)}},"processChildrenList"),e=me(function(t,e,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=e.add(t.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?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=i/n:h(c.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,k.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,k.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},"processEdges"),n=me(function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)},"processConstraints"),a=(null!=c.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),null!=c.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=c.gravity),null!=c.numIter&&(k.MAX_ITERATIONS=u.MAX_ITERATIONS=c.numIter),null!=c.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),null!=c.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),null!=c.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),null!=c.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),null!=c.tilingCompareBy&&(k.TILING_COMPARE_BY=c.tilingCompareBy),l.QUALITY="proof"==c.quality?2:0,k.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!c.randomize,k.ANIMATE=u.ANIMATE=l.ANIMATE=c.animate,k.TILE=c.tile,k.TILING_PADDING_VERTICAL="function"==typeof c.tilingPaddingVertical?c.tilingPaddingVertical.call():c.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof c.tilingPaddingHorizontal?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!c.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,"transformed"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==c.step&&(c.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?k.TREE_REDUCTION_ON_INCREMENTAL=!1:k.TREE_REDUCTION_ON_INCREMENTAL=!0,new o),s=a.newGraphManager();return t(s.addRoot(),v.getTopMostNodes(r),a,c),e(a,s,i),n(a,c),a.runLayout(),f},"coseLayout");t.exports={coseLayout:r}},212:(t,e,r)=>{function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}me(i,"defineProperties"),me(n,"_classCallCheck");var a,s,o=r(658),b=r(548),w=r(657).spectralLayout,k=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:me(function(t){return 4500},"nodeRepulsion"),idealEdgeLength:me(function(t){return 50},"idealEdgeLength"),edgeElasticity:me(function(t){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:me(function(){},"ready"),stop:me(function(){},"stop")}),r=(me(c,"Layout"),a=c,s=[{key:"run",value:me(function(){var h=this.options,t=h.cy,e=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(t.layoutUtilities&&h.packComponents&&(n=(n=t.layoutUtilities("get"))||t.layoutUtilities(),a=!0),0<e.nodes().length)if(a){if(a=b.getTopMostNodes(h.eles.nodes()),(r=b.connectComponents(t,h.eles,a)).forEach(function(t){t=t.boundingBox(),i.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),h.randomize&&r.forEach(function(t){h.eles=t,u.push(w(h))}),"default"==h.quality||"proof"==h.quality){var s=t.collection();if(h.tile){var a=new Map,o=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},c=[];if(r.forEach(function(r,t){0==r.edges().length&&(r.nodes().forEach(function(t,e){s.merge(r.nodes()[e]),t.isParent()||(l.nodeIndexes.set(r.nodes()[e].id(),o++),l.xCoords.push(r.nodes()[0].position().x),l.yCoords.push(r.nodes()[0].position().y))}),c.push(t))}),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(t,e){h.eles=t,d.push(k(h,u[e])),b.relocateComponent(i[e],d[e],h)})}else r.forEach(function(t,e){b.relocateComponent(i[e],u[e],h)});var g,f,m,y,v=new Set;1<r.length&&(g=[],f=e.filter(function(t){return"none"==t.css("display")}),r.forEach(function(t,o){var l,r,c=void 0;"draft"==h.quality&&(c=u[o].nodeIndexes),0<t.nodes().not(f).length&&(l={edges:[],nodes:[]},t.nodes().not(f).forEach(function(t){var e;"draft"==h.quality?t.isParent()?(e=b.calcBoundingBox(t,u[o].xCoords,u[o].yCoords,c),l.nodes.push({x:e.topLeftX,y:e.topLeftY,width:e.width,height:e.height})):(r=c.get(t.id()),l.nodes.push({x:u[o].xCoords[r]-t.boundingbox().w/2,y:u[o].yCoords[r]-t.boundingbox().h/2,width:t.boundingbox().w,height:t.boundingbox().h})):d[o][t.id()]&&l.nodes.push({x:d[o][t.id()].getLeft(),y:d[o][t.id()].getTop(),width:d[o][t.id()].getWidth(),height:d[o][t.id()].getHeight()})}),t.edges().forEach(function(t){var e,r,i,n,a,s=t.source(),t=t.target();"none"!=s.css("display")&&"none"!=t.css("display")&&("draft"==h.quality?(e=c.get(s.id()),r=c.get(t.id()),i=[],n=[],s.isParent()?(a=b.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[e]),i.push(u[o].yCoords[e])),t.isParent()?(a=b.calcBoundingBox(t,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][t.id()]&&l.edges.push({startX:d[o][s.id()].getCenterX(),startY:d[o][s.id()].getCenterY(),endX:d[o][t.id()].getCenterX(),endY:d[o][t.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(t,e){var r=t.xCoords.map(function(t){return t+m[e].dx}),i=t.yCoords.map(function(t){return t+m[e].dy});t.xCoords=r,t.yCoords=i}):(y=0,v.forEach(function(e){Object.keys(d[e]).forEach(function(t){(t=d[e][t]).setCenter(t.getCenterX()+m[y].dx,t.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(k(h,u[0])),b.relocateComponent(i[0],d[0],h)):b.relocateComponent(i[0],u[0],h);var x=me(function(r,t){var e,i,n,a;return"default"==h.quality||"proof"==h.quality?(i=e=void 0,n=(r="number"==typeof r?t:r).data("id"),d.forEach(function(t){n in t&&(e={x:t[n].getRect().getCenterX(),y:t[n].getRect().getCenterY()},i=t[n])}),h.nodeDimensionsIncludeLabels&&(i.labelWidth&&("left"==i.labelPosHorizontal?e.x+=i.labelWidth/2:"right"==i.labelPosHorizontal&&(e.x-=i.labelWidth/2)),i.labelHeight)&&("top"==i.labelPosVertical?e.y+=i.labelHeight/2:"bottom"==i.labelPosVertical&&(e.y-=i.labelHeight/2)),{x:(e=null==e?{x:r.position("x"),y:r.position("y")}:e).x,y:e.y}):(a=void 0,u.forEach(function(t){var e=t.nodeIndexes.get(r.id());null!=e&&(a={x:t.xCoords[e],y:t.yCoords[e]})}),{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=b.calcParentsWithoutChildren(t,e),n=e.filter(function(t){return"none"==t.css("display")}),h.eles=e.not(n),e.nodes().not(":parent").not(n).layoutPositions(this,h,x),0<a.length&&a.forEach(function(t){t.position(x(t))})):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(t){n(this,c),this.options=o({},l,t)}t.exports=r},657:(t,e,r)=>{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=me(function(t){var n=t.cy,a=t.eles,e=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],h=[],v=[],x=[],u=[],b=[],w=void 0,k=t.piTol,i=t.samplingType,T=t.nodeSeparation,d=void 0,P=me(function(){for(var t=0,e=!1;t<d;){for(var r=Math.floor(Math.random()*w),e=!1,i=0;i<t;i++)if(h[i]==r){e=!0;break}e||(h[t]=r,t++)}},"randomSampleCR"),p=me(function(t,e,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]=t]=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);x[u][e]=o[u]*T}if(r){for(var g=0;g<w;g++)x[g][e]<v[g]&&(v[g]=x[g][e]);for(var f=0;f<w;f++)l<v[f]&&(l=v[f],c=f)}return c},"BFS"),l=me(function(t){var e=void 0;if(t){for(var e=Math.floor(Math.random()*w),r=0;r<w;r++)v[r]=1e8;for(var i=0;i<d;i++)e=p(h[i]=e,i,t)}else{P();for(var n=0;n<d;n++)p(h[n],n,t,!1)}for(var a=0;a<w;a++)for(var s=0;s<d;s++)x[a][s]*=x[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]=x[h[c]][l]},"allBFS"),B=me(function(){for(var t=(r=q.svd(u)).S,e=r.U,r=r.V,i=t[0]*t[0]*t[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]=t[a]/(t[a]*t[a]+i/(t[a]*t[a])))}b=U.multMat(U.multMat(r,n),U.transpose(e))},"sample"),F=me(function(){for(var t=void 0,e=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),x,b)),t=U.dotProduct(n,r),r=U.normalize(r),o=U.dotProduct(n,r),(c=Math.abs(o/l))<=1+k&&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),x,b)),e=U.dotProduct(a,i),i=U.normalize(i),o=U.dotProduct(a,i),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var p=0;p<w;p++)a[p]=i[p];g=U.multCons(n,Math.sqrt(Math.abs(t))),f=U.multCons(a,Math.sqrt(Math.abs(e)))},"powerIteration");G.connectComponents(n,a,G.getTopMostNodes(e),s),r.forEach(function(t){G.connectComponents(n,a,G.getTopMostNodes(t.descendants().intersection(a)),s)});for(var c=0,E=0;E<e.length;E++)e[E].isParent()||m.set(e[E].id(),c++);var C=!0,_=!1,S=void 0;try{for(var A,L=s.keys()[Symbol.iterator]();!(C=(A=L.next()).done);C=!0){var $=A.value;m.set($,c++)}}catch(t){_=!0,S=t}finally{try{!C&&L.return&&L.return()}finally{if(_)throw S}}for(var N=0;N<m.size;N++)y[N]=[];r.forEach(function(t){for(var e=t.children().intersection(a);0==e.nodes(":childless").length;)e=e.nodes()[0].children().intersection(a);var r=0,i=e.nodes(":childless")[0].connectedEdges().length;e.nodes(":childless").forEach(function(t,e){t.connectedEdges().length<i&&(i=t.connectedEdges().length,r=e)}),o.set(t.id(),e.nodes(":childless")[r].id())}),e.forEach(function(e){var r=e.isParent()?m.get(o.get(e.id())):m.get(e.id());e.neighborhood().nodes().forEach(function(t){0<a.intersection(e.edgesWith(t)).length&&(t.isParent()?y[r].push(o.get(t.id())):y[r].push(t.id()))})});var z=me(function(e){var r,i=m.get(e);s.get(e).forEach(function(t){r=n.getElementById(t).isParent()?o.get(t):t,y[i].push(r),y[m.get(r)].push(e)})},"_loop"),I=!0,_=!1,S=void 0;try{for(var R,M=s.keys()[Symbol.iterator]();!(I=(R=M.next()).done);I=!0)z(R.value)}catch(t){_=!0,S=t}finally{try{!I&&M.return&&M.return()}finally{if(_)throw S}}if(2<(w=m.size)){for(var d=w<t.sampleSize?w:t.sampleSize,D=0;D<w;D++)x[D]=[];for(var O=0;O<d;O++)b[O]=[];"draft"==t.quality||"all"==t.step?(l(i),B(),F()):m.forEach(function(t,e){g.push(n.getElementById(e).position("x")),f.push(n.getElementById(e).position("y"))})}else r=m.keys(),S=(_=n.getElementById(r.next().value)).position(),l=_.outerWidth(),g.push(S.x),f.push(S.y),2==w&&(i=n.getElementById(r.next().value).outerWidth(),g.push(S.x+l/2+i/2+t.idealEdgeLength),f.push(S.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");t.exports={spectralLayout:r}},579:(t,e,r)=>{var i=r(212),r=me(function(t){t&&t("layout","fcose",i)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},n={},me(r,"__webpack_require__"),r(579);function r(t){var e=n[t];return void 0===e&&(e=n[t]={exports:{}},i[t](e,e.exports,r)),e.exports}var i,n})}),UOt=t(()=>{qt(),NOt=me(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),IOt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:NOt('<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:NOt('<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:NOt('<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:NOt('<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:NOt('<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:Rt,blank:{body:NOt("")}}}}),qOt=t(()=>{qt(),fu(),W9(),POt(),UOt(),oOt(),ROt=me(async function(w,t){let k=lOt("padding"),e=lOt("iconSize"),T=e/2,E=e/6,C=E/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:i,sourceGroup:n,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=nOt(t),{x:h,y:u}=t[0].sourceEndpoint(),{x:d,y:p}=t[0].midpoint(),{x:g,y:f}=t[0].targetEndpoint(),m=k+4;var y,v,x,b;n&&(HDt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(HDt(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==COt.getNode(e)?.type||(HDt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==COt.getNode(a)?.type||(HDt(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),i&&(b=HDt(r)?jDt[r](h,E):h-C,y=VDt(r)?jDt[r](u,E):u-C,t.insert("polygon").attr("points",qDt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=HDt(s)?jDt[s](g,E):g-C,y=VDt(s)?jDt[s](f,E):f-C,t.insert("polygon").attr("points",qDt[s](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=XDt(r,s)?"XY":HDt(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=t.append("g"),await j9(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},D()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=QDt(r,s))&&KDt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=tOt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",`
translate(${d}, ${p-t.height/2})
translate(${y*x.width/2}, ${v*x.height/2})
rotate(${-1*y*v*45}, 0, ${t.height/2})
`)))}))},"drawEdges"),MOt=me(async function(l,t){let c=.75*lOt("padding"),h=lOt("fontSize"),u=lOt("iconSize")/2;await Promise.all(t.nodes().map(async i=>{var n=aOt(i);if("group"===n.type){var{h:i,w:a,x1:s,y1:o}=i.boundingBox();l.append("rect").attr("x",s+u).attr("y",o+u).attr("width",a).attr("height",i).attr("class","node-bkg");let t=l.append("g"),e=s,r=o;n.icon&&((i=t.append("g")).html(`<g>${await Bt(n.icon,{height:c,width:c,fallbackPrefix:IOt.prefix})}</g>`),i.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),n.label&&(s=t.append("g"),await j9(s,n.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),DOt=me(async function(t,e,r){for(var i of r){var n=e.append("g"),a=lOt("iconSize"),s=(i.title&&(s=n.append("g"),await j9(s,i.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),s.attr("transform","translate("+a/2+", "+a+")")),n.append("g")),{width:o,height:l}=(i.icon?s.html(`<g>${await Bt(i.icon,{height:a,width:a,fallbackPrefix:IOt.prefix})}</g>`):i.iconText?(s.html(`<g>${await Bt("blank",{height:a,width:a,fallbackPrefix:IOt.prefix})}</g>`),o=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(i.iconText),l=parseInt(window.getComputedStyle(o.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,o.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):s.append("path").attr("class","node-bkg").attr("id","node-"+i.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),n.attr("class","architecture-service"),n._groups[0][0].getBBox());i.width=o,i.height=l,t.setElementForId(i.id,n)}return 0},"drawServices"),OOt=me(function(n,a,t){t.forEach(t=>{var e=a.append("g"),r=lOt("iconSize"),{width:r,height:i}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=i,n.setElementForId(t.id,e)})},"drawJunctions")});function jOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:lOt("iconSize"),height:lOt("iconSize")},classes:"node-service"})})}function WOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:lOt("iconSize"),height:lOt("iconSize")},classes:"node-junction"})})}function YOt(r,t){t.nodes().map(t=>{var e=aOt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function HOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function VOt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:i,lhsGroup:n,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=t,t=XDt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,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:t})})}function XOt(s,t,u){let e=me((t,h)=>Object.entries(t).reduce((r,[i,t])=>{let n=0,a=Object.entries(t);if(1===a.length)r[i]=a[0][1];else for(let e=0;e<a.length-1;e++)for(let t=e+1;t<a.length;t++){var[s,o]=a[e],[l,c]=a[t];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=t.map(t=>{let n={},a={};return Object.entries(t).forEach(([t,[e,r]])=>{var i=s.getNode(t)?.in??"default";n[r]??={},n[r][i]??=[],n[r][i].push(t),a[e]??={},a[e][i]??=[],a[e][i].push(t)}),{horiz:Object.values(e(n,"horizontal")).filter(t=>1<t.length),vert:Object.values(e(a,"vertical")).filter(t=>1<t.length)}}),[i,n]=r.reduce(([t,e],{horiz:r,vert:i})=>[[...t,...r],[...e,...i]],[[],[]]);return{horizontal:i,vertical:n}}function KOt(t){let l=[],c=me(t=>t[0]+","+t[1],"posToStr"),h=me(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntries(Object.entries(t).map(([t,e])=>[c(e),t])),s=[c([0,0])],o={},e={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=h(r);Object.entries(e).forEach(([t,e])=>{var e=c([i[0]+e[0],i[1]+e[1]]),r=a[e];r&&!o[e]&&(s.push(e),l.push({[UDt[t]]:r,[UDt[WDt(t)]]:n,gap:1.5*lOt("iconSize")}))})}}}}),l}function ZOt(n,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(e=>{let t=j("body").append("div").attr("id","cy").attr("style","display:none"),s=h9t({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":lOt("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:lOt("padding")+"px"}}]}),r=(t.remove(),HOt(l,s),jOt(n,s),WOt(a,s),VOt(c,s),XOt(h,u,d)),i=KOt(u),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=aOt(t).parent)===aOt(e).parent?1.5*lOt("iconSize"):.5*lOt("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=aOt(t).parent)===aOt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:i});o.one("layoutstop",()=>{function t(t,e,r,i){var{x:t,y:n}=t,{x:e,y:a}=e,s=(i-n+(t-r)*(n-a)/(t-e))/Math.sqrt(1+Math.pow((n-a)/(t-e),2)),o=Math.sqrt(Math.pow(i-n,2)+Math.pow(r-t,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(e-t,2)+Math.pow(a-n,2));let l=(e-t)*(i-n)-(a-n)*(r-t);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(e-t)*(r-t)+(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}}me(t,"getSegmentWeights"),s.startBatch();for(var e of Object.values(s.edges())){var r,i,n,a;e.data?.()&&({x:n,y:i}=e.source().position(),{x:a,y:r}=e.target().position(),n!==a)&&i!==r&&(n=e.sourceEndpoint(),a=e.targetEndpoint(),i=nOt(e).sourceDir,[r,i]=VDt(i)?[n.x,a.y]:[a.x,n.y],{weights:n,distances:a}=t(n,a,r,i),e.style("segment-distances",a),e.style("segment-weights",n))}s.endBatch(),o.run()}),o.run(),s.ready(t=>{M.info("Ready",t),e(s)})})}var QOt,JOt,tPt=t(()=>{qt(),u9t(),QOt=tt(GOt(),1),Z3(),e(),tmt(),th(),POt(),UOt(),oOt(),qOt(),Ot([{name:IOt.prefix,icons:IOt}]),h9t.use(QOt.default),me(jOt,"addServices"),me(WOt,"addJunctions"),me(YOt,"positionNodes"),me(HOt,"addGroups"),me(VOt,"addEdges"),me(XOt,"getAlignments"),me(KOt,"getRelativeConstraints"),me(ZOt,"layoutArchitecture"),QOt=me(async(t,e,r,i)=>{var n=(i=i.db).getServices(),a=i.getJunctions(),s=i.getGroups(),o=i.getEdges(),l=i.getDataStructures(),c=(e=Hft(e)).append("g"),h=(c.attr("class","architecture-edges"),(u=e.append("g")).attr("class","architecture-services"),e.append("g")),u=(h.attr("class","architecture-groups"),await DOt(i,u,n),OOt(i,u,a),await ZOt(n,a,s,o,i,l));await ROt(c,u),await MOt(h,u),YOt(i,u),Vc(void 0,e,lOt("padding"),lOt("useMaxWidth"))},"draw"),JOt={draw:QOt}}),ePt={};lPt(ePt,{diagram:()=>rPt});var rPt,iPt,nPt=t(()=>{BOt(),POt(),FOt(),tPt(),rPt={parser:SOt,db:COt,renderer:JOt,styles:LOt}}),aPt=(lPt(iPt={},{default:()=>mFt}),qt(),Fr(),Gr(),{id:"c4",detector:me(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:me(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(TC(),wC))).diagram}),"loader")}),sPt={id:"flowchart",detector:me((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:me(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(ZX(),YX))).diagram}),"loader")},oPt="flowchart-v2",t=me((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(ZX(),YX))).diagram;return{id:oPt,diagram:t}},"loader"),cPt={id:oPt,detector:t,loader:lPt},hPt={id:"er",detector:me(t=>/^\s*erDiagram/.test(t),"detector"),loader:me(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(cK(),oK))).diagram}),"loader")},uPt={id:"gitGraph",detector:me(t=>/^\s*gitGraph/.test(t),"detector"),loader:me(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(n1t(),t1t))).diagram}),"loader")},dPt={id:"gantt",detector:me(t=>/^\s*gantt/.test(t),"detector"),loader:me(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(Kft(),zft))).diagram}),"loader")},pPt={id:"info",detector:me(t=>/^\s*info/.test(t),"detector"),loader:me(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(kmt(),rmt))).diagram}),"loader")},gPt={id:"pie",detector:me(t=>/^\s*pie/.test(t),"detector"),loader:me(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(Mmt(),Smt))).diagram}),"loader")},fPt="quadrantChart",t=me(t=>/^\s*quadrantChart/.test(t),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(gyt(),hyt))).diagram;return{id:fPt,diagram:t}},"loader"),mPt={id:fPt,detector:t,loader:lPt},yPt={id:"xychart",detector:me(t=>/^\s*xychart-beta/.test(t),"detector"),loader:me(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(N2t(),T2t))).diagram}),"loader")},vPt="requirement",t=me(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(Evt(),B2t))).diagram;return{id:vPt,diagram:t}},"loader"),xPt={id:vPt,detector:t,loader:lPt},bPt={id:"sequence",detector:me(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:me(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(gxt(),Qvt))).diagram}),"loader")},wPt={id:"class",detector:me((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:me(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(kxt(),bxt))).diagram}),"loader")},kPt="classDiagram",t=me((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(cbt(),Txt))).diagram;return{id:kPt,diagram:t}},"loader"),TPt={id:kPt,detector:t,loader:lPt},EPt={id:"state",detector:me((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:me(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(p4t(),u4t))).diagram}),"loader")},CPt="stateDiagram",t=me((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),lPt=me(async()=>{var t=(await Promise.resolve().then(()=>(Y4t(),g4t))).diagram;return{id:CPt,diagram:t}},"loader"),_Pt={id:CPt,detector:t,loader:lPt},SPt={id:"journey",detector:me(t=>/^\s*journey/.test(t),"detector"),loader:me(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(p5t(),c5t))).diagram}),"loader")},APt=(e(),tmt(),th(),t={draw:me((t,e,r)=>{M.debug(`rendering svg for syntax error
`);var i=(e=Hft(e)).append("g");e.attr("viewBox","0 0 2412 512"),Hc(e,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")}),LPt={db:{},renderer:t,parser:{parse:me(()=>{},"parse")}},NPt="flowchart-elk",lPt=me((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),t=me(async()=>{var t=(await Promise.resolve().then(()=>(ZX(),YX))).diagram;return{id:NPt,diagram:t}},"loader"),IPt={id:NPt,detector:lPt,loader:t},RPt={id:"timeline",detector:me(t=>/^\s*timeline/.test(t),"detector"),loader:me(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(C3t(),s3t))).diagram}),"loader")},MPt={id:"mindmap",detector:me(t=>/^\s*mindmap/.test(t),"detector"),loader:me(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(hLt(),F9t))).diagram}),"loader")},DPt={id:"kanban",detector:me(t=>/^\s*kanban/.test(t),"detector"),loader:me(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(ILt(),fLt))).diagram}),"loader")},OPt={id:"sankey",detector:me(t=>/^\s*sankey-beta/.test(t),"detector"),loader:me(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(cIt(),jNt))).diagram}),"loader")},PPt={id:"packet",detector:me(t=>/^\s*packet-beta/.test(t),"detector"),loader:me(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(RIt(),gIt))).diagram}),"loader")},BPt={id:"radar",detector:me(t=>/^\s*radar-beta/.test(t),"detector"),loader:me(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(JIt(),XIt))).diagram}),"loader")},FPt={id:"block",detector:me(t=>/^\s*block-beta/.test(t),"detector"),loader:me(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(sOt(),zDt))).diagram}),"loader")},$Pt="architecture",lPt=me(t=>/^\s*architecture/.test(t),"detector"),t=me(async()=>{var t=(await Promise.resolve().then(()=>(nPt(),ePt))).diagram;return{id:$Pt,diagram:t}},"loader"),zPt={id:$Pt,detector:lPt,loader:t},GPt=(Gr(),fu(),!1),UPt=me(()=>{GPt||(GPt=!0,kh("error",LPt,t=>"error"===t.toLowerCase().trim()),kh("---",{db:{clear:me(()=>{},"clear")},styles:{},renderer:{draw:me(()=>{},"draw")},parser:{parse:me(()=>{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:me(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Zt(aPt,DPt,TPt,wPt,hPt,dPt,pPt,gPt,xPt,bPt,IPt,cPt,sPt,MPt,RPt,uPt,_Pt,EPt,SPt,mPt,OPt,PPt,yPt,FPt,zPt,BPt))},"addDiagrams"),qPt=(e(),Gr(),fu(),me(async()=>{M.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Xt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Th(t)}catch{try{var{diagram:i,id:n}=await r();kh(n,i,e)}catch(e){throw M.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Xt[t],e}}}))).filter(t=>"rejected"===t.status);if(0<t.length){M.error(`Failed to load ${t.length} external diagrams`);for(var e of t)M.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams")),jPt=(e(),Z3(),"comm"),WPt="rule",YPt="decl",HPt=Math.abs,VPt=String.fromCharCode;function XPt(t){return t.trim()}function KPt(t,e,r){return t.replace(e,r)}function ZPt(t,e,r){return t.indexOf(e,r)}function QPt(t,e){return 0|t.charCodeAt(e)}function JPt(t,e,r){return t.slice(e,r)}function tBt(t){return t.length}function eBt(t){return t.length}function rBt(t,e){return e.push(t),t}me(XPt,"trim"),me(KPt,"replace"),me(ZPt,"indexof"),me(QPt,"charat"),me(JPt,"substr"),me(tBt,"strlen"),me(eBt,"sizeof"),me(rBt,"append");var iBt=1,nBt=1,aBt=0,sBt=0,oBt=0,lBt="";function cBt(t,e,r,i,n,a,s,o){return{value:t,root:e,parent:r,type:i,props:n,children:a,line:iBt,column:nBt,length:s,return:"",siblings:o}}function hBt(){return oBt=0<sBt?QPt(lBt,--sBt):0,nBt--,10===oBt&&(nBt=1,iBt--),oBt}function uBt(){return oBt=sBt<aBt?QPt(lBt,sBt++):0,nBt++,10===oBt&&(nBt=1,iBt++),oBt}function dBt(){return QPt(lBt,sBt)}function pBt(t,e){return JPt(lBt,t,e)}function gBt(t){switch(t){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 fBt(t){return iBt=nBt=1,aBt=tBt(lBt=t),sBt=0,[]}function mBt(t){return lBt="",t}function yBt(t){return XPt(pBt(sBt-1,bBt(91===t?t+2:40===t?t+1:t)))}function vBt(t){for(;(oBt=dBt())&&oBt<33;)uBt();return 2<gBt(t)||3<gBt(oBt)?"":" "}function xBt(t,e){for(;--e&&uBt()&&!(oBt<48||102<oBt||57<oBt&&oBt<65||70<oBt&&oBt<97););return pBt(t,sBt+(e<6&&32==dBt()&&32==uBt()))}function bBt(t){for(;uBt();)switch(oBt){case t:return sBt;case 34:case 39:34!==t&&39!==t&&bBt(oBt);break;case 40:41===t&&bBt(t);break;case 92:uBt()}return sBt}function wBt(t,e){for(;uBt()&&t+oBt!==57&&(t+oBt!==84||47!==dBt()););return"/*"+pBt(e,sBt-1)+"*"+VPt(47===t?t:uBt())}function kBt(t){for(;!gBt(dBt());)uBt();return pBt(t,sBt)}function TBt(t){return mBt(EBt("",null,null,null,[""],t=fBt(t),0,[0],t))}function EBt(t,e,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,x=1,b=0,w="",k=n,T=w;v;)switch(c=b,b=uBt()){case 40:if(108!=c&&58==QPt(T,g-1)){-1!=ZPt(T+=KPt(yBt(b),"&","&\f"),"&\f",HPt(d?o[d-1]:0))&&(x=-1);break}case 34:case 39:case 91:T+=yBt(b);break;case 9:case 10:case 13:case 32:T+=vBt(c);break;case 92:T+=xBt(sBt-1,7);continue;case 47:switch(dBt()){case 42:case 47:rBt(_Bt(wBt(uBt(),sBt),e,r,l),l),5!=gBt(c||1)&&5!=gBt(dBt()||1)||!tBt(T)||" "===JPt(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*y:o[d++]=tBt(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+p:-1==x&&(T=KPt(T,/\f/g,"")),0<m&&(tBt(T)-g||0===y&&47===c)&&rBt(32<m?SBt(T+";",i,r,g-1,l):SBt(KPt(T," ","")+";",i,r,g-2,l),l);break;case 59:T+=";";default:if(rBt(u=CBt(T,e,r,d,p,n,o,w,k=[],h=[],g,a),a),123===b)if(0===p)EBt(T,e,u,u,k,a,g,o,h);else{switch(f){case 99:if(110===QPt(T,3))break;case 108:if(97===QPt(T,2))break;default:p=0;case 100:case 109:case 115:}p?EBt(t,u,u,i&&rBt(CBt(t,u,u,0,0,n,o,w,n,k=[],g,h),h),n,h,g,o,i?k:h):EBt(T,u,u,u,[""],h,0,o,h)}}d=p=m=0,y=x=1,w=T="",g=s;break;case 58:g=1+tBt(T),m=c;default:if(y<1)if(123==b)--y;else if(125==b&&0==y++&&125==hBt())continue;switch(T+=VPt(b),b*y){case 38:x=0<p?1:(T+="\f",-1);break;case 44:o[d++]=(tBt(T)-1)*x,x=1;break;case 64:45===dBt()&&(T+=yBt(uBt())),f=dBt(),p=g=tBt(w=T+=kBt(sBt)),b++;break;case 45:45===c&&2==tBt(T)&&(y=0)}}return a}function CBt(t,e,r,i,n,a,s,o,l,c,h,u){for(var d,p=n-1,g=0===n?a:[""],f=eBt(g),m=0,y=0;m<i;++m)for(var v,x=0,b=JPt(t,p+1,p=HPt(d=s[m]));x<f;++x)(v=XPt(0<d?g[x]+" "+b:KPt(b,/&\f/g,g[x])))&&(l[y++]=v);return cBt(t,e,r,0===n?WPt:o,l,c,h,u)}function _Bt(t,e,r,i){return cBt(t,e,r,jPt,VPt(oBt),JPt(t,2,-2),0,i)}function SBt(t,e,r,i,n){return cBt(t,e,r,YPt,JPt(t,0,i),JPt(t,i+1,-1),i,n)}function ABt(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function LBt(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case YPt:return t.return=t.return||t.value;case jPt:return"";case"@keyframes":return t.return=t.value+"{"+ABt(t.children,i)+"}";case WPt:if(!tBt(t.value=t.props.join(",")))return""}return tBt(r=ABt(t.children,i))?t.return=t.value+"{"+r+"}":""}function NBt(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function IBt(t,e,r,i){var n;void 0!==t.insert&&(r&&(t.attr("aria-describedby",n="chart-desc-"+i),t.insert("desc",":first-child").attr("id",n).text(r)),e)&&(t.attr("aria-labelledby",n="chart-title-"+i),t.insert("title",":first-child").attr("id",n).text(e))}me(cBt,"node"),me(function(){return oBt},"char"),me(hBt,"prev"),me(uBt,"next"),me(dBt,"peek"),me(function(){return sBt},"caret"),me(pBt,"slice"),me(gBt,"token"),me(fBt,"alloc"),me(mBt,"dealloc"),me(yBt,"delimit"),me(vBt,"whitespace"),me(xBt,"escaping"),me(bBt,"delimiter"),me(wBt,"commenter"),me(kBt,"identifier"),me(TBt,"compile"),me(EBt,"parse"),me(CBt,"ruleset"),me(_Bt,"comment"),me(SBt,"declaration"),me(ABt,"serialize"),me(LBt,"stringify"),Mn(),sq(),Qft(),me(NBt,"setA11yDiagramInfo"),me(IBt,"addSVGa11yTitleDescription"),qr(),Ai(),Ai(),fu(),Gr(),zr(),KE();var RBt=class yFt{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{me(this,"Diagram")}static async fromText(t,e={}){var r=Nr(),i=Kt(t,r);t=HE(t)+`
`;try{Th(i)}catch{if(!(n=Jt(i)))throw new Vt(`Diagram ${i} not found.`);var{id:n,diagram:a}=await n();kh(n,a)}var{db:n,parser:a,renderer:s,init:o}=Th(i);return a.parser&&(a.parser.yy=n),n.clear?.(),o?.(r),e.title&&n.setDiagramTitle?.(e.title),await a.parse(t),new yFt(i,t,n,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},MBt=(Jc(),[]),DBt=me(()=>{MBt.forEach(t=>{t()}),MBt=[]},"attachFunctions"),OBt=(e(),me(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function PBt(t){var e,r,i=t.match(Wt);return i?(r={},(e="object"!=typeof(e=NA(i[1],{schema:LA})??{})||Array.isArray(e)?{}:e).displayMode&&(r.displayMode=e.displayMode.toString()),e.title&&(r.title=e.title.toString()),e.config&&(r.config=e.config),{text:t.slice(i[0].length),metadata:r}):{text:t,metadata:{}}}$r(),IA(),me(PBt,"extractFrontMatter"),KE();var BBt=me(t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),FBt=me(t=>{var{text:t,metadata:e}=PBt(t),{displayMode:e,title:r,config:i={}}=e;return e&&(i.gantt||(i.gantt={}),i.gantt.displayMode=e),{title:r,config:i,text:t}},"processFrontmatter"),$Bt=me(t=>{var e=YE.detectInit(t)??{},r=YE.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:SE(t),directive:e}},"processDirectives");function zBt(t){var e=BBt(t),e=FBt(e),r=$Bt(e.text),i=xE(e.config,r.directive);return{code:t=OBt(r.text),title:e.title,config:i}}function GBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}me(zBt,"preprocessDiagram"),eh(),Ei(),KE(),me(GBt,"toBase64");var UBt=["foreignobject"],qBt=["dominant-baseline"];function jBt(t){return t=zBt(t),Mr(),Rr(t.config??{}),t}async function WBt(t,e){UPt();try{var{code:r,config:i}=jBt(t);return{diagramType:(await eFt(r)).type,config:i}}catch(t){if(e?.suppressErrors)return!1;throw t}}me(jBt,"processAndSetConfigs"),me(WBt,"parse");var YBt=me((t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),HBt=me((e,r=new Map)=>{let i="";if(void 0!==e.themeCSS&&(i+=`
`+e.themeCSS),void 0!==e.fontFamily&&(i+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(i+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{aq(e.styles)||t.forEach(t=>{i+=YBt(e.id,t,e.styles)}),aq(e.textStyles)||(i+=YBt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return i},"createCssStyles"),VBt=me((t,e,r,i)=>(r=HBt(t,r),ABt(TBt(i+`{${Qc(e,r,t.themeVariables)}}`),LBt)),"createUserStyles"),XBt=me((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=VE(i)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),KBt=me((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${GBt(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
The "iframe" tag is not supported by your browser.
</iframe>`,"putIntoIFrame"),ZBt=me((t,e,r,i,n)=>{var a=t.append("div"),r=(a.attr("id",r),i&&a.attr("style",i),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return n&&r.attr("xmlns:xlink",n),r.append("g"),t},"appendDivSvgG");function QBt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}me(QBt,"sandboxedIframe");var JBt=me((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),lPt=me(async function(t,e,r){UPt();var i=jBt(e),n=(e=i.code,Nr());M.debug(n),e.length>(n?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=me(()=>{var t=j(d?o:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=j("body"),d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=QBt(j(r),s),(u=j(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=j(r),ZBt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(JBt(document,t,l,s),d?(y=QBt(j("body"),s),(u=j(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=j("body"),ZBt(u,t,l));let f,m;try{f=await RBt.fromText(e,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw h(),r;f=await RBt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(i=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=VBt(n,y,v,a),x=document.createElement("style");x.innerHTML=v,i.insertBefore(x,r);try{await f.renderer.draw(e,t,qft.version,f)}catch(r){throw n.suppressErrorRendering?h():APt.draw(e,t,qft.version),r}rFt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),b=XBt(b,d,Mc(n.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=KBt(b,v)):p||(b=Rn.sanitize(b,{ADD_TAGS:UBt,ADD_ATTR:qBt,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),DBt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function tFt(t={}){(t=ie({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),_r(t),t?.theme&&t.theme in ur?t.themeVariables=ur[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ur.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Cr(t):Ar(),T(t.logLevel),UPt()}me(tFt,"initialize");var eFt=me((t,e={})=>(t=zBt(t).code,RBt.fromText(t,e)),"getDiagramFromText");function rFt(t,e,r,i){NBt(e,t),IBt(e,r,i,e.attr("id"))}me(rFt,"addA11yInfo");var iFt=Object.freeze({render:lPt,parse:WBt,getDiagramFromText:eFt,initialize:tFt,getConfig:Nr,setConfig:Lr,getSiteConfig:Ar,updateSiteConfig:Sr,reset:me(()=>{Mr()},"reset"),globalReset:me(()=>{Mr(xr)},"globalReset"),defaultConfig:xr}),nFt=(T(Nr().logLevel),Mr(Nr()),zX(),KE(),me((t,e,r)=>{M.warn(t),vE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),aFt=me(async function(e={querySelector:".mermaid"}){try{await sFt(e)}catch(t){if(vE(t)&&M.error(t.str),fFt.parseError&&fFt.parseError(t),!e.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),t}},"run"),sFt=me(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var i=iFt.getConfig();M.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}M.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(M.debug("Start On Load: "+i?.startOnLoad),iFt.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new YE.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=jt(YE.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),YE.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await gFt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){nFt(t,o,fFt.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),oFt=me(function(t){iFt.initialize(t)},"initialize"),t=me(async function(t,e,r){M.warn("mermaid.init is deprecated. Please use run instead."),t&&oFt(t),t={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof e?t.querySelector=e:e&&(e instanceof HTMLElement?t.nodes=[e]:t.nodes=e),await aFt(t)},"init"),lPt=me(async(t,{lazyLoad:e=!0}={})=>{UPt(),Zt(...t),!1===e&&await qPt()},"registerExternalDiagrams"),lFt=me(function(){fFt.startOnLoad&&iFt.getConfig().startOnLoad&&fFt.run().catch(t=>M.error("Mermaid failed to initialize",t))},"contentLoaded"),cFt=(typeof document<"u"&&window.addEventListener("load",lFt,!1),me(function(t){fFt.parseError=t},"setParseErrorHandler")),hFt=[],uFt=!1,dFt=me(async()=>{if(!uFt){for(uFt=!0;0<hFt.length;){var t=hFt.shift();if(t)try{await t()}catch(t){M.error("Error executing queue",t)}}uFt=!1}},"executeQueue"),pFt=me(async(a,s)=>new Promise((i,n)=>{var t=me(()=>new Promise((e,r)=>{iFt.parse(a,s).then(t=>{e(t),i(t)},t=>{M.error("Error parsing",t),fFt.parseError?.(t),r(t),n(t)})}),"performCall");hFt.push(t),dFt().catch(n)}),"parse"),gFt=me((a,s,o)=>new Promise((i,n)=>{var t=me(()=>new Promise((e,r)=>{iFt.render(a,s,o).then(t=>{e(t),i(t)},t=>{M.error("Error parsing",t),fFt.parseError?.(t),r(t),n(t)})}),"performCall");hFt.push(t),dFt().catch(n)}),"render"),fFt={startOnLoad:!0,mermaidAPI:iFt,parse:pFt,render:gFt,init:t,run:aFt,registerExternalDiagrams:lPt,registerLayoutLoaders:TX,initialize:oFt,parseError:void 0,contentLoaded:lFt,setParseErrorHandler:cFt,detectType:Kt,registerIconPacks:Ot},mFt=fFt,pFt=iPt;return Y(z({},"__esModule",{value:!0}),pFt)})();globalThis.mermaid=globalThis.__esbuild_esm_mermaid.default;