|
|
"use strict";var __esbuild_esm_mermaid=(()=>{var a,o,R,k,T,_,C,S,A,N,I,M,F,$,z=Object.create,G=Object.defineProperty,U=Object.getOwnPropertyDescriptor,W=Object.getOwnPropertyNames,V=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty,Ae=(t,e)=>G(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,J=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},tt=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of W(r))Q.call(e,t)||t===n||G(e,t,{get:()=>r[t],enumerable:!(i=U(r,t))||i.enumerable});return e},et=(t,e,r)=>(tt(t,e,"default"),r&&tt(r,e,"default")),rt=(t,e,r)=>(r=null!=t?z(V(t)):{},tt(!e&&t&&t.__esModule?r:G(r,"default",{value:t,enumerable:!0}),t)),nt=(jMt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:Ae(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},n=Ae(function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},"m"),r={s:n,z:Ae(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+n(r,2,"0")+":"+n(e,2,"0")},"z"),m:Ae(function t(e,r){var n,i,a;return e.date()<r.date()?-t(r,e):(n=12*(r.year()-e.year())+(r.month()-e.month()),a=r-(i=e.clone().add(n,m))<0,e=e.clone().add(n+(a?-1:1),m),+(-(n+(r-i)/(a?i-e:e-i))||0))},"t"),a:Ae(function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},"a"),p:Ae(function(t){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:i,Q:"quarter"}[t]||String(t||"").toLowerCase().replace(/s$/,"")},"p"),u:Ae(function(t){return void 0===t},"u")},s="en",l={},a=(l[s]=t,"$isDayjsObject"),c=Ae(function(t){return t instanceof k||!(!t||!t[a])},"S"),h=Ae(function t(e,r,n){var i;if(!e)return s;if("string"==typeof e){var a=e.toLowerCase(),r=(l[a]&&(i=a),r&&(l[a]=r,i=a),e.split("-"));if(!i&&1<r.length)return t(r[0])}else a=e.name,l[a]=e,i=a;return!n&&i&&(s=i),i||!n&&s},"t"),b=Ae(function(t,e){return c(t)?t.clone():((e="object"==typeof e?e:{}).date=t,e.args=arguments,new k(e))},"O"),w=r,k=(w.l=h,w.i=c,w.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})},Ae(E,"M"),(t=E.prototype).parse=function(a){this.$d=function(){var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,n,i=t.match(o);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),e?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}return new Date(t)}(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t)<this.startOf(e)},t.isBefore=function(t,e){return this.endOf(e)<b(t)},t.$g=function(t,e,r){return w.u(t)?this[e]:this.set(r,t)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(t,e){var r=this,n=!!w.u(e)||e,e=w.p(t),i=Ae(function(t,e){return e=w.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r),n?e:e.endOf(g)},"l"),a=Ae(function(t,e){return w.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},"$"),o=this.$W,s=this.$M,l=this.$D,c="set"+(this.$u?"UTC":"");switch(e){case y:return n?i(1,0):i(31,11);case m:return n?i(1,s):i(0,s+1);case f:var h=(o<(h=this.$locale().weekStart||0)?o+7:o)-h;return i(n?l-h:l+(6-h),s);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=((n={}).day=r+"Date",n.date=r+"Date",n[m]=r+"Month",n.year=r+"FullYear",n.hour=r+"Hours",n[d]=r+"Minutes",n[u]=r+"Seconds",n[i]=r+"Milliseconds",n[t]),n=t===g?this.$D+(e-this.$W):e;return t===m||t===y?((e=this.clone().set(v,1)).$d[r](n),e.init(),this.$d=e.set(v,Math.min(this.$D,e.daysInMonth())).$d):r&&this.$d[r](n),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 n=this,t=(r=Number(r),w.p(t)),e=Ae(function(t){var e=b(n);return w.w(e.date(e.date()+Math.round(t*r)),n)},"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 i,r,n,a,o,s,l,c,h,u,d=this,p=this.$locale();return this.isValid()?(i=t||"YYYY-MM-DDTHH:mm:ssZ",r=w.z(this),n=this.$H,a=this.$m,o=this.$M,s=p.weekdays,l=p.months,t=p.meridiem,c=Ae(function(t,e,r,n){return t&&(t[e]||t(d,i))||r[e].slice(0,n)},"h"),h=Ae(function(t){return w.s(n%12||12,t,"0")},"d"),u=t||function(t,e,r){return t=t<12?"AM":"PM",r?t.toLowerCase():t},i.replace(x,function(t,e){return e||function(){switch(t){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return o+1;case"MM":return w.s(o+1,2,"0");case"MMM":return c(p.monthsShort,o,l,3);case"MMMM":return c(l,o);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,s,2);case"ddd":return c(p.weekdaysShort,d.$W,s,3);case"dddd":return s[d.$W];case"H":return String(n);case"HH":return w.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(n,a,!0);case"A":return u(n,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 n,i=this,e=w.p(e),a=b(t),o=6e4*(a.utcOffset()-this.utcOffset()),s=this-a,l=Ae(function(){return w.m(i,a)},"D");switch(e){case y:n=l()/12;break;case m:n=l();break;case"quarter":n=l()/3;break;case f:n=(s-o)/6048e5;break;case g:n=(s-o)/864e5;break;case p:n=s/36e5;break;case d:n=s/6e4;break;case u:n=s/1e3;break;default:n=s}return r?n:w.a(n)},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",i],["$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[s],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(()=>{a=rt(nt(),1),o={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},R={trace:Ae(()=>{},"trace"),debug:Ae(()=>{},"debug"),info:Ae(()=>{},"info"),warn:Ae(()=>{},"warn"),error:Ae(()=>{},"error"),fatal:Ae(()=>{},"fatal")},k=Ae(function(t="fatal"){let e=o.fatal;"string"==typeof t?t.toLowerCase()in o&&(e=o[t]):"number"==typeof t&&(e=t),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},e<=o.fatal&&(R.fatal=console.error?console.error.bind(console,T("FATAL"),"color: orange"):console.log.bind(console,"[35m",T("FATAL"))),e<=o.error&&(R.error=console.error?console.error.bind(console,T("ERROR"),"color: orange"):console.log.bind(console,"[31m",T("ERROR"))),e<=o.warn&&(R.warn=console.warn?console.warn.bind(console,T("WARN"),"color: orange"):console.log.bind(console,"[33m",T("WARN"))),e<=o.info&&(R.info=console.info?console.info.bind(console,T("INFO"),"color: lightblue"):console.log.bind(console,"[34m",T("INFO"))),e<=o.debug&&(R.debug=console.debug?console.debug.bind(console,T("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",T("DEBUG"))),e<=o.trace&&(R.trace=console.debug?console.debug.bind(console,T("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",T("TRACE")))},"setLogLevel"),T=Ae(t=>`%c${(0,a.default)().format("ss.SSS")} : ${t} : `,"format")}),at=t(()=>{_=Object.freeze({left:0,top:0,width:16,height:16}),C=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),S=Object.freeze({..._,...C}),A=Object.freeze({...S,body:"",hidden:!1})}),ot=t(()=>{at(),N=Object.freeze({width:null,height:null}),I=Object.freeze({...N,...C})}),st=t(()=>{M=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=Ae((t,e,r,n="")=>{var i,a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||3<a.length)return null;n=a.shift().slice(1)}return 3<a.length||!a.length?null:1<a.length?(t=a.pop(),i=a.pop(),i={provider:0<a.length?a[0]:n,prefix:i,name:t},e&&!$(i)?null:i):1<(i=(t=a[0]).split("-")).length?(a={provider:n,prefix:i.shift(),name:i.join("-")},e&&!$(a)?null:a):r&&""===n&&(i={provider:n,prefix:"",name:t},!e||$(i,r))?i:null},"stringToIcon"),$=Ae((t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(M)||!(e&&""===t.prefix||t.prefix.match(M))||!t.name.match(M)),"validateIconName")});function lt(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 ct=t(()=>{Ae(lt,"mergeIconTransformations")});function ht(t,e){var r,n=lt(t,e);for(r in A)r in C?r in t&&!(r in n)&&(n[r]=C[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}var ut=t(()=>{at(),ct(),Ae(ht,"mergeIconData")});function dt(t,e){let n=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function o(t){var e,r;return n[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=i[t]&&i[t].parent)&&o(e))&&(a[t]=[e].concat(r))),a[t])}return Ae(o,"resolve"),(e||Object.keys(n).concat(Object.keys(i))).forEach(o),a}var pt=t(()=>{Ae(dt,"getIconsTree")});function gt(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function o(t){a=ht(n[t]||i[t],a)}return Ae(o,"parse"),o(e),r.forEach(o),ht(t,a)}function ft(t,e){var r;return t.icons[e]?gt(t,e,[]):(r=dt(t,[e])[e])?gt(t,e,r):null}var mt=t(()=>{ut(),pt(),Ae(gt,"internalGetIconData"),Ae(ft,"getIconData")});function yt(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 n,i=t.split(vt);if(null===i||!i.length)return t;let a=[],o=i.shift(),s=xt.test(o);for(;;){if(!s||(n=parseFloat(o),isNaN(n))?a.push(o):a.push(Math.ceil(n*e*r)/r),void 0===(o=i.shift()))return a.join("");s=!s}}var vt,xt,bt=t(()=>{vt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,Ae(yt,"calculateSize")});function wt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;0<=n;){var i=t.indexOf(">",n),a=t.indexOf("</"+e);if(-1===i||-1===a)break;var o=t.indexOf(">",a);if(-1===o)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(o+1)}return{defs:r,content:t}}function kt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Tt(t,e,r){return kt((t=wt(t)).defs,e+t.content+r)}var Et=t(()=>{Ae(wt,"splitSVGDefs"),Ae(kt,"mergeDefsAndContent"),Ae(Tt,"wrapSVGContent")});function _t(t,e){let r={...S,...t},n={...I,...e},o={left:r.left,top:r.top,width:r.width,height:r.height},s=r.body,i=([r,n].forEach(t=>{let e=[],r=t.hFlip,n=t.vFlip,i=t.rotate;r?n?i+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):n&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0);let a;switch(i<0&&(i-=4*Math.floor(i/4)),i%=4){case 1:a=o.height/2+o.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:a=o.width/2+o.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}i%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height)&&(a=o.width,o.width=o.height,o.height=a),e.length&&(s=Tt(s,'<g transform="'+e.join(" ")+'">',"</g>"))}),n.width),a=n.height,l=o.width,c=o.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=yt(u,l/c)):(h="auto"===i?l:i,u=null===a?yt(h,c/l):"auto"===a?c:a),{}),p=Ae((t,e)=>{Ct(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[o.left,o.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:s}}var Ct,St=t(()=>{at(),ot(),bt(),Et(),Ct=Ae(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),Ae(_t,"iconToSVG")});function At(n,i=Nt){for(var t,e=[];t=Lt.exec(n);)e.push(t[1]);if(e.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);e.forEach(t=>{var e="function"==typeof i?i(t):i+(It++).toString(),t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+t+')([")]|\\.[a-z])',"g"),"$1"+e+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var Lt,Nt,It,Mt=t(()=>{Lt=/\sid="(\S+)"/g,Nt="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),It=0,Ae(At,"replaceIDs")});function Rt(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}var Dt,Ot,Pt,Bt,Ft,$t,zt=t(()=>{Ae(Rt,"iconToHTML")}),Gt=jMt((t,e)=>{function n(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 i(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,n){return e=1.5*r<=e,Math.round(t/r)+" "+n+(e?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"==r&&0<t.length)return n(t);if("number"==r&&isFinite(t))return(e.long?a:i)(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))},Ae(n,"parse"),Ae(i,"fmtShort"),Ae(a,"fmtLong"),Ae(r,"plural")}),Ut=jMt((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 s.colors[Math.abs(r)%s.colors.length]}function s(t){let r,e=null,n,i;function o(...a){if(o.enabled){let n=o,t=Number(new Date),e=t-(r||t),i=(n.diff=e,n.prev=r,n.curr=t,r=t,a[0]=s.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?"%":(i++,"function"==typeof(e=s.formatters[e])&&(r=a[i],t=e.call(n,r),a.splice(i,1),i--),t)}),s.formatArgs.call(n,a),(n.log||s.log).apply(n,a)}}return Ae(o,"debug"),o.namespace=t,o.useColors=s.useColors(),o.color=s.selectColor(t),o.extend=a,o.destroy=s.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:Ae(()=>null!==e?e:(n!==s.namespaces&&(n=s.namespaces,i=s.enabled(t)),i),"get"),set:Ae(t=>{e=t},"set")}),"function"==typeof s.init&&s.init(o),o}function a(t,e){return(e=s(this.namespace+("u"<typeof e?":":e)+t)).log=this.log,e}function r(t){s.save(t),s.namespaces=t,s.names=[],s.skips=[];let e,r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e<n;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?s.skips.push(new RegExp("^"+t.slice(1)+"$")):s.names.push(new RegExp("^"+t+"$")))}function n(){var t=[...s.names.map(o),...s.skips.map(o).map(t=>"-"+t)].join(",");return s.enable(""),t}function i(t){if("*"===t[t.length-1])return!0;let e,r;for(e=0,r=s.skips.length;e<r;e++)if(s.skips[e].test(t))return!1;for(e=0,r=s.names.length;e<r;e++)if(s.names[e].test(t))return!0;return!1}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}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((s.debug=s).default=s).coerce=l,s.disable=n,s.enable=r,s.enabled=i,s.humanize=Gt(),s.destroy=c,Object.keys(e).forEach(t=>{s[t]=e[t]}),s.names=[],s.skips=[],s.formatters={},Ae(t,"selectColor"),s.selectColor=t,Ae(s,"createDebug"),Ae(a,"extend"),Ae(r,"enable"),Ae(n,"disable"),Ae(i,"enabled"),Ae(o,"toNamespace"),Ae(l,"coerce"),Ae(c,"destroy"),s.enable(s.load()),s}Ae(r,"setup"),e.exports=r}),qt=jMt((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 n(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 n="color: "+this.color;t.splice(1,0,n,"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,n)}}function i(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 o(){try{return localStorage}catch{}}e.formatArgs=n,e.save=i,e.load=a,e.useColors=t,e.storage=o(),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"],Ae(t,"useColors"),Ae(n,"formatArgs"),e.log=console.debug||console.log||(()=>{}),Ae(i,"save"),Ae(a,"load"),Ae(o,"localstorage"),r.exports=Ut()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),Yt=t(()=>{st(),mt(),St(),Mt(),zt(),rt(qt(),1)}),jt=t(()=>{e(),Yt(),Dt={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},Ot=new Map,Pt=new Map,Bt=Ae(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(R.debug("Registering icon pack:",e.name),"loader"in e)Pt.set(e.name,e.loader);else{if(!("icons"in e))throw R.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ot.set(e.name,e.icons)}}},"registerIconPacks"),Ft=Ae(async(t,e)=>{var r=F(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 n=Ot.get(e);if(!n){var i=Pt.get(e);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:e},Ot.set(e,n)}catch(t){throw R.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(i=ft(n,r.name))return i;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),$t=Ae(async(t,e)=>{let r;try{r=await Ft(t,e?.fallbackPrefix)}catch(t){R.error(t),r=Dt}return Rt(At((t=_t(r,e)).body),t.attributes)},"getIconSVG")});function Ht(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n,i=Array.from("string"==typeof t?[t]:t),t=(i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,""),i.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&&(n=new RegExp(`
|
|
|
[ ]{`+Math.min.apply(Math,t)+"}","g"),i=i.map(function(t){return t.replace(n,`
|
|
|
`)})),i[0]=i[0].replace(/^\r?\n/,""),i[0]);return e.forEach(function(t,e){var r=(n=a.match(/(?:^|\n)( *)$/))?n[1]:"",n=t;"string"==typeof t&&t.includes(`
|
|
|
`)&&(n=String(t).split(`
|
|
|
`).map(function(t,e){return 0===e?t:""+r+t}).join(`
|
|
|
`)),a+=n+i[e+1]}),a}var Wt,Vt,Xt,Kt,Zt,Qt,Jt,te,ee,re,ne,ie,ae,oe,se,le,ce,he,ue,de,pe,ge,fe,ye,ve,xe,be,we,ke,Te,Ee,_e,Ce,Se,Le,Ne,Ie,Me,Re,De,Oe,Pe,Be,Fe,$e,ze,Ge,Ue,qe,Ye,je,He,We,Ve,Xe,Ke,Ze,r,Qe,Je,tr,n,er,rr,nr,ir,ar,or,sr,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,xr,br,wr,kr,Tr,Er,_r,Cr,Sr,Ar,Lr,Nr,Ir,Mr,Rr,Dr,Or,Pr,Br,Fr,$r,zr,Gr=t(()=>{Ae(Ht,"dedent")}),Ur=t(()=>{Wt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Vt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xt=/\s*%%.*\n/gm}),qr=t(()=>{Kt=class extends Error{static{Ae(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Yr=t(()=>{e(),Ur(),qr(),Zt={},Qt=Ae(function(t,e){t=t.replace(Wt,"").replace(Vt,"").replace(Xt,`
|
|
|
`);for(var[r,{detector:n}]of Object.entries(Zt))if(n(t,e))return r;throw new Kt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Jt=Ae((...t)=>{for(var{id:e,detector:r,loader:n}of t)te(e,r,n)},"registerLazyLoadedDiagrams"),te=Ae((t,e,r)=>{Zt[t]&&R.warn(`Detector with key ${t} already exists. Overwriting.`),Zt[t]={detector:e,loader:r},R.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),ee=Ae(t=>Zt[t].loader,"getDiagramLoader")}),jr=t(()=>{function B(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[1,27],z=[1,28],n=[1,63],i=[1,64],a=[1,65],o=[1,66],s=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],_=[1,43],C=[1,44],S=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],Y=[1,54],j=[1,55],H=[1,56],W=[1,57],V=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],M=[1,82],R=[1,83],D=[1,84],O=[1,85],P=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],e={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[s-3]);break;case 19:n.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:n.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 28:a[s].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:n.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:n.addDeploymentNode("node",...a[s]),this.$=a[s];break;case 33:n.addDeploymentNode("nodeL",...a[s]),this.$=a[s];break;case 34:n.addDeploymentNode("nodeR",...a[s]),this.$=a[s];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[s]),this.$=a[s];break;case 40:n.addPersonOrSystem("external_person",...a[s]),this.$=a[s];break;case 41:n.addPersonOrSystem("system",...a[s]),this.$=a[s];break;case 42:n.addPersonOrSystem("system_db",...a[s]),this.$=a[s];break;case 43:n.addPersonOrSystem("system_queue",...a[s]),this.$=a[s];break;case 44:n.addPersonOrSystem("external_system",...a[s]),this.$=a[s];break;case 45:n.addPersonOrSystem("external_system_db",...a[s]),this.$=a[s];break;case 46:n.addPersonOrSystem("external_system_queue",...a[s]),this.$=a[s];break;case 47:n.addContainer("container",...a[s]),this.$=a[s];break;case 48:n.addContainer("container_db",...a[s]),this.$=a[s];break;case 49:n.addContainer("container_queue",...a[s]),this.$=a[s];break;case 50:n.addContainer("external_container",...a[s]),this.$=a[s];break;case 51:n.addContainer("external_container_db",...a[s]),this.$=a[s];break;case 52:n.addContainer("external_container_queue",...a[s]),this.$=a[s];break;case 53:n.addComponent("component",...a[s]),this.$=a[s];break;case 54:n.addComponent("component_db",...a[s]),this.$=a[s];break;case 55:n.addComponent("component_queue",...a[s]),this.$=a[s];break;case 56:n.addComponent("external_component",...a[s]),this.$=a[s];break;case 57:n.addComponent("external_component_db",...a[s]),this.$=a[s];break;case 58:n.addComponent("external_component_queue",...a[s]),this.$=a[s];break;case 60:n.addRel("rel",...a[s]),this.$=a[s];break;case 61:n.addRel("birel",...a[s]),this.$=a[s];break;case 62:n.addRel("rel_u",...a[s]),this.$=a[s];break;case 63:n.addRel("rel_d",...a[s]),this.$=a[s];break;case 64:n.addRel("rel_l",...a[s]),this.$=a[s];break;case 65:n.addRel("rel_r",...a[s]),this.$=a[s];break;case 66:n.addRel("rel_b",...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),n.addRel("rel",...a[s]),this.$=a[s];break;case 68:n.updateElStyle("update_el_style",...a[s]),this.$=a[s];break;case 69:n.updateRelStyle("update_rel_style",...a[s]),this.$=a[s];break;case 70:n.updateLayoutConfig("update_layout_config",...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:var l={};l[a[s-1].trim()]=a[s].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:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,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:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,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:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,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:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,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:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,72:V,73:X,74:K},{14:[1,74]},t(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,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:M,77:R,79:D,80:O},{35:86,75:81,76:M,77:R,79:D,80:O},{35:87,75:81,76:M,77:R,79:D,80:O},{35:88,75:81,76:M,77:R,79:D,80:O},{35:89,75:81,76:M,77:R,79:D,80:O},{35:90,75:81,76:M,77:R,79:D,80:O},{35:91,75:81,76:M,77:R,79:D,80:O},{35:92,75:81,76:M,77:R,79:D,80:O},{35:93,75:81,76:M,77:R,79:D,80:O},{35:94,75:81,76:M,77:R,79:D,80:O},{35:95,75:81,76:M,77:R,79:D,80:O},{35:96,75:81,76:M,77:R,79:D,80:O},{35:97,75:81,76:M,77:R,79:D,80:O},{35:98,75:81,76:M,77:R,79:D,80:O},{35:99,75:81,76:M,77:R,79:D,80:O},{35:100,75:81,76:M,77:R,79:D,80:O},{35:101,75:81,76:M,77:R,79:D,80:O},{35:102,75:81,76:M,77:R,79:D,80:O},{35:103,75:81,76:M,77:R,79:D,80:O},{35:104,75:81,76:M,77:R,79:D,80:O},t(P,[2,59]),{35:105,75:81,76:M,77:R,79:D,80:O},{35:106,75:81,76:M,77:R,79:D,80:O},{35:107,75:81,76:M,77:R,79:D,80:O},{35:108,75:81,76:M,77:R,79:D,80:O},{35:109,75:81,76:M,77:R,79:D,80:O},{35:110,75:81,76:M,77:R,79:D,80:O},{35:111,75:81,76:M,77:R,79:D,80:O},{35:112,75:81,76:M,77:R,79:D,80:O},{35:113,75:81,76:M,77:R,79:D,80:O},{35:114,75:81,76:M,77:R,79:D,80:O},{35:115,75:81,76:M,77:R,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:M,77:R,79:D,80:O},{35:120,75:81,76:M,77:R,79:D,80:O},{35:121,75:81,76:M,77:R,79:D,80:O},{35:122,75:81,76:M,77:R,79:D,80:O},{35:123,75:81,76:M,77:R,79:D,80:O},{35:124,75:81,76:M,77:R,79:D,80:O},{35:125,75:81,76:M,77:R,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:n,36:i,37:a,38:o,39:s,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:_,59:C,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:Y,69:j,70:H,71:W,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:M,77:R,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(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\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,Ae(B,"Parser"),(re=new((B.prototype=e).Parser=B)).parser=re,ne=re}),Hr=t(()=>{ie=Ae((e,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>ie(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||n<=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]?(i||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=ie(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),ae=ie}),Wr=t(()=>{oe={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:Ae(t=>255<=t?255:t<0?0:t,"r"),g:Ae(t=>255<=t?255:t<0?0:t,"g"),b:Ae(t=>255<=t?255:t<0?0:t,"b"),h:Ae(t=>t%360,"h"),s:Ae(t=>100<=t?100:t<0?0:t,"s"),l:Ae(t=>100<=t?100:t<0?0:t,"l"),a:Ae(t=>1<=t?1:t<0?0:t,"a")},toLinear:Ae(t=>{var e=t/255;return.03928<t?Math.pow((.055+e)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:Ae((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:Ae(({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;var i=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return 255*oe.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*oe.hue2rgb(a,i,t);case"b":return 255*oe.hue2rgb(a,i,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:Ae(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;var i=Math.max(t,e,r),a=Math.min(t,e,r),o=(i+a)/2;if("l"===n)return 100*o;if(i===a)return 0;var s=i-a;if("s"===n)return 100*(.5<o?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}},"rgb2hsl")},se=oe}),Vr=t(()=>{le={clamp:Ae((t,e,r)=>r<e?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:Ae(t=>Math.round(1e10*t)/1e10,"round")},ce=le}),Xr=t(()=>{he={dec2hex:Ae(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},ue=he}),Kr=t(()=>{Wr(),Vr(),Xr(),de={channel:se,lang:ce,unit:ue}}),Zr=t(()=>{Kr(),pe={};for(let t=0;t<=255;t++)pe[t]=de.unit.dec2hex(t);ge={ALL:0,RGB:1,HSL:2}}),Qr=t(()=>{Zr(),fe=class{static{Ae(this,"Type")}constructor(){this.type=ge.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=ge.ALL}is(t){return this.type===t}},ye=fe}),Jr=t(()=>{Kr(),Qr(),Zr(),ve=class{static{Ae(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new ye}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=ge.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=de.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=de.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=de.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=de.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=de.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=de.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(ge.HSL)||void 0===e?(this._ensureHSL(),de.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(ge.HSL)||void 0===e?(this._ensureHSL(),de.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(ge.HSL)||void 0===e?(this._ensureHSL(),de.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(ge.RGB)||void 0===e?(this._ensureRGB(),de.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(ge.RGB)||void 0===e?(this._ensureRGB(),de.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(ge.RGB)||void 0===e?(this._ensureRGB(),de.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(ge.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ge.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ge.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ge.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ge.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ge.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},xe=ve}),tn=t(()=>{Jr(),be=new xe({r:0,g:0,b:0,a:0},"transparent"),we=be}),en=t(()=>{tn(),Zr(),ke={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:Ae(t=>{if(35===t.charCodeAt(0)){var e,r,n,i,a,o=t.match(ke.re);if(o)return o=o[1],e=parseInt(o,16),o=o.length,we.set({r:(e>>(n=(r=4<o)?8:4)*(3+(i=(o=o%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(e>>n*(2+i)&a)*r,b:(e>>n*(1+i)&a)*r,a:o?(e&a)*r/255:1},t)}},"parse"),stringify:Ae(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?"#"+pe[Math.round(t)]+pe[Math.round(e)]+pe[Math.round(r)]+pe[Math.round(255*n)]:"#"+pe[Math.round(t)]+pe[Math.round(e)]+pe[Math.round(r)]},"stringify")},Te=ke}),rn=t(()=>{Kr(),tn(),Ee={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:Ae(t=>{if(r=t.match(Ee.hueRe)){var[,e,r]=r;switch(r){case"grad":return de.channel.clamp.h(.9*parseFloat(e));case"rad":return de.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return de.channel.clamp.h(360*parseFloat(e))}}return de.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:Ae(t=>{var e,r,n,i,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Ee.re)))return[,a,e,r,n,i]=a,we.set({h:Ee._hue2deg(a),s:de.channel.clamp.s(parseFloat(e)),l:de.channel.clamp.l(parseFloat(r)),a:n?de.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},t)},"parse"),stringify:Ae(t=>{var{h:t,s:e,l:r,a:n}=t;return n<1?`hsla(${de.lang.round(t)}, ${de.lang.round(e)}%, ${de.lang.round(r)}%, ${n})`:`hsl(${de.lang.round(t)}, ${de.lang.round(e)}%, ${de.lang.round(r)}%)`},"stringify")},_e=Ee}),nn=t(()=>{en(),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:Ae(t=>{if(t=t.toLowerCase(),t=Ce.colors[t])return Te.parse(t)},"parse"),stringify:Ae(t=>{var e,r=Te.stringify(t);for(e in Ce.colors)if(Ce.colors[e]===r)return e},"stringify")},Se=Ce}),an=t(()=>{Kr(),tn(),Le={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:Ae(t=>{var e,r,n,i,a,o,s,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Le.re)))return[,l,e,r,n,i,a,o,s]=l,we.set({r:de.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:de.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:de.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:o?de.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},"parse"),stringify:Ae(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?`rgba(${de.lang.round(t)}, ${de.lang.round(e)}, ${de.lang.round(r)}, ${de.lang.round(n)})`:`rgb(${de.lang.round(t)}, ${de.lang.round(e)}, ${de.lang.round(r)})`},"stringify")},Ne=Le}),on=t(()=>{en(),rn(),nn(),an(),Zr(),Ie={format:{keyword:Se,hex:Te,rgb:Ne,rgba:Ne,hsl:_e,hsla:_e},parse:Ae(t=>{if("string"!=typeof t)return t;var e=Te.parse(t)||Ne.parse(t)||_e.parse(t)||Se.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:Ae(t=>!t.changed&&t.color?t.color:(t.type.is(ge.HSL)||void 0===t.data.r?_e:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Ne:Te).stringify(t),"stringify")},Me=Ie}),sn=t(()=>{Kr(),on(),Re=Ae((t,e)=>{var r,n=Me.parse(t);for(r in e)n[r]=de.channel.clamp[r](e[r]);return Me.stringify(n)},"change"),De=Re}),ln=t(()=>{Kr(),tn(),on(),sn(),Oe=Ae((t,e,r=0,n=1)=>"number"!=typeof t?De(t,{a:e}):(t=we.set({r:de.channel.clamp.r(t),g:de.channel.clamp.g(e),b:de.channel.clamp.b(r),a:de.channel.clamp.a(n)}),Me.stringify(t)),"rgba"),Pe=Oe}),cn=t(()=>{Kr(),on(),Be=Ae((t,e)=>de.lang.round(Me.parse(t)[e]),"channel"),Fe=Be}),hn=t(()=>{Kr(),on(),$e=Ae(t=>{var{r:t,g:e,b:r}=Me.parse(t),t=.2126*de.channel.toLinear(t)+.7152*de.channel.toLinear(e)+.0722*de.channel.toLinear(r);return de.lang.round(t)},"luminance"),ze=$e}),un=t(()=>{hn(),Ge=Ae(t=>.5<=ze(t),"isLight"),Ue=Ge}),dn=t(()=>{un(),qe=Ae(t=>!Ue(t),"isDark"),Ye=qe}),pn=t(()=>{Kr(),on(),je=Ae((t,e,r)=>{var n=(t=Me.parse(t))[e];return n!==(r=de.channel.clamp[e](n+r))&&(t[e]=r),Me.stringify(t)},"adjustChannel"),He=je}),gn=t(()=>{pn(),We=Ae((t,e)=>He(t,"l",e),"lighten"),Ve=We}),fn=t(()=>{pn(),Xe=Ae((t,e)=>He(t,"l",-e),"darken"),Ke=Xe}),mn=t(()=>{on(),sn(),Ze=Ae((t,e)=>{var r,n=Me.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return De(t,i)},"adjust"),r=Ze}),yn=t(()=>{on(),ln(),Qe=Ae((t,e,r=50)=>{var{r:t,g:n,b:i,a}=Me.parse(t),{r:e,g:o,b:s,a:l}=Me.parse(e),c=2*(r/=100)-1,h=a-l;return Pe(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),n*c+o*h,i*c+s*h,a*r+l*(1-r))},"mix"),Je=Qe}),vn=t(()=>{on(),yn(),tr=Ae((t,e=100)=>{var r=Me.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Je(r,t,e)},"invert"),n=tr}),xn=t(()=>{ln(),cn(),dn(),gn(),fn(),mn(),vn()}),bn=t(()=>{xn()}),wn=t(()=>{er="#ffffff",rr="#f2f2f2"}),kn=t(()=>{bn(),nr=Ae((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),Tn=t(()=>{bn(),wn(),kn(),ir=class{static{Ae(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||nr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||nr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||nr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||nr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(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?Ke(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||Ke(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(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||Ve(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.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]=Ke(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Ke(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||n(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||Ve(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(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.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||Ye(this.quadrant1Fill)?Ve:Ke)(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?Ke(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=Ve(this.git0,25),this.git1=Ve(this.git1,25),this.git2=Ve(this.git2,25),this.git3=Ve(this.git3,25),this.git4=Ve(this.git4,25),this.git5=Ve(this.git5,25),this.git6=Ve(this.git6,25),this.git7=Ve(this.git7,25)):(this.git0=Ke(this.git0,25),this.git1=Ke(this.git1,25),this.git2=Ke(this.git2,25),this.git3=Ke(this.git3,25),this.git4=Ke(this.git4,25),this.git5=Ke(this.git5,25),this.git6=Ke(this.git6,25),this.git7=Ke(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(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||er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}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]}))}},ar=Ae(t=>{var e=new ir;return e.calculate(t),e},"getThemeVariables")}),En=t(()=>{bn(),kn(),or=class{static{Ae(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ve(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=nr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ve(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Pe(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=Ke("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ke(this.sectionBkgColor,10),this.taskBorderColor=Pe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Pe(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.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Ve(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=Ve(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=Ve(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]||n(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||Ve(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||Ye(this.quadrant1Fill)?Ve:Ke)(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.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?Ke(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Ve(this.secondaryColor,20),this.git1=Ve(this.pie2||this.secondaryColor,20),this.git2=Ve(this.pie3||this.tertiaryColor,20),this.git3=Ve(this.pie4||r(this.primaryColor,{h:-30}),20),this.git4=Ve(this.pie5||r(this.primaryColor,{h:-60}),20),this.git5=Ve(this.pie6||r(this.primaryColor,{h:-90}),10),this.git6=Ve(this.pie7||r(this.primaryColor,{h:60}),10),this.git7=Ve(this.pie8||r(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(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||Ve(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ve(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]}))}},sr=Ae(t=>{var e=new or;return e.calculate(t),e},"getThemeVariables")}),_n=t(()=>{bn(),kn(),wn(),lr=class{static{Ae(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=nr(this.primaryColor,this.darkMode),this.secondaryBorderColor=nr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(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=Pe(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.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||Ke(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ke(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Ke(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(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||n(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||n(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=Ve(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.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||Ye(this.quadrant1Fill)?Ve:Ke)(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||"#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=Ve(this.git0,25),this.git1=Ve(this.git1,25),this.git2=Ve(this.git2,25),this.git3=Ve(this.git3,25),this.git4=Ve(this.git4,25),this.git5=Ve(this.git5,25),this.git6=Ve(this.git6,25),this.git7=Ve(this.git7,25)):(this.git0=Ke(this.git0,25),this.git1=Ke(this.git1,25),this.git2=Ke(this.git2,25),this.git3=Ke(this.git3,25),this.git4=Ke(this.git4,25),this.git5=Ke(this.git5,25),this.git6=Ke(this.git6,25),this.git7=Ke(this.git7,25)),this.gitInv0=this.gitInv0||Ke(n(this.git0),25),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(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||er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}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]}))}},cr=Ae(t=>{var e=new lr;return e.calculate(t),e},"getThemeVariables")}),Cn=t(()=>{bn(),wn(),kn(),hr=class{static{Ae(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=Ve("#cde498",10),this.primaryBorderColor=nr(this.primaryColor,this.darkMode),this.secondaryBorderColor=nr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(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=Ke(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||Ke(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ke(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=Ke(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(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.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||Ye(this.quadrant1Fill)?Ve:Ke)(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.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=Ve(this.git0,25),this.git1=Ve(this.git1,25),this.git2=Ve(this.git2,25),this.git3=Ve(this.git3,25),this.git4=Ve(this.git4,25),this.git5=Ve(this.git5,25),this.git6=Ve(this.git6,25),this.git7=Ve(this.git7,25)):(this.git0=Ke(this.git0,25),this.git1=Ke(this.git1,25),this.git2=Ke(this.git2,25),this.git3=Ke(this.git3,25),this.git4=Ke(this.git4,25),this.git5=Ke(this.git5,25),this.git6=Ke(this.git6,25),this.git7=Ke(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(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||er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}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]}))}},ur=Ae(t=>{var e=new hr;return e.calculate(t),e},"getThemeVariables")}),Sn=t(()=>{bn(),kn(),wn(),dr=class{static{Ae(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Ve(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=nr(this.primaryColor,this.darkMode),this.secondaryBorderColor=nr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Ve(this.contrast,55),this.border2=this.contrast,this.actorBorder=Ve(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]||n(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||Ve(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||Ke(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=Ve(this.contrast,30),this.sectionBkgColor2=Ve(this.contrast,30),this.taskBorderColor=Ke(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=Ve(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ke(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||Ye(this.quadrant1Fill)?Ve:Ke)(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.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=Ke(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||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(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||er,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}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]}))}},pr=Ae(t=>{var e=new dr;return e.calculate(t),e},"getThemeVariables")}),An=t(()=>{Tn(),En(),_n(),Cn(),Sn(),gr={base:{getThemeVariables:ar},dark:{getThemeVariables:sr},default:{getThemeVariables:cr},forest:{getThemeVariables:ur},neutral:{getThemeVariables:pr}}}),Ln=t(()=>{fr={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},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,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},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},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}}),Nn=t(()=>{An(),Ln(),mr={...fr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:gr.default.getThemeVariables(),sequence:{...fr.sequence,messageFont:Ae(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:Ae(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:Ae(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...fr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...fr.c4,useWidth:void 0,personFont:Ae(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:Ae(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:Ae(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:Ae(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:Ae(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:Ae(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:Ae(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:Ae(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:Ae(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:Ae(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:Ae(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:Ae(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:Ae(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:Ae(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:Ae(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:Ae(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:Ae(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:Ae(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:Ae(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:Ae(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:Ae(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:Ae(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...fr.pie,useWidth:984},xyChart:{...fr.xyChart,useWidth:void 0},requirement:{...fr.requirement,useWidth:void 0},packet:{...fr.packet}},yr=Ae((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...yr(r[e],"")]:[...t,n+e],[]),"keyify"),vr=new Set(yr(mr,"")),xr=mr}),In=t(()=>{Nn(),e(),br=Ae(t=>{if(R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>br(t));else{for(var e of Object.keys(t)){var r;if(R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!vr.has(e)||null==t[e])R.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])R.debug("sanitizing object",e),br(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(R.debug("sanitizing css option",e),t[e]=wr(t[e]))}if(t.themeVariables)for(var n of Object.keys(t.themeVariables)){var i=t.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}R.debug("After sanitization",t)}},"sanitizeDirective"),wr=Ae(t=>{let e=0,r=0;for(var n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===n?e++:"}"===n&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss")}),Mn=t(()=>{Hr(),e(),An(),Nn(),In(),kr=Object.freeze(xr),Tr=ae({},kr),_r=[],Cr=ae({},kr),Sr=Ae((t,e)=>{let r=ae({},t),n={};for(var i of e)Dr(i),n=ae(n,i);return r=ae(r,n),n.theme&&n.theme in gr&&(t=ae({},Er),e=ae(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in gr&&(r.themeVariables=gr[r.theme].getThemeVariables(e)),zr(Cr=r),Cr},"updateCurrentConfig"),Ar=Ae(t=>(Tr=ae({},kr),Tr=ae(Tr,t),t.theme&&gr[t.theme]&&(Tr.themeVariables=gr[t.theme].getThemeVariables(t.themeVariables)),Sr(Tr,_r),Tr),"setSiteConfig"),Lr=Ae(t=>{Er=ae({},t)},"saveConfigFromInitialize"),Nr=Ae(t=>(Tr=ae(Tr,t),Sr(Tr,_r),Tr),"updateSiteConfig"),Ir=Ae(()=>ae({},Tr),"getSiteConfig"),Mr=Ae(t=>(zr(t),ae(Cr,t),Rr()),"setConfig"),Rr=Ae(()=>ae({},Cr),"getConfig"),Dr=Ae(e=>{e&&(["secure",...Tr.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(R.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]&&Dr(e[t])}))},"sanitize"),Or=Ae(t=>{br(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),_r.push(t),Sr(Tr,_r)},"addDirective"),Pr=Ae((t=Tr)=>{Sr(t,_r=[])},"reset"),Br={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Fr={},$r=Ae(t=>{Fr[t]||(R.warn(Br[t]),Fr[t]=!0)},"issueWarning"),zr=Ae(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&$r("LAZY_LOAD_DEPRECATED")},"checkConfig")}),Rn=jMt((t,e)=>{function r(){let{entries:Ht,setPrototypeOf:t,isFrozen:l,getPrototypeOf:c,getOwnPropertyDescriptor:h}=Object,{freeze:Wt,seal:e,create:Vt}=Object,{apply:a,construct:i}=typeof Reflect<"u"&&Reflect,Xt=(Wt=Wt||Ae(function(t){return t},"freeze"),e=e||Ae(function(t){return t},"seal"),a=a||Ae(function(t,e,r){return t.apply(e,r)},"apply"),i=i||Ae(function(t,e){return new t(...e)},"construct"),o(Array.prototype.forEach)),Kt=o(Array.prototype.pop),Zt=o(Array.prototype.push),Qt=o(String.prototype.toLowerCase),Jt=o(String.prototype.toString),te=o(String.prototype.match),ee=o(String.prototype.replace),we=o(String.prototype.indexOf),ke=o(String.prototype.trim),re=o(Object.prototype.hasOwnProperty),ne=o(RegExp.prototype.test),ie=r(TypeError);function o(i){return function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return a(i,t,r)}}function r(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return i(n,e)}}function ae(e,r){var n,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Qt;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];"string"==typeof t&&(n=i(t))!==t&&(l(r)||(r[a]=n),t=n),e[t]=!0}return e}function s(e){for(let t=0;t<e.length;t++)re(e,t)||(e[t]=null);return e}function oe(t){var e,r,n=Vt(null);for([e,r]of Ht(t))re(t,e)&&(Array.isArray(r)?n[e]=s(r):r&&"object"==typeof r&&r.constructor===Object?n[e]=oe(r):n[e]=r);return n}function se(t,e){for(;null!==t;){var r=h(t,e);if(r){if(r.get)return o(r.get);if("function"==typeof r.value)return o(r.value)}t=c(t)}function n(){return null}return Ae(n,"fallbackValue"),n}Ae(o,"unapply"),Ae(r,"unconstruct"),Ae(ae,"addToSet"),Ae(s,"cleanArray"),Ae(oe,"clone"),Ae(se,"lookupGetter");let le=Wt(["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"]),ce=Wt(["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"]),he=Wt(["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"]),Te=Wt(["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"]),ue=Wt(["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"]),Ee=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),de=Wt(["#text"]),pe=Wt(["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"]),ge=Wt(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),fe=Wt(["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"]),me=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),n=e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),u=e(/<%[\w\W]*|[\w\W]*%>/gm),d=e(/\${[\w\W]*}/gm),p=e(/^data-[\-\w.\u00B7-\uFFFF]/),g=e(/^aria-[\-\w]+$/),ye=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f=e(/^(?:\w+script|data):/i),m=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ve=e(/^html$/i),y=e(/^[a-z][.\w]*(-[.\w]+)+$/i);var _e=Object.freeze({__proto__:null,MUSTACHE_EXPR:n,ERB_EXPR:u,TMPLIT_EXPR:d,DATA_ATTR:p,ARIA_ATTR:g,IS_ALLOWED_URI:ye,IS_SCRIPT_OR_DATA:f,ATTR_WHITESPACE:m,DOCTYPE_NAME:ve,CUSTOM_ELEMENT:y});let xe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ce=Ae(function(){return"u"<typeof window?null:window},"getGlobal"),Se=Ae(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");function be(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ce(),u=Ae(t=>be(t),"DOMPurify");if(u.version="3.1.6",u.removed=[],!t||!t.document||t.document.nodeType!==xe.document)return u.isSupported=!1,u;let i=t.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:h,Element:F,NodeFilter:e,NamedNodeMap:$=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:z,DOMParser:G,trustedTypes:d}=t,r=F.prototype,U=se(r,"cloneNode"),q=se(r,"remove"),Y=se(r,"nextSibling"),j=se(r,"childNodes"),o=se(r,"parentNode");var n;"function"==typeof B&&(n=i.createElement("template")).content&&n.content.ownerDocument&&(i=n.content.ownerDocument);let p,g="",{implementation:H,createNodeIterator:W,createDocumentFragment:V,getElementsByTagName:X}=i,K=c.importNode,a={},{MUSTACHE_EXPR:Z,ERB_EXPR:Q,TMPLIT_EXPR:J,DATA_ATTR:tt,ARIA_ATTR:et,IS_SCRIPT_OR_DATA:rt,ATTR_WHITESPACE:nt,CUSTOM_ELEMENT:it}=(u.isSupported="function"==typeof Ht&&"function"==typeof o&&H&&void 0!==H.createHTMLDocument,_e),at=_e.IS_ALLOWED_URI,f=null,ot=ae({},[...le,...ce,...he,...ue,...de]),m=null,st=ae({},[...pe,...ge,...fe,...me]),s=Object.seal(Vt(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,lt=null,ct=!0,ht=!0,ut=!1,dt=!0,v=!1,pt=!0,x=!1,gt=!1,ft=!1,b=!1,w=!1,k=!1,mt=!0,yt=!1,vt=!0,T=!1,l,E=null,xt=ae({},["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"]),bt=null,wt=ae({},["audio","video","img","source","image","track"]),kt=null,Tt=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_="http://www.w3.org/1998/Math/MathML",C="http://www.w3.org/2000/svg",S="http://www.w3.org/1999/xhtml",A=S,Et=!1,_t=null,Ct=ae({},[_,C,S],Jt),L=null,St=["application/xhtml+xml","text/html"],N=null,I=null,At=i.createElement("form"),Lt=Ae(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Nt=Ae(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!I||I!==t){if(t=oe(t&&"object"==typeof t?t:{}),L=-1===St.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===L?Jt:Qt,f=re(t,"ALLOWED_TAGS")?ae({},t.ALLOWED_TAGS,N):ot,m=re(t,"ALLOWED_ATTR")?ae({},t.ALLOWED_ATTR,N):st,_t=re(t,"ALLOWED_NAMESPACES")?ae({},t.ALLOWED_NAMESPACES,Jt):Ct,kt=re(t,"ADD_URI_SAFE_ATTR")?ae(oe(Tt),t.ADD_URI_SAFE_ATTR,N):Tt,bt=re(t,"ADD_DATA_URI_TAGS")?ae(oe(wt),t.ADD_DATA_URI_TAGS,N):wt,E=re(t,"FORBID_CONTENTS")?ae({},t.FORBID_CONTENTS,N):xt,y=re(t,"FORBID_TAGS")?ae({},t.FORBID_TAGS,N):{},lt=re(t,"FORBID_ATTR")?ae({},t.FORBID_ATTR,N):{},l=!!re(t,"USE_PROFILES")&&t.USE_PROFILES,ct=!1!==t.ALLOW_ARIA_ATTR,ht=!1!==t.ALLOW_DATA_ATTR,ut=t.ALLOW_UNKNOWN_PROTOCOLS||!1,dt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,v=t.SAFE_FOR_TEMPLATES||!1,pt=!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,ft=t.FORCE_BODY||!1,mt=!1!==t.SANITIZE_DOM,yt=t.SANITIZE_NAMED_PROPS||!1,vt=!1!==t.KEEP_CONTENT,T=t.IN_PLACE||!1,at=t.ALLOWED_URI_REGEXP||ye,A=t.NAMESPACE||S,s=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Lt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(s.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Lt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(s.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(s.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(ht=!1),w&&(b=!0),l&&(f=ae({},de),m=[],!0===l.html&&(ae(f,le),ae(m,pe)),!0===l.svg&&(ae(f,ce),ae(m,ge),ae(m,me)),!0===l.svgFilters&&(ae(f,he),ae(m,ge),ae(m,me)),!0===l.mathMl)&&(ae(f,ue),ae(m,fe),ae(m,me)),t.ADD_TAGS&&ae(f=f===ot?oe(f):f,t.ADD_TAGS,N),t.ADD_ATTR&&ae(m=m===st?oe(m):m,t.ADD_ATTR,N),t.ADD_URI_SAFE_ATTR&&ae(kt,t.ADD_URI_SAFE_ATTR,N),t.FORBID_CONTENTS&&ae(E=E===xt?oe(E):E,t.FORBID_CONTENTS,N),vt&&(f["#text"]=!0),x&&ae(f,["html","head","body"]),f.table&&(ae(f,["tbody"]),delete y.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw ie('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw ie('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');p=t.TRUSTED_TYPES_POLICY,g=p.createHTML("")}else null!==(p=void 0===p?Se(d,O):p)&&"string"==typeof g&&(g=p.createHTML(""));Wt&&Wt(t),I=t}},"_parseConfig"),It=ae({},["mi","mo","mn","ms","mtext"]),Mt=ae({},["foreignobject","annotation-xml"]),Rt=ae({},["title","style","font","a","script"]),Dt=ae({},[...ce,...he,...Te]),Ot=ae({},[...ue,...Ee]),Pt=Ae(function(t){let e=o(t);e&&e.tagName||(e={namespaceURI:A,tagName:"template"});var r=Qt(t.tagName),n=Qt(e.tagName);return!!_t[t.namespaceURI]&&(t.namespaceURI===C?e.namespaceURI===S?"svg"===r:e.namespaceURI===_?"svg"===r&&("annotation-xml"===n||It[n]):!!Dt[r]:t.namespaceURI===_?e.namespaceURI===S?"math"===r:e.namespaceURI===C?"math"===r&&Mt[n]:!!Ot[r]:t.namespaceURI===S?!(e.namespaceURI===C&&!Mt[n]||e.namespaceURI===_&&!It[n]||Ot[r])&&(Rt[r]||!Dt[r]):!("application/xhtml+xml"!==L||!_t[t.namespaceURI]))},"_checkValidNamespace"),M=Ae(function(t){Zt(u.removed,{element:t});try{o(t).removeChild(t)}catch{q(t)}},"_forceRemove"),R=Ae(function(t,e){try{Zt(u.removed,{attribute:e.getAttributeNode(t),from:e})}catch{Zt(u.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!m[t])if(b||w)try{M(e)}catch{}else try{e.setAttribute(t,"")}catch{}},"_removeAttribute"),Bt=Ae(function(t){let e=null,r=null;ft?t="<remove></remove>"+t:(n=te(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&A===S&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var n=p?p.createHTML(t):t;if(A===S)try{e=(new G).parseFromString(n,L)}catch{}if(!e||!e.documentElement){e=H.createDocument(A,"template",null);try{e.documentElement.innerHTML=Et?g:n}catch{}}return n=e.body||e.documentElement,t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),A===S?X.call(e,x?"html":"body")[0]:x?e.documentElement:n},"_initDocument"),Ft=Ae(function(t){return W.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=Ae(function(t){return t instanceof z&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof $)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=Ae(function(t){return"function"==typeof h&&t instanceof h},"_isNode"),D=Ae(function(t,e,r){a[t]&&Xt(a[t],t=>{t.call(u,e,r,I)})},"_executeHook"),Gt=Ae(function(e){let r=null;if(D("beforeSanitizeElements",e,null),!$t(e)){var t=N(e.nodeName);if(D("uponSanitizeElement",e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&ne(/<[/\w]/g,e.innerHTML)&&ne(/<[/\w]/g,e.textContent)||e.nodeType===xe.progressingInstruction||pt&&e.nodeType===xe.comment&&ne(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof F&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&ne(/<\/no(script|embed|frames)/i,e.innerHTML)?(M(e),!0):(v&&e.nodeType===xe.text&&(r=e.textContent,Xt([Z,Q,J],t=>{r=ee(r,t," ")}),e.textContent!==r)&&(Zt(u.removed,{element:e.cloneNode()}),e.textContent=r),D("afterSanitizeElements",e,null),!1);if(!y[t]&&qt(t)&&(s.tagNameCheck instanceof RegExp&&ne(s.tagNameCheck,t)||s.tagNameCheck instanceof Function&&s.tagNameCheck(t)))return!1;if(vt&&!E[t]){var n=o(e)||e.parentNode,i=j(e)||e.childNodes;if(i&&n)for(let t=i.length-1;0<=t;--t){var a=U(i[t],!0);a.__removalCount=(e.__removalCount||0)+1,n.insertBefore(a,Y(e))}}}}return M(e),!0},"_sanitizeElements"),Ut=Ae(function(t,e,r){if(mt&&("id"===e||"name"===e)&&(r in i||r in At))return!1;if((!ht||lt[e]||!ne(tt,e))&&(!ct||!ne(et,e)))if(!m[e]||lt[e]){if(!(qt(t)&&(s.tagNameCheck instanceof RegExp&&ne(s.tagNameCheck,t)||s.tagNameCheck instanceof Function&&s.tagNameCheck(t))&&(s.attributeNameCheck instanceof RegExp&&ne(s.attributeNameCheck,e)||s.attributeNameCheck instanceof Function&&s.attributeNameCheck(e))||"is"===e&&s.allowCustomizedBuiltInElements&&(s.tagNameCheck instanceof RegExp&&ne(s.tagNameCheck,r)||s.tagNameCheck instanceof Function&&s.tagNameCheck(r))))return!1}else if(!kt[e]&&!ne(at,ee(r,nt,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==we(r,"data:")||!bt[t])&&(!ut||ne(rt,ee(r,nt,"")))&&r)return!1;return!0},"_isValidAttribute"),qt=Ae(function(t){return"annotation-xml"!==t&&te(t,it)},"_isBasicCustomElement"),Yt=Ae(function(l){D("beforeSanitizeAttributes",l,null);var c=l.attributes;if(c){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m},s=c.length;for(;s--;){let t=c[s],{name:e,namespaceURI:r,value:n}=t,i=N(e),a="value"===e?n:ke(n);if(o.attrName=i,o.attrValue=a,o.keepAttr=!0,o.forceKeepAttr=void 0,D("uponSanitizeAttribute",l,o),a=o.attrValue,pt&&ne(/((--!?|])>)|<\/(style|title)/i,a))R(e,l);else if(!o.forceKeepAttr&&(R(e,l),o.keepAttr))if(!dt&&ne(/\/>/i,a))R(e,l);else{v&&Xt([Z,Q,J],t=>{a=ee(a,t," ")});var h=N(l.nodeName);if(Ut(h,i,a)){if(!yt||"id"!==i&&"name"!==i||(R(e,l),a="user-content-"+a),p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,i)){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)?M(l):Kt(u.removed)}catch{}}}}D("afterSanitizeAttributes",l,null)}},"_sanitizeAttributes"),jt=Ae(function t(e){var r,n=Ft(e);for(D("beforeSanitizeShadowDOM",e,null);r=n.nextNode();)D("uponSanitizeShadowNode",r,null),Gt(r)||(r.content instanceof P&&t(r.content),Yt(r));D("afterSanitizeShadowDOM",e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,n,i,a=null;if("string"!=typeof(t=(Et=!t)?"\x3c!--\x3e":t)&&!zt(t)){if("function"!=typeof t.toString)throw ie("toString is not a function");if("string"!=typeof(t=t.toString()))throw ie("dirty is not a string, aborting")}if(!u.isSupported)return t;if(gt||Nt(e),u.removed=[],T="string"!=typeof t&&T){if(t.nodeName){var o=N(t.nodeName);if(!f[o]||y[o])throw ie("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof h)(n=(r=Bt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType===xe.element&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!b&&!v&&!x&&-1===t.indexOf("<"))return p&&k?p.createHTML(t):t;if(!(r=Bt(t)))return b?null:k?g:""}r&&ft&&M(r.firstChild);for(var s=Ft(T?t:r);i=s.nextNode();)Gt(i)||(i.content instanceof P&&jt(i.content),Yt(i));if(T)return t;if(b){if(w)for(a=V.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?K.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&&ne(ve,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
|
|
|
`+l),v&&Xt([Z,Q,J],t=>{l=ee(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Nt(t),gt=!0},u.clearConfig=function(){I=null,gt=!1},u.isValidAttribute=function(t,e,r){return I||Nt({}),t=N(t),e=N(e),Ut(t,e,r)},u.addHook=function(t,e){"function"==typeof e&&(a[t]=a[t]||[],Zt(a[t],e))},u.removeHook=function(t){if(a[t])return Kt(a[t])},u.removeHooks=function(t){a[t]&&(a[t]=[])},u.removeAllHooks=function(){a={}},u}return Ae(be,"createDOMPurify"),be()}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).DOMPurify=r()}),Dn={};function On(t){return String(t).replace(gi,t=>pi[t])}function Pn(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Bn(t){for(var e=0;e<Ai.length;e++)for(var r=Ai[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}function Fn(t){for(var e=0;e<Li.length;e+=2)if(Li[e]<=t&&t<=Li[e+1])return!0;return!1}function $n(t,e){Ui[t]=e}function zn(t,e,r){if(!Ui[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Ui[e][n];if(!i&&t[0]in Yi&&(n=Yi[t[0]].charCodeAt(0),i=Ui[e][n]),i=!i&&"text"===r&&Fn(n)?Ui[e][77]:i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Gn(t){var e=5<=t?0:3<=t?1:2;if(!ji[e]){var r,n=ji[e]={cssEmPerMu:qi.quad[e]/18};for(r in qi)qi.hasOwnProperty(r)&&(n[r]=qi[r][e])}return ji[e]}function Un(t){if(t instanceof la)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function qn(t){if(t instanceof ia)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}function s(t,e,r,n,i,a){ga[t][i]={font:e,group:r,replace:n},a&&n&&(ga[t][n]=ga[t][i])}function l(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},s=0;s<e.length;++s)Za[e[s]]=o;t&&(i&&(Qa[t]=i),a)&&(Ja[t]=a)}function Yn(t){var{type:t,htmlBuilder:e,mathmlBuilder:r}=t;l({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:e,mathmlBuilder:r})}function jn(t,e){return t=ro(["base"],t,e),(e=ro(["strut"])).style.height=K(t.height+t.depth),t.depth&&(e.style.verticalAlign=K(-t.depth)),t.children.unshift(e),t}function Hn(t,e){var r,n=null,i=(1===t.length&&"tag"===t[0].type&&(n=t[0].tag,t=t[0].body),so(t,e,"root"));2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,o=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(o.push(jn(s,e)),s=[])}else i[l].hasClass("newline")&&(s.pop(),0<s.length&&(o.push(jn(s,e)),s=[]),o.push(i[l]));return 0<s.length&&o.push(jn(s,e)),n?((a=jn(so(n,e,!0))).classes=["tag"],o.push(a)):r&&o.push(r),(t=ro(["katex-html"],o)).setAttribute("aria-hidden","true"),a&&((n=a.children[0]).style.height=K(t.height+t.depth),t.depth)&&(n.style.verticalAlign=K(-t.depth)),t}function Wn(t){return new Gi(t)}function Vn(t,e,r,n,i){return r=1===(t=bo(t,r)).length&&t[0]instanceof fo&&yi.contains(["mrow","mtable"],t[0].type)?t[0]:new E.MathNode("mrow",t),(t=new E.MathNode("annotation",[new E.TextNode(e)])).setAttribute("encoding","application/x-tex"),e=new E.MathNode("semantics",[r,t]),(r=new E.MathNode("math",[e])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Z.makeSpan([i?"katex":"katex-mathml"],[r])}function Xn(t,e){if(t&&t.type===e)return t;throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+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||pa.hasOwnProperty(t.type))?t:null}function Qn(t,e){var r=so(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 ti(t,e,r){var n=Po[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i=r.callFunction("\\\\cdleft",[e[0]],[]),a=r.callFunction("\\Big",[{type:"atom",text:n,mode:"math",family:"rel"}],[]),o=r.callFunction("\\\\cdright",[e[1]],[]);return r.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[i,a,o]}],[]);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 ei(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 n=[],i=[n],a=0;a<e.length;a++){for(var o=e[a],s=Bo(),l=0;l<o.length;l++)if(Fo(o[l])){n.push(s);var c=Kn(o[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 @',o[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p<o.length;p++){if($o(o[p],c)){d=!1,l=p;break}if(Fo(o[p]))throw new X("Missing a "+c+" character to complete a CD arrow.",o[p]);h[u].body.push(o[p])}if(d)throw new X("Missing a "+c+" character to complete a CD arrow.",o[l])}}var g=ti(c,h,t);n.push({type:"styling",body:[g],mode:"math",style:"display"}),s=Bo()}else s.body.push(o[l]);a%2==0?n.push(s):n.shift(),i.push(n=[])}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function ri(t,e){var r=Zn(t);if(r&&yi.contains(fs,r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function ni(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function ii(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},s=0;s<e.length;++s)ms[e[s]]=o;i&&(Qa[t]=i),a&&(Ja[t]=a)}function h(t,e){ys[t]=e}function ai(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 oi(t){if(-1===t.indexOf("ed"))return-1===t.indexOf("*")}function si(t,e,r){var{hskipBeforeAndAfter:e,addJot:n,cols:i,arraystretch:a,colSeparationType:o,autoTag:s,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!=s?[]:void 0;function v(){s&&t.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(t.gullet.macros.get("\\df@tag")?(y.push(t.subparse([new ui("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!s&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(Ae(v,"beginRow"),Ae(x,"endRow"),v(),m.push(ai(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||o)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(ai(t)),g.push(p=[]),v()}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:n,arraystretch:a,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:e,hLinesBeforeRow:m,colSeparationType:o,tags:y,leqno:u}}function li(t){return"d"===t.slice(0,1)?"display":"text"}function ci(t,e,r){for(var n=so(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var o=n[a].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[o+1]==="reset-size"+e.size&&(n[a].classes[o+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return Z.makeFragment(n)}J(Dn,{default:()=>vl});var hi,ui,X,di,pi,gi,fi,mi,yi,vi,xi,bi,wi,ki,Ti,Ei,_i,Ci,Si,Ai,Li,Ni,Ii,Mi,Ri,Di,Oi,Pi,Bi,Fi,$i,zi,Gi,Ui,qi,Yi,ji,Hi,Wi,Vi,Xi,Ki,Zi,Qi,Ji,K,ta,ea,ra,na,ia,aa,oa,sa,la,ca,ha,ua,da,pa,ga,u,d,p,fa,g,ma,ya,va,xa,ba,wa,ka,Ta,Ea,_a,Ca,Sa,Aa,La,Na,Ia,Ma,Ra,Da,Oa,Pa,Ba,Fa,$a,za,Ga,Ua,qa,Ya,ja,Ha,Wa,Va,Z,Xa,Ka,Za,Qa,Ja,to,eo,ro,no,io,ao,oo,so,lo,co,ho,uo,po,go,fo,mo,E,yo,vo,xo,bo,wo,ko,To,Eo,_o,Co,So,Ao,Lo,No,Io,Mo,Ro,Do,Oo,Po,Bo,Fo,$o,zo,Go,Uo,qo,Yo,jo,Ho,Wo,Vo,Xo,Ko,Zo,Qo,Jo,ts,es,rs,ns,is,as,os,ss,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,vs,xs,bs,ws,ks,Ts,Es,_s,Cs,Ss,As,Ls,Ns,Is,Ms,Rs,Ds,Os,Ps,Bs,Fs,$s,zs,Gs,Us,qs,Ys,js,Hs,Ws,Vs,Xs,f,Ks,Zs,Qs,Js,tl,el,rl,nl,il,al,ol,sl,ll,cl,hl,ul,dl,pl,m,gl,fl,ml,yl,y,vl,xl=t(()=>{for(hi=class r{static{Ae(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}},ui=class n{static{Ae(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 n(e,hi.range(this,t))}},(X=class o{static{Ae(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,n=e.start,i=e.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",e=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15<n?"…"+r.slice(n-15,n):r.slice(0,n))+e+(i+15<r.length?r.slice(i,i+15)+"…":r.slice(i))),(e=new Error(a)).name="ParseError",e.__proto__=o.prototype,null!=(e.position=n)&&null!=i&&(e.length=i-n),e.rawMessage=t,e}}).prototype.__proto__=Error.prototype,Bs=Ae(function(t,e){return-1!==t.indexOf(e)},"contains"),y=Ae(function(t,e){return void 0===t?e:t},"deflt"),di=/([A-Z])/g,al=Ae(function(t){return t.replace(di,"-$1").toLowerCase()},"hyphenate"),pi={"&":"&",">":">","<":"<",'"':""","'":"'"},gi=/[&><"']/g,Ae(On,"escape"),fi=Ae(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=Ae(function(t){return"mathord"===(t=fi(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),mi=Ae(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Is=Ae(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),yi={contains:Bs,deflt:y,escape:On,hyphenate:al,getBaseElem:fi,isCharacterBox:m,protocolFromUrl:Is},vi={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:Ae(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:Ae((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:Ae(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:Ae(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:Ae(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:Ae(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},Ae(Pn,"getDefaultValue"),xi=class{static{Ae(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||{},vi){var r;vi.hasOwnProperty(e)&&(r=vi[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:Pn(r))}}reportNonstrict(t,e,r){var n=this.strict;if((n="function"==typeof n?n(t,e,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?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 '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?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 '"+n+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=yi.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Bs=class{static{Ae(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 bi[wi[this.id]]}sub(){return bi[ki[this.id]]}fracNum(){return bi[Ti[this.id]]}fracDen(){return bi[Ei[this.id]]}cramp(){return bi[_i[this.id]]}text(){return bi[Ci[this.id]]}isTight(){return 2<=this.size}},bi=[new Bs(0,0,!1),new Bs(1,0,!0),new Bs(2,1,!1),new Bs(3,1,!0),new Bs(4,2,!1),new Bs(5,2,!0),new Bs(6,3,!1),new Bs(7,3,!0)],wi=[4,5,4,5,6,7,6,7],ki=[5,5,5,5,7,7,7,7],Ti=[2,3,4,5,6,7,6,7],Ei=[3,3,5,5,7,7,7,7],_i=[1,1,3,3,5,5,7,7],Ci=[0,1,2,3,2,3,2,3],Si={DISPLAY:bi[0],TEXT:bi[2],SCRIPT:bi[4],SCRIPTSCRIPT:bi[6]},Ai=[{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]]}],Ae(Bn,"scriptFromCodepoint"),Li=[],Ai.forEach(t=>t.blocks.forEach(t=>Li.push(...t))),Ae(Fn,"supportedCodepoint"),Ni=Ae(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"),Ii=Ae(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119
|
|
|
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
|
c340,-704.7,510.7,-1060.3,512,-1067
|
|
|
l`+t/2.084+" -"+t+`
|
|
|
c4.7,-7.3,11,-11,19,-11
|
|
|
H40000v`+(40+t)+`H1012.3
|
|
|
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
|
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
|
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
|
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
|
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Mi=Ae(function(t,e){return"M983 "+(10+t+e)+`
|
|
|
l`+t/3.13+" -"+t+`
|
|
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
|
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
|
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
|
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
|
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
|
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Ri=Ae(function(t,e){return"M424,"+(2398+t+e)+`
|
|
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
|
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
|
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
|
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
|
v`+(40+t)+`H1014.6
|
|
|
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
|
c-2,6,-10,9,-24,9
|
|
|
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+`
|
|
|
h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),Di=Ae(function(t,e){return"M473,"+(2713+t+e)+`
|
|
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
|
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
|
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
|
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
|
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
|
606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),Oi=Ae(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),Pi=Ae(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+`
|
|
|
H742v`+(r-54-e-t)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
|
219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Bi=Ae(function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=Ni(e,80);break;case"sqrtSize1":n=Ii(e,80);break;case"sqrtSize2":n=Mi(e,80);break;case"sqrtSize3":n=Ri(e,80);break;case"sqrtSize4":n=Di(e,80);break;case"sqrtTall":n=Pi(e,80,r)}return n},"sqrtPath"),Fi=Ae(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),$i={doubleleftarrow:`M262 157
|
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},zi=Ae(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84
|
|
|
H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z
|
|
|
M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
|
|
|
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
|
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
|
|
|
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
|
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z
|
|
|
M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15
|
|
|
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
|
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z
|
|
|
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z
|
|
|
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z
|
|
|
M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z
|
|
|
M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
|
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
|
-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
|
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
|
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
|
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
|
l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
|
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
|
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
|
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+`
|
|
|
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
|
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
|
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
|
l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
|
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),Gi=class{static{Ae(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return yi.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){var t=Ae(t=>t.toText(),"toText");return this.children.map(t).join("")}},Ui={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.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]}},qi={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]},Yi={"Å":"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"},Ae($n,"setFontMetrics"),Ae(zn,"getCharacterMetrics"),ji={},Ae(Gn,"getGlobalMetrics"),Hi=[[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]],Wi=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Vi=Ae(function(t,e){return e.size<2?t:Hi[t-1][e.size-1]},"sizeAtStyle"),(Xi=class i{static{Ae(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||i.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=Wi[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 i(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Vi(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:Wi[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Vi(i.BASESIZE,t);return this.size===e&&this.textSize===i.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!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Gn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ki={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},Zi={ex:!0,em:!0,mu:!0},Qi=Ae(function(t){return(t="string"!=typeof t?t.unit:t)in Ki||t in Zi||"ex"===t},"validUnit"),Ji=Ae(function(t,e){var r;if(t.unit in Ki)r=Ki[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=Ae(function(t){return+t.toFixed(4)+"em"},"makeEm"),ta=Ae(function(t){return t.filter(t=>t).join(" ")},"createClass"),ea=Ae(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"),ra=Ae(function(t){var e,r,n=document.createElement(t);for(e in n.className=ta(this.classes),this.style)this.style.hasOwnProperty(e)&&(n.style[e]=this.style[e]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n},"toNode"),na=Ae(function(t){var e,r,n="<"+t,i=(this.classes.length&&(n+=' class="'+yi.escape(ta(this.classes))+'"'),"");for(e in this.style)this.style.hasOwnProperty(e)&&(i+=yi.hyphenate(e)+":"+this.style[e]+";");for(r in i&&(n+=' style="'+yi.escape(i)+'"'),this.attributes)this.attributes.hasOwnProperty(r)&&(n+=" "+r+'="'+yi.escape(this.attributes[r])+'"');n+=">";for(var a=0;a<this.children.length;a++)n+=this.children[a].toMarkup();return n+"</"+t+">"},"toMarkup"),ia=class{static{Ae(this,"Span")}constructor(t,e,r,n){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,ea.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return yi.contains(this.classes,t)}toNode(){return ra.call(this,"span")}toMarkup(){return na.call(this,"span")}},aa=class{static{Ae(this,"Anchor")}constructor(t,e,r,n){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,ea.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return yi.contains(this.classes,t)}toNode(){return ra.call(this,"a")}toMarkup(){return na.call(this,"a")}},oa=class{static{Ae(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 yi.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="'+yi.escape(this.src)+'" alt="'+yi.escape(this.alt)+'"',r="";for(t in this.style)this.style.hasOwnProperty(t)&&(r+=yi.hyphenate(t)+":"+this.style[t]+";");return r&&(e+=' style="'+yi.escape(r)+'"'),e+"'/>"}},sa={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},la=class{static{Ae(this,"SymbolNode")}constructor(t,e,r,n,i,a,o,s){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=n||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0,(t=Bn(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=sa[this.text])}hasClass(t){return yi.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=ta(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",n=(this.classes.length&&(e=!0,r=(r+=' class="')+yi.escape(ta(this.classes))+'"'),"");for(t in 0<this.italic&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(t)&&(n+=yi.hyphenate(t)+":"+this.style[t]+";");n&&(e=!0,r+=' style="'+yi.escape(n)+'"');var i=yi.escape(this.text);return e?(r+=">")+i+"</span>":i}},ca=class{static{Ae(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+'="'+yi.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+"</svg>"}},ha=class{static{Ae(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",$i[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+yi.escape(this.alternate)+'"/>':'<path d="'+yi.escape($i[this.pathName])+'"/>'}},ua=class{static{Ae(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+'="'+yi.escape(this.attributes[t])+'"');return e+"/>"}},Ae(Un,"assertSymbolDomNode"),Ae(qn,"assertSpan"),da={bin:1,close:1,inner:1,open:1,punct:1,rel:1},pa={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ga={math:{},text:{}},Ae(s,"defineSymbol"),d="text",y="ams",al="accent-token",m="bin",Is="close",Bs="inner",fa="mathord",il="op-token",fl="open",Os="punct",gl="spacing",g="textord",s(u="math",p="main",f="rel","≡","\\equiv",!0),s(u,p,f,"≺","\\prec",!0),s(u,p,f,"≻","\\succ",!0),s(u,p,f,"∼","\\sim",!0),s(u,p,f,"⊥","\\perp"),s(u,p,f,"⪯","\\preceq",!0),s(u,p,f,"⪰","\\succeq",!0),s(u,p,f,"≃","\\simeq",!0),s(u,p,f,"∣","\\mid",!0),s(u,p,f,"≪","\\ll",!0),s(u,p,f,"≫","\\gg",!0),s(u,p,f,"≍","\\asymp",!0),s(u,p,f,"∥","\\parallel"),s(u,p,f,"⋈","\\bowtie",!0),s(u,p,f,"⌣","\\smile",!0),s(u,p,f,"⊑","\\sqsubseteq",!0),s(u,p,f,"⊒","\\sqsupseteq",!0),s(u,p,f,"≐","\\doteq",!0),s(u,p,f,"⌢","\\frown",!0),s(u,p,f,"∋","\\ni",!0),s(u,p,f,"∝","\\propto",!0),s(u,p,f,"⊢","\\vdash",!0),s(u,p,f,"⊣","\\dashv",!0),s(u,p,f,"∋","\\owns"),s(u,p,Os,".","\\ldotp"),s(u,p,Os,"⋅","\\cdotp"),s(u,p,g,"#","\\#"),s(d,p,g,"#","\\#"),s(u,p,g,"&","\\&"),s(d,p,g,"&","\\&"),s(u,p,g,"ℵ","\\aleph",!0),s(u,p,g,"∀","\\forall",!0),s(u,p,g,"ℏ","\\hbar",!0),s(u,p,g,"∃","\\exists",!0),s(u,p,g,"∇","\\nabla",!0),s(u,p,g,"♭","\\flat",!0),s(u,p,g,"ℓ","\\ell",!0),s(u,p,g,"♮","\\natural",!0),s(u,p,g,"♣","\\clubsuit",!0),s(u,p,g,"℘","\\wp",!0),s(u,p,g,"♯","\\sharp",!0),s(u,p,g,"♢","\\diamondsuit",!0),s(u,p,g,"ℜ","\\Re",!0),s(u,p,g,"♡","\\heartsuit",!0),s(u,p,g,"ℑ","\\Im",!0),s(u,p,g,"♠","\\spadesuit",!0),s(u,p,g,"§","\\S",!0),s(d,p,g,"§","\\S"),s(u,p,g,"¶","\\P",!0),s(d,p,g,"¶","\\P"),s(u,p,g,"†","\\dag"),s(d,p,g,"†","\\dag"),s(d,p,g,"†","\\textdagger"),s(u,p,g,"‡","\\ddag"),s(d,p,g,"‡","\\ddag"),s(d,p,g,"‡","\\textdaggerdbl"),s(u,p,Is,"⎱","\\rmoustache",!0),s(u,p,fl,"⎰","\\lmoustache",!0),s(u,p,Is,"⟯","\\rgroup",!0),s(u,p,fl,"⟮","\\lgroup",!0),s(u,p,m,"∓","\\mp",!0),s(u,p,m,"⊖","\\ominus",!0),s(u,p,m,"⊎","\\uplus",!0),s(u,p,m,"⊓","\\sqcap",!0),s(u,p,m,"∗","\\ast"),s(u,p,m,"⊔","\\sqcup",!0),s(u,p,m,"◯","\\bigcirc",!0),s(u,p,m,"∙","\\bullet",!0),s(u,p,m,"‡","\\ddagger"),s(u,p,m,"≀","\\wr",!0),s(u,p,m,"⨿","\\amalg"),s(u,p,m,"&","\\And"),s(u,p,f,"⟵","\\longleftarrow",!0),s(u,p,f,"⇐","\\Leftarrow",!0),s(u,p,f,"⟸","\\Longleftarrow",!0),s(u,p,f,"⟶","\\longrightarrow",!0),s(u,p,f,"⇒","\\Rightarrow",!0),s(u,p,f,"⟹","\\Longrightarrow",!0),s(u,p,f,"↔","\\leftrightarrow",!0),s(u,p,f,"⟷","\\longleftrightarrow",!0),s(u,p,f,"⇔","\\Leftrightarrow",!0),s(u,p,f,"⟺","\\Longleftrightarrow",!0),s(u,p,f,"↦","\\mapsto",!0),s(u,p,f,"⟼","\\longmapsto",!0),s(u,p,f,"↗","\\nearrow",!0),s(u,p,f,"↩","\\hookleftarrow",!0),s(u,p,f,"↪","\\hookrightarrow",!0),s(u,p,f,"↘","\\searrow",!0),s(u,p,f,"↼","\\leftharpoonup",!0),s(u,p,f,"⇀","\\rightharpoonup",!0),s(u,p,f,"↙","\\swarrow",!0),s(u,p,f,"↽","\\leftharpoondown",!0),s(u,p,f,"⇁","\\rightharpoondown",!0),s(u,p,f,"↖","\\nwarrow",!0),s(u,p,f,"⇌","\\rightleftharpoons",!0),s(u,y,f,"≮","\\nless",!0),s(u,y,f,"","\\@nleqslant"),s(u,y,f,"","\\@nleqq"),s(u,y,f,"⪇","\\lneq",!0),s(u,y,f,"≨","\\lneqq",!0),s(u,y,f,"","\\@lvertneqq"),s(u,y,f,"⋦","\\lnsim",!0),s(u,y,f,"⪉","\\lnapprox",!0),s(u,y,f,"⊀","\\nprec",!0),s(u,y,f,"⋠","\\npreceq",!0),s(u,y,f,"⋨","\\precnsim",!0),s(u,y,f,"⪹","\\precnapprox",!0),s(u,y,f,"≁","\\nsim",!0),s(u,y,f,"","\\@nshortmid"),s(u,y,f,"∤","\\nmid",!0),s(u,y,f,"⊬","\\nvdash",!0),s(u,y,f,"⊭","\\nvDash",!0),s(u,y,f,"⋪","\\ntriangleleft"),s(u,y,f,"⋬","\\ntrianglelefteq",!0),s(u,y,f,"⊊","\\subsetneq",!0),s(u,y,f,"","\\@varsubsetneq"),s(u,y,f,"⫋","\\subsetneqq",!0),s(u,y,f,"","\\@varsubsetneqq"),s(u,y,f,"≯","\\ngtr",!0),s(u,y,f,"","\\@ngeqslant"),s(u,y,f,"","\\@ngeqq"),s(u,y,f,"⪈","\\gneq",!0),s(u,y,f,"≩","\\gneqq",!0),s(u,y,f,"","\\@gvertneqq"),s(u,y,f,"⋧","\\gnsim",!0),s(u,y,f,"⪊","\\gnapprox",!0),s(u,y,f,"⊁","\\nsucc",!0),s(u,y,f,"⋡","\\nsucceq",!0),s(u,y,f,"⋩","\\succnsim",!0),s(u,y,f,"⪺","\\succnapprox",!0),s(u,y,f,"≆","\\ncong",!0),s(u,y,f,"","\\@nshortparallel"),s(u,y,f,"∦","\\nparallel",!0),s(u,y,f,"⊯","\\nVDash",!0),s(u,y,f,"⋫","\\ntriangleright"),s(u,y,f,"⋭","\\ntrianglerighteq",!0),s(u,y,f,"","\\@nsupseteqq"),s(u,y,f,"⊋","\\supsetneq",!0),s(u,y,f,"","\\@varsupsetneq"),s(u,y,f,"⫌","\\supsetneqq",!0),s(u,y,f,"","\\@varsupsetneqq"),s(u,y,f,"⊮","\\nVdash",!0),s(u,y,f,"⪵","\\precneqq",!0),s(u,y,f,"⪶","\\succneqq",!0),s(u,y,f,"","\\@nsubseteqq"),s(u,y,m,"⊴","\\unlhd"),s(u,y,m,"⊵","\\unrhd"),s(u,y,f,"↚","\\nleftarrow",!0),s(u,y,f,"↛","\\nrightarrow",!0),s(u,y,f,"⇍","\\nLeftarrow",!0),s(u,y,f,"⇏","\\nRightarrow",!0),s(u,y,f,"↮","\\nleftrightarrow",!0),s(u,y,f,"⇎","\\nLeftrightarrow",!0),s(u,y,f,"△","\\vartriangle"),s(u,y,g,"ℏ","\\hslash"),s(u,y,g,"▽","\\triangledown"),s(u,y,g,"◊","\\lozenge"),s(u,y,g,"Ⓢ","\\circledS"),s(u,y,g,"®","\\circledR"),s(d,y,g,"®","\\circledR"),s(u,y,g,"∡","\\measuredangle",!0),s(u,y,g,"∄","\\nexists"),s(u,y,g,"℧","\\mho"),s(u,y,g,"Ⅎ","\\Finv",!0),s(u,y,g,"⅁","\\Game",!0),s(u,y,g,"‵","\\backprime"),s(u,y,g,"▲","\\blacktriangle"),s(u,y,g,"▼","\\blacktriangledown"),s(u,y,g,"■","\\blacksquare"),s(u,y,g,"⧫","\\blacklozenge"),s(u,y,g,"★","\\bigstar"),s(u,y,g,"∢","\\sphericalangle",!0),s(u,y,g,"∁","\\complement",!0),s(u,y,g,"ð","\\eth",!0),s(d,p,g,"ð","ð"),s(u,y,g,"╱","\\diagup"),s(u,y,g,"╲","\\diagdown"),s(u,y,g,"□","\\square"),s(u,y,g,"□","\\Box"),s(u,y,g,"◊","\\Diamond"),s(u,y,g,"¥","\\yen",!0),s(d,y,g,"¥","\\yen",!0),s(u,y,g,"✓","\\checkmark",!0),s(d,y,g,"✓","\\checkmark"),s(u,y,g,"ℶ","\\beth",!0),s(u,y,g,"ℸ","\\daleth",!0),s(u,y,g,"ℷ","\\gimel",!0),s(u,y,g,"ϝ","\\digamma",!0),s(u,y,g,"ϰ","\\varkappa"),s(u,y,fl,"┌","\\@ulcorner",!0),s(u,y,Is,"┐","\\@urcorner",!0),s(u,y,fl,"└","\\@llcorner",!0),s(u,y,Is,"┘","\\@lrcorner",!0),s(u,y,f,"≦","\\leqq",!0),s(u,y,f,"⩽","\\leqslant",!0),s(u,y,f,"⪕","\\eqslantless",!0),s(u,y,f,"≲","\\lesssim",!0),s(u,y,f,"⪅","\\lessapprox",!0),s(u,y,f,"≊","\\approxeq",!0),s(u,y,m,"⋖","\\lessdot"),s(u,y,f,"⋘","\\lll",!0),s(u,y,f,"≶","\\lessgtr",!0),s(u,y,f,"⋚","\\lesseqgtr",!0),s(u,y,f,"⪋","\\lesseqqgtr",!0),s(u,y,f,"≑","\\doteqdot"),s(u,y,f,"≓","\\risingdotseq",!0),s(u,y,f,"≒","\\fallingdotseq",!0),s(u,y,f,"∽","\\backsim",!0),s(u,y,f,"⋍","\\backsimeq",!0),s(u,y,f,"⫅","\\subseteqq",!0),s(u,y,f,"⋐","\\Subset",!0),s(u,y,f,"⊏","\\sqsubset",!0),s(u,y,f,"≼","\\preccurlyeq",!0),s(u,y,f,"⋞","\\curlyeqprec",!0),s(u,y,f,"≾","\\precsim",!0),s(u,y,f,"⪷","\\precapprox",!0),s(u,y,f,"⊲","\\vartriangleleft"),s(u,y,f,"⊴","\\trianglelefteq"),s(u,y,f,"⊨","\\vDash",!0),s(u,y,f,"⊪","\\Vvdash",!0),s(u,y,f,"⌣","\\smallsmile"),s(u,y,f,"⌢","\\smallfrown"),s(u,y,f,"≏","\\bumpeq",!0),s(u,y,f,"≎","\\Bumpeq",!0),s(u,y,f,"≧","\\geqq",!0),s(u,y,f,"⩾","\\geqslant",!0),s(u,y,f,"⪖","\\eqslantgtr",!0),s(u,y,f,"≳","\\gtrsim",!0),s(u,y,f,"⪆","\\gtrapprox",!0),s(u,y,m,"⋗","\\gtrdot"),s(u,y,f,"⋙","\\ggg",!0),s(u,y,f,"≷","\\gtrless",!0),s(u,y,f,"⋛","\\gtreqless",!0),s(u,y,f,"⪌","\\gtreqqless",!0),s(u,y,f,"≖","\\eqcirc",!0),s(u,y,f,"≗","\\circeq",!0),s(u,y,f,"≜","\\triangleq",!0),s(u,y,f,"∼","\\thicksim"),s(u,y,f,"≈","\\thickapprox"),s(u,y,f,"⫆","\\supseteqq",!0),s(u,y,f,"⋑","\\Supset",!0),s(u,y,f,"⊐","\\sqsupset",!0),s(u,y,f,"≽","\\succcurlyeq",!0),s(u,y,f,"⋟","\\curlyeqsucc",!0),s(u,y,f,"≿","\\succsim",!0),s(u,y,f,"⪸","\\succapprox",!0),s(u,y,f,"⊳","\\vartriangleright"),s(u,y,f,"⊵","\\trianglerighteq"),s(u,y,f,"⊩","\\Vdash",!0),s(u,y,f,"∣","\\shortmid"),s(u,y,f,"∥","\\shortparallel"),s(u,y,f,"≬","\\between",!0),s(u,y,f,"⋔","\\pitchfork",!0),s(u,y,f,"∝","\\varpropto"),s(u,y,f,"◀","\\blacktriangleleft"),s(u,y,f,"∴","\\therefore",!0),s(u,y,f,"∍","\\backepsilon"),s(u,y,f,"▶","\\blacktriangleright"),s(u,y,f,"∵","\\because",!0),s(u,y,f,"⋘","\\llless"),s(u,y,f,"⋙","\\gggtr"),s(u,y,m,"⊲","\\lhd"),s(u,y,m,"⊳","\\rhd"),s(u,y,f,"≂","\\eqsim",!0),s(u,p,f,"⋈","\\Join"),s(u,y,f,"≑","\\Doteq",!0),s(u,y,m,"∔","\\dotplus",!0),s(u,y,m,"∖","\\smallsetminus"),s(u,y,m,"⋒","\\Cap",!0),s(u,y,m,"⋓","\\Cup",!0),s(u,y,m,"⩞","\\doublebarwedge",!0),s(u,y,m,"⊟","\\boxminus",!0),s(u,y,m,"⊞","\\boxplus",!0),s(u,y,m,"⋇","\\divideontimes",!0),s(u,y,m,"⋉","\\ltimes",!0),s(u,y,m,"⋊","\\rtimes",!0),s(u,y,m,"⋋","\\leftthreetimes",!0),s(u,y,m,"⋌","\\rightthreetimes",!0),s(u,y,m,"⋏","\\curlywedge",!0),s(u,y,m,"⋎","\\curlyvee",!0),s(u,y,m,"⊝","\\circleddash",!0),s(u,y,m,"⊛","\\circledast",!0),s(u,y,m,"⋅","\\centerdot"),s(u,y,m,"⊺","\\intercal",!0),s(u,y,m,"⋒","\\doublecap"),s(u,y,m,"⋓","\\doublecup"),s(u,y,m,"⊠","\\boxtimes",!0),s(u,y,f,"⇢","\\dashrightarrow",!0),s(u,y,f,"⇠","\\dashleftarrow",!0),s(u,y,f,"⇇","\\leftleftarrows",!0),s(u,y,f,"⇆","\\leftrightarrows",!0),s(u,y,f,"⇚","\\Lleftarrow",!0),s(u,y,f,"↞","\\twoheadleftarrow",!0),s(u,y,f,"↢","\\leftarrowtail",!0),s(u,y,f,"↫","\\looparrowleft",!0),s(u,y,f,"⇋","\\leftrightharpoons",!0),s(u,y,f,"↶","\\curvearrowleft",!0),s(u,y,f,"↺","\\circlearrowleft",!0),s(u,y,f,"↰","\\Lsh",!0),s(u,y,f,"⇈","\\upuparrows",!0),s(u,y,f,"↿","\\upharpoonleft",!0),s(u,y,f,"⇃","\\downharpoonleft",!0),s(u,p,f,"⊶","\\origof",!0),s(u,p,f,"⊷","\\imageof",!0),s(u,y,f,"⊸","\\multimap",!0),s(u,y,f,"↭","\\leftrightsquigarrow",!0),s(u,y,f,"⇉","\\rightrightarrows",!0),s(u,y,f,"⇄","\\rightleftarrows",!0),s(u,y,f,"↠","\\twoheadrightarrow",!0),s(u,y,f,"↣","\\rightarrowtail",!0),s(u,y,f,"↬","\\looparrowright",!0),s(u,y,f,"↷","\\curvearrowright",!0),s(u,y,f,"↻","\\circlearrowright",!0),s(u,y,f,"↱","\\Rsh",!0),s(u,y,f,"⇊","\\downdownarrows",!0),s(u,y,f,"↾","\\upharpoonright",!0),s(u,y,f,"⇂","\\downharpoonright",!0),s(u,y,f,"⇝","\\rightsquigarrow",!0),s(u,y,f,"⇝","\\leadsto"),s(u,y,f,"⇛","\\Rrightarrow",!0),s(u,y,f,"↾","\\restriction"),s(u,p,g,"‘","`"),s(u,p,g,"$","\\$"),s(d,p,g,"$","\\$"),s(d,p,g,"$","\\textdollar"),s(u,p,g,"%","\\%"),s(d,p,g,"%","\\%"),s(u,p,g,"_","\\_"),s(d,p,g,"_","\\_"),s(d,p,g,"_","\\textunderscore"),s(u,p,g,"∠","\\angle",!0),s(u,p,g,"∞","\\infty",!0),s(u,p,g,"′","\\prime"),s(u,p,g,"△","\\triangle"),s(u,p,g,"Γ","\\Gamma",!0),s(u,p,g,"Δ","\\Delta",!0),s(u,p,g,"Θ","\\Theta",!0),s(u,p,g,"Λ","\\Lambda",!0),s(u,p,g,"Ξ","\\Xi",!0),s(u,p,g,"Π","\\Pi",!0),s(u,p,g,"Σ","\\Sigma",!0),s(u,p,g,"Υ","\\Upsilon",!0),s(u,p,g,"Φ","\\Phi",!0),s(u,p,g,"Ψ","\\Psi",!0),s(u,p,g,"Ω","\\Omega",!0),s(u,p,g,"A","Α"),s(u,p,g,"B","Β"),s(u,p,g,"E","Ε"),s(u,p,g,"Z","Ζ"),s(u,p,g,"H","Η"),s(u,p,g,"I","Ι"),s(u,p,g,"K","Κ"),s(u,p,g,"M","Μ"),s(u,p,g,"N","Ν"),s(u,p,g,"O","Ο"),s(u,p,g,"P","Ρ"),s(u,p,g,"T","Τ"),s(u,p,g,"X","Χ"),s(u,p,g,"¬","\\neg",!0),s(u,p,g,"¬","\\lnot"),s(u,p,g,"⊤","\\top"),s(u,p,g,"⊥","\\bot"),s(u,p,g,"∅","\\emptyset"),s(u,y,g,"∅","\\varnothing"),s(u,p,fa,"α","\\alpha",!0),s(u,p,fa,"β","\\beta",!0),s(u,p,fa,"γ","\\gamma",!0),s(u,p,fa,"δ","\\delta",!0),s(u,p,fa,"ϵ","\\epsilon",!0),s(u,p,fa,"ζ","\\zeta",!0),s(u,p,fa,"η","\\eta",!0),s(u,p,fa,"θ","\\theta",!0),s(u,p,fa,"ι","\\iota",!0),s(u,p,fa,"κ","\\kappa",!0),s(u,p,fa,"λ","\\lambda",!0),s(u,p,fa,"μ","\\mu",!0),s(u,p,fa,"ν","\\nu",!0),s(u,p,fa,"ξ","\\xi",!0),s(u,p,fa,"ο","\\omicron",!0),s(u,p,fa,"π","\\pi",!0),s(u,p,fa,"ρ","\\rho",!0),s(u,p,fa,"σ","\\sigma",!0),s(u,p,fa,"τ","\\tau",!0),s(u,p,fa,"υ","\\upsilon",!0),s(u,p,fa,"ϕ","\\phi",!0),s(u,p,fa,"χ","\\chi",!0),s(u,p,fa,"ψ","\\psi",!0),s(u,p,fa,"ω","\\omega",!0),s(u,p,fa,"ε","\\varepsilon",!0),s(u,p,fa,"ϑ","\\vartheta",!0),s(u,p,fa,"ϖ","\\varpi",!0),s(u,p,fa,"ϱ","\\varrho",!0),s(u,p,fa,"ς","\\varsigma",!0),s(u,p,fa,"φ","\\varphi",!0),s(u,p,m,"∗","*",!0),s(u,p,m,"+","+"),s(u,p,m,"−","-",!0),s(u,p,m,"⋅","\\cdot",!0),s(u,p,m,"∘","\\circ",!0),s(u,p,m,"÷","\\div",!0),s(u,p,m,"±","\\pm",!0),s(u,p,m,"×","\\times",!0),s(u,p,m,"∩","\\cap",!0),s(u,p,m,"∪","\\cup",!0),s(u,p,m,"∖","\\setminus",!0),s(u,p,m,"∧","\\land"),s(u,p,m,"∨","\\lor"),s(u,p,m,"∧","\\wedge",!0),s(u,p,m,"∨","\\vee",!0),s(u,p,g,"√","\\surd"),s(u,p,fl,"⟨","\\langle",!0),s(u,p,fl,"∣","\\lvert"),s(u,p,fl,"∥","\\lVert"),s(u,p,Is,"?","?"),s(u,p,Is,"!","!"),s(u,p,Is,"⟩","\\rangle",!0),s(u,p,Is,"∣","\\rvert"),s(u,p,Is,"∥","\\rVert"),s(u,p,f,"=","="),s(u,p,f,":",":"),s(u,p,f,"≈","\\approx",!0),s(u,p,f,"≅","\\cong",!0),s(u,p,f,"≥","\\ge"),s(u,p,f,"≥","\\geq",!0),s(u,p,f,"←","\\gets"),s(u,p,f,">","\\gt",!0),s(u,p,f,"∈","\\in",!0),s(u,p,f,"","\\@not"),s(u,p,f,"⊂","\\subset",!0),s(u,p,f,"⊃","\\supset",!0),s(u,p,f,"⊆","\\subseteq",!0),s(u,p,f,"⊇","\\supseteq",!0),s(u,y,f,"⊈","\\nsubseteq",!0),s(u,y,f,"⊉","\\nsupseteq",!0),s(u,p,f,"⊨","\\models"),s(u,p,f,"←","\\leftarrow",!0),s(u,p,f,"≤","\\le"),s(u,p,f,"≤","\\leq",!0),s(u,p,f,"<","\\lt",!0),s(u,p,f,"→","\\rightarrow",!0),s(u,p,f,"→","\\to"),s(u,y,f,"≱","\\ngeq",!0),s(u,y,f,"≰","\\nleq",!0),s(u,p,gl," ","\\ "),s(u,p,gl," ","\\space"),s(u,p,gl," ","\\nobreakspace"),s(d,p,gl," ","\\ "),s(d,p,gl," "," "),s(d,p,gl," ","\\space"),s(d,p,gl," ","\\nobreakspace"),s(u,p,gl,null,"\\nobreak"),s(u,p,gl,null,"\\allowbreak"),s(u,p,Os,",",","),s(u,p,Os,";",";"),s(u,y,m,"⊼","\\barwedge",!0),s(u,y,m,"⊻","\\veebar",!0),s(u,p,m,"⊙","\\odot",!0),s(u,p,m,"⊕","\\oplus",!0),s(u,p,m,"⊗","\\otimes",!0),s(u,p,g,"∂","\\partial",!0),s(u,p,m,"⊘","\\oslash",!0),s(u,y,m,"⊚","\\circledcirc",!0),s(u,y,m,"⊡","\\boxdot",!0),s(u,p,m,"△","\\bigtriangleup"),s(u,p,m,"▽","\\bigtriangledown"),s(u,p,m,"†","\\dagger"),s(u,p,m,"⋄","\\diamond"),s(u,p,m,"⋆","\\star"),s(u,p,m,"◃","\\triangleleft"),s(u,p,m,"▹","\\triangleright"),s(u,p,fl,"{","\\{"),s(d,p,g,"{","\\{"),s(d,p,g,"{","\\textbraceleft"),s(u,p,Is,"}","\\}"),s(d,p,g,"}","\\}"),s(d,p,g,"}","\\textbraceright"),s(u,p,fl,"{","\\lbrace"),s(u,p,Is,"}","\\rbrace"),s(u,p,fl,"[","\\lbrack",!0),s(d,p,g,"[","\\lbrack",!0),s(u,p,Is,"]","\\rbrack",!0),s(d,p,g,"]","\\rbrack",!0),s(u,p,fl,"(","\\lparen",!0),s(u,p,Is,")","\\rparen",!0),s(d,p,g,"<","\\textless",!0),s(d,p,g,">","\\textgreater",!0),s(u,p,fl,"⌊","\\lfloor",!0),s(u,p,Is,"⌋","\\rfloor",!0),s(u,p,fl,"⌈","\\lceil",!0),s(u,p,Is,"⌉","\\rceil",!0),s(u,p,g,"\\","\\backslash"),s(u,p,g,"∣","|"),s(u,p,g,"∣","\\vert"),s(d,p,g,"|","\\textbar",!0),s(u,p,g,"∥","\\|"),s(u,p,g,"∥","\\Vert"),s(d,p,g,"∥","\\textbardbl"),s(d,p,g,"~","\\textasciitilde"),s(d,p,g,"\\","\\textbackslash"),s(d,p,g,"^","\\textasciicircum"),s(u,p,f,"↑","\\uparrow",!0),s(u,p,f,"⇑","\\Uparrow",!0),s(u,p,f,"↓","\\downarrow",!0),s(u,p,f,"⇓","\\Downarrow",!0),s(u,p,f,"↕","\\updownarrow",!0),s(u,p,f,"⇕","\\Updownarrow",!0),s(u,p,il,"∐","\\coprod"),s(u,p,il,"⋁","\\bigvee"),s(u,p,il,"⋀","\\bigwedge"),s(u,p,il,"⨄","\\biguplus"),s(u,p,il,"⋂","\\bigcap"),s(u,p,il,"⋃","\\bigcup"),s(u,p,il,"∫","\\int"),s(u,p,il,"∫","\\intop"),s(u,p,il,"∬","\\iint"),s(u,p,il,"∭","\\iiint"),s(u,p,il,"∏","\\prod"),s(u,p,il,"∑","\\sum"),s(u,p,il,"⨂","\\bigotimes"),s(u,p,il,"⨁","\\bigoplus"),s(u,p,il,"⨀","\\bigodot"),s(u,p,il,"∮","\\oint"),s(u,p,il,"∯","\\oiint"),s(u,p,il,"∰","\\oiiint"),s(u,p,il,"⨆","\\bigsqcup"),s(u,p,il,"∫","\\smallint"),s(d,p,Bs,"…","\\textellipsis"),s(u,p,Bs,"…","\\mathellipsis"),s(d,p,Bs,"…","\\ldots",!0),s(u,p,Bs,"…","\\ldots",!0),s(u,p,Bs,"⋯","\\@cdots",!0),s(u,p,Bs,"⋱","\\ddots",!0),s(u,p,g,"⋮","\\varvdots"),s(u,p,al,"ˊ","\\acute"),s(u,p,al,"ˋ","\\grave"),s(u,p,al,"¨","\\ddot"),s(u,p,al,"~","\\tilde"),s(u,p,al,"ˉ","\\bar"),s(u,p,al,"˘","\\breve"),s(u,p,al,"ˇ","\\check"),s(u,p,al,"^","\\hat"),s(u,p,al,"⃗","\\vec"),s(u,p,al,"˙","\\dot"),s(u,p,al,"˚","\\mathring"),s(u,p,fa,"","\\@imath"),s(u,p,fa,"","\\@jmath"),s(u,p,g,"ı","ı"),s(u,p,g,"ȷ","ȷ"),s(d,p,g,"ı","\\i",!0),s(d,p,g,"ȷ","\\j",!0),s(d,p,g,"ß","\\ss",!0),s(d,p,g,"æ","\\ae",!0),s(d,p,g,"œ","\\oe",!0),s(d,p,g,"ø","\\o",!0),s(d,p,g,"Æ","\\AE",!0),s(d,p,g,"Œ","\\OE",!0),s(d,p,g,"Ø","\\O",!0),s(d,p,al,"ˊ","\\'"),s(d,p,al,"ˋ","\\`"),s(d,p,al,"ˆ","\\^"),s(d,p,al,"˜","\\~"),s(d,p,al,"ˉ","\\="),s(d,p,al,"˘","\\u"),s(d,p,al,"˙","\\."),s(d,p,al,"¸","\\c"),s(d,p,al,"˚","\\r"),s(d,p,al,"ˇ","\\v"),s(d,p,al,"¨",'\\"'),s(d,p,al,"˝","\\H"),s(d,p,al,"◯","\\textcircled"),ma={"--":!0,"---":!0,"``":!0,"''":!0},s(d,p,g,"–","--",!0),s(d,p,g,"–","\\textendash"),s(d,p,g,"—","---",!0),s(d,p,g,"—","\\textemdash"),s(d,p,g,"‘","`",!0),s(d,p,g,"‘","\\textquoteleft"),s(d,p,g,"’","'",!0),s(d,p,g,"’","\\textquoteright"),s(d,p,g,"“","``",!0),s(d,p,g,"“","\\textquotedblleft"),s(d,p,g,"”","''",!0),s(d,p,g,"”","\\textquotedblright"),s(u,p,g,"°","\\degree",!0),s(d,p,g,"°","\\degree"),s(d,p,g,"°","\\textdegree",!0),s(u,p,g,"£","\\pounds"),s(u,p,g,"£","\\mathsterling",!0),s(d,p,g,"£","\\pounds"),s(d,p,g,"£","\\textsterling",!0),s(u,y,g,"✠","\\maltese"),s(d,y,g,"✠","\\maltese"),ya='0123456789/@."',xa=0;xa<ya.length;xa++)va=ya.charAt(xa),s(u,p,g,va,va);for(ba='0123456789!@*()-=+";:?/.,',ka=0;ka<ba.length;ka++)wa=ba.charAt(ka),s(d,p,g,wa,wa);for(Ta="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_a=0;_a<Ta.length;_a++)Ea=Ta.charAt(_a),s(u,p,fa,Ea,Ea),s(d,p,g,Ea,Ea);for(s(u,y,g,"C","ℂ"),s(d,y,g,"C","ℂ"),s(u,y,g,"H","ℍ"),s(d,y,g,"H","ℍ"),s(u,y,g,"N","ℕ"),s(d,y,g,"N","ℕ"),s(u,y,g,"P","ℙ"),s(d,y,g,"P","ℙ"),s(u,y,g,"Q","ℚ"),s(d,y,g,"Q","ℚ"),s(u,y,g,"R","ℝ"),s(d,y,g,"R","ℝ"),s(u,y,g,"Z","ℤ"),s(d,y,g,"Z","ℤ"),s(u,p,fa,"h","ℎ"),s(d,p,fa,"h","ℎ"),Ca="",Aa=0;Aa<Ta.length;Aa++)Sa=Ta.charAt(Aa),Ca=String.fromCharCode(55349,56320+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56372+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56424+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56580+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56684+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56736+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56788+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56840+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56944+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Aa<26&&(Ca=String.fromCharCode(55349,56632+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca),Ca=String.fromCharCode(55349,56476+Aa),s(u,p,fa,Sa,Ca),s(d,p,g,Sa,Ca));for(s(u,p,fa,"k",Ca="𝕜"),s(d,p,g,"k",Ca),Na=0;Na<10;Na++)La=Na.toString(),Ca=String.fromCharCode(55349,57294+Na),s(u,p,fa,La,Ca),s(d,p,g,La,Ca),Ca=String.fromCharCode(55349,57314+Na),s(u,p,fa,La,Ca),s(d,p,g,La,Ca),Ca=String.fromCharCode(55349,57324+Na),s(u,p,fa,La,Ca),s(d,p,g,La,Ca),Ca=String.fromCharCode(55349,57334+Na),s(u,p,fa,La,Ca),s(d,p,g,La,Ca);for(Ia="ÐÞþ",Ra=0;Ra<Ia.length;Ra++)Ma=Ia.charAt(Ra),s(u,p,fa,Ma,Ma),s(d,p,g,Ma,Ma);Da=[["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"]],Oa=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Pa=Ae(function(t,e){var r,n=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536,e="math"===e?0:1;if(119808<=n&&n<120484)return r=Math.floor((n-119808)/26),[Da[r][2],Da[r][e]];if(120782<=n&&n<=120831)return r=Math.floor((n-120782)/10),[Oa[r][2],Oa[r][e]];if(120485==n||120486==n)return[Da[0][2],Da[0][e]];if(120486<n&&n<120782)return["",""];throw new X("Unsupported character: "+t)},"wideCharacterFont"),Ba=Ae(function(t,e,r){return{value:t=ga[r][t]&&ga[r][t].replace?ga[r][t].replace:t,metrics:zn(t,e,r)}},"lookupSymbol"),Fa=Ae(function(t,e,r,n,i){var a=Ba(t,e,r),o=a.metrics;return t=a.value,a=o?(a=o.italic,("text"===r||n&&"mathit"===n.font)&&(a=0),new la(t,o.height,o.depth,a,o.skew,o.width,i)):(typeof console<"u"&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),new la(t,0,0,0,0,0,i)),n&&(a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight"),o=n.getColor())&&(a.style.color=o),a},"makeSymbol"),gl=Ae(function(t,e,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ba(t,"Main-Bold",e).metrics?Fa(t,"Main-Bold",e,r,n.concat(["mathbf"])):"\\"===t||"main"===ga[e][t].font?Fa(t,"Main-Regular",e,r,n):Fa(t,"AMS-Regular",e,r,n.concat(["amsrm"]))},"mathsym"),$a=Ae(function(t,e,r,n,i){return"textord"!==i&&Ba(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),Os=Ae(function(t,e,r){var n,i,a=t.mode,o=t.text,s=["mord"],l=(t="math"===a||"text"===a&&e.font)?e.font:e.fontFamily,c="",h="";if(55349===o.charCodeAt(0)&&([c,h]=Pa(o,a)),0<c.length)return Fa(o,c,a,e,s.concat(h));if(l){if(i="boldsymbol"===l?(n=(c=$a(o,a,e,s,r)).fontName,[c.fontClass]):t?(n=Wa[l].fontName,[l]):(n=Ha(l,e.fontWeight,e.fontShape),[l,e.fontWeight,e.fontShape]),Ba(o,n,a).metrics)return Fa(o,n,a,e,s.concat(i));if(ma.hasOwnProperty(o)&&"Typewriter"===n.slice(0,10)){for(var u=[],d=0;d<o.length;d++)u.push(Fa(o[d],n,a,e,s.concat(i)));return Ya(u)}}if("mathord"===r)return Fa(o,"Math-Italic",a,e,s.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=ga[a][o]&&ga[a][o].font)?(c=Ha("amsrm",e.fontWeight,e.fontShape),Fa(o,c,a,e,s.concat("amsrm",e.fontWeight,e.fontShape))):"main"!==h&&h?(t=Ha(h,e.fontWeight,e.fontShape),Fa(o,t,a,e,s.concat(t,e.fontWeight,e.fontShape))):(l=Ha("textrm",e.fontWeight,e.fontShape),Fa(o,l,a,e,s.concat(e.fontWeight,e.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),za=Ae((t,e)=>{if(ta(t.classes)!==ta(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 n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},"canCombine"),m=Ae(t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof la&&n instanceof la&&za(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},"tryCombineChars"),Ga=Ae(function(t){for(var e=0,r=0,n=0,i=0;i<t.children.length;i++){var a=t.children[i];a.height>e&&(e=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>n&&(n=a.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},"sizeElementFromChildren"),Ua=Ae(function(t,e,r,n){return t=new ia(t,e,r,n),Ga(t),t},"makeSpan"),qa=Ae((t,e,r,n)=>new ia(t,e,r,n),"makeSvgSpan"),fl=Ae(function(t,e,r){return(t=Ua([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Is=Ae(function(t,e,r,n){return t=new aa(t,e,r,n),Ga(t),t},"makeAnchor"),Ya=Ae(function(t){return t=new Gi(t),Ga(t),t},"makeFragment"),f=Ae(function(t,e){return t instanceof Gi?Ua([],[t],e):t},"wrapFragment"),ja=Ae(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a<e.length;a++){var o=-e[a].shift-i-e[a].elem.depth,s=o-(e[a-1].elem.height+e[a-1].elem.depth);i+=o,r.push({type:"kern",size:s}),r.push(e[a])}return{children:r,depth:n}}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"!==(n=t.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===t.positionType)l=-n.elem.depth-t.positionData;else{if("firstBaseline"!==t.positionType)throw new Error("Invalid positionType "+t.positionType+".");l=-n.elem.depth}}return{children:t.children,depth:l}},"getVListChildrenAndDepth"),il=Ae(function(t,e){for(var{children:r,depth:t}=ja(t),n=0,i=0;i<r.length;i++){var a=r[i];"elem"===a.type&&(a=a.elem,n=Math.max(n,a.maxFontSize,a.height))}n+=2;var o=Ua(["pstrut"],[]);o.style.height=K(n);for(var s=[],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=Ua(g,[o,d],void 0,p)).style.top=K(-n-h-d.depth),f.marginLeft&&(g.style.marginLeft=f.marginLeft),f.marginRight&&(g.style.marginRight=f.marginRight),s.push(g),h+=d.height+d.depth),l=Math.min(l,h),c=Math.max(c,h)}(t=Ua(["vlist"],s)).style.height=K(c);var m=l<0?(y=Ua([],[]),(y=Ua(["vlist"],[y])).style.height=K(-l),m=Ua(["vlist-s"],[new la("")]),[Ua(["vlist-r"],[t,m]),Ua(["vlist-r"],[y])]):[Ua(["vlist-r"],[t])],y=Ua(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),Bs=Ae((t,e)=>{var r=Ua(["mspace"],[],e),t=Ji(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Ha=Ae(function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Wa={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"}},Va={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},al=Ae(function(t,e){var[t,r,n]=Va[t],t=new ha(t),t=new ca([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=qa(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Wa,makeSymbol:Fa,mathsym:gl,makeSpan:Ua,makeSvgSpan:qa,makeLineSpan:fl,makeAnchor:Is,makeFragment:Ya,wrapFragment:f,makeVList:il,makeOrd:Os,makeGlue:Bs,staticSvg:al,svgData:Va,tryCombineChars:m},Xa={mord:{mop:y={number:3,unit:"mu"},mbin:gl={number:4,unit:"mu"},mrel:fl={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:fl,minner:y},mbin:{mord:gl,mop:gl,mopen:gl,minner:gl},mrel:{mord:fl,mop:fl,mopen:fl,minner:fl},mopen:{},mclose:{mop:y,mbin:gl,mrel:fl,minner:y},mpunct:{mord:y,mop:y,mrel:fl,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:gl,mrel:fl,mopen:y,mpunct:y,minner:y}},Ka={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Za={},Qa={},Ja={},Ae(l,"defineFunction"),Ae(Yn,"defineFunctionBuilders"),to=Ae(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),eo=Ae(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),ro=Z.makeSpan,no=["leftmost","mbin","mopen","mrel","mop","mpunct"],io=["rightmost","mrel","mclose","mpunct"],ao={display:Si.DISPLAY,text:Si.TEXT,script:Si.SCRIPT,scriptscript:Si.SCRIPTSCRIPT},oo={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},so=Ae(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,o=[],s=0;s<t.length;s++){var l,c=go(t[s],e);c instanceof Gi?(l=c.children,o.push(...l)):o.push(c)}return Z.tryCombineChars(o),r&&(i=e,1===t.length&&("sizing"===(a=t[0]).type?i=e.havingSize(a.size):"styling"===a.type&&(i=e.havingStyle(ao[a.style]))),a=ro([n[0]||"leftmost"],[],e),n=ro([n[1]||"rightmost"],[],e),lo(o,(t,e)=>{var r=e.classes[0],n=t.classes[0];"mbin"===r&&yi.contains(io,n)?e.classes[0]="mord":"mbin"===n&&yi.contains(no,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),lo(o,(t,e)=>{var e=uo(e),r=uo(t);if(t=e&&r?(t.hasClass("mtight")?Ka:Xa)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),o},"buildExpression"),lo=Ae(function t(r,e,n,i,a){i&&r.push(i);for(var o=0;o<r.length;o++){var s,l=r[o],c=co(l);c?t(c.children,e,n,null,a):((c=!l.hasClass("mspace"))&&(s=e(l,n.node))&&(n.insertAfter?n.insertAfter(s):(r.unshift(s),o++)),c?n.node=l:a&&l.hasClass("newline")&&(n.node=ro(["leftmost"])),n.insertAfter=(e=>t=>{r.splice(e+1,0,t),o++})(o))}i&&r.pop()},"traverseNonSpaceNodes"),co=Ae(function(t){return t instanceof Gi||t instanceof aa||t instanceof ia&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),ho=Ae(function t(e,r){var n=co(e);if(n&&(n=n.children).length){if("right"===r)return t(n[n.length-1],"right");if("left"===r)return t(n[0],"left")}return e},"getOutermostNode"),uo=Ae(function(t,e){return t&&(e&&(t=ho(t,e)),oo[t.classes[0]])||null},"getTypeOfDomTree"),po=Ae(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),ro(e.concat(t))},"makeNullDelimiter"),go=Ae(function(t,e,r){if(!t)return ro();var n;if(Qa[t.type])return n=Qa[t.type](t,e),r&&e.size!==r.size&&(n=ro(e.sizingClasses(r),[n],e),e=e.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e),n;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),Ae(jn,"buildHTMLUnbreakable"),Ae(Hn,"buildHTML"),Ae(Wn,"newDocumentFragment"),fo=class{static{Ae(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=ta(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+=yi.escape(this.attributes[t]),e+='"');0<this.classes.length&&(e+=' class ="'+yi.escape(ta(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{Ae(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return yi.escape(this.toText())}toText(){return this.text}},Is=class{static{Ae(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:Is,newDocumentFragment:Wn},yo=Ae(function(t,e,r){return!ga[e][t]||!ga[e][t].replace||55349===t.charCodeAt(0)||ma.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=ga[e][t].replace),new E.TextNode(t)},"makeText"),vo=Ae(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),xo=Ae(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":(t=t.text,!yi.contains(["\\imath","\\jmath"],t)&&zn(t=ga[r][t]&&ga[r][t].replace?ga[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null)):null},"getVariant"),bo=Ae(function(t,e,r){var n;if(1===t.length)return n=ko(t[0],e),r&&n instanceof fo&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],o=0;o<t.length;o++){var s,l=ko(t[o],e);if(l instanceof fo&&i instanceof fo){if("mtext"===l.type&&"mtext"===i.type&&l.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...l.children);continue}if("mn"===l.type&&"mn"===i.type){i.children.push(...l.children);continue}if("mi"===l.type&&1===l.children.length&&"mn"===i.type){var c=l.children[0];if(c instanceof mo&&"."===c.text){i.children.push(...l.children);continue}}else"mi"===i.type&&1===i.children.length&&(c=i.children[0])instanceof mo&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)&&(s=l.children[0])instanceof mo&&0<s.text.length&&(s.text=s.text.slice(0,1)+"̸"+s.text.slice(1),a.pop())}a.push(l),i=l}return a},"buildExpression"),wo=Ae(function(t,e,r){return vo(bo(t,e,r))},"buildExpressionRow"),ko=Ae(function(t,e){if(!t)return new E.MathNode("mrow");if(Ja[t.type])return Ja[t.type](t,e);throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),Ae(Vn,"buildMathML"),To=Ae(function(t){return new Xi({style:t.displayMode?Si.DISPLAY:Si.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},"optionsFromSettings"),Eo=Ae(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"),_o=Ae(function(t,e,r){var n,i=To(r);return"mathml"===r.output?Vn(t,e,i,r.displayMode,!0):(t="html"===r.output?(n=Hn(t,i),Z.makeSpan(["katex"],[n])):(n=Vn(t,e,i,r.displayMode,!1),e=Hn(t,i),Z.makeSpan(["katex"],[n,e])),Eo(t,r))},"buildTree"),Co=Ae(function(t,e,r){return t=Hn(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=Ae(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=Ae(function(t){return"ordgroup"===t.type?t.body.length:1},"groupLength"),il=Ae(function(f,m){function t(){var t,e,r=4e5,n=f.label.slice(1);if(yi.contains(["widehat","widecheck","widetilde","utilde"],n))return e=5<(e=Lo(f.base))?"widehat"===n||"widecheck"===n?(a=420,r=2364,t=.42,n+"4"):(a=312,r=2340,t=.34,"tilde4"):(e=[1,1,2,2,3,3][e],"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][e],a=[0,239,300,360,420][e],t=[0,.24,.3,.3,.36,.42][e],n+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 ha(e),e=new ca([e],{width:"100%",height:K(t),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[e],m),minWidth:0,height:t};var i=[],a=Ao[n],[o,s,l]=a,c=l/1e3,h=o.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 ha(o[p]),g=new ca([g],{width:"400em",height:K(c),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===h)return{span:g,minWidth:s,height:c};g.style.height=K(c),i.push(g)}return{span:Z.makeSpan(["stretchy"],i,m),minWidth:s,height:c}}Ae(t,"buildSvgSpan_");var{span:e,minWidth:r,height:n}=t();return e.height=n,e.style.height=K(n),0<r&&(e.style.minWidth=K(r)),e},"svgSpan"),Os=Ae(function(t,e,r,n,i){var a,t=t.height+t.depth+r+n;return/fbox|color|angl/.test(e)?(a=Z.makeSpan(["stretchy",e],[],i),"fbox"===e&&(r=i.color&&i.getColor())&&(a.style.borderColor=r)):(n=[],/^[bx]cancel$/.test(e)&&n.push(new ua({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&n.push(new ua({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new ca(n,{width:"100%",height:K(t)}),a=Z.makeSvgSpan([],[r],i)),a.height=t,a.style.height=K(t),a},"encloseSpan"),No={encloseSpan:Os,mathMLnode:f,svgSpan:il},Ae(Xn,"assertNodeType"),Ae(Kn,"assertSymbolNodeType"),Ae(Zn,"checkSymbolNodeType"),Io=Ae((t,e)=>{t&&"supsub"===t.type?(s=(r=Xn(t.base,"accent")).base,t.base=s,n=qn(go(t,e)),t.base=r):s=(r=Xn(t,"accent")).base;var r,n,i,a,t=go(s,e.havingCrampedStyle()),o=0,s=(r.isShifty&&yi.isCharacterBox(s)&&(s=yi.getBaseElem(s),o=Un(go(s,e.havingCrampedStyle())).skew),"\\c"===r.label),l=s?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=No.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<o?{width:"calc(100% - "+K(2*o)+")",marginLeft:K(2*o)}:void 0}]},e)):("\\vec"===r.label?(a=Z.staticSvg("vec",e),i=Z.svgData.vec[1]):((a=Un(a=Z.makeOrd({mode:r.mode,text:r.label},e,"textord"))).italic=0,i=a.width,s&&(l+=a.depth)),c=Z.makeSpan(["accent-body"],[a]),(s="\\textcircled"===r.label)&&(c.classes.push("accent-full"),l=t.height),a=o,s||(a-=i/2),c.style.left=K(a),"\\textcircled"===r.label&&(c.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:-l},{type:"elem",elem:c}]},e)),o=Z.makeSpan(["mord","accent"],[c],e);return n?(n.children[0]=o,n.height=Math.max(o.height,n.height),n.classes[0]="mord",n):o},"htmlBuilder$a"),Bs=Ae((t,e)=>{var r=t.isStretchy?No.mathMLnode(t.label):new E.MathNode("mo",[yo(t.label,t.mode)]);return(t=new E.MathNode("mover",[ko(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Mo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|")),l({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:Ae((t,e)=>{var e=to(e[0]),r=!Mo.test(t.funcName),n=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:n,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bs}),l({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:Ae((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bs}),l({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:Ae((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:Ae((t,e)=>{var r=go(t.base,e),n=No.svgSpan(t,e),t="\\utilde"===t.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[n],e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>{var r=No.mathMLnode(t.label);return(t=new E.MathNode("munder",[ko(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Ro=Ae(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:n}=t;return{type:"xArrow",mode:t.mode,label:n,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=Z.wrapFragment(go(t.body,i,e),e),o="\\x"===t.label.slice(0,2)?"x":"cd",n=(a.classes.push(o+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Z.wrapFragment(go(t.below,i,e),e)).classes.push(o+"-arrow-pad")),No.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,o=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25<a.depth||"\\xleftequilibrium"===t.label)&&(o-=a.depth),(r=r?(t=-e.fontMetrics().axisHeight+r.height+.5*n.height+.111,Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:n,shift:i},{type:"elem",elem:r,shift:t}]},e)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:n,shift:i}]},e)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],e)},mathmlBuilder(t,e){var r,n,i=No.mathMLnode(t.label);return i.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body?(r=Ro(ko(t.body,e)),t.below?(n=Ro(ko(t.below,e)),new E.MathNode("munderover",[i,n,r])):new E.MathNode("mover",[i,r])):t.below?(n=Ro(ko(t.below,e)),new E.MathNode("munder",[i,n])):(r=Ro(),new E.MathNode("mover",[i,r]))}}),Do=Z.makeSpan,Ae(Qn,"htmlBuilder$9"),Ae(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:yi.isCharacterBox(e)}},htmlBuilder:Qn,mathmlBuilder:Jn}),Oo=Ae(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:yi.isCharacterBox(e[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,n=e[1],e=e[0],i="\\stackrel"!==r?Oo(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:eo(n)},n={type:"supsub",mode:e.mode,base:n,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:i,body:[n],isCharacterBox:yi.isCharacterBox(n)}},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=so(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=Ae(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Fo=Ae(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),$o=Ae((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),Ae(ti,"cdArrow"),Ae(ei,"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,n="",i=0;i<r.length;i++)n+=Xn(r[i],"textord").text;if(e=parseInt(n),isNaN(e))throw new X("\\@char has non-numeric argument "+n);if(e<0||1114111<=e)throw new X("\\@char with invalid code point "+n);return e=e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),al=Ae((t,e)=>(e=so(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=Ae((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,e=e[1];return{type:"color",mode:t.mode,color:r,body:eo(e)}},htmlBuilder:al,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:al,mathmlBuilder:m}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var n="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,i=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:i,size:n&&Xn(n,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(Ji(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(Ji(t.size,e))),r}}),zo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Go=Ae(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),Uo=Ae(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),qo=Ae((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"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(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,o=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){i=e.gullet.future(),o[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++,o.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");o[a].push(r.text)}var s=e.gullet.consumeArg().tokens;return i&&s.unshift(i),"\\edef"!==t&&"\\xdef"!==t||(s=e.gullet.expandTokens(s)).reverse(),e.gullet.macros.set(n,{tokens:s,numArgs:a,delimiters:o},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()),n=(t.gullet.consumeSpaces(),Uo(t));return qo(t,r,n,"\\\\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()),n=t.gullet.popToken(),i=t.gullet.popToken();return qo(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),Yo=Ae(function(t,e,r){if(r=zn(ga.math[t]&&ga.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),jo=Ae(function(t,e,r,n){return e=r.havingBaseStyle(e),n=Z.makeSpan(n.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t,n.maxFontSize=e.sizeMultiplier,n},"styleWrap"),Ho=Ae(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"),Wo=Ae(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=jo(t,e,n,a),r&&Ho(i,n,e),i},"makeSmallDelim"),Vo=Ae(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Xo=Ae(function(t,e,r,n,i,a){return t=Vo(t,e,i,n),i=jo(Z.makeSpan(["delimsizing","size"+e],[t],n),Si.TEXT,n,a),r&&Ho(i,n,Si.TEXT),i},"makeLargeDelim"),Ko=Ae(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=Ae(function(t,e,r){var n=(Ui["Size4-Regular"][t.charCodeAt(0)]?Ui["Size4-Regular"]:Ui["Size1-Regular"])[t.charCodeAt(0)][4],t=new ha("inner",Fi(t,Math.round(1e3*e))),t=new ca([t],{width:K(n),height:K(e),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(n),{type:"elem",elem:t}},"makeInner"),Qo={type:"kern",size:-.008},Jo=["|","\\lvert","\\rvert","\\vert"],ts=["\\|","\\lVert","\\rVert","\\Vert"],es=Ae(function(t,e,r,n,i,a){var o,s,l,c="",h=0,u=o=s=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?o=s="⏐":"\\Uparrow"===t?o=s="‖":"\\downarrow"===t?u=o="⏐":"\\Downarrow"===t?u=o="‖":"\\updownarrow"===t?(u="\\uparrow",o="⏐",s="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",o="‖",s="\\Downarrow"):yi.contains(Jo,t)?(o="∣",c="vert",h=333):yi.contains(ts,t)?(o="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",o="⎢",s="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",o="⎥",s="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(o=u="⎢",s="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",o=s="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(o=u="⎥",s="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",o=s="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",o="⎜",s="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",o="⎟",s="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",s="⎩",o="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",s="⎭",o="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",s="⎩",o="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",s="⎭",o="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",s="⎭",o="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",s="⎩",o="⎪",p="Size4-Regular"),(t=Yo(u,p,i)).height+t.depth),g=(g=Yo(o,p,i)).height+g.depth,f=(f=Yo(s,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=Yo(d,p,i)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),e/2-v),g=[],v=(0<c.length?(r=e-t-f,v=Math.round(1e3*e),r=zi(c,Math.round(1e3*r)),c=new ha(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new ca([c],{width:r,height:l,viewBox:"0 0 "+h+" "+v}),(h=Z.makeSvgSpan([],[c],n)).height=v/1e3,h.style.width=r,h.style.height=l,g.push({type:"elem",elem:h})):(g.push(Ko(s,p,i)),g.push(Qo),null===d?g.push(Zo(o,e-t-f+.016,n)):(g.push(Zo(o,c=(e-t-f-m)/2+.016,n)),g.push(Qo),g.push(Ko(d,p,i)),g.push(Qo),g.push(Zo(o,c,n))),g.push(Qo),g.push(Ko(u,p,i))),n.havingBaseStyle(Si.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return jo(Z.makeSpan(["delimsizing","mult"],[r],v),Si.TEXT,n,a)},"makeStackedDelim"),rs=Ae(function(t,e,r,n,i){return n=Bi(t,n,r),t=new ha(t,n),n=new ca([t],{width:"400em",height:K(e),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[n],i)},"sqrtSvg"),gl=Ae(function(t,e){var r,n=e.havingBaseSizing(),i=us("\\surd",t*n.sizeMultiplier,cs,n),n=n.sizeMultiplier,a=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),o=0,s=0,l=0,i="small"===i.type?(t<1?n=1:t<1.4&&(n=.7),s=(1+a)/n,(r=rs("sqrtMain",o=(1+a+.08)/n,l=1e3+1e3*a+80,a,e)).style.minWidth="0.853em",.833/n):"large"===i.type?(l=1080*os[i.size],s=(os[i.size]+a)/n,o=(os[i.size]+a+.08)/n,(r=rs("sqrtSize"+i.size,o,l,a,e)).style.minWidth="1.02em",1/n):(o=t+a+.08,s=t+a,l=Math.floor(1e3*t+a)+80,(r=rs("sqrtTall",o,l,a,e)).style.minWidth="0.742em",1.056);return r.height=s,r.style.height=K(o),{span:r,advanceWidth:i,ruleWidth:(e.fontMetrics().sqrtRuleThickness+a)*n}},"makeSqrtImage"),ns=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],is=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],as=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],os=[0,1.2,1.8,2.4,3],fl=Ae(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),yi.contains(ns,t)||yi.contains(as,t))return Xo(t,e,!1,r,n,i);if(yi.contains(is,t))return es(t,os[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ss=[{type:"small",style:Si.SCRIPTSCRIPT},{type:"small",style:Si.SCRIPT},{type:"small",style:Si.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ls=[{type:"small",style:Si.SCRIPTSCRIPT},{type:"small",style:Si.SCRIPT},{type:"small",style:Si.TEXT},{type:"stack"}],cs=[{type:"small",style:Si.SCRIPTSCRIPT},{type:"small",style:Si.SCRIPT},{type:"small",style:Si.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],hs=Ae(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"),us=Ae(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i<r.length&&"stack"!==r[i].type;i++){var a=(a=Yo(t,hs(r[i]),"math")).height+a.depth;if("small"===r[i].type&&(a*=n.havingBaseStyle(r[i].style).sizeMultiplier),e<a)return r[i]}return r[r.length-1]},"traverseSequence"),ds=Ae(function(t,e,r,n,i,a){"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var o=yi.contains(as,t)?ss:yi.contains(ns,t)?cs:ls;return"small"===(o=us(t,e,o,n)).type?Wo(t,o.style,r,n,i,a):"large"===o.type?Xo(t,o.size,r,n,i,a):es(t,e,r,n,i,a)},"makeCustomSizedDelim"),y=Ae(function(t,e,r,n,i,a){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,e=Math.max(e-o,r+o),r=Math.max(e/500*901,2*e-s);return ds(t,r,!0,n,i,a)},"makeLeftRightDelim"),ps={sqrtImage:gl,sizedDelim:fl,sizeToMaxHeight:os,customSizedDelim:ds,leftRightDelim:y},gs={"\\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}},fs=["(","\\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","."],Ae(ri,"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:Ae((t,e)=>(e=ri(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:gs[t.funcName].size,mclass:gs[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:Ae((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):ps.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:Ae(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(ps.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),Ae(ni,"assertParsed"),l({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:Ae((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:ri(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{var e=ri(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Xn(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:Ae((t,e)=>{ni(t);for(var r,n=so(t.body,e,!0,["mopen","mclose"]),i=0,a=0,o=!1,s=0;s<n.length;s++)n[s].isMiddle?o=!0:(i=Math.max(n[s].height,i),a=Math.max(n[s].depth,a));if(i*=e.sizeMultiplier,a*=e.sizeMultiplier,r="."===t.left?po(e,["mopen"]):ps.leftRightDelim(t.left,i,a,e,t.mode,["mopen"]),n.unshift(r),o)for(var l=1;l<n.length;l++){var c=n[l].isMiddle;c&&(n[l]=ps.leftRightDelim(c.delim,i,a,c.options,t.mode,[]))}return r="."===t.right?po(e,["mclose"]):(r=t.rightColor?e.withColor(t.rightColor):e,ps.leftRightDelim(t.right,i,a,r,t.mode,["mclose"])),n.push(r),Z.makeSpan(["minner"],n,e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>{ni(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:Ae((t,e)=>{if(e=ri(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:Ae((t,e)=>{var r;return"."===t.delim?r=po(e,[]):(r=ps.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:Ae((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")}),Is=Ae((t,e)=>{var r,n,i,a,o,s=Z.wrapFragment(go(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=yi.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=Ji({number:.6,unit:"pt"},e),o=Ji({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,n=s.height+s.depth+a+o,s.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=Oi(c),i=new ca([new ha("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],e)).style.height=K(n),h=s.depth+a+o):(/cancel/.test(l)?u||s.classes.push("cancel-pad"):"angl"===l?s.classes.push("anglpad"):s.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-s.depth)):c=u?.2:0,r=No.encloseSpan(s,l,c,i,e),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=s.depth+i,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),o=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:s,shift:0}]},e):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},e)),/cancel/.test(l)&&(o.height=s.height,o.depth=s.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[o],e):Z.makeSpan(["mord"],[o],e)},"htmlBuilder$7"),Os=Ae((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 n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===t.label&&(n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),r.setAttribute("style","border: "+n+"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:n}=t,i=Xn(e[0],"color-token").color,e=e[1];return{type:"enclose",mode:t.mode,label:n,backgroundColor:i,body:e}},htmlBuilder:Is,mathmlBuilder:Os}),l({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:t,funcName:n}=t,i=Xn(e[0],"color-token").color,a=Xn(e[1],"color-token").color,e=e[2];return{type:"enclose",mode:t.mode,label:n,backgroundColor:a,borderColor:i,body:e}},htmlBuilder:Is,mathmlBuilder:Os}),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:Is,mathmlBuilder:Os}),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]}}}),ms={},Ae(ii,"defineEnvironment"),ys={},Ae(h,"defineMacro"),Ae(ai,"getHLines"),vs=Ae(t=>{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),Ae(oi,"getAutoTag"),Ae(si,"parseArray"),Ae(li,"dCellStyle"),f=Ae(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,n=0,i=new Array(r),a=[],o=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),s=1/e.fontMetrics().ptPerEm,l=5*s,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Si.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?Ji({number:3,unit:"ex"},e):12*s),B=3*s,F=.7*(s=t.arraystretch*c),$=.3*s,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(Ae(u,"setHLinePos"),u(P[0]),R=0;R<t.body.length;++R){for(var d=t.body[R],p=F,g=$,f=(n<d.length&&(n=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[R],v=0;z&&0<(v=Ji(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,i[R]=f,u(P[R+1])}var x,b,w=h/2+e.fontMetrics().axisHeight,k=t.cols||[],T=[],E=[];if(t.tags&&t.tags.some(t=>t))for(R=0;R<r;++R){var _=i[R],G=_.pos-w,C=t.tags[R],S=void 0;(S=!0===C?Z.makeSpan(["eqn-num"],[],e):!1===C?Z.makeSpan([],[],e):Z.makeSpan([],so(C,e,!0),e)).depth=_.depth,S.height=_.height,E.push({type:"elem",elem:S,shift:G})}for(b=m=0;m<n||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(o),N.style.borderRightStyle=L,N.style.margin="0 "+K(-o/2),(L=h-w)&&(N.style.verticalAlign=K(-L)),T.push(N),A=k[++b]||{},U=!1}if(!(n<=m)){for(var I=void 0,M=((0<m||t.hskipBeforeAndAfter)&&0!==(I=yi.deflt(A.pregap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x)),[]),R=0;R<r;++R){var q,D=i[R],O=D[m];O&&(q=D.pos-w,O.depth=D.depth,O.height=D.height,M.push({type:"elem",elem:O,shift:q}))}M=Z.makeVList({positionType:"individualShift",children:M},e),M=Z.makeSpan(["col-align-"+(A.align||"c")],[M]),T.push(M),(m<n-1||t.hskipBeforeAndAfter)&&0!==(I=yi.deflt(A.postgap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x))}}if(i=Z.makeSpan(["mtable"],T),0<a.length){for(var Y=Z.makeLineSpan("hline",e,o),j=Z.makeLineSpan("hdashline",e,o),H=[{type:"elem",elem:i,shift:0}];0<a.length;){var W=a.pop(),V=W.pos-w;W.isDashed?H.push({type:"elem",elem:j,shift:V}):H.push({type:"elem",elem:Y,shift:V})}i=Z.makeVList({positionType:"individualShift",children:H},e)}return 0===E.length?Z.makeSpan(["mord"],[i],e):(c=Z.makeVList({positionType:"individualShift",children:E},e),c=Z.makeSpan(["tag"],[c],e),Z.makeFragment([i,c]))},"htmlBuilder"),xs={c:"center ",l:"left ",r:"right "},il=Ae(function(t,e){for(var r=[],n=new E.MathNode("mtd",[],["mtr-glue"]),i=new E.MathNode("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var o=t.body[a],s=[],l=0;l<o.length;l++)s.push(new E.MathNode("mtd",[ko(o[l],e)]));t.tags&&t.tags[a]&&(s.unshift(n),s.push(n),t.leqno?s.unshift(i):s.push(i)),r.push(new E.MathNode("mtr",s))}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+=xs[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"),Bs=Ae(function(t,e){-1===t.envName.indexOf("ed")&&vs(t);var i,r=[],n=-1<t.envName.indexOf("at")?"alignat":"align",a="split"===t.envName,n=si(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:oi(t.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,s={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;i=Number(l),o=2*i}var h=!o;n.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(s)}if(h)o<t.length&&(o=t.length);else{var n=t.length/2;if(i<n)throw new X("Too many math in a row: expected "+i+", but got "+n,t[0])}});for(var u=0;u<o;++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 n.colSeparationType=h?"align":"alignat",n},"alignedHandler"),ii({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},si(t.parser,e,li(t.envName))},htmlBuilder:f,mathmlBuilder:il}),ii({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",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===t.envName.charAt(t.envName.length-1)){var i=t.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new X("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}return i=si(t.parser,n,li(t.envName)),n=Math.max(0,...i.body.map(t=>t.length)),i.cols=new Array(n).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:f,mathmlBuilder:il}),ii({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=si(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:il}),ii({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=si(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:il}),ii({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=si(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},li(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:il}),ii({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Bs,htmlBuilder:f,mathmlBuilder:il}),ii({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){yi.contains(["gather","gather*"],t.envName)&&vs(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:oi(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return si(t.parser,e,"display")},htmlBuilder:f,mathmlBuilder:il}),ii({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Bs,htmlBuilder:f,mathmlBuilder:il}),ii({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){vs(t);var e={autoTag:oi(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return si(t.parser,e,"display")},htmlBuilder:f,mathmlBuilder:il}),ii({type:"array",names:["CD"],props:{numArgs:0},handler(t){return vs(t),ei(t.parser)},htmlBuilder:f,mathmlBuilder:il}),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")}}),bs=ms,l({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:t,funcName:r}=t,n=e[0];if("ordgroup"!==n.type)throw new X("Invalid environment name",n);for(var i="",a=0;a<n.body.length;++a)i+=Xn(n.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:t.mode,name:i,nameGroup:n};if(!bs.hasOwnProperty(i))throw new X("No such environment: "+i,n);var e=bs[i],{args:r,optArgs:o}=t.parseArguments("\\begin{"+i+"}",e),s={mode:t.mode,envName:i,parser:t},e=e.handler(s,r,o),s=(t.expect("\\end",!1),t.nextToken);if((r=Xn(t.parseFunction(),"environment")).name!==i)throw new X("Mismatch: \\begin{"+i+"} matched by \\end{"+r.name+"}",s);return e}}),al=Ae((t,e)=>{var r=t.font,e=e.withFont(r);return go(t.body,e)},"htmlBuilder$5"),m=Ae((t,e)=>{var r=t.font,e=e.withFont(r);return ko(t.body,e)},"mathmlBuilder$4"),ws={"\\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:Ae((t,e)=>{var{parser:t,funcName:r}=t,e=to(e[0]);return{type:"font",mode:t.mode,font:(r=r in ws?ws[r]:r).slice(1),body:e}},"handler"),htmlBuilder:al,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:Ae((t,e)=>{var t=t.parser,e=e[0],r=yi.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:Ae((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=t,i=t.mode,n=t.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:n}}},"handler"),htmlBuilder:al,mathmlBuilder:m}),ks=Ae((t,e)=>("display"===t?e=e.id>=Si.SCRIPT.id?e.text():Si.DISPLAY:"text"===t&&e.size===Si.DISPLAY.size?e=Si.TEXT:"script"===t?e=Si.SCRIPT:"scriptscript"===t&&(e=Si.SCRIPTSCRIPT),e),"adjustStyle"),gl=Ae((t,e)=>{var r,n,i,a,o=ks(t.size,e.style),s=o.fracNum(),l=o.fracDen(),s=e.havingStyle(s),c=go(t.numer,s,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),s=e.havingStyle(l),go(t.denom,s,e)),u=t.hasBarLine?(n=(a=t.barSize?(n=Ji(t.barSize,e),Z.makeLineSpan("frac-line",e,n)):Z.makeLineSpan("frac-line",e)).height,a.height):(a=null,n=0,e.fontMetrics().defaultRuleThickness),l=o.size===Si.DISPLAY.size||"display"===t.size?(r=e.fontMetrics().num1,i=0<n?3*u:7*u,e.fontMetrics().denom1):(i=0<n?(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*n)<i&&(r+=i-(r-c.depth-(u+.5*n))),u-.5*n-(h.height-l)<i&&(l+=i-(u-.5*n-(h.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:a,shift:-(u-.5*n)},{type:"elem",elem:c,shift:-r}]},e)):((a=r-c.depth-(h.height-l))<i&&(r+=.5*(i-a),l+=.5*(i-a)),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:c,shift:-r}]},e));return s=e.havingStyle(o),u.height*=s.sizeMultiplier/e.sizeMultiplier,u.depth*=s.sizeMultiplier/e.sizeMultiplier,n=o.size===Si.DISPLAY.size?e.fontMetrics().delim1:(o.size===Si.SCRIPTSCRIPT.size?e.havingStyle(Si.SCRIPT):e).fontMetrics().delim2,i=null==t.leftDelim?po(e,["mopen"]):ps.customSizedDelim(t.leftDelim,n,!0,e.havingStyle(o),t.mode,["mopen"]),a=t.continued?Z.makeSpan([]):null==t.rightDelim?po(e,["mclose"]):ps.customSizedDelim(t.rightDelim,n,!0,e.havingStyle(o),t.mode,["mclose"]),Z.makeSpan(["mord"].concat(s.sizingClasses(e)),[i,Z.makeSpan(["mfrac"],[u]),a],e)},"htmlBuilder$4"),fl=Ae((t,e)=>{var r=new E.MathNode("mfrac",[ko(t.numer,e),ko(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=Ji(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),ks(t.size,e.style));return n.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=n.size===Si.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(n=[],null!=t.leftDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),n.push(r),null!=t.rightDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),vo(n)):r},"mathmlBuilder$3"),l({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:Ae((t,e)=>{var r,{parser:t,funcName:n}=t,i=e[0],e=e[1],a=null,o=null,s="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",o=")";break;case"\\\\bracefrac":r=!1,a="\\{",o="\\}";break;case"\\\\brackfrac":r=!1,a="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":s="display";break;case"\\tfrac":case"\\tbinom":s="text"}return{type:"genfrac",mode:t.mode,continued:!1,numer:i,denom:e,hasBarLine:r,leftDelim:a,rightDelim:o,size:s,barSize:null}},"handler"),htmlBuilder:gl,mathmlBuilder:fl}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:Ae((t,e)=>{var t=t.parser,r=e[0],e=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e,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:n}=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:n}}}),Ts=["display","text","script","scriptscript"],Es=Ae(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,n=e[4],i=e[5],a="atom"===(a=to(e[0])).type&&"open"===a.family?Es(a.text):null,o="atom"===(o=to(e[1])).type&&"close"===o.family?Es(o.text):null,s=null,l=!!(l=Xn(e[2],"size")).isBlank||0<(s=l.value).number,c="auto";return"ordgroup"===(e=e[3]).type?0<e.body.length&&(r=Xn(e.body[0],"textord"),c=Ts[Number(r.text)]):(e=Xn(e,"textord"),c=Ts[Number(e.text)]),{type:"genfrac",mode:t.mode,numer:n,denom:i,continued:!1,hasBarLine:l,barSize:s,leftDelim:a,rightDelim:o,size:c}},htmlBuilder:gl,mathmlBuilder:fl}),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:Ae((t,e)=>{var t=t.parser,r=e[0],n=mi(Xn(e[1],"infix").size),e=e[2],i=0<n.number;return{type:"genfrac",mode:t.mode,numer:r,denom:e,continued:!1,hasBarLine:i,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:gl,mathmlBuilder:fl}),_s=Ae((t,e)=>{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?go(t.sup,e.havingStyle(i.sup()),e):go(t.sub,e.havingStyle(i.sub()),e),Xn(t.base,"horizBrace")):Xn(t,"horizBrace"),t=go(i.base,e.havingBaseStyle(Si.DISPLAY)),a=No.svgSpan(i,e);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(n=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",i.isOver?"mover":"munder"],[n],e),n=i.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",i.isOver?"mover":"munder"],[n],e)},"htmlBuilder$3"),y=Ae((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:_s,mathmlBuilder:y}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:Ae((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:Ae((t,e)=>{var r=so(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:Ae((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:Ae((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 n=[],i=0;i<r.length;i++){var a=r[i];n.push({type:"textord",mode:"text",text:"~"===a?"\\textasciitilde":a})}return e={type:"text",mode:t.mode,font:"\\texttt",body:n},{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=so(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:Ae((t,e)=>{var{parser:t,funcName:r}=t,n=Xn(e[0],"raw").string,e=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var o=n.split(","),s=0;s<o.length;s++){var l=o[s].split("=");if(2!==l.length)throw new X("Error parsing key-value for \\htmlData");a["data-"+l[0].trim()]=l[1].trim()}i={command:"\\htmlData",attributes:a};break;default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(i)?{type:"html",mode:t.mode,attributes:a,body:eo(e)}:t.formatUnsupportedCmd(r)},"handler"),htmlBuilder:Ae((t,e)=>{var r,n=so(t.body,e,!1),i=["enclosing"],a=(t.attributes.class&&i.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>wo(t.body,e),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:Ae((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:eo(e[0]),mathml:eo(e[1])}),"handler"),htmlBuilder:Ae((t,e)=>(t=so(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>wo(t.mathml,e),"mathmlBuilder")}),Cs=Ae(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]},Qi(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:Ae((t,e,r)=>{var t=t.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(r[0])for(var s=Xn(r[0],"raw").string.split(","),l=0;l<s.length;l++){var c=s[l].split("=");if(2===c.length){var h=c[1].trim();switch(c[0].trim()){case"alt":o=h;break;case"width":n=Cs(h);break;case"height":i=Cs(h);break;case"totalheight":a=Cs(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Xn(e[0],"url").url,""===o&&(o=(o=(o=r).replace(/^.*[\\/]/,"")).substring(0,o.lastIndexOf("."))),t.settings.isTrusted({command:"\\includegraphics",url:r})?{type:"includegraphics",mode:t.mode,alt:o,width:n,height:i,totalheight:a,src:r}:t.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:Ae((t,e)=>{var r=Ji(t.height,e),n=0,i=(0<t.totalheight.number&&(n=Ji(t.totalheight,e)-r),0),e=(0<t.width.number&&(i=Ji(t.width,e)),{height:K(r+n)});return 0<i&&(e.width=K(i)),0<n&&(e.verticalAlign=K(-n)),(i=new oa(t.src,t.alt,e)).height=r,i.depth=n,i},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),Ji(t.height,e)),i=0;return 0<t.totalheight.number&&(i=Ji(t.totalheight,e)-n,r.setAttribute("valign",K(-i))),r.setAttribute("height",K(n+i)),0<t.width.number&&(n=Ji(t.width,e),r.setAttribute("width",K(n))),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,n,{parser:t,funcName:i}=t,e=Xn(e[0],"size");return t.settings.strict&&(r="m"===i[1],n="mu"===e.value.unit,r?(n||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, not "+e.value.unit+" units"),"math"!==t.mode&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):n&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" 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=Ji(t.dimension,e),new E.SpaceNode(t)}}),l({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:Ae((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:Ae((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)]),n=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,n],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:Ae((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,n=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),i=r.parseExpression(!1,t);return r.expect(t),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),Ss=Ae((t,e)=>{switch(e.style.size){case Si.DISPLAY.size:return t.display;case Si.TEXT.size:return t.text;case Si.SCRIPT.size:return t.script;case Si.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:Ae((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:Ae((t,e)=>(t=Ss(t,e),t=so(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=Ss(t,e),wo(t,e)),"mathmlBuilder")}),As=Ae((t,e,r,n,i,a,o)=>{t=Z.makeSpan([],[t]);var s,l,c=r&&yi.isCharacterBox(r);if(e&&(s={elem:e=go(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=go(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}),s&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+o,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=t.height-o,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n);else{if(!s)return t;e=t.depth+o,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),Ls=["\\smallint"],Ns=Ae((t,e)=>{var r,n,i,a=!1,o=("supsub"===t.type?(r=t.sup,n=t.sub,i=Xn(t.base,"op"),a=!0):i=Xn(t,"op"),!1);if((t=e.style).size===Si.DISPLAY.size&&i.symbol&&!yi.contains(Ls,i.name)&&(o=!0),i.symbol){var s,l=o?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.name,l,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),0<c.length&&(s=l.italic,h=Z.staticSvg(c+"Size"+(o?"2":"1"),e),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:o?.08:0}]},e),i.name="\\"+c,l.classes.unshift("mop"),l.italic=s)}else if(i.body){var h=so(i.body,e,!0);1===h.length&&h[0]instanceof la?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,e)}else{for(var u=[],d=1;d<i.name.length;d++)u.push(Z.mathsym(i.name[d],i.mode,e));l=Z.makeSpan(["mop"],u,e)}return c=o=0,(l instanceof la||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(o=(l.height-l.depth)/2-e.fontMetrics().axisHeight,c=l.italic),a?As(l,r,n,e,t,c,o):(o&&(l.style.position="relative",l.style.top=K(o)),l)},"htmlBuilder$2"),Is=Ae((t,e)=>{var r;return t.symbol?(r=new fo("mo",[yo(t.name,t.mode)]),yi.contains(Ls,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]):Wn([r,e])),r},"mathmlBuilder$1"),Ms={"∏":"\\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:Ae((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=Ms[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Ns,mathmlBuilder:Is}),l({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:eo(e)}),"handler"),htmlBuilder:Ns,mathmlBuilder:Is}),Rs={"∫":"\\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:Ns,mathmlBuilder:Is}),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:Ns,mathmlBuilder:Is}),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=Rs[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Ns,mathmlBuilder:Is}),Ds=Ae((t,e)=>{var r,n,i,a,o=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Xn(t.base,"operatorname"),o=!0):i=Xn(t,"operatorname"),0<i.body.length){for(var t=i.body.map(t=>{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),s=so(t,e.withFont("mathrm"),!0),l=0;l<s.length;l++){var c=s[l];c instanceof la&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],s,e)}else a=Z.makeSpan(["mop"],[],e);return o?As(a,r,n,e,e.style,0,0):a},"htmlBuilder$1"),Os=Ae((t,e)=>{for(var r=bo(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];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 o=a.children[0];1===a.children.length&&o instanceof E.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}n&&(e=r.map(t=>t.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var s=new E.MathNode("mo",[yo("","text")]);return t.parentIsSupSub?new E.MathNode("mrow",[e,s]):E.newDocumentFragment([e,s])},"mathmlBuilder"),l({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:Ae((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:Ds,mathmlBuilder:Os}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Yn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(so(t.body,e,!1)):Z.makeSpan(["mord"],so(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),n=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},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:Ae((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:eo(e)}),"handler"),htmlBuilder:Ae((t,e)=>(t=so(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=bo(t.body,e),new E.MathNode("mphantom",t)),"mathmlBuilder")}),l({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:Ae((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:Ae((t,e)=>{var r=Z.makeSpan([],[go(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Z.makeSpan(["mord"],[r],e)},"htmlBuilder"),mathmlBuilder:Ae((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:Ae((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:Ae((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:Ae((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,e=e[1];return{type:"raisebox",mode:t.mode,dy:r,body:e}},htmlBuilder(t,e){var r=go(t.body,e),t=Ji(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],n=Xn(e[0],"size"),e=Xn(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Xn(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=Ji(t.width,e),i=Ji(t.height,e),t=t.shift?Ji(t.shift,e):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(t),r.width=n,r.height=i+t,r.depth=-t,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Ji(t.width,e),n=Ji(t.height,e),t=t.shift?Ji(t.shift,e):0,e=e.color&&e.getColor()||"black",i=new E.MathNode("mspace"),e=(i.setAttribute("mathbackground",e),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),Ae(ci,"sizingGroup"),Ps=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Bs=Ae((t,e)=>{var r=e.havingSize(t.size);return ci(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Ps,props:{numArgs:0,allowedInText:!0},handler:Ae((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:Ps.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Bs,mathmlBuilder:Ae((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:Ae((t,e,r)=>{var t=t.parser,n=!1,i=!1,a=r[0]&&Xn(r[0],"ordgroup");if(a)for(var o,s=0;s<a.body.length;++s)if("t"===(o=a.body[s].text))n=!0;else{if("b"!==o){i=n=!1;break}i=!0}else i=n=!0;return r=e[0],{type:"smash",mode:t.mode,body:r,smashHeight:n,smashDepth:i}},"handler"),htmlBuilder:Ae((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 n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;return t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Z.makeSpan(["mord"],[t],e)},"htmlBuilder"),mathmlBuilder:Ae((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),n=i=e.fontMetrics().defaultRuleThickness,n=i+(e.style.id<Si.TEXT.id?e.fontMetrics().xHeight:n)/4,i=r.height+r.depth+n+i,{span:i,ruleWidth:a,advanceWidth:o}=ps.sqrtImage(i,e),s=((s=i.height-a)>r.height+r.depth+n&&(n=(n+s-r.height-r.depth)/2),i.height-r.height-n-a),n=(r.style.paddingLeft=K(o),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+s)},{type:"elem",elem:i},{type:"kern",size:a}]},e));return t.index?(o=e.havingStyle(Si.SCRIPTSCRIPT),r=go(t.index,o,e),s=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-s,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],e)):Z.makeSpan(["mord","sqrt"],[n],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)])}}),Fs={display:Si.DISPLAY,text:Si.TEXT,script:Si.SCRIPT,scriptscript:Si.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:n}=t,t=n.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:t}},htmlBuilder(t,e){var r=Fs[t.style],r=e.havingStyle(r).withFont("");return ci(t.body,r,e)},mathmlBuilder(t,e){var r=Fs[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}}),$s=Ae(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Si.DISPLAY.size||r.alwaysHandleSupSub)?Ns:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Si.DISPLAY.size||r.limits)?Ds:null:"accent"===r.type?yi.isCharacterBox(r.base)?Io:null:"horizBrace"===r.type&&!t.sub===r.isOver?_s:null:null},"htmlBuilderDelegate"),Yn({type:"supsub",htmlBuilder(t,e){if(a=$s(t,e))return a(t,e);var r,n,i,{base:a,sup:o,sub:s}=t,l=go(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&yi.isCharacterBox(a),s=(o&&(i=e.havingStyle(e.style.sup()),r=go(o,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),s&&(o=e.havingStyle(e.style.sub()),n=go(s,o,e),a||(u=l.depth+o.fontMetrics().subDrop*o.sizeMultiplier/e.sizeMultiplier)),i=e.style===Si.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/s),o=null;if(n&&(s=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof la||s)&&(o=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(n.height-u)<t&&(u=t-(h-r.depth)+n.height,0<(s=.8*c.xHeight-(h-r.depth)))&&(h+=s,u-=s);var d=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u,marginRight:a,marginLeft:o},{type:"elem",elem:r,shift:-h,marginRight:a}]},e)}else if(n)u=Math.max(u,c.sub1,n.height-.8*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:n,marginLeft:o,marginRight:a}]},e);else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,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,n=!1,i=(t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(n=!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&&i.push(ko(t.sub,e)),t.sup&&i.push(ko(t.sup,e)),r=n?r?"mover":"munder":t.sub?t.sup?(n=t.base)&&"op"===n.type&&n.limits&&e.style===Si.DISPLAY||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(e.style===Si.DISPLAY||n.limits)?"munderover":"msubsup":(r=t.base)&&"op"===r.type&&r.limits&&(e.style===Si.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||e.style===Si.DISPLAY)?"munder":"msub":(n=t.base)&&"op"===n.type&&n.limits&&(e.style===Si.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||e.style===Si.DISPLAY)?"mover":"msup",new E.MathNode(r,i)}}),Yn({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}}),zs={mi:"italic",mn:"normal",mtext:"normal"},Yn({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")!==zs[r.type]&&r.setAttribute("mathvariant",t),r}}),Yn({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!==zs[t.type]&&t.setAttribute("mathvariant",e),t}}),Gs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Us={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Yn({type:"spacing",htmlBuilder(t,e){var r,n;if(Us.hasOwnProperty(t.text))return r=Us[t.text].className||"","text"===t.mode?((n=Z.makeOrd(t,e,"textord")).classes.push(r),n):Z.makeSpan(["mspace",r],[Z.mathsym(t.text,t.mode,e)],e);if(Gs.hasOwnProperty(t.text))return Z.makeSpan(["mspace",Gs[t.text]],[],e);throw new X('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(Us.hasOwnProperty(t.text))return new E.MathNode("mtext",[new E.TextNode(" ")]);if(Gs.hasOwnProperty(t.text))return new E.MathNode("mspace");throw new X('Unknown type of space "'+t.text+'"')}}),qs=Ae(()=>{var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),Yn({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[qs(),new E.MathNode("mtd",[wo(t.body,e)]),qs(),new E.MathNode("mtd",[wo(t.tag,e)])])])).setAttribute("width","100%"),t}}),Ys={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},js={"\\textbf":"textbf","\\textmd":"textmd"},Hs={"\\textit":"textit","\\textup":"textup"},Ws=Ae((t,e)=>(t=t.font)?Ys[t]?e.withTextFontFamily(Ys[t]):js[t]?e.withTextFontWeight(js[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Hs[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=Ws(t,e),t=so(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Ws(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),n=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{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=Vs(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var o=r[a];"~"===o&&(o="\\textasciitilde"),n.push(Z.makeSymbol(o,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Z.tryCombineChars(n),i)},mathmlBuilder(t,e){return t=new E.TextNode(Vs(t)),(t=new E.MathNode("mtext",[t])).setAttribute("mathvariant","monospace"),t}}),Vs=Ae(t=>t.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Xs=Za,Ks=new RegExp("[̀-ͯ]+$"),Zs=class{static{Ae(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 ui("EOF",new hi(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new ui(t[e],new hi(this,e,e+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-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 ui(n,new hi(this,e,this.tokenRegex.lastIndex))}},Qs=class{static{Ae(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return(this.current.hasOwnProperty(t)?this.current:this.builtins)[t]}set(t,e,r){if(r=void 0!==r&&r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(t)&&(r[t]=this.current[t]);null==e?delete this.current[t]:this.current[t]=e}},Js=ys,h("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),h("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),h("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),h("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),h("\\@ifnextchar",function(t){var e=t.consumeArgs(3),t=(t.consumeSpaces(),t.future());return 1===e[0].length&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),h("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),h("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}),tl={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},h("\\char",function(t){var e,r,n=t.popToken(),i="";if("'"===n.text)e=8,n=t.popToken();else if('"'===n.text)e=16,n=t.popToken();else if("`"===n.text)if("\\"===(n=t.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new X("\\char` missing argument");i=n.text.charCodeAt(0)}else e=10;if(e){if(null==(i=tl[n.text])||e<=i)throw new X("Invalid base-"+e+" digit "+n.text);for(;null!=(r=tl[t.future().text])&&r<e;)i=i*e+r,t.popToken()}return"\\@char{"+i+"}"}),el=Ae((t,e,r)=>{var n=t.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new X("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");if(e=0,1===(n=t.consumeArg().tokens).length&&"["===n[0].text){for(var o="",s=t.expandNextToken();"]"!==s.text&&"EOF"!==s.text;)o+=s.text,s=t.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);e=parseInt(o),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>el(t,!1,!0)),h("\\renewcommand",t=>el(t,!0,!1)),h("\\providecommand",t=>el(t,!0,!0)),h("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),h("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),h("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Xs[r],ga.math[r],ga.text[r]),""}),h("\\bgroup","{"),h("\\egroup","}"),h("~","\\nobreakspace"),h("\\lq","`"),h("\\rq","'"),h("\\aa","\\r a"),h("\\AA","\\r A"),h("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),h("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),h("\\textregistered","\\html@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\\;"),rl={",":"\\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 rl?e=rl[t]:("\\not"===t.slice(0,4)||t in ga.math&&yi.contains(["bin","rel"],ga.math[t].group))&&(e="\\dotsb"),e}),nl={")":!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 nl?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in nl&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in nl?"\\@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{"+(il=K(Ui["Main-Regular"][84][1]-.7*Ui["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+il+"}{\\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",(al=Ae(l=>t=>{var e=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|"),s=(t.macros.beginGroup(),Ae(r=>t=>{l&&(t.macros.set("|",a),i.length)&&t.macros.set("\\|",o);var e=r;return!r&&i.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?i:n,numArgs:0}},"midMacro")),s=(t.macros.set("|",s(!1)),i.length&&t.macros.set("\\|",s(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...s,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),h("\\bra@set",al(!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}"),ol={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},sl=class{static{Ae(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 Qs(Js,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Zs(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,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new ui("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0<t.length,i=(n||this.consumeSpaces(),this.future()),a=0,o=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&&n?t[o]:"}")+"'",e);if(t&&n)if((0===a||1===a&&"{"===t[o])&&e.text===t[o]){if(++o===t.length){r.splice(-o,o);break}}else o=0}while(0!==a||n);return"{"===i.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,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],n=0;n<r.length;n++){var i=this.popToken();if(r[n]!==i.text)throw new X("Use of the macro doesn't match its definition",i)}}for(var a=[],o=0;o<t;o++)a.push(this.consumeArg(e&&e[o+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,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var o=(i=i.slice()).length-1;0<=o;--o){var s=i[o];if("#"===s.text){if(0===o)throw new X("Incomplete placeholder at end of macro body",s);if("#"===(s=i[--o]).text)i.splice(o+1,1);else{if(!/^[1-9]$/.test(s.text))throw new X("Not a valid argument number",s);i.splice(o,2,...a[+s.text-1])}}}return this.pushTokens(i),i.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 ui(t)]):void 0}expandTokens(t){var e,r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)!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 n=t.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new Zs(t,this.settings),a=[],o=i.lex();"EOF"!==o.text;)a.push(o),o=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Xs.hasOwnProperty(t)||ga.math.hasOwnProperty(t)||ga.text.hasOwnProperty(t)||ol.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Xs.hasOwnProperty(t)&&!Xs[t].primitive}},ll=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,cl=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),hl={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ul={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(dl=class a{static{Ae(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 sl(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 ui("}")),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 n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||e&&n.text===e||t&&Xs[n.text]&&Xs[n.text].infix)break;if(!(n=this.parseAtom(e)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,n,i=-1,a=0;a<t.length;a++)if("infix"===t[a].type){if(-1!==i)throw new X("only one infix operator per group",t[a].token);e=t[i=a].replaceWith}return-1!==i&&e?(r=t.slice(0,i),n=t.slice(i+1),r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},n=1===n.length&&"ordgroup"===n[0].type?n[0]:{type:"ordgroup",mode:this.mode,body:n},["\\\\abovefrac"===e?this.callFunction(e,[r,t[i],n],[]):this.callFunction(e,[r,n],[])]):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 n={type:"text",mode:this.mode,body:e};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(t){var e,r,n=this.parseGroup("atom",t);if("text"===this.mode)return n;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(n&&"op"===n.type){var a="\\limits"===i.text;n.limits=a,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new X("Limit controls must follow a math operator",i);n.alwaysHandleSupSub&&(n.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(e)throw new X("Double superscript",i);e=this.handleSupSubscript("superscript")}else if("_"===i.text){if(r)throw new X("Double subscript",i);r=this.handleSupSubscript("subscript")}else if("'"===i.text){if(e)throw new X("Double superscript",i);var o={type:"textord",mode:this.mode,text:"\\prime"},s=[o];for(this.consume();"'"===this.fetch().text;)s.push(o),this.consume();"^"===this.fetch().text&&s.push(this.handleSupSubscript("superscript")),e={type:"ordgroup",mode:this.mode,body:s}}else{if(!cl[i.text])break;var l=ll.test(i.text),c=[];for(c.push(new ui(cl[i.text])),this.consume();;){var h=this.fetch().text;if(!cl[h]||ll.test(h)!==l)break;c.unshift(new ui(cl[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:n,sup:e,sub:r}:n}parseFunction(t,e){var r=this.fetch(),n=r.text;if(!(i=Xs[n]))return null;if(this.consume(),e&&"atom"!==e&&!i.allowedInArgument)throw new X("Got function '"+n+"' with no arguments"+(e?" as "+e:""),r);if("text"===this.mode&&!i.allowedInText)throw new X("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new X("Can't use function '"+n+"' in math mode",r);var{args:e,optArgs:i}=this.parseArguments(n,i);return this.callFunction(n,e,i,r,t)}callFunction(t,e,r,n,i){var a=Xs[t];if(a&&a.handler)return a.handler({funcName:t,parser:this,token:n,breakOnTokenText:i},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 n=[],i=[],a=0;a<r;a++){var o=e.argTypes&&e.argTypes[a],s=a<e.numOptionalArgs,o=((e.primitive&&null==o||"sqrt"===e.type&&1===a&&null==i[0])&&(o="primitive"),this.parseGroupOfType("argument to '"+t+"'",o,s));if(s)i.push(o);else{if(null==o)throw new X("Null argument, please report this as a bug");n.push(o)}}return{args:n,optArgs:i}}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 n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":return null!=(n=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new X("A primitive argument cannot be optional");if(null==(n=this.parseGroup(t)))throw new X("Expected group as "+t,this.fetch());return n;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,n="";"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),e.text=n,e}parseRegexGroup(t,e){for(var r,n=this.fetch(),i=n,a="";"EOF"!==(r=this.fetch()).text&&t.test(a+r.text);)a+=(i=r).text,this.consume();if(""===a)throw new X("Invalid "+e+": '"+n.text+"'",n);return n.range(i,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]},Qi(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,n;return null==(t=this.gullet.scanArgument(t))?null:(r=this.mode,e&&this.switchMode(e),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),t={type:"ordgroup",mode:this.mode,loc:t.loc,body:n},e&&this.switchMode(r),t)}parseGroup(t,e){var r=this.fetch(),n=r.text;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup",a=(this.gullet.beginGroup(),this.parseExpression(!1,i)),o=this.fetch();this.expect(i),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:hi.range(r,o),body:a,semisimple:"\\begingroup"===n||void 0}}else if(null==(i=this.parseFunction(e,t)||this.parseSymbol())&&"\\"===n[0]&&!ol.hasOwnProperty(n)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+n,r);i=this.formatUnsupportedCmd(n),this.consume()}return i}formLigatures(t){for(var e=t.length-1,r=0;r<e;++r){var n=t[r],i=n.text;"-"===i&&"-"===t[r+1].text&&(r+1<e&&"-"===t[r+2].text?(t.splice(r,3,{type:"textord",mode:"text",loc:hi.range(n,t[r+2]),text:"---"}),e-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:hi.range(n,t[r+1]),text:"--"}),--e)),"'"!==i&&"`"!==i||t[r+1].text!==i||(t.splice(r,2,{type:"textord",mode:"text",loc:hi.range(n,t[r+1]),text:i+i}),--e)}}parseSymbol(){var t=this.fetch(),e=t.text;if(/^\\verb[^a-zA-Z]/.test(e)){if(this.consume(),(n=(i="*"===(n=e.slice(5)).charAt(0))?n.slice(1):n).length<2||n.charAt(0)!==n.slice(-1))throw new X(`\\verb assertion failed --
|
|
|
please report what input caused this bug`);return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}ul.hasOwnProperty(e[0])&&!ga[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=ul[e[0]]+e.slice(1));var r=Ks.exec(e);if(r&&("i"===(e=e.substring(0,r.index))?e="ı":"j"===e&&(e="ȷ")),ga[this.mode][e]){this.settings.strict&&"math"===this.mode&&0<=Ia.indexOf(e)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var n=ga[this.mode][e].group,i=hi.range(t),a=da.hasOwnProperty(n)?{type:"atom",mode:this.mode,family:n,loc:i,text:e}:{type:n,mode:this.mode,loc:i,text:e}}else{if(!(128<=e.charCodeAt(0)))return null;this.settings.strict&&(Fn(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:hi.range(t),text:e}}if(this.consume(),r)for(var o=0;o<r[0].length;o++){var s=r[0][o];if(!hl[s])throw new X("Unknown accent ' "+s+"'",t);var l=hl[s][this.mode]||hl[s].text;if(!l)throw new X("Accent "+s+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:hi.range(t),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],pl=Ae(function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(t=new dl(t,e)).gullet.macros.current["\\df@tag"];var r=t.parse();if(delete t.gullet.macros.current["\\current@color"],delete t.gullet.macros.current["\\color"],t.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:t.subparse([new ui("\\df@tag")])}]}return r},"parseTree"),m=Ae(function(t,e,r){e.textContent="",t=yl(t,r).toNode(),e.appendChild(t)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),m=Ae(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),gl=Ae(function(t,e){return yl(t,e).toMarkup()},"renderToString"),fl=Ae(function(t,e){return e=new xi(e),pl(t,e)},"generateParseTree"),ml=Ae(function(t,e,r){if(!r.throwOnError&&t instanceof X)return(e=Z.makeSpan(["katex-error"],[new la(e)])).setAttribute("title",t.toString()),e.setAttribute("style","color:"+r.errorColor),e;throw t},"renderError"),yl=Ae(function(t,e){e=new xi(e);try{var r=pl(t,e);return _o(r,t,e)}catch(r){return ml(r,t,e)}},"renderToDomTree"),y=Ae(function(t,e){e=new xi(e);try{var r=pl(t,e);return Co(r,t,e)}catch(r){return ml(r,t,e)}},"renderToHTMLTree"),vl={version:"0.16.11",render:m,renderToString:gl,ParseError:X,SETTINGS_SCHEMA:vi,__parse:fl,__renderToDomTree:yl,__renderToHTMLTree:y,__setFontMetrics:$n,__defineSymbol:s,__defineFunction:l,__defineMacro:h,__domTree:{Span:ia,Anchor:aa,SymbolNode:la,SvgNode:ca,PathNode:ha,LineNode:ua}}});function bl(){let e="data-temp-href-target";wl.default.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),wl.default.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var wl,kl,Tl,El,_l,Cl,Sl,Al,Ll,Nl,Il,Ml,Rl,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,Yl,jl,L,Hl,Wl,Vl,Xl,Kl,Zl,Ql,Jl,tc=t(()=>{wl=rt(Rn(),1),kl=/<br\s*\/?>/gi,Tl=Ae(t=>t?Ml(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),El=(()=>{let t=!1;return()=>{t||(bl(),t=!0)}})(),Ae(bl,"setupDompurifyHooks"),_l=Ae(t=>(El(),wl.default.sanitize(t)),"removeScript"),Cl=Ae((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=_l(t):"loose"!==e&&(t=(t=(t=Ml(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=Il(t))),t),"sanitizeMore"),Sl=Ae((t,e)=>t&&(e.dompurifyConfig?wl.default.sanitize(Cl(t,e),e.dompurifyConfig):wl.default.sanitize(Cl(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Al=Ae((t,e)=>"string"==typeof t?Sl(t,e):t.flat().map(t=>Sl(t,e)),"sanitizeTextOrArray"),Ll=Ae(t=>kl.test(t),"hasBreaks"),Nl=Ae(t=>t.split(kl),"splitBreaks"),Il=Ae(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ml=Ae(t=>t.replace(kl,"#br#"),"breakToPlaceholder"),Rl=Ae(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"),Dl=Ae(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Ol=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Pl=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Bl=Ae(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;e<i.length;e++){let t=i[e];","===t&&0<e&&e+1<i.length&&(r=i[e-1],n=i[e+1],$l(r,n))&&(t=r+","+n,e++,a.pop()),a.push(zl(t))}return a.join("")},"parseGenericTypes"),Fl=Ae((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),$l=Ae((t,e)=>(t=Fl(t,"~"),e=Fl(e,"~"),1===t&&1===e),"shouldCombineSets"),zl=Ae(t=>{let e=Fl(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Gl=Ae(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ul=/\$\$(.*)\$\$/g,ql=Ae(t=>0<(t.match(Ul)?.length??0),"hasKatex"),Yl=Ae(async(t,e)=>(t=await jl(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"),jl=Ae(async(t,e)=>{if(!ql(t))return t;if(!(Gl()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ul,"MathML is unsupported in this environment.");let r=(await Promise.resolve().then(()=>(xl(),Dn))).default,n=e.forceLegacyMathML||!Gl()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(kl).map(t=>ql(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Ul,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),L={getRows:Tl,sanitizeText:Sl,sanitizeTextOrArray:Al,hasBreaks:Ll,splitBreaks:Nl,lineBreakRegex:kl,removeScript:_l,getUrl:Rl,evaluate:Dl,getMax:Ol,getMin:Pl}}),ec=t(()=>{e(),Hl=Ae(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Wl=Ae(function(t,e,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Vl=Ae(function(t,e,r,n){e=Wl(e,r,n),Hl(t,e)},"configureSvgSize"),Xl=Ae(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,o=i.height,o=(R.info(`SVG bounds: ${a}x`+o,i),R.info("Graph bounds: 0x0",t),R.info(`Calculated bounds: ${t=a+2*r}x`+(a=o+2*r)),Vl(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",o)},"setupGraphViewbox")}),rc=t(()=>{e(),Kl={},Zl=Ae((t,e,r)=>{let n="";return t in Kl&&Kl[t]?n=Kl[t](r):R.warn("No theme found for "+t),` & {
|
|
|
font-family: ${r.fontFamily};
|
|
|
font-size: ${r.fontSize};
|
|
|
fill: ${r.textColor}
|
|
|
}
|
|
|
|
|
|
/* Classes common for multiple diagrams */
|
|
|
|
|
|
& .error-icon {
|
|
|
fill: ${r.errorBkgColor};
|
|
|
}
|
|
|
& .error-text {
|
|
|
fill: ${r.errorTextColor};
|
|
|
stroke: ${r.errorTextColor};
|
|
|
}
|
|
|
|
|
|
& .edge-thickness-normal {
|
|
|
stroke-width: 1px;
|
|
|
}
|
|
|
& .edge-thickness-thick {
|
|
|
stroke-width: 3.5px
|
|
|
}
|
|
|
& .edge-pattern-solid {
|
|
|
stroke-dasharray: 0;
|
|
|
}
|
|
|
& .edge-thickness-invisible {
|
|
|
stroke-width: 0;
|
|
|
fill: none;
|
|
|
}
|
|
|
& .edge-pattern-dashed{
|
|
|
stroke-dasharray: 3;
|
|
|
}
|
|
|
.edge-pattern-dotted {
|
|
|
stroke-dasharray: 2;
|
|
|
}
|
|
|
|
|
|
& .marker {
|
|
|
fill: ${r.lineColor};
|
|
|
stroke: ${r.lineColor};
|
|
|
}
|
|
|
& .marker.cross {
|
|
|
stroke: ${r.lineColor};
|
|
|
}
|
|
|
|
|
|
& svg {
|
|
|
font-family: ${r.fontFamily};
|
|
|
font-size: ${r.fontSize};
|
|
|
}
|
|
|
& p {
|
|
|
margin: 0
|
|
|
}
|
|
|
|
|
|
${n}
|
|
|
|
|
|
${e}
|
|
|
`},"getStyles"),Ql=Ae((t,e)=>{void 0!==e&&(Kl[t]=e)},"addStylesForDiagram"),Jl=Zl}),nc={};J(nc,{clear:()=>lc,getAccDescription:()=>dc,getAccTitle:()=>hc,getDiagramTitle:()=>gc,setAccDescription:()=>uc,setAccTitle:()=>cc,setDiagramTitle:()=>pc});var ic,ac,oc,sc,lc,cc,hc,uc,dc,pc,gc,fc,mc,D,yc,vc,xc,bc,wc,kc,Tc,Ec,_c,Cc,Sc,Ac,Lc,Nc,Ic,Mc,Rc,Dc,Oc,Pc,Bc,Fc,$c,zc,Gc,Uc,qc,Yc,jc,Hc,Wc,Vc,Xc,Kc,Zc,Qc,Jc,th,eh,rh,nh,ih,ah,oh,sh,lh,ch,hh,uh,dh,ph,gh,fh=t(()=>{tc(),Mn(),oc=ac=ic="",sc=Ae(t=>Sl(t,Rr()),"sanitizeText"),lc=Ae(()=>{ac=oc=ic=""},"clear"),cc=Ae(t=>{ic=sc(t).replace(/^\s+/g,"")},"setAccTitle"),hc=Ae(()=>ic,"getAccTitle"),uc=Ae(t=>{oc=sc(t).replace(/\n\s+/g,`
|
|
|
`)},"setAccDescription"),dc=Ae(()=>oc,"getAccDescription"),pc=Ae(t=>{ac=sc(t)},"setDiagramTitle"),gc=Ae(()=>ac,"getDiagramTitle")}),i=t(()=>{Yr(),e(),Mn(),tc(),ec(),rc(),fh(),fc=R,mc=k,D=Rr,yc=Mr,vc=kr,xc=Ae(t=>Sl(t,D()),"sanitizeText"),bc=Xl,wc=Ae(()=>nc,"getCommonDb"),kc={},Tc=Ae((t,e,r)=>{kc[t]&&fc.warn(`Diagram with id ${t} already registered. Overwriting.`),kc[t]=e,r&&te(t,r),Ql(t,e.styles),e.injectUtils?.(fc,mc,D,xc,bc,wc(),()=>{})},"registerDiagram"),Ec=Ae(t=>{if(t in kc)return kc[t];throw new _c(t)},"getDiagram"),_c=class extends Error{static{Ae(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),mh=t(()=>{i(),tc(),fh(),Cc=[],Sc=[""],Nc=[{alias:Ac="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Lc=""}],Mc="",Rc=!(Ic=[]),Dc=4,Oc=2,Bc=Ae(function(){return Pc},"getC4Type"),Fc=Ae(function(t){Pc=Sl(t,D())},"setC4Type"),$c=Ae(function(r,n,i,a,o,s,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Ic.find(t=>t.from===n&&t.to===i);e?t=e:Ic.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==o?t.techn={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.techn={text:o},null==s?t.descr={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.descr={text:s},"object"==typeof l?([o,r]=Object.entries(l)[0],t[o]=r):t.sprite=l,"object"==typeof c?([a,s]=Object.entries(c)[0],t[a]=s):t.tags=c,"object"==typeof h?([o,r]=Object.entries(h)[0],t[o]=r):t.link=h,t.wrap=lh()}},"addRel"),zc=Ae(function(r,n,i,a,o,s,l){if(null!==n&&null!==i){let t={},e=Cc.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Cc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.descr={text:a},"object"==typeof o?([i,c]=Object.entries(o)[0],t[i]=c):t.sprite=o,"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.tags=s,"object"==typeof l?([c,o]=Object.entries(l)[0],t[c]=o):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Ac,t.wrap=lh()}},"addPersonOrSystem"),Gc=Ae(function(r,n,i,a,o,s,l,c){if(null!==n&&null!==i){let t={},e=Cc.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Cc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==o?t.descr={text:""}:"object"==typeof o?([i,h]=Object.entries(o)[0],t[i]={text:h}):t.descr={text:o},"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.sprite=s,"object"==typeof l?([h,o]=Object.entries(l)[0],t[h]=o):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lh(),t.typeC4Shape={text:r},t.parentBoundary=Ac}},"addContainer"),Uc=Ae(function(r,n,i,a,o,s,l,c){if(null!==n&&null!==i){let t={},e=Cc.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Cc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==o?t.descr={text:""}:"object"==typeof o?([i,h]=Object.entries(o)[0],t[i]={text:h}):t.descr={text:o},"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.sprite=s,"object"==typeof l?([h,o]=Object.entries(l)[0],t[h]=o):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lh(),t.typeC4Shape={text:r},t.parentBoundary=Ac}},"addComponent"),qc=Ae(function(r,n,i,a,o){if(null!==r&&null!==n){let t={},e=Nc.find(t=>t.alias===r);var s;e&&r===e.alias?t=e:(t.alias=r,Nc.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,s]=Object.entries(i)[0],t[n]={text:s}):t.type={text:i},"object"==typeof a?([n,s]=Object.entries(a)[0],t[n]=s):t.tags=a,"object"==typeof o?([i,n]=Object.entries(o)[0],t[i]=n):t.link=o,t.parentBoundary=Ac,t.wrap=lh(),Lc=Ac,Ac=r,Sc.push(Lc)}},"addPersonOrSystemBoundary"),Yc=Ae(function(r,n,i,a,o){if(null!==r&&null!==n){let t={},e=Nc.find(t=>t.alias===r);var s;e&&r===e.alias?t=e:(t.alias=r,Nc.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,s]=Object.entries(i)[0],t[n]={text:s}):t.type={text:i},"object"==typeof a?([n,s]=Object.entries(a)[0],t[n]=s):t.tags=a,"object"==typeof o?([i,n]=Object.entries(o)[0],t[i]=n):t.link=o,t.parentBoundary=Ac,t.wrap=lh(),Lc=Ac,Ac=r,Sc.push(Lc)}},"addContainerBoundary"),jc=Ae(function(r,n,i,a,o,t,s,l){if(null!==n&&null!==i){let t={},e=Nc.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Nc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.type={text:a},null==o?t.descr={text:""}:"object"==typeof o?([i,c]=Object.entries(o)[0],t[i]={text:c}):t.descr={text:o},"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.tags=s,"object"==typeof l?([c,o]=Object.entries(l)[0],t[c]=o):t.link=l,t.nodeType=r,t.parentBoundary=Ac,t.wrap=lh(),Lc=Ac,Ac=n,Sc.push(Lc)}},"addDeploymentNode"),Hc=Ae(function(){Ac=Lc,Sc.pop(),Lc=Sc.pop(),Sc.push(Lc)},"popBoundaryParseStack"),Wc=Ae(function(t,e,r,n,i,a,o,s,l,c,h){let u=Cc.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Nc.find(t=>t.alias===e))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):u.shadowing=a),null!=o&&("object"==typeof o?([r,p]=Object.entries(o)[0],u[r]=p):u.shape=o),null!=s&&("object"==typeof s?([i,d]=Object.entries(s)[0],u[i]=d):u.sprite=s),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=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?([o,i]=Object.entries(h)[0],u[o]=i):u.legendSprite=h))},"updateElStyle"),Vc=Ae(function(t,e,r,n,i,a,o){var s,l,c=Ic.find(t=>t.from===e&&t.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([s,l]=Object.entries(n)[0],c[s]=l):c.textColor=n),null!=i&&("object"==typeof i?([s,l]=Object.entries(i)[0],c[s]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,s]=Object.entries(a)[0],c[n]=parseInt(s)):c.offsetX=parseInt(a)),null!=o)&&("object"==typeof o?([l,i]=Object.entries(o)[0],c[l]=parseInt(i)):c.offsetY=parseInt(o))},"updateRelStyle"),Xc=Ae(function(t,e,r){var e="object"==typeof e?(n=Object.values(e)[0],parseInt(n)):parseInt(e),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=e&&(Dc=e),1<=n&&(Oc=n)},"updateLayoutConfig"),Kc=Ae(function(){return Dc},"getC4ShapeInRow"),Zc=Ae(function(){return Oc},"getC4BoundaryInRow"),Qc=Ae(function(){return Ac},"getCurrentBoundaryParse"),Jc=Ae(function(){return Lc},"getParentBoundaryParse"),th=Ae(function(e){return null==e?Cc:Cc.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),eh=Ae(function(e){return Cc.find(t=>t.alias===e)},"getC4Shape"),rh=Ae(function(t){return Object.keys(th(t))},"getC4ShapeKeys"),nh=Ae(function(e){return null==e?Nc:Nc.filter(t=>t.parentBoundary===e)},"getBoundaries"),ih=nh,ah=Ae(function(){return Ic},"getRels"),oh=Ae(function(){return Mc},"getTitle"),sh=Ae(function(t){Rc=t},"setWrap"),lh=Ae(function(){return Rc},"autoWrap"),ch=Ae(function(){Cc=[],Nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ac="global",Sc=[Lc=""],Sc=[Mc=""],Rc=!(Ic=[]),Dc=4,Oc=2},"clear"),hh={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},uh={FILLED:0,OPEN:1},dh={LEFTOF:0,RIGHTOF:1,OVER:2},ph=Ae(function(t){Mc=Sl(t,D())},"setTitle"),gh={addPersonOrSystem:zc,addPersonOrSystemBoundary:qc,addContainer:Gc,addContainerBoundary:Yc,addComponent:Uc,addDeploymentNode:jc,popBoundaryParseStack:Hc,addRel:$c,updateElStyle:Wc,updateRelStyle:Vc,updateLayoutConfig:Xc,autoWrap:lh,setWrap:sh,getC4ShapeArray:th,getC4Shape:eh,getC4ShapeKeys:rh,getBoundaries:nh,getBoundarys:ih,getCurrentBoundaryParse:Qc,getParentBoundaryParse:Jc,getRels:ah,getTitle:oh,getC4Type:Bc,getC4ShapeInRow:Kc,getC4BoundaryInRow:Zc,setAccTitle:cc,getAccTitle:hc,getAccDescription:dc,setAccDescription:uc,getConfig:Ae(()=>D().c4,"getConfig"),clear:ch,LINETYPE:hh,ARROWTYPE:uh,PLACEMENT:dh,setTitle:ph,setC4Type:Fc}});function yh(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var vh=t(()=>{Ae(yh,"ascending")});function xh(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var bh=t(()=>{Ae(xh,"descending")});function wh(r){let a,o,i;function s(t,e,r=0,n=t.length){if(r<n){if(0!==a(e,e))return n;do{var i=r+n>>>1}while(o(t[i],e)<0?r=1+i:n=i,r<n)}return r}function t(t,e,r=0,n=t.length){if(r<n){if(0!==a(e,e))return n;do{var i=r+n>>>1}while(o(t[i],e)<=0?r=1+i:n=i,r<n)}return r}function e(t,e,r=0,n=t.length){return r<(n=s(t,e,r,n-1))&&i(t[n-1],e)>-i(t[n],e)?n-1:n}return i=2!==r.length?(a=yh,o=Ae((t,e)=>yh(r(t),e),"compare2"),Ae((t,e)=>r(t)-e,"delta")):(a=r===yh||r===xh?r:kh,o=r),Ae(s,"left"),Ae(t,"right"),Ae(e,"center"),{left:s,center:e,right:t}}function kh(){return 0}var Th=t(()=>{vh(),bh(),Ae(wh,"bisector"),Ae(kh,"zero")});function Eh(t){return null===t?NaN:+t}var _h,Ch,Sh,Ah=t(()=>{Ae(Eh,"number")}),Lh=t(()=>{vh(),Th(),Ah(),_h=wh(yh),Ch=_h.right,_h.left,wh(Eh).center,Sh=Ch});function Nh({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Ih({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Mh({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Rh(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Dh,Oh=t(()=>{Dh=class extends Map{static{Ae(this,"InternMap")}constructor(t,e=Rh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,n]of t)this.set(r,n)}get(t){return super.get(Nh(this,t))}has(t){return super.has(Nh(this,t))}set(t,e){return super.set(Ih(this,t),e)}delete(t){return super.delete(Mh(this,t))}},Ae(Nh,"intern_get"),Ae(Ih,"intern_set"),Ae(Mh,"intern_delete"),Ae(Rh,"keyof")});function Ph(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=zh<=a?10:Gh<=a?5:Uh<=a?2:1,s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=r&&r<2?Ph(t,e,2*r):[s,l,c]}function Bh(t,e,r){if(!(0<(r=+r)))return[];if((t=+t)==(e=+e))return[t];var n=e<t,[i,a,o]=n?Ph(e,t,r):Ph(t,e,r);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(n)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}function Fh(t,e,r){return Ph(t=+t,e=+e,r=+r)[2]}function $h(t,e,r){r=+r;var n=(e=+e)<(t=+t);return(n?-1:1)*((t=n?Fh(e,t,r):Fh(t,e,r))<0?1/-t:t)}var zh,Gh,Uh,qh=t(()=>{zh=Math.sqrt(50),Gh=Math.sqrt(10),Uh=Math.sqrt(2),Ae(Ph,"tickSpec"),Ae(Bh,"ticks"),Ae(Fh,"tickIncrement"),Ae($h,"tickStep")});function Yh(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n<t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var jh=t(()=>{Ae(Yh,"max")});function Hh(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var Wh=t(()=>{Ae(Hh,"min")});function Vh(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a}var Xh=t(()=>{Ae(Vh,"range")}),Kh=t(()=>{Lh(),Th(),jh(),Wh(),Xh(),qh(),Oh()});function Zh(t){return t}var Qh=t(()=>{Ae(Zh,"default")});function Jh(t){return"translate("+t+",0)"}function tu(t){return"translate(0,"+t+")"}function eu(e){return t=>+e(t)}function ru(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function nu(){return!this.__axis}function iu(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===su||4===p?-1:1,T=4===p||2===p?"x":"y",E=p===su||p===lu?Jh:tu;function e(t){var e=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):Zh),n=Math.max(v,0)+b,i=+(a=g.range())[0]+w,a=+a[a.length-1]+w,o=(g.bandwidth?ru:eu)(g.copy(),w),s=t.selection?t.selection():t,l=s.selectAll(".domain").data([null]),c=(e=s.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*n).attr("dy",p===su?"0em":p===lu?"0.71em":"0.32em"));t!==s&&(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=o(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:o(t))+w)})),c.remove(),l.attr("d",4===p||2===p?x?"M"+k*x+","+i+"H"+w+"V"+a+"H"+k*x:"M"+w+","+i+"V"+a:x?"M"+i+","+k*x+"V"+w+"H"+a+"V"+k*x:"M"+i+","+w+"H"+a),e.attr("opacity",1).attr("transform",function(t){return E(o(t)+w)}),u.attr(T+"2",k*v),d.attr(T,k*n).text(r),s.filter(nu).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===p?"start":4===p?"end":"middle"),s.each(function(){this.__axis=o})}return Ae(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 au(t){return iu(su,t)}function ou(t){return iu(lu,t)}var su,lu,cu=t(()=>{Qh(),su=1,lu=3,Ae(Jh,"translateX"),Ae(tu,"translateY"),Ae(eu,"number"),Ae(ru,"center"),Ae(nu,"entering"),Ae(iu,"axis"),Ae(au,"axisTop"),Ae(ou,"axisBottom")}),hu=t(()=>{cu()});function uu(){for(var t,e=0,r=arguments.length,n={};e<r;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new du(n)}function du(t){this._=t}function pu(t,n){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&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function gu(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function fu(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=mu,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=r&&t.push({name:e,value:r}),t}var mu,yu,vu,xu,bu=t(()=>{mu={value:Ae(()=>{},"value")},Ae(uu,"dispatch"),Ae(du,"Dispatch"),Ae(pu,"parseTypenames"),du.prototype=uu.prototype={constructor:du,on:Ae(function(t,e){var r,n=this._,i=pu(t+"",n),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(r=(t=i[a]).type)n[r]=fu(n[r],t.name,e);else if(null==e)for(r in n)n[r]=fu(n[r],t.name,null);return this}for(;++a<o;)if(r=(r=(t=i[a]).type)&&gu(n[r],t.name))return r},"on"),copy:Ae(function(){var t,e={},r=this._;for(t in r)e[t]=r[t].slice();return new du(e)},"copy"),call:Ae(function(t,e){if(0<(r=arguments.length-2))for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},"call"),apply:Ae(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)},"apply")},Ae(gu,"get"),Ae(fu,"set"),yu=uu}),wu=t(()=>{bu()}),ku=t(()=>{xu={svg:"http://www.w3.org/2000/svg",xhtml:vu="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 Tu(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),xu.hasOwnProperty(e)?{space:xu[e],local:t}:t}var Eu=t(()=>{ku(),Ae(Tu,"default")});function _u(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===vu&&t.documentElement.namespaceURI===vu?t.createElement(r):t.createElementNS(e,r)}}function Cu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Su(t){return((t=Tu(t)).local?Cu:_u)(t)}var Au=t(()=>{Eu(),ku(),Ae(_u,"creatorInherit"),Ae(Cu,"creatorFixed"),Ae(Su,"default")});function Lu(){}function Nu(t){return null==t?Lu:function(){return this.querySelector(t)}}var Iu=t(()=>{Ae(Lu,"none"),Ae(Nu,"default")});function Mu(t){"function"!=typeof t&&(t=Nu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,o,s=e[i],l=s.length,c=n[i]=new Array(l),h=0;h<l;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),c[h]=o);return new ap(n,this._parents)}var Ru=t(()=>{hp(),Iu(),Ae(Mu,"default")});function Du(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Ou=t(()=>{Ae(Du,"array")});function Pu(){return[]}function Bu(t){return null==t?Pu:function(){return this.querySelectorAll(t)}}var Fu=t(()=>{Ae(Pu,"empty"),Ae(Bu,"default")});function $u(t){return function(){return Du(t.apply(this,arguments))}}function zu(t){t=("function"==typeof t?$u:Bu)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(n.push(t.call(o,o.__data__,c,s)),i.push(o));return new ap(n,i)}var Gu=t(()=>{hp(),Ou(),Fu(),Ae($u,"arrayAll"),Ae(zu,"default")});function Uu(t){return function(){return this.matches(t)}}function qu(e){return function(t){return t.matches(e)}}var Yu=t(()=>{Ae(Uu,"default"),Ae(qu,"childMatcher")});function ju(t){return function(){return Vu.call(this.children,t)}}function Hu(){return this.firstElementChild}function Wu(t){return this.select(null==t?Hu:ju("function"==typeof t?t:qu(t)))}var Vu,Xu=t(()=>{Yu(),Vu=Array.prototype.find,Ae(ju,"childFind"),Ae(Hu,"childFirst"),Ae(Wu,"default")});function Ku(){return Array.from(this.children)}function Zu(t){return function(){return Ju.call(this.children,t)}}function Qu(t){return this.selectAll(null==t?Ku:Zu("function"==typeof t?t:qu(t)))}var Ju,td=t(()=>{Yu(),Ju=Array.prototype.filter,Ae(Ku,"children"),Ae(Zu,"childrenFilter"),Ae(Qu,"default")});function ed(t){"function"!=typeof t&&(t=Uu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,o=e[i],s=o.length,l=n[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new ap(n,this._parents)}var rd=t(()=>{hp(),Yu(),Ae(ed,"default")});function nd(t){return new Array(t.length)}var id=t(()=>{Ae(nd,"default")});function ad(){return new ap(this._enter||this._groups.map(nd),this._parents)}function od(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var sd=t(()=>{id(),hp(),Ae(ad,"default"),Ae(od,"EnterNode"),od.prototype={constructor:od,appendChild:Ae(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:Ae(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:Ae(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:Ae(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function ld(t){return function(){return t}}var cd=t(()=>{Ae(ld,"default")});function hd(t,e,r,n,i,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],n[s]=o):r[s]=new od(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function ud(t,e,r,n,i,a,o){for(var s,l,c=new Map,h=e.length,u=a.length,d=new Array(h),p=0;p<h;++p)(s=e[p])&&(d[p]=l=o.call(s,s.__data__,p,e)+"",c.has(l)?i[p]=s:c.set(l,s));for(p=0;p<u;++p)l=o.call(t,a[p],p,a)+"",(s=c.get(l))?((n[p]=s).__data__=a[p],c.delete(l)):r[p]=new od(t,a[p]);for(p=0;p<h;++p)(s=e[p])&&c.get(d[p])===s&&(i[p]=s)}function dd(t){return t.__data__}function pd(t,e){if(!arguments.length)return Array.from(this,dd);var r=e?ud:hd,n=this._parents,i=this._groups;"function"!=typeof t&&(t=ld(t));for(var a=i.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var h=n[c],u=i[c],d=u.length,p=gd(t.call(h,h&&h.__data__,c,n)),g=p.length,f=s[c]=new Array(g),m=o[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(o=new ap(o,n))._enter=s,o._exit=l,o}function gd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var fd=t(()=>{hp(),sd(),cd(),Ae(hd,"bindIndex"),Ae(ud,"bindKey"),Ae(dd,"datum"),Ae(pd,"default"),Ae(gd,"arraylike")});function md(){return new ap(this._exit||this._groups.map(nd),this._parents)}var yd=t(()=>{id(),hp(),Ae(md,"default")});function vd(t,e,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof t?(n=t(n))&&n.selection():n.append(t+"");return null!=e&&(i=(i=e(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var xd=t(()=>{Ae(vd,"default")});function bd(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),o=0;o<i;++o)for(var s,l=e[o],c=r[o],h=l.length,u=a[o]=new Array(h),d=0;d<h;++d)(s=l[d]||c[d])&&(u[d]=s);for(;o<n;++o)a[o]=e[o];return new ap(a,this._parents)}var wd=t(()=>{hp(),Ae(bd,"default")});function kd(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n,i=t[e],a=i.length-1,o=i[a];0<=--a;)(n=i[a])&&(o&&4^n.compareDocumentPosition(o)&&o.parentNode.insertBefore(n,o),o=n);return this}var Td=t(()=>{Ae(kd,"default")});function Ed(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||_d,Ae(t,"compareNode");for(var e=this._groups,n=e.length,i=new Array(n),a=0;a<n;++a){for(var o,s=e[a],l=s.length,c=i[a]=new Array(l),h=0;h<l;++h)(o=s[h])&&(c[h]=o);c.sort(t)}return new ap(i,this._parents).order()}function _d(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}var Cd=t(()=>{hp(),Ae(Ed,"default"),Ae(_d,"ascending")});function Sd(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var Ad=t(()=>{Ae(Sd,"default")});function Ld(){return Array.from(this)}var Nd=t(()=>{Ae(Ld,"default")});function Id(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var o=n[i];if(o)return o}return null}var Md=t(()=>{Ae(Id,"default")});function Rd(){let t=0;for(var e of this)++t;return t}var Dd=t(()=>{Ae(Rd,"default")});function Od(){return!this.node()}var Pd=t(()=>{Ae(Od,"default")});function Bd(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i,a=e[r],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this}var Fd=t(()=>{Ae(Bd,"default")});function $d(t){return function(){this.removeAttribute(t)}}function zd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Gd(t,e){return function(){this.setAttribute(t,e)}}function Ud(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function qd(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function Yd(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 jd(t,e){var r,t=Tu(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?zd:$d:"function"==typeof e?t.local?Yd:qd:t.local?Ud:Gd)(t,e))}var Hd=t(()=>{Eu(),Ae($d,"attrRemove"),Ae(zd,"attrRemoveNS"),Ae(Gd,"attrConstant"),Ae(Ud,"attrConstantNS"),Ae(qd,"attrFunction"),Ae(Yd,"attrFunctionNS"),Ae(jd,"default")});function Wd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var Vd=t(()=>{Ae(Wd,"default")});function Xd(t){return function(){this.style.removeProperty(t)}}function Kd(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Zd(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function Qd(t,e,r){return 1<arguments.length?this.each((null==e?Xd:"function"==typeof e?Zd:Kd)(t,e,r??"")):Jd(this.node(),t)}function Jd(t,e){return t.style.getPropertyValue(e)||Wd(t).getComputedStyle(t,null).getPropertyValue(e)}var t0=t(()=>{Vd(),Ae(Xd,"styleRemove"),Ae(Kd,"styleConstant"),Ae(Zd,"styleFunction"),Ae(Qd,"default"),Ae(Jd,"styleValue")});function e0(t){return function(){delete this[t]}}function r0(t,e){return function(){this[t]=e}}function n0(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function i0(t,e){return 1<arguments.length?this.each((null==e?e0:"function"==typeof e?n0:r0)(t,e)):this.node()[t]}var a0=t(()=>{Ae(e0,"propertyRemove"),Ae(r0,"propertyConstant"),Ae(n0,"propertyFunction"),Ae(i0,"default")});function o0(t){return t.trim().split(/^|\s+/)}function s0(t){return t.classList||new l0(t)}function l0(t){this._node=t,this._names=o0(t.getAttribute("class")||"")}function c0(t,e){for(var r=s0(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function h0(t,e){for(var r=s0(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function u0(t){return function(){c0(this,t)}}function d0(t){return function(){h0(this,t)}}function p0(t,e){return function(){(e.apply(this,arguments)?c0:h0)(this,t)}}function g0(t,e){var r=o0(t+"");if(arguments.length<2){for(var n=s0(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof e?p0:e?u0:d0)(r,e))}var f0=t(()=>{Ae(o0,"classArray"),Ae(s0,"classList"),Ae(l0,"ClassList"),l0.prototype={add:Ae(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:Ae(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:Ae(function(t){return 0<=this._names.indexOf(t)},"contains")},Ae(c0,"classedAdd"),Ae(h0,"classedRemove"),Ae(u0,"classedTrue"),Ae(d0,"classedFalse"),Ae(p0,"classedFunction"),Ae(g0,"default")});function m0(){this.textContent=""}function y0(t){return function(){this.textContent=t}}function v0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function x0(t){return arguments.length?this.each(null==t?m0:("function"==typeof t?v0:y0)(t)):this.node().textContent}var b0=t(()=>{Ae(m0,"textRemove"),Ae(y0,"textConstant"),Ae(v0,"textFunction"),Ae(x0,"default")});function w0(){this.innerHTML=""}function k0(t){return function(){this.innerHTML=t}}function T0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function E0(t){return arguments.length?this.each(null==t?w0:("function"==typeof t?T0:k0)(t)):this.node().innerHTML}var _0=t(()=>{Ae(w0,"htmlRemove"),Ae(k0,"htmlConstant"),Ae(T0,"htmlFunction"),Ae(E0,"default")});function C0(){this.nextSibling&&this.parentNode.appendChild(this)}function S0(){return this.each(C0)}var A0=t(()=>{Ae(C0,"raise"),Ae(S0,"default")});function L0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function N0(){return this.each(L0)}var I0=t(()=>{Ae(L0,"lower"),Ae(N0,"default")});function M0(t){var e="function"==typeof t?t:Su(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var R0=t(()=>{Au(),Ae(M0,"default")});function D0(){return null}function O0(t,e){var r="function"==typeof t?t:Su(t),n=null==e?D0:"function"==typeof e?e:Nu(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var P0=t(()=>{Au(),Iu(),Ae(D0,"constantNull"),Ae(O0,"default")});function B0(){var t=this.parentNode;t&&t.removeChild(this)}function F0(){return this.each(B0)}var $0=t(()=>{Ae(B0,"remove"),Ae(F0,"default")});function z0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function G0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function U0(t){return this.select(t?G0:z0)}var q0=t(()=>{Ae(z0,"selection_cloneShallow"),Ae(G0,"selection_cloneDeep"),Ae(U0,"default")});function Y0(t){return arguments.length?this.property("__data__",t):this.node().__data__}var j0=t(()=>{Ae(Y0,"default")});function H0(e){return function(t){e.call(this,t,this.__data__)}}function W0(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 V0(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r<i;++r)e=t[r],a.type&&e.type!==a.type||e.name!==a.name?t[++n]=e:this.removeEventListener(e.type,e.listener,e.options);++n?t.length=n:delete this.__on}}}function X0(a,o,s){return function(){var t,e=this.__on,r=H0(o);if(e)for(var n=0,i=e.length;n<i;++n)if((t=e[n]).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=s),void(t.value=o);this.addEventListener(a.type,r,s),t={type:a.type,name:a.name,value:o,listener:r,options:s},e?e.push(t):this.__on=[t]}}function K0(t,e,r){var n,i,a=W0(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?X0:V0,n=0;n<o;++n)this.each(s(a[n],e,r));return this}var s=this.node().__on;if(s)for(var l,c=0,h=s.length;c<h;++c)for(n=0,l=s[c];n<o;++n)if((i=a[n]).type===l.type&&i.name===l.name)return l.value}var Z0=t(()=>{Ae(H0,"contextListener"),Ae(W0,"parseTypenames"),Ae(V0,"onRemove"),Ae(X0,"onAdd"),Ae(K0,"default")});function Q0(t,e,r){var n=Wd(t),i=n.CustomEvent;"function"==typeof i?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function J0(t,e){return function(){return Q0(this,t,e)}}function tp(t,e){return function(){return Q0(this,t,e.apply(this,arguments))}}function ep(t,e){return this.each(("function"==typeof e?tp:J0)(t,e))}var rp=t(()=>{Vd(),Ae(Q0,"dispatchEvent"),Ae(J0,"dispatchConstant"),Ae(tp,"dispatchFunction"),Ae(ep,"default")});function*np(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n,i=t[e],a=0,o=i.length;a<o;++a)(n=i[a])&&(yield n)}var ip=t(()=>{Ae(np,"default")});function ap(t,e){this._groups=t,this._parents=e}function op(){return new ap([[document.documentElement]],lp)}function sp(){return this}var lp,cp,hp=t(()=>{Ru(),Gu(),Xu(),td(),rd(),fd(),sd(),yd(),xd(),wd(),Td(),Cd(),Ad(),Nd(),Md(),Dd(),Pd(),Fd(),Hd(),t0(),a0(),f0(),b0(),_0(),A0(),I0(),R0(),P0(),$0(),q0(),j0(),Z0(),rp(),ip(),lp=[null],Ae(ap,"Selection"),Ae(op,"selection"),Ae(sp,"selection_selection"),ap.prototype=op.prototype={constructor:ap,select:Mu,selectAll:zu,selectChild:Wu,selectChildren:Qu,filter:ed,data:pd,enter:ad,exit:md,join:vd,merge:bd,selection:sp,order:kd,sort:Ed,call:Sd,nodes:Ld,node:Id,size:Rd,empty:Od,each:Bd,attr:jd,style:Qd,property:i0,classed:g0,text:x0,html:E0,raise:S0,lower:N0,append:M0,insert:O0,remove:F0,clone:U0,datum:Y0,on:K0,dispatch:ep,[Symbol.iterator]:np},cp=op});function O(t){return"string"==typeof t?new ap([[document.querySelector(t)]],[document.documentElement]):new ap([[t]],lp)}var up=t(()=>{hp(),Ae(O,"default")}),dp=t(()=>{Yu(),Eu(),up(),hp(),Iu(),Fu(),t0()}),pp=t(()=>{});function gp(t,e,r){(t.prototype=e.prototype=r).constructor=t}function fp(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var mp=t(()=>{Ae(gp,"default"),Ae(fp,"extend")});function yp(){}function vp(){return this.rgb().formatHex()}function xp(){return this.rgb().formatHex8()}function bp(){return Op(this).formatHsl()}function wp(){return this.rgb().formatRgb()}function kp(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Yp.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Tp(e):3===r?new Sp(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Ep(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Ep(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=jp.exec(t))?new Sp(e[1],e[2],e[3],1):(e=Hp.exec(t))?new Sp(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Wp.exec(t))?Ep(e[1],e[2],e[3],e[4]):(e=Vp.exec(t))?Ep(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xp.exec(t))?Dp(e[1],e[2]/100,e[3]/100,1):(e=Kp.exec(t))?Dp(e[1],e[2]/100,e[3]/100,e[4]):Zp.hasOwnProperty(t)?Tp(Zp[t]):"transparent"===t?new Sp(NaN,NaN,NaN,0):null}function Tp(t){return new Sp(t>>16&255,t>>8&255,255&t,1)}function Ep(t,e,r,n){return new Sp(t=n<=0?e=r=NaN:t,e,r,n)}function _p(t){return(t=t instanceof yp?t:kp(t))?new Sp((t=t.rgb()).r,t.g,t.b,t.opacity):new Sp}function Cp(t,e,r,n){return 1===arguments.length?_p(t):new Sp(t,e,r,n??1)}function Sp(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Ap(){return"#"+Rp(this.r)+Rp(this.g)+Rp(this.b)}function Lp(){return"#"+Rp(this.r)+Rp(this.g)+Rp(this.b)+Rp(255*(isNaN(this.opacity)?1:this.opacity))}function Np(){var t=Ip(this.opacity);return(1===t?"rgb(":"rgba(")+Mp(this.r)+`, ${Mp(this.g)}, `+Mp(this.b)+(1===t?")":`, ${t})`)}function Ip(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Mp(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rp(t){return((t=Mp(t))<16?"0":"")+t.toString(16)}function Dp(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Bp(t,e,r,n)}function Op(t){var e,r,n,i,a,o,s,l;return t instanceof Bp?new Bp(t.h,t.s,t.l,t.opacity):(t=t instanceof yp?t:kp(t))?t instanceof Bp?t:(e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=NaN,l=((a=Math.max(e,r,n))+i)/2,(s=a-i)?(o=e===a?(r-n)/s+6*(r<n):r===a?(n-e)/s+2:(e-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new Bp(o,s,l,t.opacity)):new Bp}function Pp(t,e,r,n){return 1===arguments.length?Op(t):new Bp(t,e,r,n??1)}function Bp(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Fp(t){return(t=(t||0)%360)<0?t+360:t}function $p(t){return Math.max(0,Math.min(1,t||0))}function zp(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 Gp,Up,qp,Yp,jp,Hp,Wp,Vp,Xp,Kp,Zp,Qp,Jp,t1=t(()=>{mp(),Ae(yp,"Color"),Gp="\\s*([+-]?\\d+)\\s*",Up="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yp=/^#([0-9a-f]{3,8})$/,jp=new RegExp(`^rgb\\(${Gp},${Gp},${Gp}\\)$`),Hp=new RegExp(`^rgb\\(${qp},${qp},${qp}\\)$`),Wp=new RegExp(`^rgba\\(${Gp},${Gp},${Gp},${Up}\\)$`),Vp=new RegExp(`^rgba\\(${qp},${qp},${qp},${Up}\\)$`),Xp=new RegExp(`^hsl\\(${Up},${qp},${qp}\\)$`),Kp=new RegExp(`^hsla\\(${Up},${qp},${qp},${Up}\\)$`),Zp={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},gp(yp,kp,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:vp,formatHex:vp,formatHex8:xp,formatHsl:bp,formatRgb:wp,toString:wp}),Ae(vp,"color_formatHex"),Ae(xp,"color_formatHex8"),Ae(bp,"color_formatHsl"),Ae(wp,"color_formatRgb"),Ae(kp,"color"),Ae(Tp,"rgbn"),Ae(Ep,"rgba"),Ae(_p,"rgbConvert"),Ae(Cp,"rgb"),Ae(Sp,"Rgb"),gp(Sp,Cp,fp(yp,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Sp(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Sp(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sp(Mp(this.r),Mp(this.g),Mp(this.b),Ip(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:Ap,formatHex:Ap,formatHex8:Lp,formatRgb:Np,toString:Np})),Ae(Ap,"rgb_formatHex"),Ae(Lp,"rgb_formatHex8"),Ae(Np,"rgb_formatRgb"),Ae(Ip,"clampa"),Ae(Mp,"clampi"),Ae(Rp,"hex"),Ae(Dp,"hsla"),Ae(Op,"hslConvert"),Ae(Pp,"hsl"),Ae(Bp,"Hsl"),gp(Bp,Pp,fp(yp,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bp(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Bp(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 Sp(zp(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),zp(t,r,e),zp(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Bp(Fp(this.h),$p(this.s),$p(this.l),Ip(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=Ip(this.opacity);return(1===t?"hsl(":"hsla(")+Fp(this.h)+`, ${100*$p(this.s)}%, ${100*$p(this.l)}%`+(1===t?")":`, ${t})`)}})),Ae(Fp,"clamph"),Ae($p,"clampt"),Ae(zp,"hsl2rgb")}),e1=t(()=>{Qp=Math.PI/180,Jp=180/Math.PI});function r1(t){var e,r,n,i,a,o;return t instanceof i1?new i1(t.l,t.a,t.b,t.opacity):t instanceof u1?d1(t):(i=a1(.2225045*(e=l1((t=t instanceof Sp?t:_p(t)).r))+.7168786*(r=l1(t.g))+.0606169*(n=l1(t.b))),e===r&&r===n?a=o=i:(a=a1((.4360747*e+.3850649*r+.1430804*n)/.96422),o=a1((.0139322*e+.0971045*r+.7141733*n)/.82521)),new i1(116*i-16,500*(a-i),200*(i-o),t.opacity))}function n1(t,e,r,n){return 1===arguments.length?r1(t):new i1(t,e,r,n??1)}function i1(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function a1(t){return m1<t?Math.pow(t,1/3):t/f1+p1}function o1(t){return g1<t?t*t*t:f1*(t-p1)}function s1(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function l1(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function c1(t){var e;return t instanceof u1?new u1(t.h,t.c,t.l,t.opacity):0===(t=t instanceof i1?t:r1(t)).a&&0===t.b?new u1(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity):new u1((e=Math.atan2(t.b,t.a)*Jp)<0?360+e:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function h1(t,e,r,n){return 1===arguments.length?c1(t):new u1(t,e,r,n??1)}function u1(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function d1(t){var e;return isNaN(t.h)?new i1(t.l,0,0,t.opacity):(e=t.h*Qp,new i1(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity))}var p1,g1,f1,m1,y1=t(()=>{mp(),t1(),e1(),p1=4/29,f1=3*(g1=6/29)*g1,m1=g1*g1*g1,Ae(r1,"labConvert"),Ae(n1,"lab"),Ae(i1,"Lab"),gp(i1,n1,fp(yp,{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 Sp(s1(3.1338561*(e=.96422*o1(e))-1.6168667*(t=+o1(t))-.4906146*(r=.82521*o1(r))),s1(-.9787684*e+1.9161415*t+.033454*r),s1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Ae(a1,"xyz2lab"),Ae(o1,"lab2xyz"),Ae(s1,"lrgb2rgb"),Ae(l1,"rgb2lrgb"),Ae(c1,"hclConvert"),Ae(h1,"hcl"),Ae(u1,"Hcl"),Ae(d1,"hcl2lab"),gp(u1,h1,fp(yp,{brighter(t){return new u1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new u1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return d1(this).rgb()}}))}),v1=t(()=>{t1(),y1()});function x1(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function b1(o){var s=o.length-1;return function(t){var e=t<=0?t=0:1<=t?s-(t=1):Math.floor(t*s),r=o[e],n=o[e+1],i=0<e?o[e-1]:2*r-n,a=e<s-1?o[e+2]:2*n-r;return x1((t-e/s)*s,i,r,n,a)}}var w1=t(()=>{Ae(x1,"basis"),Ae(b1,"default")});function k1(o){var s=o.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*s),r=o[(e+s-1)%s],n=o[e%s],i=o[(e+1)%s],a=o[(e+2)%s];return x1((t-e/s)*s,r,n,i,a)}}var T1,E1=t(()=>{w1(),Ae(k1,"default")}),_1=t(()=>{T1=Ae(t=>()=>t,"default")});function C1(e,r){return function(t){return e+t*r}}function S1(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(t){return Math.pow(e+t*r,n)}}function A1(t,e){var r=e-t;return r?C1(t,180<r||r<-180?r-360*Math.round(r/360):r):T1(isNaN(t)?e:t)}function L1(r){return 1==(r=+r)?N1:function(t,e){return e-t?S1(t,e,r):T1(isNaN(t)?e:t)}}function N1(t,e){var r=e-t;return r?C1(t,r):T1(isNaN(t)?e:t)}var I1=t(()=>{_1(),Ae(C1,"linear"),Ae(S1,"exponential"),Ae(A1,"hue"),Ae(L1,"gamma"),Ae(N1,"nogamma")});function M1(s){return function(t){for(var e,r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o=0;o<r;++o)e=Cp(t[o]),n[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return n=s(n),i=s(i),a=s(a),e.opacity=1,function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e+""}}}var R1,D1=t(()=>{v1(),w1(),E1(),I1(),R1=Ae(function t(e){var o=L1(e);function r(e,t){var r=o((e=Cp(e)).r,(t=Cp(t)).r),n=o(e.g,t.g),i=o(e.b,t.b),a=N1(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=n(t),e.b=i(t),e.opacity=a(t),e+""}}return Ae(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),Ae(M1,"rgbSpline"),M1(b1),M1(k1)});function O1(e,r){r=r||[];var n,i=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(n=0;n<i;++n)a[n]=e[n]*(1-t)+r[n]*t;return a}}function P1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var B1=t(()=>{Ae(O1,"default"),Ae(P1,"isNumberArray")});function F1(t,e){for(var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),o=0;o<n;++o)i[o]=Q1(t[o],e[o]);for(;o<r;++o)a[o]=e[o];return function(t){for(o=0;o<n;++o)a[o]=i[o](t);return a}}var $1=t(()=>{J1(),Ae(F1,"genericArray")});function z1(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var G1=t(()=>{Ae(z1,"default")});function U1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var q1=t(()=>{Ae(U1,"default")});function Y1(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?n[r]=Q1(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var j1=t(()=>{J1(),Ae(Y1,"default")});function H1(t){return function(){return t}}function W1(e){return function(t){return e(t)+""}}function V1(t,n){var e,r,i,a=X1.lastIndex=K1.lastIndex=0,o=-1,s=[],l=[];for(t+="",n+="";(e=X1.exec(t))&&(r=K1.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(e=e[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:U1(e,r)})),a=K1.lastIndex;return a<n.length&&(i=n.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?W1(l[0].x):H1(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)s[(e=l[r]).i]=e.x(t);return s.join("")})}var X1,K1,Z1=t(()=>{q1(),X1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K1=new RegExp(X1.source,"g"),Ae(H1,"zero"),Ae(W1,"one"),Ae(V1,"default")});function Q1(t,e){var r=typeof e;return null==e||"boolean"==r?T1(e):("number"==r?U1:"string"==r?(r=kp(e))?(e=r,R1):V1:e instanceof kp?R1:e instanceof Date?z1:P1(e)?O1:Array.isArray(e)?F1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Y1:U1)(t,e)}var J1=t(()=>{v1(),D1(),$1(),G1(),q1(),j1(),Z1(),_1(),B1(),Ae(Q1,"default")});function tg(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var eg=t(()=>{Ae(tg,"default")});function rg(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*ng,skewX:Math.atan(l)*ng,scaleX:o,scaleY:s}}var ng,ig,ag=t(()=>{ng=180/Math.PI,ig={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ae(rg,"default")});function og(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?ig:rg(t.a,t.b,t.c,t.d,t.e,t.f)}function sg(t){return null!=t&&((lg=lg||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=lg.transform.baseVal.consolidate())?rg((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ig}var lg,cg=t(()=>{ag(),Ae(og,"parseCss"),Ae(sg,"parseSvg")});function hg(r,s,l,i){function c(t){return t.length?t.pop()+" ":""}function n(t,e,r,n,i,a){var o;t!==r||e!==n?(o=i.push("translate(",null,s,null,l),a.push({i:o-4,x:U1(t,r)},{i:o-2,x:U1(e,n)})):(r||n)&&i.push("translate("+r+s+n+l)}function o(t,e,r,n){t!==e?(180<t-e?e+=360:180<e-t&&(t+=360),n.push({i:r.push(c(r)+"rotate(",null,i)-2,x:U1(t,e)})):e&&r.push(c(r)+"rotate("+e+i)}function h(t,e,r,n){t!==e?n.push({i:r.push(c(r)+"skewX(",null,i)-2,x:U1(t,e)}):e&&r.push(c(r)+"skewX("+e+i)}function u(t,e,r,n,i,a){var o;t!==r||e!==n?(o=i.push(c(i)+"scale(",null,",",null,")"),a.push({i:o-4,x:U1(t,r)},{i:o-2,x:U1(e,n)})):1===r&&1===n||i.push(c(i)+"scale("+r+","+n+")")}return Ae(c,"pop"),Ae(n,"translate"),Ae(o,"rotate"),Ae(h,"skewX"),Ae(u,"scale"),function(t,e){var i=[],a=[];return t=r(t),e=r(e),n(t.translateX,t.translateY,e.translateX,e.translateY,i,a),o(t.rotate,e.rotate,i,a),h(t.skewX,e.skewX,i,a),u(t.scaleX,t.scaleY,e.scaleX,e.scaleY,i,a),function(t){for(var e,r=-1,n=a.length;++r<n;)i[(e=a[r]).i]=e.x(t);return i.join("")}}}var ug,dg,pg=t(()=>{q1(),cg(),Ae(hg,"interpolateTransform"),ug=hg(og,"px, ","px)","deg)"),dg=hg(sg,", ",")",")")});function gg(o){return function(e,t){var r=o((e=h1(e)).h,(t=h1(t)).h),n=N1(e.c,t.c),i=N1(e.l,t.l),a=N1(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var fg,mg=t(()=>{v1(),I1(),Ae(gg,"hcl"),fg=gg(A1),gg(N1)}),yg=t(()=>{J1(),q1(),eg(),Z1(),pg(),D1(),mg()});function vg(){return Dg||(Bg(xg),Dg=Pg.now()+Og)}function xg(){Dg=0}function bg(){this._call=this._time=this._next=null}function wg(t,e,r){var n=new bg;return n.restart(t,e,r),n}function kg(){vg(),++Sg;for(var t,e=Ig;e;)0<=(t=Dg-e._time)&&e._call.call(void 0,t),e=e._next;--Sg}function Tg(){Dg=(Rg=Pg.now())+Og,Sg=Ag=0;try{kg()}finally{Sg=0,_g(),Dg=0}}function Eg(){var t=Pg.now(),e=t-Rg;Ng<e&&(Og-=e,Rg=t)}function _g(){for(var t,e,r=Ig,n=1/0;r;)r=r._call?(n>r._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Ig=e);Mg=t,Cg(n)}function Cg(t){Sg||(Ag=Ag&&clearTimeout(Ag),24<t-Dg?(t<1/0&&(Ag=setTimeout(Tg,t-Pg.now()-Og)),Lg=Lg&&clearInterval(Lg)):(Lg||(Rg=Pg.now(),Lg=setInterval(Eg,Ng)),Sg=1,Bg(Tg)))}var Sg,Ag,Lg,Ng,Ig,Mg,Rg,Dg,Og,Pg,Bg,Fg=t(()=>{Ng=1e3,Og=Dg=Rg=Lg=Ag=Sg=0,Pg="object"==typeof performance&&performance.now?performance:Date,Bg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},Ae(vg,"now"),Ae(xg,"clearNow"),Ae(bg,"Timer"),bg.prototype=wg.prototype={constructor:bg,restart:Ae(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?vg():+r)+(null==e?0:+e),this._next||Mg===this||(Mg?Mg._next=this:Ig=this,Mg=this),this._call=t,this._time=r,Cg()},"restart"),stop:Ae(function(){this._call&&(this._call=null,this._time=1/0,Cg())},"stop")},Ae(wg,"timer"),Ae(kg,"timerFlush"),Ae(Tg,"wake"),Ae(Eg,"poke"),Ae(_g,"nap"),Ae(Cg,"sleep")});function $g(e,r,t){var n=new bg;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var zg=t(()=>{Fg(),Ae($g,"default")}),Gg=t(()=>{Fg(),zg()});function Ug(t,e,r,n,i,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};Hg(t,r,{name:e,index:n,group:i,on:Wg,tween:Vg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Xg})}function qg(t,e){if((t=jg(t,e)).state>Xg)throw new Error("too late; already scheduled");return t}function Yg(t,e){if((t=jg(t,e)).state>Qg)throw new Error("too late; already running");return t}function jg(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function Hg(a,o,s){var l,c=a.__transition;function t(t){s.state=Kg,s.timer.restart(h,s.delay,s.time),s.delay<=t&&h(t-s.delay)}function h(t){var e,r,n,i;if(s.state!==Kg)return d();for(e in c)if(i=c[e],i.name===s.name){if(i.state===Qg)return $g(h);i.state===Jg?(i.state=ef,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e<o&&(i.state=ef,i.timer.stop(),i.on.call("cancel",a,a.__data__,i.index,i.group),delete c[e])}if($g(function(){s.state===Qg&&(s.state=Jg,s.timer.restart(u,s.delay,s.time),u(t))}),s.state=Zg,s.on.call("start",a,a.__data__,s.index,s.group),s.state===Zg){for(s.state=Qg,l=new Array(n=s.tween.length),e=0,r=-1;e<n;++e)(i=s.tween[e].value.call(a,a.__data__,s.index,s.group))&&(l[++r]=i);l.length=r+1}}function u(t){for(var e=t<s.duration?s.ease.call(null,t/s.duration):(s.timer.restart(d),s.state=tf,1),r=-1,n=l.length;++r<n;)l[r].call(a,e);s.state===tf&&(s.on.call("end",a,a.__data__,s.index,s.group),d())}function d(){for(var t in s.state=ef,s.timer.stop(),delete c[o],c)return;delete a.__transition}(c[o]=s).timer=wg(t,0,s.time),Ae(t,"schedule"),Ae(h,"start"),Ae(u,"tick"),Ae(d,"stop")}var Wg,Vg,Xg,Kg,Zg,Qg,Jg,tf,ef,rf=t(()=>{wu(),Gg(),Wg=yu("start","end","cancel","interrupt"),Vg=[],Xg=0,Kg=1,Zg=2,Qg=3,Jg=4,tf=5,ef=6,Ae(Ug,"default"),Ae(qg,"init"),Ae(Yg,"set"),Ae(jg,"get"),Ae(Hg,"create")});function nf(t,e){var r,n,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name!==e?o=!1:(n=r.state>Zg&&r.state<tf,r.state=ef,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[i]);o&&delete t.__transition}}var af=t(()=>{rf(),Ae(nf,"default")});function of(t){return this.each(function(){nf(this,t)})}var sf=t(()=>{af(),Ae(of,"default")});function lf(i,a){var o,s;return function(){var t=Yg(this,i),e=t.tween;if(e!==o)for(var r=0,n=(s=o=e).length;r<n;++r)if(s[r].name===a){(s=s.slice()).splice(r,1);break}t.tween=s}}function cf(a,o,s){var l,c;if("function"!=typeof s)throw new Error;return function(){var t=Yg(this,a),e=t.tween;if(e!==l){c=(l=e).slice();for(var r={name:o,value:s},n=0,i=c.length;n<i;++n)if(c[n].name===o){c[n]=r;break}n===i&&c.push(r)}t.tween=c}}function hf(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n,i=jg(this.node(),r).tween,a=0,o=i.length;a<o;++a)if((n=i[a]).name===t)return n.value;return null}return this.each((null==e?lf:cf)(r,t,e))}function uf(t,e,r){var n=t._id;return t.each(function(){var t=Yg(this,n);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return jg(t,n).value[e]}}var df=t(()=>{rf(),Ae(lf,"tweenRemove"),Ae(cf,"tweenFunction"),Ae(hf,"default"),Ae(uf,"tweenValue")});function pf(t,e){var r;return("number"==typeof e?U1:e instanceof kp?R1:(r=kp(e))?(e=r,R1):V1)(t,e)}var gf=t(()=>{v1(),yg(),Ae(pf,"default")});function ff(t){return function(){this.removeAttribute(t)}}function mf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function yf(e,r,n){var i,a,o=n+"";return function(){var t=this.getAttribute(e);return t===o?null:t===i?a:a=r(i=t,n)}}function vf(e,r,n){var i,a,o=n+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===o?null:t===i?a:a=r(i=t,n)}}function xf(n,i,a){var o,s,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(n):(t=this.getAttribute(n))===(e=r+"")?null:t===o&&e===s?l:(s=e,l=i(o=t,r))}}function bf(n,i,a){var o,s,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(t=this.getAttributeNS(n.space,n.local))===(e=r+"")?null:t===o&&e===s?l:(s=e,l=i(o=t,r))}}function wf(t,e){var r=Tu(t),n="transform"===r?dg:pf;return this.attrTween(t,"function"==typeof e?(r.local?bf:xf)(r,n,uf(this,"attr."+t,e)):null==e?(r.local?mf:ff)(r):(r.local?vf:yf)(r,n,e))}var kf=t(()=>{yg(),dp(),df(),gf(),Ae(ff,"attrRemove"),Ae(mf,"attrRemoveNS"),Ae(yf,"attrConstant"),Ae(vf,"attrConstantNS"),Ae(xf,"attrFunction"),Ae(bf,"attrFunctionNS"),Ae(wf,"default")});function Tf(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Ef(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function _f(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Ef(e,t):n}return Ae(t,"tween"),t._value=r,t}function Cf(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Tf(e,t):n}return Ae(t,"tween"),t._value=r,t}function Sf(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=Tu(t),this.tween(r,(t.local?_f:Cf)(t,e))}var Af=t(()=>{dp(),Ae(Tf,"attrInterpolate"),Ae(Ef,"attrInterpolateNS"),Ae(_f,"attrTweenNS"),Ae(Cf,"attrTween"),Ae(Sf,"default")});function Lf(t,e){return function(){qg(this,t).delay=+e.apply(this,arguments)}}function Nf(t,e){return e=+e,function(){qg(this,t).delay=e}}function If(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lf:Nf)(e,t)):jg(this.node(),e).delay}var Mf=t(()=>{rf(),Ae(Lf,"delayFunction"),Ae(Nf,"delayConstant"),Ae(If,"default")});function Rf(t,e){return function(){Yg(this,t).duration=+e.apply(this,arguments)}}function Df(t,e){return e=+e,function(){Yg(this,t).duration=e}}function Of(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rf:Df)(e,t)):jg(this.node(),e).duration}var Pf=t(()=>{rf(),Ae(Rf,"durationFunction"),Ae(Df,"durationConstant"),Ae(Of,"default")});function Bf(t,e){if("function"!=typeof e)throw new Error;return function(){Yg(this,t).ease=e}}function Ff(t){var e=this._id;return arguments.length?this.each(Bf(e,t)):jg(this.node(),e).ease}var $f=t(()=>{rf(),Ae(Bf,"easeConstant"),Ae(Ff,"default")});function zf(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;Yg(this,e).ease=t}}function Gf(t){if("function"!=typeof t)throw new Error;return this.each(zf(this._id,t))}var Uf=t(()=>{rf(),Ae(zf,"easeVarying"),Ae(Gf,"default")});function qf(t){"function"!=typeof t&&(t=Uu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,o=e[i],s=o.length,l=n[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new Nm(n,this._parents,this._name,this._id)}var Yf=t(()=>{dp(),Om(),Ae(qf,"default")});function jf(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),o=0;o<i;++o)for(var s,l=e[o],c=r[o],h=l.length,u=a[o]=new Array(h),d=0;d<h;++d)(s=l[d]||c[d])&&(u[d]=s);for(;o<n;++o)a[o]=e[o];return new Nm(a,this._parents,this._name,this._id)}var Hf=t(()=>{Om(),Ae(jf,"default")});function Wf(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 Vf(r,n,i){var a,o,s=Wf(n)?qg:Yg;return function(){var t=s(this,r),e=t.on;e!==a&&(o=(a=e).copy()).on(n,i),t.on=o}}function Xf(t,e){var r=this._id;return arguments.length<2?jg(this.node(),r).on.on(t):this.each(Vf(r,t,e))}var Kf=t(()=>{rf(),Ae(Wf,"start"),Ae(Vf,"onFunction"),Ae(Xf,"default")});function Zf(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Qf(){return this.on("end.remove",Zf(this._id))}var Jf=t(()=>{Ae(Zf,"removeFunction"),Ae(Qf,"default")});function tm(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Nu(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o<i;++o)for(var s,l,c=n[o],h=c.length,u=a[o]=new Array(h),d=0;d<h;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),u[d]=l,Ug(u[d],e,r,d,u,jg(s,r)));return new Nm(a,this._parents,e,r)}var em=t(()=>{dp(),Om(),rf(),Ae(tm,"default")});function rm(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Bu(t));for(var n=this._groups,i=n.length,a=[],o=[],s=0;s<i;++s)for(var l,c=n[s],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=t.call(l,l.__data__,u,c),g=jg(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Ug(d,e,r,f,p,g);a.push(p),o.push(l)}return new Nm(a,o,e,r)}var nm=t(()=>{dp(),Om(),rf(),Ae(rm,"default")});function im(){return new am(this._groups,this._parents)}var am,om=t(()=>{dp(),am=cp.prototype.constructor,Ae(im,"default")});function sm(r,n){var i,a,o;return function(){var t=Jd(this,r),e=(this.style.removeProperty(r),Jd(this,r));return t===e?null:t===i&&e===a?o:o=n(i=t,a=e)}}function lm(t){return function(){this.style.removeProperty(t)}}function cm(e,r,n){var i,a,o=n+"";return function(){var t=Jd(this,e);return t===o?null:t===i?a:a=r(i=t,n)}}function hm(n,i,a){var o,s,l;return function(){var t=Jd(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=Jd(this,n)),t===r?null:t===o&&r===s?l:(s=r,l=i(o=t,e))}}function um(n,i){var a,o,s,l,c="style."+i,h="end."+c;return function(){var t=Yg(this,n),e=t.on,r=null==t.value[c]?l=l||lm(i):void 0;e===a&&s===r||(o=(a=e).copy()).on(h,s=r),t.on=o}}function dm(t,e,r){var n="transform"==(t+="")?ug:pf;return null==e?this.styleTween(t,sm(t,n)).on("end.style."+t,lm(t)):"function"==typeof e?this.styleTween(t,hm(t,n,uf(this,"style."+t,e))).each(um(this._id,t)):this.styleTween(t,cm(t,n,e),r).on("end.style."+t,null)}var pm=t(()=>{yg(),dp(),rf(),df(),gf(),Ae(sm,"styleNull"),Ae(lm,"styleRemove"),Ae(cm,"styleConstant"),Ae(hm,"styleFunction"),Ae(um,"styleMaybeRemove"),Ae(dm,"default")});function gm(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function fm(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&gm(e,t,n):i}return Ae(t,"tween"),t._value=r,t}function mm(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,fm(t,e,r??""))}var ym=t(()=>{Ae(gm,"styleInterpolate"),Ae(fm,"styleTween"),Ae(mm,"default")});function vm(t){return function(){this.textContent=t}}function xm(e){return function(){var t=e(this);this.textContent=t??""}}function bm(t){return this.tween("text","function"==typeof t?xm(uf(this,"text",t)):vm(null==t?"":t+""))}var wm=t(()=>{df(),Ae(vm,"textConstant"),Ae(xm,"textFunction"),Ae(bm,"default")});function km(e){return function(t){this.textContent=e.call(this,t)}}function Tm(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&km(t):r}return Ae(t,"tween"),t._value=e,t}function Em(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,Tm(t))}var _m=t(()=>{Ae(km,"textInterpolate"),Ae(Tm,"textTween"),Ae(Em,"default")});function Cm(){for(var t=this._name,e=this._id,r=++Rm,n=this._groups,i=n.length,a=0;a<i;++a)for(var o,s=n[a],l=s.length,c=0;c<l;++c)(o=s[c])&&Ug(o,t,r,c,s,{time:(o=jg(o,e)).time+o.delay+o.duration,delay:0,duration:o.duration,ease:o.ease});return new Nm(n,this._parents,t,r)}var Sm=t(()=>{Om(),rf(),Ae(Cm,"default")});function Am(){var i,a,o=this,s=o._id,l=o.size();return new Promise(function(t,e){var r={value:e},n={value:Ae(function(){0==--l&&t()},"value")};o.each(function(){var t=Yg(this,s),e=t.on;e!==i&&((a=(i=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),t.on=a}),0===l&&t()})}var Lm=t(()=>{rf(),Ae(Am,"default")});function Nm(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Im(t){return cp().transition(t)}function Mm(){return++Rm}var Rm,Dm,Om=t(()=>{dp(),kf(),Af(),Mf(),Pf(),$f(),Uf(),Yf(),Hf(),Kf(),Jf(),em(),nm(),om(),pm(),ym(),wm(),_m(),Sm(),df(),Lm(),Rm=0,Ae(Nm,"Transition"),Ae(Im,"transition"),Ae(Mm,"newId"),Dm=cp.prototype,Nm.prototype=Im.prototype={constructor:Nm,select:tm,selectAll:rm,selectChild:Dm.selectChild,selectChildren:Dm.selectChildren,filter:qf,merge:jf,selection:im,transition:Cm,call:Dm.call,nodes:Dm.nodes,node:Dm.node,size:Dm.size,empty:Dm.empty,each:Dm.each,on:Xf,attr:wf,attrTween:Sf,style:dm,styleTween:mm,text:bm,textTween:Em,remove:Qf,tween:hf,delay:If,duration:Of,ease:Ff,easeVarying:Gf,end:Am,[Symbol.iterator]:Dm[Symbol.iterator]}});function Pm(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Bm=t(()=>{Ae(Pm,"cubicInOut")}),Fm=t(()=>{Bm()});function $m(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 zm(t){var e,r;t=t instanceof Nm?(e=t._id,t._name):(e=++Rm,(r=Gm).time=vg(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var o,s=n[a],l=s.length,c=0;c<l;++c)(o=s[c])&&Ug(o,t,e,c,s,r||$m(o,e));return new Nm(n,this._parents,t,e)}var Gm,Um=t(()=>{Om(),rf(),Fm(),Gg(),Gm={time:null,delay:0,duration:250,ease:Pm},Ae($m,"inherit"),Ae(zm,"default")}),qm=t(()=>{dp(),sf(),Um(),cp.prototype.interrupt=of,cp.prototype.transition=zm}),Ym=t(()=>{qm()}),jm=t(()=>{}),Hm=t(()=>{}),Wm=t(()=>{});function Vm(t){return[+t[0],+t[1]]}function Xm(t){return[Vm(t[0]),Vm(t[1])]}function Km(t){return{type:t}}var Zm,Qm,Jm,ty=t(()=>{Ym(),jm(),Hm(),Wm(),{abs:Zm,max:Qm,min:Jm}=Math,Ae(Vm,"number1"),Ae(Xm,"number2"),["w","e"].map(Km),Ae(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),Ae(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(Km),Ae(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),Ae(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(Km),Ae(function(t){return null==t?null:Xm(t)},"input"),Ae(function(t){return t},"output"),Ae(Km,"type")}),ey=t(()=>{ty()});function ry(r){this._+=r[0];for(let t=1,e=r.length;t<e;++t)this._+=arguments[t]+r[t]}function ny(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return ry;let n=10**e;return function(r){this._+=r[0];for(let t=1,e=r.length;t<e;++t)this._+=Math.round(arguments[t]*n)/n+r[t]}}function iy(){return new cy}var ay,oy,sy,ly,cy,hy=t(()=>{ay=Math.PI,ly=(oy=2*ay)-(sy=1e-6),Ae(ry,"append"),Ae(ny,"appendRound"),cy=class{static{Ae(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ry:ny(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,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,i,a){this._append`C${+t},${+e},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,r,n,i){if(t=+t,e=+e,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=r-t,h=n-e,u=s-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:sy<p&&(Math.abs(d*c-h*u)>sy&&i?(o=c*c+h*h,n=(r-=s)*r+(s=n-l)*s,l=Math.sqrt(o),a=Math.sqrt(p),p=(o=i*Math.tan((ay-Math.acos((o+p-n)/(2*l*a)))/2))/a,n=o/l,Math.abs(p-1)>sy&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*s<d*r)},${this._x1=t+n*c},${this._y1=e+n*h}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var o=r*Math.cos(n),s=r*Math.sin(n),l=t+o,c=e+s,h=1^a,a=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>sy||Math.abs(this._y1-c)>sy)&&this._append`L${l},${c}`,r&&((a=a<0?a%oy+oy:a)>ly?this._append`A${r},${r},0,1,${h},${t-o},${e-s}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:sy<a&&this._append`A${r},${r},0,${+(ay<=a)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}},Ae(iy,"path"),iy.prototype=cy.prototype}),uy=t(()=>{hy()}),dy=t(()=>{}),py=t(()=>{}),gy=t(()=>{}),fy=t(()=>{}),my=t(()=>{}),yy=t(()=>{}),vy=t(()=>{});function xy(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function by(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 wy=t(()=>{Ae(xy,"default"),Ae(by,"formatDecimalParts")});function ky(t){return(t=by(Math.abs(t)))?t[1]:NaN}var Ty=t(()=>{wy(),Ae(ky,"default")});function Ey(s,l){return function(t,e){for(var r=t.length,n=[],i=0,a=s[0],o=0;0<r&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),n.push(t.substring(r-=a,r+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return n.reverse().join(l)}}var _y=t(()=>{Ae(Ey,"default")});function Cy(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Sy=t(()=>{Ae(Cy,"default")});function Ay(t){var e;if(e=Ny.exec(t))return new Ly({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 Ly(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 Ny,Iy=t(()=>{Ny=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,Ae(Ay,"formatSpecifier"),Ay.prototype=Ly.prototype,Ae(Ly,"FormatSpecifier"),Ly.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 My(t){t:for(var e,r=t.length,n=1,i=-1;n<r;++n)switch(t[n]){case".":i=e=n;break;case"0":0===i&&(i=n),e=n;break;default:if(!+t[n])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}var Ry=t(()=>{Ae(My,"default")});function Dy(t,e){var r,n,i=by(t,e);return i?(r=i[0],(i=(i=i[1])-(Oy=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n<i?r+new Array(i-n+1).join("0"):0<i?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+by(t,Math.max(0,e+i-1))[0]):t+""}var Oy,Py=t(()=>{wy(),Ae(Dy,"default")});function By(t,e){var r;return(e=by(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 Fy,$y=t(()=>{wy(),Ae(By,"default")}),zy=t(()=>{wy(),Py(),$y(),Fy={"%":Ae((t,e)=>(100*t).toFixed(e),"%"),b:Ae(t=>Math.round(t).toString(2),"b"),c:Ae(t=>t+"","c"),d:xy,e:Ae((t,e)=>t.toExponential(e),"e"),f:Ae((t,e)=>t.toFixed(e),"f"),g:Ae((t,e)=>t.toPrecision(e),"g"),o:Ae(t=>Math.round(t).toString(8),"o"),p:Ae((t,e)=>By(100*t,e),"p"),r:By,s:Dy,X:Ae(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:Ae(t=>Math.round(t).toString(16),"x")}});function Gy(t){return t}var Uy=t(()=>{Ae(Gy,"default")});function qy(t){var k=void 0===t.grouping||void 0===t.thousands?Gy:Ey(Yy.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?Gy:Cy(Yy.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",C=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=Ay(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"):Fy[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?n:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?i:/[%p]/.test(y)?a:"",b=Fy[y],w=/[defgprs%]/.test(y);function r(t){var e,r,n,i=v,a=x;if("c"===y)a=b(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?C:b(Math.abs(t),f),m&&(t=My(t)),i=((o=(!o||0!=+t||"+"===u)&&o)?"("===u?u:_:"-"===u||"("===u?"":u)+i,a=("s"===y?jy[8+Oy/3]:"")+a+(o&&"("===u?")":""),w)for(e=-1,r=t.length;++e<r;)if((n=t.charCodeAt(e))<48||57<n){a=(46===n?T+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}g&&!d&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<p?new Array(p-s+1).join(c):"";switch(g&&d&&(t=k(l+t,l.length?p-a.length:1/0),l=""),h){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+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)),Ae(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=o(((t=Ay(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(ky(e)/3))),n=Math.pow(10,-t),i=jy[8+t/3];return function(t){return r(n*t)+i}}return Ae(o,"newFormat"),Ae(e,"formatPrefix"),{format:o,formatPrefix:e}}var Yy,jy,Hy=t(()=>{Ty(),_y(),Sy(),Iy(),Ry(),zy(),Py(),Uy(),Yy=Array.prototype.map,jy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ae(qy,"default")});function Wy(t){return Vy=qy(t),Xy=Vy.format,Ky=Vy.formatPrefix,Vy}var Vy,Xy,Ky,Zy=t(()=>{Hy(),Wy({thousands:",",grouping:[3],currency:["$",""]}),Ae(Wy,"defaultLocale")});function Qy(t){return Math.max(0,-ky(Math.abs(t)))}var Jy=t(()=>{Ty(),Ae(Qy,"default")});function t2(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ky(e)/3)))-ky(Math.abs(t)))}var e2=t(()=>{Ty(),Ae(t2,"default")});function r2(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ky(e)-ky(t))+1}var n2=t(()=>{Ty(),Ae(r2,"default")}),i2=t(()=>{Zy(),Iy(),Jy(),e2(),n2()}),a2=t(()=>{}),o2=t(()=>{}),s2=t(()=>{}),l2=t(()=>{});function c2(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var h2=t(()=>{Ae(c2,"initRange")});function u2(){var r=new Dh,n=[],i=[],a=d2;function o(t){let e=r.get(t);if(void 0===e){if(a!==d2)return a;r.set(t,e=n.push(t)-1)}return i[e%i.length]}return Ae(o,"scale"),o.domain=function(t){if(!arguments.length)return n.slice();n=[],r=new Dh;for(var e of t)r.has(e)||r.set(e,n.push(e)-1);return o},o.range=function(t){return arguments.length?(i=Array.from(t),o):i.slice()},o.unknown=function(t){return arguments.length?(a=t,o):a},o.copy=function(){return u2(n,i).unknown(a)},c2.apply(o,arguments),o}var d2,p2=t(()=>{Kh(),h2(),d2=Symbol("implicit"),Ae(u2,"ordinal")});function g2(){var i,a,t=u2().unknown(void 0),o=t.domain,s=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=o().length,e=c<l,r=e?c:l,n=(i=((n=e?l:c)-r)/Math.max(1,t-u+2*d),h&&(i=Math.floor(i)),r+=(n-r-i*(t-u))*p,a=i*(1-u),h&&(r=Math.round(r),a=Math.round(a)),Vh(t).map(function(t){return r+i*t}));return s(e?n.reverse():n)}return delete t.unknown,Ae(e,"rescale"),t.domain=function(t){return(arguments.length?(o(t),e):o)()},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 i},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 g2(o(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},c2.apply(e(),arguments)}var f2=t(()=>{Kh(),h2(),p2(),Ae(g2,"band")});function m2(t){return function(){return t}}var y2=t(()=>{Ae(m2,"constants")});function v2(t){return+t}var x2=t(()=>{Ae(v2,"number")});function b2(t){return t}function w2(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:m2(isNaN(r)?NaN:.5)}function k2(e,r){var t;return r<e&&(t=e,e=r,r=t),function(t){return Math.max(e,Math.min(r,t))}}function T2(t,e,r){var n=t[0],t=t[1],i=e[0],e=e[1],i=t<n?(n=w2(t,n),r(e,i)):(n=w2(n,t),r(i,e));return function(t){return i(n(t))}}function E2(r,t,e){var n=Math.min(r.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(r[n]<r[0]&&(r=r.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=w2(r[o],r[o+1]),a[o]=e(t[o],t[o+1]);return function(t){var e=Sh(r,t,1,n)-1;return a[e](i[e](t))}}function _2(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function C2(){var r,n,e,i,a,o,s=A2,l=A2,c=Q1,h=b2;function u(){var t=Math.min(s.length,l.length);return h!==b2&&(h=k2(s[0],s[t-1])),i=2<t?E2:T2,a=o=null,d}function d(t){return null==t||isNaN(t=+t)?e:(a=a||i(s.map(r),l,c))(r(h(t)))}return Ae(u,"rescale"),Ae(d,"scale"),d.invert=function(t){return h(n((o=o||i(l,s.map(r),U1))(t)))},d.domain=function(t){return arguments.length?(s=Array.from(t,v2),u()):s.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=tg,u()},d.clamp=function(t){return arguments.length?(h=!!t||b2,u()):h!==b2},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,n=e,u()}}function S2(){return C2()(b2,b2)}var A2,L2=t(()=>{Kh(),yg(),y2(),x2(),A2=[0,1],Ae(b2,"identity"),Ae(w2,"normalize"),Ae(k2,"clamper"),Ae(T2,"bimap"),Ae(E2,"polymap"),Ae(_2,"copy"),Ae(C2,"transformer"),Ae(S2,"continuous")});function N2(t,e,r,n){var i,a=$h(t,e,r);switch((n=Ay(n??",f")).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=t2(a,o))||(n.precision=i),Ky(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=r2(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Qy(a))||(n.precision=i-2*("%"===n.type))}return Xy(n)}var I2=t(()=>{Kh(),i2(),Ae(N2,"tickFormat")});function M2(c){var h=c.domain;return c.ticks=function(t){var e=h();return Bh(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return N2(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,r,n=h(),i=0,a=n.length-1,o=n[i],s=n[a],l=10;for(s<o&&(r=o,o=s,s=r,r=i,i=a,a=r);0<l--;){if((r=Fh(o,s,t))===e)return n[i]=o,n[a]=s,h(n);if(0<r)o=Math.floor(o/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;o=Math.ceil(o*r)/r,s=Math.floor(s*r)/r}e=r}return c},c}function R2(){var t=S2();return t.copy=function(){return _2(t,R2())},c2.apply(t,arguments),M2(t)}var D2=t(()=>{Kh(),L2(),h2(),I2(),Ae(M2,"linearish"),Ae(R2,"linear")});function O2(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}var P2=t(()=>{Ae(O2,"nice")});function B2(a,o,r,n){function s(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return Ae(s,"interval"),s.floor=t=>(a(t=new Date(+t)),t),s.ceil=t=>(a(t=new Date(t-1)),o(t,1),a(t),t),s.round=t=>{var e=s(t),r=s.ceil(t);return t-e<r-t?e:r},s.offset=(t,e)=>(o(t=new Date(+t),null==e?1:Math.floor(e)),t),s.range=(t,e,r)=>{var n,i=[];if(t=s.ceil(t),r=null==r?1:Math.floor(r),t<e&&0<r)for(;i.push(n=new Date(+t)),o(t,r),a(t),n<t&&t<e;);return i},s.filter=r=>B2(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(;o(t,-1),!r(t););else for(;0<=--e;)for(;o(t,1),!r(t););}),r&&(s.count=(t,e)=>(F2.setTime(+t),$2.setTime(+e),a(F2),a($2),Math.floor(r(F2,$2))),s.every=e=>(e=Math.floor(e),isFinite(e)&&0<e?1<e?s.filter(n?t=>n(t)%e==0:t=>s.count(0,t)%e==0):s:null)),s}var F2,$2,z2,G2,U2,q2,Y2,j2,H2,W2,V2,X2=t(()=>{F2=new Date,$2=new Date,Ae(B2,"timeInterval")}),K2=t(()=>{X2(),(z2=B2(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?B2(t=>{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):z2:null),z2.range}),Z2=t(()=>{X2(),(G2=B2(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Q2=t(()=>{X2(),(U2=B2(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,(q2=B2(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),J2=t(()=>{X2(),(Y2=B2(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,(j2=B2(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),tv=t(()=>{X2(),(H2=B2(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,(W2=B2(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(V2=B2(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 ev(e){return B2(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 rv(e){return B2(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 nv,iv,av,ov,sv,lv,cv,hv,uv,dv,pv,gv,fv,mv,yv,vv,xv,bv,wv=t(()=>{X2(),Ae(ev,"timeWeekday"),nv=ev(0),iv=ev(1),av=ev(2),ov=ev(3),sv=ev(4),lv=ev(5),cv=ev(6),nv.range,iv.range,av.range,ov.range,sv.range,lv.range,cv.range,Ae(rv,"utcWeekday"),hv=rv(0),uv=rv(1),dv=rv(2),pv=rv(3),gv=rv(4),fv=rv(5),mv=rv(6),hv.range,uv.range,dv.range,pv.range,gv.range,fv.range,mv.range}),kv=t(()=>{X2(),(yv=B2(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,(vv=B2(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}),Tv=t(()=>{X2(),(xv=B2(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?B2(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,xv.range,(bv=B2(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?B2(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,bv.range});function Ev(a,t,e,r,n,i){let o=[[G2,1,1e3],[G2,5,5e3],[G2,15,15e3],[G2,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function s(t,e,r){var n=e<t;return n&&([t,e]=[e,t]),r=(r=r&&"function"==typeof r.range?r:l(t,e,r))?r.range(t,+e+1):[],n?r.reverse():r}function l(t,e,r){var n=Math.abs(e-t)/r,i=wh(([,,t])=>t).right(o,n);return i===o.length?a.every($h(t/31536e6,e/31536e6,r)):0===i?z2.every(Math.max($h(t,e,r),1)):([t,e]=o[n/o[i-1][2]<o[i][2]/n?i-1:i],t.every(e))}return Ae(s,"ticks"),Ae(l,"tickInterval"),[s,l]}var _v,Cv,Sv,Av,Lv=t(()=>{Kh(),K2(),Z2(),Q2(),J2(),tv(),wv(),kv(),Tv(),Ae(Ev,"ticker"),[_v,Cv]=Ev(bv,vv,hv,V2,j2,q2),[Sv,Av]=Ev(xv,yv,nv,H2,Y2,U2)}),Nv=t(()=>{K2(),Z2(),Q2(),J2(),tv(),wv(),kv(),Tv(),Lv()});function Iv(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 Mv(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 Rv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Dv(t){var n=t.dateTime,i=t.date,a=t.time,e=t.periods,r=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,c=Bv(e),h=Fv(e),P=Bv(r),B=Fv(r),F=Bv(o),$=Fv(o),z=Bv(s),G=Fv(s),U=Bv(l),q=Fv(l),u={a:E,A:_,b:C,B:S,c:null,d:ax,e:ax,f:hx,g:wx,G:Tx,H:ox,I:sx,j:lx,L:cx,m:ux,M:dx,p:A,q:L,Q:Hx,s:Wx,S:px,u:gx,U:fx,V:yx,w:vx,W:xx,x:null,X:null,y:bx,Y:kx,Z:Ex,"%":jx},d={a:N,A:I,b:M,B:R,c:null,d:_x,e:_x,f:Nx,g:Gx,G:qx,H:Cx,I:Sx,j:Ax,L:Lx,m:Ix,M:Mx,p:D,q:O,Q:Hx,s:Wx,S:Rx,u:Dx,U:Ox,V:Bx,w:Fx,W:$x,x:null,X:null,y:zx,Y:Ux,Z:Yx,"%":jx},Y={a:y,A:v,b:x,B:b,c:w,d:Xv,e:Xv,f:ex,g:jv,G:Yv,H:Zv,I:Zv,j:Kv,L:tx,m:Vv,M:Qv,p:m,q:Wv,Q:nx,s:ix,S:Jv,u:zv,U:Gv,V:Uv,w:$v,W:qv,x:k,X:T,y:jv,Y:Yv,Z:Hv,"%":rx};function p(l,c){return function(t){var e,r,n,i=[],a=-1,o=0,s=l.length;for(t instanceof Date||(t=new Date(+t));++a<s;)37===l.charCodeAt(a)&&(i.push(l.slice(o,a)),null!=(r=Vx[e=l.charAt(++a)])?e=l.charAt(++a):r="e"===e?" ":"0",(n=c[e])&&(e=n(t,r)),i.push(e),o=a+1);return i.push(l.slice(o,a)),i.join("")}}function g(i,a){return function(t){var e,r,n=Rv(1900,void 0,1);if(f(n,i,t+="",0)!=t.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(!a||"Z"in n||(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(n.m="q"in n?n.q:0),"V"in n){if(n.V<1||53<n.V)return null;"w"in n||(n.w=1),"Z"in n?(e=4<(r=(e=Mv(Rv(n.y,0,1))).getUTCDay())||0===r?uv.ceil(e):uv(e),e=W2.offset(e,7*(n.V-1)),n.y=e.getUTCFullYear(),n.m=e.getUTCMonth(),n.d=e.getUTCDate()+(n.w+6)%7):(e=4<(r=(e=Iv(Rv(n.y,0,1))).getDay())||0===r?iv.ceil(e):iv(e),e=H2.offset(e,7*(n.V-1)),n.y=e.getFullYear(),n.m=e.getMonth(),n.d=e.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),r="Z"in n?Mv(Rv(n.y,0,1)).getUTCDay():Iv(Rv(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(r+5)%7:n.w+7*n.U-(r+6)%7);return("Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,Mv):Iv)(n)}}function f(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o<s;){if(l<=n)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Y[i in Vx?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}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,n,e,r)}function k(t,e,r){return f(t,i,e,r)}function T(t,e,r){return f(t,a,e,r)}function E(t){return o[t.getDay()]}function _(t){return r[t.getDay()]}function C(t){return l[t.getMonth()]}function S(t){return s[t.getMonth()]}function A(t){return e[+(12<=t.getHours())]}function L(t){return 1+~~(t.getMonth()/3)}function N(t){return o[t.getUTCDay()]}function I(t){return r[t.getUTCDay()]}function M(t){return l[t.getUTCMonth()]}function R(t){return s[t.getUTCMonth()]}function D(t){return e[+(12<=t.getUTCHours())]}function O(t){return 1+~~(t.getUTCMonth()/3)}return u.x=p(i,u),u.X=p(a,u),u.c=p(n,u),d.x=p(i,d),d.X=p(a,d),d.c=p(n,d),Ae(p,"newFormat"),Ae(g,"newParse"),Ae(f,"parseSpecifier"),Ae(m,"parsePeriod"),Ae(y,"parseShortWeekday"),Ae(v,"parseWeekday"),Ae(x,"parseShortMonth"),Ae(b,"parseMonth"),Ae(w,"parseLocaleDateTime"),Ae(k,"parseLocaleDate"),Ae(T,"parseLocaleTime"),Ae(E,"formatShortWeekday"),Ae(_,"formatWeekday"),Ae(C,"formatShortMonth"),Ae(S,"formatMonth"),Ae(A,"formatPeriod"),Ae(L,"formatQuarter"),Ae(N,"formatUTCShortWeekday"),Ae(I,"formatUTCWeekday"),Ae(M,"formatUTCShortMonth"),Ae(R,"formatUTCMonth"),Ae(D,"formatUTCPeriod"),Ae(O,"formatUTCQuarter"),{format:Ae(function(t){var e=p(t+="",u);return e.toString=function(){return t},e},"format"),parse:Ae(function(t){var e=g(t+="",!1);return e.toString=function(){return t},e},"parse"),utcFormat:Ae(function(t){var e=p(t+="",d);return e.toString=function(){return t},e},"utcFormat"),utcParse:Ae(function(t){var e=g(t+="",!0);return e.toString=function(){return t},e},"utcParse")}}function Ov(t,e,r){var n=t<0?"-":"",i=(t=(n?-t:t)+"").length;return n+(i<r?new Array(r-i+1).join(e)+t:t)}function Pv(t){return t.replace(Zx,"\\$&")}function Bv(t){return new RegExp("^(?:"+t.map(Pv).join("|")+")","i")}function Fv(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function $v(t,e,r){return(e=Xx.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function zv(t,e,r){return(e=Xx.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function Gv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Uv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function qv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function Yv(t,e,r){return(e=Xx.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function jv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Hv(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 Wv(t,e,r){return(e=Xx.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Vv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Xv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Kv(t,e,r){return(e=Xx.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Zv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Qv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Jv(t,e,r){return(e=Xx.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function tx(t,e,r){return(e=Xx.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function ex(t,e,r){return(e=Xx.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function rx(t,e,r){return(e=Kx.exec(e.slice(r,r+1)))?r+e[0].length:-1}function nx(t,e,r){return(e=Xx.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function ix(t,e,r){return(e=Xx.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function ax(t,e){return Ov(t.getDate(),e,2)}function ox(t,e){return Ov(t.getHours(),e,2)}function sx(t,e){return Ov(t.getHours()%12||12,e,2)}function lx(t,e){return Ov(1+H2.count(xv(t),t),e,3)}function cx(t,e){return Ov(t.getMilliseconds(),e,3)}function hx(t,e){return cx(t,e)+"000"}function ux(t,e){return Ov(t.getMonth()+1,e,2)}function dx(t,e){return Ov(t.getMinutes(),e,2)}function px(t,e){return Ov(t.getSeconds(),e,2)}function gx(t){return 0===(t=t.getDay())?7:t}function fx(t,e){return Ov(nv.count(xv(t)-1,t),e,2)}function mx(t){var e=t.getDay();return 4<=e||0===e?sv(t):sv.ceil(t)}function yx(t,e){return t=mx(t),Ov(sv.count(xv(t),t)+(4===xv(t).getDay()),e,2)}function vx(t){return t.getDay()}function xx(t,e){return Ov(iv.count(xv(t)-1,t),e,2)}function bx(t,e){return Ov(t.getFullYear()%100,e,2)}function wx(t,e){return Ov((t=mx(t)).getFullYear()%100,e,2)}function kx(t,e){return Ov(t.getFullYear()%1e4,e,4)}function Tx(t,e){var r=t.getDay();return Ov((t=4<=r||0===r?sv(t):sv.ceil(t)).getFullYear()%1e4,e,4)}function Ex(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Ov(t/60|0,"0",2)+Ov(t%60,"0",2)}function _x(t,e){return Ov(t.getUTCDate(),e,2)}function Cx(t,e){return Ov(t.getUTCHours(),e,2)}function Sx(t,e){return Ov(t.getUTCHours()%12||12,e,2)}function Ax(t,e){return Ov(1+W2.count(bv(t),t),e,3)}function Lx(t,e){return Ov(t.getUTCMilliseconds(),e,3)}function Nx(t,e){return Lx(t,e)+"000"}function Ix(t,e){return Ov(t.getUTCMonth()+1,e,2)}function Mx(t,e){return Ov(t.getUTCMinutes(),e,2)}function Rx(t,e){return Ov(t.getUTCSeconds(),e,2)}function Dx(t){return 0===(t=t.getUTCDay())?7:t}function Ox(t,e){return Ov(hv.count(bv(t)-1,t),e,2)}function Px(t){var e=t.getUTCDay();return 4<=e||0===e?gv(t):gv.ceil(t)}function Bx(t,e){return t=Px(t),Ov(gv.count(bv(t),t)+(4===bv(t).getUTCDay()),e,2)}function Fx(t){return t.getUTCDay()}function $x(t,e){return Ov(uv.count(bv(t)-1,t),e,2)}function zx(t,e){return Ov(t.getUTCFullYear()%100,e,2)}function Gx(t,e){return Ov((t=Px(t)).getUTCFullYear()%100,e,2)}function Ux(t,e){return Ov(t.getUTCFullYear()%1e4,e,4)}function qx(t,e){var r=t.getUTCDay();return Ov((t=4<=r||0===r?gv(t):gv.ceil(t)).getUTCFullYear()%1e4,e,4)}function Yx(){return"+0000"}function jx(){return"%"}function Hx(t){return+t}function Wx(t){return Math.floor(+t/1e3)}var Vx,Xx,Kx,Zx,Qx=t(()=>{Nv(),Ae(Iv,"localDate"),Ae(Mv,"utcDate"),Ae(Rv,"newDate"),Ae(Dv,"formatLocale"),Vx={"-":"",_:" ",0:"0"},Xx=/^\s*\d+/,Kx=/^%/,Zx=/[\\^$*+?|[\]().{}]/g,Ae(Ov,"pad"),Ae(Pv,"requote"),Ae(Bv,"formatRe"),Ae(Fv,"formatLookup"),Ae($v,"parseWeekdayNumberSunday"),Ae(zv,"parseWeekdayNumberMonday"),Ae(Gv,"parseWeekNumberSunday"),Ae(Uv,"parseWeekNumberISO"),Ae(qv,"parseWeekNumberMonday"),Ae(Yv,"parseFullYear"),Ae(jv,"parseYear"),Ae(Hv,"parseZone"),Ae(Wv,"parseQuarter"),Ae(Vv,"parseMonthNumber"),Ae(Xv,"parseDayOfMonth"),Ae(Kv,"parseDayOfYear"),Ae(Zv,"parseHour24"),Ae(Qv,"parseMinutes"),Ae(Jv,"parseSeconds"),Ae(tx,"parseMilliseconds"),Ae(ex,"parseMicroseconds"),Ae(rx,"parseLiteralPercent"),Ae(nx,"parseUnixTimestamp"),Ae(ix,"parseUnixTimestampSeconds"),Ae(ax,"formatDayOfMonth"),Ae(ox,"formatHour24"),Ae(sx,"formatHour12"),Ae(lx,"formatDayOfYear"),Ae(cx,"formatMilliseconds"),Ae(hx,"formatMicroseconds"),Ae(ux,"formatMonthNumber"),Ae(dx,"formatMinutes"),Ae(px,"formatSeconds"),Ae(gx,"formatWeekdayNumberMonday"),Ae(fx,"formatWeekNumberSunday"),Ae(mx,"dISO"),Ae(yx,"formatWeekNumberISO"),Ae(vx,"formatWeekdayNumberSunday"),Ae(xx,"formatWeekNumberMonday"),Ae(bx,"formatYear"),Ae(wx,"formatYearISO"),Ae(kx,"formatFullYear"),Ae(Tx,"formatFullYearISO"),Ae(Ex,"formatZone"),Ae(_x,"formatUTCDayOfMonth"),Ae(Cx,"formatUTCHour24"),Ae(Sx,"formatUTCHour12"),Ae(Ax,"formatUTCDayOfYear"),Ae(Lx,"formatUTCMilliseconds"),Ae(Nx,"formatUTCMicroseconds"),Ae(Ix,"formatUTCMonthNumber"),Ae(Mx,"formatUTCMinutes"),Ae(Rx,"formatUTCSeconds"),Ae(Dx,"formatUTCWeekdayNumberMonday"),Ae(Ox,"formatUTCWeekNumberSunday"),Ae(Px,"UTCdISO"),Ae(Bx,"formatUTCWeekNumberISO"),Ae(Fx,"formatUTCWeekdayNumberSunday"),Ae($x,"formatUTCWeekNumberMonday"),Ae(zx,"formatUTCYear"),Ae(Gx,"formatUTCYearISO"),Ae(Ux,"formatUTCFullYear"),Ae(qx,"formatUTCFullYearISO"),Ae(Yx,"formatUTCZone"),Ae(jx,"formatLiteralPercent"),Ae(Hx,"formatUnixTimestamp"),Ae(Wx,"formatUnixTimestampSeconds")});function Jx(t){return tb=Dv(t),eb=tb.format,tb.parse,tb.utcFormat,tb.utcParse,tb}var tb,eb,rb=t(()=>{Qx(),Jx({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"]}),Ae(Jx,"defaultLocale")}),nb=t(()=>{rb()});function ib(t){return new Date(t)}function ab(t){return t instanceof Date?+t:+new Date(+t)}function ob(r,n,e,i,a,o,s,l,c,h){var u=S2(),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:s(t)<t?m:o(t)<t?y:i(t)<t?a(t)<t?v:x:e(t)<t?b:w)(t)}return Ae(k,"tickFormat"),u.invert=function(t){return new Date(d(t))},u.domain=function(t){return arguments.length?p(Array.from(t,ab)):p().map(ib)},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:n(e[0],e[e.length-1],t??10))?p(O2(e,t)):u},u.copy=function(){return _2(u,ob(r,n,e,i,a,o,s,l,c,h))},u}function sb(){return c2.apply(ob(Sv,Av,xv,yv,nv,H2,Y2,U2,G2,eb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var lb=t(()=>{Nv(),nb(),L2(),h2(),P2(),Ae(ib,"date"),Ae(ab,"number"),Ae(ob,"calendar"),Ae(sb,"time")}),cb=t(()=>{f2(),D2(),p2(),lb()});function hb(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(6*n,6*++n);return r}var ub,db=t(()=>{Ae(hb,"default")}),pb=t(()=>{db(),ub=hb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),gb=t(()=>{pb()});function fb(t){return Ae(function(){return t},"constant")}var mb=t(()=>{Ae(fb,"default")});function yb(t){return 1<t?0:t<-1?Sb:Math.acos(t)}function vb(t){return 1<=t?Ab:t<=-1?-Ab:Math.asin(t)}var xb,bb,wb,kb,Tb,Eb,_b,Cb,Sb,Ab,Lb,Nb=t(()=>{xb=Math.abs,bb=Math.atan2,wb=Math.cos,kb=Math.max,Tb=Math.min,Eb=Math.sin,_b=Math.sqrt,Cb=1e-12,Sb=Math.PI,Ab=Sb/2,Lb=2*Sb,Ae(yb,"acos"),Ae(vb,"asin")});function Ib(r){let n=3;return r.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);n=e}return r},()=>new cy(n)}var Mb=t(()=>{uy(),Ae(Ib,"withPath")});function Rb(t){return t.innerRadius}function Db(t){return t.outerRadius}function Ob(t){return t.startAngle}function Pb(t){return t.endAngle}function Bb(t){return t&&t.padAngle}function Fb(t,e,r,n,i,a,o,s){var l=(s-=a)*(r-=t)-(o-=i)*(n-=e);if(!(l*l<Cb))return[t+(l=(o*(e-a)-s*(t-i))/l)*r,e+l*n]}function $b(t,e,r,n,i,a,o){var s=(o=(o?a:-a)/_b((l=t-r)*l+(s=e-n)*s))*s,o=-o*l,l=t+s,t=e+o,e=r+s,r=n+o,n=(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)*_b(kb(0,(a=i-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-n)*r+(d=l-c)*d<(h=e-n)*h+(u=t-c)*u&&(e=p,t=l),{cx:e,cy:t,x01:-s,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function zb(){var A=Rb,L=Db,N=fb(0),I=null,M=Ob,R=Pb,D=Bb,O=null,P=Ib(e);function e(){var t,e,r,n,i,a,o,s,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=M.apply(this,arguments)-Ab,_=R.apply(this,arguments)-Ab,C=xb(_-E),S=E<_;if(O=O||(t=P()),T<k&&(e=T,T=k,k=e),Cb<T?Lb-Cb<C?(O.moveTo(T*wb(E),T*Eb(E)),O.arc(0,0,T,E,_,!S),Cb<k&&(O.moveTo(k*wb(_),k*Eb(_)),O.arc(0,0,k,_,E,S))):(n=e=E,i=r=_,o=a=C,h=D.apply(this,arguments)/2,d=Cb<h&&(I?+I.apply(this,arguments):_b(k*k+T*T)),w=b=s=Tb(xb(T-k)/2,+N.apply(this,arguments)),Cb<d&&(u=vb(d/k*Eb(h)),d=vb(d/T*Eb(h)),(a-=2*u)>Cb?(n+=u*=S?1:-1,i-=u):(a=0,n=i=(E+_)/2),(o-=2*d)>Cb?(e+=d*=S?1:-1,r-=d):(o=0,e=r=(E+_)/2)),h=T*wb(e),u=T*Eb(e),d=k*wb(i),E=k*Eb(i),Cb<s&&(p=T*wb(r),g=T*Eb(r),f=k*wb(n),m=k*Eb(n),C<Sb)&&((_=Fb(h,u,f,m,p,g,d,E))?(C=h-_[0],x=u-_[1],y=p-_[0],v=g-_[1],C=1/Eb(yb((C*y+x*v)/(_b(C*C+x*x)*_b(y*y+v*v)))/2),x=_b(_[0]*_[0]+_[1]*_[1]),b=Tb(s,(k-x)/(C-1)),w=Tb(s,(T-x)/(1+C))):b=w=0),Cb<o?Cb<w?(l=$b(f,m,h,u,T,w,S),c=$b(p,g,d,E,T,w,S),O.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?O.arc(l.cx,l.cy,w,bb(l.y01,l.x01),bb(c.y01,c.x01),!S):(O.arc(l.cx,l.cy,w,bb(l.y01,l.x01),bb(l.y11,l.x11),!S),O.arc(0,0,T,bb(l.cy+l.y11,l.cx+l.x11),bb(c.cy+c.y11,c.cx+c.x11),!S),O.arc(c.cx,c.cy,w,bb(c.y11,c.x11),bb(c.y01,c.x01),!S))):(O.moveTo(h,u),O.arc(0,0,T,e,r,!S)):O.moveTo(h,u),Cb<k&&Cb<a?Cb<b?(l=$b(d,E,p,g,k,-b,S),c=$b(h,u,f,m,k,-b,S),O.lineTo(l.cx+l.x01,l.cy+l.y01),b<s?O.arc(l.cx,l.cy,b,bb(l.y01,l.x01),bb(c.y01,c.x01),!S):(O.arc(l.cx,l.cy,b,bb(l.y01,l.x01),bb(l.y11,l.x11),!S),O.arc(0,0,k,bb(l.cy+l.y11,l.cx+l.x11),bb(c.cy+c.y11,c.cx+c.x11),S),O.arc(c.cx,c.cy,b,bb(c.y11,c.x11),bb(c.y01,c.x01),!S))):O.arc(0,0,k,i,n,S):O.lineTo(d,E)):O.moveTo(0,0),O.closePath(),t)return O=null,t+""||null}return Ae(e,"arc"),e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+M.apply(this,arguments)+ +R.apply(this,arguments))/2-Sb/2;return[wb(e)*t,Eb(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:fb(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:fb(+t),e):L},e.cornerRadius=function(t){return arguments.length?(N="function"==typeof t?t:fb(+t),e):N},e.padRadius=function(t){return arguments.length?(I=null==t?null:"function"==typeof t?t:fb(+t),e):I},e.startAngle=function(t){return arguments.length?(M="function"==typeof t?t:fb(+t),e):M},e.endAngle=function(t){return arguments.length?(R="function"==typeof t?t:fb(+t),e):R},e.padAngle=function(t){return arguments.length?(D="function"==typeof t?t:fb(+t),e):D},e.context=function(t){return arguments.length?(O=t??null,e):O},e}var Gb=t(()=>{mb(),Nb(),Mb(),Ae(Rb,"arcInnerRadius"),Ae(Db,"arcOuterRadius"),Ae(Ob,"arcStartAngle"),Ae(Pb,"arcEndAngle"),Ae(Bb,"arcPadAngle"),Ae(Fb,"intersect"),Ae($b,"cornerTangents"),Ae(zb,"default")});function Ub(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var qb=t(()=>{Array.prototype.slice,Ae(Ub,"default")});function Yb(t){this._context=t}function jb(t){return new Yb(t)}var Hb=t(()=>{Ae(Yb,"Linear"),Yb.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(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")},Ae(jb,"default")});function Wb(t){return t[0]}function Vb(t){return t[1]}var Xb=t(()=>{Ae(Wb,"x"),Ae(Vb,"y")});function Kb(o,s){var l=fb(!0),c=null,h=jb,u=null,d=Ib(e);function e(t){var e,r,n,i=(t=Ub(t)).length,a=!1;for(null==c&&(u=h(n=d())),e=0;e<=i;++e)!(e<i&&l(r=t[e],e,t))===a&&((a=!a)?u.lineStart():u.lineEnd()),a&&u.point(+o(r,e,t),+s(r,e,t));if(n)return u=null,n+""||null}return o="function"==typeof o?o:void 0===o?Wb:fb(o),s="function"==typeof s?s:void 0===s?Vb:fb(s),Ae(e,"line"),e.x=function(t){return arguments.length?(o="function"==typeof t?t:fb(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:fb(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:fb(!!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 Zb=t(()=>{qb(),mb(),Hb(),Mb(),Xb(),Ae(Kb,"default")});function Qb(t,e){return e<t?-1:t<e?1:t<=e?0:NaN}var Jb=t(()=>{Ae(Qb,"default")});function t4(t){return t}var e4=t(()=>{Ae(t4,"default")});function r4(){var p=t4,g=Qb,f=null,m=fb(0),y=fb(Lb),v=fb(0);function e(r){for(var t,e,n,i=(r=Ub(r)).length,a=0,o=new Array(i),s=new Array(i),l=+m.apply(this,arguments),c=Math.min(Lb,Math.max(-Lb,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d<i;++d)0<(n=s[o[d]=d]=+p(r[d],d,r))&&(a+=n);for(null!=g?o.sort(function(t,e){return g(s[t],s[e])}):null!=f&&o.sort(function(t,e){return f(r[t],r[e])}),d=0,t=a?(c-i*u)/a:0;d<i;++d,l=e)e=o[d],n=s[e],s[e]={data:r[e],index:d,value:n,startAngle:l,endAngle:e=l+(0<n?n*t:0)+u,padAngle:h};return s}return Ae(e,"pie"),e.value=function(t){return arguments.length?(p="function"==typeof t?t:fb(+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:fb(+t),e):m},e.endAngle=function(t){return arguments.length?(y="function"==typeof t?t:fb(+t),e):y},e.padAngle=function(t){return arguments.length?(v="function"==typeof t?t:fb(+t),e):v},e}var n4=t(()=>{qb(),mb(),Jb(),e4(),Nb(),Ae(r4,"default")});function i4(t){return new o4(t,!0)}function a4(t){return new o4(t,!1)}var o4,s4=t(()=>{o4=class{static{Ae(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}},Ae(i4,"bumpX"),Ae(a4,"bumpY")});function l4(){}var c4=t(()=>{Ae(l4,"default")});function h4(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 u4(t){this._context=t}function d4(t){return new u4(t)}var p4=t(()=>{Ae(h4,"point"),Ae(u4,"Basis"),u4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 3:h4(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:Ae(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:h4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(d4,"default")});function g4(t){this._context=t}function f4(t){return new g4(t)}var m4=t(()=>{c4(),p4(),Ae(g4,"BasisClosed"),g4.prototype={areaStart:l4,areaEnd:l4,lineStart:Ae(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:Ae(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:Ae(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:h4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(f4,"default")});function y4(t){this._context=t}function v4(t){return new y4(t)}var x4=t(()=>{p4(),Ae(y4,"BasisOpen"),y4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:h4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(v4,"default")});function b4(t,e){this._basis=new u4(t),this._beta=e}var w4,k4=t(()=>{p4(),Ae(b4,"Bundle"),b4.prototype={lineStart:Ae(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:Ae(function(){var t=this._x,e=this._y,r=t.length-1;if(0<r)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*t[l]+(1-this._beta)*(i+(n=l/r)*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:Ae(function(t,e){this._x.push(+t),this._y.push(+e)},"point")},w4=Ae(function e(r){function t(t){return 1===r?new u4(t):new b4(t,r)}return Ae(t,"bundle"),t.beta=function(t){return e(+t)},t},"custom")(.85)});function T4(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 E4(t,e){this._context=t,this._k=(1-e)/6}var _4,C4=t(()=>{Ae(T4,"point"),Ae(E4,"Cardinal"),E4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T4(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(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:T4(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")},_4=Ae(function e(r){function t(t){return new E4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function S4(t,e){this._context=t,this._k=(1-e)/6}var A4,L4=t(()=>{c4(),C4(),Ae(S4,"CardinalClosed"),S4.prototype={areaStart:l4,areaEnd:l4,lineStart:Ae(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:Ae(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:Ae(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:T4(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")},A4=Ae(function e(r){function t(t){return new S4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function N4(t,e){this._context=t,this._k=(1-e)/6}var I4,M4=t(()=>{C4(),Ae(N4,"CardinalOpen"),N4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(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:T4(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")},I4=Ae(function e(r){function t(t){return new N4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function R4(t,e,r){var n,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>Cb&&(n=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*n-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*n-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>Cb&&(n=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*n+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*n+t._y1*t._l23_2a-r*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function D4(t,e){this._context=t,this._alpha=e}var O4,P4=t(()=>{Nb(),C4(),Ae(R4,"point"),Ae(D4,"CatmullRom"),D4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(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:Ae(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:Ae(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:R4(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")},O4=Ae(function e(r){function t(t){return r?new D4(t,r):new E4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function B4(t,e){this._context=t,this._alpha=e}var F4,$4=t(()=>{L4(),c4(),P4(),Ae(B4,"CatmullRomClosed"),B4.prototype={areaStart:l4,areaEnd:l4,lineStart:Ae(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:Ae(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:Ae(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:R4(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")},F4=Ae(function e(r){function t(t){return r?new B4(t,r):new S4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function z4(t,e){this._context=t,this._alpha=e}var G4,U4=t(()=>{M4(),P4(),Ae(z4,"CatmullRomOpen"),z4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(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:Ae(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:R4(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")},G4=Ae(function e(r){function t(t){return r?new z4(t,r):new N4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function q4(t){this._context=t}function Y4(t){return new q4(t)}var j4=t(()=>{c4(),Ae(q4,"LinearClosed"),q4.prototype={areaStart:l4,areaEnd:l4,lineStart:Ae(function(){this._point=0},"lineStart"),lineEnd:Ae(function(){this._point&&this._context.closePath()},"lineEnd"),point:Ae(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},Ae(Y4,"default")});function H4(t){return t<0?-1:1}function W4(t,e,r){var n=t._x1-t._x0,e=e-t._x1,i=(t._y1-t._y0)/(n||e<0&&-0),t=(i*e+(r=(r-t._y1)/(e||n<0&&-0))*n)/(n+e);return(H4(i)+H4(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function V4(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function X4(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function K4(t){this._context=t}function Z4(t){this._context=new Q4(t)}function Q4(t){this._context=t}function J4(t){return new K4(t)}function t3(t){return new Z4(t)}var e3=t(()=>{Ae(H4,"sign"),Ae(W4,"slope3"),Ae(V4,"slope2"),Ae(X4,"point"),Ae(K4,"MonotoneX"),K4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:X4(this,this._t0,V4(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(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,X4(this,V4(this,r=W4(this,t,e)),r);break;default:X4(this,this._t0,r=W4(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},Ae(Z4,"MonotoneY"),(Z4.prototype=Object.create(K4.prototype)).point=function(t,e){K4.prototype.point.call(this,e,t)},Ae(Q4,"ReflectContext"),Q4.prototype={moveTo:Ae(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:Ae(function(){this._context.closePath()},"closePath"),lineTo:Ae(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:Ae(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")},Ae(J4,"monotoneX"),Ae(t3,"monotoneY")});function r3(t){this._context=t}function n3(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(a[i[0]=0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/a[e-1],a[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/a[n-1],e=n-2;0<=e;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function i3(t){return new r3(t)}var a3=t(()=>{Ae(r3,"Natural"),r3.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:Ae(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 n=n3(t),i=n3(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:Ae(function(t,e){this._x.push(+t),this._y.push(+e)},"point")},Ae(n3,"controlPoints"),Ae(i3,"default")});function o3(t,e){this._context=t,this._t=e}function s3(t){return new o3(t,.5)}function l3(t){return new o3(t,0)}function c3(t){return new o3(t,1)}var h3=t(()=>{Ae(o3,"Step"),o3.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:Ae(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:Ae(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")},Ae(s3,"default"),Ae(l3,"stepBefore"),Ae(c3,"stepAfter")}),u3=t(()=>{Gb(),Zb(),n4(),m4(),x4(),p4(),s4(),k4(),L4(),M4(),C4(),$4(),U4(),P4(),j4(),Hb(),e3(),a3(),h3()}),d3=t(()=>{}),p3=t(()=>{});function g3(t,e,r){this.k=t,this.x=e,this.y=r}function f3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return m3;return t.__zoom}var m3,y3,v3,x3,b3,w3,k3,T3,E3,_3,C3,S3,A3,L3,N3,I3,M3,R3,D3,O3,P3,B3,F3,$3,z3,G3,U3,q3,Y3,j3,H3,W3,V3=t(()=>{Ae(g3,"Transform"),g3.prototype={constructor:g3,scale:Ae(function(t){return 1===t?this:new g3(this.k*t,this.x,this.y)},"scale"),translate:Ae(function(t,e){return 0===t&0===e?this:new g3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:Ae(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:Ae(function(t){return t*this.k+this.x},"applyX"),applyY:Ae(function(t){return t*this.k+this.y},"applyY"),invert:Ae(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:Ae(function(t){return(t-this.x)/this.k},"invertX"),invertY:Ae(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:Ae(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:Ae(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:Ae(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},m3=new g3(1,0,0),f3.prototype=g3.prototype,Ae(f3,"transform")}),X3=t(()=>{}),K3=t(()=>{Ym(),d3(),p3(),V3(),X3()}),Z3=t(()=>{K3(),V3()}),Q3=t(()=>{Kh(),hu(),ey(),dy(),v1(),py(),gy(),wu(),pp(),fy(),Fm(),my(),vy(),i2(),a2(),o2(),yg(),uy(),s2(),yy(),l2(),cb(),gb(),dp(),u3(),Nv(),nb(),Gg(),Ym(),Z3()}),J3=jMt(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=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),t5=jMt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=J3();function o(t){return-1<a.relativeFirstCharacters.indexOf(t[0])}function s(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,n,i=c(t.trim());(e=(i=c(i=s(i).replace(a.htmlCtrlEntityRegex,"").replace(a.ctrlCharactersRegex,"").replace(a.whitespaceEscapeCharsRegex,"").trim())).match(a.ctrlCharactersRegex)||i.match(a.htmlEntitiesRegex)||i.match(a.htmlCtrlEntityRegex)||i.match(a.whitespaceEscapeCharsRegex))&&0<e.length;);return(t=i)?!o(t)&&(n=(r=t.trimStart()).match(a.urlSchemeRegex))?(n=n[0].toLowerCase().trim(),a.invalidProtocolRegex.test(n)?a.BLANK_URL:(r=r.replace(/\\/g,"/"),"mailto:"===n||n.includes("://")||"http:"!==n&&"https:"!==n?r:l(r)?((n=new URL(r)).protocol=n.protocol.toLowerCase(),n.hostname=n.hostname.toLowerCase(),n.toString()):a.BLANK_URL)):t:a.BLANK_URL}Ae(o,"isRelativeUrlWithoutProtocol"),Ae(s,"decodeHtmlCharacters"),Ae(l,"isValidUrl"),Ae(c,"decodeURI"),Ae(e,"sanitizeUrl"),t.sanitizeUrl=e}),e5=t(()=>{y3=rt(t5(),1),tc(),v3=Ae((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 n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),x3=Ae((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"},v3(t,e).lower()},"drawBackgroundRect"),b3=Ae((t,e)=>{var r=e.text.replace(kl," "),n=((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 n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),w3=Ae((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,y3.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),k3=Ae((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,y3.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),T3=Ae(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),E3=Ae(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),r5=t(()=>{function e(t,e,r,n,i,a,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),o)}function l(t,e,r,n,i,a,o,s){var{fontSize:l,fontFamily:c,fontWeight:h}=s,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).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,o)}}function r(t,e,r,n,i,a,o,s){(a=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),l(t,e,r,n,i,0,o,s),g(a,o)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}tc(),e5(),_3=rt(t5(),1),C3=Ae(function(t,e){return v3(t,e)},"drawRect"),S3=Ae(function(t,e,r,n,i,a){(t=t.append("image")).attr("width",e),t.attr("height",r),t.attr("x",n),t.attr("y",i),e=a.startsWith("data:image/png;base64")?a:(0,_3.sanitizeUrl)(a),t.attr("xlink:href",e)},"drawImage"),A3=Ae((t,e,r)=>{let n=t.append("g"),i=0;for(var a of e){var o,s=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((o=n.append("line")).attr("x1",a.startPoint.x),o.attr("y1",a.startPoint.y),o.attr("x2",a.endPoint.x),o.attr("y2",a.endPoint.y),o.attr("stroke-width","1"),o.attr("stroke",l),o.style("fill","none"),"rel_b"!==a.type&&o.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||o.attr("marker-start","url(#arrowend)"),i=-1):((o=n.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&&o.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||o.attr("marker-start","url(#arrowend)")),r.messageFont());z3(r)(a.label.text,n,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:s},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),z3(r)("["+a.techn.text+"]",n,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:s,"font-style":"italic"},l))}},"drawRels"),L3=Ae(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",o=e.fontColor||"black",s={"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(e.nodeType&&(s={"stroke-width":1}),t={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:s},C3(n,t),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=o,z3(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=o,z3(r)(e.type.text,n,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=o,z3(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),N3=Ae(function(t,e,r){let n=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.fontColor||"#FFFFFF",o="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":o="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":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var s=t.append("g"),l=(s.attr("class","person-man"),T3());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=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},C3(s,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":s.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).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)),s.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).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":s.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).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)),s.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).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=$3(r,e.typeC4Shape.text),s.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":S3(s,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,z3(r)(e.label.text,s,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?z3(r)(e.techn.text,s,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&z3(r)(e.type.text,s,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,z3(r)(e.descr.text,s,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),I3=Ae(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"),M3=Ae(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=Ae(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"),D3=Ae(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"),O3=Ae(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"),P3=Ae(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"),B3=Ae(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"),F3=Ae(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"),$3=Ae((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Ae(e,"byText"),Ae(l,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),z3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},G3={drawRect:C3,drawBoundary:L3,drawC4Shape:N3,drawRels:A3,drawImage:S3,insertArrowHead:D3,insertArrowEnd:O3,insertArrowFilledHead:P3,insertDynamicNumber:B3,insertArrowCrossHead:F3,insertDatabaseIcon:I3,insertComputerIcon:M3,insertClockIcon:R3}}),n5=t(()=>{U3="object"==typeof global&&global&&global.Object===Object&&global,q3=U3}),i5=t(()=>{n5(),Y3="object"==typeof self&&self&&self.Object===Object&&self,Y3=q3||Y3||Function("return this")(),j3=Y3}),a5=t(()=>{i5(),H3=j3.Symbol,W3=H3});function o5(t){var e=l5.call(t,h5),r=t[h5];try{var n=!(t[h5]=void 0)}catch{}var i=c5.call(t);return n&&(e?t[h5]=r:delete t[h5]),i}var s5,l5,c5,h5,u5,d5=t(()=>{a5(),s5=Object.prototype,l5=s5.hasOwnProperty,c5=s5.toString,h5=W3?W3.toStringTag:void 0,Ae(o5,"getRawTag"),u5=o5});function p5(t){return f5.call(t)}var g5,f5,m5,y5=t(()=>{g5=Object.prototype,f5=g5.toString,Ae(p5,"objectToString"),m5=p5});function v5(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(x5&&x5 in Object(t)?u5:m5)(t)}var x5,b5,w5=t(()=>{a5(),d5(),y5(),x5=W3?W3.toStringTag:void 0,Ae(v5,"baseGetTag"),b5=v5});function k5(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var T5,E5=t(()=>{Ae(k5,"isObject"),T5=k5});function _5(t){return!!T5(t)&&("[object Function]"==(t=b5(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var C5,S5,A5,L5=t(()=>{w5(),E5(),Ae(_5,"isFunction"),C5=_5}),N5=t(()=>{i5(),S5=j3["__core-js_shared__"],A5=S5});function I5(t){return!!M5&&M5 in t}var M5,R5,D5=t(()=>{var t;N5(),t=/[^.]+$/.exec(A5&&A5.keys&&A5.keys.IE_PROTO||""),M5=t?"Symbol(src)_1."+t:"",Ae(I5,"isMasked"),R5=I5});function O5(t){if(null!=t){try{return B5.call(t)}catch{}try{return t+""}catch{}}return""}var P5,B5,F5,$5=t(()=>{P5=Function.prototype,B5=P5.toString,Ae(O5,"toSource"),F5=O5});function z5(t){return!(!T5(t)||R5(t))&&(C5(t)?j5:U5).test(F5(t))}var G5,U5,q5,Y5,j5,H5,W5=t(()=>{L5(),D5(),E5(),$5(),G5=/[\\^$.*+?()[\]{}|]/g,U5=/^\[object .+?Constructor\]$/,q5=Function.prototype,Y5=Object.prototype,q5=q5.toString,Y5=Y5.hasOwnProperty,j5=RegExp("^"+q5.call(Y5).replace(G5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae(z5,"baseIsNative"),H5=z5});function V5(t,e){return t?.[e]}var X5,K5=t(()=>{Ae(V5,"getValue"),X5=V5});function Z5(t,e){return t=X5(t,e),H5(t)?t:void 0}var Q5,J5,t6,e6=t(()=>{W5(),K5(),Ae(Z5,"getNative"),Q5=Z5}),r6=t(()=>{e6(),J5=Q5(Object,"create"),t6=J5});function n6(){this.__data__=t6?t6(null):{},this.size=0}var i6,a6=t(()=>{r6(),Ae(n6,"hashClear"),i6=n6});function o6(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var s6,l6=t(()=>{Ae(o6,"hashDelete"),s6=o6});function c6(t){var e,r=this.__data__;return t6?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:u6.call(r,t)?r[t]:void 0}var h6,u6,d6,p6=t(()=>{r6(),h6=Object.prototype,u6=h6.hasOwnProperty,Ae(c6,"hashGet"),d6=c6});function g6(t){var e=this.__data__;return t6?void 0!==e[t]:m6.call(e,t)}var f6,m6,y6,v6=t(()=>{r6(),f6=Object.prototype,m6=f6.hasOwnProperty,Ae(g6,"hashHas"),y6=g6});function x6(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=t6&&void 0===e?"__lodash_hash_undefined__":e,this}var b6,w6=t(()=>{r6(),Ae(x6,"hashSet"),b6=x6});function k6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var T6,E6=t(()=>{a6(),l6(),p6(),v6(),w6(),Ae(k6,"Hash"),k6.prototype.clear=i6,k6.prototype.delete=s6,k6.prototype.get=d6,k6.prototype.has=y6,k6.prototype.set=b6,T6=k6});function _6(){this.__data__=[],this.size=0}var C6,S6=t(()=>{Ae(_6,"listCacheClear"),C6=_6});function A6(t,e){return t===e||t!=t&&e!=e}var L6,N6=t(()=>{Ae(A6,"eq"),L6=A6});function I6(t,e){for(var r=t.length;r--;)if(L6(t[r][0],e))return r;return-1}var M6,R6=t(()=>{N6(),Ae(I6,"assocIndexOf"),M6=I6});function D6(t){var e=this.__data__;return!((t=M6(e,t))<0||(t==e.length-1?e.pop():P6.call(e,t,1),--this.size,0))}var O6,P6,B6,F6=t(()=>{R6(),O6=Array.prototype,P6=O6.splice,Ae(D6,"listCacheDelete"),B6=D6});function $6(t){var e=this.__data__;return(t=M6(e,t))<0?void 0:e[t][1]}var z6,G6=t(()=>{R6(),Ae($6,"listCacheGet"),z6=$6});function U6(t){return-1<M6(this.__data__,t)}var q6,Y6=t(()=>{R6(),Ae(U6,"listCacheHas"),q6=U6});function j6(t,e){var r=this.__data__,n=M6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var H6,W6=t(()=>{R6(),Ae(j6,"listCacheSet"),H6=j6});function V6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var X6,K6,Z6,Q6=t(()=>{S6(),F6(),G6(),Y6(),W6(),Ae(V6,"ListCache"),V6.prototype.clear=C6,V6.prototype.delete=B6,V6.prototype.get=z6,V6.prototype.has=q6,V6.prototype.set=H6,X6=V6}),J6=t(()=>{e6(),i5(),K6=Q5(j3,"Map"),Z6=K6});function tw(){this.size=0,this.__data__={hash:new T6,map:new(Z6||X6),string:new T6}}var ew,rw=t(()=>{E6(),Q6(),J6(),Ae(tw,"mapCacheClear"),ew=tw});function nw(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var iw,aw=t(()=>{Ae(nw,"isKeyable"),iw=nw});function ow(t,e){return t=t.__data__,iw(e)?t["string"==typeof e?"string":"hash"]:t.map}var sw,lw=t(()=>{aw(),Ae(ow,"getMapData"),sw=ow});function cw(t){return t=sw(this,t).delete(t),this.size-=t?1:0,t}var hw,uw=t(()=>{lw(),Ae(cw,"mapCacheDelete"),hw=cw});function dw(t){return sw(this,t).get(t)}var pw,gw=t(()=>{lw(),Ae(dw,"mapCacheGet"),pw=dw});function fw(t){return sw(this,t).has(t)}var mw,yw=t(()=>{lw(),Ae(fw,"mapCacheHas"),mw=fw});function vw(t,e){var r=sw(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var xw,bw=t(()=>{lw(),Ae(vw,"mapCacheSet"),xw=vw});function ww(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var kw,Tw=t(()=>{rw(),uw(),gw(),yw(),bw(),Ae(ww,"MapCache"),ww.prototype.clear=ew,ww.prototype.delete=hw,ww.prototype.get=pw,ww.prototype.has=mw,ww.prototype.set=xw,kw=ww});function Ew(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(_w);var a=Ae(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(Ew.Cache||kw),a}var _w,Cw,Sw=t(()=>{Tw(),_w="Expected a function",Ae(Ew,"memoize"),Ew.Cache=kw,Cw=Ew});function Aw(){this.__data__=new X6,this.size=0}var Lw,Nw=t(()=>{Q6(),Ae(Aw,"stackClear"),Lw=Aw});function Iw(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Mw,Rw=t(()=>{Ae(Iw,"stackDelete"),Mw=Iw});function Dw(t){return this.__data__.get(t)}var Ow,Pw=t(()=>{Ae(Dw,"stackGet"),Ow=Dw});function Bw(t){return this.__data__.has(t)}var Fw,$w=t(()=>{Ae(Bw,"stackHas"),Fw=Bw});function zw(t,e){var r=this.__data__;if(r instanceof X6){var n=r.__data__;if(!Z6||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new kw(n)}return r.set(t,e),this.size=r.size,this}var Gw,Uw=t(()=>{Q6(),J6(),Tw(),Ae(zw,"stackSet"),Gw=zw});function qw(t){t=this.__data__=new X6(t),this.size=t.size}var Yw,jw,Hw,Ww=t(()=>{Q6(),Nw(),Rw(),Pw(),$w(),Uw(),Ae(qw,"Stack"),qw.prototype.clear=Lw,qw.prototype.delete=Mw,qw.prototype.get=Ow,qw.prototype.has=Fw,qw.prototype.set=Gw,Yw=qw}),Vw=t(()=>{e6(),jw=function(){try{var t=Q5(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Hw=jw});function Xw(t,e,r){"__proto__"==e&&Hw?Hw(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Kw,Zw=t(()=>{Vw(),Ae(Xw,"baseAssignValue"),Kw=Xw});function Qw(t,e,r){(void 0===r||L6(t[e],r))&&(void 0!==r||e in t)||Kw(t,e,r)}var Jw,tk=t(()=>{Zw(),N6(),Ae(Qw,"assignMergeValue"),Jw=Qw});function ek(l){return function(t,e,r){for(var n=-1,i=Object(t),a=r(t),o=a.length;o--;){var s=a[l?o:++n];if(!1===e(i[s],s,i))break}return t}}var rk,nk,ik,ak=t(()=>{Ae(ek,"createBaseFor"),rk=ek}),ok=t(()=>{ak(),nk=rk(),ik=nk});function sk(t,e){return e?t.slice():(e=t.length,e=hk?hk(e):new t.constructor(e),t.copy(e),e)}var lk,ck,hk,uk,dk,pk,gk=t(()=>{i5(),lk="object"==typeof exports&&exports&&!exports.nodeType&&exports,ck=(ck=lk&&"object"==typeof module&&module&&!module.nodeType&&module)&&ck.exports===lk?j3.Buffer:void 0,hk=ck?ck.allocUnsafe:void 0,Ae(sk,"cloneBuffer"),uk=sk}),fk=t(()=>{i5(),dk=j3.Uint8Array,pk=dk});function mk(t){var e=new t.constructor(t.byteLength);return new pk(e).set(new pk(t)),e}var yk,vk=t(()=>{fk(),Ae(mk,"cloneArrayBuffer"),yk=mk});function xk(t,e){return e=e?yk(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var bk,wk=t(()=>{vk(),Ae(xk,"cloneTypedArray"),bk=xk});function kk(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r<n;)e[r]=t[r];return e}var Tk,Ek,_k,Ck=t(()=>{Ae(kk,"copyArray"),Tk=kk}),Sk=t(()=>{function e(){}E5(),Ek=Object.create,Ae(e,"object"),_k=function(t){return T5(t)?Ek?Ek(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function Ak(e,r){return function(t){return e(r(t))}}var Lk,Nk,Ik,Mk=t(()=>{Ae(Ak,"overArg"),Lk=Ak}),Rk=t(()=>{Mk(),Nk=Lk(Object.getPrototypeOf,Object),Ik=Nk});function Dk(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ok)}var Ok,Pk,Bk=t(()=>{Ok=Object.prototype,Ae(Dk,"isPrototype"),Pk=Dk});function Fk(t){return"function"!=typeof t.constructor||Pk(t)?{}:_k(Ik(t))}var $k,zk=t(()=>{Sk(),Rk(),Bk(),Ae(Fk,"initCloneObject"),$k=Fk});function Gk(t){return null!=t&&"object"==typeof t}var Uk,qk=t(()=>{Ae(Gk,"isObjectLike"),Uk=Gk});function Yk(t){return Uk(t)&&"[object Arguments]"==b5(t)}var jk,Hk,Wk,Vk,Xk,Kk,Zk,Qk=t(()=>{w5(),qk(),Ae(Yk,"baseIsArguments"),jk=Yk}),Jk=t(()=>{Qk(),qk(),Vk=Object.prototype,Hk=Vk.hasOwnProperty,Wk=Vk.propertyIsEnumerable,Vk=jk(function(){return arguments}())?jk:function(t){return Uk(t)&&Hk.call(t,"callee")&&!Wk.call(t,"callee")},Xk=Vk}),t7=t(()=>{Kk=Array.isArray,Zk=Kk});function e7(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}var r7,n7=t(()=>{Ae(e7,"isLength"),r7=e7});function i7(t){return null!=t&&r7(t.length)&&!C5(t)}var a7,o7=t(()=>{L5(),n7(),Ae(i7,"isArrayLike"),a7=i7});function s7(t){return Uk(t)&&a7(t)}var l7,c7=t(()=>{o7(),qk(),Ae(s7,"isArrayLikeObject"),l7=s7});function h7(){return!1}var u7,d7,p7,g7,f7=t(()=>{Ae(h7,"stubFalse"),u7=h7}),m7=t(()=>{i5(),f7(),p7="object"==typeof exports&&exports&&!exports.nodeType&&exports,d7=(d7=p7&&"object"==typeof module&&module&&!module.nodeType&&module)&&d7.exports===p7?j3.Buffer:void 0,p7=d7?d7.isBuffer:void 0,g7=p7||u7});function y7(t){return!(!Uk(t)||"[object Object]"!=b5(t))&&(null===(t=Ik(t))||"function"==typeof(t=w7.call(t,"constructor")&&t.constructor)&&t instanceof t&&b7.call(t)==k7)}var v7,x7,b7,w7,k7,T7,E7=t(()=>{w5(),Rk(),qk(),v7=Function.prototype,x7=Object.prototype,b7=v7.toString,w7=x7.hasOwnProperty,k7=b7.call(Object),Ae(y7,"isPlainObject"),T7=y7});function _7(t){return Uk(t)&&r7(t.length)&&!!C7[b5(t)]}var C7,S7,A7=t(()=>{w5(),n7(),qk(),(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,Ae(_7,"baseIsTypedArray"),S7=_7});function L7(e){return function(t){return e(t)}}var N7,I7,M7,R7,D7,O7,P7,B7=t(()=>{Ae(L7,"baseUnary"),N7=L7}),F7=t(()=>{n5(),R7="object"==typeof exports&&exports&&!exports.nodeType&&exports,I7=R7&&"object"==typeof module&&module&&!module.nodeType&&module,R7=I7&&I7.exports===R7,M7=R7&&q3.process,R7=function(){try{return I7&&I7.require&&I7.require("util").types||M7&&M7.binding&&M7.binding("util")}catch{}}(),D7=R7}),$7=t(()=>{A7(),B7(),F7(),O7=(O7=D7&&D7.isTypedArray)?N7(O7):S7,P7=O7});function z7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var G7,U7=t(()=>{Ae(z7,"safeGet"),G7=z7});function q7(t,e,r){var n=t[e];j7.call(t,e)&&L6(n,r)&&(void 0!==r||e in t)||Kw(t,e,r)}var Y7,j7,H7,W7=t(()=>{Zw(),N6(),Y7=Object.prototype,j7=Y7.hasOwnProperty,Ae(q7,"assignValue"),H7=q7});function V7(t,e,r,n){var i=!r;r=r||{};for(var a=-1,o=e.length;++a<o;){var s=e[a],l=n?n(r[s],t[s],s,r,t):void 0;void 0===l&&(l=t[s]),(i?Kw:H7)(r,s,l)}return r}var X7,K7=t(()=>{W7(),Zw(),Ae(V7,"copyObject"),X7=V7});function Z7(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Q7,J7=t(()=>{Ae(Z7,"baseTimes"),Q7=Z7});function tT(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&eT.test(t))&&-1<t&&t%1==0&&t<e}var eT,rT,nT=t(()=>{eT=/^(?:0|[1-9]\d*)$/,Ae(tT,"isIndex"),rT=tT});function iT(t,e){var r,n=Zk(t),i=!n&&Xk(t),a=!n&&!i&&g7(t),o=!n&&!i&&!a&&P7(t),s=n||i||a||o,l=s?Q7(t.length,String):[],c=l.length;for(r in t)!e&&!oT.call(t,r)||s&&("length"==r||a&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||rT(r,c))||l.push(r);return l}var aT,oT,sT,lT=t(()=>{J7(),Jk(),t7(),m7(),nT(),$7(),aT=Object.prototype,oT=aT.hasOwnProperty,Ae(iT,"arrayLikeKeys"),sT=iT});function cT(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var hT,uT=t(()=>{Ae(cT,"nativeKeysIn"),hT=cT});function dT(t){if(!T5(t))return hT(t);var e,r=Pk(t),n=[];for(e in t)("constructor"!=e||!r&&gT.call(t,e))&&n.push(e);return n}var pT,gT,fT,mT=t(()=>{E5(),Bk(),uT(),pT=Object.prototype,gT=pT.hasOwnProperty,Ae(dT,"baseKeysIn"),fT=dT});function yT(t){return a7(t)?sT(t,!0):fT(t)}var vT,xT=t(()=>{lT(),mT(),o7(),Ae(yT,"keysIn"),vT=yT});function bT(t){return X7(t,vT(t))}var wT,kT=t(()=>{K7(),xT(),Ae(bT,"toPlainObject"),wT=bT});function TT(t,e,r,n,i,a,o){var s,l,c,h=G7(t,r),u=G7(e,r),d=o.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,o):void 0))&&(l=!(s=Zk(u))&&g7(u),c=!s&&!l&&P7(u),d=u,s||l||c?d=Zk(h)?h:l7(h)?Tk(h):l?uk(u,!(e=!1)):c?bk(u,!(e=!1)):[]:T7(u)||Xk(u)?Xk(d=h)?d=wT(h):T5(h)&&!C5(h)||(d=$k(u)):e=!1),e&&(o.set(u,d),i(d,u,n,a,o),o.delete(u))),Jw(t,r,d)}var ET,_T=t(()=>{tk(),gk(),wk(),Ck(),zk(),Jk(),t7(),c7(),m7(),L5(),E5(),E7(),$7(),U7(),kT(),Ae(TT,"baseMergeDeep"),ET=TT});function CT(n,i,a,o,s){n!==i&&ik(i,function(t,e){var r;s=s||new Yw,T5(t)?ET(n,i,e,a,CT,o,s):(r=o?o(G7(n,e),t,e+"",n,i,s):void 0,Jw(n,e,void 0===r?t:r))},vT)}var ST,AT=t(()=>{Ww(),tk(),ok(),_T(),E5(),xT(),U7(),Ae(CT,"baseMerge"),ST=CT});function LT(t){return t}var NT,IT=t(()=>{Ae(LT,"identity"),NT=LT});function MT(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 RT,DT=t(()=>{Ae(MT,"apply"),RT=MT});function OT(a,o,s){return o=PT(void 0===o?a.length-1:o,0),function(){for(var t=arguments,e=-1,r=PT(t.length-o,0),n=Array(r);++e<r;)n[e]=t[o+e];for(var e=-1,i=Array(o+1);++e<o;)i[e]=t[e];return i[o]=s(n),RT(a,this,i)}}var PT,BT,FT=t(()=>{DT(),PT=Math.max,Ae(OT,"overRest"),BT=OT});function $T(t){return function(){return t}}var zT,GT,UT=t(()=>{Ae($T,"constant"),zT=$T}),qT=t(()=>{UT(),Vw(),IT(),GT=Hw?function(t,e){return Hw(t,"toString",{configurable:!0,enumerable:!1,value:zT(e),writable:!0})}:NT});function YT(r){var n=0,i=0;return function(){var t=jT(),e=16-(t-i);if(i=t,0<e){if(800<=++n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}var jT,HT,WT,VT,XT=t(()=>{jT=Date.now,Ae(YT,"shortOut"),HT=YT}),KT=t(()=>{qT(),XT(),WT=HT(GT),VT=WT});function ZT(t,e){return VT(BT(t,e,NT),t+"")}var QT,JT=t(()=>{IT(),FT(),KT(),Ae(ZT,"baseRest"),QT=ZT});function t8(t,e,r){var n;return!!T5(r)&&!!("number"==(n=typeof e)?a7(r)&&rT(e,r.length):"string"==n&&e in r)&&L6(r[e],t)}var e8,r8=t(()=>{N6(),o7(),nT(),E5(),Ae(t8,"isIterateeCall"),e8=t8});function n8(s){return QT(function(t,e){var r=-1,n=e.length,i=1<n?e[n-1]:void 0,a=2<n?e[2]:void 0,i=3<s.length&&"function"==typeof i?(n--,i):void 0;for(a&&e8(e[0],e[1],a)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var o=e[r];o&&s(t,o,r,i)}return t})}var i8,a8,o8,s8=t(()=>{JT(),r8(),Ae(n8,"createAssigner"),i8=n8}),l8=t(()=>{AT(),s8(),a8=i8(function(t,e,r){ST(t,e,r)}),o8=a8});function c8(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),T8[t]??e):e}function h8(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,w8.sanitizeUrl)(t):t}function u8(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function d8(t){let e,r=0;t.forEach(t=>{r+=u8(t,e),e=t});var n=r/2;return I8(t,n)}function p8(t){return 1===t.length?t[0]:d8(t)}function g8(t,e,r){var r=structuredClone(r),n=(R.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),n=I8(r,n),t=10+.5*t,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(i+Math.PI)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*t+(r[0].y+n.y)/2):"end_right"===e?(a.x=Math.sin(i-Math.PI)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*t+(r[0].y+n.y)/2-5):"end_left"===e?(a.x=Math.sin(i)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2),a}function f8(t){let e="",r="";for(var n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function m8(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t<e;t++)r+=n.charAt(Math.floor(Math.random()*i));return r}function y8(t,e){return z8(t,e).height}function v8(t,e){return z8(t,e).width}function x8(t){return"str"in t}function b8(t,e){return o8({},t,e)}var w8,k8,T8,E8,_8,C8,S8,A8,L8,N8,I8,M8,R8,D8,O8,P8,B8,F8,$8,z8,G8,U8,q8,Y8,j8,H8,W8,V8,X8,K8=t(()=>{w8=rt(t5(),1),Q3(),tc(),In(),e(),Yr(),Hr(),Sw(),l8(),Ur(),k8="",T8={curveBasis:d4,curveBasisClosed:f4,curveBasisOpen:v4,curveBumpX:i4,curveBumpY:a4,curveBundle:w4,curveCardinalClosed:A4,curveCardinalOpen:I4,curveCardinal:_4,curveCatmullRomClosed:F4,curveCatmullRomOpen:G4,curveCatmullRom:O4,curveLinear:jb,curveLinearClosed:Y4,curveMonotoneX:J4,curveMonotoneY:t3,curveNatural:i3,curveStep:s3,curveStepAfter:c3,curveStepBefore:l3},E8=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_8=Ae(function(t,e){var r,n=C8(t,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(t=>t.args),br(r),ae(i,[...r])):n.args)return r=Qt(t,e),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),C8=Ae(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${E8.source})(?=[}][%]{2}).*
|
|
|
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var n,i,a,o=[];null!==(n=Vt.exec(t));)n.index===Vt.lastIndex&&Vt.lastIndex++,(n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,o.push({type:i,args:a}));return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),S8=Ae(function(t){return t.replace(Vt,"")},"removeDirectives"),A8=Ae(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),Ae(c8,"interpolateToCurve"),Ae(h8,"formatUrl"),L8=Ae((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t<n;t++)if(!(a=a[r[t]]))return void R.error(`Function name: ${e} not found in window`);a[i](...t)},"runFunc"),Ae(u8,"distance"),Ae(d8,"traverseEdge"),Ae(p8,"calcLabelPosition"),N8=Ae((t,e=2)=>(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),I8=Ae((t,e)=>{let r,n=e;for(var i of t){if(r){var a=u8(i,r);if(a<n)n-=a;else{if((a=n/a)<=0)return r;if(1<=a)return{x:i.x,y:i.y};if(0<a&&a<1)return{x:N8((1-a)*r.x+a*i.x,5),y:N8((1-a)*r.y+a*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),M8=Ae((t,e,r)=>{R.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=I8(e,25),t=t?10:5,n=Math.atan2(e[0].y-r.y,e[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*t+(e[0].x+r.x)/2,i.y=-Math.cos(n)*t+(e[0].y+r.y)/2,i},"calcCardinalityPosition"),Ae(g8,"calcTerminalLabelPosition"),Ae(f8,"getStylesFromArray"),R8=0,D8=Ae(()=>(R8++,"id-"+Math.random().toString(36).substr(2,12)+"-"+R8),"generateId"),Ae(m8,"makeRandomHex"),O8=Ae(t=>m8(t.length),"random"),P8=Ae(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),B8=Ae(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=j8(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",n),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(n=t.append("tspan")).attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),t},"drawSimpleText"),F8=Cw((t,o,s)=>{if(!t||(s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},s),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=v8(t+" ",s),a=v8(h,s);h=o<i?({hyphenatedStrings:r,remainingWord:n}=$8(t,o,"-",s),c.push(h,...r),n):o<=a+i?(c.push(h),t):[h,t].filter(Boolean).join(" "),e+1===l.length&&c.push(h)}),c.filter(t=>""!==t).join(s.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),$8=Cw((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let o=[...t],s=[],l="";return o.forEach((t,e)=>{var r,t=""+l+t;l=v8(t,a)>=n?(e+=1,e=o.length===e,r=t+i,s.push(e?t:r),""):t}),{hyphenatedStrings:s,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),Ae(y8,"calculateTextHeight"),Ae(v8,"calculateTextWidth"),z8=Cw((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=j8(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),o=[];if(!(r=O("body")).remove)return{width:0,height:0,lineHeight:0};var s,l=r.append("svg");for(s of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=P8();if(u.text=c||k8,0===(u=((u=B8(l,u).style("font-size",i).style("font-weight",n).style("font-family",s))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}o.push(h)}return l.remove(),o[isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),G8=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{Ae(this,"InitIDGenerator")}},q8=Ae(function(t){return U8=U8||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),U8.innerHTML=t,unescape(U8.textContent)},"entityDecode"),Ae(x8,"isDetailedError"),Y8=Ae((t,e,r,n)=>{var i;n&&(i=t.node()?.getBBox())&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),j8=Ae(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"),Ae(b8,"cleanAndMerge"),H8={assignWithDepth:ae,wrapLabel:F8,calculateTextHeight:y8,calculateTextWidth:v8,calculateTextDimensions:z8,cleanAndMerge:b8,detectInit:_8,detectDirective:C8,isSubstringInArray:A8,interpolateToCurve:c8,calcLabelPosition:p8,calcCardinalityPosition:M8,calcTerminalLabelPosition:g8,formatUrl:h8,getStylesFromArray:f8,generateId:D8,random:O8,runFunc:L8,entityDecode:q8,insertTitle:Y8,parseFontSize:j8,InitIDGenerator:G8},W8=Ae(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"),V8=Ae(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),X8=Ae((t,e,{counter:r=0,prefix:n,suffix:i})=>(n?n+"_":"")+t+`_${e}_`+r+(i?"_"+i:""),"getEdgeId")});function Z8(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=F8(e[t].text,i,n),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=i,e[t].height=y8(e[t].text,n);else{var a,o,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(o of r)e[t].width=Math.max(v8(o,n),e[t].width),a=y8(o,n),e[t].height=e[t].height+a}}function Q8(e,r,n,t,i){var a,o,s=new iE(i);s.data.widthLimit=n.data.widthLimit/Math.min(rE,t.length);for([a,o]of t.entries()){let t=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=t,t=o.image.Y+o.image.height);var l=o.wrap&&nE.wrap,c=sE(nE),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",Z8("label",o,l,c,s.data.widthLimit),o.label.Y=t+8,t=o.label.Y+o.label.height,o.type&&""!==o.type.text&&(o.type.text="["+o.type.text+"]",Z8("type",o,l,c=sE(nE),s.data.widthLimit),o.type.Y=t+5,t=o.type.Y+o.type.height),o.descr&&""!==o.descr.text&&((c=sE(nE)).fontSize=c.fontSize-2,Z8("descr",o,l,c,s.data.widthLimit),o.descr.Y=t+20,t=o.descr.Y+o.descr.height),c=0==a||a%rE==0?(l=n.data.startx+nE.diagramMarginX,n.data.stopy+nE.diagramMarginY+t):(l=s.data.stopx!==s.data.startx?s.data.stopx+nE.diagramMarginX:s.data.startx,s.data.starty),s.setData(l,l,c,c),s.name=o.alias,i.db.getC4ShapeArray(o.alias));0<(c=i.db.getC4ShapeKeys(o.alias)).length&&hE(s,e,l,c),r=o.alias,0<(l=i.db.getBoundarys(r)).length&&Q8(e,0,s,l,i),"global"!==o.alias&&cE(e,o,s),n.data.stopy=Math.max(s.data.stopy+nE.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+nE.c4ShapeMargin,n.data.stopx),J8=Math.max(J8,n.data.stopx),tE=Math.max(tE,n.data.stopy)}}var J8,tE,eE,rE,nE,iE,aE,oE,sE,lE,cE,hE,uE,dE,pE,gE,fE,mE,yE,vE,xE=t(()=>{Q3(),r5(),e(),jr(),tc(),mh(),i(),Hr(),K8(),ec(),tE=J8=0,eE=4,rE=2,re.yy=gh,nE={},iE=class{static{Ae(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,aE(t.db.getConfig())}setData(t,e,r,n){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=n}updateVal(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(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,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>eE)&&(e=this.nextData.startx+t.margin+nE.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,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},aE(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},aE=Ae(function(t){ae(nE,t),t.fontFamily&&(nE.personFontFamily=nE.systemFontFamily=nE.messageFontFamily=t.fontFamily),t.fontSize&&(nE.personFontSize=nE.systemFontSize=nE.messageFontSize=t.fontSize),t.fontWeight&&(nE.personFontWeight=nE.systemFontWeight=nE.messageFontWeight=t.fontWeight)},"setConf"),oE=Ae((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),sE=Ae(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),lE=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Ae(Z8,"calcC4ShapeTextWH"),cE=Ae(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=nE.c4ShapeMargin-35;var r=e.wrap&&nE.wrap,n=sE(nE),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",v8(e.label.text,n));Z8("label",e,r,n,i),G3.drawBoundary(t,e,nE)},"drawBoundary"),hE=Ae(function(r,n,i,t){let a=0;for(var o of t){a=0;var s=i[o];switch((o=oE(nE,s.typeC4Shape.text)).fontSize=o.fontSize-2,s.typeC4Shape.width=v8("«"+s.typeC4Shape.text+"»",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=nE.c4ShapePadding,a=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=a,a=s.image.Y+s.image.height}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=a,a=s.image.Y+s.image.height);var o=s.wrap&&nE.wrap,l=nE.width-2*nE.c4ShapePadding,c=oE(nE,s.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",Z8("label",s,o,c,l),s.label.Y=a+8,a=s.label.Y+s.label.height,s.type&&""!==s.type.text?(s.type.text="["+s.type.text+"]",Z8("type",s,o,oE(nE,s.typeC4Shape.text),l),s.type.Y=a+5,a=s.type.Y+s.type.height):s.techn&&""!==s.techn.text&&(s.techn.text="["+s.techn.text+"]",Z8("techn",s,o,oE(nE,s.techn.text),l),s.techn.Y=a+5,a=s.techn.Y+s.techn.height);let t=a,e=s.label.width;s.descr&&""!==s.descr.text&&(Z8("descr",s,o,oE(nE,s.typeC4Shape.text),l),s.descr.Y=a+20,a=s.descr.Y+s.descr.height,e=Math.max(s.label.width,s.descr.width),t=a-5*s.descr.textLines),e+=nE.c4ShapePadding,s.width=Math.max(s.width||nE.width,e,nE.width),s.height=Math.max(s.height||nE.height,t,nE.height),s.margin=s.margin||nE.c4ShapeMargin,r.insert(s),G3.drawC4Shape(n,s,nE)}r.bumpLastMargin(nE.c4ShapeMargin)},"drawC4ShapeArray"),uE=class{static{Ae(this,"Point")}constructor(t,e){this.x=t,this.y=e}},dE=Ae(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,o=r+t.width/2,s=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&r<i?d=new uE(r+t.width,s):n==a&&i<r?d=new uE(r,s):r==i&&n<a?d=new uE(o,n+t.height):r==i&&a<n&&(d=new uE(o,n)),i<r&&n<a?d=h<=u?new uE(r,s+h*t.width/2):new uE(o-l/c*t.height/2,n+t.height):r<i&&n<a?d=h<=u?new uE(r+t.width,s+h*t.width/2):new uE(o+l/c*t.height/2,n+t.height):r<i&&a<n?d=h<=u?new uE(r+t.width,s-h*t.width/2):new uE(o+t.height/2*l/c,n):i<r&&a<n&&(d=h<=u?new uE(r,s-t.width/2*h):new uE(o-t.height/2*l/c,n)),d},"getIntersectPoint"),pE=Ae(function(t,e){var r={x:0,y:0},n=(r.x=e.x+e.width/2,r.y=e.y+e.height/2,dE(t,r));return r.x=t.x+t.width/2,r.y=t.y+t.height/2,{startPoint:n,endPoint:t=dE(e,r)}},"getIntersectPoints"),gE=Ae(function(t,e,r,n){let i=0;for(var a of e){i+=1;var o=a.wrap&&nE.wrap,s=lE(nE);"C4Dynamic"===n.db.getC4Type()&&(a.label.text=i+": "+a.label.text);let t=v8(a.label.text,s);Z8("label",a,o,s,t),a.techn&&""!==a.techn.text&&Z8("techn",a,o,s,t=v8(a.techn.text,s)),a.descr&&""!==a.descr.text&&Z8("descr",a,o,s,t=v8(a.descr.text,s)),o=r(a.from),s=r(a.to),o=pE(o,s),a.startPoint=o.startPoint,a.endPoint=o.endPoint}G3.drawRels(t,e,nE)},"drawRels"),Ae(Q8,"drawInsideBoundary"),fE=Ae(function(t,e,r,n){nE=D().c4;let i=D().securityLevel,a;"sandbox"===i&&(a=O("#i"+e));var o=O("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),s=n.db,s=(n.db.setWrap(nE.wrap),eE=s.getC4ShapeInRow(),rE=s.getC4BoundaryInRow(),R.debug("C:"+JSON.stringify(nE,null,2)),"sandbox"===i?o.select(`[id="${e}"]`):O(`[id="${e}"]`)),o=(G3.insertComputerIcon(s),G3.insertDatabaseIcon(s),G3.insertClockIcon(s),(o=new iE(n)).setData(nE.diagramMarginX,nE.diagramMarginX,nE.diagramMarginY,nE.diagramMarginY),o.data.widthLimit=screen.availWidth,J8=nE.diagramMarginX,tE=nE.diagramMarginY,e=n.db.getTitle(),Q8(s,0,o,n.db.getBoundarys(""),n),G3.insertArrowHead(s),G3.insertArrowEnd(s),G3.insertArrowCrossHead(s),G3.insertArrowFilledHead(s),gE(s,n.db.getRels(),n.db.getC4Shape,n),o.data.stopx=J8,o.data.stopy=tE,(n=o.data).stopy-n.starty+2*nE.diagramMarginY),l=n.stopx-n.startx+2*nE.diagramMarginX,e=(e&&s.append("text").text(e).attr("x",(n.stopx-n.startx)/2-4*nE.diagramMarginX).attr("y",n.starty+nE.diagramMarginY),Vl(s,o,l,nE.useMaxWidth),e?60:0);s.attr("viewBox",n.startx-nE.diagramMarginX+" -"+(nE.diagramMarginY+e)+" "+l+" "+(o+e)),R.debug("models:",n)},"draw"),mE={drawPersonOrSystemArray:hE,drawBoundary:cE,setConf:aE,draw:fE}}),bE=t(()=>{yE=Ae(t=>`.person {
|
|
|
stroke: ${t.personBorder};
|
|
|
fill: ${t.personBkg};
|
|
|
}
|
|
|
`,"getStyles"),vE=yE}),wE={};J(wE,{diagram:()=>kE});var kE,TE=t(()=>{jr(),mh(),xE(),bE(),kE={parser:ne,db:gh,renderer:mE,styles:vE,init:Ae(({c4:t,wrap:e})=>{mE.setConf(t),gh.setWrap(e)},"init")}});function EE(t){let e=[];for(var r of t)(r=LE.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}var _E,CE,SE,AE,LE,NE,IE,ME,RE,DE,OE,PE,BE,FE,$E,zE,GE,UE,qE,YE,jE,HE,WE,VE,XE,KE,ZE,QE,JE,t_,e_,r_,n_,i_,a_,o_,s_,l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,x_,b_,w_,k_,T_,E_,__,C_,S_,A_,L_,N_,I_=t(()=>{Q3(),K8(),i(),tc(),e(),fh(),_E=0,CE=D(),SE=new Map,AE=[],LE=new Map,NE=[],IE=new Map,ME=new Map,DE=!(RE=0),BE=[],FE=Ae(t=>L.sanitizeText(t,CE),"sanitizeText"),$E=Ae(function(t){for(var e of SE.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),zE=Ae(function(r,n,i,a,o,s,l={}){if(r&&0!==r.trim().length){let t,e=SE.get(r);void 0===e&&(e={id:r,labelType:"text",domId:"flowchart-"+r+"-"+_E,styles:[],classes:[]},SE.set(r,e)),_E++,void 0!==n?(CE=D(),t=FE(n.text.trim()),e.labelType=n.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=r),void 0!==i&&(e.type=i),a?.forEach(function(t){e.styles.push(t)}),o?.forEach(function(t){e.classes.push(t)}),void 0!==s&&(e.dir=s),void 0===e.props?e.props=l:void 0!==l&&Object.assign(e.props,l)}},"addVertex"),GE=Ae(function(t,e,r){if(R.info("abc78 Got edge...",t={start:t,end:e,type:void 0,text:"",labelType:"text"}),void 0!==(e=r.text)&&(t.text=FE(e.text.trim()),t.text.startsWith('"')&&t.text.endsWith('"')&&(t.text=t.text.substring(1,t.text.length-1)),t.labelType=e.type),void 0!==r&&(t.type=r.type,t.stroke=r.stroke,t.length=10<r.length?10:r.length),!(AE.length<(CE.maxEdges??500)))throw new Error(`Edge limit exceeded. ${AE.length} edges found, but the limit is ${CE.maxEdges}.
|
|
|
|
|
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
|
You have to call mermaid.initialize.`);R.info("Pushing edge..."),AE.push(t)},"addSingleLink"),UE=Ae(function(t,e,r){R.info("addLink",t,e,r);for(var n of t)for(var i of e)GE(n,i,r)},"addLink"),qE=Ae(function(t,e){t.forEach(function(t){"default"===t?AE.defaultInterpolate=e:AE[t].interpolate=e})},"updateLinkInterpolate"),YE=Ae(function(t,e){t.forEach(function(t){if("number"==typeof t&&t>=AE.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${AE.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?AE.defaultStyle=e:(AE[t].style=e,0<(AE[t]?.style?.length??0)&&!AE[t]?.style?.some(t=>t?.startsWith("fill"))&&AE[t]?.style?.push("fill:none"))})},"updateLink"),jE=Ae(function(t,e){t.split(",").forEach(function(t){let r=LE.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},LE.set(t,r)),e?.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})},"addClass"),HE=Ae(function(t){OE=t,/.*</.exec(OE)&&(OE="RL"),/.*\^/.exec(OE)&&(OE="BT"),/.*>/.exec(OE)&&(OE="LR"),"TD"===(OE=/.*v/.exec(OE)?"TB":OE)&&(OE="TB")},"setDirection"),WE=Ae(function(t,e){for(var r of t.split(",")){var n=SE.get(r);n&&n.classes.push(e),(n=IE.get(r))&&n.classes.push(e)}},"setClass"),VE=Ae(function(t,e){if(void 0!==e){e=FE(e);for(var r of t.split(","))ME.set("gen-1"===PE?$E(r):r,e)}},"setTooltip"),XE=Ae(function(t,e,n){let i=$E(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),(n=SE.get(t))&&(n.haveCallback=!0,BE.push(function(){var t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",function(){H8.runFunc(e,...r)},!1)}))}},"setClickFun"),KE=Ae(function(t,e,r){t.split(",").forEach(function(t){void 0!==(t=SE.get(t))&&(t.link=H8.formatUrl(e,CE),t.linkTarget=r)}),WE(t,"clickable")},"setLink"),ZE=Ae(function(t){return ME.get(t)},"getTooltip"),QE=Ae(function(t,e,r){t.split(",").forEach(function(t){XE(t,e,r)}),WE(t,"clickable")},"setClickEvent"),JE=Ae(function(e){BE.forEach(function(t){t(e)})},"bindFunctions"),t_=Ae(function(){return OE.trim()},"getDirection"),e_=Ae(function(){return SE},"getVertices"),r_=Ae(function(){return AE},"getEdges"),n_=Ae(function(){return LE},"getClasses"),i_=Ae(function(t){let r=O(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=O("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),O(t).select("svg").selectAll("g.node").on("mouseover",function(){var t,e=O(this);null!==e.attr("title")&&(t=this?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),BE.push(i_),a_=Ae(function(t="gen-1"){SE=new Map,LE=new Map,AE=[],BE=[i_],NE=[],IE=new Map,RE=0,ME=new Map,DE=!0,PE=t,CE=D(),lc()},"clear"),o_=Ae(t=>{PE=t||"gen-2"},"setGen"),s_=Ae(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),l_=Ae(function(t,e,r){let n=t.text.trim(),i=r.text;function a(t){let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!n.includes(t)&&n.push(t))}),dir:i}}t===r&&/\s/.exec(r.text)&&(n=void 0),Ae(a,"uniq");var{nodeList:o,dir:t}=a(e.flat());if("gen-1"===PE)for(let t=0;t<o.length;t++)o[t]=$E(o[t]);return n=n??"subGraph"+RE,i=FE(i=i||""),RE+=1,e={id:n,nodes:o,title:i.trim(),classes:[],dir:t,labelType:r.type},R.info("Adding",e.id,e.nodes,e.dir),e.nodes=w_(e,NE).nodes,NE.push(e),IE.set(n,e),n},"addSubGraph"),c_=Ae(function(t){for(var[e,r]of NE.entries())if(r.id===t)return e;return-1},"getPosForId"),h_=-1,u_=[],d_=Ae(function(t,e){var r=NE[e].nodes;if(2e3<(h_+=1))return{result:!1,count:0};if(NE[u_[h_]=e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){var a=c_(r[n]);if(0<=a){if((a=d_(t,a)).result)return{result:!0,count:i+a.count};i+=a.count}n+=1}return{result:!1,count:i}},"indexNodes2"),p_=Ae(function(t){return u_[t]},"getDepthFirstPos"),g_=Ae(function(){h_=-1,0<NE.length&&d_("none",NE.length-1)},"indexNodes"),f_=Ae(function(){return NE},"getSubGraphs"),k_=Ae(()=>!!DE&&!(DE=!1),"firstGraph"),m_=Ae(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 n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),y_=Ae((e,r)=>{let n=r.length,i=0;for(let t=0;t<n;++t)r[t]===e&&++i;return i},"countChar"),v_=Ae(t=>{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(t=y_(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}},"destructEndLink"),x_=Ae((t,e)=>{if(t=v_(t),e){if((e=m_(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},"destructLink"),b_=Ae((t,e)=>{for(var r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),w_=Ae((r,n)=>{let i=[];return r.nodes.forEach((t,e)=>{b_(n,t)||i.push(r.nodes[e])}),{nodes:i}},"makeUniq"),k_={firstGraph:k_},T_=Ae(t=>"square"===t.type?"squareRect":"round"===t.type?"roundedRect":t.type??"squareRect","getTypeFromVertex"),E_=Ae((t,e)=>t.find(t=>t.id===e),"findNode"),__=Ae(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}},"destructEdgeType"),C_=Ae((t,e,r,n,i,a)=>{var r=r.get(t.id),n=n.get(t.id)??!1,o=E_(e,t.id);o?(o.cssStyles=t.styles,o.cssCompiledStyles=EE(t.classes),o.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:EE(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:T_(t),dir:t.dir,domId:t.domId,isGroup:n,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:ZE(t.id)})},"addNodeFromVertex"),Ae(EE,"getCompiledStyles"),S_=Ae(()=>{let a=D(),e=[],o=[],r=f_(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var s,l=r[t];0<l.nodes.length&&i.set(l.id,!0);for(s of l.nodes)n.set(s,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:n.get(c.id),padding:8,cssCompiledStyles:EE(c.classes),cssClasses:c.classes.join(" "),shape:"rect",dir:c.dir,isGroup:!0,look:a.look})}e_().forEach(t=>{C_(t,e,n,i,a,a.look||"classic")});let h=r_();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=__(t.type),i=[...h.defaultStyle??[]],e=(t.style&&i.push(...t.style),{id:X8(t.start,t.end,{counter:e,prefix:"L"}),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?"none":r,arrowTypeEnd:"invisible"===t?.stroke?"none":n,arrowheadStyle:"fill: #333",labelStyle:i,style:i,pattern:t.stroke,look:a.look});o.push(e)}),{nodes:e,edges:o,other:{},config:a}},"getData"),A_={defaultConfig:Ae(()=>vc.flowchart,"defaultConfig"),setAccTitle:cc,getAccTitle:hc,getAccDescription:dc,getData:S_,setAccDescription:uc,addVertex:zE,lookUpDomId:$E,addLink:UE,updateLinkInterpolate:qE,updateLink:YE,addClass:jE,setDirection:HE,setClass:WE,setTooltip:VE,getTooltip:ZE,setClickEvent:QE,setLink:KE,bindFunctions:JE,getDirection:t_,getVertices:e_,getEdges:r_,getClasses:n_,clear:a_,setGen:o_,defaultStyle:s_,addSubGraph:l_,getDepthFirstPos:p_,indexNodes:g_,getSubGraphs:f_,destructLink:x_,lex:k_,exists:b_,makeUniq:w_,setDiagramTitle:pc,getDiagramTitle:gc}}),M_=t(()=>{L_=Ae(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"),N_=Ae((t,e,r)=>{var t=L_(t),n=e.height+2*r.padding,i=n/2,e=e.width+2*i+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:i,y:0},{x:e/2,y:2*r},{x:e-i,y:0},{x:e,y:0},{x:e,y:-n/3},{x:e+2*r,y:-n/2},{x:e,y:-2*n/3},{x:e,y:-n},{x:e-i,y:-n},{x:e/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:i,y:0},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:i,y:-n},{x:e-i,y:-n},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-i},{x:e,y:i-n},{x:0,y:-n}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-i},{x:0,y:i-n},{x:e,y:-n}]:t.has("right")&&t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-i},{x:0,y:-n}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-n}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-i},{x:e,y:-n}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-n}]:t.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function R_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function D_(t){j_=t}function O_(t,e){if(e){if(H_.test(t))return t.replace(W_,Z_)}else if(V_.test(t))return t.replace(X_,Z_);return t}function P_(t){return t.replace(Q_,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}function B_(t,e){let n="string"==typeof t?t:t.source,i=(e=e||"",{replace:Ae((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(J_,"$1"),n=n.replace(t,r),i},"replace"),getRegex:Ae(()=>new RegExp(n,e),"getRegex")});return i}function F_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function $_(t,e){let r=t.replace(/\|/g,(t,e,r)=>{let n=!1,i=e;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),0<n.length&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function z_(t,e,r){var n=t.length;if(0===n)return"";let i=0;for(;i<n;){var a=t.charAt(n-i-1);if((a!==e||r)&&(a===e||!r))break;i++}return t.slice(0,n-i)}function G_(r,n){if(-1!==r.indexOf(n[1])){let e=0;for(let t=0;t<r.length;t++)if("\\"===r[t])t++;else if(r[t]===n[0])e++;else if(r[t]===n[1]&&--e<0)return t}return-1}function U_(t,e,r,n){var i=e.href,e=e.title?O_(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");return"!"!==t[0].charAt(0)?(n.state.inLink=!0,t={type:"link",raw:r,href:i,title:e,text:a,tokens:n.inlineTokens(a)},n.state.inLink=!1,t):{type:"image",raw:r,href:i,title:e,text:O_(a)}}function q_(t,e){if(null===(t=t.match(/^(\s+)(?:```)/)))return e;let r=t[1];return e.split(`
|
|
|
`).map(t=>{var e=t.match(/^\s+/);return null!==e&&([e]=e,e.length>=r.length)?t.slice(r.length):t}).join(`
|
|
|
`)}function Y_(t,e){return LC.parse(t,e)}var j_,H_,W_,V_,X_,K_,Z_,Q_,J_,tC,eC,rC,nC,iC,aC,oC,sC,lC,cC,hC,uC,dC,pC,gC,fC,mC,yC,vC,xC,bC,wC,kC,TC,EC,_C,CC,SC,AC,LC,NC=t(()=>{Ae(R_,"_getDefaults"),j_=R_(),Ae(D_,"changeDefaults"),H_=/[&<>"']/,W_=new RegExp(H_.source,"g"),V_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,X_=new RegExp(V_.source,"g"),K_={"&":"&","<":"<",">":">",'"':""","'":"'"},Z_=Ae(t=>K_[t],"getEscapeReplacement"),Ae(O_,"escape$1"),Q_=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,Ae(P_,"unescape"),J_=/(^|[^\[])\^/g,Ae(B_,"edit"),Ae(F_,"cleanUrl"),tC={exec:Ae(()=>null,"exec")},Ae($_,"splitCells"),Ae(z_,"rtrim"),Ae(G_,"findClosingBracket"),Ae(U_,"outputLink"),Ae(q_,"indentCodeCompensation"),eC=class{static{Ae(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||j_}space(t){if((t=this.rules.block.newline.exec(t))&&0<t[0].length)return{type:"space",raw:t[0]}}code(t){var e;if(t=this.rules.block.code.exec(t))return e=t[0].replace(/^ {1,4}/gm,""),{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:z_(e,`
|
|
|
`)}}fences(t){var e,r;if(t=this.rules.block.fences.exec(t))return r=q_(e=t[0],t[3]||""),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(e){var r;if(e=this.rules.block.heading.exec(e)){let t=e[2].trim();return/#$/.test(t)&&(r=z_(t,"#"),!this.options.pedantic&&r&&!/ $/.test(r)||(t=r.trim())),{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){if(t=this.rules.block.hr.exec(t))return{type:"hr",raw:z_(t[0],`
|
|
|
`)}}blockquote(t){if(t=this.rules.block.blockquote.exec(t)){let n=z_(t[0],`
|
|
|
`).split(`
|
|
|
`),i="",a="",o=[];for(;0<n.length;){let t=!1,e=[],r;for(r=0;r<n.length;r++)if(/^ {0,3}>/.test(n[r]))e.push(n[r]),t=!0;else{if(t)break;e.push(n[r])}n=n.slice(r);var s,l=(c=e.join(`
|
|
|
`)).replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
|
$1`).replace(/^ {0,3}>[ \t]?/gm,""),c=(i=i?i+`
|
|
|
`+c:c,a=a?a+`
|
|
|
`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===n.length)break;if("code"===(l=o[o.length-1])?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+`
|
|
|
`+n.join(`
|
|
|
`),h=this.blockquote(h);o[o.length-1]=h,i=i.substring(0,i.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+`
|
|
|
`+n.join(`
|
|
|
`),s=this.list(h),o[o.length-1]=s,i=i.substring(0,i.length-l.raw.length)+s.raw,a=a.substring(0,a.length-c.raw.length)+s.raw,n=h.substring(o[o.length-1].raw.length).split(`
|
|
|
`))}return{type:"blockquote",raw:i,tokens:o,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let t=p[1].trim(),e=1<t.length,c={type:"list",raw:"",ordered:e,start:e?+t.slice(0,-1):"",loose:!1,items:[]},h=(t=e?"\\d{1,9}\\"+t.slice(-1):"\\"+t,this.options.pedantic&&(t=e?t:"[*+-]"),new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`)),u=!1;for(;d;){let t=!1,e="",r="";if(!(p=h.exec(d))||this.rules.block.hr.test(d))break;e=p[0],d=d.substring(e.length);let n=p[2].split(`
|
|
|
`,1)[0].replace(/^\t+/,t=>" ".repeat(3*t.length)),i=d.split(`
|
|
|
`,1)[0],a=!n.trim(),o=0;if(this.options.pedantic?(o=2,r=n.trimStart()):a?o=p[1].length+1:(o=4<(o=p[2].search(/[^ ]/))?1:o,r=n.slice(o),o+=p[1].length),a&&/^ *$/.test(i)&&(e+=i+`
|
|
|
`,d=d.substring(i.length+1),t=!0),!t)for(var g=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),m=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),y=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);d;){var v=d.split(`
|
|
|
`,1)[0];if(i=v,this.options.pedantic&&(i=i.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),m.test(i)||y.test(i)||g.test(i)||f.test(d))break;if(i.search(/[^ ]/)>=o||!i.trim())r+=`
|
|
|
`+i.slice(o);else{if(a||4<=n.search(/[^ ]/)||m.test(n)||y.test(n)||f.test(n))break;r+=`
|
|
|
`+i}a||i.trim()||(a=!0),e+=v+`
|
|
|
`,d=d.substring(v.length+1),n=i.slice(o)}c.loose||(u?c.loose=!0:/\n *\n *$/.test(e)&&(u=!0));let s=null,l;this.options.gfm&&(s=/^\[[ xX]\] /.exec(r))&&(l="[ ] "!==s[0],r=r.replace(/^\[[ xX]\] +/,"")),c.items.push({type:"list_item",raw:e,task:!!s,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}c.items[c.items.length-1].raw=c.items[c.items.length-1].raw.trimEnd(),c.items[c.items.length-1].text=c.items[c.items.length-1].text.trimEnd(),c.raw=c.raw.trimEnd();for(let t=0;t<c.items.length;t++){var r;this.lexer.state.top=!1,c.items[t].tokens=this.lexer.blockTokens(c.items[t].text,[]),c.loose||(r=0<(r=c.items[t].tokens.filter(t=>"space"===t.type)).length&&r.some(t=>/\n.*\n/.test(t.raw)),c.loose=r)}if(c.loose)for(let t=0;t<c.items.length;t++)c.items[t].loose=!0;return c}}html(t){if(t=this.rules.block.html.exec(t))return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(t){var e,r,n;if(t=this.rules.block.def.exec(t))return e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:r,title:n}}table(i){if((i=this.rules.block.table.exec(i))&&/[:|]/.test(i[2])){let e=$_(i[1]),t=i[2].replace(/^\||\| *$/g,"").split("|"),r=i[3]&&i[3].trim()?i[3].replace(/\n[ \t]*$/,"").split(`
|
|
|
`):[],n={type:"table",raw:i[0],header:[],align:[],rows:[]};if(e.length===t.length){for(var a of t)/^ *-+: *$/.test(a)?n.align.push("right"):/^ *:-+: *$/.test(a)?n.align.push("center"):/^ *:-+ *$/.test(a)?n.align.push("left"):n.align.push(null);for(let t=0;t<e.length;t++)n.header.push({text:e[t],tokens:this.lexer.inline(e[t]),header:!0,align:n.align[t]});for(var o of r)n.rows.push($_(o,n.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===`
|
|
|
`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:O_(t[1])}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var n,i=r[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;var a=z_(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=G_(r[2],"()"))&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="");let t=r[2],e="";return this.options.pedantic?(a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),U_(r,{href:(t=/^</.test(t)?this.options.pedantic&&!/>$/.test(i)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()])?U_(r,t,r[0],this.lexer):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(o,s,t=""){let l=this.rules.inline.emStrongLDelim.exec(o);if(!(!l||l[3]&&t.match(/[\p{L}\p{N}]/u))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,n=t,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,s=s.slice(-1*o.length+t);null!=(l=a.exec(s));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&t%3&&!((t+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=o.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let t=n[2].replace(/\n/g," "),e=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return t=O_(t=e&&r?t.substring(1,t.length-1):t,!0),{type:"codespan",raw:n[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=O_(r[1])):t=O_(r[1]),{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,n;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=O_(r[0]),e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=O_(r[0]),e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock?t[0]:O_(t[0]),{type:"text",raw:t[0],text:e}}},sC=/^(?: *(?:\n|$))+/,xC=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,iC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hC=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,aC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oC=/(?:[*+-]|\d{1,9}[.)])/,yC=B_(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,oC).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),cC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,lC=/^[^\n]+/,fC=/(?!\s*\])(?:\\.|[^\[\]\\])+/,nC=B_(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",fC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),oC=B_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oC).getRegex(),AC="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",uC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bC=B_("^ {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 *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",uC).replace("tag",AC).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vC=B_(cC).replace("hr",hC).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",AC).getRegex(),rC={blockquote:B_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vC).getRegex(),code:xC,def:nC,fences:iC,heading:aC,hr:hC,html:bC,lheading:yC,list:oC,newline:sC,paragraph:vC,table:tC,text:lC},xC=B_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hC).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",AC).getRegex(),nC={...rC,table:xC,paragraph:B_(cC).replace("hr",hC).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xC).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",AC).getRegex()},iC={...rC,html:B_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",uC).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:tC,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B_(cC).replace("hr",hC).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",yC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oC=/^( {2,}|\\)\n(?!\s*$)/,sC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vC="\\p{P}\\p{S}",lC=B_(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,vC).getRegex(),xC=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,AC=B_(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,vC).getRegex(),cC=B_("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,vC).getRegex(),hC=B_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,vC).getRegex(),yC=B_(/\\([punct])/,"gu").replace(/punct/g,vC).getRegex(),vC=B_(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),uC=B_(uC).replace("(?:--\x3e|$)","--\x3e").getRegex(),uC=B_("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",uC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dC=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pC=B_(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",dC).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gC=B_(/^!?\[(label)\]\[(ref)\]/).replace("label",dC).replace("ref",fC).getRegex(),fC=B_(/^!?\[(ref)\](?:\[\])?/).replace("ref",fC).getRegex(),mC=B_("reflink|nolink(?!\\()","g").replace("reflink",gC).replace("nolink",fC).getRegex(),vC={...yC={_backpedal:tC,anyPunctuation:yC,autolink:vC,blockSkip:xC,br:oC,code:bC,del:tC,emStrongLDelim:AC,emStrongRDelimAst:cC,emStrongRDelimUnd:hC,escape:aC,link:pC,nolink:fC,punctuation:lC,reflink:gC,reflinkSearch:mC,tag:uC,text:sC,url:tC},link:B_(/^!?\[(label)\]\((.*?)\)/).replace("label",dC).getRegex(),reflink:B_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dC).getRegex()},xC={...yC,escape:B_(aC).replace("])","~|])").getRegex(),url:B_(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},bC={...xC,br:B_(oC).replace("{2,}","*").getRegex(),text:B_(xC.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wC={normal:rC,gfm:nC,pedantic:iC},kC={normal:yC,gfm:xC,breaks:bC,pedantic:vC},TC=class r{static{Ae(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||j_,this.options.tokenizer=this.options.tokenizer||new eC,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={block:wC.normal,inline:kC.normal},this.options.pedantic?(t.block=wC.pedantic,t.inline=kC.pedantic):this.options.gfm&&(t.block=wC.gfm,this.options.breaks?t.inline=kC.breaks:t.inline=kC.gfm),this.tokenizer.rules=t}static get rules(){return{block:wC,inline:kC}}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(/\r\n|\r/g,`
|
|
|
`),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){var e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,e=[],t=!1){i=this.options.pedantic?i.replace(/\t/g," ").replace(/^ +$/gm,""):i.replace(/^( *)(\t+)/gm,(t,e,r)=>e+" ".repeat(r.length));let r,n,a;for(;i;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(t=>!!(r=t.call({lexer:this},i,e))&&(i=i.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.space(i)){i=i.substring(r.raw.length),1===r.raw.length&&0<e.length?e[e.length-1].raw+=`
|
|
|
`:e.push(r);continue}if(r=this.tokenizer.code(i)){i=i.substring(r.raw.length),!(n=e[e.length-1])||"paragraph"!==n.type&&"text"!==n.type?e.push(r):(n.raw+=`
|
|
|
`+r.raw,n.text+=`
|
|
|
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);continue}if(r=this.tokenizer.fences(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(i)){i=i.substring(r.raw.length),!(n=e[e.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+=`
|
|
|
`+r.raw,n.text+=`
|
|
|
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);continue}if(r=this.tokenizer.table(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(i)){i=i.substring(r.raw.length),e.push(r);continue}if(a=i,this.options.extensions&&this.options.extensions.startBlock){let e=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(a=i.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(a))){n=e[e.length-1],t&&"paragraph"===n?.type?(n.raw+=`
|
|
|
`+r.raw,n.text+=`
|
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r),t=a.length!==i.length,i=i.substring(r.raw.length);continue}if(r=this.tokenizer.text(i)){i=i.substring(r.raw.length),(n=e[e.length-1])&&"text"===n.type?(n.raw+=`
|
|
|
`+r.raw,n.text+=`
|
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(i){var o="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(o);break}throw new Error(o)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(i,e=[]){let r,t,a,n=i,o,s,l;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0<c.length)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(n));)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;i;)if(s||(l=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(t=>!!(r=t.call({lexer:this},i,e))&&(i=i.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.escape(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(i)){i=i.substring(r.raw.length),(t=e[e.length-1])&&"text"===r.type&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(r.raw.length),(t=e[e.length-1])&&"text"===r.type&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(i,n,l)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(i)){i=i.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(i))){i=i.substring(r.raw.length),e.push(r);continue}if(a=i,this.options.extensions&&this.options.extensions.startInline){let e=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(a=i.substring(0,e+1))}if(r=this.tokenizer.inlineText(a)){i=i.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(l=r.raw.slice(-1)),s=!0,(t=e[e.length-1])&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(i){var h="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}return e}},EC=class{static{Ae(this,"_Renderer")}options;parser;constructor(t){this.options=t||j_}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(/^\S*/)?.[0],t=t.replace(/\n$/,"")+`
|
|
|
`,e?'<pre><code class="language-'+O_(e)+'">'+(r?t:O_(t,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(r?t:O_(t,!0))+`</code></pre>
|
|
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
|
${this.parser.parse(t)}</blockquote>
|
|
|
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
|
`}hr(t){return`<hr>
|
|
|
`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){var i=e.items[t];n+=this.listitem(i)}var a=t?"ol":"ul";return"<"+a+(t&&1!==r?' start="'+r+'"':"")+`>
|
|
|
`+n+"</"+a+`>
|
|
|
`}listitem(t){let e="";var r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?0<t.tokens.length&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "),`<li>${e+=this.parser.parse(t.tokens,!!t.loose)}</li>
|
|
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
|
`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){var i=e.rows[t];r="";for(let t=0;t<i.length;t++)r+=this.tablecell(i[t]);n+=this.tablerow({text:r})}return`<table>
|
|
|
<thead>
|
|
|
`+t+`</thead>
|
|
|
`+(n=n&&`<tbody>${n}</tbody>`)+`</table>
|
|
|
`}tablerow({text:t}){return`<tr>
|
|
|
${t}</tr>
|
|
|
`}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=F_(t);if(null===n)return r;let i='<a href="'+(t=n)+'"';return e&&(i+=' title="'+e+'"'),i+=">"+r+"</a>"}image({href:t,title:e,text:r}){var n=F_(t);if(null===n)return r;let i=`<img src="${t=n}" alt="${r}"`;return e&&(i+=` title="${e}"`),i+=">"}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}},_C=class{static{Ae(this,"_TextRenderer")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},CC=class n{static{Ae(this,"_Parser")}options;renderer;textRenderer;constructor(t){this.options=t||j_,this.options.renderer=this.options.renderer||new EC,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new _C}static parse(t,e){return new n(e).parse(t)}static parseInline(t,e){return new n(e).parseInline(t)}parse(n,i=!0){let a="";for(let r=0;r<n.length;r++){var t=n[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[t.type]){var e=t,o=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==o||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){a+=o||"";continue}}var s=t;switch(s.type){case"space":a+=this.renderer.space(s);continue;case"hr":a+=this.renderer.hr(s);continue;case"heading":a+=this.renderer.heading(s);continue;case"code":a+=this.renderer.code(s);continue;case"table":a+=this.renderer.table(s);continue;case"blockquote":a+=this.renderer.blockquote(s);continue;case"list":a+=this.renderer.list(s);continue;case"html":a+=this.renderer.html(s);continue;case"paragraph":a+=this.renderer.paragraph(s);continue;case"text":{let t=s,e=this.renderer.text(t);for(;r+1<n.length&&"text"===n[r+1].type;)t=n[++r],e+=`
|
|
|
`+this.renderer.text(t);a+=i?this.renderer.paragraph({type:"paragraph",raw:e,text:e,tokens:[{type:"text",raw:e,text:e}]}):e;continue}default:var l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return a}parseInline(e,r){r=r||this.renderer;let n="";for(let t=0;t<e.length;t++){var i=e[t];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){var a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}var o=i;switch(o.type){case"escape":n+=r.text(o);break;case"html":n+=r.html(o);break;case"link":n+=r.link(o);break;case"image":n+=r.image(o);break;case"strong":n+=r.strong(o);break;case"em":n+=r.em(o);break;case"codespan":n+=r.codespan(o);break;case"br":n+=r.br(o);break;case"del":n+=r.del(o);break;case"text":n+=r.text(o);break;default:var s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}return n}},SC=class{static{Ae(this,"_Hooks")}options;constructor(t){this.options=t||j_}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}},AC=class{static{Ae(this,"Marked")}defaults=R_();options=this.setOptions;parse=this.#e(TC.lex,CC.parse);parseInline=this.#e(TC.lexInline,CC.parseInline);Parser=CC;Renderer=EC;TextRenderer=_C;Lexer=TC;Tokenizer=eC;Hooks=SC;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(var i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":var e,a,o=i;for(e of o.header)n=n.concat(this.walkTokens(e.tokens,r));for(a of o.rows)for(var s of a)n=n.concat(this.walkTokens(s.tokens,r));break;case"list":o=i,n=n.concat(this.walkTokens(o.items,r));break;default:{let e=i;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(t=>{t=e[t].flat(1/0),n=n.concat(this.walkTokens(t,r))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,r)))}}return n}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...t){var e=n.renderer.apply(this,t);return!1===e?r.apply(this,t):e}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var t=i[n.level];t?t.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),t.extensions=i),e.renderer){let i=this.defaults.renderer||new EC(this.defaults);for(var a in e.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],n=(e.useNewRenderer||(r=this.#t(r,t,i)),i[t]);i[t]=(...t)=>{var e=r.apply(i,t);return(!1===e?n.apply(i,t):e)||""}}}t.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new eC(this.defaults);for(var o in e.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(!["options","rules","lexer"].includes(o)){let t=o,r=e.tokenizer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new SC;for(var s in e.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if("options"!==s){let t=s,r=e.hooks[t],n=i[t];SC.passThroughHooks.has(s)?i[t]=t=>this.defaults.async?Promise.resolve(r.call(i,t)).then(t=>n.call(i,t)):(t=r.call(i,t),n.call(i,t)):i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.hooks=i}if(e.walkTokens){let r=this.defaults.walkTokens,n=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(n.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}#t(c,h,e){switch(h){case"heading":return function(t){return t.type&&t.type===h?c.call(this,e.parser.parseInline(t.tokens),t.depth,P_(e.parser.parseInline(t.tokens,e.parser.textRenderer))):c.apply(this,arguments)};case"code":return function(t){return t.type&&t.type===h?c.call(this,t.text,t.lang,!!t.escaped):c.apply(this,arguments)};case"table":return function(e){if(!e.type||e.type!==h)return c.apply(this,arguments);let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell({text:e.header[t].text,tokens:e.header[t].tokens,header:!0,align:e.align[t]});t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){var i=e.rows[t];r="";for(let t=0;t<i.length;t++)r+=this.tablecell({text:i[t].text,tokens:i[t].tokens,header:!1,align:e.align[t]});n+=this.tablerow({text:r})}return c.call(this,t,n)};case"blockquote":return function(t){return t.type&&t.type===h?(t=this.parser.parse(t.tokens),c.call(this,t)):c.apply(this,arguments)};case"list":return function(a){if(!a.type||a.type!==h)return c.apply(this,arguments);let t=a.ordered,e=a.start,o=a.loose,s="";for(let i=0;i<a.items.length;i++){let t=a.items[i],e=t.checked,r=t.task,n="";var l;t.task&&(l=this.checkbox({checked:!!e}),o?0<t.tokens.length&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=l+" "+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=l+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",text:l+" "}):n+=l+" "),n+=this.parser.parse(t.tokens,o),s+=this.listitem({type:"list_item",raw:n,text:n,task:r,checked:!!e,loose:o,tokens:t.tokens})}return c.call(this,s,t,e)};case"html":return function(t){return t.type&&t.type===h?c.call(this,t.text,t.block):c.apply(this,arguments)};case"paragraph":return function(t){return t.type&&t.type===h?c.call(this,this.parser.parseInline(t.tokens)):c.apply(this,arguments)};case"escape":return function(t){return t.type&&t.type===h?c.call(this,t.text):c.apply(this,arguments)};case"link":return function(t){return t.type&&t.type===h?c.call(this,t.href,t.title,this.parser.parseInline(t.tokens)):c.apply(this,arguments)};case"image":return function(t){return t.type&&t.type===h?c.call(this,t.href,t.title,t.text):c.apply(this,arguments)};case"strong":return function(t){return t.type&&t.type===h?c.call(this,this.parser.parseInline(t.tokens)):c.apply(this,arguments)};case"em":return function(t){return t.type&&t.type===h?c.call(this,this.parser.parseInline(t.tokens)):c.apply(this,arguments)};case"codespan":return function(t){return t.type&&t.type===h?c.call(this,t.text):c.apply(this,arguments)};case"del":return function(t){return t.type&&t.type===h?c.call(this,this.parser.parseInline(t.tokens)):c.apply(this,arguments)};case"text":return function(t){return t.type&&t.type===h?c.call(this,t.text):c.apply(this,arguments)}}return c}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return TC.lex(t,e??this.defaults)}parser(t,e){return CC.parse(t,e??this.defaults)}#e(i,a){return(r,t)=>{let e={...t},n={...this.defaults,...e};if(!0===this.defaults.async&&!1===e.async&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0),t=this.#r(!!n.silent,!!n.async),"u"<typeof r||null===r)return t(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return t(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n),n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(t=>i(t,n)).then(t=>n.hooks?n.hooks.processAllTokens(t):t).then(t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then(()=>t):t).then(t=>a(t,n)).then(t=>n.hooks?n.hooks.postprocess(t):t).catch(t);try{n.hooks&&(r=n.hooks.preprocess(r));let t=i(r,n),e=(n.hooks&&(t=n.hooks.processAllTokens(t)),n.walkTokens&&this.walkTokens(t,n.walkTokens),a(t,n));return n.hooks?n.hooks.postprocess(e):e}catch(e){return t(e)}}}#r(r,n){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>"+O_(t.message+"",!0)+"</pre>",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},LC=new AC,Ae(Y_,"marked"),Y_.options=Y_.setOptions=function(t){return LC.setOptions(t),D_(Y_.defaults=LC.defaults),Y_},Y_.getDefaults=R_,Y_.defaults=j_,Y_.use=function(...t){return LC.use(...t),D_(Y_.defaults=LC.defaults),Y_},Y_.walkTokens=function(t,e){return LC.walkTokens(t,e)},Y_.parseInline=LC.parseInline,Y_.Parser=CC,Y_.parser=CC.parse,Y_.Renderer=EC,Y_.TextRenderer=_C,Y_.Lexer=TC,Y_.lexer=TC.lex,Y_.Tokenizer=eC,Y_.Hooks=SC,Y_.parse=Y_,TC.lex});function IC(t,{markdownAutoWrap:e}){return t=Ht(t.replace(/<br\/>/g,`
|
|
|
`).replace(/\n{2,}/g,`
|
|
|
`)),!1===e?t.replace(/ /g," "):t}function MC(t,e={}){let r=IC(t,e),n=Y_.lexer(r),i=[[]],a=0;function o(e,r="normal"){"text"===e.type?e.text.split(`
|
|
|
`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{t&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{o(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return Ae(o,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{o(t)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}),i}function RC(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?""+t.text:"Unsupported markdown: "+t.type}return t=Y_.lexer(t),Ae(r,"output"),t.map(r).join("")}var DC=t(()=>{NC(),Gr(),Ae(IC,"preprocessMarkdown"),Ae(MC,"markdownToLines"),Ae(RC,"markdownToHTML")});function OC(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function PC(t,e){return BC(t,[],OC(e.content),e.type)}function BC(t,e,r,n){var i,a,o;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(o=[...e,i]).join(""),type:n}])?BC(t,o,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function FC(t,e){if(t.some(({content:t})=>t.includes(`
|
|
|
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return $C(t,e)}function $C(t,e,r=[],n=[]){if(0===t.length)return 0<n.length&&r.push(n),0<r.length?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());var a=t.shift()??{content:" ",type:"normal"},o=[...n];return""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o)?$C(t,e,r,o):(0<n.length?(r.push(n),t.unshift(a)):a.content&&([o,n]=PC(e,a),r.push([o]),n.content)&&t.unshift(n),$C(t,e,r))}var zC=t(()=>{Ae(OC,"splitTextToChars"),Ae(PC,"splitWordToFitWidth"),Ae(BC,"splitWordToFitWidthRecursion"),Ae(FC,"splitLineToFitWidth"),Ae($C,"splitLineToFitWidthRecursion")});function GC(t,e){e&&t.attr("style",e)}async function UC(t,e,r,n,i=!1){(t=t.append("foreignObject")).attr("width",10*r+"px"),t.attr("height",10*r+"px");let a=t.append("xhtml:div"),o=e.label;e.label&&ql(e.label)&&(o=await jl(e.label.replace(L.lineBreakRegex,`
|
|
|
`),D()));var s=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(o),GC(l,e.labelStyle),l.attr("class",s+" "+n),GC(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"),i&&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 qC(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function YC(t,e,r){return WC(e=qC(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function jC(t,e,r){return WC(e=qC(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function HC(e,t,r,n=!1){let i=t.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),o=i.append("text").attr("y","-10.1"),s=0;for(var l of r){var c,h=Ae(t=>YC(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:FC(l,h))WC(qC(o,s,1.1),c),s++}return(n?(t=o.node().getBBox(),a.attr("x",-2).attr("y",-2).attr("width",t.width+4).attr("height",t.height+4),i):o).node()}function WC(n,t){n.text(""),t.forEach((t,e)=>{var r=n.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}function VC(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`)}var XC,KC=t(()=>{i(),tc(),Q3(),e(),DC(),K8(),zC(),Ae(GC,"applyStyle"),Ae(UC,"addHtmlSpan"),Ae(qC,"createTspan"),Ae(YC,"computeWidthOfText"),Ae(jC,"computeDimensionOfText"),Ae(HC,"createFormattedText"),Ae(WC,"updateTextContentAndStyles"),Ae(VC,"replaceIconSubstring"),XC=Ae(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>(R.debug("XYZ createText",e,r,n,i,a,o,"addSvgBackground: ",l),a?(n=RC(e,c),a=VC(V8(n)),n=e.replace(/\\\\/g,"\\"),UC(t,{isNode:o,label:ql(e)?n:a,labelStyle:r.replace("fill:","color:")},s,i,l)):(n=HC(s,t,MC(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!e&&l),o?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),O(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),s=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).select("text").attr("style",s)),n)),"createText")});function ZC(t,e){e&&t.attr("style",e)}function QC(t){var e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),ZC(a,t.labelStyle),a.attr("class",i),ZC(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var JC,tS,eS=t(()=>{Q3(),e(),i(),tc(),K8(),KC(),Ae(ZC,"applyStyle"),Ae(QC,"addHtmlLabel"),JC=Ae((t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),R.debug("vertexText"+i),QC({isNode:n,label:VC(V8(i)),labelStyle:e.replace("fill:","color:")});var a,o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","title-row"):s.setAttribute("class","row"),s.textContent=a.trim(),o.appendChild(s)}return o},"createLabel"),tS=JC});function rS(t,e){return t.intersect(e)}var nS,iS=t(()=>{Ae(rS,"intersectNode"),nS=rS});function aS(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,o=t-n.y,s=Math.sqrt(e*e*o*o+r*r*a*a),a=Math.abs(e*r*a/s),e=(n.x<i&&(a=-a),Math.abs(e*r*o/s));return{x:i+a,y:t+(e=n.y<t?-e:e)}}var oS,sS=t(()=>{Ae(aS,"intersectEllipse"),oS=aS});function lS(t,e,r){return oS(t,e,e,r)}var cS,hS=t(()=>{sS(),Ae(lS,"intersectCircle"),cS=lS});function uS(t,e,r,n){var i,a,o,s,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*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0<u*d||(i=n.y-r.y,a=r.x-n.x,o=n.x*r.y-r.x*n.y,u=i*t.x+a*t.y+o,d=i*e.x+a*e.y+o,0!==u&&0!==d&&0<u*d)||0==(s=l*a-i*c)))return r=Math.abs(s/2),{x:(n=c*o-a*h)<0?(n-r)/s:(n+r)/s,y:(n=i*h-l*o)<0?(n-r)/s:(n+r)/s}}function dS(t,e){return 0<t*e}var pS,gS=t(()=>{Ae(uS,"intersectLine"),Ae(dS,"sameSign"),pS=uS});function fS(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var l=r-t.width/2-o,c=i-t.height/2-s,h=0;h<e.length;h++){var u=e[h],d=e[h<e.length-1?h+1:0];(u=pS(t,n,{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-n.x,t=t.y-n.y,r=Math.sqrt(r*r+t*t),t=e.x-n.x,e=e.y-n.y;return r<(t=Math.sqrt(t*t+e*e))?-1:r===t?0:1}),a[0]):t}var mS,yS,vS,xS,bS=t(()=>{gS(),Ae(mS=fS,"intersectPolygon")}),wS=t(()=>{yS=Ae((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,o=t.width/2,t=t.height/2,t=Math.abs(e)*o>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=o=a<0?-o:o,0==a?0:o*e/a);return{x:n+r,y:i+t}},"intersectRect"),vS=yS}),kS=t(()=>{iS(),hS(),sS(),bS(),wS(),xS={node:nS,circle:cS,ellipse:oS,polygon:mS,rect:vS}});function TS(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var ES,_S,CS,SS,AS=t(()=>{eS(),KC(),i(),Q3(),tc(),K8(),ES=Ae(async(t,e,r,i)=>{let a=D(),n,o=e.useHtmlLabels||Dl(a.flowchart.htmlLabels),s=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),l=s.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?XC(l,Sl(V8(c),a),{useHtmlLabels:o,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(tS(Sl(V8(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if(Dl(a.flowchart.htmlLabels)){if(r=u.children[0],t=O(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(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)}Ae(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 o?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:s,bbox:d,halfPadding:p,label:l}},"labelHelper"),_S=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),Ae(TS,"insertPolygonShape")}),LS=t(()=>{AS(),e(),i(),kS(),CS=Ae(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await ES(t,e,"node "+e.classes,!0),i=(R.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),_S(e,i),e.intersect=function(t){return xS.rect(e,t)},t},"note"),SS=CS});function NS(t,e,r,n){let i=[],a=Ae(t=>{i.push(t,0)},"addBorder"),o=Ae(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(R.debug("add top border"),a):o)(r),(e.includes("r")?(R.debug("add right border"),a):o)(n),(e.includes("b")?(R.debug("add bottom border"),a):o)(r),(e.includes("l")?(R.debug("add left border"),a):o)(n),t.attr("stroke-dasharray",i.join(" "))}var IS,MS,RS,DS,OS,PS,BS,FS,$S,zS,GS,US,qS,YS,jS,HS,WS,VS,XS,KS,ZS,QS,JS,tA,eA,rA,nA,iA,aA,oA,sA,lA,cA,hA=t(()=>{Q3(),i(),tc(),e(),M_(),eS(),kS(),LS(),AS(),IS=Ae(t=>t?" "+t:"","formatClass"),MS=Ae((t,e)=>`${e||"node default"}${IS(t.classes)} `+IS(t.class),"getClassesFromNode"),RS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=i+a,s=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];return R.info("Question main (Circle)"),(t=TS(r,o,o,s)).attr("style",e.style),_S(e,t),e.intersect=function(t){return R.warn("Intersect called"),xS.polygon(e,s,t)},r},"question"),DS=Ae((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 xS.circle(e,14,t)},t),"choice"),OS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.height+e.padding,a=i/4,o=n.width+2*a+e.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=TS(r,o,i,s);return l.attr("style",e.style),_S(e,l),e.intersect=function(t){return xS.polygon(e,s,t)},r},"hexagon"),PS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,o=n.width+2*a+e.padding,s=N_(e.directions,n,e),l=TS(r,o,i,s);return l.attr("style",e.style),_S(e,l),e.intersect=function(t){return xS.polygon(e,s,t)},r},"block_arrow"),BS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return TS(r,i,a,o).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return xS.polygon(e,o,t)},r},"rect_left_inv_arrow"),FS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=TS(r,i,a,o);return s.attr("style",e.style),_S(e,s),e.intersect=function(t){return xS.polygon(e,o,t)},r},"lean_right"),$S=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=TS(r,i,a,o);return s.attr("style",e.style),_S(e,s),e.intersect=function(t){return xS.polygon(e,o,t)},r},"lean_left"),zS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=TS(r,i,a,o);return s.attr("style",e.style),_S(e,s),e.intersect=function(t){return xS.polygon(e,o,t)},r},"trapezoid"),GS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=TS(r,i,a,o);return s.attr("style",e.style),_S(e,s),e.intersect=function(t){return xS.polygon(e,o,t)},r},"inv_trapezoid"),US=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=TS(r,i,a,o);return s.attr("style",e.style),_S(e,s),e.intersect=function(t){return xS.polygon(e,o,t)},r},"rect_right_inv_arrow"),qS=Ae(async(t,i)=>{let{shapeSvg:e,bbox:r}=await ES(t,i,MS(i,void 0),!0),n=r.width+i.padding,a=n/2,o=a/(2.5+n/50),s=r.height+o+i.padding,l="M 0,"+o+" a "+a+","+o+" 0,0,0 "+n+" 0 a "+a+","+o+" 0,0,0 "+-n+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+n+" 0 l 0,"+-s,c=e.attr("label-offset-y",o).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(s/2+o)+")");return _S(i,c),i.intersect=function(e){var r=xS.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)<i.width/2||Math.abs(n)==i.width/2&&Math.abs(r.y-i.y)>i.height/2-o)){let t=o*o*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=o-t,0<e.y-i.y&&(t=-t),r.y+=t}return r},e},"cylinder"),YS=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await ES(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,s=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-o/2:-r.height/2-n;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",s).attr("y",r).attr("width",a).attr("height",o),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(NS(i,e.props.borders,a,o),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),_S(e,i),e.intersect=function(t){return xS.rect(e,t)},t},"rect"),jS=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await ES(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,s=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-o/2:-r.height/2-n;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",s).attr("y",r).attr("width",a).attr("height",o),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(NS(i,e.props.borders,a,o),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),_S(e,i),e.intersect=function(t){return xS.rect(e,t)},t},"composite"),HS=Ae(async(t,e)=>{var r,t=(await ES(t,e,"label",!0)).shapeSvg,n=(R.trace("Classes = ",e.class),t.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(NS(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{R.warn("Unknown node property "+t)})),_S(e,n),e.intersect=function(t){return xS.rect(e,t)},t},"labelRect"),Ae(NS,"applyNodePropertyBorders"),WS=Ae((t,e)=>{let r,n=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("g").attr("class","label"),s=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof s?s[0]:s,R.info("Label text abc79",l,s,"object"==typeof s),o.node().appendChild(tS(l,e.labelStyle,!0,!0))),h={width:0,height:0};Dl(D().flowchart.htmlLabels)&&(t=c.children[0],d=O(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),R.info("Text 2",s);var u,t=s.slice(1,s.length),d=c.getBBox(),t=o.node().appendChild(tS(t.join?t.join("<br/>"):t,e.labelStyle,!0,!0)),p=(Dl(D().flowchart.htmlLabels)&&(p=t.children[0],u=O(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return O(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),O(c).attr("transform","translate( "+(h.width<d.width?0:-(d.width-h.width)/2)+", 0)"),h=o.node().getBBox(),o.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),i.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),_S(e,i),e.intersect=function(t){return xS.rect(e,t)},n},"rectWithTitle"),VS=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r}=await ES(t,e,MS(e,void 0),!0),n=r.height+e.padding,r=r.width+n/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return _S(e,r),e.intersect=function(t){return xS.rect(e,t)},t},"stadium"),XS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await ES(t,e,MS(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",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),R.info("Circle main"),_S(e,a),e.intersect=function(t){return R.info("Circle intersect",e,n.width/2+i,t),xS.circle(e,n.width/2+i,t)},r},"circle"),KS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await ES(t,e,MS(e,void 0),!0),a=r.insert("g",":first-child"),o=a.insert("circle"),s=a.insert("circle");return a.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),R.info("DoubleCircle main"),_S(e,o),e.intersect=function(t){return R.info("DoubleCircle intersect",e,n.width/2+i+5,t),xS.circle(e,n.width/2+i+5,t)},r},"doublecircle"),ZS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await ES(t,e,MS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=TS(r,i,a,o);return s.attr("style",e.style),_S(e,s),e.intersect=function(t){return xS.polygon(e,o,t)},r},"subroutine"),QS=Ae((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),_S(e,r),e.intersect=function(t){return xS.circle(e,7,t)},t},"start"),JS=Ae((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;return"LR"===r&&(i=10,a=70),t=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),_S(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return xS.rect(e,t)},n},"forkJoin"),tA=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),n=t.insert("circle",":first-child");return n.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),_S(e,n),e.intersect=function(t){return xS.circle(e,7,t)},t},"end"),eA=Ae((t,o)=>{let e=o.padding/2,r,n=(r=o.classes?"node "+o.classes:"node default",t.insert("g").attr("class",r).attr("id",o.domId||o.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=o.classData.annotations?.[0],p=o.classData.annotations[0]?"«"+o.classData.annotations[0]+"»":"",g=h.node().appendChild(tS(p,o.labelStyle,!0,!0)),f=g.getBBox(),m=(Dl(D().flowchart.htmlLabels)&&(t=g.children[0],y=O(g),f=t.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),o.classData.annotations[0]&&(c+=f.height+4,l+=f.width),o.classData.label);var y;void 0!==o.classData.type&&""!==o.classData.type&&(D().flowchart.htmlLabels?m+="<"+o.classData.type+">":m+="<"+o.classData.type+">"),O(t=h.node().appendChild(tS(m,o.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Dl(D().flowchart.htmlLabels)&&(y=t.children[0],w=O(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=(o.classData.members.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(tS(r,e.cssStyle||o.labelStyle,!0,!0))),i=n.getBBox();var a;Dl(D().flowchart.htmlLabels)&&(t=n.children[0],a=O(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);o.classData.methods.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(tS(r,e.cssStyle||o.labelStyle,!0,!0))),i=n.getBBox();var a;Dl(D().flowchart.htmlLabels)&&(t=n.children[0],a=O(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,O(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return O(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=>{O(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,s.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=>{O(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),i.attr("style",o.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+o.padding).attr("height",c+o.padding),_S(o,i),o.intersect=function(t){return xS.rect(o,t)},n},"class_box"),rA={rhombus:RS,composite:jS,question:RS,rect:YS,labelRect:HS,rectWithTitle:WS,choice:DS,circle:XS,doublecircle:KS,stadium:VS,hexagon:OS,block_arrow:PS,rect_left_inv_arrow:BS,lean_right:FS,lean_left:$S,trapezoid:zS,inv_trapezoid:GS,rect_right_inv_arrow:US,cylinder:qS,start:QS,end:tA,note:SS,subroutine:ZS,fork:JS,join:JS,class_box:eA},nA={},iA=Ae(async(e,r,n)=>{let i,a;if(r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await rA[r.shape](i,r,n)}else a=await rA[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),nA[r.id]=i,r.haveCallback&&nA[r.id].attr("class",nA[r.id].attr("class")+" clickable"),i},"insertNode"),aA=Ae((t,e)=>{nA[e.id]=t},"setNodeElem"),oA=Ae(()=>{nA={}},"clear"),sA=Ae(t=>{var e=nA[t.id],r=(R.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")}),uA=t(()=>{Q3(),hA(),lA=Ae((t,e)=>{let r;return"sandbox"===e&&(r=O("#i"+t)),O("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),dA=t(()=>{cA=Ae(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")});function pA(t,e,r){if(t&&t.length){var n,[i,a]=e,e=Math.PI/180*r,o=Math.cos(e),s=Math.sin(e);for(n of t){var[l,c]=n;n[0]=(l-i)*o-(c-a)*s+i,n[1]=(l-i)*s+(c-a)*o+a}}}function gA(t,e){return t[0]===e[0]&&t[1]===e[1]}function fA(t,r,n,e=1){var i=n,n=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(i)for(var o of p)pA(o,a,i);if(r=function(e,i){var t,r=[];for(t of p){var n=[...t];gA(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2<n.length&&r.push(n)}var a,o=[],s=(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]),s.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(s.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)),s.length){let r=[],n=s[0].ymin,t=0;for(;r.length||s.length;){if(s.length){let e=-1;for(let t=0;t<s.length&&!(s[t].ymin>n);t++)e=t;s.splice(0,e+1).forEach(t=>{r.push({s:n,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=n))).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!==i||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;o.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(t=>{t.edge.x=t.edge.x+i*t.edge.islope}),t++}}return o}(n,e),i){for(var s of p)pA(s,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),pA(e,t,n)}}return r}function mA(t,e){let r=e.hachureAngle+90,n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=e.roughness&&.7<((null==(e=e.randomizer)?void 0:e.next())||Math.random())&&(i=n),fA(t,n,r,i||1)}function yA(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 vA(t,e){return t.type===e}function xA(t){let n=[],i=function(t){for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:l9,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:c9,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:h9,text:""},e}(t),a="BOD",o=0,s=i[o];for(;!vA(s,h9);){let e=0,r=[];if("BOD"===a){if("M"!==s.text&&"m"!==s.text)return xA("M0,0"+t);o++,e=u9[s.text],a=s.text}else vA(s,c9)?e=u9[a]:(o++,e=u9[s.text],a=s.text);if(!(o+e<i.length))throw new Error("Path data ended short");for(let t=o;t<o+e;t++){var l=i[t];if(!vA(l,c9))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof u9[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};n.push(c),o+=e,s=i[o],"m"===(a="M"===a?"L":a)&&(a="l")}return n}function bA(t){let r=0,n=0,e=0,i=0,a=[];for(var{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[r,n]=s,[e,i]=s;break;case"m":r+=s[0],n+=s[1],a.push({key:"M",data:[r,n]}),e=r,i=n;break;case"L":a.push({key:"L",data:[...s]}),[r,n]=s;break;case"l":r+=s[0],n+=s[1],a.push({key:"L",data:[r,n]});break;case"C":a.push({key:"C",data:[...s]}),r=s[4],n=s[5];break;case"c":var l=s.map((t,e)=>e%2?t+n:t+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...s]}),r=s[2],n=s[3];break;case"q":l=s.map((t,e)=>e%2?t+n:t+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...s]}),r=s[5],n=s[6];break;case"a":r+=s[5],n+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],r,n]});break;case"H":a.push({key:"H",data:[...s]}),r=s[0];break;case"h":r+=s[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...s]}),r=s[2],n=s[3];break;case"s":var c=s.map((t,e)=>e%2?t+n:t+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...s]}),r=s[0],n=s[1];break;case"t":r+=s[0],n+=s[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=e,n=i}return a}function wA(t){let i=[],a="",o=0,s=0,e=0,r=0,l=0,c=0;for(var{key:n,data:h}of t){switch(n){case"M":i.push({key:"M",data:[...h]}),[o,s]=h,[e,r]=h;break;case"C":i.push({key:"C",data:[...h]}),o=h[4],s=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[o,s]=h;break;case"H":o=h[0],i.push({key:"L",data:[o,s]});break;case"V":s=h[0],i.push({key:"L",data:[o,s]});break;case"S":{let t=0,e;e="C"===a||"S"===a?(t=o+(o-l),s+(s-c)):(t=o,s),i.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],o=h[2],s=h[3];break}case"T":{let[t,e]=h,r=0,n;n="Q"===a||"T"===a?(r=o+(o-l),s+(s-c)):(r=o,s);var u=o+2*(r-o)/3,d=s+2*(n-s)/3,p=t+2*(r-t)/3,g=e+2*(n-e)/3;i.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=n,o=t,s=e;break}case"Q":var[u,d,p,g]=h,f=o+2*(u-o)/3,m=s+2*(d-s)/3;i.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,o=p,s=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?(i.push({key:"C",data:[o,s,b,w,b,w]}),o=b,s=w):o===b&&s===w||(TA(o,s,b,w,f,m,y,v,x).forEach(function(t){i.push({key:"C",data:t})}),o=b,s=w);break;case"Z":i.push({key:"Z",data:[]}),o=e,s=r}a=n}return i}function kA(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function TA(t,e,r,n,i,a,o,s,l,c){var h=Math.PI*o/180;let u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([t,e]=kA(t,e,-h),[r,n]=kA(r,n,-h),1<(m=(y=(t-r)/2)*y/(i*i)+(v=(e-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,s=(s===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=s*i*v/a+(t+r)/2,f=s*-a*y/i+(e+n)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-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,s=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=TA(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,s,i,a,o,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),s=Math.cos(p),o=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*o,n-m*s],t=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[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=kA(u[t][0],u[t][1],h),k=kA(u[t+1][0],u[t+1][1],h),T=kA(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 EA(t,e,r,n,i){return{type:"path",ops:FA(t,e,r,n,i)}}function _A(e,t,r){var n=(e||[]).length;if(2<n){var i=[];for(let t=0;t<n-1;t++)i.push(...FA(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&i.push(...FA(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return 2===n?EA(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function CA(t,e,r,n,i){return _A([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],!0,i)}function SA(t,e){if(t.length){var r="number"==typeof t[0][0]?[t]:t,n=zA(r[0],1+.2*e.roughness,e),i=e.disableMultiStroke?[]:zA(r[0],1.5*(1+.22*e.roughness),DA(e));for(let t=1;t<r.length;t++)if((l=r[t]).length){var a,o,s=zA(l,1+.2*e.roughness,e),l=e.disableMultiStroke?[]:zA(l,1.5*(1+.22*e.roughness),DA(e));for(a of s)"move"!==a.op&&n.push(a);for(o of l)"move"!==o.op&&i.push(o)}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function AA(t,e,r){var n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),n=2*Math.PI/n,t=Math.abs(t/2),e=Math.abs(e/2),i=1-r.curveFitting;return{increment:n,rx:t+=BA(t*i,r),ry:e+=BA(e*i,r)}}function LA(t,e,r,n){let[i,a]=UA(n.increment,t,e,n.rx,n.ry,1,n.increment*PA(.1,PA(.4,1,r),r),r),o=GA(i,null,r);return r.disableMultiStroke||0===r.roughness||([t]=UA(n.increment,t,e,n.rx,n.ry,1.5,0,r),e=GA(t,null,r),o=o.concat(e)),{estimatedPoints:a,opset:{type:"path",ops:o}}}function NA(t,e,r,n,i,a,o,s,l){r=Math.abs(r/2),n=Math.abs(n/2),r+=BA(.01*r,l),n+=BA(.01*n,l);let c=i,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),i=2*Math.PI/l.curveStepCount,i=qA(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=qA(a,t,e,r,n,c,h,1.5,l),i.push(...a)),o&&(s?i.push(...FA(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...FA(t,e,t+r*Math.cos(h),e+n*Math.sin(h),l)):i.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+n*Math.sin(c)]})),{type:"path",ops:i}}function IA(t,e){let r=wA(bA(xA(t))),n=[],i=[0,0],a=[0,0];for(var{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],i=[s[0],s[1]];break;case"L":n.push(...FA(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":var[l,c,h,u,d,p]=s;n.push(...YA(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...FA(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function MA(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2<a){n.push({op:"move",data:[r[0][0]+BA(i,e),r[0][1]+BA(i,e)]});for(let t=1;t<a;t++)n.push({op:"lineTo",data:[r[t][0]+BA(i,e),r[t][1]+BA(i,e)]})}}return{type:"fillPath",ops:n}}function RA(t,r){return function(t){let e=r.fillStyle||"hachure";if(!o9[e])switch(e){case"zigzag":o9[e]||(o9[e]=new e9(t));break;case"cross-hatch":o9[e]||(o9[e]=new r9(t));break;case"dots":o9[e]||(o9[e]=new n9(t));break;case"dashed":o9[e]||(o9[e]=new i9(t));break;case"zigzag-line":o9[e]||(o9[e]=new a9(t));break;default:e="hachure",o9[e]||(o9[e]=new t9(t))}return o9[e]}(d9).fillPolygons(t,r)}function DA(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function OA(t){return t.randomizer||(t.randomizer=new s9(t.seed||0)),t.randomizer.next()}function PA(t,e,r,n=1){return r.roughness*n*(OA(r)*(e-t)+t)}function BA(t,e,r=1){return PA(-t,t,e,r)}function FA(t,e,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,o=$A(t,e,r,n,i,!0,!1);return a?o:(a=$A(t,e,r,n,i,!0,!0),o.concat(a))}function $A(t,e,r,n,i,a,o){let s=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(s),c,h=(c=l<200?1:500<l?.4:-.0016668*l+1.233334,i.maxRandomnessOffset||0),u=(h=h*h*100>s?l/10:h)/2,d=.2+.2*OA(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=BA(p,i,c),g=BA(g,i,c);var f=[],m=Ae(()=>BA(u,i,c),"M"),y=Ae(()=>BA(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(o?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:BA(h,i,c)),e+(v?0:BA(h,i,c))]}),f.push(o?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function zA(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+BA(r,n),e[0][1]+BA(r,n)]),i.push([e[0][0]+BA(r,n),e[0][1]+BA(r,n)]);for(let t=1;t<e.length;t++)i.push([e[t][0]+BA(r,n),e[t][1]+BA(r,n)]),t===e.length-1&&i.push([e[t][0]+BA(r,n),e[t][1]+BA(r,n)]);return GA(i,null,n)}function GA(e,t,r){var n=e.length,i=[];if(3<n){var a,o=[],s=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<n;t++){var l=e[t];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*e[t+1][0]-s*e[t-1][0])/6,l[1]+(s*e[t+1][1]-s*e[t-1][1])/6],o[2]=[e[t+1][0]+(s*e[t][0]-s*e[t+2][0])/6,e[t+1][1]+(s*e[t][1]-s*e[t+2][1])/6],o[3]=[e[t+1][0],e[t+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}t&&2===t.length&&(a=r.maxRandomnessOffset,i.push({op:"lineTo",data:[t[0]+BA(a,r),t[1]+BA(a,r)]}))}else 3===n?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===n&&i.push(...$A(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return i}function UA(e,r,n,i,a,o,t,s){var l=[],c=[];if(0===s.roughness){e/=4,c.push([r+i*Math.cos(-e),n+a*Math.sin(-e)]);for(let t=0;t<=2*Math.PI;t+=e){var h=[r+i*Math.cos(t),n+a*Math.sin(t)];l.push(h),c.push(h)}c.push([r+i*Math.cos(0),n+a*Math.sin(0)]),c.push([r+i*Math.cos(e),n+a*Math.sin(e)])}else{var u=BA(.5,s)-Math.PI/2,d=(c.push([BA(o,s)+r+.9*i*Math.cos(u-e),BA(o,s)+n+.9*a*Math.sin(u-e)]),2*Math.PI+u-.01);for(let t=u;t<d;t+=e){var p=[BA(o,s)+r+i*Math.cos(t),BA(o,s)+n+a*Math.sin(t)];l.push(p),c.push(p)}c.push([BA(o,s)+r+i*Math.cos(u+2*Math.PI+.5*t),BA(o,s)+n+a*Math.sin(u+2*Math.PI+.5*t)]),c.push([BA(o,s)+r+.98*i*Math.cos(u+t),BA(o,s)+n+.98*a*Math.sin(u+t)]),c.push([BA(o,s)+r+.9*i*Math.cos(u+.5*t),BA(o,s)+n+.9*a*Math.sin(u+.5*t)])}return[c,l]}function qA(e,r,n,i,a,o,s,l,c){var o=o+BA(.1,c),h=[];h.push([BA(l,c)+r+.9*i*Math.cos(o-e),BA(l,c)+n+.9*a*Math.sin(o-e)]);for(let t=o;t<=s;t+=e)h.push([BA(l,c)+r+i*Math.cos(t),BA(l,c)+n+a*Math.sin(t)]);return h.push([r+i*Math.cos(s),n+a*Math.sin(s)]),h.push([r+i*Math.cos(s),n+a*Math.sin(s)]),GA(h,null,c)}function YA(e,r,n,i,a,o,s,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:[s[0],s[1]]}):h.push({op:"move",data:[s[0]+(p?0:BA(u[0],l)),s[1]+(p?0:BA(u[0],l))]}),c=p?[a,o]:[a+BA(u[t],l),o+BA(u[t],l)],h.push({op:"bcurveTo",data:[e+BA(u[t],l),r+BA(u[t],l),n+BA(u[t],l),i+BA(u[t],l),c[0],c[1]]});return h}function jA(t){return[...t]}function HA(e,t=0){var r=e.length;if(r<3)throw new Error("A curve must have at least three points.");var n=[];if(3===r)n.push(jA(e[0]),jA(e[1]),jA(e[2]),jA(e[2]));else{var i=[];i.push(e[0],e[0]);for(let t=1;t<e.length;t++)i.push(e[t]),t===e.length-1&&i.push(e[t]);var a=[],o=1-t;n.push(jA(i[0]));for(let t=1;t+2<i.length;t++){var s=i[t];a[0]=[s[0],s[1]],a[1]=[s[0]+(o*i[t+1][0]-o*i[t-1][0])/6,s[1]+(o*i[t+1][1]-o*i[t-1][1])/6],a[2]=[i[t+1][0]+(o*i[t][0]-o*i[t+2][0])/6,i[t+1][1]+(o*i[t][1]-o*i[t+2][1])/6],a[3]=[i[t+1][0],i[t+1][1]],n.push(a[1],a[2],a[3])}}return n}function WA(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function VA(t,e,r){var n=WA(e,r);return 0===n?WA(t,e):(n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n,WA(t,XA(e,r,Math.max(0,Math.min(1,n)))))}function XA(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function KA(l,c,t,e){var r,n,i,a,o,s,e=e||[];return function(){let t=l[c+0],e=l[c+1],r=l[c+2],n=l[c+3],i=3*e[0]-2*t[0]-n[0],a=(i*=i,3*e[1]-2*t[1]-n[1]);a*=a;var o=3*r[0]-2*n[0]-t[0],s=(o*=o,3*r[1]-2*n[1]-t[1]);return s*=s,i<o&&(i=o),a<s&&(a=s),i+a}()<t?(o=l[c+0],(!e.length||(s=e[e.length-1],1<Math.sqrt(WA(s,o))))&&e.push(o),e.push(l[c+3])):(s=l[c+0],o=l[c+1],i=l[c+2],r=l[c+3],n=XA(s,o,.5),o=XA(o,i,.5),i=XA(i,r,.5),a=XA(n,o,.5),o=XA(o,i,.5),KA([s,n,a,s=XA(a,o,.5)],0,t,e),KA([s,o,i,r],0,t,e)),e}function ZA(t,e){return QA(t,0,t.length,e)}function QA(e,r,n,t,i){let a=i||[],o=e[r],s=e[n-1],l=0,c=1;for(let t=r+1;t<n-1;++t){var h=VA(e[t],o,s);h>l&&(l=h,c=t)}return Math.sqrt(l)>t?(QA(e,r,c+1,t,a),QA(e,c,n,t,a)):(a.length||a.push(o),a.push(s)),a}function JA(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t<i;t++)KA(e,3*t,r,n);return t&&0<t?QA(n,0,n.length,t):n}var t9,e9,r9,n9,i9,a9,o9,s9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9=t(()=>{Ae(pA,"t"),Ae(gA,"e"),Ae(fA,"s"),Ae(mA,"n"),t9=class{static{Ae(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=mA(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,n=[];for(r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}},Ae(yA,"a"),e9=class extends t9{static{Ae(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var n,i,t=mA(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,o=[],s=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of t)yA([n,i])&&o.push([[n[0]-s,n[1]+l],[...i]],[[n[0]+s,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(o,e)}}},r9=class extends t9{static{Ae(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}},n9=class{static{Ae(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=mA(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1),e.fillWeight);i<0&&(i=e.strokeWidth/2);var a,o=n/4;for(a of t){var s=yA(a),l=s/n,c=Math.ceil(l)-1,h=s-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t<c;t++){var p=d+h+t*n,g=u-o+2*Math.random()*o,p=p-o+2*Math.random()*o,g=this.helper.ellipse(g,p,i,i,e);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},i9=class{static{Ae(this,"c")}constructor(t){this.helper=t}fillPolygons(t,e){return t=mA(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=yA(t),r=Math.floor(e/(h+u)),n=(e+u-r*(h+u))/2,i=t[0],a=t[1];i[0]>a[0]&&(i=t[1],a=t[0]);var o=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let t=0;t<r;t++){var s=(l=t*(h+u))+h,l=[i[0]+l*Math.cos(o)+n*Math.cos(o),i[1]+l*Math.sin(o)+n*Math.sin(o)],s=[i[0]+s*Math.cos(o)+n*Math.cos(o),i[1]+s*Math.sin(o)+n*Math.sin(o)];d.push(...this.helper.doubleLineOps(l[0],l[1],s[0],s[1],c))}}),d}},a9=class{static{Ae(this,"l")}constructor(t){this.helper=t}fillPolygons(t,e){var r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,n=e.zigzagOffset<0?r:e.zigzagOffset,t=mA(t,e=Object.assign({},e,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(t,n,e)}}zigzagLines(t,c,h){let u=[];return t.forEach(t=>{let e=yA(t),r=Math.round(e/(2*c)),n=t[0],i=t[1];n[0]>i[0]&&(n=t[1],i=t[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let t=0;t<r;t++){var o=2*t*c,s=2*(t+1)*c,l=Math.sqrt(2*Math.pow(c,2)),o=[n[0]+o*Math.cos(a),n[1]+o*Math.sin(a)],s=[n[0]+s*Math.cos(a),n[1]+s*Math.sin(a)],l=[o[0]+l*Math.cos(a+Math.PI/4),o[1]+l*Math.sin(a+Math.PI/4)];u.push(...this.helper.doubleLineOps(o[0],o[1],l[0],l[1],h),...this.helper.doubleLineOps(l[0],l[1],s[0],s[1],h))}}),u}},o9={},s9=class{static{Ae(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()}},u9={A:7,a:7,C:6,c:6,H:c9=1,h:1,L:h9=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:l9=0,z:0},Ae(vA,"k"),Ae(xA,"b"),Ae(bA,"y"),Ae(wA,"m"),Ae(kA,"w"),Ae(TA,"x"),d9={randOffset:Ae(function(t,e){return BA(t,e)},"randOffset"),randOffsetWithRange:Ae(function(t,e,r){return PA(t,e,r)},"randOffsetWithRange"),ellipse:Ae(function(t,e,r,n,i){return LA(t,e,i,AA(r,n,i)).opset},"ellipse"),doubleLineOps:Ae(function(t,e,r,n,i){return FA(t,e,r,n,i,!0)},"doubleLineOps")},Ae(EA,"v"),Ae(_A,"S"),Ae(CA,"O"),Ae(SA,"L"),Ae(AA,"T"),Ae(LA,"D"),Ae(NA,"A"),Ae(IA,"_"),Ae(MA,"I"),Ae(RA,"C"),Ae(DA,"z"),Ae(OA,"W"),Ae(PA,"E"),Ae(BA,"G"),Ae(FA,"$"),Ae($A,"R"),Ae(zA,"j"),Ae(GA,"q"),Ae(UA,"F"),Ae(qA,"V"),Ae(YA,"Z"),Ae(jA,"Q"),Ae(HA,"H"),Ae(WA,"N"),Ae(VA,"B"),Ae(XA,"J"),Ae(KA,"K"),Ae(ZA,"U"),Ae(QA,"X"),Ae(JA,"Y"),p9="none",g9=class{static{Ae(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,n,i){return i=this._o(i),this._d("line",[EA(t,e,r,n,i)],i)}rectangle(t,e,r,n,i){var a=[],o=CA(t,e,r,n,i=this._o(i));return i.fill&&(r=[[t,e],[t+r,e],[t+r,e+n],[t,e+n]],"solid"===i.fillStyle?a.push(MA([r],i)):a.push(RA([r],i))),i.stroke!==p9&&a.push(o),this._d("rectangle",a,i)}ellipse(t,e,r,n,i){var a=[],n=LA(t,e,i=this._o(i),r=AA(r,n,i));return i.fill&&("solid"===i.fillStyle?((t=LA(t,e,i,r).opset).type="fillPath",a.push(t)):a.push(RA([n.estimatedPoints],i))),i.stroke!==p9&&a.push(n.opset),this._d("ellipse",a,i)}circle(t,e,r,n){return(t=this.ellipse(t,e,r,r,n)).shape="circle",t}linearPath(t,e){return e=this._o(e),this._d("linearPath",[_A(t,!1,e)],e)}arc(d,p,g,t,e,r,n=!1,i){var i=this._o(i),a=[],o=NA(d,p,g,t,e,r,n,!0,i);return n&&i.fill&&("solid"===i.fillStyle?(n=Object.assign({},i),(n=NA(d,p,g,t,e,r,n.disableMultiStroke=!0,!1,n)).type="fillPath",a.push(n)):a.push(function(t,e,r,n){var i=d,a=p,o=Math.abs(g/2),s=Math.abs(t/2);o+=BA(.01*o,n),s+=BA(.01*s,n);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)/n.curveStepCount,u=[];for(let t=l;t<=c;t+=h)u.push([i+o*Math.cos(t),a+s*Math.sin(t)]);return u.push([i+o*Math.cos(c),a+s*Math.sin(c)]),u.push([i,a]),RA([u],n)}(t,e,r,i))),i.stroke!==p9&&a.push(o),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=SA(t,r);if(r.fill&&r.fill!==p9)if("solid"===r.fillStyle){var i=SA(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,o=[];if((i=t).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?o.push(...a):3===a.length?o.push(...JA(HA([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):o.push(...JA(HA(a),10,(1+r.roughness)/2));o.length&&e.push(RA([o],r))}return r.stroke!==p9&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=_A(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(MA([t],e)):r.push(RA([t],e))),e.stroke!==p9&&r.push(n),this._d("polygon",r,e)}path(t,e){let r=this._o(e),n=[];var i,a,o,s;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==p9,i=r.stroke!==p9,o=function(t,e){let r=wA(bA(xA(t))),n=[],i=[],a=[0,0],o=[],s=Ae(()=>{4<=o.length&&i.push(...JA(o,1)),o=[]},"i"),l=Ae(()=>{s(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":s(),i.push([h[0],h[1]]);break;case"C":var u;o.length||(u=i.length?i[i.length-1]:a,o.push([u[0],u[1]])),o.push([h[0],h[1]]),o.push([h[2],h[3]]),o.push([h[4],h[5]]);break;case"Z":s(),i.push([a[0],a[1]])}if(l(),!e)return n;var d,p=[];for(d of n){var g=ZA(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),s=IA(t,r),e&&("solid"===r.fillStyle?1===o.length?(e=IA(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(e.ops)})):n.push(MA(o,r)):n.push(RA(o,r))),i)&&(a?o.forEach(t=>{n.push(_A(t,!1,r))}):n.push(s)),this._d("path",n,r)}opsToPath(t,e){let r="";for(var n of t.ops){var i="number"==typeof e&&0<=e?n.data.map(t=>+t.toFixed(e)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(t){var e,r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:p9};break;case"fillPath":t={d:this.opsToPath(e),stroke:p9,strokeWidth:0,fill:n.fill||p9};break;case"fillSketch":t=this.fillSketch(e,n)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||p9,strokeWidth:r,fill:p9}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},f9=class{static{Ae(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new g9(e)}draw(t){var e,r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,e,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var o="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,e,a,o),i.restore();break;case"fillSketch":this.fillSketch(i,e,n)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(var i of e.ops){var a="number"==typeof r&&0<=r?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.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(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t),t}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t),t}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t),t}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),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,n,i,a,o=!1,s){return t=this.gen.arc(t,e,r,n,i,a,o,s),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}},m9="http://www.w3.org/2000/svg",y9=class{static{Ae(this,"ot")}constructor(t,e){this.svg=t,this.gen=new g9(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(m9,"g"),o=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(m9,"path")).setAttribute("d",this.opsToPath(r,o)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(t=i.createElementNS(m9,"path")).setAttribute("d",this.opsToPath(r,o)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(i,r,n)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(t=t.createElementNS(m9,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",n+""),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,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t)}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t)}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t)}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),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,n,i,a,o=!1,s){return t=this.gen.arc(t,e,r,n,i,a,o,s),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)}},v9={canvas:Ae((t,e)=>new f9(t,e),"canvas"),svg:Ae((t,e)=>new y9(t,e),"svg"),generator:Ae(t=>new g9(t),"generator"),newSeed:Ae(()=>g9.newSeed(),"newSeed")}}),k9=t(()=>{x9=Ae((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,o=t.width/2,t=t.height/2,t=Math.abs(e)*o>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=o=a<0?-o:o,0==a?0:o*e/a);return{x:n+r,y:i+t}},"intersectRect"),b9=x9});function T9(t,e){e&&t.attr("style",e)}async function E9(t){let e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&ql(t.label)&&(n=await jl(t.label.replace(L.lineBreakRegex,`
|
|
|
`),D()));var i=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>"),T9(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var _9,C9,S9,A9,L9,N9,I9,M9,R9,D9,O9,P9,B9,F9,$9,z9,G9=t(()=>{Q3(),e(),i(),tc(),K8(),Ae(T9,"applyStyle"),Ae(E9,"addHtmlLabel"),_9=Ae(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),R.info("vertexText"+i),E9({isNode:n,label:V8(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")});var a,o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","title-row"):s.setAttribute("class","row"),s.textContent=a.trim(),o.appendChild(s)}return o},"createLabel"),C9=_9}),U9=t(()=>{S9=Ae((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")}),q9=t(()=>{i(),A9=Ae(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),L9=Ae(t=>({stylesMap:t=N9([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),N9=Ae(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),I9=Ae(t=>{let e=L9(t).stylesArray,r=[],n=[],i=[],a=[];return e.forEach(t=>{var e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),M9=Ae((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=L9(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,stroke:t.get("stroke")||r,seed:n,strokeWidth:1.3},e)},"userNodeOverrides")}),Y9=t(()=>{i(),tc(),e(),dA(),Q3(),w9(),KC(),k9(),G9(),U9(),q9(),R9=Ae(async(n,i)=>{R.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:o,clusterBorder:s}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=I9(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dl(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await XC(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Dl(t.flowchart.htmlLabels)&&(n=g.children[0],m=O(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;R.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=v9.svg(u),e=M9(i,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:a}),r=t.path(S9(y,v,n,m,0),e);(x=u.insert(()=>(R.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=cA(t).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(t){return b9(i,t)},{cluster:u,labelBBox:f}},"rect"),D9=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return b9(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),O9=Ae(async(i,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:o}=t,{altBackground:s,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,u=i.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"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await C9(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Dl(t.flowchart.htmlLabels)&&(i=p.children[0],f=O(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-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=v9.svg(u),r=a.rx||a.ry?e.path(S9(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:o}):e.rectangle(v,x,m,y,{seed:o}),n=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,i,{fill:t?s:l,fillStyle:t?"hachure":"solid",stroke:h,seed:o}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}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",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Dl(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 b9(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),P9=Ae((e,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),n=n.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,o=r.width+a,a=(r.diff=-r.padding,r.height+a),s=r.x-o/2,l=r.y-a/2;r.width=o;let c;if("handDrawn"===r.look){let t=v9.svg(e).rectangle(s,l,o,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=e.insert(()=>t,":first-child")}else(c=t.insert("rect",":first-child")).attr("class","divider").attr("x",s).attr("y",l).attr("width",o).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(t){return b9(r,t)},{cluster:e,labelBBox:{}}},"divider"),B9={rect:R9,squareRect:R9,roundedWithTitle:O9,noteGroup:D9,divider:P9},F9=new Map,$9=Ae(async(t,e)=>{var r=e.shape||"rect",r=await B9[r](t,e);return F9.set(e.id,r),r},"insertCluster"),z9=Ae(()=>{F9=new Map},"clear")});function j9(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=W9(t),e=W9(e);var[t,r]=[t.x,t.y],[e,n]=[e.x,e.y],e=e-t,t=n-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var H9,W9,V9,X9,K9,Z9,Q9=t(()=>{H9={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},Ae(j9,"calculateDeltaAndAngle"),W9=Ae(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),V9=Ae(o=>({x:Ae(function(t,e,r){let n=0;var i,a;return 0===e&&Object.hasOwn(H9,o.arrowTypeStart)?({angle:i,deltaX:a}=j9(r[0],r[1]),n=H9[o.arrowTypeStart]*Math.cos(i)*(0<=a?1:-1)):e===r.length-1&&Object.hasOwn(H9,o.arrowTypeEnd)&&({angle:i,deltaX:a}=j9(r[r.length-1],r[r.length-2]),n=H9[o.arrowTypeEnd]*Math.cos(i)*(0<=a?1:-1)),W9(t).x+n},"x"),y:Ae(function(t,e,r){let n=0;var i,a;return 0===e&&Object.hasOwn(H9,o.arrowTypeStart)?({angle:i,deltaY:a}=j9(r[0],r[1]),n=H9[o.arrowTypeStart]*Math.abs(Math.sin(i))*(0<=a?1:-1)):e===r.length-1&&Object.hasOwn(H9,o.arrowTypeEnd)&&({angle:i,deltaY:a}=j9(r[r.length-1],r[r.length-2]),n=H9[o.arrowTypeEnd]*Math.abs(Math.sin(i))*(0<=a?1:-1)),W9(t).y+n},"y")}),"getLineFunctionsWithOffset")}),J9=t(()=>{e(),X9=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&Z9(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&Z9(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),K9={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Z9=Ae((t,e,r,n,i,a)=>{var o=K9[r];o?t.attr("marker-"+e,`url(${n}#${i}_${a}-${o}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function tL(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function eL(e){var r=[],n=[];for(let t=1;t<e.length-1;t++){var i=e[t-1],a=e[t],o=e[t+1];(i.x===a.x&&a.y===o.y&&5<Math.abs(a.x-o.x)&&5<Math.abs(a.y-i.y)||i.y===a.y&&a.x===o.x&&5<Math.abs(a.x-i.x)&&5<Math.abs(a.y-o.y))&&(r.push(a),n.push(t))}return{cornerPoints:r,cornerPointPositions:n}}var rL,nL,iL,aL,oL,sL,lL,cL,hL,uL,dL,pL,gL,fL,mL,yL,vL,xL,bL,wL,kL,TL,EL,_L,CL,SL,AL,LL=t(()=>{i(),tc(),e(),KC(),K8(),Q9(),dA(),Q3(),w9(),G9(),J9(),rL=new Map,nL=new Map,iL=Ae(()=>{rL.clear(),nL.clear()},"clear"),aL=Ae(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),oL=Ae(async(t,e)=>{var r,n=Dl(D().flowchart.htmlLabels),i=await XC(t,e.label,{style:aL(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(R.info("abc82",e,e.labelType),t.insert("g").attr("class","edgeLabel")),o=a.insert("g").attr("class","label");o.node().appendChild(i);let s=i.getBBox();n&&(n=i.children[0],r=O(i),s=n.getBoundingClientRect(),r.attr("width",s.width),r.attr("height",s.height)),o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),rL.set(e.id,a),e.width=s.width,e.height=s.height;let l;return e.startLabelLeft&&(n=await C9(e.startLabelLeft,aL(e.labelStyle)),o=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=o.node().appendChild(n),a=n.getBBox(),o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),nL.get(e.id)||nL.set(e.id,{}),nL.get(e.id).startLeft=r,tL(l,e.startLabelLeft)),e.startLabelRight&&(n=await C9(e.startLabelRight,aL(e.labelStyle)),a=(o=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=o.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),nL.get(e.id)||nL.set(e.id,{}),nL.get(e.id).startRight=o,tL(l,e.startLabelRight)),e.endLabelLeft&&(n=await C9(e.endLabelLeft,aL(e.labelStyle)),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),o=n.getBBox(),r.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.node().appendChild(n),nL.get(e.id)||nL.set(e.id,{}),nL.get(e.id).endLeft=a,tL(l,e.endLabelLeft)),e.endLabelRight&&(r=await C9(e.endLabelRight,aL(e.labelStyle)),n=(o=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+")"),o.node().appendChild(r),nL.get(e.id)||nL.set(e.id,{}),nL.get(e.id).endRight=o,tL(l,e.endLabelRight)),i},"insertEdgeLabel"),Ae(tL,"setTerminalWidth"),sL=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,rL.get(n.id),i);var a,o=i.updatedPath||i.originalPath,s=D(),s=cA(s).subGraphTitleTotalMargin;if(n.label){let t=rL.get(n.id),e=n.x,r=n.y;o&&(a=H8.calcLabelPosition(o),R.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+s/2})`)}if(n.startLabelLeft){let t=nL.get(n.id).startLeft,e=n.x,r=n.y;o&&(i=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",o),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=nL.get(n.id).startRight,e=n.x,r=n.y;o&&(a=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",o),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=nL.get(n.id).endLeft,e=n.x,r=n.y;o&&(s=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",o),e=s.x,r=s.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=nL.get(n.id).endRight,e=n.x,r=n.y;o&&(i=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",o),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),lL=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n),n=t.width/2,t=t.height/2;return n<=r||t<=e},"outsideNode"),cL=Ae((t,n,i)=>{R.debug(`intersection calc abc89:
|
|
|
outsidePoint: ${JSON.stringify(n)}
|
|
|
insidePoint : ${JSON.stringify(i)}
|
|
|
node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),o=t.width/2,s=i.x<n.x?o-r:o+r,l=t.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x);var u;if(Math.abs(e-n.y)*o>Math.abs(a-n.x)*l)return t=i.y<n.y?n.y-l-e:e-l-n.y,s=h*t/c,u={x:i.x<n.x?i.x+s:i.x-h+s,y:i.y<n.y?i.y+c-t:i.y-c+t},0===s&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),R.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${h}, r `+s,u),u;{let t=c*(s=i.x<n.x?n.x-o-a:a-o-n.x)/h,e=i.x<n.x?i.x+h-s:i.x-h+s,r=i.y<n.y?i.y+t:i.y-t;return R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+s,{_x:e,_y:r}),0===s&&(e=n.x,r=n.y),0===h&&(e=n.x),0===c&&(r=n.y),{x:e,y:r}}},"intersection"),hL=Ae((t,n)=>{R.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],o=!1;return t.forEach(t=>{if(R.info("abc88 checking point",t,n),lL(n,t)||o)R.warn("abc88 outside",t,a),a=t,o||i.push(t);else{let e=cL(n,a,t),r=(R.debug("abc88 inside",t,a,e),R.debug("abc88 intersection",e,n),!1);i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)?R.warn("abc88 no intersect",e,i):i.push(e),o=!0}}),R.debug("returning points",i),i},"cutPathAtIntersect"),Ae(eL,"extractCornerPoints"),uL=Ae(function(t,e,r){var n=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(n*n+t*t);return{x:e.x-r*n,y:e.y-r*t}},"findAdjacentPoint"),dL=Ae(function(n){var t=eL(n).cornerPointPositions,i=[];for(let r=0;r<n.length;r++)if(t.includes(r)){var a=n[r-1],o=n[r+1],s=n[r],l=uL(a,s,5),c=uL(o,s,5),h=c.x-l.x,u=c.y-l.y;i.push(l);let t=2*Math.sqrt(2),e={x:s.x,y:s.y};10<Math.abs(o.x-a.x)&&10<=Math.abs(o.y-a.y)?(R.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y)),e=s.x===l.x?{x:h<0?l.x-5+t:l.x+5-t,y:u<0?l.y-t:l.y+t}:{x:h<0?l.x-t:l.x+t,y:u<0?l.y-5+t:l.y+5-t}):R.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y)),i.push(e,c)}else i.push(n[r]);return i},"fixCorners"),pL=Ae(function(t,e,r,n,i,a,o){let s=D().handDrawnSeed,l=e.points,c=!1,h=i;(i=a).intersect&&h.intersect&&((l=l.slice(1,e.points.length-1)).unshift(h.intersect(l[0])),R.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],i,i.intersect(l[l.length-1])),l.push(i.intersect(l[l.length-1]))),e.toCluster&&(R.info("to cluster abc88",r.get(e.toCluster)),l=hL(e.points,r.get(e.toCluster).node),c=!0),e.fromCluster&&(R.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=hL(l.reverse(),r.get(e.fromCluster).node).reverse(),c=!0);var u,a=l.filter(t=>!Number.isNaN(t.y)),i=(a=dL(a))[a.length-1];1<a.length&&(i=a[a.length-1],r=a[a.length-2],u=(i.x-r.x)/2,i=(i.y-r.y)/2,u={x:r.x+u,y:r.y+i},a.splice(-1,0,u));let d=d4,{x:p,y:g}=(e.curve&&(d=e.curve),V9(e)),f=Kb().x(p).y(g).curve(d),m;switch(e.thickness){case"normal":m="edge-thickness-normal";break;case"thick":m="edge-thickness-thick";break;case"invisible":m="edge-thickness-invisible";break;default:m="edge-thickness-normal"}switch(e.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed";break;default:m+=" edge-pattern-solid"}let y,v=f(a),x=Array.isArray(e.style)?e.style:[e.style],b=("handDrawn"===e.look?(r=v9.svg(t),Object.assign([],a),i=r.path(v,{roughness:.3,seed:s}),m+=" transition",u=(y=O(i).select("path").attr("id",e.id).attr("class"," "+m+(e.classes?" "+e.classes:"")).attr("style",x?x.reduce((t,e)=>t+";"+e,""):"")).attr("d"),y.attr("d",u),t.node().appendChild(y.node())):y=t.append("path").attr("d",v).attr("id",e.id).attr("class"," "+m+(e.classes?" "+e.classes:"")).attr("style",x?x.reduce((t,e)=>t+";"+e,""):""),"");return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",e.arrowTypeStart),R.info("arrowTypeEnd",e.arrowTypeEnd),X9(y,e,b,o,n),a={},c&&(a.updatedPath=l),a.originalPath=e.points,a},"insertEdge")}),NL=t(()=>{e(),gL=Ae((e,t,r,n)=>{t.forEach(t=>{EL[t](e,r,n)})},"insertMarkers"),fL=Ae((t,e,r)=>{R.trace("Making markers for ",r),t.append("defs").append("marker").attr("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"),mL=Ae((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"),yL=Ae((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"),vL=Ae((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"),xL=Ae((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"),bL=Ae((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"),wL=Ae((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"),kL=Ae((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"),TL=Ae((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"),EL={extension:fL,composition:mL,aggregation:yL,dependency:vL,lollipop:xL,point:bL,circle:wL,cross:kL,barb:TL},_L=gL}),IL=t(()=>{KC(),i(),Q3(),tc(),K8(),CL=Ae(async(t,e,r)=>{var n=e.useHtmlLabels||Dl(D().flowchart.htmlLabels),i=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id)),a=i.insert("g").attr("class","label").attr("style",e.labelStyle),o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let s=(r=await XC(a,Sl(V8(o),D()),{useHtmlLabels:n,width:e.width||D().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle})).getBBox(),l=e.padding/2;if(Dl(D().flowchart.htmlLabels)){var t=r.children[0],r=O(r),c=t.getElementsByTagName("img");if(c){let n=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...c].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=(D().fontSize?D():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)}Ae(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}s=t.getBoundingClientRect(),r.attr("width",s.width),r.attr("height",s.height)}return n?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),e.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:i,bbox:s,halfPadding:l,label:a}},"labelHelper"),SL=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),AL=Ae((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses")});function ML(t,e){return t.intersect(e)}var RL,DL=t(()=>{Ae(ML,"intersectNode"),RL=ML});function OL(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,o=t-n.y,s=Math.sqrt(e*e*o*o+r*r*a*a),a=Math.abs(e*r*a/s),e=(n.x<i&&(a=-a),Math.abs(e*r*o/s));return{x:i+a,y:t+(e=n.y<t?-e:e)}}var PL,BL=t(()=>{Ae(OL,"intersectEllipse"),PL=OL});function FL(t,e,r){return PL(t,e,e,r)}var $L,zL=t(()=>{BL(),Ae(FL,"intersectCircle"),$L=FL});function GL(t,e,r,n){var i,a,o,s,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*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0<u*d||(i=n.y-r.y,a=r.x-n.x,o=n.x*r.y-r.x*n.y,u=i*t.x+a*t.y+o,d=i*e.x+a*e.y+o,0!==u&&0!==d&&0<u*d)||0==(s=l*a-i*c)))return r=Math.abs(s/2),{x:(n=c*o-a*h)<0?(n-r)/s:(n+r)/s,y:(n=i*h-l*o)<0?(n-r)/s:(n+r)/s}}function UL(t,e){return 0<t*e}var qL,YL=t(()=>{Ae(GL,"intersectLine"),Ae(UL,"sameSign"),qL=GL});function jL(e,r,n){let t=e.x,i=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,r.x),s=Math.min(s,r.y));var l=t-e.width/2-o,c=i-e.height/2-s;for(let t=0;t<r.length;t++){var h=r[t],u=r[t<r.length-1?t+1:0];(h=qL(e,n,{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-n.x,t=t.y-n.y,r=Math.sqrt(r*r+t*t),t=e.x-n.x,e=e.y-n.y;return r<(t=Math.sqrt(t*t+e*e))?-1:r===t?0:1}),a[0]):e}var HL,WL,VL,XL,KL,ZL,QL,JL,tN,eN,rN,nN,iN,aN=t(()=>{YL(),Ae(jL,"intersectPolygon"),HL=jL}),oN=t(()=>{DL(),zL(),BL(),aN(),k9(),WL={node:RL,circle:$L,ellipse:PL,polygon:HL,rect:b9}}),sN=t(()=>{IL(),oN(),U9(),q9(),w9(),VL=Ae(async(t,n,e)=>{var{labelStyles:r,nodeStyles:i}=I9(n);n.labelStyle=r;let{shapeSvg:a,bbox:o}=await CL(t,n,AL(n)),s=Math.max(o.width+2*e.labelPaddingX,n?.width||0),l=Math.max(o.height+2*e.labelPaddingY,n?.height||0),c=-s/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===n.look){let t=v9.svg(a),e=M9(n,{}),r=d||p?t.path(S9(c,h,s,l,d||0),e):t.rectangle(c,h,s,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",g)}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",d).attr("data-id","abc").attr("data-et","node").attr("ry",p).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return SL(n,u),n.intersect=function(t){return WL.rect(n,t)},a},"drawRect")}),lN=t(()=>{sN(),XL=Ae(async(t,e)=>VL(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state")}),cN=t(()=>{sN(),KL=Ae(async(t,e)=>{var r={rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)};return VL(t,e,r)},"roundedRect")}),hN=t(()=>{sN(),ZL=Ae(async(t,e)=>{var r={rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return VL(t,e,r)},"squareRect")}),uN=t(()=>{IL(),oN(),w9(),q9(),i(),QL=Ae((t,e)=>{let r=D().themeVariables,n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=v9.svg(i).circle(0,0,14,A9(n));a=i.insert(()=>t)}else a=i.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),SL(e,a),e.intersect=function(t){return WL.circle(e,7,t)},i},"stateStart")}),dN=t(()=>{IL(),oN(),w9(),q9(),i(),JL=Ae((t,e)=>{let r=D().themeVariables,n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a,o;if("handDrawn"===e.look){let t=v9.svg(i),e=t.circle(0,0,14,{...A9(n),roughness:.5}),r=t.circle(0,0,5,{...A9(n),fillStyle:"solid"});a=i.insert(()=>e),o=i.insert(()=>r)}else o=i.insert("circle",":first-child"),(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),o.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return SL(e,a),e.intersect=function(t){return WL.circle(e,7,t)},i},"stateEnd")}),pN=t(()=>{IL(),oN(),w9(),q9(),i(),tN=Ae((t,e,r)=>{let n=D().themeVariables,i=n.lineColor,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=70,s=10,l=("LR"===r&&(o=10,s=70),-1*o/2),c=-1*s/2,h;if("handDrawn"===e.look){let t=v9.svg(a).rectangle(l,c,o,s,A9(i));h=a.insert(()=>t)}else h=a.append("rect").attr("x",l).attr("y",c).attr("width",o).attr("height",s).attr("class","fork-join");SL(e,h);let u=0,d=0,p=10;return e.height&&(u=e.height),e.width&&(d=e.width),e.padding&&(p=e.padding),e.height=u+p/2,e.width=d+p/2,e.intersect=function(t){return WL.rect(e,t)},a},"forkJoin")}),gN=t(()=>{oN(),w9(),q9(),i(),eN=Ae((t,e)=>{var{labelStyles:r,nodeStyles:n}=I9(e);e.labelStyle=r;let i=D().themeVariables,a=i.lineColor,o=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}],l;if("handDrawn"===e.look){let t=v9.svg(o),e=s.map(function(t){return[t.x,t.y]}),r=t.polygon(e,A9(a));l=o.insert(()=>r)}else l=o.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" "));return l.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return WL.circle(e,14,t)},o},"choice")}),fN=t(()=>{e(),IL(),oN(),i(),w9(),rN=Ae(async(e,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),{noteBorderColor:n,noteBkgColor:a}=n,{shapeSvg:e,bbox:t}=(r.useHtmlLabels||(r.centerLabel=!0),await CL(e,r,"node "+r.cssClasses));R.info("Classes = ",r.cssClasses);let o=r.cssStyles,s,l=t.width+r.padding,c=t.height+r.padding,h=-l/2,u=-c/2;if("handDrawn"===r.look){let t=v9.svg(e).rectangle(h,u,l,c,{roughness:.7,fill:a,fillWeight:3,seed:i,stroke:n});(s=e.insert(()=>t,":first-child")).attr("class","basic label-container").attr("style",o)}else(s=e.insert("rect",":first-child")).attr("rx",r.rx).attr("ry",r.ry).attr("x",h).attr("y",u).attr("width",l).attr("height",c);return SL(r,s),r.intersect=function(t){return WL.rect(r,t)},e},"note")}),mN=t(()=>{IL(),oN(),q9(),w9(),U9(),nN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.height+i.padding,s=n.width+o/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=S9(-s/2,-o/2,s,o,o/2),n=t.path(r,e);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",c)}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return SL(i,l),i.intersect=function(t){return WL.rect(i,t)},a},"stadium")}),yN=t(()=>{Q3(),tc(),IL(),G9(),oN(),q9(),w9(),i(),U9(),e(),iN=Ae(async(i,a)=>{var{labelStyles:t,nodeStyles:e}=I9(a);a.labelStyle=t;let r,o=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=o.insert("g"),s=o.insert("g").attr("class","label").attr("style",e),l=a.description,c=a.label,h=s.node().appendChild(await C9(c,a.labelStyle,!0,!0)),u={width:0,height:0};Dl(D()?.flowchart?.htmlLabels)&&(t=h.children[0],i=O(h),u=t.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),R.info("Text 2",l);var t=l||[],i=h.getBBox(),d=(t=s.node().appendChild(await C9(t.join?t.join("<br/>"):t,a.labelStyle,!0,!0))).children[0],p=O(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);O(t).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),O(h).attr("transform","translate( "+(u.width<i.width?0:-(i.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.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=v9.svg(o),e=M9(a,{}),r=t.path(S9(m,y,g,f,a.rx||0),e),n=t.line(-u.width/2-d,-u.height/2-d+i.height+d,u.width/2+d,-u.height/2-d+i.height+d,e);x=o.insert(()=>(R.debug("Rough node insert CXC",r),n),":first-child"),v=o.insert(()=>(R.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.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+i.height+d).attr("y2",-u.height/2-d+i.height+d);return SL(a,v),a.intersect=function(t){return WL.rect(a,t)},o},"rectWithTitle")});function vN(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var xN,bN,wN,kN,TN,EN,_N,CN,SN,AN,LN,NN,IN,MN,RN,DN,ON,PN,BN,FN,$N,zN,GN,UN,qN,YN,jN,HN,WN,VN=t(()=>{Ae(vN,"insertPolygonShape")}),XN=t(()=>{IL(),oN(),q9(),w9(),VN(),xN=Ae(async(a,o)=>{var{labelStyles:s,nodeStyles:t}=I9(o);o.labelStyle=s;let{shapeSvg:l,bbox:e}=await CL(a,o,AL(o)),r=(o?.padding||0)/2,c=e.width+o.padding,h=e.height+o.padding,u=-e.width/2-r,d=-e.height/2-r,n=[{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"===o.look){let t=v9.svg(l),e=M9(o,{}),r=t.rectangle(u-8,d,c+16,h,e),n=t.line(u,d,u,d+h,e),i=t.line(u+c,d,u+c,d+h,e);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),s=l.insert(()=>r,":first-child"),a=o.cssStyles,s.attr("class","basic label-container").attr("style",a),SL(o,s)}else a=vN(l,c,h,n),t&&a.attr("style",t),SL(o,a);return o.intersect=function(t){return WL.polygon(o,n,t)},l},"subroutine")}),KN=t(()=>{IL(),oN(),q9(),w9(),bN=Ae((t,e,r,n,i,a)=>[`M${t},`+(e+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),wN=Ae((t,e,r,n,i,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),kN=Ae((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),TN=Ae(async(t,a)=>{var{labelStyles:e,nodeStyles:r}=I9(a);a.labelStyle=e;let{shapeSvg:o,bbox:n}=await CL(t,a,AL(a)),s=n.width+a.padding,l=s/2,c=l/(2.5+s/50),h=n.height+c+a.padding,u,d=a.cssStyles;if("handDrawn"===a.look){let t=v9.svg(o),e=wN(0,0,s,h,l,c),r=kN(0,c,s,h,l,c),n=t.path(e,M9(a,{})),i=t.path(r,M9(a,{fill:"none"}));u=o.insert(()=>i,":first-child"),(u=o.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else e=bN(0,0,s,h,l,c),u=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",d).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),SL(a,u),a.intersect=function(e){var r=WL.rect(a,e),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let t=c*c*(1-n*n/(l*l));0<t&&(t=Math.sqrt(t)),t=c-t,0<e.y-(a.y??0)&&(t=-t),r.y+=t}return r},o},"cylinder")}),ZN=t(()=>{e(),IL(),oN(),q9(),w9(),EN=Ae(async(t,n)=>{var{labelStyles:e,nodeStyles:r}=I9(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:o}=await CL(t,n,AL(n)),s=a.width/2+o,l,c=n.cssStyles;if("handDrawn"===n.look){let t=v9.svg(i),e=M9(n,{}),r=t.circle(0,0,2*s,e);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",c)}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",s).attr("cx",0).attr("cy",0);return SL(n,l),n.intersect=function(t){return R.info("Circle intersect",n,s,t),WL.circle(n,s,t)},i},"circle")}),QN=t(()=>{e(),IL(),oN(),q9(),w9(),_N=Ae(async(t,e)=>{var r,{labelStyles:n,nodeStyles:i}=I9(e);e.labelStyle=n;let{shapeSvg:a,bbox:o,halfPadding:s}=await CL(t,e,AL(e)),l=o.width/2+s+5,c=o.width/2+s,h,u=e.cssStyles;return"handDrawn"===e.look?(n=v9.svg(a),t=M9(e,{roughness:.2,strokeWidth:2.5}),r=M9(e,{roughness:.2,strokeWidth:1.5}),t=n.circle(0,0,2*l,t),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",e.cssClasses).attr("style",u),h.node()?.appendChild(t),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),SL(e,h),e.intersect=function(t){return R.info("DoubleCircle intersect",e,l,t),WL.circle(e,l,t)},a},"doublecircle")}),JN=t(()=>{IL(),oN(),q9(),w9(),VN(),CN=Ae((t,e,r,n)=>[`M${t-n/2},`+e,`L${t+r},`+e,`L${t+r},`+(e-n),`L${t-n/2},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createPolygonPathD"),SN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:-s/2,y:0},{x:o,y:0},{x:o,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=CN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o+s,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"rect_left_inv_arrow")}),tI=t(()=>{e(),IL(),oN(),q9(),w9(),VN(),AN=Ae((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"),LN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=o+s,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=AN(0,0,l),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=vN(a,l,l,c);return r&&h.attr("style",r),SL(i,h),i.intersect=function(t){return R.debug(`APA12 Intersect called SPLIT
|
|
|
point:`,t,`
|
|
|
node:
|
|
|
`,i,`
|
|
|
res:`,WL.polygon(i,c,t)),WL.polygon(i,c,t)},a},"question")}),eI=t(()=>{IL(),oN(),q9(),w9(),VN(),NN=Ae((t,e,r,n,i)=>[`M${t+i},`+e,`L${t+r-i},`+e,`L${t+r},`+(e-n/2),`L${t+r-i},`+(e-n),`L${t+i},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createHexagonPathD"),IN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.height+i.padding,s=o/4,l=n.width+2*s+i.padding,c=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=NN(0,0,l,o,s),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),u&&h.attr("style",u)}else h=vN(a,l,o,c);return r&&h.attr("style",r),i.width=l,i.height=o,SL(i,h),i.intersect=function(t){return WL.polygon(i,c,t)},a},"hexagon")}),rI=t(()=>{IL(),oN(),q9(),w9(),VN(),MN=Ae((t,e,r,n)=>[`M${t-2*n/6},`+e,`L${t+r-n/6},`+e,`L${t+r+2*n/6},`+(e-n),`L${t+n/6},`+(e-n),"Z"].join(" "),"createLeanRightPathD"),RN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:-2*s/6,y:0},{x:o-s/6,y:0},{x:o+2*s/6,y:-s},{x:s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=MN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"lean_right")}),nI=t(()=>{IL(),oN(),q9(),w9(),VN(),DN=Ae((t,e,r,n)=>[`M${t+2*n/6},`+e,`L${t+r+n/6},`+e,`L${t+r-2*n/6},`+(e-n),`L${t-n/6},`+(e-n),"Z"].join(" "),"createLeanLeftPathD"),ON=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:2*s/6,y:0},{x:o+s/6,y:0},{x:o-2*s/6,y:-s},{x:-s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=DN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"lean_left")}),iI=t(()=>{IL(),oN(),q9(),w9(),VN(),PN=Ae((t,e,r,n)=>[`M${t-2*n/6},`+e,`L${t+r+2*n/6},`+e,`L${t+r-n/6},`+(e-n),`L${t+n/6},`+(e-n),"Z"].join(" "),"createTrapezoidPathD"),BN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:-2*s/6,y:0},{x:o+2*s/6,y:0},{x:o-s/6,y:-s},{x:s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=PN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"trapezoid")}),aI=t(()=>{IL(),oN(),q9(),w9(),VN(),FN=Ae((t,e,r,n)=>[`M${t+n/6},`+e,`L${t+r-n/6},`+e,`L${t+r+2*n/6},`+(e-n),`L${t-2*n/6},`+(e-n),"Z"].join(" "),"createInvertedTrapezoidPathD"),$N=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:s/6,y:0},{x:o-s/6,y:0},{x:o+2*s/6,y:-s},{x:-2*s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=FN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"inv_trapezoid")}),oI=t(()=>{sN(),IL(),oN(),zN=Ae(async(t,e)=>{var r=(t=(await CL(t,e,"label")).shapeSvg).insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),SL(e,r),e.intersect=function(t){return WL.rect(e,t)},t},"labelRect")}),sI=t(()=>{e(),lN(),cN(),hN(),uN(),dN(),pN(),gN(),fN(),mN(),yN(),i(),XN(),KN(),ZN(),QN(),JN(),tI(),eI(),rI(),nI(),iI(),aI(),oI(),GN={state:XL,stateStart:QL,stateEnd:JL,fork:tN,join:tN,choice:eN,note:rN,roundedRect:KL,rectWithTitle:iN,squareRect:ZL,stadium:nN,subroutine:xN,cylinder:TN,circle:EN,doublecircle:_N,odd:SN,diamond:LN,hexagon:IN,lean_right:RN,lean_left:ON,trapezoid:BN,inv_trapezoid:$N,labelRect:zN},UN=new Map,qN=Ae(async(e,r,n)=>{let i,a;if("rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect"),r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await GN[r.shape](i,r,n)}else a=await GN[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),UN.set(r.id,i),r.haveCallback&&UN.get(r.id).attr("class",UN.get(r.id).attr("class")+" clickable"),i},"insertNode"),YN=Ae((t,e)=>{UN.set(e.id,t)},"setNodeElem"),jN=Ae(()=>{UN.clear()},"clear"),HN=Ae(t=>{var e=UN.get(t.id),r=(R.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")}),lI=t(()=>{Mn(),tc(),e(),Y9(),LL(),NL(),sI(),IL(),K8(),WN={common:L,getConfig:Rr,insertCluster:$9,insertEdge:pL,insertEdgeLabel:oL,insertMarkers:_L,insertNode:qN,interpolateToCurve:c8,labelHelper:CL,log:R,positionEdgeLabel:sL}});function cI(t){return"symbol"==typeof t||Uk(t)&&"[object Symbol]"==b5(t)}var hI,uI=t(()=>{w5(),qk(),Ae(cI,"isSymbol"),hI=cI});function dI(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var pI,gI=t(()=>{Ae(dI,"arrayMap"),pI=dI});function fI(t){var e;return"string"==typeof t?t:Zk(t)?pI(t,fI)+"":hI(t)?vI?vI.call(t):"":"0"==(e=t+"")&&1/t==-mI?"-0":e}var mI,yI,vI,xI,bI=t(()=>{a5(),gI(),t7(),uI(),mI=1/0,yI=W3?W3.prototype:void 0,vI=yI?yI.toString:void 0,Ae(fI,"baseToString"),xI=fI});function wI(t){for(var e=t.length;e--&&kI.test(t.charAt(e)););return e}var kI,TI,EI=t(()=>{kI=/\s/,Ae(wI,"trimmedEndIndex"),TI=wI});function _I(t){return t&&t.slice(0,TI(t)+1).replace(CI,"")}var CI,SI,AI=t(()=>{EI(),CI=/^\s+/,Ae(_I,"baseTrim"),SI=_I});function LI(t){if("number"==typeof t)return t;if(hI(t))return NI;if(T5(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=T5(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=SI(t);var e=MI.test(t);return e||RI.test(t)?DI(t.slice(2),e?2:8):II.test(t)?NI:+t}var NI,II,MI,RI,DI,OI,PI=t(()=>{AI(),E5(),uI(),NI=NaN,II=/^[-+]0x[0-9a-f]+$/i,MI=/^0b[01]+$/i,RI=/^0o[0-7]+$/i,DI=parseInt,Ae(LI,"toNumber"),OI=LI});function BI(t){return t?(t=OI(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var FI,$I=t(()=>{PI(),Ae(BI,"toFinite"),FI=BI});function zI(t){var e=(t=FI(t))%1;return t==t?e?t-e:t:0}var GI,UI,qI,YI=t(()=>{$I(),Ae(zI,"toInteger"),GI=zI}),jI=t(()=>{e6(),i5(),UI=Q5(j3,"WeakMap"),qI=UI});function HI(){}var WI,VI=t(()=>{Ae(HI,"noop"),WI=HI});function XI(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}var KI,ZI=t(()=>{Ae(XI,"arrayEach"),KI=XI});function QI(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var JI,tM=t(()=>{Ae(QI,"baseFindIndex"),JI=QI});function eM(t){return t!=t}var rM,nM=t(()=>{Ae(eM,"baseIsNaN"),rM=eM});function iM(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var aM,oM=t(()=>{Ae(iM,"strictIndexOf"),aM=iM});function sM(t,e,r){return e==e?aM(t,e,r):JI(t,rM,r)}var lM,cM=t(()=>{tM(),nM(),oM(),Ae(sM,"baseIndexOf"),lM=sM});function hM(t,e){return!(null==t||!t.length)&&-1<lM(t,e,0)}var uM,dM,pM,gM=t(()=>{cM(),Ae(hM,"arrayIncludes"),uM=hM}),fM=t(()=>{Mk(),dM=Lk(Object.keys,Object),pM=dM});function mM(t){if(!Pk(t))return pM(t);var e,r=[];for(e in Object(t))vM.call(t,e)&&"constructor"!=e&&r.push(e);return r}var yM,vM,xM,bM=t(()=>{Bk(),fM(),yM=Object.prototype,vM=yM.hasOwnProperty,Ae(mM,"baseKeys"),xM=mM});function wM(t){return(a7(t)?sT:xM)(t)}var kM,TM,EM,_M,CM=t(()=>{lT(),bM(),o7(),Ae(wM,"keys"),kM=wM}),SM=t(()=>{W7(),K7(),s8(),o7(),Bk(),CM(),EM=Object.prototype,TM=EM.hasOwnProperty,EM=i8(function(t,e){if(Pk(e)||a7(e))X7(e,kM(e),t);else for(var r in e)TM.call(e,r)&&H7(t,r,e[r])}),_M=EM});function AM(t,e){var r;return!Zk(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!hI(t))||NM.test(t)||!LM.test(t)||null!=e&&t in Object(e))}var LM,NM,IM,MM=t(()=>{t7(),uI(),LM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NM=/^\w*$/,Ae(AM,"isKey"),IM=AM});function RM(t){var e=(t=Cw(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var DM,OM,PM,BM,FM,$M=t(()=>{Sw(),Ae(RM,"memoizeCapped"),DM=RM}),zM=t(()=>{$M(),OM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PM=/\\(\\)?/g,BM=DM(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(OM,function(t,e,r,n){i.push(r?n.replace(PM,"$1"):e||t)}),i}),FM=BM});function GM(t){return null==t?"":xI(t)}var UM,qM=t(()=>{bI(),Ae(GM,"toString"),UM=GM});function YM(t,e){return Zk(t)?t:IM(t,e)?[t]:FM(UM(t))}var jM,HM=t(()=>{t7(),MM(),zM(),qM(),Ae(YM,"castPath"),jM=YM});function WM(t){var e;return"string"==typeof t||hI(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var VM,XM=t(()=>{uI(),Ae(WM,"toKey"),VM=WM});function KM(t,e){for(var r=0,n=(e=jM(e,t)).length;null!=t&&r<n;)t=t[VM(e[r++])];return r&&r==n?t:void 0}var ZM,QM=t(()=>{HM(),XM(),Ae(KM,"baseGet"),ZM=KM});function JM(t,e,r){return void 0===(t=null==t?void 0:ZM(t,e))?r:t}var tR,eR=t(()=>{QM(),Ae(JM,"get"),tR=JM});function rR(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var nR,iR=t(()=>{Ae(rR,"arrayPush"),nR=rR});function aR(t){return Zk(t)||Xk(t)||!!(oR&&t&&t[oR])}var oR,sR,lR=t(()=>{a5(),Jk(),t7(),oR=W3?W3.isConcatSpreadable:void 0,Ae(aR,"isFlattenable"),sR=aR});function cR(t,e,r,n,i){var a=-1,o=t.length;for(r=r||sR,i=i||[];++a<o;){var s=t[a];0<e&&r(s)?1<e?cR(s,e-1,r,n,i):nR(i,s):n||(i[i.length]=s)}return i}var hR,uR=t(()=>{iR(),lR(),Ae(cR,"baseFlatten"),hR=cR});function dR(t){return null!=t&&t.length?hR(t,1):[]}var pR,gR=t(()=>{uR(),Ae(dR,"flatten"),pR=dR});function fR(t){return VT(BT(t,void 0,pR),t+"")}var mR,yR=t(()=>{gR(),FT(),KT(),Ae(fR,"flatRest"),mR=fR});function vR(t,e,r){var n=-1,i=t.length;(r=i<r?i:r)<0&&(r+=i),i=r<(e=e<0?i<-e?0:i+e:e)?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}var xR,bR=t(()=>{Ae(vR,"baseSlice"),xR=vR});function wR(t){return kR.test(t)}var kR,TR,ER=t(()=>{kR=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ae(wR,"hasUnicode"),TR=wR});function _R(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}var CR,SR=t(()=>{Ae(_R,"arrayReduce"),CR=_R});function AR(t,e){return t&&X7(e,kM(e),t)}var LR,NR=t(()=>{K7(),CM(),Ae(AR,"baseAssign"),LR=AR});function IR(t,e){return t&&X7(e,vT(e),t)}var MR,RR=t(()=>{K7(),xT(),Ae(IR,"baseAssignIn"),MR=IR});function DR(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}var OR,PR=t(()=>{Ae(DR,"arrayFilter"),OR=DR});function BR(){return[]}var FR,$R,zR,GR,UR,qR=t(()=>{Ae(BR,"stubArray"),FR=BR}),YR=t(()=>{PR(),qR(),$R=Object.prototype,zR=$R.propertyIsEnumerable,GR=Object.getOwnPropertySymbols,UR=GR?function(e){return null==e?[]:(e=Object(e),OR(GR(e),function(t){return zR.call(e,t)}))}:FR});function jR(t,e){return X7(t,UR(t),e)}var HR,WR,VR,XR=t(()=>{K7(),YR(),Ae(jR,"copySymbols"),HR=jR}),KR=t(()=>{iR(),Rk(),YR(),qR(),WR=Object.getOwnPropertySymbols,VR=WR?function(t){for(var e=[];t;)nR(e,UR(t)),t=Ik(t);return e}:FR});function ZR(t,e){return X7(t,VR(t),e)}var QR,JR=t(()=>{K7(),KR(),Ae(ZR,"copySymbolsIn"),QR=ZR});function tD(t,e,r){return e=e(t),Zk(t)?e:nR(e,r(t))}var eD,rD=t(()=>{iR(),t7(),Ae(tD,"baseGetAllKeys"),eD=tD});function nD(t){return eD(t,kM,UR)}var iD,aD=t(()=>{rD(),YR(),CM(),Ae(nD,"getAllKeys"),iD=nD});function oD(t){return eD(t,vT,VR)}var sD,lD,cD,hD,uD,dD,pD,gD,fD,mD,yD,vD,xD,bD,wD,kD,TD,ED,_D,CD=t(()=>{rD(),KR(),xT(),Ae(oD,"getAllKeysIn"),sD=oD}),SD=t(()=>{e6(),i5(),lD=Q5(j3,"DataView"),cD=lD}),AD=t(()=>{e6(),i5(),hD=Q5(j3,"Promise"),uD=hD}),LD=t(()=>{e6(),i5(),dD=Q5(j3,"Set"),pD=dD}),ND=t(()=>{SD(),J6(),AD(),LD(),jI(),w5(),$5(),gD="[object Map]",fD="[object Promise]",mD="[object Set]",yD="[object WeakMap]",vD="[object DataView]",xD=F5(cD),bD=F5(Z6),wD=F5(uD),kD=F5(pD),TD=F5(qI),ED=b5,(cD&&ED(new cD(new ArrayBuffer(1)))!=vD||Z6&&ED(new Z6)!=gD||uD&&ED(uD.resolve())!=fD||pD&&ED(new pD)!=mD||qI&&ED(new qI)!=yD)&&(ED=Ae(function(t){var e=b5(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?F5(t):"")switch(t){case xD:return vD;case bD:return gD;case wD:return fD;case kD:return mD;case TD:return yD}return e},"getTag")),_D=ED});function ID(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&RD.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var MD,RD,DD,OD=t(()=>{MD=Object.prototype,RD=MD.hasOwnProperty,Ae(ID,"initCloneArray"),DD=ID});function PD(t,e){return e=e?yk(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var BD,FD=t(()=>{vk(),Ae(PD,"cloneDataView"),BD=PD});function $D(t){var e=new t.constructor(t.source,zD.exec(t));return e.lastIndex=t.lastIndex,e}var zD,GD,UD=t(()=>{zD=/\w*$/,Ae($D,"cloneRegExp"),GD=$D});function qD(t){return jD?Object(jD.call(t)):{}}var YD,jD,HD,WD=t(()=>{a5(),YD=W3?W3.prototype:void 0,jD=YD?YD.valueOf:void 0,Ae(qD,"cloneSymbol"),HD=qD});function VD(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return yk(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return BD(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 bk(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return GD(t);case"[object Set]":return new n;case"[object Symbol]":return HD(t)}}var XD,KD=t(()=>{vk(),FD(),UD(),WD(),wk(),Ae(VD,"initCloneByTag"),XD=VD});function ZD(t){return Uk(t)&&"[object Map]"==_D(t)}var QD,JD,tO,eO=t(()=>{ND(),qk(),Ae(ZD,"baseIsMap"),QD=ZD}),rO=t(()=>{eO(),B7(),F7(),JD=(JD=D7&&D7.isMap)?N7(JD):QD,tO=JD});function nO(t){return Uk(t)&&"[object Set]"==_D(t)}var iO,aO,oO,sO=t(()=>{ND(),qk(),Ae(nO,"baseIsSet"),iO=nO}),lO=t(()=>{sO(),B7(),F7(),aO=(aO=D7&&D7.isSet)?N7(aO):iO,oO=aO});function cO(r,n,i,t,e,a){var o,s=n&hO,l=n&uO,c=n&dO;if(void 0===(o=i?e?i(r,t,e,a):i(r):o)){if(!T5(r))return r;if(t=Zk(r)){if(o=DD(r),!s)return Tk(r,o)}else{var h=_D(r),u=h==gO||h==fO;if(g7(r))return uk(r,s);if(h==mO||h==pO||u&&!e){if(o=l||u?{}:$k(r),!s)return l?QR(r,MR(o,r)):HR(r,LR(o,r))}else{if(!yO[h])return e?r:{};o=XD(r,h,s)}}if(u=(a=a||new Yw).get(r))return u;a.set(r,o),oO(r)?r.forEach(function(t){o.add(cO(t,n,i,t,r,a))}):tO(r)&&r.forEach(function(t,e){o.set(e,cO(t,n,i,e,r,a))});var d=t?void 0:(c?l?sD:iD:l?vT:kM)(r);KI(d||r,function(t,e){d&&(t=r[e=t]),H7(o,e,cO(t,n,i,e,r,a))})}return o}var hO,uO,dO,pO,gO,fO,mO,yO,vO,xO=t(()=>{Ww(),ZI(),W7(),NR(),RR(),gk(),Ck(),XR(),JR(),aD(),CD(),ND(),OD(),KD(),zk(),t7(),m7(),rO(),E5(),lO(),CM(),xT(),hO=1,uO=2,dO=4,gO="[object Function]",fO="[object GeneratorFunction]",mO="[object Object]",(yO={})[pO="[object Arguments]"]=yO["[object Array]"]=yO["[object ArrayBuffer]"]=yO["[object DataView]"]=yO["[object Boolean]"]=yO["[object Date]"]=yO["[object Float32Array]"]=yO["[object Float64Array]"]=yO["[object Int8Array]"]=yO["[object Int16Array]"]=yO["[object Int32Array]"]=yO["[object Map]"]=yO["[object Number]"]=yO[mO]=yO["[object RegExp]"]=yO["[object Set]"]=yO["[object String]"]=yO["[object Symbol]"]=yO["[object Uint8Array]"]=yO["[object Uint8ClampedArray]"]=yO["[object Uint16Array]"]=yO["[object Uint32Array]"]=!0,yO["[object Error]"]=yO[gO]=yO["[object WeakMap]"]=!1,Ae(cO,"baseClone"),vO=cO});function bO(t){return vO(t,4)}var wO,kO=t(()=>{xO(),Ae(bO,"clone"),wO=bO});function TO(t){return vO(t,5)}var EO,_O=t(()=>{xO(),Ae(TO,"cloneDeep"),EO=TO});function CO(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}var SO,AO=t(()=>{Ae(CO,"compact"),SO=CO});function LO(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var NO,IO=t(()=>{Ae(LO,"setCacheAdd"),NO=LO});function MO(t){return this.__data__.has(t)}var RO,DO=t(()=>{Ae(MO,"setCacheHas"),RO=MO});function OO(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new kw;++e<r;)this.add(t[e])}var PO,BO=t(()=>{Tw(),IO(),DO(),Ae(OO,"SetCache"),OO.prototype.add=OO.prototype.push=NO,OO.prototype.has=RO,PO=OO});function FO(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var $O,zO=t(()=>{Ae(FO,"arraySome"),$O=FO});function GO(t,e){return t.has(e)}var UO,qO=t(()=>{Ae(GO,"cacheHas"),UO=GO});function YO(t,e,r,n,i,a){var o=1&r,s=t.length;if(s!=(l=e.length)&&!(o&&s<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 PO:void 0;for(a.set(t,e),a.set(e,t);++h<s;){var p,g=t[h],f=e[h];if(void 0!==(p=n?o?n(f,g,h,e,t,a):n(g,f,h,t,e,a):p)){if(p)continue;u=!1;break}if(d){if(!$O(e,function(t,e){if(!UO(d,e)&&(g===t||i(g,t,r,n,a)))return d.push(e)})){u=!1;break}}else if(g!==f&&!i(g,f,r,n,a)){u=!1;break}}return a.delete(t),a.delete(e),u}var jO,HO=t(()=>{BO(),zO(),qO(),Ae(YO,"equalArrays"),jO=YO});function WO(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var VO,XO=t(()=>{Ae(WO,"mapToArray"),VO=WO});function KO(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var ZO,QO=t(()=>{Ae(KO,"setToArray"),ZO=KO});function JO(t,e,r,n,i,a,o){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 pk(t),new pk(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return L6(+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 s=VO;case"[object Set]":var l,s=s||ZO;return!!(t.size==e.size||1&n)&&((l=o.get(t))?l==e:(n|=2,o.set(t,e),l=jO(s(t),s(e),n,i,a,o),o.delete(t),l));case"[object Symbol]":if(eP)return eP.call(t)==eP.call(e)}return!1}var tP,eP,rP,nP=t(()=>{a5(),fk(),N6(),HO(),XO(),QO(),tP=W3?W3.prototype:void 0,eP=tP?tP.valueOf:void 0,Ae(JO,"equalByTag"),rP=JO});function iP(t,e,r,n,i,a){var o=1&r,s=iD(t),l=s.length;if(l!=iD(e).length&&!o)return!1;for(var c=l;c--;){var h=s[c];if(!(o?h in e:oP.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=o;++c<l;){var f,m=t[h=s[c]],y=e[h];if(!(void 0===(f=n?o?n(y,m,h,e,t,a):n(m,y,h,t,e,a):f)?m===y||i(m,y,r,n,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 aP,oP,sP,lP=t(()=>{aD(),aP=Object.prototype,oP=aP.hasOwnProperty,Ae(iP,"equalObjects"),sP=iP});function cP(t,e,r,n,i,a){var o=Zk(t),s=Zk(e),l=o?uP:_D(t),s=s?uP:_D(e),c=(l=l==hP?dP:l)==dP,h=(s=s==hP?dP:s)==dP;if((s=l==s)&&g7(t)){if(!g7(e))return!1;c=!(o=!0)}return s&&!c?(a=a||new Yw,o||P7(t)?jO(t,e,r,n,i,a):rP(t,e,l,r,n,i,a)):1&r||(o=c&&gP.call(t,"__wrapped__"),l=h&&gP.call(e,"__wrapped__"),!o&&!l)?s&&(a=a||new Yw,sP(t,e,r,n,i,a)):i(o?t.value():t,l?e.value():e,r,n,a=a||new Yw)}var hP,uP,dP,pP,gP,fP,mP=t(()=>{Ww(),HO(),nP(),lP(),ND(),t7(),m7(),$7(),hP="[object Arguments]",uP="[object Array]",dP="[object Object]",pP=Object.prototype,gP=pP.hasOwnProperty,Ae(cP,"baseIsEqualDeep"),fP=cP});function yP(t,e,r,n,i){return t===e||(null==t||null==e||!Uk(t)&&!Uk(e)?t!=t&&e!=e:fP(t,e,r,n,yP,i))}var vP,xP=t(()=>{mP(),qk(),Ae(yP,"baseIsEqual"),vP=yP});function bP(t,e,r,n){var i=r.length,a=i,o=!n;if(null==t)return!a;for(t=Object(t);i--;){var s=r[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var l=(s=r[i])[0],c=t[l],h=s[1];if(o&&s[2]){if(void 0===c&&!(l in t))return!1}else{var u,d=new Yw;if(!(void 0===(u=n?n(c,h,l,t,e,d):u)?vP(h,c,3,n,d):u))return!1}}return!0}var wP,kP=t(()=>{Ww(),xP(),Ae(bP,"baseIsMatch"),wP=bP});function TP(t){return t==t&&!T5(t)}var EP,_P=t(()=>{E5(),Ae(TP,"isStrictComparable"),EP=TP});function CP(t){for(var e=kM(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,EP(i)]}return e}var SP,AP=t(()=>{_P(),CM(),Ae(CP,"getMatchData"),SP=CP});function LP(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var NP,IP=t(()=>{Ae(LP,"matchesStrictComparable"),NP=LP});function MP(e){var r=SP(e);return 1==r.length&&r[0][2]?NP(r[0][0],r[0][1]):function(t){return t===e||wP(t,e,r)}}var RP,DP=t(()=>{kP(),AP(),IP(),Ae(MP,"baseMatches"),RP=MP});function OP(t,e){return null!=t&&e in Object(t)}var PP,BP=t(()=>{Ae(OP,"baseHasIn"),PP=OP});function FP(t,e,r){for(var n=-1,i=(e=jM(e,t)).length,a=!1;++n<i;){var o=VM(e[n]);if(!(a=null!=t&&r(t,o)))break;t=t[o]}return a||++n!=i?a:!!(i=null==t?0:t.length)&&r7(i)&&rT(o,i)&&(Zk(t)||Xk(t))}var $P,zP=t(()=>{HM(),Jk(),t7(),nT(),n7(),XM(),Ae(FP,"hasPath"),$P=FP});function GP(t,e){return null!=t&&$P(t,e,PP)}var UP,qP=t(()=>{BP(),zP(),Ae(GP,"hasIn"),UP=GP});function YP(r,n){return IM(r)&&EP(n)?NP(VM(r),n):function(t){var e=tR(t,r);return void 0===e&&e===n?UP(t,r):vP(n,e,3)}}var jP,HP=t(()=>{xP(),eR(),qP(),MM(),_P(),IP(),XM(),Ae(YP,"baseMatchesProperty"),jP=YP});function WP(e){return function(t){return t?.[e]}}var VP,XP=t(()=>{Ae(WP,"baseProperty"),VP=WP});function KP(e){return function(t){return ZM(t,e)}}var ZP,QP=t(()=>{QM(),Ae(KP,"basePropertyDeep"),ZP=KP});function JP(t){return IM(t)?VP(VM(t)):ZP(t)}var tB,eB=t(()=>{XP(),QP(),MM(),XM(),Ae(JP,"property"),tB=JP});function rB(t){return"function"==typeof t?t:null==t?NT:"object"==typeof t?Zk(t)?jP(t[0],t[1]):RP(t):tB(t)}var nB,iB=t(()=>{DP(),HP(),IT(),t7(),eB(),Ae(rB,"baseIteratee"),nB=rB});function aB(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(n,o,r(o),t)}return n}var oB,sB=t(()=>{Ae(aB,"arrayAggregator"),oB=aB});function lB(t,e){return t&&ik(t,e,kM)}var cB,hB=t(()=>{ok(),CM(),Ae(lB,"baseForOwn"),cB=lB});function uB(a,o){return function(t,e){if(null!=t){if(!a7(t))return a(t,e);for(var r=t.length,n=o?r:-1,i=Object(t);(o?n--:++n<r)&&!1!==e(i[n],n,i););}return t}}var dB,pB,gB,fB=t(()=>{o7(),Ae(uB,"createBaseEach"),dB=uB}),mB=t(()=>{hB(),fB(),pB=dB(cB),gB=pB});function yB(t,n,i,a){return gB(t,function(t,e,r){n(a,t,i(t),r)}),a}var vB,xB=t(()=>{mB(),Ae(yB,"baseAggregator"),vB=yB});function bB(i,a){return function(t,e){var r=Zk(t)?oB:vB,n=a?a():{};return r(t,i,nB(e,2),n)}}var wB,kB,TB,EB,_B,CB,SB,AB=t(()=>{sB(),xB(),iB(),t7(),Ae(bB,"createAggregator"),wB=bB}),LB=t(()=>{i5(),kB=Ae(function(){return j3.Date.now()},"now"),TB=kB}),NB=t(()=>{JT(),N6(),r8(),xT(),EB=Object.prototype,_B=EB.hasOwnProperty,CB=QT(function(t,e){t=Object(t);var r=-1,n=e.length,i=2<n?e[2]:void 0;for(i&&e8(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],o=vT(a),s=-1,l=o.length;++s<l;){var c=o[s],h=t[c];(void 0===h||L6(h,EB[c])&&!_B.call(t,c))&&(t[c]=a[c])}return t}),SB=CB});function IB(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var MB,RB=t(()=>{Ae(IB,"arrayIncludesWith"),MB=IB});function DB(t,e,r,n){var i=-1,a=uM,o=!0,s=t.length,l=[],c=e.length;if(s){r&&(e=pI(e,N7(r))),n?(a=MB,o=!1):200<=e.length&&(a=UO,o=!1,e=new PO(e));t:for(;++i<s;){var h=t[i],u=null==r?h:r(h),h=n||0!==h?h:0;if(o&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;l.push(h)}else a(e,u,n)||l.push(h)}}return l}var OB,PB,BB,FB=t(()=>{BO(),gM(),RB(),gI(),B7(),qO(),Ae(DB,"baseDifference"),OB=DB}),$B=t(()=>{FB(),uR(),JT(),c7(),PB=QT(function(t,e){return l7(t)?OB(t,hR(e,1,l7,!0)):[]}),BB=PB});function zB(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var GB,UB=t(()=>{Ae(zB,"last"),GB=zB});function qB(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:GI(e),xR(t,e<0?0:e,n)):[]}var YB,jB=t(()=>{bR(),YI(),Ae(qB,"drop"),YB=qB});function HB(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:GI(e),xR(t,0,(e=n-e)<0?0:e)):[]}var WB,VB=t(()=>{bR(),YI(),Ae(HB,"dropRight"),WB=HB});function XB(t){return"function"==typeof t?t:NT}var KB,ZB=t(()=>{IT(),Ae(XB,"castFunction"),KB=XB});function QB(t,e){return(Zk(t)?KI:gB)(t,KB(e))}var v,JB=t(()=>{ZI(),mB(),ZB(),t7(),Ae(QB,"forEach"),v=QB}),tF=t(()=>{JB()});function eF(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var rF,nF=t(()=>{Ae(eF,"arrayEvery"),rF=eF});function iF(t,n){var i=!0;return gB(t,function(t,e,r){return i=!!n(t,e,r)}),i}var aF,oF=t(()=>{mB(),Ae(iF,"baseEvery"),aF=iF});function sF(t,e,r){var n=Zk(t)?rF:aF;return r&&e8(t,e,r)&&(e=void 0),n(t,nB(e,3))}var lF,cF=t(()=>{nF(),oF(),iB(),t7(),r8(),Ae(sF,"every"),lF=sF});function hF(t,n){var i=[];return gB(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var uF,dF=t(()=>{mB(),Ae(hF,"baseFilter"),uF=hF});function pF(t,e){return(Zk(t)?OR:uF)(t,nB(e,3))}var gF,fF=t(()=>{PR(),dF(),iB(),t7(),Ae(pF,"filter"),gF=pF});function mF(a){return function(t,e,r){var n,i=Object(t);return a7(t)||(n=nB(e,3),t=kM(t),e=Ae(function(t){return n(i[t],t,i)},"predicate")),-1<(e=a(t,e,r))?i[n?t[e]:e]:void 0}}var yF,vF=t(()=>{iB(),o7(),CM(),Ae(mF,"createFind"),yF=mF});function xF(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:GI(r))<0&&(r=bF(n+r,0)),JI(t,nB(e,3),r)):-1}var bF,wF,kF,TF,EF=t(()=>{tM(),iB(),YI(),bF=Math.max,Ae(xF,"findIndex"),wF=xF}),_F=t(()=>{vF(),EF(),kF=yF(wF),TF=kF});function CF(t){return t&&t.length?t[0]:void 0}var SF,AF=t(()=>{Ae(CF,"head"),SF=CF}),LF=t(()=>{AF()});function NF(t,n){var i=-1,a=a7(t)?Array(t.length):[];return gB(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var IF,MF=t(()=>{mB(),o7(),Ae(NF,"baseMap"),IF=NF});function RF(t,e){return(Zk(t)?pI:IF)(t,nB(e,3))}var x,DF=t(()=>{gI(),iB(),MF(),t7(),Ae(RF,"map"),x=RF});function OF(t,e){return hR(x(t,e),1)}var PF,BF=t(()=>{uR(),DF(),Ae(OF,"flatMap"),PF=OF});function FF(t,e){return null==t?t:ik(t,KB(e),vT)}var $F,zF=t(()=>{ok(),ZB(),xT(),Ae(FF,"forIn"),$F=FF});function GF(t,e){return t&&cB(t,KB(e))}var UF,qF,YF,jF,HF=t(()=>{hB(),ZB(),Ae(GF,"forOwn"),UF=GF}),WF=t(()=>{Zw(),AB(),YF=Object.prototype,qF=YF.hasOwnProperty,YF=wB(function(t,e,r){qF.call(t,r)?t[r].push(e):Kw(t,r,[e])}),jF=YF});function VF(t,e){return e<t}var XF,KF=t(()=>{Ae(VF,"baseGt"),XF=VF});function ZF(t,e){return null!=t&&JF.call(t,e)}var QF,JF,t$,e$=t(()=>{QF=Object.prototype,JF=QF.hasOwnProperty,Ae(ZF,"baseHas"),t$=ZF});function r$(t,e){return null!=t&&$P(t,e,t$)}var b,n$=t(()=>{e$(),zP(),Ae(r$,"has"),b=r$});function i$(t){return"string"==typeof t||!Zk(t)&&Uk(t)&&"[object String]"==b5(t)}var a$,o$=t(()=>{w5(),t7(),qk(),Ae(i$,"isString"),a$=i$});function s$(e,t){return pI(t,function(t){return e[t]})}var l$,c$=t(()=>{gI(),Ae(s$,"baseValues"),l$=s$});function h$(t){return null==t?[]:l$(t,kM(t))}var u$,d$=t(()=>{c$(),CM(),Ae(h$,"values"),u$=h$});function p$(t,e,r,n){return t=a7(t)?t:u$(t),r=r&&!n?GI(r):0,n=t.length,r<0&&(r=g$(n+r,0)),a$(t)?r<=n&&-1<t.indexOf(e,r):!!n&&-1<lM(t,e,r)}var g$,f$,m$=t(()=>{cM(),o7(),o$(),YI(),d$(),g$=Math.max,Ae(p$,"includes"),f$=p$});function y$(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:GI(r))<0&&(r=v$(n+r,0)),lM(t,e,r)):-1}var v$,x$,b$=t(()=>{cM(),YI(),v$=Math.max,Ae(y$,"indexOf"),x$=y$});function w$(t){if(null!=t){if(a7(t)&&(Zk(t)||"string"==typeof t||"function"==typeof t.splice||g7(t)||P7(t)||Xk(t)))return!t.length;var e,r=_D(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(Pk(t))return!xM(t).length;for(e in t)if(T$.call(t,e))return!1}return!0}var k$,T$,E$,_$=t(()=>{bM(),ND(),Jk(),t7(),o7(),m7(),Bk(),$7(),k$=Object.prototype,T$=k$.hasOwnProperty,Ae(w$,"isEmpty"),E$=w$});function C$(t){return Uk(t)&&"[object RegExp]"==b5(t)}var S$,A$,L$,N$=t(()=>{w5(),qk(),Ae(C$,"baseIsRegExp"),S$=C$}),I$=t(()=>{N$(),B7(),F7(),A$=(A$=D7&&D7.isRegExp)?N7(A$):S$,L$=A$});function M$(t){return void 0===t}var R$,D$=t(()=>{Ae(M$,"isUndefined"),R$=M$});function O$(t,e){return t<e}var P$,B$=t(()=>{Ae(O$,"baseLt"),P$=O$});function F$(t,n){var i={};return n=nB(n,3),cB(t,function(t,e,r){Kw(i,e,n(t,e,r))}),i}var $$,z$=t(()=>{Zw(),hB(),iB(),Ae(F$,"mapValues"),$$=F$});function G$(t,e,r){for(var n=-1,i=t.length;++n<i;){var a,o,s=t[n],l=e(s);null!=l&&(void 0===a?l==l&&!hI(l):r(l,a))&&(a=l,o=s)}return o}var U$,q$=t(()=>{uI(),Ae(G$,"baseExtremum"),U$=G$});function Y$(t){return t&&t.length?U$(t,NT,XF):void 0}var j$,H$=t(()=>{q$(),KF(),IT(),Ae(Y$,"max"),j$=Y$});function W$(t){return t&&t.length?U$(t,NT,P$):void 0}var V$,X$=t(()=>{q$(),B$(),IT(),Ae(W$,"min"),V$=W$});function K$(t,e){return t&&t.length?U$(t,nB(e,2),P$):void 0}var Z$,Q$=t(()=>{q$(),iB(),B$(),Ae(K$,"minBy"),Z$=K$});function J$(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 tz,ez=t(()=>{Ae(J$,"negate"),tz=J$});function rz(t,e,r,n){if(T5(t))for(var i=-1,a=(e=jM(e,t)).length,o=a-1,s=t;null!=s&&++i<a;){var l,c=VM(e[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;i!=o&&(l=s[c],void 0===(h=n?n(l,c,s):void 0))&&(h=T5(l)?l:rT(e[i+1])?[]:{}),H7(s,c,h),s=s[c]}return t}var nz,iz=t(()=>{W7(),HM(),nT(),E5(),XM(),Ae(rz,"baseSet"),nz=rz});function az(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var o=e[n],s=ZM(t,o);r(s,o)&&nz(a,jM(o,t),s)}return a}var oz,sz=t(()=>{QM(),iz(),HM(),Ae(az,"basePickBy"),oz=az});function lz(t,r){var e;return null==t?{}:(e=pI(sD(t),function(t){return[t]}),r=nB(r),oz(t,e,function(t,e){return r(t,e[0])}))}var cz,hz=t(()=>{gI(),iB(),sz(),CD(),Ae(lz,"pickBy"),cz=lz});function uz(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var dz,pz=t(()=>{Ae(uz,"baseSortBy"),dz=uz});function gz(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=hI(t),o=void 0!==e,s=null===e,l=e==e,c=hI(e);if(!s&&!c&&!a&&e<t||a&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&t<e||c&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!l)return-1}return 0}var fz,mz=t(()=>{uI(),Ae(gz,"compareAscending"),fz=gz});function yz(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,s=r.length;++n<o;){var l=fz(i[n],a[n]);if(l)return s<=n?l:l*("desc"==r[n]?-1:1)}return t.index-e.index}var vz,xz=t(()=>{mz(),Ae(yz,"compareMultiple"),vz=yz});function bz(t,n,r){n=n.length?pI(n,function(e){return Zk(e)?function(t){return ZM(t,1===e.length?e[0]:e)}:e}):[NT];var i=-1,t=(n=pI(n,N7(nB)),IF(t,function(e,t,r){return{criteria:pI(n,function(t){return t(e)}),index:++i,value:e}}));return dz(t,function(t,e){return vz(t,e,r)})}var wz,kz,Tz,Ez=t(()=>{gI(),QM(),iB(),MF(),pz(),B7(),xz(),IT(),t7(),Ae(bz,"baseOrderBy"),wz=bz}),_z=t(()=>{XP(),kz=VP("length"),Tz=kz});function Cz(t){for(var e=Dz.lastIndex=0;Dz.test(t);)++e;return e}var Sz,Az,Lz,Nz,Iz,Mz,Rz,Dz,Oz,Pz=t(()=>{Sz="["+(Nz="\\ud800-\\udfff")+"]",Az="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Lz="\\ud83c[\\udffb-\\udfff]",Rz="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Mz="[\\ufe0e\\ufe0f]?",Iz="(?:\\u200d(?:"+[Nz="[^"+Nz+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+Mz+Rz+")*",Mz=Mz+Rz+Iz,Rz="(?:"+[Nz+Az+"?",Az,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",Sz].join("|")+")",Dz=RegExp(Lz+"(?="+Lz+")|"+Rz+Mz,"g"),Ae(Cz,"unicodeSize"),Oz=Cz});function Bz(t){return(TR(t)?Oz:Tz)(t)}var Fz,$z=t(()=>{_z(),ER(),Pz(),Ae(Bz,"stringSize"),Fz=Bz});function zz(r,t){return oz(r,t,function(t,e){return UP(r,e)})}var Gz,Uz,qz,Yz=t(()=>{sz(),qP(),Ae(zz,"basePick"),Gz=zz}),jz=t(()=>{Yz(),yR(),Uz=mR(function(t,e){return null==t?{}:Gz(t,e)}),qz=Uz});function Hz(t,e,r,n){for(var i=-1,a=Vz(Wz((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}var Wz,Vz,Xz,Kz=t(()=>{Wz=Math.ceil,Vz=Math.max,Ae(Hz,"baseRange"),Xz=Hz});function Zz(n){return function(t,e,r){return r&&"number"!=typeof r&&e8(t,e,r)&&(e=r=void 0),t=FI(t),void 0===e?(e=t,t=0):e=FI(e),r=void 0===r?t<e?1:-1:FI(r),Xz(t,e,r,n)}}var Qz,Jz,tG,eG=t(()=>{Kz(),r8(),$I(),Ae(Zz,"createRange"),Qz=Zz}),rG=t(()=>{eG(),Jz=Qz(),tG=Jz});function nG(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var iG,aG=t(()=>{Ae(nG,"baseReduce"),iG=nG});function oG(t,e,r){var n=Zk(t)?CR:iG,i=arguments.length<3;return n(t,nB(e,4),r,i,gB)}var sG,lG=t(()=>{SR(),mB(),iB(),aG(),t7(),Ae(oG,"reduce"),sG=oG});function cG(t,e){return(Zk(t)?OR:uF)(t,tz(nB(e,3)))}var hG,uG=t(()=>{PR(),dF(),iB(),t7(),ez(),Ae(cG,"reject"),hG=cG});function dG(t){var e;return null==t?0:a7(t)?a$(t)?Fz(t):t.length:"[object Map]"==(e=_D(t))||"[object Set]"==e?t.size:xM(t).length}var pG,gG=t(()=>{bM(),ND(),o7(),o$(),$z(),Ae(dG,"size"),pG=dG});function fG(t,n){var i;return gB(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var mG,yG=t(()=>{mB(),Ae(fG,"baseSome"),mG=fG});function vG(t,e,r){var n=Zk(t)?$O:mG;return r&&e8(t,e,r)&&(e=void 0),n(t,nB(e,3))}var xG,bG,wG,kG,TG,EG=t(()=>{zO(),iB(),yG(),t7(),r8(),Ae(vG,"some"),xG=vG}),_G=t(()=>{uR(),Ez(),JT(),r8(),bG=QT(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&e8(t,e[0],e[1])?e=[]:2<r&&e8(e[0],e[1],e[2])&&(e=[e[0]]),wz(t,hR(e,1),[]))}),wG=bG}),CG=t(()=>{LD(),VI(),QO(),kG=pD&&1/ZO(new pD([,-0]))[1]==1/0?function(t){return new pD(t)}:WI,TG=kG});function SG(t,e,r){var n=-1,i=uM,a=t.length,o=!0,s=[],l=s;if(r)o=!1,i=MB;else if(200<=a){var c=e?null:TG(t);if(c)return ZO(c);o=!1,i=UO,l=new PO}else l=e?[]:s;t:for(;++n<a;){var h=t[n],u=e?e(h):h,h=r||0!==h?h:0;if(o&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),s.push(h)}else i(l,u,r)||(l!==s&&l.push(u),s.push(h))}return s}var AG,LG,NG,IG=t(()=>{BO(),gM(),RB(),qO(),CG(),QO(),Ae(SG,"baseUniq"),AG=SG}),MG=t(()=>{uR(),JT(),IG(),c7(),LG=QT(function(t){return AG(hR(t,1,l7,!0))}),NG=LG});function RG(t){return t&&t.length?AG(t):[]}var DG,OG=t(()=>{IG(),Ae(RG,"uniq"),DG=RG});function PG(t,e){return t&&t.length?AG(t,nB(e,2)):[]}var BG,FG=t(()=>{iB(),IG(),Ae(PG,"uniqBy"),BG=PG});function $G(t){var e=++zG;return UM(t)+e}var zG,GG,UG=t(()=>{qM(),zG=0,Ae($G,"uniqueId"),GG=$G});function qG(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n<i;){var s=n<a?e[n]:void 0;r(o,t[n],s)}return o}var YG,jG=t(()=>{Ae(qG,"baseZipObject"),YG=qG});function HG(t,e){return YG(t||[],e||[],H7)}var WG,VG=t(()=>{W7(),jG(),Ae(HG,"zipObject"),WG=HG}),XG=t(()=>{SM(),kO(),_O(),AO(),UT(),NB(),$B(),jB(),VB(),tF(),cF(),fF(),_F(),LF(),BF(),gR(),JB(),zF(),HF(),WF(),n$(),IT(),m$(),b$(),t7(),_$(),L5(),E5(),I$(),o$(),D$(),CM(),UB(),DF(),z$(),H$(),l8(),X$(),Q$(),VI(),LB(),jz(),hz(),rG(),lG(),uG(),gG(),EG(),_G(),MG(),OG(),UG(),d$(),VG()});function KG(t,e){t[e]?t[e]++:t[e]=1}function ZG(t,e){--t[e]||delete t[e]}function QG(t,e,r,n){return e=""+e,r=""+r,!t&&r<e&&(t=e,e=r,r=t),e+""+r+""+(R$(n)?"\0":n)}function JG(t,e,r,n){return e=""+e,r=""+r,!t&&r<e&&(t=e,e=r,r=t),t={v:e,w:r},n&&(t.name=n),t}function tU(t,e){return QG(t,e.v,e.w,e.name)}var eU,rU,nU=t(()=>{XG(),eU="\0",(rU=class{static{Ae(this,"Graph")}constructor(t={}){this._isDirected=!b(t,"directed")||t.directed,this._isMultigraph=!!b(t,"multigraph")&&t.multigraph,this._isCompound=!!b(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=zT(void 0),this._defaultEdgeLabelFn=zT(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[eU]={}),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 C5(t)||(t=zT(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return kM(this._nodes)}sources(){var e=this;return gF(this.nodes(),function(t){return E$(e._in[t])})}sinks(){var e=this;return gF(this.nodes(),function(t){return E$(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1<r.length?n.setNode(t,e):n.setNode(t)}),this}setNode(t,e){return b(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]=eU,this._children[t]={},this._children[eU][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 b(this._nodes,t)}removeNode(t){var e,r=this;return b(this._nodes,t)&&(e=Ae(function(t){r.removeEdge(r._edgeObjs[t])},"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),function(t){r.setParent(t)}),delete this._children[t]),v(kM(this._in[t]),e),delete this._in[t],delete this._preds[t],v(kM(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(R$(e))e=eU;else{for(var r=e+="";!R$(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])!==eU)return t}children(t){var e;return R$(t)&&(t=eU),this._isCompound?(e=this._children[t])?kM(e):void 0:t===eU?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return kM(t)}successors(t){if(t=this._sucs[t])return kM(t)}neighbors(t){var e=this.predecessors(t);if(e)return NG(e,this.successors(t))}isLeaf(t){return 0===(t=this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(r){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),i=(n.setGraph(this.graph()),this),a=(v(this._nodes,function(t,e){r(e)&&n.setNode(e,t)}),v(this._edgeObjs,function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,i.edge(t))}),{});function o(t){var e=i.parent(t);return void 0===e||n.hasNode(e)?a[t]=e:e in a?a[e]:o(e)}return Ae(o,"findParent"),this._isCompound&&v(n.nodes(),function(t){n.setParent(t,o(t))}),n}setDefaultEdgeLabel(t){return C5(t)||(t=zT(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return u$(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return sG(t,function(t,e){return 1<i.length?n.setEdge(t,e,r):n.setEdge(t,e),e}),this}setEdge(){var t,e,r=!1,n=("object"==typeof(n=arguments[0])&&null!==n&&"v"in n?(i=n.v,a=n.w,t=n.name,2===arguments.length&&(e=arguments[1],r=!0)):(i=n,a=arguments[1],t=arguments[3],2<arguments.length&&(e=arguments[2],r=!0)),i=""+i,a=""+a,R$(t)||(t=""+t),QG(this._isDirected,i,a,t));if(b(this._edgeLabels,n))r&&(this._edgeLabels[n]=e);else{if(!R$(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(a),this._edgeLabels[n]=r?e:this._defaultEdgeLabelFn(i,a,t);var i=(r=JG(this._isDirected,i,a,t)).v,a=r.w;Object.freeze(r),this._edgeObjs[n]=r,KG(this._preds[a],i),KG(this._sucs[i],a),this._in[a][n]=r,this._out[i][n]=r,this._edgeCount++}return this}edge(t,e,r){return t=1===arguments.length?tU(this._isDirected,t):QG(this._isDirected,t,e,r),this._edgeLabels[t]}hasEdge(t,e,r){return t=1===arguments.length?tU(this._isDirected,t):QG(this._isDirected,t,e,r),b(this._edgeLabels,t)}removeEdge(t,e,r){var r=1===arguments.length?tU(this._isDirected,arguments[0]):QG(this._isDirected,t,e,r),n=this._edgeObjs[r];return n&&(t=n.v,e=n.w,delete this._edgeLabels[r],delete this._edgeObjs[r],ZG(this._preds[e],t),ZG(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=u$(t),e?gF(t,function(t){return t.v===e}):t}outEdges(t,e){if(t=this._out[t])return t=u$(t),e?gF(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,rU.prototype._edgeCount=0,Ae(KG,"incrementOrInitEntry"),Ae(ZG,"decrementOrRemoveEntry"),Ae(QG,"edgeArgsToId"),Ae(JG,"edgeArgsToObj"),Ae(tU,"edgeObjToId")}),iU=t(()=>{nU()});function aU(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function oU(t,e){if("_next"!==t&&"_prev"!==t)return e}var sU,lU=t(()=>{sU=class{static{Ae(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 aU(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&aU(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,oU)),r=r._prev;return"["+t.join(", ")+"]"}},Ae(aU,"unlink"),Ae(oU,"filterOutLinks")});function cU(e,t){return e.nodeCount()<=1?[]:(t=hU((t=dU(e,t||gU)).graph,t.buckets,t.zeroIdx),pR(x(t,function(t){return e.outEdges(t.v,t.w)})))}function hU(t,e,r){for(var n,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;n=o.dequeue();)uU(t,e,r,n);for(;n=a.dequeue();)uU(t,e,r,n);if(t.nodeCount())for(var s=e.length-2;0<s;--s)if(n=e[s].dequeue()){i=i.concat(uU(t,e,r,n,!0));break}}return i}function uU(n,i,a,t,o){var s=o?[]:void 0;return v(n.inEdges(t.v),function(t){var e=n.edge(t),r=n.node(t.v);o&&s.push({v:t.v,w:t.w}),r.out-=e,pU(i,a,r)}),v(n.outEdges(t.v),function(t){var e=n.edge(t),t=t.w;(t=n.node(t)).in-=e,pU(i,a,t)}),n.removeNode(t.v),s}function dU(t,n){var i=new rU,a=0,o=0,e=(v(t.nodes(),function(t){i.setNode(t,{v:t,in:0,out:0})}),v(t.edges(),function(t){var e=i.edge(t.v,t.w)||0,r=n(t);i.setEdge(t.v,t.w,e+r),o=Math.max(o,i.node(t.v).out+=r),a=Math.max(a,i.node(t.w).in+=r)}),tG(o+a+3).map(function(){return new sU})),r=a+1;return v(i.nodes(),function(t){pU(e,r,i.node(t))}),{graph:i,buckets:e,zeroIdx:r}}function pU(t,e,r){(r.out?r.in?t[r.out-r.in+e]:t[t.length-1]:t[0]).enqueue(r)}var gU,fU=t(()=>{XG(),iU(),lU(),gU=zT(1),Ae(cU,"greedyFAS"),Ae(hU,"doGreedyFAS"),Ae(uU,"removeNode"),Ae(dU,"buildState"),Ae(pU,"assignBucket")});function mU(r){var t="greedy"===r.graph().acyclicer?cU(r,e(r)):yU(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,GG("rev"))}),Ae(e,"weightFn")}function yU(e){var r=[],n={},i={};function a(t){b(i,t)||(i[t]=!0,n[t]=!0,v(e.outEdges(t),function(t){b(n,t.w)?r.push(t):a(t.w)}),delete n[t])}return Ae(a,"dfs"),v(e.nodes(),a),r}function vU(n){v(n.edges(),function(t){var e,r=n.edge(t);r.reversed&&(n.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(t.w,t.v,r,e))})}var xU=t(()=>{XG(),fU(),Ae(mU,"run"),Ae(yU,"dfsFAS"),Ae(vU,"undo")});function bU(t,e,r,n){for(var i;i=GG(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function wU(n){var i=(new rU).setGraph(n.graph());return v(n.nodes(),function(t){i.setNode(t,n.node(t))}),v(n.edges(),function(t){var e=i.edge(t.v,t.w)||{weight:0,minlen:1},r=n.edge(t);i.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),i}function kU(e){var r=new rU({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 TU(t,e){var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,o=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*o>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-o:o)*e/a,{x:n+r,y:i+t};throw new Error("Not possible to find intersection inside of the rectangle")}function EU(n){var i=x(tG(AU(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;R$(r)||(i[r][e.order]=t)}),i}function _U(e){var r=V$(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),b(t,"rank")&&(t.rank-=r)})}function CU(r){var n=V$(x(r.nodes(),function(t){return r.node(t).rank})),i=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-n;i[e]||(i[e]=[]),i[e].push(t)}),0),o=r.graph().nodeRankFactor;v(i,function(t,e){R$(t)&&e%o!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function SU(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),bU(t,"border",i,e)}function AU(e){return j$(x(e.nodes(),function(t){if(t=e.node(t).rank,!R$(t))return t}))}function LU(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function NU(t,e){var r=TB();try{return e()}finally{console.log(t+" time: "+(TB()-r)+"ms")}}function IU(t,e){return e()}var MU=t(()=>{XG(),iU(),Ae(bU,"addDummyNode"),Ae(wU,"simplify"),Ae(kU,"asNonCompoundGraph"),Ae(TU,"intersectRect"),Ae(EU,"buildLayerMatrix"),Ae(_U,"normalizeRanks"),Ae(CU,"removeEmptyRanks"),Ae(SU,"addBorderNode"),Ae(AU,"maxRank"),Ae(LU,"partition"),Ae(NU,"time"),Ae(IU,"notime")});function RU(a){function o(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,o),b(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n<i;++n)DU(a,"borderLeft","_bl",t,r,n),DU(a,"borderRight","_br",t,r,n)}}Ae(o,"dfs"),v(a.children(),o)}function DU(t,e,r,n,i,a){var o=i[e][a-1],r=bU(t,"border",{width:0,height:0,rank:a,borderType:e},r);i[e][a]=r,t.setParent(r,n),o&&t.setEdge(o,r,{weight:1})}var OU=t(()=>{XG(),MU(),Ae(RU,"addBorderSegments"),Ae(DU,"addBorderNode")});function PU(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||FU(t)}function BU(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||zU(t),"lr"!==e&&"rl"!==e||(UU(t),FU(t))}function FU(e){v(e.nodes(),function(t){$U(e.node(t))}),v(e.edges(),function(t){$U(e.edge(t))})}function $U(t){var e=t.width;t.width=t.height,t.height=e}function zU(e){v(e.nodes(),function(t){GU(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,GU),b(t,"y")&&GU(t)})}function GU(t){t.y=-t.y}function UU(e){v(e.nodes(),function(t){qU(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,qU),b(t,"x")&&qU(t)})}function qU(t){var e=t.x;t.x=t.y,t.y=e}var YU=t(()=>{XG(),Ae(PU,"adjust"),Ae(BU,"undo"),Ae(FU,"swapWidthHeight"),Ae($U,"swapWidthHeightOne"),Ae(zU,"reverseY"),Ae(GU,"reverseYOne"),Ae(UU,"swapXY"),Ae(qU,"swapXYOne")});function jU(e){e.graph().dummyChains=[],v(e.edges(),function(t){HU(e,t)})}function HU(t,e){var r,n,i,a=e.v,o=t.node(a).rank,s=e.w,l=t.node(s).rank,c=e.name,h=t.edge(e),u=h.labelRank;if(l!==o+1){for(t.removeEdge(e),i=0,++o;o<l;++i,++o)h.points=[],r=bU(t,"edge",n={width:0,height:0,edgeLabel:h,edgeObj:e,rank:o},"_d"),o===u&&(n.width=h.width,n.height=h.height,n.dummy="edge-label",n.labelpos=h.labelpos),t.setEdge(a,r,{weight:h.weight},c),0===i&&t.graph().dummyChains.push(r),a=r;t.setEdge(a,s,{weight:h.weight},c)}}function WU(i){v(i.graph().dummyChains,function(t){var e,r=i.node(t),n=r.edgeLabel;for(i.setEdge(r.edgeObj,n);r.dummy;)e=i.successors(t)[0],i.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),r=i.node(t=e)})}var VU=t(()=>{XG(),MU(),Ae(jU,"run"),Ae(HU,"normalizeEdge"),Ae(WU,"undo")});function XU(r){var n={};function i(t){var e=r.node(t);return b(n,t)?e.rank:(n[t]=!0,(t=V$(x(r.outEdges(t),function(t){return i(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}Ae(i,"dfs"),v(r.sources(),i)}function KU(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var ZU=t(()=>{XG(),Ae(XU,"longestPath"),Ae(KU,"slack")});function QU(t){var e,r=new rU({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});JU(r,t)<i;)e=tq(r,t),e=r.hasNode(e.v)?KU(t,e):-KU(t,e),eq(r,t,e);return r}function JU(n,i){function a(r){v(i.nodeEdges(r),function(t){var e=t.v,e=r===e?t.w:e;n.hasNode(e)||KU(i,t)||(n.setNode(e,{}),n.setEdge(r,e,{}),a(e))})}return Ae(a,"dfs"),v(n.nodes(),a),n.nodeCount()}function tq(e,r){return Z$(r.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return KU(r,t)})}function eq(t,e,r){v(t.nodes(),function(t){e.node(t).rank+=r})}var rq=t(()=>{XG(),iU(),ZU(),Ae(QU,"feasibleTree"),Ae(JU,"tightTree"),Ae(tq,"findMinSlackEdge"),Ae(eq,"shiftRanks")}),nq=t(()=>{}),iq=t(()=>{}),aq=t(()=>{XG(),iq(),zT(1)}),oq=t(()=>{aq()}),sq=t(()=>{}),lq=t(()=>{sq()}),cq=t(()=>{XG(),zT(1)});function hq(e){var r={},n={},i=[];function a(t){if(b(n,t))throw new uq;b(r,t)||(n[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete n[t],i.push(t))}if(Ae(a,"visit"),v(e.sinks(),a),pG(r)!==e.nodeCount())throw new uq;return i}function uq(){}var dq=t(()=>{XG(),hq.CycleException=uq,Ae(hq,"topsort"),Ae(uq,"CycleException"),uq.prototype=new Error}),pq=t(()=>{dq()});function gq(e,t,r){Zk(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);fq(e,t,"post"===r,a,n,i)}),i}function fq(e,t,r,n,i,a){b(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){fq(e,t,r,n,i,a)}),r&&a.push(t))}var mq=t(()=>{XG(),Ae(gq,"dfs"),Ae(fq,"doDfs")});function yq(t,e){return gq(t,e,"post")}var vq=t(()=>{mq(),Ae(yq,"postorder")});function xq(t,e){return gq(t,e,"pre")}var bq=t(()=>{mq(),Ae(xq,"preorder")}),wq=t(()=>{iq(),nU()}),kq=t(()=>{nq(),aq(),oq(),lq(),cq(),pq(),vq(),bq(),wq(),sq(),dq()});function Tq(t){XU(t=wU(t));var e,r=QU(t);for(Sq(r),Eq(r,t);e=Lq(r);)Iq(r,t,e,Nq(r,t,e))}function Eq(e,r){var t=(t=yq(e,e.nodes())).slice(0,t.length-1);v(t,function(t){_q(e,r,t)})}function _q(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=Cq(t,e,r)}function Cq(n,i,a){var o=n.node(a).parent,s=!0,t=i.edge(a,o),l=0;return t||(s=!1,t=i.edge(o,a)),l=t.weight,v(i.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==o&&(e=e===s,t=i.edge(t).weight,l+=e?t:-t,Rq(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function Sq(t,e){arguments.length<2&&(e=t.nodes()[0]),Aq(t,{},1,e)}function Aq(e,r,n,i,t){var a=n,o=e.node(i);return r[i]=!0,v(e.neighbors(i),function(t){b(r,t)||(n=Aq(e,r,n,t,i))}),o.low=a,o.lim=n++,t?o.parent=t:delete o.parent,n}function Lq(e){return TF(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Nq(e,r,t){var n=t.v,i=t.w,t=(r.hasEdge(n,i)||(n=t.w,i=t.v),e.node(n)),n=e.node(i),a=t,o=!1,i=(t.lim>n.lim&&(a=n,o=!0),gF(r.edges(),function(t){return o===Dq(0,e.node(t.v),a)&&o!==Dq(0,e.node(t.w),a)}));return Z$(i,function(t){return KU(r,t)})}function Iq(t,e,r,n){var i=r.v,r=r.w;t.removeEdge(i,r),t.setEdge(n.v,n.w,{}),Sq(t),Eq(t,e),Mq(t,e)}function Mq(i,a){var t=TF(i.nodes(),function(t){return!a.node(t).parent}),t=(t=xq(i,t)).slice(1);v(t,function(t){var e=i.node(t).parent,r=a.edge(t,e),n=!1;r||(r=a.edge(e,t),n=!0),a.node(t).rank=a.node(e).rank+(n?r.minlen:-r.minlen)})}function Rq(t,e,r){return t.hasEdge(e,r)}function Dq(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var Oq=t(()=>{XG(),kq(),MU(),rq(),ZU(),Tq.initLowLimValues=Sq,Tq.initCutValues=Eq,Tq.calcCutValue=Cq,Tq.leaveEdge=Lq,Tq.enterEdge=Nq,Tq.exchangeEdges=Iq,Ae(Tq,"networkSimplex"),Ae(Eq,"initCutValues"),Ae(_q,"assignCutValue"),Ae(Cq,"calcCutValue"),Ae(Sq,"initLowLimValues"),Ae(Aq,"dfsAssignLowLim"),Ae(Lq,"leaveEdge"),Ae(Nq,"enterEdge"),Ae(Iq,"exchangeEdges"),Ae(Mq,"updateRanks"),Ae(Rq,"isTreeEdge"),Ae(Dq,"isDescendant")});function Pq(t){switch(t.graph().ranker){case"network-simplex":Fq(t);break;case"tight-tree":Bq(t);break;case"longest-path":$q(t);break;default:Fq(t)}}function Bq(t){XU(t),QU(t)}function Fq(t){Tq(t)}var $q,zq=t(()=>{rq(),Oq(),ZU(),Ae(Pq,"rank"),$q=XU,Ae(Bq,"tightTreeRanker"),Ae(Fq,"networkSimplexRanker")});function Gq(e){var r=bU(e,"root",{},"_root"),n=qq(e),i=j$(u$(n))-1,a=2*i+1,o=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),Yq(e)+1);v(e.children(),function(t){Uq(e,r,a,o,i,n,t)}),e.graph().nodeRankFactor=a}function Uq(i,a,o,s,l,c,h){var u,d,t,e=i.children(h);e.length?(u=SU(i,"_bt"),d=SU(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){Uq(i,a,o,s,l,c,t);var e=(r=i.node(t)).borderTop||t,t=r.borderBottom||t,r=r.borderTop?s:2*s,n=e!==t?1:l-c[h]+1;i.setEdge(u,e,{weight:r,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:r,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:o})}function qq(n){var i={};function a(t,e){var r=n.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),i[t]=e}return Ae(a,"dfs"),v(n.children(),function(t){a(t,1)}),i}function Yq(r){return sG(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function jq(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 Hq=t(()=>{XG(),MU(),Ae(Gq,"run"),Ae(Uq,"dfs"),Ae(qq,"treeDepths"),Ae(Yq,"sumWeights"),Ae(jq,"cleanup")});function Wq(i,a,t){var o,s={};v(t,function(t){for(var e,r,n=i.parent(t);n;){if((e=i.parent(n))?(r=s[e],s[e]=n):(r=o,o=n),r&&r!==n)return void a.setEdge(r,n);n=e}})}var Vq=t(()=>{XG(),Ae(Wq,"addSubgraphConstraints")});function Xq(i,r,a){var o=Kq(i),s=new rU({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(t){return i.node(t)});return v(i.nodes(),function(n){var t=i.node(n),e=i.parent(n);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(s.setNode(n),s.setParent(n,e||o),v(i[a](n),function(t){var e=t.v===n?t.w:t.v,r=s.edge(e,n),r=R$(r)?0:r.weight;s.setEdge(e,n,{weight:i.edge(t).weight+r})}),b(t,"minRank"))&&s.setNode(n,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),s}function Kq(t){for(var e;t.hasNode(e=GG("_root")););return e}var Zq=t(()=>{XG(),iU(),Ae(Xq,"buildLayerGraph"),Ae(Kq,"createRootNode")});function Qq(t,e){for(var r=0,n=1;n<e.length;++n)r+=Jq(t,e[n-1],e[n]);return r}function Jq(e,t,r){for(var n=WG(r,x(r,function(t,e){return e})),t=pR(x(t,function(t){return wG(x(e.outEdges(t),function(t){return{pos:n[t.w],weight:e.edge(t).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1,o=(--i,x(new Array(a),function(){return 0})),s=0;return v(t.forEach(function(t){var e=t.pos+i;o[e]+=t.weight;for(var r=0;0<e;)e%2&&(r+=o[e+1]),o[e=e-1>>1]+=t.weight;s+=t.weight*r})),s}var tY=t(()=>{XG(),Ae(Qq,"crossCount"),Ae(Jq,"twoLayerCrossCount")});function eY(r){var n={},t=gF(r.nodes(),function(t){return!r.children(t).length}),e=j$(x(t,function(t){return r.node(t).rank})),i=x(tG(e+1),function(){return[]});function a(t){var e;b(n,t)||(n[t]=!0,e=r.node(t),i[e.rank].push(t),v(r.successors(t),a))}return Ae(a,"dfs"),e=wG(t,function(t){return r.node(t).rank}),v(e,a),i}var rY=t(()=>{XG(),Ae(eY,"initOrder")});function nY(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=sG(e,function(t,e){var r=n.edge(e),e=n.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 iY=t(()=>{XG(),Ae(nY,"barycenter")});function aY(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},R$(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];R$(e)||R$(r)||(r.indegree++,e.out.push(n[t.w]))}),oY(gF(n,function(t){return!t.indegree}))}function oY(r){var t=[];function e(e){return function(t){t.merged||(R$(t.barycenter)||R$(e.barycenter)||t.barycenter>=e.barycenter)&&sY(e,t)}}function n(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(Ae(e,"handleIn"),Ae(n,"handleOut");r.length;){var i=r.pop();t.push(i),v(i.in.reverse(),e(i)),v(i.out,n(i))}return x(gF(t,function(t){return!t.merged}),function(t){return qz(t,["vs","i","barycenter","weight"])})}function sY(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var lY=t(()=>{XG(),Ae(aY,"resolveConflicts"),Ae(oY,"doResolveConflicts"),Ae(sY,"mergeEntries")});function cY(t,e){var r=(t=LU(t,function(t){return b(t,"barycenter")})).lhs,n=wG(t.rhs,function(t){return-t.i}),i=[],a=0,o=0,s=0,t=(r.sort(uY(!!e)),s=hY(i,n,s),v(r,function(t){s+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,o+=t.weight,s=hY(i,n,s)}),{vs:pR(i)});return o&&(t.barycenter=a/o,t.weight=o),t}function hY(t,e,r){for(var n;e.length&&(n=GB(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function uY(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 dY=t(()=>{XG(),MU(),Ae(cY,"sort"),Ae(hY,"consumeUnsortable"),Ae(uY,"compareWithBias")});function pY(r,t,n,i){var e,a=r.children(t),o=(t=r.node(t))?t.borderLeft:void 0,s=t?t.borderRight:void 0,l={},t=(o&&(a=gF(a,function(t){return t!==o&&t!==s})),nY(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=pY(r,t.v,n,i),l[t.v]=e,b(e,"barycenter"))&&fY(t,e)}),gY(a=aY(t,n),l),t=cY(a,i),o&&(t.vs=pR([o,t.vs,s]),r.predecessors(o).length)&&(a=r.node(r.predecessors(o)[0]),e=r.node(r.predecessors(s)[0]),b(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 gY(t,e){v(t,function(t){t.vs=pR(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function fY(t,e){R$(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 mY=t(()=>{XG(),iY(),lY(),dY(),Ae(pY,"sortSubgraph"),Ae(gY,"expandSubgraphs"),Ae(fY,"mergeBarycenters")});function yY(t){var e=AU(t),r=vY(t,tG(1,e+1),"inEdges"),n=vY(t,tG(e-1,-1,-1),"outEdges");bY(t,eY(t));for(var i,a=Number.POSITIVE_INFINITY,o=0,s=0;s<4;++o,++s){xY(o%2?r:n,2<=o%4);var l,c=Qq(t,l=EU(t));c<a&&(s=0,i=EO(l),a=c)}bY(t,i)}function vY(e,t,r){return x(t,function(t){return Xq(e,t,r)})}function xY(t,e){var n=new rU;v(t,function(r){var t=r.graph().root,t=pY(r,t,n,e);v(t.vs,function(t,e){r.node(t).order=e}),Wq(r,n,t.vs)})}function bY(r,t){v(t,function(t){v(t,function(t,e){r.node(t).order=e})})}var wY=t(()=>{XG(),iU(),MU(),Vq(),Zq(),tY(),rY(),mY(),Ae(yY,"order"),Ae(vY,"buildLayerGraphs"),Ae(xY,"sweepLayerGraphs"),Ae(bY,"assignOrder")});function kY(c){var h=EY(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=TY(c,h,r.v,r.w),i=n.path,a=n.lca,o=0,s=i[o],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(s=i[o])!==a&&c.node(s).maxRank<e.rank;)o++;s===a&&(l=!1)}if(!l){for(;o<i.length-1&&c.node(s=i[o+1]).minRank<=e.rank;)o++;s=i[o]}c.setParent(t,s),t=c.successors(t)[0]}})}function TY(t,e,r,n){for(var i,a=[],o=[],s=Math.min(e[r].low,e[n].low),l=Math.max(e[r].lim,e[n].lim),c=r;c=t.parent(c),a.push(c),c&&(e[c].low>s||l>e[c].lim););for(i=c,c=n;(c=t.parent(c))!==i;)o.push(c);return{path:a.concat(o.reverse()),lca:i}}function EY(r){var n={},i=0;function a(t){var e=i;v(r.children(t),a),n[t]={low:e,lim:i++}}return Ae(a,"dfs"),v(r.children(),a),n}var _Y=t(()=>{XG(),Ae(kY,"parentDummyChains"),Ae(TY,"findPath"),Ae(EY,"postorder")});function CY(c,t){var h={};function e(t,n){var a=0,o=0,s=t.length,l=GB(n);return v(n,function(t,e){var r=AY(c,t),i=r?c.node(r).order:s;!r&&t!==l||(v(n.slice(o,e+1),function(n){v(c.predecessors(n),function(t){var e=c.node(t),r=e.order;!(r<a||i<r)||e.dummy&&c.node(n).dummy||LY(h,t,n)})}),o=e+1,a=i)}),n}return Ae(e,"visitLayer"),sG(t,e),h}function SY(s,t){var o={};function l(e,t,r,n,i){var a;v(tG(t,r),function(t){a=e[t],s.node(a).dummy&&v(s.predecessors(a),function(t){var e=s.node(t);e.dummy&&(e.order<n||e.order>i)&&LY(o,t,a)})})}function e(r,n){var i,a=-1,o=0;return v(n,function(t,e){"border"===s.node(t).dummy&&(t=s.predecessors(t)).length&&(i=s.node(t[0]).order,l(n,o,e,a,i),o=e,a=i),l(n,o,n.length,i,r.length)}),n}return Ae(l,"scan"),Ae(e,"visitLayer"),sG(t,e),o}function AY(e,t){if(e.node(t).dummy)return TF(e.predecessors(t),function(t){return e.node(t).dummy})}function LY(t,e,r){r<e&&(n=e,e=r,r=n);var n=t[e];n||(t[e]=n={}),n[r]=!0}function NY(t,e,r){var n;return r<e&&(n=e,e=r,r=n),b(t[e],r)}function IY(t,e,s,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 o=-1;v(t,function(t){var e=l(t);if(e.length)for(var r=((e=wG(e,function(t){return u[t]})).length-1)/2,n=Math.floor(r),i=Math.ceil(r);n<=i;++n){var a=e[n];h[t]===t&&o<u[a]&&!NY(s,t,a)&&(h[a]=t,h[t]=c[t]=c[a],o=u[a])}})}),{root:c,align:h}}function MY(n,t,e,r,i){var a={},o=RY(n,t,e,i),s=i?"borderLeft":"borderRight";function l(t,e){for(var r=o.nodes(),n=r.pop(),i={};n;)i[n]?t(n):(i[n]=!0,r.push(n),r=r.concat(e(n))),n=r.pop()}function c(t){a[t]=o.inEdges(t).reduce(function(t,e){return Math.max(t,a[e.v]+o.edge(e))},0)}function h(t){var e=o.outEdges(t).reduce(function(t,e){return Math.min(t,a[e.w]-o.edge(e))},Number.POSITIVE_INFINITY),r=n.node(t);e!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(a[t]=Math.max(a[t],e))}return Ae(l,"iterate"),Ae(c,"pass1"),Ae(h,"pass2"),l(c,o.predecessors.bind(o)),l(h,o.successors.bind(o)),v(r,function(t){a[t]=a[e[t]]}),a}function RY(a,t,o,e){var s=new rU,r=a.graph(),l=FY(r.nodesep,r.edgesep,e);return v(t,function(t){var i;v(t,function(t){var e,r,n=o[t];s.setNode(n),i&&(e=o[i],r=s.edge(e,n),s.setEdge(e,n,Math.max(l(a,t,i),r||0))),i=t})}),s}function DY(i,t){return Z$(u$(t),function(t){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return $F(t,function(t,e){e=$Y(i,e)/2,r=Math.max(t+e,r),n=Math.min(t-e,n)}),r-n})}function OY(o,s){var t=u$(s),l=V$(t),c=j$(t);v(["u","d"],function(a){v(["l","r"],function(t){var e,r,n=a+t,i=o[n];i!==s&&(e=u$(i),r="l"===t?l-V$(e):c-j$(e))&&(o[n]=$$(i,function(t){return t+r}))})})}function PY(r,n){return $$(r.ul,function(t,e){return n?r[n.toLowerCase()][e]:((e=wG(x(r,e)))[1]+e[2])/2})}function BY(n){var i,t=EU(n),a=o8(CY(n,t),SY(n,t)),o={},e=(v(["u","d"],function(r){i="u"===r?t:u$(t).reverse(),v(["l","r"],function(t){"r"===t&&(i=x(i,function(t){return u$(t).reverse()}));var e=("u"===r?n.predecessors:n.successors).bind(n),e=IY(0,i,a,e),e=MY(n,i,e.root,e.align,"r"===t);"r"===t&&(e=$$(e,function(t){return-t})),o[r+t]=e})}),DY(n,o));return OY(o,e),PY(o,n.graph().align)}function FY(o,s,l){return function(t,e,r){var n,i=t.node(e),a=t.node(r),e=0;if(e+=i.width/2,b(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":n=-i.width/2;break;case"r":n=i.width/2}if(n&&(e+=l?n:-n),n=0,e=(e=(e+=(i.dummy?s:o)/2)+(a.dummy?s:o)/2)+a.width/2,b(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":n=a.width/2;break;case"r":n=-a.width/2}return n&&(e+=l?n:-n),n=0,e}}function $Y(t,e){return t.node(e).width}var zY=t(()=>{XG(),iU(),MU(),Ae(CY,"findType1Conflicts"),Ae(SY,"findType2Conflicts"),Ae(AY,"findOtherInnerSegmentNode"),Ae(LY,"addConflict"),Ae(NY,"hasConflict"),Ae(IY,"verticalAlignment"),Ae(MY,"horizontalCompaction"),Ae(RY,"buildBlockGraph"),Ae(DY,"findSmallestWidthAlignment"),Ae(OY,"alignCoordinates"),Ae(PY,"balance"),Ae(BY,"positionX"),Ae(FY,"sep"),Ae($Y,"width")});function GY(r){UY(r=kU(r)),UF(BY(r),function(t,e){r.node(e).x=t})}function UY(r){var t=EU(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=j$(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var qY=t(()=>{XG(),MU(),zY(),Ae(GY,"position"),Ae(UY,"positionY")});function YY(e,t){var r=t&&t.debugTiming?NU:IU;r("layout",function(){var t=r(" buildLayoutGraph",function(){return WY(e)});r(" runLayout",function(){jY(t,r)}),r(" updateInputGraph",function(){HY(e,t)})})}function jY(t,e){e(" makeSpaceForEdgeLabels",function(){VY(t)}),e(" removeSelfEdges",function(){nj(t)}),e(" acyclic",function(){mU(t)}),e(" nestingGraph.run",function(){Gq(t)}),e(" rank",function(){Pq(kU(t))}),e(" injectEdgeLabelProxies",function(){XY(t)}),e(" removeEmptyRanks",function(){CU(t)}),e(" nestingGraph.cleanup",function(){jq(t)}),e(" normalizeRanks",function(){_U(t)}),e(" assignRankMinMax",function(){KY(t)}),e(" removeEdgeLabelProxies",function(){ZY(t)}),e(" normalize.run",function(){jU(t)}),e(" parentDummyChains",function(){kY(t)}),e(" addBorderSegments",function(){RU(t)}),e(" order",function(){yY(t)}),e(" insertSelfEdges",function(){ij(t)}),e(" adjustCoordinateSystem",function(){PU(t)}),e(" position",function(){GY(t)}),e(" positionSelfEdges",function(){aj(t)}),e(" removeBorderNodes",function(){rj(t)}),e(" normalize.undo",function(){WU(t)}),e(" fixupEdgeLabelCoords",function(){tj(t)}),e(" undoCoordinateSystem",function(){BU(t)}),e(" translateGraph",function(){QY(t)}),e(" assignNodeIntersects",function(){JY(t)}),e(" reversePoints",function(){ej(t)}),e(" acyclic.undo",function(){vU(t)})}function HY(n,i){v(n.nodes(),function(t){var e=n.node(t),r=i.node(t);e&&(e.x=r.x,e.y=r.y,i.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(n.edges(),function(t){var e=n.edge(t),t=i.edge(t);e.points=t.points,b(t,"x")&&(e.x=t.x,e.y=t.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function WY(r){var n=new rU({multigraph:!0,compound:!0}),t=sj(r.graph());return n.setGraph(o8({},cj,oj(t,lj),qz(t,hj))),v(r.nodes(),function(t){var e=sj(r.node(t));n.setNode(t,SB(oj(e,uj),dj)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=sj(r.edge(t));n.setEdge(t,o8({},gj,oj(e,pj),qz(e,fj)))}),n}function VY(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 XY(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},bU(r,"edge-proxy",e,"_ep"))})}function KY(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=j$(r,t.maxRank))}),e.graph().maxRank=r}function ZY(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 QY(e){var i=Number.POSITIVE_INFINITY,a=0,o=Number.POSITIVE_INFINITY,s=0,t=e.graph(),r=t.marginx||0,n=t.marginy||0;function l(t){var e=t.x,r=t.y,n=t.width,t=t.height;i=Math.min(i,e-n/2),a=Math.max(a,e+n/2),o=Math.min(o,r-t/2),s=Math.max(s,r+t/2)}Ae(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),b(t,"x")&&l(t)}),i-=r,o-=n,v(e.nodes(),function(t){(t=e.node(t)).x-=i,t.y-=o}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=i,t.y-=o}),b(t,"x")&&(t.x-=i),b(t,"y")&&(t.y-=o)}),t.width=a-i+r,t.height=s-o+n}function JY(a){v(a.edges(),function(t){var e,r=a.edge(t),n=a.node(t.v),t=a.node(t.w),i=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,n);r.points.unshift(TU(n,e)),r.points.push(TU(t,i))})}function tj(r){v(r.edges(),function(t){var e=r.edge(t);if(b(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 ej(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function rj(a){v(a.nodes(),function(t){var e,r,n,i;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),n=a.node(GB(t.borderLeft)),i=a.node(GB(t.borderRight)),t.width=Math.abs(i.x-n.x),t.height=Math.abs(r.y-e.y),t.x=n.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 nj(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 ij(i){var t=EU(i);v(t,function(t){var n=0;v(t,function(t,e){var r=i.node(t);r.order=e+n,v(r.selfEdges,function(t){bU(i,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function aj(o){v(o.nodes(),function(t){var e,r,n,i,a=o.node(t);"selfedge"===a.dummy&&(e=(i=o.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-e,i=i.height/2,o.setEdge(a.e,a.label),o.removeNode(t),a.label.points=[{x:e+2*n/3,y:r-i},{x:e+5*n/6,y:r-i},{x:e+n,y:r},{x:e+5*n/6,y:r+i},{x:e+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function oj(t,e){return $$(qz(t,e),Number)}function sj(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var lj,cj,hj,uj,dj,pj,gj,fj,mj=t(()=>{XG(),iU(),OU(),YU(),xU(),VU(),zq(),Hq(),wY(),_Y(),qY(),MU(),Ae(YY,"layout"),Ae(jY,"runLayout"),Ae(HY,"updateInputGraph"),lj=["nodesep","edgesep","ranksep","marginx","marginy"],cj={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},hj=["acyclicer","ranker","rankdir","align"],uj=["width","height"],dj={width:0,height:0},pj=["minlen","weight","width","height","labeloffset"],gj={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},fj=["labelpos"],Ae(WY,"buildLayoutGraph"),Ae(VY,"makeSpaceForEdgeLabels"),Ae(XY,"injectEdgeLabelProxies"),Ae(KY,"assignRankMinMax"),Ae(ZY,"removeEdgeLabelProxies"),Ae(QY,"translateGraph"),Ae(JY,"assignNodeIntersects"),Ae(tj,"fixupEdgeLabelCoords"),Ae(ej,"reversePointsForReversedEdges"),Ae(rj,"removeBorderNodes"),Ae(nj,"removeSelfEdges"),Ae(ij,"insertSelfEdges"),Ae(aj,"positionSelfEdges"),Ae(oj,"selectNumberAttrs"),Ae(sj,"canonicalize")}),yj=t(()=>{xU(),mj(),VU(),zq()});function vj(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:xj(t),edges:bj(t)};return R$(t.graph())||(e.value=wO(t.graph())),e}function xj(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return R$(e)||(t.value=e),R$(r)||(t.parent=r),t})}function bj(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return R$(t.name)||(r.name=t.name),R$(e)||(r.value=e),r})}var wj,kj,Tj,Ej,_j,Cj,Sj,Aj,Lj,Nj,Ij,Mj,Rj,Dj,Oj,Pj=t(()=>{XG(),nU(),Ae(vj,"write"),Ae(xj,"writeNodes"),Ae(bj,"writeEdges")}),Bj=t(()=>{e(),iU(),Pj(),wj=new Map,kj=new Map,Tj=new Map,Ej=Ae(()=>{kj.clear(),Tj.clear(),wj.clear()},"clear"),_j=Ae((t,e)=>{var r=kj.get(e)||[];return R.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),Cj=Ae((t,e)=>{var r=kj.get(e)||[];return R.info("Descendants of ",e," is ",r),R.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||_j(t.v,e)||_j(t.w,e)||r.includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),Sj=Ae((r,n,i,a)=>{R.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),R.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0<n.children(t).length?Sj(t,n,i,a):(e=n.node(t),R.info("cp ",t," to ",a," with parent ",r),i.setNode(t,e),a!==n.parent(t)&&(R.warn("Setting parent",t,n.parent(t)),i.setParent(t,n.parent(t))),r!==a&&t!==r?(R.debug("Setting parent",t,r),i.setParent(t,r)):(R.info("In copy ",r,"root",a,"data",n.node(r),a),R.debug("Not Setting parent for node=",t,"cluster!==rootId",r!==a,"node!==clusterId",t!==r)),e=n.edges(t),R.debug("Copying Edges",e),e.forEach(t=>{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{Cj(t,a)?(R.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),R.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):R.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){R.error(t)}})),R.debug("Removing node",t),n.removeNode(t)})},"copy"),Aj=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)Tj.set(i,t),n=[...n,...Aj(i,e)];return n},"extractDescendants"),Lj=Ae((t,e,r)=>{let n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),o=i.map(t=>({v:t.v,w:t.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),Nj=Ae((t,e,r)=>{var n,i=e.children(t);if(R.trace("Searching children of id ",t,i),i.length<1)return t;let a;for(n of i){var o=Nj(n,e,r),s=Lj(e,r,o);if(o){if(!(0<s.length))return o;a=o}}return a},"findNonClusterChild"),Ij=Ae(t=>wj.has(t)&&wj.get(t).externalConnections&&wj.has(t)?wj.get(t).id:t,"getAnchorId"),Mj=Ae((a,t)=>{if(!a||10<t)R.debug("Opting out, no graph ");else{R.debug("Opting in, graph "),a.nodes().forEach(function(t){0<a.children(t).length&&(R.warn("Cluster identified",t," Replacement id in edges: ",Nj(t,a,t)),kj.set(t,Aj(t,a)),wj.set(t,{id:Nj(t,a,t),clusterData:a.node(t)}))}),a.nodes().forEach(function(e){var t=a.children(e),r=a.edges();0<t.length?(R.debug("Cluster identified",e,kj),r.forEach(t=>{_j(t.v,e)^_j(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",kj.get(e)),wj.get(e).externalConnections=!0)})):R.debug("Not a cluster ",e,kj)});for(var e of wj.keys()){var r=wj.get(e).id;(r=a.parent(r))!==e&&wj.has(r)&&!wj.get(r).externalConnections&&(wj.get(e).id=r)}a.edges().forEach(function(t){var e,r,n,i=a.edge(t);R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),t.v,t.w,R.warn("Fix XXX",wj,"ids:",t.v,t.w,"Translating: ",wj.get(t.v)," --- ",wj.get(t.w)),(wj.get(t.v)||wj.get(t.w))&&(R.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=Ij(t.v),r=Ij(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(n=a.parent(e),wj.get(n).externalConnections=!0,i.fromCluster=t.v),r!==t.w&&(n=a.parent(r),wj.get(n).externalConnections=!0,i.toCluster=t.w),R.warn("Fix Replacing with XXX",e,r,t.name),a.setEdge(e,r,i,t.name))}),R.warn("Adjusted Graph",vj(a)),Rj(a,0),R.trace(wj)}},"adjustClustersAndEdges"),Rj=Ae((r,n)=>{if(R.warn("extractor - ",n,vj(r),r.children("D")),10<n)R.error("Bailing out");else{let t=r.nodes(),e=!1;for(var i of t)i=r.children(i),e=e||0<i.length;if(e){R.debug("Nodes = ",t,n);for(var a of t)if(R.debug("Extracting node",a,wj,wj.has(a)&&!wj.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",n),wj.has(a))if(!wj.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){R.warn("Cluster without external connections, without a parent and with children",a,n);let t="TB"===r.graph().rankdir?"LR":"TB";wj.get(a)?.clusterData?.dir&&(t=wj.get(a).clusterData.dir,R.warn("Fixing dir",wj.get(a).clusterData.dir,t));var o=new rU({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});R.warn("Old graph before copy",vj(r)),Sj(a,r,o,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:wj.get(a).clusterData,label:wj.get(a).label,graph:o}),R.warn("New graph after copy node: (",a,")",vj(o)),R.debug("Old graph after copy",vj(r))}else R.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!wj.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),n),R.debug(wj);else R.debug("Not a cluster",a,n);t=r.nodes(),R.warn("New list of nodes",t);for(var s of t){var l=r.node(s);R.warn(" Now next level",s,l),l?.clusterNode&&Rj(l.graph,n+1)}}else R.debug("Done, no node has children",r.nodes())}},"extractor"),Dj=Ae((e,t)=>{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=Dj(e,t),r=[...r,...t]}),r},"sorter"),Oj=Ae(t=>Dj(t,t.children()),"sortNodesByHierarchy")}),Fj={};J(Fj,{render:()=>zj});var $j,zj,Gj,Uj,qj,Yj,jj,Hj,Wj,Vj,Xj,Kj,Zj,Qj,Jj,tH,eH,rH=t(()=>{yj(),Pj(),iU(),NL(),IL(),Bj(),sI(),Y9(),LL(),e(),dA(),i(),$j=Ae(async(t,i,a,o,s,l)=>{R.warn("Graph in recursive render:XAX",vj(i),s);let c=i.graph().rankdir,n=(R.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?R.info("Recursive render XXX",i.nodes()):R.info("No nodes found for",i),0<i.edges().length&&R.info("Recursive edges",i.edge(i.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(i.nodes().map(async function(t){var e,r,n=i.node(t);void 0!==s&&(e=JSON.parse(JSON.stringify(s.clusterData)),R.trace(`Setting data for parent cluster XXX
|
|
|
Node.id = `,t,`
|
|
|
data=`,e.height,`
|
|
|
Parent cluster`,s.height),i.setNode(s.id,e),i.parent(t)||(R.trace("Setting parent",t,s.id),i.setParent(t,s.id,e))),R.info("(Insert) Node XXX"+t+": "+JSON.stringify(i.node(t))),n?.clusterNode?(R.info("Cluster identified XBX",t,n.width,i.node(t)),{ranksep:e,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:e+25,nodesep:r}),r=(e=await $j(u,n.graph,a,o,i.node(t),l)).elem,SL(n,r),n.diff=e.diff||0,R.info("New compound node after recursive render XAX",t,"width",n.width,"height",n.height),YN(r,n)):0<i.children(t).length?(R.trace("Cluster - the non recursive path XBX",t,n.id,n,n.width,"Graph:",i),R.trace(Nj(n.id,i)),wj.set(n.id,{id:Nj(n.id,i),node:n})):(R.trace("Node - the non recursive path XAX",t,u,i.node(t),c),await qN(u,i.node(t),c))})),await Ae(async()=>{var t=i.edges().map(async function(t){var e=i.edge(t.v,t.w,t.name);R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",wj,"ids:",t.v,t.w,"Translating: ",wj.get(t.v),wj.get(t.w)),await oL(r,e)});await Promise.all(t)},"processEdges")(),R.info("Graph before layout:",JSON.stringify(vj(i))),R.info("############################################# XXX"),R.info("### Layout ### XXX"),R.info("############################################# XXX"),YY(i),R.info("Graph after layout:",JSON.stringify(vj(i))),0),p=cA(l).subGraphTitleTotalMargin;return await Promise.all(Oj(i).map(async function(t){var e,r=i.node(t);R.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,R.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,i.parent(t)),wj.get(r.id).node=r,HN(r)):0<i.children(t).length?(R.info("A pure cluster node XBX1",t,r.id,r.x,r.y,r.width,r.height,i.parent(t)),r.height+=p,i.node(r.parentId),t=r?.padding/2||0,e=r?.labelBBox?.height||0,R.debug("OffsetY",e-t||0,"labelHeight",e,"halfPadding",t),await $9(n,r),wj.get(r.id).node=r):(e=i.node(r.parentId),r.y+=p/2,R.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",e,e?.offsetY,r),HN(r))})),i.edges().forEach(function(t){var e=i.edge(t),r=(R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=pL(h,e,wj,a,r,t,o);sL(e,r)}),i.nodes().forEach(function(t){var e=i.node(t);R.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),R.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),zj=Ae(async(t,e)=>{let l=new rU({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");_L(r,t.markers,t.type,t.diagramId),jN(),iL(),z9(),Ej(),t.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),R.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,n,i,a,o,s;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",n=e+"---"+e+"---2",i=l.node(e),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(t),o=structuredClone(t),s=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",o.arrowTypeEnd="none",o.id=e+"-cyclic-special-mid",s.label="",i.isGroup&&(a.fromCluster=e,s.toCluster=e),s.id=e+"-cyclic-special-2",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,n,o,e+"-cyclic-special-1"),l.setEdge(n,e,s,e+"-cyc<lic-special-2")):l.setEdge(t.start,t.end,{...t},t.id)}),R.warn("Graph at first:",JSON.stringify(vj(l))),Mj(l),R.warn("Graph after XAX:",JSON.stringify(vj(l))),e=D(),await $j(r,l,t.type,t.diagramId,void 0,e)},"render")}),nH=t(()=>{lI(),e(),Gj={},Uj=Ae(t=>{for(var e of t)Gj[e.name]=e},"registerLayoutLoaders"),Ae(()=>{Uj([{name:"dagre",loader:Ae(async()=>Promise.resolve().then(()=>(rH(),Fj)),"loader")}])},"registerDefaultLayoutLoaders")(),qj=Ae(async(t,e)=>{var r;if(t.layoutAlgorithm in Gj)return(await(r=Gj[t.layoutAlgorithm]).loader()).render(t,e,WN,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),Yj=Ae((t="",{fallback:e="dagre"}={})=>{if(t in Gj)return t;if(e in Gj)return R.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")}),iH=t(()=>{ec(),e(),jj=Ae((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:o}=Hj(t,e),n=(Vl(t,i,r,n),Wj(a,o,r,i,e));t.attr("viewBox",n),R.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),Hj=Ae((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"),Wj=Ae((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),aH=t(()=>{Q3(),i(),e(),uA(),nH(),iH(),K8(),I_(),Vj=Ae(function(t,e){return e.db.getClasses()},"getClasses"),Xj=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:o}=D(),s;"sandbox"===i&&(s=O("#i"+e));var l,c="sandbox"===i?s.nodes()[0].contentDocument:document,h=(R.debug("Before getData: "),n.db.getData()),u=(R.debug("Data: ",h),lA(e,i)),d=t_(),d=(h.type=n.type,h.layoutAlgorithm=Yj(o),"dagre"===h.layoutAlgorithm&&"elk"===o&&R.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,R.debug("REF1:",h),await qj(h,u),h.config.flowchart?.diagramPadding??8);H8.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),jj(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=O(`#${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"===i?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"),n=(r&&e.append(function(){return r.node()}),p.select(".label"));n&&e.append(function(){return n.node()})}}},"draw"),Kj={getClasses:Vj,draw:Xj}}),oH=t(()=>{function P(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),B=[1,4],F=[1,3],$=[1,5],z=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],G=[2,2],U=[1,13],q=[1,14],Y=[1,15],j=[1,16],H=[1,23],W=[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],n=[1,44],i=[1,46],a=[1,42],o=[1,47],s=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],et=[1,34],rt=[1,35],nt=[1,36],it=[1,37],at=[1,57],d=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],p=[1,61],g=[1,60],f=[1,62],ot=[8,9,11,73,75],st=[1,88],lt=[1,93],ct=[1,92],ht=[1,89],ut=[1,85],dt=[1,91],pt=[1,87],gt=[1,94],ft=[1,90],mt=[1,95],yt=[1,86],vt=[8,9,10,11,73,75],m=[8,9,10,11,44,73,75],y=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],xt=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],bt=[42,58,86,99,102,103,106,108,111,112,113],wt=[1,121],kt=[1,120],Tt=[1,128],Et=[1,142],_t=[1,143],Ct=[1,144],St=[1,145],At=[1,130],Lt=[1,132],Nt=[1,136],It=[1,137],Mt=[1,138],Rt=[1,139],Dt=[1,140],Ot=[1,141],Pt=[1,146],Bt=[1,147],Ft=[1,126],$t=[1,127],zt=[1,134],Gt=[1,129],Ut=[1,133],qt=[1,131],Yt=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],jt=[1,149],v=[8,9,11],x=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],b=[1,169],w=[1,165],k=[1,166],T=[1,170],E=[1,167],_=[1,168],Ht=[75,113,116],C=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],Wt=[10,103],Vt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],S=[1,235],A=[1,233],L=[1,237],N=[1,231],I=[1,232],M=[1,234],R=[1,236],D=[1,238],Xt=[1,255],Kt=[8,9,11,103],O=[8,9,10,11,58,81,102,103,106,107,108,109],B={trace:Ae(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,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$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",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"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],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,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],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||0<a[s].length)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 176:this.$=a[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=n.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=n.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 43:n.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 44:n.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 45:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 46:this.$={stmt:a[s],nodes:a[s]};break;case 47:this.$=[a[s]];break;case 48:this.$=a[s-4].concat(a[s]);break;case 49:this.$=a[s];break;case 50:this.$=a[s-2],n.setClass(a[s-2],a[s]);break;case 51:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"square");break;case 52:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"doublecircle");break;case 53:this.$=a[s-5],n.addVertex(a[s-5],a[s-2],"circle");break;case 54:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"ellipse");break;case 55:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"stadium");break;case 56:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"subroutine");break;case 57:this.$=a[s-7],n.addVertex(a[s-7],a[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 58:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"cylinder");break;case 59:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"round");break;case 60:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"diamond");break;case 61:this.$=a[s-5],n.addVertex(a[s-5],a[s-2],"hexagon");break;case 62:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"odd");break;case 63:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"trapezoid");break;case 64:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 65:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"lean_right");break;case 66:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"lean_left");break;case 67:this.$=a[s],n.addVertex(a[s]);break;case 68:a[s-1].text=a[s],this.$=a[s-1];break;case 69:case 70:a[s-2].text=a[s-1],this.$=a[s-2];break;case 71:this.$=a[s];break;case 72:var l=n.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1]};break;case 73:this.$={text:a[s],type:"text"};break;case 74:this.$={text:a[s-1].text+""+a[s],type:a[s-1].type};break;case 75:this.$={text:a[s],type:"string"};break;case 76:this.$={text:a[s],type:"markdown"};break;case 77:l=n.destructLink(a[s]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 78:this.$=a[s-1];break;case 79:this.$={text:a[s],type:"text"};break;case 80:this.$={text:a[s-1].text+""+a[s],type:a[s-1].type};break;case 81:this.$={text:a[s],type:"string"};break;case 82:case 97:this.$={text:a[s],type:"markdown"};break;case 94:this.$={text:a[s],type:"text"};break;case 95:this.$={text:a[s-1].text+""+a[s],type:a[s-1].type};break;case 96:this.$={text:a[s],type:"text"};break;case 98:this.$=a[s-4],n.addClass(a[s-2],a[s]);break;case 99:this.$=a[s-4],n.setClass(a[s-2],a[s]);break;case 100:case 108:this.$=a[s-1],n.setClickEvent(a[s-1],a[s]);break;case 101:case 109:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-2]),n.setTooltip(a[s-3],a[s]);break;case 102:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 103:this.$=a[s-4],n.setClickEvent(a[s-4],a[s-3],a[s-2]),n.setTooltip(a[s-4],a[s]);break;case 104:this.$=a[s-2],n.setLink(a[s-2],a[s]);break;case 105:this.$=a[s-4],n.setLink(a[s-4],a[s-2]),n.setTooltip(a[s-4],a[s]);break;case 106:this.$=a[s-4],n.setLink(a[s-4],a[s-2],a[s]);break;case 107:this.$=a[s-6],n.setLink(a[s-6],a[s-4],a[s]),n.setTooltip(a[s-6],a[s-2]);break;case 110:this.$=a[s-1],n.setLink(a[s-1],a[s]);break;case 111:this.$=a[s-3],n.setLink(a[s-3],a[s-2]),n.setTooltip(a[s-3],a[s]);break;case 112:this.$=a[s-3],n.setLink(a[s-3],a[s-2],a[s]);break;case 113:this.$=a[s-5],n.setLink(a[s-5],a[s-4],a[s]),n.setTooltip(a[s-5],a[s-2]);break;case 114:this.$=a[s-4],n.addVertex(a[s-2],void 0,void 0,a[s]);break;case 115:this.$=a[s-4],n.updateLink([a[s-2]],a[s]);break;case 116:this.$=a[s-4],n.updateLink(a[s-2],a[s]);break;case 117:this.$=a[s-8],n.updateLinkInterpolate([a[s-6]],a[s-2]),n.updateLink([a[s-6]],a[s]);break;case 118:this.$=a[s-8],n.updateLinkInterpolate(a[s-6],a[s-2]),n.updateLink(a[s-6],a[s]);break;case 119:this.$=a[s-6],n.updateLinkInterpolate([a[s-4]],a[s]);break;case 120:this.$=a[s-6],n.updateLinkInterpolate(a[s-4],a[s]);break;case 121:case 123:this.$=[a[s]];break;case 122:case 124:a[s-2].push(a[s]),this.$=a[s-2];break;case 126:this.$=a[s-1]+a[s];break;case 174:this.$=a[s];break;case 175:case 177:this.$=a[s-1]+""+a[s];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181: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:Y,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:H,33:24,34:W,36:V,38:X,40:28,41:38,42:e,43:39,45:40,58:r,81:K,82:Z,83:Q,84:J,85:tt,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u,118:et,119:rt,120:nt,121:it},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,39:59,70:63,73:[1,64],75:[1,65]},{8:p,9:g,11:f,21:66},{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,10:[1,71],11:f,21:72},t(d,[2,36]),{35:[1,73]},{37:[1,74]},t(d,[2,39]),t(ot,[2,46],{18:75,10:at}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:st,42:lt,58:ct,77:[1,83],86:ht,92:[1,80],94:[1,81],98:82,102:ut,103:dt,106:pt,108:gt,111:ft,112:mt,113:yt,117:84},t(d,[2,178]),t(d,[2,179]),t(d,[2,180]),t(d,[2,181]),t(vt,[2,47]),t(vt,[2,49],{44:[1,96]}),t(m,[2,67],{110:109,29:[1,97],42:e,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:r,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:n,99:i,102:a,103:o,106:s,108:l,111:c,112:h,113:u}),t(y,[2,174]),t(y,[2,135]),t(y,[2,136]),t(y,[2,137]),t(y,[2,138]),t(y,[2,139]),t(y,[2,140]),t(y,[2,141]),t(y,[2,142]),t(y,[2,143]),t(y,[2,144]),t(y,[2,145]),t(z,[2,12]),t(z,[2,18]),t(z,[2,19]),{9:[1,110]},t(xt,[2,26],{18:111,10:at}),t(d,[2,27]),{40:112,41:38,42:e,43:39,45:40,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},t(d,[2,40]),t(d,[2,41]),t(d,[2,42]),t(bt,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:wt,116:kt},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(d,[2,28]),t(d,[2,29]),t(d,[2,30]),t(d,[2,31]),t(d,[2,32]),{10:Tt,12:Et,14:_t,27:Ct,28:122,32:St,42:At,58:Lt,73:Nt,77:[1,124],78:[1,125],80:135,81:It,82:Mt,83:Rt,84:Dt,85:Ot,86:Pt,87:Bt,88:123,102:Ft,106:$t,108:zt,111:Gt,112:Ut,113:qt},t(Yt,G,{5:148}),t(d,[2,37]),t(d,[2,38]),t(ot,[2,45],{42:jt}),{42:e,45:150,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},{99:[1,151],100:152,102:[1,153]},{42:e,45:154,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},{42:e,45:155,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},t(v,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(v,[2,108],{117:160,10:[1,159],14:st,42:lt,58:ct,86:ht,102:ut,103:dt,106:pt,108:gt,111:ft,112:mt,113:yt}),t(v,[2,110],{10:[1,161]}),t(x,[2,176]),t(x,[2,163]),t(x,[2,164]),t(x,[2,165]),t(x,[2,166]),t(x,[2,167]),t(x,[2,168]),t(x,[2,169]),t(x,[2,170]),t(x,[2,171]),t(x,[2,172]),t(x,[2,173]),{42:e,45:162,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},{30:163,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:171,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:173,48:[1,172],65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:174,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:175,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:176,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{106:[1,177]},{30:178,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:179,63:[1,180],65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:181,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:182,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{30:183,65:b,77:w,78:k,79:164,113:T,114:E,115:_},t(y,[2,175]),t(z,[2,20]),t(xt,[2,25]),t(ot,[2,43],{18:184,10:at}),t(bt,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{75:[1,188],76:189,113:wt,116:kt},t(Ht,[2,73]),t(Ht,[2,75]),t(Ht,[2,76]),t(Ht,[2,161]),t(Ht,[2,162]),{8:p,9:g,10:Tt,11:f,12:Et,14:_t,21:191,27:Ct,29:[1,190],32:St,42:At,58:Lt,73:Nt,80:135,81:It,82:Mt,83:Rt,84:Dt,85:Ot,86:Pt,87:Bt,88:192,102:Ft,106:$t,108:zt,111:Gt,112:Ut,113:qt},t(C,[2,94]),t(C,[2,96]),t(C,[2,97]),t(C,[2,150]),t(C,[2,151]),t(C,[2,152]),t(C,[2,153]),t(C,[2,154]),t(C,[2,155]),t(C,[2,156]),t(C,[2,157]),t(C,[2,158]),t(C,[2,159]),t(C,[2,160]),t(C,[2,83]),t(C,[2,84]),t(C,[2,85]),t(C,[2,86]),t(C,[2,87]),t(C,[2,88]),t(C,[2,89]),t(C,[2,90]),t(C,[2,91]),t(C,[2,92]),t(C,[2,93]),{6:11,7:12,8:U,9:q,10:Y,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:H,32:[1,193],33:24,34:W,36:V,38:X,40:28,41:38,42:e,43:39,45:40,58:r,81:K,82:Z,83:Q,84:J,85:tt,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u,118:et,119:rt,120:nt,121:it},{10:at,18:194},{10:[1,195],42:e,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:109,111:c,112:h,113:u},{10:[1,196]},{10:[1,197],103:[1,198]},t(Wt,[2,121]),{10:[1,199],42:e,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:109,111:c,112:h,113:u},{10:[1,200],42:e,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:109,111:c,112:h,113:u},{77:[1,201]},t(v,[2,102],{10:[1,202]}),t(v,[2,104],{10:[1,203]}),{77:[1,204]},t(x,[2,177]),{77:[1,205],95:[1,206]},t(vt,[2,50],{110:109,42:e,58:r,86:n,99:i,102:a,103:o,106:s,108:l,111:c,112:h,113:u}),{31:[1,207],65:b,79:208,113:T,114:E,115:_},t(Vt,[2,79]),t(Vt,[2,81]),t(Vt,[2,82]),t(Vt,[2,146]),t(Vt,[2,147]),t(Vt,[2,148]),t(Vt,[2,149]),{47:[1,209],65:b,79:208,113:T,114:E,115:_},{30:210,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{49:[1,211],65:b,79:208,113:T,114:E,115:_},{51:[1,212],65:b,79:208,113:T,114:E,115:_},{53:[1,213],65:b,79:208,113:T,114:E,115:_},{55:[1,214],65:b,79:208,113:T,114:E,115:_},{58:[1,215]},{62:[1,216],65:b,79:208,113:T,114:E,115:_},{64:[1,217],65:b,79:208,113:T,114:E,115:_},{30:218,65:b,77:w,78:k,79:164,113:T,114:E,115:_},{31:[1,219],65:b,79:208,113:T,114:E,115:_},{65:b,67:[1,220],69:[1,221],79:208,113:T,114:E,115:_},{65:b,67:[1,223],69:[1,222],79:208,113:T,114:E,115:_},t(ot,[2,44],{42:jt}),t(bt,[2,70]),t(bt,[2,69]),{60:[1,224],65:b,79:208,113:T,114:E,115:_},t(bt,[2,72]),t(Ht,[2,74]),{30:225,65:b,77:w,78:k,79:164,113:T,114:E,115:_},t(Yt,G,{5:226}),t(C,[2,95]),t(d,[2,35]),{41:227,42:e,43:39,45:40,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},{10:S,58:A,81:L,89:228,102:N,104:229,105:230,106:I,107:M,108:R,109:D},{10:S,58:A,81:L,89:239,101:[1,240],102:N,104:229,105:230,106:I,107:M,108:R,109:D},{10:S,58:A,81:L,89:241,101:[1,242],102:N,104:229,105:230,106:I,107:M,108:R,109:D},{102:[1,243]},{10:S,58:A,81:L,89:244,102:N,104:229,105:230,106:I,107:M,108:R,109:D},{42:e,45:245,58:r,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u},t(v,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(v,[2,109]),t(v,[2,111],{10:[1,249]}),t(v,[2,112]),t(m,[2,51]),t(Vt,[2,80]),t(m,[2,52]),{49:[1,250],65:b,79:208,113:T,114:E,115:_},t(m,[2,59]),t(m,[2,54]),t(m,[2,55]),t(m,[2,56]),{106:[1,251]},t(m,[2,58]),t(m,[2,60]),{64:[1,252],65:b,79:208,113:T,114:E,115:_},t(m,[2,62]),t(m,[2,63]),t(m,[2,65]),t(m,[2,64]),t(m,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:b,79:208,113:T,114:E,115:_},{6:11,7:12,8:U,9:q,10:Y,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:H,32:[1,254],33:24,34:W,36:V,38:X,40:28,41:38,42:e,43:39,45:40,58:r,81:K,82:Z,83:Q,84:J,85:tt,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u,118:et,119:rt,120:nt,121:it},t(vt,[2,48]),t(v,[2,114],{103:Xt}),t(Kt,[2,123],{105:256,10:S,58:A,81:L,102:N,106:I,107:M,108:R,109:D}),t(O,[2,125]),t(O,[2,127]),t(O,[2,128]),t(O,[2,129]),t(O,[2,130]),t(O,[2,131]),t(O,[2,132]),t(O,[2,133]),t(O,[2,134]),t(v,[2,115],{103:Xt}),{10:[1,257]},t(v,[2,116],{103:Xt}),{10:[1,258]},t(Wt,[2,122]),t(v,[2,98],{103:Xt}),t(v,[2,99],{110:109,42:e,58:r,86:n,99:i,102:a,103:o,106:s,108:l,111:c,112:h,113:u}),t(v,[2,103]),t(v,[2,105],{10:[1,259]}),t(v,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:p,9:g,11:f,21:264},t(d,[2,34]),{10:S,58:A,81:L,102:N,104:265,105:230,106:I,107:M,108:R,109:D},t(O,[2,126]),{14:st,42:lt,58:ct,86:ht,98:266,102:ut,103:dt,106:pt,108:gt,111:ft,112:mt,113:yt,117:84},{14:st,42:lt,58:ct,86:ht,98:267,102:ut,103:dt,106:pt,108:gt,111:ft,112:mt,113:yt,117:84},{95:[1,268]},t(v,[2,113]),t(m,[2,53]),{30:269,65:b,77:w,78:k,79:164,113:T,114:E,115:_},t(m,[2,61]),t(Yt,G,{5:270}),t(Kt,[2,124],{105:256,10:S,58:A,81:L,102:N,106:I,107:M,108:R,109:D}),t(v,[2,119],{117:160,10:[1,271],14:st,42:lt,58:ct,86:ht,102:ut,103:dt,106:pt,108:gt,111:ft,112:mt,113:yt}),t(v,[2,120],{117:160,10:[1,272],14:st,42:lt,58:ct,86:ht,102:ut,103:dt,106:pt,108:gt,111:ft,112:mt,113:yt}),t(v,[2,107]),{31:[1,273],65:b,79:208,113:T,114:E,115:_},{6:11,7:12,8:U,9:q,10:Y,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:H,32:[1,274],33:24,34:W,36:V,38:X,40:28,41:38,42:e,43:39,45:40,58:r,81:K,82:Z,83:Q,84:J,85:tt,86:n,99:i,102:a,103:o,106:s,108:l,110:41,111:c,112:h,113:u,118:et,119:rt,120:nt,121:it},{10:S,58:A,81:L,89:275,102:N,104:229,105:230,106:I,107:M,108:R,109:D},{10:S,58:A,81:L,89:276,102:N,104:229,105:230,106:I,107:M,108:R,109:D},t(m,[2,57]),t(d,[2,33]),t(v,[2,117],{103:Xt}),t(v,[2,118],{103:Xt})],defaultActions:{},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},F={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 11:this.popState();break;case 12:return 93;case 13:return"MD_STR";case 14:this.popState();break;case 15:this.begin("md_string");break;case 16:return"STR";case 17:this.popState();break;case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 27:this.popState();break;case 28:return 85;case 29:case 30:case 31:return t.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:case 35:case 36:case 37:return 95;case 38:return this.popState(),13;case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:return this.popState(),14;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:return 108;case 55:return 44;case 56:return 58;case 57:return 42;case 58:return 8;case 59:return 103;case 60:return 112;case 61:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:return 116;case 64:return this.popState(),75;case 65:return this.pushState("thickEdgeText"),73;case 66:return 116;case 67:return this.popState(),75;case 68:return this.pushState("dottedEdgeText"),73;case 69:return 116;case 70:return 75;case 71:return this.popState(),51;case 72:return"TEXT";case 73:return this.pushState("ellipseText"),50;case 74:return this.popState(),53;case 75:return this.pushState("text"),52;case 76:return this.popState(),55;case 77:return this.pushState("text"),54;case 78:return 56;case 79:return this.pushState("text"),65;case 80:return this.popState(),62;case 81:return this.pushState("text"),61;case 82:return this.popState(),47;case 83:return this.pushState("text"),46;case 84:return this.popState(),67;case 85:return this.popState(),69;case 86:return 114;case 87:return this.pushState("trapText"),66;case 88:return this.pushState("trapText"),68;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 94:return 112;case 95:return 108;case 96:return 42;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;case 101:return this.pushState("text"),60;case 102:return this.popState(),49;case 103:return this.pushState("text"),48;case 104:return this.popState(),31;case 105:return this.pushState("text"),29;case 106:return this.popState(),64;case 107:return this.pushState("text"),63;case 108:return"TEXT";case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?: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]*)/,/^(?:[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:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};B.lexer=F,Ae(P,"Parser"),(Zj=new((P.prototype=B).Parser=P)).parser=Zj,Qj=Zj}),sH=t(()=>{bn(),Jj=Ae((t,e)=>{var r=(i=Fe)(t,"r"),n=i(t,"g"),i=i(t,"b");return Pe(r,n,i,e)},"fade"),tH=Ae(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 {
|
|
|
text-anchor: middle;
|
|
|
}
|
|
|
// .flowchart-label .text-outer-tspan {
|
|
|
// text-anchor: middle;
|
|
|
// }
|
|
|
// .flowchart-label .text-inner-tspan {
|
|
|
// text-anchor: start;
|
|
|
// }
|
|
|
|
|
|
.node .katex path {
|
|
|
fill: #000;
|
|
|
stroke: #000;
|
|
|
stroke-width: 1px;
|
|
|
}
|
|
|
|
|
|
.node .label {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.node.clickable {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
.arrowheadPath {
|
|
|
fill: ${t.arrowheadColor};
|
|
|
}
|
|
|
|
|
|
.edgePath .path {
|
|
|
stroke: ${t.lineColor};
|
|
|
stroke-width: 2.0px;
|
|
|
}
|
|
|
|
|
|
.flowchart-link {
|
|
|
stroke: ${t.lineColor};
|
|
|
fill: none;
|
|
|
}
|
|
|
|
|
|
.edgeLabel {
|
|
|
background-color: ${t.edgeLabelBackground};
|
|
|
p {
|
|
|
background-color: ${t.edgeLabelBackground};
|
|
|
}
|
|
|
rect {
|
|
|
opacity: 0.5;
|
|
|
background-color: ${t.edgeLabelBackground};
|
|
|
fill: ${t.edgeLabelBackground};
|
|
|
}
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
/* For html labels only */
|
|
|
.labelBkg {
|
|
|
background-color: ${Jj(t.edgeLabelBackground,.5)};
|
|
|
// background-color:
|
|
|
}
|
|
|
|
|
|
.cluster rect {
|
|
|
fill: ${t.clusterBkg};
|
|
|
stroke: ${t.clusterBorder};
|
|
|
stroke-width: 1px;
|
|
|
}
|
|
|
|
|
|
.cluster text {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
.cluster span {
|
|
|
color: ${t.titleColor};
|
|
|
}
|
|
|
/* .cluster div {
|
|
|
color: ${t.titleColor};
|
|
|
} */
|
|
|
|
|
|
div.mermaidTooltip {
|
|
|
position: absolute;
|
|
|
text-align: center;
|
|
|
max-width: 200px;
|
|
|
padding: 2px;
|
|
|
font-family: ${t.fontFamily};
|
|
|
font-size: 12px;
|
|
|
background: ${t.tertiaryColor};
|
|
|
border: 1px solid ${t.border2};
|
|
|
border-radius: 2px;
|
|
|
pointer-events: none;
|
|
|
z-index: 100;
|
|
|
}
|
|
|
|
|
|
.flowchartTitleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: 18px;
|
|
|
fill: ${t.textColor};
|
|
|
}
|
|
|
`,"getStyles"),eH=tH}),lH={};J(lH,{diagram:()=>cH});var cH,hH,uH,dH,pH,gH,fH,mH,yH,vH,xH,bH,wH,kH,TH,EH,_H,CH,SH=t(()=>{i(),I_(),aH(),oH(),sH(),cH={parser:Qj,db:A_,renderer:Kj,styles:eH,init:Ae(t=>{t.flowchart||(t.flowchart={}),t.layout&&yc({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,yc({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),A_.clear(),A_.setGen("gen-2")},"init")}}),AH=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,20,22,24,26,27,28],n=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,14],l=[1,15],c=[1,21],h=[1,22],u=[1,23],d=[1,24],p=[1,25],g=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],f=[1,34],m=[27,28,46,47],y=[41,42,43,44,45],v=[17,34],x=[1,54],b=[1,53],w=[17,34,36,38],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[s-4]),n.addEntity(a[s-2]),n.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:n.addEntity(a[s-3]),n.addAttributes(a[s-3],a[s-1]);break;case 10:n.addEntity(a[s-2]);break;case 11:n.addEntity(a[s]);break;case 12:n.addEntity(a[s-6],a[s-4]),n.addAttributes(a[s-6],a[s-1]);break;case 13:n.addEntity(a[s-5],a[s-3]);break;case 14:n.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=n.Cardinality.ZERO_OR_ONE;break;case 35:this.$=n.Cardinality.ZERO_OR_MORE;break;case 36:this.$=n.Cardinality.ONE_OR_MORE;break;case 37:this.$=n.Cardinality.ONLY_ONE;break;case 38:this.$=n.Cardinality.MD_PARENT;break;case 39:this.$=n.Identification.NON_IDENTIFYING;break;case 40:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:n,22:i,24:a,26:o,27:s,28:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:16,11:9,20:n,22:i,24:a,26:o,27:s,28:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:h,43:u,44:d,45:p}),{21:[1,26]},{23:[1,27]},{25:[1,28]},e(r,[2,18]),e(g,[2,19]),e(g,[2,20]),e(r,[2,4]),{11:29,27:s,28:l},{16:30,17:[1,31],29:32,30:33,34:f},{11:35,27:s,28:l},{40:36,46:[1,37],47:[1,38]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),e(r,[2,15]),e(r,[2,16]),e(r,[2,17]),{13:[1,39]},{17:[1,40]},e(r,[2,10]),{16:41,17:[2,21],29:32,30:33,34:f},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:h,43:u,44:d,45:p},e(y,[2,39]),e(y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},e(r,[2,9]),{17:[2,22]},e(v,[2,23],{32:50,33:51,35:52,37:x,38:b}),e([17,34,37,38],[2,28]),e(r,[2,14],{15:[1,55]}),e([27,28],[2,33]),e(r,[2,8]),e(r,[2,41]),e(r,[2,42]),e(r,[2,43]),e(v,[2,24],{33:56,36:[1,57],38:b}),e(v,[2,25]),e(w,[2,29]),e(v,[2,32]),e(w,[2,31]),{16:58,17:[1,59],29:32,30:33,34:f},e(v,[2,26]),{35:60,37:x},{17:[1,61]},e(r,[2,13]),e(w,[2,30]),e(r,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:case 27:case 28:return 43;case 29:case 30:return 41;case 31:case 32:case 33:case 34:case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:case 40:case 41:case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:case 49:return 47;case 50:case 51:case 52:return 46;case 53:return 27;case 54:return e.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(hH=new((t.prototype=n).Parser=t)).parser=hH,uH=hH}),LH=t(()=>{e(),i(),fh(),dH=new Map,pH=[],gH={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},fH={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},mH=Ae(function(t,e=void 0){return dH.has(t)?!dH.get(t).alias&&e&&(dH.get(t).alias=e,R.info(`Add alias '${e}' to entity '${t}'`)):(dH.set(t,{attributes:[],alias:e}),R.info("Added new entity :",t)),dH.get(t)},"addEntity"),yH=Ae(()=>dH,"getEntities"),vH=Ae(function(t,e){let r=mH(t),n;for(n=e.length-1;0<=n;n--)r.attributes.push(e[n]),R.debug("Added attribute ",e[n].attributeName)},"addAttributes"),xH=Ae(function(t,e,r,n){pH.push(t={entityA:t,roleA:e,entityB:r,relSpec:n}),R.debug("Added new relationship :",t)},"addRelationship"),bH=Ae(()=>pH,"getRelationships"),wH=Ae(function(){dH=new Map,pH=[],lc()},"clear"),kH={Cardinality:gH,Identification:fH,getConfig:Ae(()=>D().er,"getConfig"),addEntity:mH,addAttributes:vH,getEntities:yH,addRelationship:xH,getRelationships:bH,clear:wH,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,setDiagramTitle:pc,getDiagramTitle:gc}}),NH=t(()=>{TH={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},EH=Ae(function(t,e){let r;t.append("defs").append("marker").attr("id",TH.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",TH.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",TH.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",TH.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(r=t.append("defs").append("marker").attr("id",TH.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(r=t.append("defs").append("marker").attr("id",TH.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",TH.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").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",TH.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(r=t.append("defs").append("marker").attr("id",TH.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(r=t.append("defs").append("marker").attr("id",TH.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),_H={ERMarkers:TH,insertMarkers:EH}}),IH=t(()=>{CH=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function MH(t){return"string"==typeof t&&CH.test(t)}var RH,DH=t(()=>{IH(),Ae(MH,"validate"),RH=MH});function OH(t,e=0){return PH[t[e+0]]+PH[t[e+1]]+PH[t[e+2]]+PH[t[e+3]]+"-"+PH[t[e+4]]+PH[t[e+5]]+"-"+PH[t[e+6]]+PH[t[e+7]]+"-"+PH[t[e+8]]+PH[t[e+9]]+"-"+PH[t[e+10]]+PH[t[e+11]]+PH[t[e+12]]+PH[t[e+13]]+PH[t[e+14]]+PH[t[e+15]]}var PH,BH=t(()=>{PH=[];for(let t=0;t<256;++t)PH.push((t+256).toString(16).slice(1));Ae(OH,"unsafeStringify")});function FH(t){var e,r;if(RH(t))return(r=new Uint8Array(16))[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r;throw TypeError("Invalid UUID")}var $H,zH=t(()=>{DH(),Ae(FH,"parse"),$H=FH});function GH(e){e=unescape(encodeURIComponent(e));var r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t));return r}function UH(t,a,o){function e(t,e,r,n){if("string"==typeof t&&(t=GH(t)),16!==(null==(e="string"==typeof e?$H(e):e)?void 0:e.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let i=new Uint8Array(16+t.length);if(i.set(e),i.set(t,e.length),(i=o(i))[6]=15&i[6]|a,i[8]=63&i[8]|128,r){n=n||0;for(let t=0;t<16;++t)r[n+t]=i[t];return r}return OH(i)}Ae(e,"generateUUID");try{e.name=t}catch{}return e.DNS=qH,e.URL=YH,e}var qH,YH,jH=t(()=>{BH(),zH(),Ae(GH,"stringToBytes"),qH="6ba7b810-9dad-11d1-80b4-00c04fd430c8",YH="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Ae(UH,"v35")});function HH(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function WH(t,e){return t<<e|t>>>32-e}function VH(r){var s=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);var n=r.length/4+2,i=Math.ceil(n/16),l=new Array(i);for(let e=0;e<i;++e){var a=new Uint32Array(16);for(let t=0;t<16;++t)a[t]=r[64*e+4*t]<<24|r[64*e+4*t+1]<<16|r[64*e+4*t+2]<<8|r[64*e+4*t+3];l[e]=a}l[i-1][14]=8*(r.length-1)/Math.pow(2,32),l[i-1][14]=Math.floor(l[i-1][14]),l[i-1][15]=8*(r.length-1)&4294967295;for(let o=0;o<i;++o){var c=new Uint32Array(80);for(let t=0;t<16;++t)c[t]=l[o][t];for(let t=16;t<80;++t)c[t]=WH(c[t-3]^c[t-8]^c[t-14]^c[t-16],1);let e=t[0],r=t[1],n=t[2],i=t[3],a=t[4];for(let t=0;t<80;++t){var h=Math.floor(t/20),h=WH(e,5)+HH(h,r,n,i)+a+s[h]+c[t]>>>0;a=i,i=n,n=WH(r,30)>>>0,r=e,e=h}t[0]=t[0]+e>>>0,t[1]=t[1]+r>>>0,t[2]=t[2]+n>>>0,t[3]=t[3]+i>>>0,t[4]=t[4]+a>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}var XH,KH,ZH,QH=t(()=>{Ae(HH,"f"),Ae(WH,"ROTL"),Ae(VH,"sha1"),XH=VH}),JH=t(()=>{jH(),QH(),KH=UH("v5",80,XH),ZH=KH}),tW=t(()=>{JH()});function eW(t="",e=""){var r=t.replace(nW,"");return""+rW(e)+rW(r)+ZH(t,fW)}function rW(t=""){return 0<t.length?t+"-":""}var nW,iW,aW,oW,sW,lW,cW,hW,uW,dW,pW,gW,fW,mW,yW,vW,xW=t(()=>{iU(),Q3(),yj(),i(),e(),K8(),NH(),ec(),tc(),tW(),nW=/[^\dA-Za-z](\W)*/g,iW={},aW=new Map,oW=Ae(function(t){var e;for(e of Object.keys(t))iW[e]=t[e]},"setConf"),sW=Ae((c,h,t)=>{let u=iW.entityPadding/3,l=iW.entityPadding/3,d=.85*iW.fontSize,e=h.node().getBBox(),p=[],g=!1,f=!1,m=0,y=0,v=0,x=0,b=e.height+2*u,w=1,r=(t.forEach(t=>{void 0!==t.attributeKeyTypeList&&0<t.attributeKeyTypeList.length&&(g=!0),void 0!==t.attributeComment&&(f=!0)}),t.forEach(t=>{let e=h.node().id+"-attr-"+w,r=0,n=Bl(t.attributeType),i=c.append("text").classed("er entityLabel",!0).attr("id",e+"-type").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(n),a=c.append("text").classed("er entityLabel",!0).attr("id",e+"-name").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(t.attributeName),o={};o.tn=i,o.nn=a;var s=i.node().getBBox(),l=a.node().getBBox();m=Math.max(m,s.width),y=Math.max(y,l.width),r=Math.max(s.height,l.height),g&&(s=void 0!==t.attributeKeyTypeList?t.attributeKeyTypeList.join(","):"",l=c.append("text").classed("er entityLabel",!0).attr("id",e+"-key").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(s),s=(o.kn=l).node().getBBox(),v=Math.max(v,s.width),r=Math.max(r,s.height)),f&&(l=c.append("text").classed("er entityLabel",!0).attr("id",e+"-comment").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(t.attributeComment||""),s=(o.cn=l).node().getBBox(),x=Math.max(x,s.width),r=Math.max(r,s.height)),o.height=r,p.push(o),b+=r+2*u,w+=1}),4);g&&(r+=2),f&&(r+=2);var n=m+y+v+x,i={width:Math.max(iW.minEntityWidth,Math.max(e.width+2*iW.entityPadding,n+l*r)),height:0<t.length?b:Math.max(iW.minEntityHeight,e.height+2*iW.entityPadding)};if(0<t.length){let a=Math.max(0,(i.width-n-l*r)/(r/2)),o=(h.attr("transform","translate("+i.width/2+","+(u+e.height/2)+")"),e.height+2*u),s="attributeBoxOdd";p.forEach(t=>{var e=o+u+t.height/2,r=(t.tn.attr("transform","translate("+l+","+e+")"),c.insert("rect","#"+t.tn.node().id).classed("er "+s,!0).attr("x",0).attr("y",o).attr("width",m+2*l+a).attr("height",t.height+2*u)),r=parseFloat(r.attr("x"))+parseFloat(r.attr("width"));t.nn.attr("transform","translate("+(r+l)+","+e+")");let n=c.insert("rect","#"+t.nn.node().id).classed("er "+s,!0).attr("x",r).attr("y",o).attr("width",y+2*l+a).attr("height",t.height+2*u),i=parseFloat(n.attr("x"))+parseFloat(n.attr("width"));g&&(t.kn.attr("transform","translate("+(i+l)+","+e+")"),r=c.insert("rect","#"+t.kn.node().id).classed("er "+s,!0).attr("x",i).attr("y",o).attr("width",v+2*l+a).attr("height",t.height+2*u),i=parseFloat(r.attr("x"))+parseFloat(r.attr("width"))),f&&(t.cn.attr("transform","translate("+(i+l)+","+e+")"),c.insert("rect","#"+t.cn.node().id).classed("er "+s,"true").attr("x",i).attr("y",o).attr("width",x+2*l+a).attr("height",t.height+2*u)),o+=t.height+2*u,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"})}else i.height=Math.max(iW.minEntityHeight,b),h.attr("transform","translate("+i.width/2+","+i.height/2+")");return i},"drawAttributes"),lW=Ae(function(a,o,s){let t=[...o.keys()],l;return t.forEach(function(t){var e=eW(t,"entity"),r=(aW.set(t,e),a.append("g").attr("id",e)),n=(l=void 0===l?e:l,"text-"+e),i=r.append("text").classed("er entityLabel",!0).attr("id",n).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",D().fontFamily).style("font-size",iW.fontSize+"px").text(o.get(t).alias??t),{width:i,height:t}=sW(r,i,o.get(t).attributes),r=r.insert("rect","#"+n).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",i).attr("height",t).node().getBBox();s.setNode(e,{width:r.width,height:r.height,shape:"rect",id:e})}),l},"drawEntities"),cW=Ae(function(e,r){r.nodes().forEach(function(t){void 0!==t&&void 0!==r.node(t)&&e.select("#"+t).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )")})},"adjustEntities"),hW=Ae(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),uW=Ae(function(t,e){return t.forEach(function(t){e.setEdge(aW.get(t.entityA),aW.get(t.entityB),{relationship:t},hW(t))}),t},"addRelationships"),dW=0,pW=Ae(function(t,e,r,n,i){dW++;var r=r.edge(aW.get(e.entityA),aW.get(e.entityB),hW(e)),a=Kb().x(function(t){return t.x}).y(function(t){return t.y}).curve(d4),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",a(r.points)).style("stroke",iW.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let s="";switch(iW.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+_H.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+_H.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+_H.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+_H.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+s+"#"+_H.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+_H.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+_H.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+_H.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+_H.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+s+"#"+_H.ERMarkers.MD_PARENT_START+")")}let l=o.node().getTotalLength(),c=o.node().getPointAtLength(.5*l),h="rel"+dW,u=e.roleA.split(/<br ?\/>/g),d=t.append("text").classed("er relationshipLabel",!0).attr("id",h).attr("x",c.x).attr("y",c.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",D().fontFamily).style("font-size",iW.fontSize+"px");if(1==u.length)d.text(e.roleA);else{let r=.5*-(u.length-1);u.forEach((t,e)=>{d.append("tspan").attr("x",c.x).attr("dy",`${0===e?r:1}em`).text(t)})}n=d.node().getBBox(),t.insert("rect","#"+h).classed("er relationshipLabelBox",!0).attr("x",c.x-n.width/2).attr("y",c.y-n.height/2).attr("width",n.width).attr("height",n.height)},"drawRelationshipFromLayout"),gW=Ae(function(t,e,r,n){iW=D().er,R.info("Drawing ER diagram");let i=D().securityLevel,a,o=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`));_H.insertMarkers(o,iW);let s,l=(s=new rU({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:iW.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),lW(o,n.db.getEntities(),s)),c=uW(n.db.getRelationships(),s);YY(s),cW(o,s),c.forEach(function(t){pW(o,t,s,l,n)});var e=iW.diagramPadding,h=(H8.insertTitle(o,"entityTitleText",iW.titleTopMargin,n.db.getDiagramTitle()),o.node().getBBox()),u=h.width+2*e,d=h.height+2*e;Vl(o,d,u,iW.useMaxWidth),o.attr("viewBox",`${h.x-e} ${h.y-e} ${u} `+d)},"draw"),fW="28e9f9db-3c8d-5aa5-9faf-44286ae5937c",Ae(eW,"generateId"),Ae(rW,"strWithHyphen"),mW={setConf:oW,draw:gW}}),bW=t(()=>{yW=Ae(t=>`
|
|
|
.entityBox {
|
|
|
fill: ${t.mainBkg};
|
|
|
stroke: ${t.nodeBorder};
|
|
|
}
|
|
|
|
|
|
.attributeBoxOdd {
|
|
|
fill: ${t.attributeBackgroundColorOdd};
|
|
|
stroke: ${t.nodeBorder};
|
|
|
}
|
|
|
|
|
|
.attributeBoxEven {
|
|
|
fill: ${t.attributeBackgroundColorEven};
|
|
|
stroke: ${t.nodeBorder};
|
|
|
}
|
|
|
|
|
|
.relationshipLabelBox {
|
|
|
fill: ${t.tertiaryColor};
|
|
|
opacity: 0.7;
|
|
|
background-color: ${t.tertiaryColor};
|
|
|
rect {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.relationshipLine {
|
|
|
stroke: ${t.lineColor};
|
|
|
}
|
|
|
|
|
|
.entityTitleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: 18px;
|
|
|
fill: ${t.textColor};
|
|
|
}
|
|
|
#MD_PARENT_START {
|
|
|
fill: #f5f5f5 !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
#MD_PARENT_END {
|
|
|
fill: #f5f5f5 !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
`,"getStyles"),vW=yW}),wW={};J(wW,{diagram:()=>kW});var kW,TW=t(()=>{AH(),LH(),xW(),bW(),kW={parser:uH,db:kH,renderer:mW,styles:vW}});function EW(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function _W(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function CW(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function SW(t){return"object"==typeof t&&null!==t&&EW(t.container)&&_W(t.reference)&&"string"==typeof t.message}function AW(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function LW(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function NW(t){return AW(t)&&"string"==typeof t.fullText}var IW,MW=t(()=>{Ae(EW,"isAstNode"),Ae(_W,"isReference"),Ae(CW,"isAstNodeDescription"),Ae(SW,"isLinkingError"),IW=class{static{Ae(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return EW(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,n;return t===e||(void 0!==(n=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?n:(n=this.computeIsSubtype(t,e),r[e]=n))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n}},Ae(AW,"isCompositeCstNode"),Ae(LW,"isLeafCstNode"),Ae(NW,"isRootCstNode")});function RW(t){return"string"==typeof t?t:"u"<typeof t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function DW(t){return!!t&&"function"==typeof t[Symbol.iterator]}function OW(...r){if(1===r.length){let e=r[0];if(e instanceof PW)return e;if(DW(e))return new PW(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new PW(()=>({index:0}),t=>t.index<e.length?{done:!1,value:e[t.index++]}:FW)}return 1<r.length?new PW(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}}while(t.collIndex<r.length&&(DW(e=r[t.collIndex++])?t.iterator=e[Symbol.iterator]():e&&"number"==typeof e.length&&(t.array=e)),t.iterator||t.array||t.collIndex<r.length);return FW}):BW}var PW,BW,FW,$W,zW,GW=t(()=>{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function n(t){return t.reduce((t,e)=>Math.max(t,e))}var i;PW=class a{static{Ae(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:Ae(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){let r=t[Symbol.iterator]();return new a(()=>({first:this.startFn(),firstDone:!1}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=r.next()).done)return e}while(!e.done);return FW})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=RW(n.value)),i=!0,!n.done;);return r}indexOf(t,e=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?FW:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return FW})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var n=t.next();return n.done?r:void 0===(t=this.recursiveReduce(t,e,r))?n.value:e(t,n.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,n=e.next();for(;!n.done;){if(t(n.value))return r;n=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(n){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(!DW(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return FW})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1<t?this.flat(t-1):this;return new a(()=>({this:n.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=n.nextFn(t.this);if(!e){if(!DW(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return FW})}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++,t.size>e?FW:this.nextFn(t.state)))}distinct(e){let r=new Set;return this.filter(t=>(t=e?e(t):t,!r.has(t)&&(r.add(t),!0)))}exclude(t,e){let r=new Set;for(var n of t)n=e?e(n):n,r.add(n);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},Ae(RW,"toString"),Ae(DW,"isIterable"),BW=new PW(()=>{},()=>FW),FW=Object.freeze({done:!0,value:void 0}),Ae(OW,"stream"),$W=class extends PW{static{Ae(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 FW})}iterator(){let t={state:this.startFn(),next:Ae(()=>this.nextFn(t.state),"next"),prune:Ae(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=zW=zW||{},Ae(t,"sum"),i.sum=t,Ae(e,"product"),i.product=e,Ae(r,"min"),i.min=r,Ae(n,"max"),i.max=n}),UW={};function qW(t){return new $W(t,t=>AW(t)?t.content:[],{includeRoot:!0})}function YW(t){return qW(t).filter(LW)}function jW(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function HW(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function WW(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function VW(t,e){var r;return t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<t.start.character?lV.Before:t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>e.end.character?lV.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?lV.Inside:r?lV.OverlapBack:lV.OverlapFront)}function XW(t,e){return VW(t,e)>lV.After}function KW(t,e,r=cV){var n;if(t)return 0<e&&(n=e-t.offset,n=t.text.charAt(n),r.test(n)||e--),JW(t,e)}function ZW(e,r){if(e){var t=rV(e,!0);if(t&&QW(t,r))return t;if(NW(e))for(let t=e.content.findIndex(t=>!t.hidden)-1;0<=t;t--){var n=e.content[t];if(QW(n,r))return n}}}function QW(t,e){return LW(t)&&e.includes(t.tokenType.name)}function JW(t,e){return LW(t)?t:AW(t)&&(t=eV(t,e,!1))?JW(t,e):void 0}function tV(t,e){return LW(t)?t:AW(t)&&(t=eV(t,e,!0))?tV(t,e):void 0}function eV(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){var o=Math.floor((n+i)/2),s=t.content[o];if(s.offset<=e&&s.end>e)return s;s.end<=e?(a=r?s:void 0,n=o+1):i=o-1}return a}function rV(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0<e;){e--;var i=t.content[e];if(n||!i.hidden)return i}r=t}}function nV(n,i=!0){for(;n.container;){let t=n.container,e=t.content.indexOf(n),r=t.content.length-1;for(;e<r;){e++;var a=t.content[e];if(i||!a.hidden)return a}n=t}}function iV(t){if(0===t.range.start.character)return t;let e=t.range.start.line,r=t,n;for(;t.container;){var i=t.container,a=n??i.content.indexOf(t);if(0===a?(t=i,n=void 0):(n=a-1,t=i.content[n]),t.range.start.line!==e)break;r=t}return r}function aV(t,e){return(t=oV(t,e))?t.parent.content.slice(t.a+1,t.b):[]}function oV(t,e){let r=sV(t),n=sV(e),i;for(let t=0;t<r.length&&t<n.length;t++){var a=r[t],o=n[t];if(a.parent!==o.parent)break;i={parent:a.parent,a:a.index,b:o.index}}return i}function sV(t){for(var e=[];t.container;){var r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}J(UW,{DefaultNameRegexp:()=>cV,RangeComparison:()=>lV,compareRange:()=>VW,findCommentNode:()=>ZW,findDeclarationNodeAtOffset:()=>KW,findLeafNodeAtOffset:()=>JW,findLeafNodeBeforeOffset:()=>tV,flattenCst:()=>YW,getInteriorNodes:()=>aV,getNextNode:()=>nV,getPreviousNode:()=>rV,getStartlineNode:()=>iV,inRange:()=>XW,isChildNode:()=>jW,isCommentNode:()=>QW,streamCst:()=>qW,toDocumentSegment:()=>WW,tokenToRange:()=>HW});var lV,cV,hV=t(()=>{var t;MW(),GW(),Ae(qW,"streamCst"),Ae(YW,"flattenCst"),Ae(jW,"isChildNode"),Ae(HW,"tokenToRange"),Ae(WW,"toDocumentSegment"),(t=lV=lV||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",Ae(VW,"compareRange"),Ae(XW,"inRange"),cV=/^[\w\p{L}]$/u,Ae(KW,"findDeclarationNodeAtOffset"),Ae(ZW,"findCommentNode"),Ae(QW,"isCommentNode"),Ae(JW,"findLeafNodeAtOffset"),Ae(tV,"findLeafNodeBeforeOffset"),Ae(eV,"binarySearch"),Ae(rV,"getPreviousNode"),Ae(nV,"getNextNode"),Ae(iV,"getStartlineNode"),Ae(aV,"getInteriorNodes"),Ae(oV,"getCommonParent"),Ae(sV,"getParentChain")});function uV(t){throw new Error("Error! The input value was not handled.")}var dV,pV=t(()=>{dV=class extends Error{static{Ae(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},Ae(uV,"assertUnreachable")}),gV={};function fV(t){return nK.isInstance(t,hX)}function mV(t){return nK.isInstance(t,uX)}function yV(t){return nK.isInstance(t,dX)}function vV(t){return xV(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 xV(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function bV(t){return nK.isInstance(t,pX)}function wV(t){return nK.isInstance(t,gX)}function kV(t){return nK.isInstance(t,fX)}function TV(t){return nK.isInstance(t,mX)}function EV(t){return nK.isInstance(t,yX)}function _V(t){return nK.isInstance(t,vX)}function CV(t){return nK.isInstance(t,xX)}function SV(t){return nK.isInstance(t,bX)}function AV(t){return nK.isInstance(t,wX)}function LV(t){return nK.isInstance(t,kX)}function NV(t){return nK.isInstance(t,TX)}function IV(t){return nK.isInstance(t,EX)}function MV(t){return nK.isInstance(t,_X)}function RV(t){return nK.isInstance(t,CX)}function DV(t){return nK.isInstance(t,SX)}function OV(t){return nK.isInstance(t,AX)}function PV(t){return nK.isInstance(t,LX)}function BV(t){return nK.isInstance(t,NX)}function FV(t){return nK.isInstance(t,IX)}function $V(t){return nK.isInstance(t,MX)}function zV(t){return nK.isInstance(t,RX)}function GV(t){return nK.isInstance(t,DX)}function UV(t){return nK.isInstance(t,OX)}function qV(t){return nK.isInstance(t,PX)}function YV(t){return nK.isInstance(t,BX)}function jV(t){return nK.isInstance(t,FX)}function HV(t){return nK.isInstance(t,$X)}function WV(t){return nK.isInstance(t,zX)}function VV(t){return nK.isInstance(t,GX)}function XV(t){return nK.isInstance(t,UX)}function KV(t){return nK.isInstance(t,qX)}function ZV(t){return nK.isInstance(t,YX)}function QV(t){return nK.isInstance(t,jX)}function JV(t){return nK.isInstance(t,HX)}function tX(t){return nK.isInstance(t,WX)}function eX(t){return nK.isInstance(t,VX)}function rX(t){return nK.isInstance(t,XX)}function nX(t){return nK.isInstance(t,KX)}function iX(t){return nK.isInstance(t,ZX)}function aX(t){return nK.isInstance(t,QX)}function oX(t){return nK.isInstance(t,JX)}function sX(t){return nK.isInstance(t,tK)}function lX(t){return nK.isInstance(t,eK)}J(gV,{AbstractElement:()=>fX,AbstractRule:()=>hX,AbstractType:()=>uX,Action:()=>$X,Alternatives:()=>zX,ArrayLiteral:()=>mX,ArrayType:()=>yX,Assignment:()=>GX,BooleanLiteral:()=>vX,CharacterRange:()=>UX,Condition:()=>dX,Conjunction:()=>xX,CrossReference:()=>qX,Disjunction:()=>bX,EndOfFile:()=>YX,Grammar:()=>wX,GrammarImport:()=>kX,Group:()=>jX,InferredType:()=>TX,Interface:()=>EX,Keyword:()=>HX,LangiumGrammarAstReflection:()=>rK,LangiumGrammarTerminals:()=>cX,NamedArgument:()=>_X,NegatedToken:()=>WX,Negation:()=>CX,NumberLiteral:()=>SX,Parameter:()=>AX,ParameterReference:()=>LX,ParserRule:()=>NX,ReferenceType:()=>IX,RegexToken:()=>VX,ReturnType:()=>MX,RuleCall:()=>XX,SimpleType:()=>RX,StringLiteral:()=>DX,TerminalAlternatives:()=>KX,TerminalGroup:()=>ZX,TerminalRule:()=>OX,TerminalRuleCall:()=>QX,Type:()=>PX,TypeAttribute:()=>BX,TypeDefinition:()=>pX,UnionType:()=>FX,UnorderedGroup:()=>JX,UntilToken:()=>tK,ValueLiteral:()=>gX,Wildcard:()=>eK,isAbstractElement:()=>kV,isAbstractRule:()=>fV,isAbstractType:()=>mV,isAction:()=>HV,isAlternatives:()=>WV,isArrayLiteral:()=>TV,isArrayType:()=>EV,isAssignment:()=>VV,isBooleanLiteral:()=>_V,isCharacterRange:()=>XV,isCondition:()=>yV,isConjunction:()=>CV,isCrossReference:()=>KV,isDisjunction:()=>SV,isEndOfFile:()=>ZV,isFeatureName:()=>vV,isGrammar:()=>AV,isGrammarImport:()=>LV,isGroup:()=>QV,isInferredType:()=>NV,isInterface:()=>IV,isKeyword:()=>JV,isNamedArgument:()=>MV,isNegatedToken:()=>tX,isNegation:()=>RV,isNumberLiteral:()=>DV,isParameter:()=>OV,isParameterReference:()=>PV,isParserRule:()=>BV,isPrimitiveType:()=>xV,isReferenceType:()=>FV,isRegexToken:()=>eX,isReturnType:()=>$V,isRuleCall:()=>rX,isSimpleType:()=>zV,isStringLiteral:()=>GV,isTerminalAlternatives:()=>nX,isTerminalGroup:()=>iX,isTerminalRule:()=>UV,isTerminalRuleCall:()=>aX,isType:()=>qV,isTypeAttribute:()=>YV,isTypeDefinition:()=>bV,isUnionType:()=>jV,isUnorderedGroup:()=>oX,isUntilToken:()=>sX,isValueLiteral:()=>wV,isWildcard:()=>lX,reflection:()=>nK});var cX,hX,uX,dX,pX,gX,fX,mX,yX,vX,xX,bX,wX,kX,TX,EX,_X,CX,SX,AX,LX,NX,IX,MX,RX,DX,OX,PX,BX,FX,$X,zX,GX,UX,qX,YX,jX,HX,WX,VX,XX,KX,ZX,QX,JX,tK,eK,rK,nK,iK=t(()=>{MW(),cX={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]*/},hX="AbstractRule",Ae(fV,"isAbstractRule"),uX="AbstractType",Ae(mV,"isAbstractType"),dX="Condition",Ae(yV,"isCondition"),Ae(vV,"isFeatureName"),Ae(xV,"isPrimitiveType"),pX="TypeDefinition",Ae(bV,"isTypeDefinition"),gX="ValueLiteral",Ae(wV,"isValueLiteral"),fX="AbstractElement",Ae(kV,"isAbstractElement"),mX="ArrayLiteral",Ae(TV,"isArrayLiteral"),yX="ArrayType",Ae(EV,"isArrayType"),vX="BooleanLiteral",Ae(_V,"isBooleanLiteral"),xX="Conjunction",Ae(CV,"isConjunction"),bX="Disjunction",Ae(SV,"isDisjunction"),wX="Grammar",Ae(AV,"isGrammar"),kX="GrammarImport",Ae(LV,"isGrammarImport"),TX="InferredType",Ae(NV,"isInferredType"),EX="Interface",Ae(IV,"isInterface"),_X="NamedArgument",Ae(MV,"isNamedArgument"),CX="Negation",Ae(RV,"isNegation"),SX="NumberLiteral",Ae(DV,"isNumberLiteral"),AX="Parameter",Ae(OV,"isParameter"),LX="ParameterReference",Ae(PV,"isParameterReference"),NX="ParserRule",Ae(BV,"isParserRule"),IX="ReferenceType",Ae(FV,"isReferenceType"),MX="ReturnType",Ae($V,"isReturnType"),RX="SimpleType",Ae(zV,"isSimpleType"),DX="StringLiteral",Ae(GV,"isStringLiteral"),OX="TerminalRule",Ae(UV,"isTerminalRule"),PX="Type",Ae(qV,"isType"),BX="TypeAttribute",Ae(YV,"isTypeAttribute"),FX="UnionType",Ae(jV,"isUnionType"),$X="Action",Ae(HV,"isAction"),zX="Alternatives",Ae(WV,"isAlternatives"),GX="Assignment",Ae(VV,"isAssignment"),UX="CharacterRange",Ae(XV,"isCharacterRange"),qX="CrossReference",Ae(KV,"isCrossReference"),YX="EndOfFile",Ae(ZV,"isEndOfFile"),jX="Group",Ae(QV,"isGroup"),HX="Keyword",Ae(JV,"isKeyword"),WX="NegatedToken",Ae(tX,"isNegatedToken"),VX="RegexToken",Ae(eX,"isRegexToken"),XX="RuleCall",Ae(rX,"isRuleCall"),KX="TerminalAlternatives",Ae(nX,"isTerminalAlternatives"),ZX="TerminalGroup",Ae(iX,"isTerminalGroup"),QX="TerminalRuleCall",Ae(aX,"isTerminalRuleCall"),JX="UnorderedGroup",Ae(oX,"isUnorderedGroup"),tK="UntilToken",Ae(sX,"isUntilToken"),eK="Wildcard",Ae(lX,"isWildcard"),rK=class extends IW{static{Ae(this,"LangiumGrammarAstReflection")}getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(t,e){switch(t){case $X:case zX:case GX:case UX:case qX:case YX:case jX:case HX:case WX:case VX:case XX:case KX:case ZX:case QX:case JX:case tK:case eK:return this.isSubtype(fX,e);case mX:case SX:case DX:return this.isSubtype(gX,e);case yX:case IX:case RX:case FX:return this.isSubtype(pX,e);case vX:return this.isSubtype(dX,e)||this.isSubtype(gX,e);case xX:case bX:case CX:case LX:return this.isSubtype(dX,e);case TX:case EX:case PX:return this.isSubtype(uX,e);case NX:return this.isSubtype(hX,e)||this.isSubtype(uX,e);case OX:return this.isSubtype(hX,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 uX;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return hX;case"Grammar:usedGrammars":return wX;case"NamedArgument:parameter":case"ParameterReference:parameter":return AX;case"TerminalRuleCall:rule":return OX;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",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"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",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"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},nK=new rK}),aK={};function oK(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{EW(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):EW(t)&&(t.$container=n,t.$containerProperty=r))}function sK(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function lK(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function cK(t){if(t=hK(t).$document)return t;throw new Error("AST node has no document.")}function hK(t){for(;t.$container;)t=t.$container;return t}function uK(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new PW(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){var e=t.keys[t.keyIndex];if(!e.startsWith("$")){var r=i[e];if(EW(r)){if(t.keyIndex++,gK(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;t.arrayIndex<r.length;){var n=r[t.arrayIndex++];if(EW(n)&&gK(n,a))return{done:!1,value:n}}t.arrayIndex=0}}t.keyIndex++}return FW})}function dK(t,e){if(t)return new $W(t,t=>uK(t,e));throw new Error("Root node must be an AstNode.")}function pK(t,e){if(t)return e?.range&&!gK(t,e.range)?new $W(t,()=>[]):new $W(t,t=>uK(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function gK(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&XW(t,e)}function fK(a){return new PW(()=>({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(_W(r))return t.keyIndex++,{done:!1,value:{reference:r,container:a,property:e}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){var n=t.arrayIndex++,i=r[n];if(_W(i))return{done:!1,value:{reference:i,container:a,property:e,index:n}}}t.arrayIndex=0}}t.keyIndex++}return FW})}function mK(e,t=cK(e).parseResult.value){let r=[];return pK(t).forEach(t=>{fK(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),OW(r)}function yK(t,e){var r,n=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=vK(r.defaultValue))}function vK(t){return Array.isArray(t)?[...t.map(vK)]:t}function xK(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(EW(n))i[r]=xK(n,e);else if(_W(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,o=[];for(a of n)EW(a)?o.push(xK(a,e)):_W(a)?o.push(e(i,r,a.$refNode,a.$refText)):o.push(a);i[r]=o}else i[r]=n;return oK(i),i}J(aK,{assignMandatoryProperties:()=>yK,copyAstNode:()=>xK,findLocalReferences:()=>mK,findRootNode:()=>hK,getContainerOfType:()=>sK,getDocument:()=>cK,hasContainerOfType:()=>lK,linkContentToContainer:()=>oK,streamAllContents:()=>dK,streamAst:()=>pK,streamContents:()=>uK,streamReferences:()=>fK});var bK=t(()=>{MW(),GW(),hV(),Ae(oK,"linkContentToContainer"),Ae(sK,"getContainerOfType"),Ae(lK,"hasContainerOfType"),Ae(cK,"getDocument"),Ae(hK,"findRootNode"),Ae(uK,"streamContents"),Ae(dK,"streamAllContents"),Ae(pK,"streamAst"),Ae(gK,"isAstNodeInRange"),Ae(fK,"streamReferences"),Ae(mK,"findLocalReferences"),Ae(yK,"assignMandatoryProperties"),Ae(vK,"copyDefaultValue"),Ae(xK,"copyAstNode")});function wK(t){return t.charCodeAt(0)}function kK(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function TK(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e],t[e]=!0}function EK(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function _K(){throw Error("Internal Error - Should never get here!")}function CK(t){return"Character"===t.type}var SK,AK,LK,NK,IK,MK,RK,DK,OK=t(()=>{Ae(wK,"cc"),Ae(kK,"insertToSet"),Ae(TK,"addFlag"),Ae(EK,"ASSERT_EXISTS"),Ae(_K,"ASSERT_NEVER_REACH_HERE"),Ae(CK,"isCharacter")}),PK=t(()=>{OK(),SK=[];for(let t=wK("0");t<=wK("9");t++)SK.push(t);AK=[wK("_")].concat(SK);for(let t=wK("a");t<=wK("z");t++)AK.push(t);for(let t=wK("A");t<=wK("Z");t++)AK.push(t);LK=[wK(" "),wK("\f"),wK(`
|
|
|
`),wK("\r"),wK("\t"),wK("\v"),wK("\t"),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK(" "),wK("\u2028"),wK("\u2029"),wK(" "),wK(" "),wK(" "),wK("\ufeff")]}),BK=t(()=>{OK(),PK(),NK=/[0-9a-fA-F]/,IK=/[0-9]/,MK=/[1-9]/,RK=class{static{Ae(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":TK(r,"global");break;case"i":TK(r,"ignoreCase");break;case"m":TK(r,"multiLine");break;case"u":TK(r,"unicode");break;case"y":TK(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}EK(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return _K()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;EK(e)}if((!0!==t||void 0!==e)&&EK(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return EK(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):_K()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[wK(`
|
|
|
`),wK("\r"),wK("\u2028"),wK("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=SK;break;case"D":t=SK,e=!0;break;case"s":t=LK;break;case"S":t=LK,e=!0;break;case"w":t=AK;break;case"W":t=AK,e=!0}return EK(t)?{type:"Set",value:t,complement:e}:_K()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=wK("\f");break;case"n":t=wK(`
|
|
|
`);break;case"r":t=wK("\r");break;case"t":t=wK("\t");break;case"v":t=wK("\v")}return EK(t)?{type:"Character",value:t}:_K()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:wK("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:wK(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
|
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:wK(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,CK(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,CK(n)){if(n.value<r.value)throw Error("Range out of order in character class");t.push({from:r.value,to:n.value})}else kK(r.value,t),t.push(wK("-")),kK(n.value,t)}else kK(r.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
|
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:wK("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),t=!1):this.groupIdx++;var e=this.disjunction(),e=(this.consumeChar(")"),{type:"Group",capturing:t,value:e});return t&&(e.idx=this.groupIdx),e}positiveInteger(){let t=this.popChar();if(!1===MK.test(t))throw Error("Expecting a positive integer");for(;IK.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===IK.test(t))throw Error("Expecting an integer");for(;IK.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){var t=this.popChar();switch(t){case`
|
|
|
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:wK(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return IK.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
|
|
|
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){var t=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
|
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let t=0;t<e;t++){var n=this.popChar();if(!1===NK.test(n))throw Error("Expecting a HexDecimal digits");r+=n}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){var t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),FK=t(()=>{DK=class{static{Ae(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),$K=t(()=>{BK(),FK()}),zK={};function GK(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=XK.pattern(t),n=[];for(e of r.value.value)ZK.reset(t),ZK.visit(e),n.push({start:ZK.startRegexp,end:ZK.endRegex});return n}catch{return[]}}function UK(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),ZK.reset(t),ZK.visit(XK.pattern(t)),ZK.multiline}catch{return!1}}function qK(t){return("string"==typeof t?new RegExp(t):t).test(" ")}function YK(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jK(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:YK(t)).join("")}function HK(t,e){return t=WK(t),!!(e=e.match(t))&&0<e[0].length}function WK(t){let i=t="string"==typeof t?new RegExp(t):t,a=t.source,o=0;function s(){let e="",t;function r(t){e+=a.substr(o,t),o+=t}function n(t){e+="(?:"+a.substr(o,t)+"|$)",o+=t}for(Ae(r,"appendRaw"),Ae(n,"appendOptional");o<a.length;)switch(a[o]){case"\\":switch(a[o+1]){case"c":n(3);break;case"x":n(4);break;case"u":i.unicode?"{"===a[o+2]?n(a.indexOf("}",o)-o+1):n(6):n(2);break;case"p":case"P":i.unicode?n(a.indexOf("}",o)-o+1):n(2);break;case"k":n(a.indexOf(">",o)-o+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=o,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=o,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[o+1])switch(a[o+2]){case":":e+="(?:",o+=3,e+=s()+"|$)";break;case"=":e+="(?=",o+=3,e+=s()+")";break;case"!":t=o,o+=3,s(),e+=a.substr(t,o-t);break;case"<":switch(a[o+3]){case"=":case"!":t=o,o+=4,s(),e+=a.substr(t,o-t);break;default:r(a.indexOf(">",o)-o+1),e+=s()+"|$)"}}else r(1),e+=s()+"|$)";break;case")":return++o,e;default:n(1)}return e}return Ae(s,"process"),new RegExp(s(),t.flags)}J(zK,{NEWLINE_REGEXP:()=>VK,escapeRegExp:()=>YK,getCaseInsensitivePattern:()=>jK,getTerminalParts:()=>GK,isMultilineComment:()=>UK,isWhitespace:()=>qK,partialMatches:()=>HK,partialRegExp:()=>WK});var VK,XK,KK,ZK,QK=t(()=>{$K(),VK=/\r?\n/gm,XK=new RK,KK=class extends DK{static{Ae(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],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=YK(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!`
|
|
|
`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},ZK=new KK,Ae(GK,"getTerminalParts"),Ae(UK,"isMultilineComment"),Ae(qK,"isWhitespace"),Ae(YK,"escapeRegExp"),Ae(jK,"getCaseInsensitivePattern"),Ae(HK,"partialMatches"),Ae(WK,"partialRegExp")}),JK={};function tZ(t){return t.rules.find(t=>BV(t)&&t.entry)}function eZ(t){return t.rules.filter(t=>UV(t)&&t.hidden)}function rZ(t,e){var r,n=new Set,i=tZ(t);if(!i)return new Set(t.rules);for(r of[i].concat(eZ(t)))nZ(r,n,e);var a,o=new Set;for(a of t.rules)(n.has(a.name)||UV(a)&&a.hidden)&&o.add(a);return o}function nZ(t,e,r){e.add(t.name),dK(t).forEach(t=>{(rX(t)||r&&aX(t))&&(t=t.rule.ref)&&!e.has(t.name)&&nZ(t,e,r)})}function iZ(t){return t.terminal||(t.type.ref?pZ(t.type.ref)?.terminal:void 0)}function aZ(t){return t.hidden&&!SZ(t).test(" ")}function oZ(t,e){return t&&e?lZ(t,e,t.astNode,!0):[]}function sZ(t,e,r){return t&&e&&0!==(e=lZ(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function lZ(t,e,r,n){return!n&&(n=sK(t.grammarSource,VV))&&n.feature===e?[t]:AW(t)&&t.astNode===r?t.content.flatMap(t=>lZ(t,e,r,!1)):[]}function cZ(t,e){return t?uZ(t,e,t?.astNode):[]}function hZ(t,e,r){return t&&0!==(e=uZ(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function uZ(t,e,r){if(t.astNode!==r)return[];if(JV(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=qW(t).iterator(),o=[];(i=a.next()).done||((n=i.value).astNode===r?JV(n.grammarSource)&&n.grammarSource.value===e&&o.push(n):a.prune()),!i.done;);return o}function dZ(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=sK(t.grammarSource,VV);if(r)return r;t=t.container}}function pZ(t){let e=t;return NV(e)&&(HV(e.$container)?e=e.$container.$container:BV(e.$container)?e=e.$container:uV(e.$container)),gZ(t,e,new Map)}function gZ(n,t,i){var e,r;function a(t,e){let r;return sK(t,VV)||(r=gZ(e,e,i)),i.set(n,r),r}if(Ae(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of dK(t)){if(VV(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(rX(r)&&BV(r.rule.ref))return a(r,r.rule.ref);if(zV(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function fZ(e){var t=e.$container;if(QV(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(HV(n))return n;if(n=dK(r[t]).find(HV))return n}}if(kV(t))return fZ(t)}function mZ(t,e){return"?"===t||"*"===t||QV(e)&&!!e.guardCondition}function yZ(t){return"*"===t||"+"===t}function vZ(t){return"+="===t}function xZ(t){return bZ(t,new Set)}function bZ(t,e){if(e.has(t))return!0;e.add(t);for(var r of dK(t))if(rX(r)){if(!r.rule.ref||BV(r.rule.ref)&&!bZ(r.rule.ref,e))return!1}else{if(VV(r))return!1;if(HV(r))return!1}return!!t.definition}function wZ(t){return kZ(t.type,new Set)}function kZ(t,e){return!!e.has(t)||(e.add(t),!EV(t)&&!FV(t)&&(jV(t)?t.types.every(t=>kZ(t,e)):!!zV(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!qV(t=t.typeRef.ref)&&kZ(t.type,e))))}function TZ(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(BV(t)||IV(t)||qV(t))?t.name:void 0)}function EZ(t){if(BV(t))return xZ(t)||null==(e=TZ(t))?t.name:e;if(IV(t)||qV(t)||$V(t))return t.name;if(HV(t)){var e=_Z(t);if(e)return e}else if(NV(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function _Z(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?EZ(t.type.ref):void 0}function CZ(t){var e;return UV(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":xZ(t)||null==(e=TZ(t))?t.name:e}function SZ(t){var t=AZ(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function AZ(t,e){if(nX(t))return LZ(t);if(iX(t))return NZ(t);if(XV(t))return RZ(t);if(aX(t)){var r=t.rule.ref;if(r)return OZ(AZ(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(tX(t))return MZ(t);if(sX(t))return IZ(t);var n;if(eX(t))return r=t.regex.lastIndexOf("/"),n=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")),OZ(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(lX(t))return OZ(PZ,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function LZ(t){return OZ(t.elements.map(t=>AZ(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function NZ(t){return OZ(t.elements.map(t=>AZ(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function IZ(t){return OZ(PZ+"*?"+AZ(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function MZ(t){return OZ(`(?!${AZ(t.terminal)})${PZ}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function RZ(t){return t.right?OZ(`[${DZ(t.left)}-${DZ(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):OZ(DZ(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function DZ(t){return YK(t.value)}function OZ(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}J(JK,{findAssignment:()=>dZ,findNameAssignment:()=>pZ,findNodeForKeyword:()=>hZ,findNodeForProperty:()=>sZ,findNodesForKeyword:()=>cZ,findNodesForKeywordInternal:()=>uZ,findNodesForProperty:()=>oZ,getActionAtElement:()=>fZ,getActionType:()=>_Z,getAllReachableRules:()=>rZ,getCrossReferenceTerminal:()=>iZ,getEntryRule:()=>tZ,getExplicitRuleType:()=>TZ,getHiddenRules:()=>eZ,getRuleType:()=>CZ,getTypeName:()=>EZ,isArrayCardinality:()=>yZ,isArrayOperator:()=>vZ,isCommentTerminal:()=>aZ,isDataType:()=>wZ,isDataTypeRule:()=>xZ,isOptionalCardinality:()=>mZ,terminalRegex:()=>SZ});var PZ,BZ=t(()=>{pV(),iK(),MW(),bK(),hV(),QK(),Ae(tZ,"getEntryRule"),Ae(eZ,"getHiddenRules"),Ae(rZ,"getAllReachableRules"),Ae(nZ,"ruleDfs"),Ae(iZ,"getCrossReferenceTerminal"),Ae(aZ,"isCommentTerminal"),Ae(oZ,"findNodesForProperty"),Ae(sZ,"findNodeForProperty"),Ae(lZ,"findNodesForPropertyInternal"),Ae(cZ,"findNodesForKeyword"),Ae(hZ,"findNodeForKeyword"),Ae(uZ,"findNodesForKeywordInternal"),Ae(dZ,"findAssignment"),Ae(pZ,"findNameAssignment"),Ae(gZ,"findNameAssignmentInternal"),Ae(fZ,"getActionAtElement"),Ae(mZ,"isOptionalCardinality"),Ae(yZ,"isArrayCardinality"),Ae(vZ,"isArrayOperator"),Ae(xZ,"isDataTypeRule"),Ae(bZ,"isDataTypeRuleInternal"),Ae(wZ,"isDataType"),Ae(kZ,"isDataTypeInternal"),Ae(TZ,"getExplicitRuleType"),Ae(EZ,"getTypeName"),Ae(_Z,"getActionType"),Ae(CZ,"getRuleType"),Ae(SZ,"terminalRegex"),PZ=/[\s\S]/.source,Ae(AZ,"abstractElementToRegex"),Ae(LZ,"terminalAlternativesToRegex"),Ae(NZ,"terminalGroupToRegex"),Ae(IZ,"untilTokenToRegex"),Ae(MZ,"negateTokenToRegex"),Ae(RZ,"characterRangeToRegex"),Ae(DZ,"keywordToRegex"),Ae(OZ,"withCardinality")});function FZ(t){var e,r=[];for(e of t.Grammar.rules)UV(e)&&aZ(e)&&UK(SZ(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:cV}}var $Z=t(()=>{hV(),BZ(),QK(),iK(),Ae(FZ,"createGrammarConfig")}),zZ=t(()=>{});function GZ(t){console&&console.error&&console.error("Error: "+t)}function UZ(t){console&&console.warn&&console.warn("Warning: "+t)}var qZ=t(()=>{Ae(GZ,"PRINT_ERROR"),Ae(UZ,"PRINT_WARNING")});function YZ(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var jZ=t(()=>{Ae(YZ,"timer")});function HZ(t){function e(){}Ae(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return Ae(n,"fakeAccess"),n(),n(),t}var WZ=t(()=>{Ae(HZ,"toFastProperties")}),VZ=t(()=>{qZ(),jZ(),WZ()});function XZ(t){return KZ(t)?t.LABEL:t.name}function KZ(t){return a$(t.LABEL)&&""!==t.LABEL}function ZZ(t){return x(t,QZ)}function QZ(t){function e(t){return x(t,QZ)}var r,n;if(Ae(e,"convertDefinition"),t instanceof tQ)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},a$(t.label)&&(r.label=t.label),r;if(t instanceof rQ)return{type:"Alternative",definition:e(t.definition)};if(t instanceof nQ)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof iQ)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof aQ)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:QZ(new cQ({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof sQ)return{type:"RepetitionWithSeparator",idx:t.idx,separator:QZ(new cQ({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof oQ)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof lQ)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof cQ)return r={type:"Terminal",name:t.terminalType.name,label:XZ(t.terminalType),idx:t.idx},a$(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=L$(n)?n.source:n),r;if(t instanceof eQ)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var JZ,tQ,eQ,rQ,nQ,iQ,aQ,oQ,sQ,lQ,cQ,hQ,uQ=t(()=>{XG(),Ae(XZ,"tokenLabel"),Ae(KZ,"hasTokenLabel"),JZ=class{static{Ae(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)})}},tQ=class extends JZ{static{Ae(this,"NonTerminal")}constructor(t){super([]),this.idx=1,_M(this,cz(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},eQ=class extends JZ{static{Ae(this,"Rule")}constructor(t){super(t.definition),this.orgText="",_M(this,cz(t,t=>void 0!==t))}},rQ=class extends JZ{static{Ae(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,_M(this,cz(t,t=>void 0!==t))}},nQ=class extends JZ{static{Ae(this,"Option")}constructor(t){super(t.definition),this.idx=1,_M(this,cz(t,t=>void 0!==t))}},iQ=class extends JZ{static{Ae(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,_M(this,cz(t,t=>void 0!==t))}},aQ=class extends JZ{static{Ae(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,_M(this,cz(t,t=>void 0!==t))}},oQ=class extends JZ{static{Ae(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,_M(this,cz(t,t=>void 0!==t))}},sQ=class extends JZ{static{Ae(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,_M(this,cz(t,t=>void 0!==t))}},lQ=class extends JZ{static{Ae(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,_M(this,cz(t,t=>void 0!==t))}},cQ=class{static{Ae(this,"Terminal")}constructor(t){this.idx=1,_M(this,cz(t,t=>void 0!==t))}accept(t){t.visit(this)}},Ae(ZZ,"serializeGrammar"),Ae(QZ,"serializeProduction")}),dQ=t(()=>{uQ(),hQ=class{static{Ae(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case tQ:return this.visitNonTerminal(e);case rQ:return this.visitAlternative(e);case nQ:return this.visitOption(e);case iQ:return this.visitRepetitionMandatory(e);case aQ:return this.visitRepetitionMandatoryWithSeparator(e);case sQ:return this.visitRepetitionWithSeparator(e);case oQ:return this.visitRepetition(e);case lQ:return this.visitAlternation(e);case cQ:return this.visitTerminal(e);case eQ: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 pQ(t){return t instanceof rQ||t instanceof nQ||t instanceof oQ||t instanceof iQ||t instanceof aQ||t instanceof sQ||t instanceof cQ||t instanceof eQ}function gQ(t,e=[]){return t instanceof nQ||t instanceof oQ||t instanceof sQ||(t instanceof lQ?xG(t.definition,t=>gQ(t,e)):!(t instanceof tQ&&f$(e,t))&&t instanceof JZ&&(t instanceof tQ&&e.push(t),lF(t.definition,t=>gQ(t,e))))}function fQ(t){return t instanceof lQ}function mQ(t){if(t instanceof tQ)return"SUBRULE";if(t instanceof nQ)return"OPTION";if(t instanceof lQ)return"OR";if(t instanceof iQ)return"AT_LEAST_ONE";if(t instanceof aQ)return"AT_LEAST_ONE_SEP";if(t instanceof sQ)return"MANY_SEP";if(t instanceof oQ)return"MANY";if(t instanceof cQ)return"CONSUME";throw Error("non exhaustive match")}var yQ=t(()=>{XG(),uQ(),Ae(pQ,"isSequenceProd"),Ae(gQ,"isOptionalProd"),Ae(fQ,"isBranchingProd"),Ae(mQ,"getProductionDslName")}),vQ=t(()=>{uQ(),dQ(),yQ()});function xQ(t,e,r){return[new nQ({definition:[new cQ({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var bQ,wQ=t(()=>{XG(),vQ(),bQ=class{static{Ae(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=YB(r.definition,e+1),t instanceof tQ)this.walkProdRef(t,e,n);else if(t instanceof cQ)this.walkTerminal(t,e,n);else if(t instanceof rQ)this.walkFlat(t,e,n);else if(t instanceof nQ)this.walkOption(t,e,n);else if(t instanceof iQ)this.walkAtLeastOne(t,e,n);else if(t instanceof aQ)this.walkAtLeastOneSep(t,e,n);else if(t instanceof sQ)this.walkManySep(t,e,n);else if(t instanceof oQ)this.walkMany(t,e,n);else{if(!(t instanceof lQ))throw Error("non exhaustive match");this.walkOr(t,e,n)}})}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 nQ({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=xQ(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new nQ({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=xQ(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new rQ({definition:[t]}),this.walk(t,n)})}},Ae(xQ,"restForRepetitionWithSeparator")});function kQ(t){if(t instanceof tQ)return kQ(t.referencedRule);if(t instanceof cQ)return _Q(t);if(pQ(t))return TQ(t);if(fQ(t))return EQ(t);throw Error("non exhaustive match")}function TQ(t){let e=[],r=t.definition,n=0,i=r.length>n,a,o=!0;for(;i&&o;)a=r[n],o=gQ(a),e=e.concat(kQ(a)),n+=1,i=r.length>n;return DG(e)}function EQ(t){return t=x(t.definition,t=>kQ(t)),DG(pR(t))}function _Q(t){return[t.terminalType]}var CQ,SQ=t(()=>{XG(),vQ(),Ae(kQ,"first"),Ae(TQ,"firstForSequence"),Ae(EQ,"firstForBranching"),Ae(_Q,"firstForTerminal")}),AQ=t(()=>{CQ="_~IN~_"});function LQ(t){let e={};return v(t,t=>{t=new IQ(t).startWalking(),_M(e,t)}),e}function NQ(t,e){return t.name+e+CQ}var IQ,MQ=t(()=>{wQ(),SQ(),XG(),AQ(),vQ(),IQ=class extends bQ{static{Ae(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=NQ(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=kQ(new rQ({definition:e})),this.follows[t]=r}},Ae(LQ,"computeAllProdsFollows"),Ae(NQ,"buildBetweenProdsFollowPrefix")});function RQ(t){var e,t=t.toString();return OQ.hasOwnProperty(t)?OQ[t]:(e=PQ.pattern(t),OQ[t]=e)}function DQ(){OQ={}}var OQ,PQ,BQ=t(()=>{$K(),OQ={},PQ=new RK,Ae(RQ,"getRegExpAst"),Ae(DQ,"clearRegExpParserCache")});function FQ(t,e=!1){try{var r=RQ(t);return $Q(r.value,{},r.flags.ignoreCase)}catch(r){r.message===jQ?e&&UZ(`${HQ} 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.`:"",GZ(`${HQ}
|
|
|
Failed parsing: < ${t.toString()} >
|
|
|
Using the @chevrotain/regexp-to-ast library
|
|
|
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function $Q(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t<e.value.length;t++)$Q(e.value[t],i,a);break;case"Alternative":var r=e.value;for(let t=0;t<r.length;t++){var n=r[t];switch(n.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var o=n;switch(o.type){case"Character":zQ(o.value,i,a);break;case"Set":if(!0===o.complement)throw Error(jQ);v(o.value,e=>{if("number"==typeof e)zQ(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)zQ(t,i,a);else{for(let t=r.from;t<=r.to&&t<NJ;t++)zQ(t,i,a);if(r.to>=NJ){var e=r.from>=NJ?r.from:NJ,t=r.to,e=wJ(e),n=wJ(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":$Q(o.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==o.quantifier&&0===o.quantifier.atLeast,"Group"===o.type&&!1===qQ(o)||"Group"!==o.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return u$(i)}function zQ(t,e,r){var n=wJ(t);e[n]=n,!0===r&&GQ(t,e)}function GQ(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=wJ(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=wJ(r.charCodeAt(0))]=t)}function UQ(t,r){return TF(t.value,t=>{if("number"==typeof t)return f$(r,t);{let e=t;return void 0!==TF(r,t=>e.from<=t&&t<=e.to)}})}function qQ(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(Zk(t.value)?lF(t.value,qQ):qQ(t.value))}function YQ(e,t){var r,n;return t instanceof RegExp?(r=RQ(t),(n=new WQ(e)).visit(r),n.found):void 0!==TF(t,t=>f$(e,t.charCodeAt(0)))}var jQ,HQ,WQ,VQ=t(()=>{$K(),XG(),VZ(),BQ(),MJ(),jQ="Complement Sets are not supported for first char optimization",HQ=`Unable to use "first char" lexer optimizations:
|
|
|
`,Ae(FQ,"getOptimizedStartCodesIndices"),Ae($Q,"firstCharOptimizedIndices"),Ae(zQ,"addOptimizedIdxToResult"),Ae(GQ,"handleIgnoreCase"),Ae(UQ,"findCode"),Ae(qQ,"isWholeOptional"),WQ=class extends DK{static{Ae(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){f$(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===UQ(t,this.targetCharCodes)&&(this.found=!0):void 0!==UQ(t,this.targetCharCodes)&&(this.found=!0)}},Ae(YQ,"canMatchCharCode")});function XQ(t,i){var e=(i=SB(i,{useSticky:CJ,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
|
`],tracer:Ae((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{kJ()});let r,n=(e("Reject Lexer.NA",()=>{r=hG(t,t=>t[TJ]===ZJ.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[TJ];if(L$(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||f$(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?uJ:hJ)(t):e[1]:e;if(C5(t))return n=!0,{exec:t};if("object"==typeof t)return n=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(i.useSticky?uJ:hJ)(t));throw Error("non exhaustive match")})});let o,s,l,c,h;e("misc mapping",()=>{o=x(r,t=>t.tokenTypeIdx),s=x(r,t=>{if((t=t.GROUP)!==ZJ.SKIPPED){if(a$(t))return t;if(R$(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return Zk(t)?x(t,t=>x$(r,t)):[x$(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>b(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=xJ(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>b(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===yJ(t,e)&&YQ(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,fJ),p=x(a,mJ),g=sG(r,(t,e)=>(e=e.GROUP,a$(e)&&e!==ZJ.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:s[e],push:c[e],pop:h[e],tokenTypeIdx:o[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=sG(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=wJ(t.PATTERN.charCodeAt(0));bJ(r,e,f[n])}else if(Zk(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=wJ("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,bJ(r,t,f[n]))})}else L$(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&GZ(`${HQ} Unable to analyze < ${t.PATTERN.toString()} > pattern.
|
|
|
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
|
This will disable the lexer's first char optimizations.
|
|
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=FQ(t.PATTERN,i.ensureOptimizations),E$(e)&&(m=!1),v(e,t=>{bJ(r,t,f[n])})):(i.ensureOptimizations&&GZ(`${HQ} TokenType: <${t.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
|
This will disable the lexer's first char optimizations.
|
|
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:n,canBeOptimized:m}}function KQ(t,e){let r=[],n=QQ(t);r=r.concat(n.errors);var i=(t=JQ(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(ZQ(i))).concat(aJ(i))).concat(oJ(i,e))).concat(sJ(i))}function ZQ(t){let e=[],r=gF(t,t=>L$(t[TJ]));return e=(e=(e=(e=(e=e.concat(tJ(r))).concat(rJ(r))).concat(nJ(r))).concat(iJ(r))).concat(eJ(r))}function QQ(t){var e=gF(t,t=>!b(t,TJ));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:XJ.MISSING_PATTERN,tokenTypes:[t]})),valid:BB(t,e)}}function JQ(t){var e=gF(t,t=>(t=t[TJ],!(L$(t)||C5(t)||b(t,"exec")||a$(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:XJ.INVALID_PATTERN,tokenTypes:[t]})),valid:BB(t,e)}}function tJ(t){class n extends DK{static{Ae(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=gF(t,t=>{t=t.PATTERN;try{var e=RQ(t),r=new n;return r.visit(e),r.found}catch{return SJ.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error:
|
|
|
Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
|
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:XJ.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function eJ(t){return t=gF(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:XJ.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function rJ(t){class n extends DK{static{Ae(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=gF(t,t=>{t=t.PATTERN;try{var e=RQ(t),r=new n;return r.visit(e),r.found}catch{return AJ.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error:
|
|
|
Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:XJ.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function nJ(t){return t=gF(t,t=>(t=t[TJ])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:XJ.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function iJ(t){let n=[],e=x(t,r=>sG(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||f$(n,e)||e.PATTERN===ZJ.NA||(n.push(e),t.push(e)),t),[]));e=SO(e);var r=gF(e,t=>1<t.length);return x(r,t=>{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${SF(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:XJ.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function aJ(t){return t=gF(t,t=>!!b(t,"GROUP")&&(t=t.GROUP)!==ZJ.SKIPPED&&t!==ZJ.NA&&!a$(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:XJ.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function oJ(t,e){return t=gF(t,t=>void 0!==t.PUSH_MODE&&!f$(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:XJ.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function sJ(t){let a=[],e=sG(t,(t,e,r)=>{var n=e.PATTERN;return n!==ZJ.NA&&(a$(n)?t.push({str:n,idx:r,tokenType:e}):L$(n)&&cJ(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return v(t,(n,i)=>{v(e,({str:t,idx:e,tokenType:r})=>{i<e&&lJ(t,n.PATTERN)&&(e=`Token: ->${r.name}<- can never be matched.
|
|
|
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
|
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:XJ.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function lJ(t,e){var r;if(L$(e))return null!==(r=e.exec(t))&&0===r.index;if(C5(e))return e(t,0,[],{});if(b(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function cJ(e){return void 0===TF([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function hJ(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function uJ(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function dJ(t,e,r){let i=[];return b(t,EJ)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+EJ+`> property in its definition
|
|
|
`,type:XJ.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),b(t,_J)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+_J+`> property in its definition
|
|
|
`,type:XJ.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),b(t,_J)&&b(t,EJ)&&!b(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${EJ}: <${t.defaultMode}>which does not exist
|
|
|
`,type:XJ.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),b(t,_J)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{R$(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}>
|
|
|
`,type:XJ.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):b(e,"LONGER_ALT")&&(t=Zk(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{R$(t)||f$(r,t)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${n}>
|
|
|
`,type:XJ.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function pJ(t,e,r){let n=[],i=!1,a=SO(pR(u$(t.modes))),o=hG(a,t=>t[TJ]===ZJ.NA),s=xJ(r);return e&&v(o,t=>{var e=yJ(t,s);!1!==e?(e={message:vJ(t,e),type:e.issue,tokenType:t},n.push(e)):b(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):YQ(s,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
|
|
|
This Lexer has been defined to track line and column information,
|
|
|
But none of the Token Types can be identified as matching a line terminator.
|
|
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
|
for details.`,type:XJ.NO_LINE_BREAKS_FLAGS}),n}function gJ(r){let n={},t=kM(r);return v(t,t=>{var e=r[t];if(!Zk(e))throw Error("non exhaustive match");n[t]=[]}),n}function fJ(t){if(t=t.PATTERN,L$(t))return!1;if(C5(t))return!0;if(b(t,"exec"))return!0;if(a$(t))return!1;throw Error("non exhaustive match")}function mJ(t){return!(!a$(t)||1!==t.length)&&t.charCodeAt(0)}function yJ(t,e){if(b(t,"LINE_BREAKS"))return!1;if(L$(t.PATTERN)){try{YQ(e,t.PATTERN)}catch(t){return{issue:XJ.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(a$(t.PATTERN))return!1;if(fJ(t))return{issue:XJ.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function vJ(t,e){if(e.issue===XJ.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
|
The problem is in the <${t.name}> Token Type
|
|
|
Root cause: ${e.errMsg}.
|
|
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===XJ.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
|
The problem is in the <${t.name}> Token Type
|
|
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function xJ(t){return x(t,t=>a$(t)?t.charCodeAt(0):t)}function bJ(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function wJ(t){return t<NJ?t:IJ[t]}function kJ(){if(E$(IJ)){IJ=new Array(65536);for(let t=0;t<65536;t++)IJ[t]=255<t?255+~~(t/255):t}}var TJ,EJ,_J,CJ,SJ,AJ,LJ,NJ,IJ,MJ=t(()=>{$K(),ttt(),XG(),VZ(),VQ(),BQ(),TJ="PATTERN",EJ="defaultMode",_J="modes",CJ="boolean"==typeof new RegExp("(?:)").sticky,Ae(XQ,"analyzeTokenTypes"),Ae(KQ,"validatePatterns"),Ae(ZQ,"validateRegExpPattern"),Ae(QQ,"findMissingPatterns"),Ae(JQ,"findInvalidPatterns"),SJ=/[^\\][$]/,Ae(tJ,"findEndOfInputAnchor"),Ae(eJ,"findEmptyMatchRegExps"),AJ=/[^\\[][\^]|^\^/,Ae(rJ,"findStartOfInputAnchor"),Ae(nJ,"findUnsupportedFlags"),Ae(iJ,"findDuplicatePatterns"),Ae(aJ,"findInvalidGroupType"),Ae(oJ,"findModesThatDoNotExist"),Ae(sJ,"findUnreachablePatterns"),Ae(lJ,"testTokenType"),Ae(cJ,"noMetaChar"),Ae(hJ,"addStartOfInput"),Ae(uJ,"addStickyFlag"),Ae(dJ,"performRuntimeChecks"),Ae(pJ,"performWarningRuntimeChecks"),Ae(gJ,"cloneEmptyGroups"),Ae(fJ,"isCustomPattern"),Ae(mJ,"isShortPattern"),LJ={test:Ae(function(e){var r=e.length;for(let t=this.lastIndex;t<r;t++){var n=e.charCodeAt(t);if(10===n)return this.lastIndex=t+1,!0;if(13===n)return 10===e.charCodeAt(t+1)?this.lastIndex=t+2:this.lastIndex=t+1,!0}return!1},"test"),lastIndex:0},Ae(yJ,"checkLineBreaksIssues"),Ae(vJ,"buildLineBreakIssueMessage"),Ae(xJ,"getCharCodes"),Ae(bJ,"addToMapOfArrays"),NJ=256,IJ=[],Ae(wJ,"charCodeToOptimizedIndex"),Ae(kJ,"initCharCodeToOptimizedIndexMap")});function RJ(t,e){return(t=t.tokenTypeIdx)===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[t]}function DJ(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}function OJ(t){BJ(t=PJ(t)),$J(t),FJ(t),v(t,t=>{t.isParent=0<t.categoryMatches.length})}function PJ(t){let e=wO(t),r=t,n=!0;for(;n;){r=SO(pR(x(r,t=>t.CATEGORIES)));var i=BB(r,e);e=e.concat(i),E$(i)?n=!1:r=i}return e}function BJ(t){v(t,t=>{GJ(t)||((WJ[HJ]=t).tokenTypeIdx=HJ++),UJ(t)&&!Zk(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),UJ(t)||(t.CATEGORIES=[]),qJ(t)||(t.categoryMatches=[]),YJ(t)||(t.categoryMatchesMap={})})}function FJ(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(WJ[e].tokenTypeIdx)})})}function $J(t){v(t,t=>{zJ([],t)})}function zJ(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);f$(e,t)||zJ(e,t)})}function GJ(t){return b(t,"tokenTypeIdx")}function UJ(t){return b(t,"CATEGORIES")}function qJ(t){return b(t,"categoryMatches")}function YJ(t){return b(t,"categoryMatchesMap")}function jJ(t){return b(t,"tokenTypeIdx")}var HJ,WJ,VJ,XJ,KJ,ZJ,QJ=t(()=>{XG(),Ae(RJ,"tokenStructuredMatcher"),Ae(DJ,"tokenStructuredMatcherNoCategories"),HJ=1,WJ={},Ae(OJ,"augmentTokenTypes"),Ae(PJ,"expandCategories"),Ae(BJ,"assignTokenDefaultProps"),Ae(FJ,"assignCategoriesTokensProp"),Ae($J,"assignCategoriesMapProp"),Ae(zJ,"singleAssignCategoriesToksMap"),Ae(GJ,"hasShortKeyProperty"),Ae(UJ,"hasCategoriesProperty"),Ae(qJ,"hasExtendingTokensTypesProperty"),Ae(YJ,"hasExtendingTokensTypesMapProperty"),Ae(jJ,"isTokenType")}),JJ=t(()=>{VJ={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),ttt=t(()=>{var t;MJ(),XG(),VZ(),QJ(),JJ(),BQ(),(t=XJ=XJ||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.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",KJ={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
|
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:VJ,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(KJ),(ZJ=class{static{Ae(this,"Lexer")}constructor(i,a=KJ){if(this.lexerDefinition=i,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${t}>`),YZ(e)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i):e()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
|
a boolean 2nd argument is no longer supported`);this.config=_M({},KJ,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===KJ.lineTerminatorsPattern)this.config.lineTerminatorsPattern=LJ;else if(this.config.lineTerminatorCharacters===KJ.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=Zk(i)?{modes:{defaultMode:wO(i)},defaultMode:EJ}:(t=!1,wO(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(dJ(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(pJ(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=hG(t,t=>R$(t))}),kM(r.modes));var e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(KQ(e,n))}),E$(this.lexerDefinitionErrors)){OJ(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=XQ(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=_M({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!E$(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`-----------------------
|
|
|
`),new Error(`Errors detected in definition of Lexer:
|
|
|
`+e);v(this.lexerDefinitionWarning,t=>{UZ(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(CJ?(this.chopInput=NT,this.match=this.matchWithTest):(this.updateLastIndex=WI,this.match=this.matchWithExec),t&&(this.handleModes=WI),!1===this.trackStartLines&&(this.computeNewColumn=NT),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=WI),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=sG(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!E$(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.
|
|
|
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
|
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{DQ()}),this.TRACE_INIT("toFastProperties",()=>{HZ(this)})})}tokenize(t,e=this.defaultMode){if(E$(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`-----------------------
|
|
|
`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
|
`+t)}tokenizeInternal(i,P){let t,a,e,r,n,o,s,l,c,h,B,u,d,F,p,g=i,$=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=gJ(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],_=[],C=[],U=[];Object.freeze(U);let S;function A(){return E}function L(t){return t=wJ(t),void 0===(t=_[t])?U:t}Ae(A,"getPossiblePatternsSlow"),Ae(L,"getPossiblePatternsOptimized");var q=Ae(t=>{var e;1===C.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(C.pop(),t=GB(C),E=this.patternIdxToConfig[t],_=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=_&&e?L:A)},"pop_mode");function N(t){C.push(t),_=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=_&&t?L:A}Ae(N,"push_mode"),N.call(this,P);let I,Y=this.config.recoveryEnabled;for(;f<$;){o=null;var j=g.charCodeAt(f),H=S(j),W=H.length;for(t=0;t<W;t++){var M=(I=H[t]).pattern,V=(s=null,I.short);if(!1!==V?j===V&&(o=M):!0===I.isCustom?null!==(p=M.exec(g,f,y,w))?(o=p[0],void 0!==p.payload&&(s=p.payload)):o=null:(this.updateLastIndex(M,f),o=this.match(M,i,f)),null!==o){if(void 0!==(n=I.longerAlt)){var X=n.length;for(e=0;e<X;e++){var R=E[n[e]],D=R.pattern;if(!(l=null)===R.isCustom?null!==(p=D.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(D,f),r=this.match(D,i,f)),r&&r.length>o.length){o=r,s=l,I=R;break}}}break}}if(null!==o){if(c=o.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(o,f,B,I.tokenType,x,b,c),this.handlePayload(u,s),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(o))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,n=!1===Y;for(;!1===n&&f<$;)for(i=this.chopInput(i,1),f++,a=0;a<T;a++){var O=E[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(n=!0):n=!0===O.isCustom?null!==K.exec(g,f,y,w):(this.updateLastIndex(K,f),null!==K.exec(i)),!0===n)break}if(d=f-t,b=this.computeNewColumn(b,d),F=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,t,d,e,r),v.push({offset:t,line:e,column:r,length:d,message:F}),!1===Y)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(t,e,r,n){var i;!0===t.pop?(i=t.push,e(n),void 0!==i&&r.call(this,i)):void 0!==t.push&&r.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}updateTokenEndLineColumnLocation(t,e,r,n,i,a,o){void 0!==e&&(r=(e=r===o-1)?-1:0,1===n&&1==e||(t.endLine=i+r,t.endColumn=a-1-r))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,r,n){return{image:t,startOffset:e,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(t,e,r,n,i,a){return{image:t,startOffset:e,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(t,e,r,n,i,a,o){return{image:t,startOffset:e,endOffset:e+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(t,e,r){return t.push(r),e}addTokenUsingMemberAccess(t,e,r){return t[e]=r,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,r){return!0===t.test(e)?e.substring(r,t.lastIndex):null}matchWithExec(t,e){return null!==(t=t.exec(e))?t[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",ZJ.NA=/NOT_APPLICABLE/});function ett(t){return rtt(t)?t.LABEL:t.name}function rtt(t){return a$(t.LABEL)&&""!==t.LABEL}function ntt(t){return itt(t)}function itt(t){var e=t.pattern,r={};if(r.name=t.name,R$(e)||(r.PATTERN=e),b(t,stt))throw`The parent property is no longer supported.
|
|
|
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return b(t,ltt)&&(r.CATEGORIES=t[ltt]),OJ([r]),b(t,ctt)&&(r.LABEL=t[ctt]),b(t,htt)&&(r.GROUP=t[htt]),b(t,dtt)&&(r.POP_MODE=t[dtt]),b(t,utt)&&(r.PUSH_MODE=t[utt]),b(t,ptt)&&(r.LONGER_ALT=t[ptt]),b(t,gtt)&&(r.LINE_BREAKS=t[gtt]),b(t,ftt)&&(r.START_CHARS_HINT=t[ftt]),r}function att(t,e,r,n,i,a,o,s){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function ott(t,e){return RJ(t,e)}var stt,ltt,ctt,htt,utt,dtt,ptt,gtt,ftt,mtt,ytt,vtt,xtt,btt=t(()=>{XG(),ttt(),QJ(),Ae(ett,"tokenLabel"),Ae(rtt,"hasTokenLabel"),stt="parent",ltt="categories",ctt="label",htt="group",utt="push_mode",dtt="pop_mode",ptt="longer_alt",gtt="line_breaks",ftt="start_chars_hint",Ae(ntt,"createToken"),Ae(itt,"createTokenInternal"),OJ([mtt=ntt({name:"EOF",pattern:ZJ.NA})]),Ae(att,"createTokenInstance"),Ae(ott,"tokenMatcher")}),wtt=t(()=>{btt(),XG(),vQ(),ytt={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${rtt(t)?`--> ${ett(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=`
|
|
|
but found: '`+SF(e).image+"'";return r?n+r+e:(r=sG(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>ett(t)).join(", ")}]`),n+`one of these possible Token sequences:
|
|
|
`+x(t,(t,e)=>` ${e+1}. `+t).join(`
|
|
|
`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=`
|
|
|
but found: '`+SF(e).image+"'";return r?n+r+e:n+`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
|
<${x(t,t=>`[${x(t,t=>ett(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(ytt),vtt={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
|
|
|
inside top level rule: ->`+t.name+"<-"}},xtt={buildDuplicateFoundError(t,e){function r(t){return t instanceof cQ?t.terminalType.name:t instanceof tQ?t.nonTerminalName:""}Ae(r,"getExtraProductionArgument");let n=t.name,i=SF(e),a=i.idx,o=mQ(i),s=r(i),l=0<a,c=`->${o}${l?a:""}<- ${s?`with argument: ->${s}<-`:""}
|
|
|
appears more than once (${e.length} times) in the top level rule: ->${n}<-.
|
|
|
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
|
`;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,`
|
|
|
`)},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
|
|
|
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
|
|
|
To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
|
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
|
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>ett(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
|
|
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
|
|
|
<${e}> may appears as a prefix path in all these alternatives.
|
|
|
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
|
For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>ett(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
|
|
|
<${e}> may appears as a prefix path in all these alternatives.
|
|
|
`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
|
For Further details.`},buildEmptyRepetitionError(t){let e=mQ(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
|
|
|
This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
|
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
|
|
|
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
|
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){var e=t.topLevelRule.name;return`Left Recursion found in grammar.
|
|
|
rule: <${e}> can be invoked from itself (directly or indirectly)
|
|
|
without consuming any Tokens. The grammar path that causes this is:
|
|
|
${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")}
|
|
|
To fix this refactor your grammar to remove the left recursion.
|
|
|
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof eQ?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function ktt(t,e){return(t=new Ttt(t,e)).resolveRefs(),t.errors}var Ttt,Ett=t(()=>{qrt(),XG(),vQ(),Ae(ktt,"resolveGrammar"),Ttt=class extends hQ{static{Ae(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(u$(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:zrt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function _tt(e,r,n=[]){n=wO(n);let i=[],a=0;function o(t){return t.concat(YB(e,a+1))}function s(t){return t=_tt(o(t),r,n),i.concat(t)}for(Ae(o,"remainingPathWith"),Ae(s,"getAlternativesForProd");n.length<r&&a<e.length;){var t=e[a];if(t instanceof rQ)return s(t.definition);if(t instanceof tQ)return s(t.definition);if(t instanceof nQ)i=s(t.definition);else{if(t instanceof iQ)return s(t.definition.concat([new oQ({definition:t.definition})]));if(t instanceof aQ)return s([new rQ({definition:t.definition}),new oQ({definition:[new cQ({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof sQ){var l=t.definition.concat([new oQ({definition:[new cQ({terminalType:t.separator})].concat(t.definition)})]);i=s(l)}else if(t instanceof oQ)l=t.definition.concat([new oQ({definition:t.definition})]),i=s(l);else{if(t instanceof lQ)return v(t.definition,t=>{!1===E$(t.definition)&&(i=s(t.definition))}),i;if(!(t instanceof cQ))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:YB(e,a)}),i}function Ctt(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE",s=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!E$(u);)if((v=u.pop())===o)s&&GB(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!E$(d)){var m=d[0];if(m===i)v={idx:p,def:YB(d),ruleStack:WB(g),occurrenceStack:WB(f)},u.push(v);else if(m instanceof cQ)if(p<l-1)r(e[v=p+1],m.terminalType)&&(v={idx:v,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),s=!0}else if(m instanceof tQ){(v=wO(g)).push(m.nonTerminalName);var y=wO(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,YB(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof nQ)y={idx:p,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(o),v={idx:p,def:m.definition.concat(YB(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof iQ)v=new oQ({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof aQ)v=new cQ({terminalType:m.separator}),v=new oQ({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof sQ)v={idx:p,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(o),v=new cQ({terminalType:m.separator}),v=new oQ({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof oQ)v={idx:p,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(o),v=new oQ({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof lQ)for(let t=m.definition.length-1;0<=t;t--){var x={idx:p,def:m.definition[t].definition.concat(YB(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(o)}else if(m instanceof rQ)u.push({idx:p,def:m.definition.concat(YB(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof eQ))throw Error("non exhaustive match");u.push(Stt(m,p,g,f))}}}return h}function Stt(t,e,r,n){return(r=wO(r)).push(t.name),(n=wO(n)).push(1),{idx:e,def:t.definition,ruleStack:r,occurrenceStack:n}}var Att,Ltt,Ntt,Itt,Mtt,Rtt,Dtt=t(()=>{XG(),SQ(),wQ(),vQ(),Ltt=class extends bQ{static{Ae(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=wO(this.path.ruleStack).reverse(),this.occurrenceStack=wO(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(){E$(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Att=class extends Ltt{static{Ae(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 rQ({definition:t}),this.possibleTokTypes=kQ(e),this.found=!0)}},Ltt=class extends bQ{static{Ae(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}},Ntt=class extends Ltt{static{Ae(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=SF(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof cQ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},Itt=class extends Ltt{static{Ae(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=SF(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof cQ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},Mtt=class extends Ltt{static{Ae(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=SF(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof cQ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},Rtt=class extends Ltt{static{Ae(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=SF(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof cQ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},Ae(_tt,"possiblePathsFrom"),Ae(Ctt,"nextPossibleTokensAfter"),Ae(Stt,"expandTopLevelRule")});function Ott(t){if(t instanceof nQ||"Option"===t)return Ktt.OPTION;if(t instanceof oQ||"Repetition"===t)return Ktt.REPETITION;if(t instanceof iQ||"RepetitionMandatory"===t)return Ktt.REPETITION_MANDATORY;if(t instanceof aQ||"RepetitionMandatoryWithSeparator"===t)return Ktt.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof sQ||"RepetitionWithSeparator"===t)return Ktt.REPETITION_WITH_SEPARATOR;if(t instanceof lQ||"Alternation"===t)return Ktt.ALTERNATION;throw Error("non exhaustive match")}function Ptt(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=Ott(r))===Ktt.ALTERNATION?jtt(t,e,n):Htt(t,e,r,n)}function Btt(t,e,r,n,i,a){return a(t=jtt(t,e,r),n,Xtt(t)?DJ:RJ,i)}function Ftt(t,e,r,n,i,a){return e=Xtt(t=Htt(t,e,i,r))?DJ:RJ,a(t[0],e,n)}function $tt(c,t,h,e){let u=c.length,r=lF(c,t=>lF(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 n=c[e],i=n.length,a=r[e];if(void 0===a||!1!==a.call(this))t:for(let t=0;t<i;t++){var o=n[t],s=o.length;for(let t=0;t<s;t++){var l=this.LA(t+1);if(!1===h(l,o[t]))continue t}return e}}};if(!r||e)return function(){for(let e=0;e<u;e++){var r=c[e],n=r.length;t:for(let t=0;t<n;t++){var i=r[t],a=i.length;for(let t=0;t<a;t++){var o=this.LA(t+1);if(!1===h(o,i[t]))continue t}return e}}};{let t=x(c,t=>pR(t)),e=sG(t,(e,t,r)=>(v(t,t=>{b(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{b(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function ztt(i,a,r){let t=lF(i,t=>1===t.length),o=i.length;if(!t||r)return function(){t:for(let t=0;t<o;t++){var e=i[t],r=e.length;for(let t=0;t<r;t++){var n=this.LA(t+1);if(!1===a(n,e[t]))continue t}return!0}return!1};if(1===(r=pR(i)).length&&E$(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=sG(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 Gtt(e){var r=new Array(e);for(let t=0;t<e;t++)r[t]=[];return r}function Utt(e){let r=[""];for(let t=0;t<e.length;t++){var n=e[t],i=[];for(let t=0;t<r.length;t++){var a=r[t];i.push(a+"_"+n.tokenTypeIdx);for(let t=0;t<n.categoryMatches.length;t++){var o="_"+n.categoryMatches[t];i.push(a+o)}}r=i}return r}function qtt(e,r,n){for(let t=0;t<e.length;t++)if(t!==n){var i=e[t];for(let t=0;t<r.length;t++)if(!0===i[r[t]])return!1}return!0}function Ytt(t,n){let e=x(t,t=>_tt([t],1)),i=Gtt(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=Utt(t.partialPath),v(t,t=>{e[t]=!0})}),e}),o=e;for(let r=1;r<=n;r++){var s=o;o=Gtt(s.length);for(let e=0;e<s.length;e++){var l=s[e];for(let t=0;t<l.length;t++){var c=l[t].partialPath,h=l[t].suffixDef,u=Utt(c);if(qtt(a,u,e)||E$(h)||c.length===n){var d=i[e];if(!1===Wtt(d,c)){d.push(c);for(let t=0;t<u.length;t++){var p=u[t];a[e][p]=!0}}}else d=_tt(h,r+1,c),o[e]=o[e].concat(d),v(d,t=>{t=Utt(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function jtt(t,e,r,n){return t=new Qtt(t,Ktt.ALTERNATION,n),e.accept(t),Ytt(t.result,r)}function Htt(t,e,r,n){var i=new Qtt(t,r),i=(e.accept(i),i.result),e=new Ztt(e,t,r).startWalking();return Ytt([new rQ({definition:i}),new rQ({definition:e})],n)}function Wtt(e,r){t:for(let t=0;t<e.length;t++){var n=e[t];if(n.length===r.length){for(let t=0;t<n.length;t++){var i=r[t],a=n[t];if(0==(i===a||void 0!==a.categoryMatchesMap[i.tokenTypeIdx]))continue t}return!0}}return!1}function Vtt(t,r){return t.length<r.length&&lF(t,(t,e)=>t===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function Xtt(t){return lF(t,t=>lF(t,t=>lF(t,t=>E$(t.categoryMatches))))}var Ktt,Ztt,Qtt,Jtt=t(()=>{var t;XG(),Dtt(),wQ(),QJ(),vQ(),(t=Ktt=Ktt||{})[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",Ae(Ott,"getProdType"),Ae(Ptt,"getLookaheadPaths"),Ae(Btt,"buildLookaheadFuncForOr"),Ae(Ftt,"buildLookaheadFuncForOptionalProd"),Ae($tt,"buildAlternativesLookAheadFunc"),Ae(ztt,"buildSingleAlternativeLookaheadFunction"),Ztt=class extends bQ{static{Ae(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,n){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(n),!0)}walkOption(t,e,r){this.checkIsTarget(t,Ktt.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,Ktt.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,Ktt.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,Ktt.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,Ktt.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},Qtt=class extends hQ{static{Ae(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,Ktt.OPTION)}visitRepetition(t){this.checkIsTarget(t,Ktt.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Ktt.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Ktt.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Ktt.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Ktt.ALTERNATION)}},Ae(Gtt,"initializeArrayOfArrays"),Ae(Utt,"pathToHashKeys"),Ae(qtt,"isUniquePrefixHash"),Ae(Ytt,"lookAheadSequenceFromAlternatives"),Ae(jtt,"getLookaheadPathsForOr"),Ae(Htt,"getLookaheadPathsForOptionalProd"),Ae(Wtt,"containsPath"),Ae(Vtt,"isStrictPrefixOfPath"),Ae(Xtt,"areTokenCategoriesNotUsed")});function tet(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:zrt.CUSTOM_LOOKAHEAD_VALIDATION},t))}function eet(e,t,r,n){var i=PF(e,t=>ret(t,r)),t=met(e,t,r),a=PF(e,t=>det(t,r)),o=PF(e,t=>aet(t,e,n,r));return i.concat(t,a,o)}function ret(n,i){var t=new yet,t=(n.accept(t),t.allProductions),t=jF(t,net),t=cz(t,t=>1<t.length);return x(u$(t),t=>{var e=SF(t),t=i.buildDuplicateFoundError(n,t),r=mQ(e),t={message:t,type:zrt.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=iet(e))&&(t.parameter=r),t})}function net(t){return`${mQ(t)}_#_${t.idx}_#_`+iet(t)}function iet(t){return t instanceof cQ?t.terminalType.name:t instanceof tQ?t.nonTerminalName:""}function aet(r,t,e,n){var i=[];return 1<sG(t,(t,e)=>e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:zrt.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function oet(t,e,r){var n=[];return f$(e,t)||n.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:zrt.INVALID_RULE_OVERRIDE,ruleName:t}),n}function set(r,t,n,i=[]){var e,a=[],t=cet(t.definition);return E$(t)?[]:(e=r.name,f$(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:zrt.LEFT_RECURSION,ruleName:e}),e=BB(t,i.concat([r])),t=PF(e,t=>{var e=wO(i);return e.push(t),set(r,t,n,e)}),a.concat(t))}function cet(t){let e=[];if(E$(t))return e;if((r=SF(t))instanceof tQ)e.push(r.referencedRule);else if(r instanceof rQ||r instanceof nQ||r instanceof iQ||r instanceof aQ||r instanceof sQ||r instanceof oQ)e=e.concat(cet(r.definition));else if(r instanceof lQ)e=pR(x(r.definition,t=>cet(t.definition)));else if(!(r instanceof cQ))throw Error("non exhaustive match");var r=gQ(r),n=1<t.length;return r&&n?(r=YB(t),e.concat(cet(r))):e}function het(n,i){var t=new vet,t=(n.accept(t),t.alternations);return PF(t,r=>{var t=WB(r.definition);return PF(t,(t,e)=>(t=Ctt([t],[],RJ,1),E$(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:zrt.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function uet(n,i,a){var t=new vet,t=(n.accept(t),t.alternations),t=hG(t,t=>!0===t.ignoreAmbiguities);return PF(t,t=>{var e=t.idx,r=t.maxLookahead||i,r=get(e=jtt(e,n,r,t),t,n,a),e=fet(e,t,n,a);return r.concat(e)})}function det(e,r){var t=new vet,t=(e.accept(t),t.alternations);return PF(t,t=>255<t.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:e,alternation:t}),type:zrt.TOO_MANY_ALTS,ruleName:e.name,occurrence:t.idx}]:[])}function pet(t,i,a){let o=[];return v(t,n=>{var t=new xet,t=(n.accept(t),t.allProductions);v(t,t=>{var e=Ott(t),r=t.maxLookahead||i,e=Htt(t.idx,n,e,r)[0];E$(pR(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),o.push({message:r,type:zrt.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),o}function get(a,o,r,n){let s=[],t=sG(a,(t,e,i)=>(!0!==o.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&Wtt(t,r)&&!0!==o.definition[e].ignoreAmbiguities&&n.push(e)}),1<n.length&&!Wtt(s,r)&&(s.push(r),t.push({alts:n,path:r}))}),t),[]);return x(t,t=>{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:o,ambiguityIndices:e,prefixPath:t.path}),type:zrt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:o.idx,alternatives:t.alts}})}function fet(t,i,a,o){let s=sG(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return SO(PF(s,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=gF(s,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx<n&&Vtt(t.path,e));return x(r,t=>{var e=[t.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:o.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:e,prefixPath:t.path}),type:zrt.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function met(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;f$(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:zrt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var yet,vet,xet,bet=t(()=>{XG(),qrt(),vQ(),Jtt(),Dtt(),QJ(),Ae(tet,"validateLookahead"),Ae(eet,"validateGrammar"),Ae(ret,"validateDuplicateProductions"),Ae(net,"identifyProductionForDuplicates"),Ae(iet,"getExtraProductionArgument"),yet=class extends hQ{static{Ae(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)}},Ae(aet,"validateRuleDoesNotAlreadyExist"),Ae(oet,"validateRuleIsOverridden"),Ae(set,"validateNoLeftRecursion"),Ae(cet,"getFirstNoneTerminal"),vet=class extends hQ{static{Ae(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},Ae(het,"validateEmptyOrAlternative"),Ae(uet,"validateAmbiguousAlternationAlternatives"),xet=class extends hQ{static{Ae(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)}},Ae(det,"validateTooManyAlts"),Ae(pet,"validateSomeNonEmptyLookaheadPath"),Ae(get,"checkAlternativesAmbiguities"),Ae(fet,"checkPrefixAlternativesAmbiguities"),Ae(met,"checkTerminalAndNoneTerminalsNameSpace")});function wet(t){let e=SB(t,{errMsgProvider:vtt}),r={};return v(t.rules,t=>{r[t.name]=t}),ktt(r,e.errMsgProvider)}function ket(t){return eet((t=SB(t,{errMsgProvider:xtt})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Tet=t(()=>{XG(),Ett(),bet(),wtt(),Ae(wet,"resolveGrammar"),Ae(ket,"validateGrammar")});function Eet(t){return f$(_et,t.name)}var _et,Cet,Aet,Let,Net,Iet,Met=t(()=>{XG(),_et=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(_et),Ae(Eet,"isRecognitionException"),Cet=class extends Error{static{Ae(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)}},Aet=class extends Cet{static{Ae(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},Let=class extends Cet{static{Ae(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},Net=class extends Cet{static{Ae(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},Iet=class extends Cet{static{Ae(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function Ret(t,e,r,n,i,a,o){let s=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[s],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[s]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=mtt,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,o)&&this.tryInRepetitionRecovery(t,e,r,c)}var Det,Oet,Pet,Bet,Fet=t(()=>{btt(),XG(),Met(),AQ(),qrt(),Det={},Oet="InRuleRecoveryException",Pet=class extends Error{static{Ae(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Oet}},Bet=class{static{Ae(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(b(t,"recoveryEnabled")?t:Frt).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Ret)}getTokenToInsert(t){return(t=att(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],s=!1,l=this.LA(1),c=this.LA(1),h=Ae(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new Aet(t,l,this.LA(0))).resyncedTokens=WB(o),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!s;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?s=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,o))}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 Pet("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||E$(e))return!1;let r=this.LA(1);return void 0!==TF(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 f$(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=TF(t,t=>ott(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?Det:(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,n=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?Det:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return pR(t)}getFollowSetFromFollowKey(t){return t===Det?[mtt]:(t=t.ruleName+t.idxInCallingRule+CQ+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,mtt)||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 WB(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,o){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:wO(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},Ae(Ret,"attemptInRepetitionRecovery")});function $et(t,e,r){return r|e|t}var zet,Get=t(()=>{Ae($et,"getKeyForAutomaticLookahead")}),Uet=t(()=>{XG(),wtt(),qrt(),bet(),Jtt(),zet=class{static{Ae(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:Frt.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return E$(n)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...n,...e,...r,...t]):n}validateNoLeftRecursion(t){return PF(t,t=>set(t,t,xtt))}validateEmptyOrAlternatives(t){return PF(t,t=>het(t,xtt))}validateAmbiguousAlternationAlternatives(t,e){return PF(t,t=>uet(t,e,xtt))}validateSomeNonEmptyLookaheadPath(t,e){return pet(t,e,xtt)}buildLookaheadForAlternation(t){return Btt(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,$tt)}buildLookaheadForOptional(t){return Ftt(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Ott(t.prodType),ztt)}}});function qet(t){return Het.reset(),t.accept(Het),t=Het.dslMethods,Het.reset(),t}var Yet,jet,Het,Wet=t(()=>{XG(),qrt(),Get(),vQ(),Uet(),Yet=class{static{Ae(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(b(t,"dynamicTokensEnabled")?t:Frt).dynamicTokensEnabled,this.maxLookahead=(b(t,"maxLookahead")?t:Frt).maxLookahead,this.lookaheadStrategy=b(t,"lookaheadStrategy")?t.lookaheadStrategy:new zet({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,o=>{this.TRACE_INIT(o.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=qet(o);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+mQ(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:o,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=$et(this.fullRuleNameToShort[o.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(o,t.idx,768,"Repetition",t.maxLookahead,mQ(t))}),v(r,t=>{this.computeLookaheadFunc(o,t.idx,512,"Option",t.maxLookahead,mQ(t))}),v(n,t=>{this.computeLookaheadFunc(o,t.idx,1024,"RepetitionMandatory",t.maxLookahead,mQ(t))}),v(i,t=>{this.computeLookaheadFunc(o,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,mQ(t))}),v(a,t=>{this.computeLookaheadFunc(o,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,mQ(t))})})})}computeLookaheadFunc(r,n,i,a,o,t){this.TRACE_INIT(""+t+(0===n?"":n),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=$et(this.fullRuleNameToShort[r.name],i,n);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)}},jet=class extends hQ{static{Ae(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)}},Het=new jet,Ae(qet,"collectMethods")});function Vet(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Xet(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 Ket(t,e,r){void 0===t.children[r]?t.children[r]=[e]:t.children[r].push(e)}function Zet(t,e,r){void 0===t.children[e]?t.children[e]=[r]:t.children[e].push(r)}var Qet=t(()=>{Ae(Vet,"setNodeLocationOnlyOffset"),Ae(Xet,"setNodeLocationFull"),Ae(Ket,"addTerminalToCst"),Ae(Zet,"addNoneTerminalToCst")});function Jet(t,e){Object.defineProperty(t,trt,{enumerable:!1,configurable:!0,writable:!1,value:e})}var trt,ert=t(()=>{trt="name",Ae(Jet,"defineNameProp")});function rrt(e,r){var n=kM(e),i=n.length;for(let t=0;t<i;t++){var a=e[n[t]],o=a.length;for(let t=0;t<o;t++){var s=a[t];void 0===s.tokenTypeIdx&&this[s.name](s.children,r)}}}function nrt(t,e){var r=Ae(function(){},"derivedConstructor"),t=(Jet(r,t+"BaseSemantics"),{visit:Ae(function(t,e){if(Zk(t)&&(t=t[0]),!R$(t))return this[t.name](t.children,e)},"visit"),validateVisitor:Ae(function(){var t=art(this,e);if(!E$(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 irt(t,e,r){var n=Ae(function(){},"derivedConstructor");Jet(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=rrt}),n.prototype=i,n.prototype.constructor=n}function art(t,e){return ort(t,e)}function ort(e,t){return t=gF(t,t=>!1===C5(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:srt.MISSING_METHOD,methodName:t})),SO(t)}var srt,lrt,crt,hrt,urt,drt,prt,grt=t(()=>{var t;XG(),ert(),Ae(rrt,"defaultVisit"),Ae(nrt,"createBaseSemanticVisitorConstructor"),Ae(irt,"createBaseVisitorConstructorWithDefaults"),(t=srt=srt||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",Ae(art,"validateVisitor"),Ae(ort,"validateMissingCstMethods")}),frt=t(()=>{Qet(),XG(),grt(),qrt(),lrt=class{static{Ae(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(b(t,"nodeLocationTracking")?t:Frt).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Xet,this.setNodeLocationFromNode=Xet,this.cstPostRule=WI,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=WI,this.setNodeLocationFromNode=WI,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vet,this.setNodeLocationFromNode=Vet,this.cstPostRule=WI,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=WI,this.setNodeLocationFromNode=WI,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=WI,this.setNodeLocationFromNode=WI,this.cstPostRule=WI,this.setInitialNodeLocation=WI}else this.cstInvocationStateUpdate=WI,this.cstFinallyStateUpdate=WI,this.cstPostTerminal=WI,this.cstPostNonTerminal=WI,this.cstPostRule=WI}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Ket(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Zet(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return R$(this.baseCstVisitorConstructor)?(t=nrt(this.className,kM(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return R$(this.baseCstVisitorWithDefaultsConstructor)?(t=irt(this.className,kM(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[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]}}}),mrt=t(()=>{qrt(),crt=class{static{Ae(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)):Brt}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?Brt: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()}}}),yrt=t(()=>{XG(),Met(),qrt(),wtt(),bet(),vQ(),hrt=class{static{Ae(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=$rt){f$(this.definedRulesNames,t)&&(n={message:xtt.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:zrt.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(n)),this.definedRulesNames.push(t);var n=this.defineRule(t,e,r);return this[t]=n}OVERRIDE_RULE(t,e,r=$rt){var n=oet(t,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(t,e,r));return this[t]=n}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(Eet(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return ZZ(u$(this.gastProductionsCache))}}}),vrt=t(()=>{XG(),Get(),Met(),Jtt(),Dtt(),qrt(),Fet(),btt(),QJ(),urt=class{static{Ae(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=DJ,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},b(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(Zk(t)){if(E$(t))throw Error(`A Token Vocabulary cannot be empty.
|
|
|
Note that the first argument for the parser constructor
|
|
|
is no longer a Token vector (since v4.0).`);if("number"==typeof t[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
|
For Further details.`)}if(Zk(t))this.tokensMap=sG(t,(t,e)=>(t[e.name]=e,t),{});else if(b(t,"modes")&&lF(pR(u$(t.modes)),jJ))e=pR(u$(t.modes)),e=DG(e),this.tokensMap=sG(e,(t,e)=>(t[e.name]=e,t),{});else{if(!T5(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=wO(t)}this.tokensMap.EOF=mtt,e=b(t,"modes")?pR(u$(t.modes)):u$(t),t=lF(e,t=>E$(t.categoryMatches)),this.tokenMatcher=t?DJ:RJ,OJ(u$(this.tokensMap))}defineRule(r,n,t){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
|
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=(b(t,"resyncEnabled")?t:$rt).resyncEnabled,a=(b(t,"recoveryValueFunc")?t:$rt).recoveryValueFunc,o=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=r,this.fullRuleNameToShort[r]=o,t=!0===this.outputCst?Ae(function(...t){try{this.ruleInvocationStateUpdate(o,r,this.subruleIdx),n.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):Ae(function(...t){try{return this.ruleInvocationStateUpdate(o,r,this.subruleIdx),n.apply(this,t)}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(t,e,r){var n=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Eet(t)){var i=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return i.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=e)}else if(n)return this.moveToTerminatedState(),r(t);throw i}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof t){i=t.DEF;let e=t.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=t;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(t,Ktt.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,Mtt)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,Ktt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(n.call(this),r=Ae(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,r,n,Rtt],r,1536,t,Rtt)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,Ntt,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),e=Ae(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,Itt],e,1280,t,Itt)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,1536,t,i)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),n=Zk(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[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 Net(e,t)))}subruleInternal(t,e,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw Eet(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 n;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),n=i):this.consumeInternalError(t,i,r)}catch(r){n=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Aet(r,e,n))}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===Oet?r:t}}saveRecogState(){var t=this.errors,e=wO(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),mtt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),xrt=t(()=>{Met(),XG(),Jtt(),qrt(),drt=class{static{Ae(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(b(t,"errorMessageProvider")?t:Frt).errorMessageProvider}SAVE_ERROR(t){if(Eet(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:wO(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return wO(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=Htt(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Iet(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=jtt(t,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:n,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Let(t,this.LA(1),r))}}}),brt=t(()=>{Dtt(),XG(),prt=class{static{Ae(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(R$(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return Ctt([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=SF(t.ruleStack),e=this.getGAstProductions()[e];return new Att(e,t).startWalking()}}});function wrt(t,e,r,n=!1){Ert(r);var i=GB(this.recordingProdStack),a=C5(e)?e:e.DEF,t=new t({definition:[],idx:r});return n&&(t.separator=e.SEP),b(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),i.definition.push(t),this.recordingProdStack.pop(),_rt}function krt(t,e){Ert(e);let r=GB(this.recordingProdStack),n=!1===Zk(t),i=0==n?t:t.DEF,a=new lQ({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return b(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=xG(i,t=>C5(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new rQ({definition:[]});a.definition.push(e),b(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:b(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),_rt}function Trt(t){return 0===t?"":""+t}function Ert(t){if(t<0||Crt<t)throw(t=new Error(`Invalid DSL Method idx value: <${t}>
|
|
|
Idx value must be a none negative value smaller than `+(Crt+1))).KNOWN_RECORDER_ERROR=!0,t}var _rt,Crt,Srt,Art,Lrt,Nrt,Irt,Mrt=t(()=>{XG(),vQ(),ttt(),QJ(),btt(),qrt(),Get(),_rt={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(_rt),Crt=Math.pow(2,8)-1,OJ([Srt=ntt({name:"RECORDING_PHASE_TOKEN",pattern:ZJ.NA})]),Art=att(Srt,`This IToken indicates the Parser is in Recording Phase
|
|
|
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze(Art),Lrt={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
|
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Nrt=class{static{Ae(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0<r?r:"";this["CONSUME"+t]=function(t,e){return this.consumeInternalRecord(t,r,e)},this["SUBRULE"+t]=function(t,e){return this.subruleInternalRecord(t,r,e)},this["OPTION"+t]=function(t){return this.optionInternalRecord(t,r)},this["OR"+t]=function(t){return this.orInternalRecord(t,r)},this["MANY"+t]=function(t){this.manyInternalRecord(r,t)},this["MANY_SEP"+t]=function(t){this.manySepFirstInternalRecord(r,t)},this["AT_LEAST_ONE"+t]=function(t){this.atLeastOneInternalRecord(r,t)},this["AT_LEAST_ONE_SEP"+t]=function(t){this.atLeastOneSepFirstInternalRecord(r,t)}}this.consume=function(t,e,r){return this.consumeInternalRecord(e,t,r)},this.subrule=function(t,e,r){return this.subruleInternalRecord(e,t,r)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{var e=this;for(let t=0;t<10;t++){var r=0<t?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return Brt}topLevelRuleRecord(t,e){try{var r=new eQ({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+`
|
|
|
This error was thrown during the "grammar recording phase" For more info see:
|
|
|
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return wrt.call(this,nQ,t,e)}atLeastOneInternalRecord(t,e){wrt.call(this,iQ,e,t)}atLeastOneSepFirstInternalRecord(t,e){wrt.call(this,aQ,e,t,!0)}manyInternalRecord(t,e){wrt.call(this,oQ,e,t)}manySepFirstInternalRecord(t,e){wrt.call(this,sQ,e,t,!0)}orInternalRecord(t,e){return krt.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(Ert(e),t&&!1!==b(t,"ruleName"))return n=GB(this.recordingProdStack),i=t.ruleName,i=new tQ({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?Lrt:_rt;throw(r=new Error(`<SUBRULE${Trt(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
|
|
|
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var n;if(Ert(e),GJ(t))return n=GB(this.recordingProdStack),r=new cQ({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),Art;throw(n=new Error(`<CONSUME${Trt(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
|
|
|
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},Ae(wrt,"recordProd"),Ae(krt,"recordOrProd"),Ae(Trt,"getIdxSuffix"),Ae(Ert,"assertMethodIdxIsValid")}),Rrt=t(()=>{XG(),VZ(),qrt(),Irt=class{static{Ae(this,"PerformanceTracer")}initPerformanceTracer(t){var e;b(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0<t:t):(this.traceInitMaxIdent=0,this.traceInitPerf=Frt.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(t,e){var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${t}>`),YZ(e)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i):e()}}});function Drt(i,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(n,t))&&(e.get||e.set)?Object.defineProperty(i.prototype,t,e):i.prototype[t]=r.prototype[t])})})}var Ort=t(()=>{Ae(Drt,"applyMixins")});function Prt(t=void 0){return function(){return t}}var Brt,Frt,$rt,zrt,Grt,Urt,qrt=t(()=>{var t;XG(),VZ(),MQ(),btt(),wtt(),Tet(),Fet(),Wet(),frt(),mrt(),yrt(),vrt(),xrt(),brt(),Mrt(),Rrt(),Ort(),bet(),Brt=att(mtt,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Brt),Frt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ytt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),$rt=Object.freeze({recoveryValueFunc:Ae(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=zrt=zrt||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",Ae(Prt,"EMPTY_ALT"),(Grt=class e{static{Ae(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var t;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{HZ(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=wet({rules:u$(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;E$(n)&&!1===this.skipValidations&&(t=ket({rules:u$(this.gastProductionsCache),tokenTypes:u$(this.tokensMap),errMsgProvider:xtt,grammarName:r}),e=tet({lookaheadStrategy:this.lookaheadStrategy,rules:u$(this.gastProductionsCache),tokenTypes:u$(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),E$(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=LQ(u$(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:u$(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(u$(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!E$(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.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),b(e,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
|
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
|
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
|
For further details.`);this.skipValidations=(b(e,"skipValidations")?e:Frt).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Drt(Grt,[Bet,Yet,lrt,crt,urt,hrt,drt,prt,Nrt,Irt]),Urt=class extends Grt{static{Ae(this,"EmbeddedActionsParser")}constructor(t,e=Frt){(e=wO(e)).outputCst=!1,super(t,e)}}}),Yrt=t(()=>{vQ()}),jrt=t(()=>{}),Hrt=t(()=>{Yrt(),jrt()}),Wrt=t(()=>{zZ()}),Vrt=t(()=>{zZ(),qrt(),ttt(),btt(),Jtt(),Uet(),wtt(),Met(),JJ(),vQ(),vQ(),Hrt(),Wrt()});function Xrt(t,e,r){return t.name+`_${e}_`+r}function Krt(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(Zrt(r,e),e.length);for(let t=0;t<n;t++){var i=e[t],a=ont(r,i,i);void 0!==a&&mnt(r,i,a)}return r}function Zrt(e,r){var n=r.length;for(let t=0;t<n;t++){var i=r[t],a=vnt(e,i,void 0,{type:knt}),o=vnt(e,i,void 0,{type:_nt});a.stop=o,e.ruleToStartState.set(i,a),e.ruleToStopState.set(i,o)}}function Qrt(t,e,r){return r instanceof cQ?gnt(t,e,r.terminalType,r):(r instanceof tQ?fnt:r instanceof lQ?nnt:r instanceof nQ?ant:r instanceof oQ?Jrt:r instanceof sQ?tnt:r instanceof iQ?ent:r instanceof aQ?rnt:ont)(t,e,r)}function Jrt(t,e,r){var n=vnt(t,e,r,{type:Ent});return hnt(t,n),lnt(t,e,r,unt(t,e,n,r,ont(t,e,r)))}function tnt(t,e,r){var n=vnt(t,e,r,{type:Ent});return hnt(t,n),lnt(t,e,r,unt(t,e,n,r,ont(t,e,r)),gnt(t,e,r.separator,r))}function ent(t,e,r){var n=vnt(t,e,r,{type:Tnt});return hnt(t,n),snt(t,e,r,unt(t,e,n,r,ont(t,e,r)))}function rnt(t,e,r){var n=vnt(t,e,r,{type:Tnt});return hnt(t,n),snt(t,e,r,unt(t,e,n,r,ont(t,e,r)),gnt(t,e,r.separator,r))}function nnt(e,r,t){var n=vnt(e,r,t,{type:wnt}),i=(hnt(e,n),x(t.definition,t=>Qrt(e,r,t)));return unt(e,r,n,t,...i)}function ant(t,e,r){var n=vnt(t,e,r,{type:wnt});return hnt(t,n),cnt(t,e,r,unt(t,e,n,r,ont(t,e,r)))}function ont(e,r,t){return 1===(t=gF(x(t.definition,t=>Qrt(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:pnt(e,t)}function snt(t,e,r,n,i){var a=n.left,n=n.right,o=vnt(t,e,r,{type:Lnt}),s=(hnt(t,o),vnt(t,e,r,{type:Nnt}));return a.loopback=o,s.loopback=o,ynt(n,t.decisionMap[Xrt(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o),void 0===i?(ynt(o,a),ynt(o,s)):(ynt(o,s),ynt(o,i.left),ynt(i.right,a)),{left:a,right:s}}function lnt(t,e,r,n,i){var a=n.left,n=n.right,o=vnt(t,e,r,{type:Ant}),s=(hnt(t,o),vnt(t,e,r,{type:Nnt})),l=vnt(t,e,r,{type:Snt});return o.loopback=l,s.loopback=l,ynt(o,a),ynt(o,s),ynt(n,l),void 0!==i?(ynt(l,s),ynt(l,i.left),ynt(i.right,a)):ynt(l,o),{left:t.decisionMap[Xrt(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,right:s}}function cnt(t,e,r,n){var i=n.left;return ynt(i,n.right),t.decisionMap[Xrt(e,"Option",r.idx)]=i,n}function hnt(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function unt(t,e,r,n,...i){var a,o=vnt(t,e,n,{type:Cnt,start:r});r.end=o;for(a of i)void 0!==a?(ynt(r,a.left),ynt(a.right,o)):ynt(r,o);return i={left:r,right:o},t.decisionMap[Xrt(e,dnt(n),n.idx)]=r,i}function dnt(t){if(t instanceof lQ)return"Alternation";if(t instanceof nQ)return"Option";if(t instanceof oQ)return"Repetition";if(t instanceof sQ)return"RepetitionWithSeparator";if(t instanceof iQ)return"RepetitionMandatory";if(t instanceof aQ)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function pnt(e,r){var n=r.length;for(let t=0;t<n-1;t++){var i,a=r[t],o=(i=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof Dnt,s=i,l=r[t+1].left;a.left.type===wnt&&a.right.type===wnt&&void 0!==i&&(o&&s.followState===a.right||i.target===a.right)?(o?s.followState=l:i.target=l,bnt(e,a.right)):ynt(a.right,l)}var t=r[0],c=r[n-1];return{left:t.left,right:c.right}}function gnt(t,e,r,n){var i=vnt(t,e,n,{type:wnt}),t=vnt(t,e,n,{type:wnt});return xnt(i,new Mnt(t,r)),{left:i,right:t}}function fnt(t,e,r){var n=r.referencedRule,i=t.ruleToStartState.get(n),a=vnt(t,e,r,{type:wnt}),t=vnt(t,e,r,{type:wnt});return xnt(a,new Dnt(i,n,t)),{left:a,right:t}}function mnt(t,e,r){var n=t.ruleToStartState.get(e),t=(ynt(n,r.left),t.ruleToStopState.get(e));return ynt(r.right,t),{left:n,right:t}}function ynt(t,e){xnt(t,new Rnt(e))}function vnt(t,e,r,n){return r=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n),t.states.push(r),r}function xnt(t,e){0===t.transitions.length&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function bnt(t,e){t.states.splice(t.states.indexOf(e),1)}var wnt,knt,Tnt,Ent,_nt,Cnt,Snt,Ant,Lnt,Nnt,Int,Mnt,Rnt,Dnt,Ont=t(()=>{DF(),fF(),Vrt(),Ae(Xrt,"buildATNKey"),wnt=1,knt=2,Tnt=4,Ent=5,_nt=7,Cnt=8,Snt=9,Ant=10,Lnt=11,Nnt=12,Int=class{static{Ae(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Mnt=class extends Int{static{Ae(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},Rnt=class extends Int{static{Ae(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Dnt=class extends Int{static{Ae(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},Ae(Krt,"createATN"),Ae(Zrt,"createRuleStartAndStopATNStates"),Ae(Qrt,"atom"),Ae(Jrt,"repetition"),Ae(tnt,"repetitionSep"),Ae(ent,"repetitionMandatory"),Ae(rnt,"repetitionMandatorySep"),Ae(nnt,"alternation"),Ae(ant,"option"),Ae(ont,"block"),Ae(snt,"plus"),Ae(lnt,"star"),Ae(cnt,"optional"),Ae(hnt,"defineDecisionState"),Ae(unt,"makeAlts"),Ae(dnt,"getProdType"),Ae(pnt,"makeBlock"),Ae(gnt,"tokenRef"),Ae(fnt,"ruleRef"),Ae(mnt,"buildRuleHandle"),Ae(ynt,"epsilon"),Ae(vnt,"newState"),Ae(xnt,"addTransition"),Ae(bnt,"removeState")});function Pnt(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Bnt,Fnt,$nt=t(()=>{DF(),Bnt={},Fnt=class{static{Ae(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Pnt(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}},Ae(Pnt,"getATNConfigKey")});function znt(n,i){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[e]=r),r}}function Gnt(t,e=!0){var r,n=new Set;for(r of t){var i,a,o=new Set;for(i of r){if(void 0===i){if(e)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!o.has(a))return!1}else n.add(a),o.add(a)}}return!0}function Unt(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;t<r;t++)n[t]=znt(e.decisionStates[t],t);return n}function qnt(t,e,r,n){let i=t[e](r),a=i.start;return void 0===a&&(t=nit(i.atnStartState),a=rit(i,tit(t)),i.start=a),Ynt.apply(this,[i,a,r,n])}function Ynt(t,e,r,n){let i=e,a=1,o=[],s=this.LA(a++);for(;;){var l=Knt(i,s);if((l=void 0===l?jnt.apply(this,[t,i,s,a,r,n]):l)===Bnt)return Xnt(o,i,s);if(!0===l.isAcceptState)return l.prediction;i=l,o.push(s),s=this.LA(a++)}}function jnt(t,e,r,n,i,a){var o=Znt(e.configs,r,i);if(0===o.size)return eit(t,e,r,Bnt),Bnt;let s=tit(o),l=Jnt(o,i);return void 0!==l?(s.isAcceptState=!0,s.prediction=l,s.configs.uniqueAlt=l):lit(o)&&(i=V$(o.alts),s.isAcceptState=!0,s.prediction=i,s.configs.uniqueAlt=i,Hnt.apply(this,[t,n,o.alts,a])),s=eit(t,e,r,s)}function Hnt(t,e,r,n){var i=[];for(let t=1;t<=e;t++)i.push(this.LA(t).tokenType);n(Wnt({topLevelRule:(t=t.atnStartState).rule,ambiguityIndices:r,production:t.production,prefixPath:i}))}function Wnt(t){var e=x(t.prefixPath,t=>ett(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Vnt(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 Vnt(t){if(t instanceof tQ)return"SUBRULE";if(t instanceof nQ)return"OPTION";if(t instanceof lQ)return"OR";if(t instanceof iQ)return"AT_LEAST_ONE";if(t instanceof aQ)return"AT_LEAST_ONE_SEP";if(t instanceof sQ)return"MANY_SEP";if(t instanceof oQ)return"MANY";if(t instanceof cQ)return"CONSUME";throw Error("non exhaustive match")}function Xnt(t,e,r){return e=PF(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:BG(e.filter(t=>t instanceof Mnt).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Knt(t,e){return t.edges[e.tokenTypeIdx]}function Znt(t,e,r){var n,i=new Fnt,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===_nt)a.push(n);else{var o=n.state.transitions.length;for(let t=0;t<o;t++){var s=Qnt(n.state.transitions[t],e);void 0!==s&&i.add({state:s,alt:n.alt,stack:n.stack})}}let l;if(void 0===(l=0===a.length&&1===i.size?i:l)){l=new Fnt;for(var c of i.elements)iit(c,l)}if(0<a.length&&!oit(l))for(var h of a)l.add(h);return l}function Qnt(t,e){if(t instanceof Mnt&&ott(e,t.tokenType))return t.target}function Jnt(t,e){let r;for(var n of t.elements)if(!0===e.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function tit(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function eit(t,e,r,n){return n=rit(t,n),e.edges[r.tokenTypeIdx]=n}function rit(t,e){var r,n;return e===Bnt?e:(r=e.configs.key,void 0!==(n=t.states[r])?n:(e.configs.finalize(),t.states[r]=e))}function nit(e){var r=new Fnt,n=e.transitions.length;for(let t=0;t<n;t++)iit({state:e.transitions[t].target,alt:t,stack:[]},r);return r}function iit(e,r){var t,n=e.state;if(n.type===_nt)0<e.stack.length?iit({state:(t=[...e.stack]).pop(),alt:e.alt,stack:t},r):r.add(e);else{n.epsilonOnlyTransitions||r.add(e);var i=n.transitions.length;for(let t=0;t<i;t++){var a=ait(e,n.transitions[t]);void 0!==a&&iit(a,r)}}}function ait(t,e){var r;return e instanceof Rnt?{state:e.target,alt:t.alt,stack:t.stack}:e instanceof Dnt?(r=[...t.stack,e.followState],{state:e.target,alt:t.alt,stack:r}):void 0}function oit(t){for(var e of t.elements)if(e.state.type===_nt)return!0;return!1}function sit(t){for(var e of t.elements)if(e.state.type!==_nt)return!1;return!0}function lit(t){return!!sit(t)||hit(t=cit(t.elements))&&!uit(t)}function cit(t){var r,n=new Map;for(r of t){let t=Pnt(r,!1),e=n.get(t);void 0===e&&(e={},n.set(t,e)),e[r.alt]=!0}return n}function hit(t){for(var e of Array.from(t.values()))if(1<Object.keys(e).length)return!0;return!1}function uit(t){for(var e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}var dit,pit,git,fit,mit,yit,vit,xit,bit,wit,kit,Tit,Eit,_it,Cit,Sit,Ait,Lit,Nit,Iit,Mit,Rit,Dit,Oit,Pit,Bit,Fit,$it,zit,Git,Uit,qit,Yit,jit,Hit,Wit,Vit,Xit,Kit,Zit,Qit,Jit,tat,eat,rat,nat,iat,aat,oat,sat,lat,cat,hat,uat,dat,pat,gat,fat,mat,yat,vat,xat,bat,wat,kat,Tat,Eat,_at,Cat,Sat,Aat,Lat,Nat,Iat,Mat,Rat,Dat,Oat,Pat,Bat,Fat,me,$at,zat,Gat,Uat,qat,Yat,jat=t(()=>{Vrt(),Ont(),$nt(),X$(),BF(),FG(),DF(),gR(),JB(),_$(),lG(),Ae(znt,"createDFACache"),dit=class{static{Ae(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;t<r;t++)e+=!0===this.predicates[t]?"1":"0";return e}},pit=new dit,git=class extends zet{static{Ae(this,"LLStarLookaheadStrategy")}constructor(t){super(),this.logging=null!=(t=t?.logging)?t:t=>console.log(t)}initialize(t){this.atn=Krt(t.rules),this.dfas=Unt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,o=this.logging,s=Xrt(r,"Alternation",e),l=this.atn.decisionMap[s].decision,c=x(Ptt({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Gnt(c,!1)||i)return n?function(e){var r=new dit,n=void 0===e?0:e.length;for(let t=0;t<n;t++){var i=e?.[t].GATE;r.set(t,void 0===i||i.call(this))}var t=qnt.call(this,a,l,r,o);return"number"==typeof t?t:void 0}:function(){var t=qnt.call(this,a,l,pit,o);return"number"==typeof t?t:void 0};{let r=sG(c,(e,t,r)=>(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?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:n,dynamicTokensEnabled:i}=r,a=this.dfas,o=this.logging,s=Xrt(e,n,t),l=this.atn.decisionMap[s].decision,c=x(Ptt({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(Gnt(c)&&c[0][0]&&!i){if(r=c[0],1===(r=pR(r)).length&&E$(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=sG(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=qnt.call(this,a,l,pit,o);return"object"!=typeof t&&0===t}}},Ae(Gnt,"isLL1Sequence"),Ae(Unt,"initATNSimulator"),Ae(qnt,"adaptivePredict"),Ae(Ynt,"performLookahead"),Ae(jnt,"computeLookaheadTarget"),Ae(Hnt,"reportLookaheadAmbiguity"),Ae(Wnt,"buildAmbiguityError"),Ae(Vnt,"getProductionDslName"),Ae(Xnt,"buildAdaptivePredictError"),Ae(Knt,"getExistingTargetState"),Ae(Znt,"computeReachSet"),Ae(Qnt,"getReachableTarget"),Ae(Jnt,"getUniqueAlt"),Ae(tit,"newDFAState"),Ae(eit,"addDFAEdge"),Ae(rit,"addDFAState"),Ae(nit,"computeStartState"),Ae(iit,"closure"),Ae(ait,"getEpsilonTarget"),Ae(oit,"hasConfigInRuleStopState"),Ae(sit,"allConfigsInRuleStopStates"),Ae(lit,"hasConflictTerminatingPrediction"),Ae(cit,"getConflictingAltSets"),Ae(hit,"hasConflictingAltSet"),Ae(uit,"hasStateAssociatedWithOneAlt")}),Hat=t(()=>{jat()}),Wat=t(()=>{function t(t){return"string"==typeof t}var e,r,n,i;function a(t){return"string"==typeof t}function o(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function s(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?vit.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?vit.MAX_VALUE:e}}function c(t){return me.objectLiteral(t)&&me.uinteger(t.line)&&me.uinteger(t.character)}function h(t,e,r,n){if(me.uinteger(t)&&me.uinteger(e)&&me.uinteger(r)&&me.uinteger(n))return{start:xit.create(t,e),end:xit.create(r,n)};if(xit.is(t)&&xit.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)}function u(t){return me.objectLiteral(t)&&xit.is(t.start)&&xit.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return me.objectLiteral(t)&&bit.is(t.range)&&(me.string(t.uri)||me.undefined(t.uri))}function g(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}}function f(t){return me.objectLiteral(t)&&bit.is(t.targetRange)&&me.string(t.targetUri)&&bit.is(t.targetSelectionRange)&&(bit.is(t.originSelectionRange)||me.undefined(t.originSelectionRange))}function m(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}}function y(t){return me.objectLiteral(t)&&me.numberRange(t.red,0,1)&&me.numberRange(t.green,0,1)&&me.numberRange(t.blue,0,1)&&me.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return me.objectLiteral(t)&&bit.is(t.range)&&Tit.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return me.objectLiteral(t)&&me.string(t.label)&&(me.undefined(t.textEdit)||Dit.is(t))&&(me.undefined(t.additionalTextEdits)||me.typedArray(t.additionalTextEdits,Dit.is))}function k(t,e,r,n,i,a){return t={startLine:t,endLine:e},me.defined(r)&&(t.startCharacter=r),me.defined(n)&&(t.endCharacter=n),me.defined(i)&&(t.kind=i),me.defined(a)&&(t.collapsedText=a),t}function T(t){return me.objectLiteral(t)&&me.uinteger(t.startLine)&&me.uinteger(t.startLine)&&(me.undefined(t.startCharacter)||me.uinteger(t.startCharacter))&&(me.undefined(t.endCharacter)||me.uinteger(t.endCharacter))&&(me.undefined(t.kind)||me.string(t.kind))}function E(t,e){return{location:t,message:e}}function _(t){return me.defined(t)&&wit.is(t.location)&&me.string(t.message)}function C(t){return me.objectLiteral(t)&&me.string(t.href)}function S(t,e,r,n,i,a){return t={range:t,message:e},me.defined(r)&&(t.severity=r),me.defined(n)&&(t.code=n),me.defined(i)&&(t.source=i),me.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return me.defined(t)&&bit.is(t.range)&&me.string(t.message)&&(me.number(t.severity)||me.undefined(t.severity))&&(me.integer(t.code)||me.string(t.code)||me.undefined(t.code))&&(me.undefined(t.codeDescription)||me.string(null==(e=t.codeDescription)?void 0:e.href))&&(me.string(t.source)||me.undefined(t.source))&&(me.undefined(t.relatedInformation)||me.typedArray(t.relatedInformation,Ait.is))}function L(t,e,...r){return t={title:t,command:e},me.defined(r)&&0<r.length&&(t.arguments=r),t}function N(t){return me.defined(t)&&me.string(t.title)&&me.string(t.command)}function I(t,e){return{range:t,newText:e}}function M(t,e){return{range:{start:t,end:t},newText:e}}function R(t){return{range:t,newText:""}}function P(t){return me.objectLiteral(t)&&me.string(t.newText)&&bit.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 me.objectLiteral(t)&&me.string(t.label)&&(me.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(me.string(t.description)||void 0===t.description)}function $(t){return me.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 Dit.is(t)&&(Oit.is(t.annotationId)||Pit.is(t.annotationId))}function Y(t,e){return{textDocument:t,edits:e}}function j(t){return me.defined(t)&&jit.is(t.textDocument)&&Array.isArray(t.edits)}function H(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 W(t){return t&&"create"===t.kind&&me.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||me.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||me.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Pit.is(t.annotationId))}function V(t,e,r,n){return t={kind:"rename",oldUri:t,newUri:e},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(t.options=r),void 0!==n&&(t.annotationId=n),t}function X(t){return t&&"rename"===t.kind&&me.string(t.oldUri)&&me.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||me.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||me.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Pit.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&&me.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||me.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||me.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Pit.is(t.annotationId))}function Q(t){return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(t=>me.string(t.kind)?$it.is(t)||zit.is(t)||Git.is(t):Fit.is(t)))}function J(t){return{uri:t}}function tt(t){return me.defined(t)&&me.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return me.defined(t)&&me.string(t.uri)&&me.integer(t.version)}function nt(t,e){return{uri:t,version:e}}function it(t){return me.defined(t)&&me.string(t.uri)&&(null===t.version||me.integer(t.version))}function at(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}}function ot(t){return me.defined(t)&&me.string(t.uri)&&me.string(t.languageId)&&me.integer(t.version)&&me.string(t.text)}function st(t){return t===n.PlainText||t===n.Markdown}function lt(t){var e=t;return me.objectLiteral(t)&&Wit.is(e.kind)&&me.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&me.string(t.newText)&&bit.is(t.insert)&&bit.is(t.replace)}function ut(t){return t&&(me.string(t.detail)||void 0===t.detail)&&(me.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 me.string(t)||me.objectLiteral(t)&&me.string(t.language)&&me.string(t.value)}function mt(t){var e=t;return!!e&&me.objectLiteral(e)&&(Vit.is(e.contents)||rat.is(e.contents)||me.typedArray(e.contents,rat.is))&&(void 0===t.range||bit.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},me.defined(e)&&(t.documentation=e),me.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},me.number(e)&&(t.kind=e),t}function bt(t,e,r,n,i){return t={name:t,kind:e,location:{uri:n,range:r}},i&&(t.containerName=i),t}function wt(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,n,i,a){return t={name:t,detail:e,kind:r,range:n,selectionRange:i},void 0!==a&&(t.children=a),t}function Tt(t){return t&&me.string(t.name)&&me.number(t.kind)&&bit.is(t.range)&&bit.is(t.selectionRange)&&(void 0===t.detail||me.string(t.detail))&&(void 0===t.deprecated||me.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 _t(t){return me.defined(t)&&me.typedArray(t.diagnostics,Mit.is)&&(void 0===t.only||me.typedArray(t.only,me.string))&&(void 0===t.triggerKind||t.triggerKind===pat.Invoked||t.triggerKind===pat.Automatic)}function Ct(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):Rit.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n}function St(t){return t&&me.string(t.title)&&(void 0===t.diagnostics||me.typedArray(t.diagnostics,Mit.is))&&(void 0===t.kind||me.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Rit.is(t.command))&&(void 0===t.isPreferred||me.boolean(t.isPreferred))&&(void 0===t.edit||Uit.is(t.edit))}function At(t,e){return t={range:t},me.defined(e)&&(t.data=e),t}function Lt(t){return me.defined(t)&&bit.is(t.range)&&(me.undefined(t.command)||Rit.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return me.defined(t)&&me.uinteger(t.tabSize)&&me.boolean(t.insertSpaces)}function Mt(t,e,r){return{range:t,target:e,data:r}}function Rt(t){return me.defined(t)&&bit.is(t.range)&&(me.undefined(t.target)||me.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return me.objectLiteral(t)&&bit.is(t.range)&&(void 0===t.parent||i.is(t.parent))}function Pt(t){return me.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&&bit.is(t.range)&&me.string(t.text)}function $t(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&bit.is(t.range)&&me.boolean(t.caseSensitiveLookup)&&(me.string(t.variableName)||void 0===t.variableName)}function Gt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&bit.is(t.range)&&(me.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function Yt(t){return me.defined(t)&&bit.is(t.stoppedLocation)}function jt(t){return 1===t||2===t}function Ht(t){return{value:t}}function Wt(t){return me.objectLiteral(t)&&(void 0===t.tooltip||me.string(t.tooltip)||Vit.is(t.tooltip))&&(void 0===t.location||wit.is(t.location))&&(void 0===t.command||Rit.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 me.objectLiteral(t)&&xit.is(t.position)&&(me.string(t.label)||me.typedArray(t.label,Aat.is))&&(void 0===t.kind||Sat.is(t.kind))&&void 0===t.textEdits||me.typedArray(t.textEdits,Dit.is)&&(void 0===t.tooltip||me.string(t.tooltip)||Vit.is(t.tooltip))&&(void 0===t.paddingLeft||me.boolean(t.paddingLeft))&&(void 0===t.paddingRight||me.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}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 me.objectLiteral(t)&&mit.is(t.uri)&&me.string(t.name)}function re(t,e,r,n){return new Fat(t,e,r,n)}function ne(t){return!!(me.defined(t)&&me.string(t.uri)&&(me.undefined(t.languageId)||me.string(t.languageId))&&me.uinteger(t.lineCount)&&me.func(t.getText)&&me.func(t.positionAt)&&me.func(t.offsetAt))}function ie(e,t){let r=e.getText(),n=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}),i=r.length;for(let t=n.length-1;0<=t;t--){var a=n[t],o=e.offsetAt(a.range.start),s=e.offsetAt(a.range.end);if(!(s<=i))throw new Error("Overlapping edit");r=r.substring(0,o)+a.newText+r.substring(s,r.length),i=o}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,o=n.slice(0,a),s=n.slice(a);D(o,i),D(s,i);let t=0,e=0,r=0;for(;t<o.length&&e<s.length;)i(o[t],s[e])<=0?n[r++]=o[t++]:n[r++]=s[e++];for(;t<o.length;)n[r++]=o[t++];for(;e<s.length;)n[r++]=s[e++]}return n}O=fit=fit||{},Ae(t,"is"),O.is=t,O=mit=mit||{},Ae(a,"is"),O.is=a,(e=yit=yit||{}).MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,Ae(o,"is"),e.is=o,(r=vit=vit||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,Ae(s,"is"),r.is=s,O=xit=xit||{},Ae(l,"create"),O.create=l,Ae(c,"is"),O.is=c,O=bit=bit||{},Ae(h,"create"),O.create=h,Ae(u,"is"),O.is=u,O=wit=wit||{},Ae(d,"create"),O.create=d,Ae(p,"is"),O.is=p,O=kit=kit||{},Ae(g,"create"),O.create=g,Ae(f,"is"),O.is=f,O=Tit=Tit||{},Ae(m,"create"),O.create=m,Ae(y,"is"),O.is=y,O=Eit=Eit||{},Ae(v,"create"),O.create=v,Ae(x,"is"),O.is=x,O=_it=_it||{},Ae(b,"create"),O.create=b,Ae(w,"is"),O.is=w,(O=Cit=Cit||{}).Comment="comment",O.Imports="imports",O.Region="region",O=Sit=Sit||{},Ae(k,"create"),O.create=k,Ae(T,"is"),O.is=T,O=Ait=Ait||{},Ae(E,"create"),O.create=E,Ae(_,"is"),O.is=_,(O=Lit=Lit||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=Nit=Nit||{}).Unnecessary=1,O.Deprecated=2,O=Iit=Iit||{},Ae(C,"is"),O.is=C,O=Mit=Mit||{},Ae(S,"create"),O.create=S,Ae(A,"is"),O.is=A,O=Rit=Rit||{},Ae(L,"create"),O.create=L,Ae(N,"is"),O.is=N,O=Dit=Dit||{},Ae(I,"replace"),O.replace=I,Ae(M,"insert"),O.insert=M,Ae(R,"del"),O.del=R,Ae(P,"is"),O.is=P,O=Oit=Oit||{},Ae(B,"create"),O.create=B,Ae(F,"is"),O.is=F,O=Pit=Pit||{},Ae($,"is"),O.is=$,O=Bit=Bit||{},Ae(z,"replace"),O.replace=z,Ae(G,"insert"),O.insert=G,Ae(U,"del"),O.del=U,Ae(q,"is"),O.is=q,O=Fit=Fit||{},Ae(Y,"create"),O.create=Y,Ae(j,"is"),O.is=j,O=$it=$it||{},Ae(H,"create"),O.create=H,Ae(W,"is"),O.is=W,O=zit=zit||{},Ae(V,"create"),O.create=V,Ae(X,"is"),O.is=X,O=Git=Git||{},Ae(K,"create"),O.create=K,Ae(Z,"is"),O.is=Z,O=Uit=Uit||{},Ae(Q,"is"),O.is=Q,O=qit=qit||{},Ae(J,"create"),O.create=J,Ae(tt,"is"),O.is=tt,O=Yit=Yit||{},Ae(et,"create"),O.create=et,Ae(rt,"is"),O.is=rt,O=jit=jit||{},Ae(nt,"create"),O.create=nt,Ae(it,"is"),O.is=it,O=Hit=Hit||{},Ae(at,"create"),O.create=at,Ae(ot,"is"),O.is=ot,(n=Wit=Wit||{}).PlainText="plaintext",n.Markdown="markdown",Ae(st,"is"),n.is=st,O=Vit=Vit||{},Ae(lt,"is"),O.is=lt,(O=Xit=Xit||{}).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=Kit=Kit||{}).PlainText=1,O.Snippet=2,O=Zit=Zit||{},Ae(ct,"create"),O.create=ct,Ae(ht,"is"),O.is=ht,(O=Qit=Qit||{}).asIs=1,O.adjustIndentation=2,O=Jit=Jit||{},Ae(ut,"is"),O.is=ut,O=tat=tat||{},Ae(dt,"create"),O.create=dt,O=eat=eat||{},Ae(pt,"create"),O.create=pt,O=rat=rat||{},Ae(gt,"fromPlainText"),O.fromPlainText=gt,Ae(ft,"is"),O.is=ft,O=nat=nat||{},Ae(mt,"is"),O.is=mt,O=iat=iat||{},Ae(yt,"create"),O.create=yt,O=aat=aat||{},Ae(vt,"create"),O.create=vt,(O=oat=oat||{}).Text=1,O.Read=2,O.Write=3,O=sat=sat||{},Ae(xt,"create"),O.create=xt,(O=lat=lat||{}).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=cat=cat||{},Ae(bt,"create"),O.create=bt,O=hat=hat||{},Ae(wt,"create"),O.create=wt,O=uat=uat||{},Ae(kt,"create"),O.create=kt,Ae(Tt,"is"),O.is=Tt,(O=dat=dat||{}).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=pat=pat||{}).Invoked=1,O.Automatic=2,O=gat=gat||{},Ae(Et,"create"),O.create=Et,Ae(_t,"is"),O.is=_t,O=fat=fat||{},Ae(Ct,"create"),O.create=Ct,Ae(St,"is"),O.is=St,O=mat=mat||{},Ae(At,"create"),O.create=At,Ae(Lt,"is"),O.is=Lt,O=yat=yat||{},Ae(Nt,"create"),O.create=Nt,Ae(It,"is"),O.is=It,O=vat=vat||{},Ae(Mt,"create"),O.create=Mt,Ae(Rt,"is"),O.is=Rt,i=xat=xat||{},Ae(Dt,"create"),i.create=Dt,Ae(Ot,"is"),i.is=Ot,(O=bat=bat||{}).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=wat=wat||{}).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=kat=kat||{},Ae(Pt,"is"),O.is=Pt,O=Tat=Tat||{},Ae(Bt,"create"),O.create=Bt,Ae(Ft,"is"),O.is=Ft,O=Eat=Eat||{},Ae($t,"create"),O.create=$t,Ae(zt,"is"),O.is=zt,O=_at=_at||{},Ae(Gt,"create"),O.create=Gt,Ae(Ut,"is"),O.is=Ut,O=Cat=Cat||{},Ae(qt,"create"),O.create=qt,Ae(Yt,"is"),O.is=Yt,(O=Sat=Sat||{}).Type=1,O.Parameter=2,Ae(jt,"is"),O.is=jt,O=Aat=Aat||{},Ae(Ht,"create"),O.create=Ht,Ae(Wt,"is"),O.is=Wt,O=Lat=Lat||{},Ae(Vt,"create"),O.create=Vt,Ae(Xt,"is"),O.is=Xt,O=Nat=Nat||{},Ae(Kt,"createSnippet"),O.createSnippet=Kt,O=Iat=Iat||{},Ae(Zt,"create"),O.create=Zt,O=Mat=Mat||{},Ae(Qt,"create"),O.create=Qt,(O=Rat=Rat||{}).Invoked=0,O.Automatic=1,O=Dat=Dat||{},Ae(Jt,"create"),O.create=Jt,O=Oat=Oat||{},Ae(te,"create"),O.create=te,O=Pat=Pat||{},Ae(ee,"is"),O.is=ee,O=Bat=Bat||{},Ae(re,"create"),O.create=re,Ae(ne,"is"),O.is=ne,Ae(ie,"applyEdits"),O.applyEdits=ie,Ae(D,"mergeSort"),Fat=class{static{Ae(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,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,n=!0;for(let t=0;t<r.length;t++){n&&(e.push(t),n=!1);var i=r.charAt(t);n="\r"===i||i===`
|
|
|
`,"\r"===i&&t+1<r.length&&r.charAt(t+1)===`
|
|
|
`&&t++}n&&0<r.length&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return xit.create(0,t);for(;r<n;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+1}var a=r-1;return xit.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1<r.length?r[t.line+1]:this._content.length,Math.max(Math.min(e+t.character,r),e))}get lineCount(){return this.getLineOffsets().length}};{var O=me=me||{};let n=Object.prototype.toString;function ae(t){return typeof t<"u"}function oe(t){return"u"<typeof t}function se(t){return!0===t||!1===t}function le(t){return"[object String]"===n.call(t)}function ce(t){return"[object Number]"===n.call(t)}function he(t,e,r){return"[object Number]"===n.call(t)&&e<=t&&t<=r}function ue(t){return"[object Number]"===n.call(t)&&-2147483648<=t&&t<=2147483647}function de(t){return"[object Number]"===n.call(t)&&0<=t&&t<=2147483647}function pe(t){return"[object Function]"===n.call(t)}function ge(t){return null!==t&&"object"==typeof t}function fe(t,e){return Array.isArray(t)&&t.every(e)}Ae(ae,"defined"),O.defined=ae,Ae(oe,"undefined"),O.undefined=oe,Ae(se,"boolean"),O.boolean=se,Ae(le,"string"),O.string=le,Ae(ce,"number"),O.number=ce,Ae(he,"numberRange"),O.numberRange=he,Ae(ue,"integer"),O.integer=ue,Ae(de,"uinteger"),O.uinteger=de,Ae(pe,"func"),O.func=pe,Ae(ge,"objectLiteral"),O.objectLiteral=ge,Ae(fe,"typedArray"),O.typedArray=fe}}),Vat=t(()=>{Wat(),MW(),hV(),$at=class{static{Ae(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(t){return this.rootNode=new Yat(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Uat;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Gat(t.startOffset,t.image.length,HW(t),t.tokenType,!1)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}construct(t){var e=this.current;"string"==typeof t.$type&&(this.current.astNode=t),t.$cstNode=e,0===(t=this.nodeStack.pop())?.content.length&&this.removeNode(t)}addHiddenTokens(t){for(var e of t)(e=new Gat(e.startOffset,e.image.length,HW(e),e.tokenType,!0)).root=this.rootNode,this.addHiddenToken(this.rootNode,e)}addHiddenToken(e,r){var{offset:n,end:i}=r;for(let t=0;t<e.content.length;t++){var a=e.content[t],{offset:o,end:s}=a;if(AW(a)&&o<n&&i<s)return void this.addHiddenToken(a,r);if(i<=o)return void e.content.splice(t,0,r)}e.content.push(r)}},zat=class{static{Ae(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var t="string"==typeof(null==(t=this._astNode)?void 0:t.$type)?this._astNode:null==(t=this.container)?void 0:t.astNode;if(t)return t;throw new Error("This node has no associated AST element")}set astNode(t){this._astNode=t}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Gat=class extends zat{static{Ae(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,r,n,i=!1){super(),this._hidden=i,this._offset=t,this._tokenType=n,this._length=e,this._range=r}},Uat=class extends zat{static{Ae(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new qat(this)}get children(){return this.content}get offset(){var t;return null!=(t=null==(t=this.firstNonHiddenNode)?void 0:t.offset)?t:0}get length(){return this.end-this.offset}get end(){var t;return null!=(t=null==(t=this.lastNonHiddenNode)?void 0:t.end)?t:0}get range(){var t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;return t&&e?(void 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:xit.create(0,0),end:xit.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]}},qat=class e extends Array{static{Ae(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}},Yat=class extends Uat{static{Ae(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 Xat(t){return t.$type===Kat}var Kat,Zat,Qat,Jat,tot,eot,rot,not,iot,aot=t(()=>{Vrt(),Hat(),iK(),BZ(),bK(),Vat(),Kat=Symbol("Datatype"),Ae(Xat,"isDataTypeNode"),Zat=Ae(t=>t.endsWith("")?t:t+"","withRuleSuffix"),Qat=class{static{Ae(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition;this.wrapper=new iot(e,Object.assign(Object.assign({},t.parser.ParserConfig),{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)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Jat=class extends Qat{static{Ae(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new $at,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=t.fragment?void 0:xZ(t)?Kat:EZ(t),r=this.wrapper.DEFINE_RULE(Zat(t.name),this.startImplementation(r,e).bind(this));return t.entry&&(this.mainRule=r),r}parse(t){this.nodeBuilder.buildRootNode(t);var t=this.lexer.tokenize(t),e=(this.wrapper.input=t.tokens,this.mainRule.call(this.wrapper,{}));return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:e,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(n,i){return t=>{var e;this.isRecording()||(this.stack.push(e={$type:n}),n===Kat&&(e.value=""));let r;try{r=i(t)}catch{r=void 0}return r=this.isRecording()||void 0!==r?r:this.construct()}}consume(e,r,n){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.nodeBuilder.buildLeafNode(e,n),{assignment:t,isCrossRef:i}=this.getAssignment(n),a=this.current;if(t){var o=JV(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,o,r,i)}else if(Xat(a)){let t=e.image;JV(n)||(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,n){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(r)),t=this.wrapper.wrapSubrule(t,e,n),!this.isRecording()&&i&&0<i.length&&this.performSubruleAssignment(t,r,i)}performSubruleAssignment(t,e,r){var{assignment:e,isCrossRef:n}=this.getAssignment(e);e?this.assign(e.operator,e.feature,t,r,n):Xat(e=this.current)?e.value+=t.toString():"object"==typeof t&&t&&(r=t.$type,n=this.assignWithoutOverride(t,e),r&&(n.$type=r),t=n,this.stack.pop(),this.stack.push(t))}action(e,r){if(!this.isRecording()){let t=this.current;!t.$cstNode&&r.feature&&r.operator&&(n=(t=this.construct(!1)).$cstNode.feature,this.nodeBuilder.buildCompositeNode(n));var n={$type:e};this.stack.pop(),this.stack.push(n),r.feature&&r.operator&&this.assign(r.operator,r.feature,t,t.$cstNode,!1)}}construct(t=!0){var e;if(!this.isRecording())return oK(e=this.current),this.nodeBuilder.construct(e),t&&this.stack.pop(),Xat(e)?this.converter.convert(e.value,e.$cstNode):(yK(this.astReflection,e),e)}getAssignment(t){var e;return this.assignmentMap.has(t)||(e=sK(t,VV),this.assignmentMap.set(t,{assignment:e,isCrossRef:!!e&&KV(e.terminal)})),this.assignmentMap.get(t)}assign(t,e,r,n,i){var a=this.current,o=i&&"string"==typeof r?this.linker.buildReference(a,e,n,r):r;switch(t){case"=":a[e]=o;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(o)}}assignWithoutOverride(t,e){for(var[r,n]of Object.entries(e)){var i=t[r];void 0===i?t[r]=n:Array.isArray(i)&&Array.isArray(n)&&(n.push(...i),t[r]=n)}return t}get definitionErrors(){return this.wrapper.definitionErrors}},tot=class{static{Ae(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return ytt.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return ytt.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return ytt.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return ytt.buildEarlyExitMessage(t)}},eot=class extends tot{static{Ae(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}\`.`}},rot=class extends Qat{static{Ae(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),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(Zat(t.name),this.startImplementation(e).bind(this)),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,n){this.before(r),this.wrapper.wrapSubrule(t,e,n),this.after(r)}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}},not={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new eot},iot=class extends Urt{static{Ae(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},not),{lookaheadStrategy:r?new zet({maxLookahead:e.maxLookahead}):new git}),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 oot(t,e,r){return sot({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function sot(t,e){let r=rZ(e,!1),n=OW(e.rules).filter(BV).filter(t=>r.has(t));for(var i of n){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});a.rules.set(i.name,t.parser.rule(i,lot(a,i.definition)))}}function lot(e,r,t=!1){let n;if(JV(r))n=vot(e,r);else if(HV(r))n=cot(e,r);else if(VV(r))n=lot(e,r.terminal);else if(KV(r))n=yot(e,r);else if(rX(r))n=hot(e,r);else if(WV(r))n=pot(e,r);else if(oX(r))n=got(e,r);else if(QV(r))n=fot(e,r);else{if(!ZV(r))throw new dV(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=Ae(()=>e.parser.consume(t,mtt,r),"method")}}return xot(e,t?void 0:mot(r),n,r.cardinality)}function cot(t,e){let r=EZ(e);return()=>t.parser.action(r,e)}function hot(n,i){let a=i.rule.ref;if(BV(a)){let e=n.subrule++,r=0<i.arguments.length?uot(a,i.arguments):()=>({});return t=>n.parser.subrule(e,bot(n,a),i,r(t))}if(UV(a)){let t=n.consume++,e=kot(n,a.name);return()=>n.parser.consume(t,e,i)}if(!a)throw new dV(i.$cstNode,"Undefined rule type: "+i.$type);uV(a)}function uot(a,t){let o=t.map(t=>dot(t.value));return e=>{var r={};for(let t=0;t<o.length;t++){var n=a.parameters[t],i=o[t];r[n.name]=i(e)}return r}}function dot(n){if(SV(n)){let e=dot(n.left),r=dot(n.right);return t=>e(t)||r(t)}if(CV(n)){let e=dot(n.left),r=dot(n.right);return t=>e(t)&&r(t)}if(RV(n)){let e=dot(n.value);return t=>!e(t)}if(PV(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(_V(n)){let t=!!n.true;return()=>t}uV()}function pot(r,n){if(1===n.elements.length)return lot(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:lot(r,i,!0)};(i=mot(i))&&(a.GATE=dot(i)),t.push(a)}let e=r.or++;return n=>r.parser.alternatives(e,t.map(t=>{let e={ALT:Ae(()=>t.ALT(n),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(n)),e}))}}function got(o,t){if(1===t.elements.length)return lot(o,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:lot(o,r,!0)};(r=mot(r))&&(n.GATE=dot(r)),e.push(n)}let s=o.or++,l=Ae((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),i=Ae(a=>o.parser.alternatives(s,e.map((e,r)=>{let t={ALT:Ae(()=>!0,"ALT")},n=o.parser,i=(t.ALT=()=>{var t;e.ALT(a),n.isRecording()||(t=l(s,n),n.unorderedGroups.get(t)||n.unorderedGroups.set(t,[]),"u"<typeof(t=n.unorderedGroups.get(t))?.[r]&&(t[r]=!0))},e.GATE);return i?t.GATE=()=>i(a):t.GATE=()=>!n.unorderedGroups.get(l(s,n))?.[r],t})),"alternatives"),a=xot(o,mot(t),i,"*");return t=>{a(t),o.parser.isRecording()||o.parser.unorderedGroups.delete(l(s,o.parser))}}function fot(e,t){let r=t.elements.map(t=>lot(e,t));return e=>r.forEach(t=>t(e))}function mot(t){if(QV(t))return t.guardCondition}function yot(r,n,i=n.terminal){if(i){if(rX(i)&&BV(i.rule.ref)){let e=r.subrule++;return t=>r.parser.subrule(e,bot(r,i.rule.ref),n,t)}if(rX(i)&&UV(i.rule.ref)){let t=r.consume++,e=kot(r,i.rule.ref.name);return()=>r.parser.consume(t,e,n)}if(JV(i)){let t=r.consume++,e=kot(r,i.value);return()=>r.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);var t=pZ(n.type.ref)?.terminal;if(t)return yot(r,n,t);throw new Error("Could not find name assignment for type: "+EZ(n.type.ref))}function vot(t,e){let r=t.consume++,n=t.tokens[e.value];if(n)return()=>t.parser.consume(r,n,e);throw new Error("Could not find token for keyword: "+e.value)}function xot(n,t,i,e){let a=t&&dot(t);if(!e){if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:Ae(()=>i(t),"ALT"),GATE:Ae(()=>a(t),"GATE")},{ALT:Prt(),GATE:Ae(()=>!a(t),"GATE")}])}return i}if("*"===e){let e=n.many++;return t=>n.parser.many(e,{DEF:Ae(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=n.many++;if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:Ae(()=>n.parser.atLeastOne(r,{DEF:Ae(()=>i(t),"DEF")}),"ALT"),GATE:Ae(()=>a(t),"GATE")},{ALT:Prt(),GATE:Ae(()=>!a(t),"GATE")}])}return t=>n.parser.atLeastOne(r,{DEF:Ae(()=>i(t),"DEF")})}if("?"===e){let e=n.optional++;return t=>n.parser.optional(e,{DEF:Ae(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}uV()}function bot(t,e){if(e=wot(t,e),t=t.rules.get(e))return t;throw new Error(`Rule "${e}" not found."`)}function wot(n,i){if(BV(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!BV(e);)(QV(e)||WV(e)||oX(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function kot(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var Tot=t(()=>{Vrt(),iK(),pV(),GW(),BZ(),Ae(oot,"createParser"),Ae(sot,"buildRules"),Ae(lot,"buildElement"),Ae(cot,"buildAction"),Ae(hot,"buildRuleCall"),Ae(uot,"buildRuleCallPredicate"),Ae(dot,"buildPredicate"),Ae(pot,"buildAlternatives"),Ae(got,"buildUnorderedGroup"),Ae(fot,"buildGroup"),Ae(mot,"getGuardCondition"),Ae(yot,"buildCrossReference"),Ae(vot,"buildKeyword"),Ae(xot,"wrap"),Ae(bot,"getRule"),Ae(wot,"getRuleName"),Ae(kot,"getToken")});function Eot(t){var e=t.Grammar,r=t.parser.Lexer;return oot(e,t=new rot(t),r.definition),t.finalize(),t}var _ot=t(()=>{aot(),Tot(),Ae(Eot,"createCompletionParser")});function Cot(t){return(t=Sot(t)).finalize(),t}function Sot(t){var e=t.Grammar,r=t.parser.Lexer;return oot(e,new Jat(t),r.definition)}var Aot,Lot,Not,Iot=t(()=>{aot(),Tot(),Ae(Cot,"createLangiumParser"),Ae(Sot,"prepareLangiumParser")}),Mot=t(()=>{Vrt(),iK(),bK(),BZ(),QK(),GW(),Aot=class{static{Ae(this,"DefaultTokenBuilder")}buildTokens(t,e){let r=OW(rZ(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return n.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&qK(e)?i.unshift(t):i.push(t)}),i}buildTerminalTokens(t){return t.filter(UV).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=SZ(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,r={name:t.name,PATTERN:r,LINE_BREAKS:!0};return t.hidden&&(r.GROUP=qK(e)?ZJ.SKIPPED:"hidden"),r}requiresCustomPattern(t){return!!t.flags.includes("u")||!(!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(BV).flatMap(t=>dK(t).filter(JV)).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{name:t.value,PATTERN:this.buildKeywordPattern(t,r),LONGER_ALT:this.findLongerAlt(t,e)}}buildKeywordPattern(t,e){return e?new RegExp(jK(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&HK("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),Rot=t(()=>{function t(e){let r="";for(let t=1;t<e.length-1;t++){var n,i=e.charAt(t);"\\"===i?(n=e.charAt(++t),r+=a(n)):r+=i}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 n(t){return BigInt(t)}function i(t){return new Date(t)}function o(t){return Number(t)}function s(t){return"true"===t.toLowerCase()}var l;iK(),BZ(),Lot=class{static{Ae(this,"DefaultValueConverter")}convert(t,e){var r=e.grammarSource;if(rX(r=KV(r)?iZ(r):r)){if(r=r.rule.ref)return this.runConverter(r,t,e);throw new Error("This cst node was not parsed by a rule.")}return t}runConverter(t,e,r){switch(t.name.toUpperCase()){case"INT":return Not.convertInt(e);case"STRING":return Not.convertString(e);case"ID":return Not.convertID(e)}switch(null==(t=CZ(t))?void 0:t.toLowerCase()){case"number":return Not.convertNumber(e);case"boolean":return Not.convertBoolean(e);case"bigint":return Not.convertBigint(e);case"date":return Not.convertDate(e);default:return e}}},l=Not=Not||{},Ae(t,"convertString"),l.convertString=t,Ae(a,"convertEscapeCharacter"),Ae(e,"convertID"),l.convertID=e,Ae(r,"convertInt"),l.convertInt=r,Ae(n,"convertBigint"),l.convertBigint=n,Ae(i,"convertDate"),l.convertDate=i,Ae(o,"convertNumber"),l.convertNumber=o,Ae(s,"convertBoolean"),l.convertBoolean=s}),Dot=jMt(t=>{var e,r;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function i(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),Ae(n,"RAL"),r=n,Ae(i,"install"),r.install=i,t.default=n}),Oot=jMt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function o(t){return Array.isArray(t)}function s(t){return o(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,Ae(e,"boolean"),t.boolean=e,Ae(r,"string"),t.string=r,Ae(n,"number"),t.number=n,Ae(i,"error"),t.error=i,Ae(a,"func"),t.func=a,Ae(o,"array"),t.array=o,Ae(s,"stringArray"),t.stringArray=s}),Pot=jMt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var o=Dot();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var i=class{static{Ae(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:Ae(()=>this.remove(t,e),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t<e;t++)if(this._callbacks[t]===n){if(this._contexts[t]===i)return this._callbacks.splice(t,1),void this._contexts.splice(t,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var n=[],i=this._callbacks.slice(0),a=this._contexts.slice(0);for(let t=0,e=i.length;t<e;t++)try{n.push(i[t].apply(a[t],r))}catch(t){(0,o.default)().console.error(t)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{Ae(this,"Emitter")}constructor(t){this._options=t}get event(){return this._event||(this._event=(t,e,r)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let n={dispose:Ae(()=>{this._callbacks&&(this._callbacks.remove(t,e),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Bot=jMt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=Dot(),i=Oot(),a=Pot();function o(t){return t&&(t===r.None||t===r.Cancelled||i.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}),Ae(o,"is"),r.is=o;var s=Object.freeze(function(t,e){let r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{Ae(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?s:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{Ae(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}),Fot={},$ot=t(()=>{et(Fot,rt(Bot(),1))});function zot(){return new Promise(t=>{"u"<typeof setImmediate?setTimeout(t,0):setImmediate(t)})}function Got(){return jot=Date.now(),new Fot.CancellationTokenSource}function Uot(t){Hot=t}function qot(t){return t===Wot}async function Yot(t){if(t!==Fot.CancellationToken.None){var e=Date.now();if(Hot<=e-jot&&(jot=e,await zot()),t.isCancellationRequested)throw Wot}}var jot,Hot,Wot,Vot,Xot=t(()=>{$ot(),Ae(zot,"delayNextTick"),jot=0,Hot=10,Ae(Got,"startCancelableOperation"),Ae(Uot,"setInterruptionPeriod"),Wot=Symbol("OperationCancelled"),Ae(qot,"isOperationCancelled"),Ae(Yot,"interruptAndCheck"),Vot=class{static{Ae(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function Kot(n,i){if(!(n.length<=1)){var a=n.length/2|0,o=n.slice(0,a),s=n.slice(a);Kot(o,i),Kot(s,i);let t=0,e=0,r=0;for(;t<o.length&&e<s.length;)i(o[t],s[e])<=0?n[r++]=o[t++]:n[r++]=s[e++];for(;t<o.length;)n[r++]=o[t++];for(;e<s.length;)n[r++]=s[e++]}return n}function Zot(e,t,r=0){var n=t?[r]:[];for(let t=0;t<e.length;t++){var i=e.charCodeAt(t);Qot(i)&&(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,n.push(r+t+1))}return n}function Qot(t){return 13===t||10===t}function Jot(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 tst(t){var e=Jot(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var est,rst,nst,ist,ast,ost,sst,lst,cst,hst=t(()=>{function t(t,e,r,n){return new est(t,e,r,n)}function e(t,e,r){if(t instanceof est)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(),n=Kot(e.map(tst),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=0,a=[];for(var o of n){var s=t.offsetAt(o.range.start);if(s<i)throw new Error("Overlapping edit");s>i&&a.push(r.substring(i,s)),o.newText.length&&a.push(o.newText),i=t.offsetAt(o.range.end)}return a.push(r.substr(i)),a.join("")}var n;est=class i{static{Ae(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,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(i.isIncremental(a)){var o=Jot(a.range),s=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,s)+a.text+this._content.substring(l,this._content.length);let r=Math.max(o.start.line,0),t=Math.max(o.end.line,0),n=this._lineOffsets,i=Zot(a.text,!1,s);if(t-r===i.length)for(let t=0,e=i.length;t<e;t++)n[t+r+1]=i[t];else i.length<1e4?n.splice(r+1,t-r,...i):this._lineOffsets=n=n.slice(0,r+1).concat(i,n.slice(t+1));var c=a.text.length-(l-s);if(0!=c)for(let t=r+1+i.length,e=n.length;t<e;t++)n[t]=n[t]+c}else{if(!i.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=Zot(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return{line:0,character:t};for(;r<n;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+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&&Qot(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}},n=rst=rst||{},Ae(t,"create"),n.create=t,Ae(e,"update"),n.update=e,Ae(r,"applyEdits"),n.applyEdits=r,Ae(Kot,"mergeSort"),Ae(Zot,"computeLineOffsets"),Ae(Qot,"isEOL"),Ae(Jot,"getWellformedRange"),Ae(tst,"getWellformedEdit")}),ust=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,n="",i=0,a=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)r=t.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(a!==s-1&&1!==o)if(a!==s-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){var l=n.lastIndexOf("/");if(l!==n.length-1){i=-1===l?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",a=s,o=i=0;continue}e&&(0<n.length?n+="/..":n="..",i=2)}else 0<n.length?n+="/"+t.slice(a+1,s):n=t.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}Ae(d,"e"),Ae(a,"r");var p={resolve:Ae(function(){for(var t,e="",r=!1,n=arguments.length-1;-1<=n&&!r;n--){var i=0<=n?arguments[n]:t=void 0===t?process.cwd():t;d(i),0!==i.length&&(e=i+"/"+e,r=47===i.charCodeAt(0))}return e=a(e,!r),r?0<e.length?"/"+e:"/":0<e.length?e:"."},"resolve"),normalize:Ae(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:Ae(function(t){return d(t),0<t.length&&47===t.charCodeAt(0)},"isAbsolute"),join:Ae(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:Ae(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 n=t.length,i=n-r,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var o=e.length-a,s=i<o?i:o,l=-1,c=0;c<=s;++c){if(c===s){if(s<o){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else s<i&&(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<=n;++c)c!==n&&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:Ae(function(t){return t},"_makeLong"),dirname:Ae(function(t){if(d(t),0===t.length)return".";for(var e=47===t.charCodeAt(0),r=-1,n=!0,i=t.length-1;1<=i;--i)if(47===t.charCodeAt(i)){if(!n){r=i;break}}else n=!1;return-1===r?e?"/":".":e&&1===r?"//":t.slice(0,r)},"dirname"),basename:Ae(function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');d(t);var r=0,n=-1,i=!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,o=-1,s=t.length-1;0<=s;--s){var l=t.charCodeAt(s);if(47===l){if(!i){r=s+1;break}}else-1===o&&(i=!1,o=s+1),0<=a&&(l===e.charCodeAt(a)?-1==--a&&(n=s):(a=-1,n=o))}return r===n?n=o:-1===n&&(n=t.length),t.slice(r,n)}for(s=t.length-1;0<=s;--s)if(47===t.charCodeAt(s)){if(!i){r=s+1;break}}else-1===n&&(i=!1,n=s+1);return-1===n?"":t.slice(r,n)},"basename"),extname:Ae(function(t){d(t);for(var e=-1,r=0,n=-1,i=!0,a=0,o=t.length-1;0<=o;--o){var s=t.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){r=o+1;break}}return-1===e||-1===n||0===a||1===a&&e===n-1&&e===r+1?"":t.slice(e,n)},"extname"),format:Ae(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:Ae(function(t){d(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0!==t.length){for(var r,n=47===t.charCodeAt(0),i=n?(e.root="/",1):0,a=-1,o=0,s=-1,l=!0,c=t.length-1,h=0;i<=c;--c)if(47!==(r=t.charCodeAt(c)))-1===s&&(l=!1,s=c+1),46===r?-1===a?a=c:1!==h&&(h=1):-1!==a&&(h=-1);else if(!l){o=c+1;break}-1===a||-1===s||0===h||1===h&&a===s-1&&a===o+1?-1!==s&&(e.base=e.name=0===o&&n?t.slice(1,s):t.slice(o,s)):(0===o&&n?(e.name=t.slice(1,a),e.base=t.slice(1,s)):(e.name=t.slice(o,a),e.base=t.slice(o,s)),e.ext=t.slice(a,s)),0<o?e.dir=t.slice(0,o-1):n&&(e.dir="/")}return e},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,t.exports=p}},n={};function h(t){var e=n[t];return void 0===e&&(e=n[t]={exports:{}},r[t](e,e.exports,h)),e.exports}Ae(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 t={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(t),h.d(t,{URI:Ae(()=>b,"URI"),Utils:Ae(()=>v,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function u(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(!i.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 ("//")')}Ae(u,"s");let o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class b{static{Ae(this,"f")}static isUri(t){return t instanceof b||!!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,n,i,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=function(t,e){switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e}(this.scheme,r||""),this.query=n||"",this.fragment=i||"",u(this,a))}get fsPath(){return g(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new w(e,r,n,i,a)}static parse(t,e=!1){return(t=o.exec(t))?new w(t[2]||"",y(t[4]||""),y(t[5]||""),y(t[7]||""),y(t[9]||""),e):new w("","","","","")}static file(t){let e="";var r;return"/"===(t=n?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 w("file",e,t,"","")}static from(t){return u(t=new w(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return f(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof b?t:((e=new w(t))._formatted=t.external,e._fsPath=t._sep===s?t.fsPath:null,e))}}let s=n?1:void 0;class w extends b{static{Ae(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(t=!1){return t?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=s),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 d(e,r,n){let i,a=-1;for(let t=0;t<e.length;t++){var o=e.charCodeAt(t);97<=o&&o<=122||65<=o&&o<=90||48<=o&&o<=57||45===o||46===o||95===o||126===o||r&&47===o||n&&91===o||n&&93===o||n&&58===o?(-1!==a&&(i+=encodeURIComponent(e.substring(a,t)),a=-1),void 0!==i&&(i+=e.charAt(t))):(void 0===i&&(i=e.substr(0,t)),void 0!==(o=l[o])?(-1!==a&&(i+=encodeURIComponent(e.substring(a,t)),a=-1),i+=o):-1===a&&(a=t))}return-1!==a&&(i+=encodeURIComponent(e.substring(a))),void 0!==i?i:e}function p(e){let r;for(let t=0;t<e.length;t++){var n=e.charCodeAt(t);35===n||63===n?(void 0===r&&(r=e.substr(0,t)),r+=l[n]):void 0!==r&&(r+=e[t])}return void 0!==r?r:e}function g(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=n?r.replace(/\//g,"\\"):r}function f(e,t){let r=t?p:d,n="",{scheme:i,authority:a,path:o,query:s,fragment:l}=e;if(i&&(n=n+i+":"),!a&&"file"!==i||(n+="//"),a){let t=a.indexOf("@");-1!==t&&(e=a.substr(0,t),a=a.substr(t+1),-1===(t=e.lastIndexOf(":"))?n+=r(e,!1,!1):n=(n=n+r(e.substr(0,t),!1,!1)+":")+r(e.substr(t+1),!1,!0),n+="@"),a=a.toLowerCase(),-1===(t=a.lastIndexOf(":"))?n+=r(a,!1,!0):n=(n+=r(a.substr(0,t),!1,!0))+a.substr(t)}return o&&(3<=o.length&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)?65<=(e=o.charCodeAt(1))&&e<=90&&(o=`/${String.fromCharCode(e+32)}:`+o.substr(3)):2<=o.length&&58===o.charCodeAt(1)&&65<=(e=o.charCodeAt(0))&&e<=90&&(o=String.fromCharCode(e+32)+":"+o.substr(2)),n+=r(o,!0,!1)),s&&(n=(n+="?")+r(s,!1,!1)),n=l?(n+="#")+(t?l:d(l,!1,!1)):n}function m(t){try{return decodeURIComponent(t)}catch{return 3<t.length?t.substr(0,3)+m(t.substr(3)):t}}Ae(d,"d"),Ae(p,"p"),Ae(g,"m"),Ae(f,"y"),Ae(m,"v");let e=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(t){return t.match(e)?t.replace(e,t=>m(t)):t}Ae(y,"C");var v,x=h(470);let c=x.posix||x;(x=v=v||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},x.resolvePath=function(t,...e){let r=t.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...e));return n&&"/"===i[0]&&!t.authority&&(i=i.substring(1)),t.with({path:i})},x.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})},x.basename=function(t){return c.basename(t.path)},x.extname=function(t){return c.extname(t.path)}}({URI:nst,Utils:ist}=t)}),dst=t(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,n="string"==typeof e?e:e.path,i=r.split("/").filter(t=>0<t.length),a=n.split("/").filter(t=>0<t.length),o=0;for(;o<i.length&&i[o]===a[o];o++);return"../".repeat(i.length-o)+a.slice(o).join("/")}var r;ust(),(r=ast=ast||{}).basename=ist.basename,r.dirname=ist.dirname,r.extname=ist.extname,r.joinPath=ist.joinPath,r.resolvePath=ist.resolvePath,Ae(t,"equals"),r.equals=t,Ae(e,"relative"),r.relative=e}),pst=t(()=>{var t;hst(),pst(),$ot(),GW(),dst(),(t=ost=ost||{})[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",sst=class{static{Ae(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=Fot.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??nst.parse(t.uri),r?this.createAsync(e,t,r):this.create(e,t)}fromString(t,e,r){return r?this.createAsync(e,t,r):this.create(e,t)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e){var r;return"string"==typeof e?(r=this.parse(t,e),this.createLangiumDocument(r,t,void 0,e)):"$model"in e?(r={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(r,t)):(r=this.parse(t,e.getText()),this.createLangiumDocument(r,t,e))}async createAsync(t,e,r){var n;return"string"==typeof e?(n=await this.parseAsync(t,e,r),this.createLangiumDocument(n,t,void 0,e)):(n=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(n,t,e))}createLangiumDocument(e,r,t,n){let i;if(t)i={parseResult:e,uri:r,state:ost.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:ost.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=i}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);return n?Object.defineProperty(t,"textDocument",{value:n}):(n=this.createTextDocumentGetter(t.uri,i),Object.defineProperty(t,"textDocument",{get:n})),r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=ost.Parsed,t}parse(t,e){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,n;return()=>n=n??rst.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},lst=class{static{Ae(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory}get all(){return OW(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){return t=t.toString(),(t=this.documentMap.get(t))&&(t.state=ost.Changed,t.precomputedScopes=void 0,t.references=[],t.diagnostics=void 0),t}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=ost.Changed,this.documentMap.delete(t)),e}}}),gst=t(()=>{$ot(),MW(),bK(),Xot(),pst(),cst=class{static{Ae(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=Fot.CancellationToken.None){for(var r of pK(e.parseResult.value))await Yot(t),fK(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref)try{var n,i=this.getCandidate(t);SW(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)&&(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(t,i)))}catch(e){r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+e})}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(r,n,t,e){let i=this,a={$refNode:t,$refText:e,get ref(){var t;if(EW(this._ref))return this._ref;if(CW(this._nodeDescription)){var e=i.loadAstNode(this._nodeDescription);this._ref=e??i.createLinkingError({reference:a,container:r,property:n},this._nodeDescription)}else if(void 0===this._ref){if((e=i.getLinkedNode({reference:a,container:r,property:n})).error&&cK(r).state<ost.ComputedScopes)return;this._ref=null!=(t=e.node)?t:e.error,this._nodeDescription=e.descr}return EW(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return SW(this._ref)?this._ref:void 0}};return a}getLinkedNode(t){try{var e,r=this.getCandidate(t);return SW(r)?{error:r}:(e=this.loadAstNode(r))?{node:e,descr:r}:{descr:r,error:this.createLinkingError(t,r)}}catch(e){return{error:Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${t.reference.$refText}': `+e})}}}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=cK(t.container)).state<ost.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 fst(t){return"string"==typeof t.name}var mst,yst,vst,xst,bst,wst,kst,Tst,Est,_st,Cst,Sst,Ast,Lst,Nst=t(()=>{BZ(),Ae(fst,"isNamed"),mst=class{static{Ae(this,"DefaultNameProvider")}getName(t){if(fst(t))return t.name}getNameNode(t){return sZ(t.$cstNode,"name")}}}),Ist=t(()=>{BZ(),MW(),bK(),hV(),GW(),dst(),yst=class{static{Ae(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=dZ(t),r=t.astNode;if(e&&r){if(_W(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(_W(n)&&n.$refNode&&n.$refNode.offset<=t.offset&&n.$refNode.end>=t.end)return n.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||jW(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,n=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&n.push(r);let i=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(i=i.filter(t=>ast.equals(t.sourceUri,e.documentUri))),n.push(...i),OW(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=cK(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:WW(r),local:!0}}}}),Mst=t(()=>{GW(),vst=class{static{Ae(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return zW.sum(OW(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 OW(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return OW(this.map.keys())}values(){return OW(this.map.values()).flat()}entriesGroupedByKey(){return OW(this.map.entries())}},xst=class{static{Ae(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)}}}),Rst=t(()=>{$ot(),bK(),Mst(),Xot(),bst=class{static{Ae(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=Fot.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=uK,n=Fot.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await Yot(n),this.exportNode(i,a,e);return a}exportNode(t,e,r){var n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async computeLocalScopes(t,e=Fot.CancellationToken.None){var r,n=t.parseResult.value,i=new vst;for(r of dK(n))await Yot(e),this.processNode(r,t,i);return i}processNode(t,e,r){var n,i=t.$container;i&&(n=this.nameProvider.getName(t))&&r.add(i,this.descriptions.createDescription(t,n,e))}}}),Dst=t(()=>{GW(),wst=class{static{Ae(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)}},kst=class{static{Ae(this,"MapScope")}constructor(t,e,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of t){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}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=OW(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},Tst={getElement(){},getAllElements(){return BW}}}),Ost=t(()=>{Est=class{static{Ae(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")}},_st=class extends Est{static{Ae(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()}},Cst=class extends Est{static{Ae(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}},Sst=class extends Cst{static{Ae(this,"DocumentCache")}constructor(t){super(t=>t.toString()),this.onDispose(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},Ast=class extends _st{static{Ae(this,"WorkspaceCache")}constructor(t){super(),this.onDispose(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),Pst=t(()=>{Dst(),bK(),GW(),Ost(),Lst=class{static{Ae(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 Ast(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=cK(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0<a.length&&r.push(OW(a).filter(t=>this.reflection.isSubtype(t.type,n))),t=t.$container}while(t)}let o=this.getGlobalScope(n,e);for(let t=r.length-1;0<=t;t--)o=this.createScope(r[t],o);return o}createScope(t,e,r){return new wst(OW(t),e,r)}createScopeForNodes(t,e,r){return t=OW(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new wst(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new kst(this.indexManager.allElements(t)))}}});function Bst(t){return"string"==typeof t.$comment}function Fst(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var $st,zst,Gst=t(()=>{ust(),MW(),bK(),BZ(),Ae(Bst,"isAstNodeWithComment"),Ae(Fst,"isIntermediateReference"),$st=class{static{Ae(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,r={}){let n=r?.replacer,i=Ae((t,e)=>this.replacer(t,e,r),"defaultReplacer"),e=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=cK(t),JSON.stringify(t,e,r?.space)}finally{this.currentDocument=void 0}}deserialize(t,e={}){return t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:o,uriConverter:s}){if(!this.ignoreProperties.has(e)){if(_W(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=cK(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=s?s(t.uri,r):t.uri.toString()),s=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+s,$refText:n}}return{$error:null!=(s=null==(l=r.error)?void 0:l.message)?s:"Could not resolve reference",$refText:n}}if(EW(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()),i&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(s=r.$cstNode)?void 0:s.text),o&&(t=t??Object.assign({},r),n=this.commentProvider.getComment(r))&&(t.$comment=n.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=Ae(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(n.$cstNode){let t=n.$textRegion=i(n.$cstNode),r=t.assignments={};return Object.keys(n).filter(t=>!t.startsWith("$")).forEach(t=>{var e=oZ(n.$cstNode,t).map(i);0!==e.length&&(r[t]=e)}),n}}linkNode(e,r,n,t,i,a){for(var[o,s]of Object.entries(e))if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];Fst(l)?s[t]=this.reviveReference(e,o,r,l,n):EW(l)&&this.linkNode(l,r,n,e,o,t)}else Fst(s)?e[o]=this.reviveReference(e,o,r,s,n):EW(s)&&this.linkNode(s,r,n,e,o);var c=e;c.$container=t,c.$containerProperty=i,c.$containerIndex=a}reviveReference(t,e,r,n,i){let a=n.$refText,o=n.$error;if(n.$ref){if(EW(r=this.getRefNode(r,n.$ref,i.uriConverter)))return{$refText:(a=a||this.nameProvider.getName(r))??"",ref:r};o=r}return o?((n={$refText:a??""}).error={container:t,property:e,message:o,reference:n},n):void 0}getRefNode(t,e,r){try{var n,i,a,o,s=e.indexOf("#");return 0===s?this.astNodeLocator.getAstNode(t,e.substring(1))||"Could not resolve path: "+e:s<0?(n=r?r(e):nst.parse(e),(i=this.langiumDocuments.getDocument(n))?i.parseResult.value:"Could not find document for URI: "+e):(a=r?r(e.substring(0,s)):nst.parse(e.substring(0,s)),(o=this.langiumDocuments.getDocument(a))?s===e.length-1?o.parseResult.value:this.astNodeLocator.getAstNode(o.parseResult.value,e.substring(s+1))||"Could not resolve URI: "+e:"Could not find document for URI: "+e)}catch(t){return String(t)}}}}),Ust=t(()=>{dst(),zst=class{static{Ae(this,"DefaultServiceRegistry")}register(t){if(this.singleton||this.map){if(!this.map&&(this.map={},this.singleton)){for(var e of this.singleton.LanguageMetaData.fileExtensions)this.map[e]=this.singleton;this.singleton=void 0}for(var r of t.LanguageMetaData.fileExtensions)void 0!==this.map[r]&&this.map[r]!==t&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${t.LanguageMetaData.languageId}'.`),this.map[r]=t}else this.singleton=t}getServices(t){if(void 0!==this.singleton)return this.singleton;if(void 0===this.map)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=ast.extname(t),e=this.map[t];if(e)return e;throw new Error(`The service registry contains no services for the extension '${t}'.`)}get all(){return void 0!==this.singleton?[this.singleton]:void 0!==this.map?Object.values(this.map):[]}}});function qst(t){return{code:t}}var Yst,jst,Hst=t(()=>{Mst(),Xot(),GW(),Ae(qst,"diagnosticData"),(Yst=Yst||{}).all=["fast","slow","built-in"],jst=class{static{Ae(this,"ValidationRegistry")}constructor(t){this.entries=new vst,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[n,i]of Object.entries(t))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(n,a);else"function"==typeof i&&(i={check:this.wrapValidationException(i,e),category:r},this.addEntry(n,i))}wrapValidationException(t,i){return async(e,r,n)=>{try{await t.call(i,e,r,n)}catch(t){if(qot(t))throw t;console.error("An error occurred during validation:",t),n=t instanceof Error?t.message:String(t),t instanceof Error&&t.stack&&console.error(t.stack),r("error","An error occurred during validation: "+n,{node:e})}}}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=OW(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}}});function Wst(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=sZ(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=hZ(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 Vst(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)}}var Xst,Kst,Zst,Qst,Jst,tlt,elt,rlt,nlt,ilt,alt=t(()=>{var t;$ot(),BZ(),bK(),hV(),Xot(),Hst(),Xst=class{static{Ae(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=Fot.CancellationToken.None){var n=t.parseResult,i=[];if(await Yot(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(n,i,e),!(e.stopAfterLexingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===Kst.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===Kst.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===Kst.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(qot(t))throw t;console.error("An error occurred during validation:",t)}await Yot(r)}return i}processLexingErrors(t,e,r){for(var n of t.lexerErrors)n={severity:Vst("error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:qst(Kst.LexingError),source:this.getSource()},e.push(n)}processParsingErrors(t,e,r){for(var n of t.parserErrors){let t;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,t=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):t=HW(n.token),t&&(a={severity:Vst("error"),range:t,message:n.message,data:qst(Kst.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var n of t.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:Kst.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},e.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(t,r,n=Fot.CancellationToken.None){let i=[],a=Ae((t,e,r)=>{i.push(this.toDiagnostic(t,e,r))},"acceptor");return await Promise.all(pK(t).map(async t=>{var e;await Yot(n);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,a,n)})),i}toDiagnostic(t,e,r){return{message:e,range:Wst(r),severity:Vst(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},Ae(Wst,"getDiagnosticRange"),Ae(Vst,"toDiagnosticSeverity"),(t=Kst=Kst||{}).LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),olt=t(()=>{$ot(),MW(),bK(),hV(),Xot(),dst(),Zst=class{static{Ae(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r=cK(e)){t=t??this.nameProvider.getName(e);var n=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${n} has no name.`);let i,a=Ae(()=>{var t;return i=i??WW(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:WW(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},Qst=class{static{Ae(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=Fot.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of pK(n))await Yot(e),fK(i).filter(t=>!SW(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,n=t.reference.$refNode;if(r&&n)return{sourceUri:e=cK(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:WW(n),local:ast.equals(r.documentUri,e)}}}}),slt=t(()=>{Jst=class{static{Ae(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,n;return t&&0!==e.length?0<(n=e.indexOf(this.indexSeparator))?(r=e.substring(0,n),n=parseInt(e.substring(n+1)),t[r]?.[n]):t[e]:t},t)}}}),llt=t(()=>{Xot(),tlt=class{static{Ae(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Vot,this.settings={},this.workspaceConfig=!1,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(e){e.settings&&Object.keys(e.settings).forEach(t=>{this.updateSectionConfiguration(t,e.settings[t])})}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}}}),clt=t(()=>{function t(t){return{dispose:Ae(async()=>t(),"dispose")}}var e=elt=elt||{};Ae(t,"create"),e.create=t}),hlt=t(()=>{$ot(),clt(),Mst(),Xot(),GW(),Hst(),pst(),rlt=class{static{Ae(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new vst,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=ost.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=Fot.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===ost.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=ost.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(i=t?.result)?void 0:i.validationChecks;e&&0<(i=(null!=(i=r.validation.categories)?i:Yst.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:t.result}),n.state=ost.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=ost.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=Fot.CancellationToken.None){this.currentState=ost.Changed;for(var n of e)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of t){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=ost.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let o=OW(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!o.has(t.uri.toString())&&this.shouldRelink(t,o)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,ost.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Yot(r),t=this.langiumDocuments.all.filter(t=>t.state<ost.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)))}shouldRelink(t,e){return!!t.references.some(t=>void 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),elt.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,ost.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,ost.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,ost.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,ost.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,ost.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,ost.Validated,r,t=>this.validate(t,r));for(n of t){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){var i;for(i of t=t.filter(t=>t.state<e))await Yot(r),await n(i),i.state=e;await this.notifyBuildPhase(t,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),elt.create(()=>{this.buildPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let o;return t&&"path"in t?o=t:a=t,a=a??Fot.CancellationToken.None,o&&(t=this.langiumDocuments.getDocument(o))&&t.state>i?Promise.resolve(o):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Wot):new Promise((e,t)=>{let r=this.onBuildPhase(i,()=>{var t;r.dispose(),n.dispose(),o?(t=this.langiumDocuments.getDocument(o),e(t?.uri)):e(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),t(Wot)})})}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e))await Yot(r),await n(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t).validation,r=await r.validateDocument(t,n="object"==typeof n?n: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=n?.categories)?r:Yst.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:{}}}}),ult=t(()=>{bK(),Ost(),$ot(),GW(),dst(),nlt=class{static{Ae(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new Cst,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=cK(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{ast.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),OW(n)}allElements(e,r){let t=OW(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=Fot.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=Fot.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()))}}}),dlt=t(()=>{$ot(),Xot(),dst(),ilt=class{static{Ae(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Vot,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}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=Fot.CancellationToken.None){t=await this.performStartup(t),await Yot(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],n=Ae(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,n),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,n))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return nst.parse(t.uri)}async traverseFolder(e,t,r,n){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,n):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),n(t)))}))}includeEntry(t,e,r){var n=ast.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=ast.extname(e.uri),r.includes(n)))}}});function plt(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function glt(t){return t&&"modes"in t&&"defaultMode"in t}function flt(t){return!plt(t)&&!glt(t)}var mlt,ylt=t(()=>{Vrt(),mlt=class{static{Ae(this,"DefaultLexer")}constructor(t){t=t.parser.TokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),this.tokenTypes=this.toTokenTypeDictionary(t),t=flt(t)?Object.values(t):t,this.chevrotainLexer=new ZJ(t,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(t){return{tokens:(t=this.chevrotainLexer.tokenize(t)).tokens,errors:t.errors,hidden:null!=(t=t.groups.hidden)?t:[]}}toTokenTypeDictionary(t){if(flt(t))return t;let e=glt(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},Ae(plt,"isTokenTypeArray"),Ae(glt,"isIMultiModeLexerDefinition"),Ae(flt,"isTokenTypeDictionary")});function vlt(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||xit.create(0,0),r=blt(t),e=Mlt(n),_lt({index:0,tokens:wlt({lines:r,position:i,options:e}),position:i})}function xlt(t,e){var r,n,e=Mlt(e);return 0!==(t=blt(t)).length&&(r=t[0],t=t[t.length-1],n=e.start,e=e.end,!!n?.exec(r))&&!!e?.exec(t)}function blt(t){return("string"==typeof t?t:t.text).split(VK)}function wlt(a){var o,s,l,c,h,u,d;let p=[],g=a.position.line,f=a.position.character;for(let i=0;i<a.lines.length;i++){let t=0===i,e=i===a.lines.length-1,r=a.lines[i],n=0;t&&a.options.start?(o=null==(o=a.options.start)?void 0:o.exec(r))&&(n=o.index+o[0].length):(s=null==(o=a.options.line)?void 0:o.exec(r))&&(n=s.index+s[0].length),Tlt(r=(r=e&&(l=null==(s=a.options.end)?void 0:s.exec(r))?r.substring(0,l.index):r).substring(0,Elt(r)),n)>=r.length?0<p.length&&(l=xit.create(g,f),p.push({type:"break",content:"",range:bit.create(l,l)})):(Blt.lastIndex=n,(u=Blt.exec(r))&&(c=u[0],u=u[1],d=xit.create(g,f+n),h=xit.create(g,f+n+c.length),p.push({type:"tag",content:u,range:bit.create(d,h)}),n+=c.length,n=Tlt(r,n)),n<r.length&&(u=r.substring(n),d=Array.from(u.matchAll(Flt)),p.push(...klt(d,u,g,f+n)))),g++,f=0}return 0<p.length&&"break"===p[p.length-1].type?p.slice(0,-1):p}function klt(t,n,i,a){var o=[];if(0===t.length){var e=xit.create(i,a),r=xit.create(i,a+n.length);o.push({type:"text",content:n,range:bit.create(e,r)})}else{let r=0;for(var s of t){var l=s.index,c=n.substring(r,l);0<c.length&&o.push({type:"text",content:n.substring(r,l),range:bit.create(xit.create(i,r+a),xit.create(i,l+a))});let t=c.length+1,e=s[1];o.push({type:"inline-tag",content:e,range:bit.create(xit.create(i,r+t+a),xit.create(i,r+t+e.length+a))}),t+=e.length,4===s.length?(t+=s[2].length,c=s[3],o.push({type:"text",content:c,range:bit.create(xit.create(i,r+t+a),xit.create(i,r+t+c.length+a))})):o.push({type:"text",content:"",range:bit.create(xit.create(i,r+t+a),xit.create(i,r+t+a))}),r=l+s[0].length}0<(e=n.substring(r)).length&&o.push({type:"text",content:e,range:bit.create(xit.create(i,r+a),xit.create(i,r+a+e.length))})}return o}function Tlt(t,e){var r=t.substring(e).match($lt);return r?e+r.index:t.length}function Elt(t){if((t=t.match(zlt))&&"number"==typeof t.index)return t.index}function _lt(t){var e=xit.create(t.position.line,t.position.character);if(0===t.tokens.length)return new Glt([],bit.create(e,e));for(var r=[];t.index<t.tokens.length;){var n=Clt(t,r[r.length-1]);n&&r.push(n)}var i=null!=(i=null==(i=r[0])?void 0:i.range.start)?i:e,a=null!=(a=null==(a=r[r.length-1])?void 0:a.range.end)?a:e;return new Glt(r,bit.create(i,a))}function Clt(t,e){var r=t.tokens[t.index];return"tag"===r.type?Nlt(t,!1):"text"===r.type||"inline-tag"===r.type?Alt(t):(Slt(r,e),void t.index++)}function Slt(t,e){e&&(t=new Ylt("",t.range),("inlines"in e?e:e.content).inlines.push(t))}function Alt(t){let e=t.tokens[t.index],r=e,n=e,i=[];for(;e&&"break"!==e.type&&"tag"!==e.type;)i.push(Llt(t)),n=e,e=t.tokens[t.index];return new qlt(i,bit.create(r.range.start,n.range.end))}function Llt(t){return"inline-tag"===t.tokens[t.index].type?Nlt(t,!0):Ilt(t)}function Nlt(t,e){var r,n=t.tokens[t.index++],i=n.content.substring(1);return"text"===t.tokens[t.index]?.type?e?(r=Ilt(t),new Ult(i,new qlt([r],r.range),e,bit.create(n.range.start,r.range.end))):(r=Alt(t),new Ult(i,r,e,bit.create(n.range.start,r.range.end))):(t=n.range,new Ult(i,new qlt([],t),e,t))}function Ilt(t){return t=t.tokens[t.index++],new Ylt(t.content,t.range)}function Mlt(t){var e,r;return t?({start:t,end:e,line:r}=t,{start:Rlt(t,!0),end:Rlt(e,!1),line:Rlt(r,!0)}):Mlt({start:"/**",end:"*/",line:"*"})}function Rlt(t,e){var r;return"string"==typeof t||"object"==typeof t?(r="string"==typeof t?YK(t):t.source,e?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):t}function Dlt(r,n,i){var a;if("linkplain"===r||"linkcode"===r||"link"===r){let t=n.indexOf(" "),e=n;return 0<t&&(a=Tlt(n,t),e=n.substring(a),n=n.substring(0,t)),("linkcode"===r||"link"===r&&"code"===i.link)&&(e=`\`${e}\``),null!=(r=null==(a=i.renderLink)?void 0:a.call(i,n,e))?r:Olt(n,e)}}function Olt(t,e){try{return nst.parse(t,!0),`[${e}](${t})`}catch{return t}}function Plt(t){return t.endsWith(`
|
|
|
`)?`
|
|
|
`:`
|
|
|
|
|
|
`}var Blt,Flt,$lt,zlt,Glt,Ult,qlt,Ylt,jlt,Hlt,Wlt,Vlt,Xlt,Klt,Zlt,Qlt=t(()=>{Wat(),QK(),dst(),Ae(vlt,"parseJSDoc"),Ae(xlt,"isJSDoc"),Ae(blt,"getLines"),Blt=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Flt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,Ae(wlt,"tokenize"),Ae(klt,"buildInlineTokens"),$lt=/\S/,zlt=/\s*$/,Ae(Tlt,"skipWhitespace"),Ae(Elt,"lastCharacter"),Ae(_lt,"parseJSDocComment"),Ae(Clt,"parseJSDocElement"),Ae(Slt,"appendEmptyLine"),Ae(Alt,"parseJSDocText"),Ae(Llt,"parseJSDocInline"),Ae(Nlt,"parseJSDocTag"),Ae(Ilt,"parseJSDocLine"),Ae(Mlt,"normalizeOptions"),Ae(Rlt,"normalizeOption"),Glt=class{static{Ae(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Plt(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Plt(e)+r);return e.trim()}},Ult=class{static{Ae(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1<this.content.inlines.length&&(t=t+`
|
|
|
`+e),this.inline?`{${t}}`:t}toMarkdown(t){var e;return null!=(e=null==(e=t?.renderTag)?void 0:e.call(t,this))?e:this.toMarkdownDefault(t)}toMarkdownDefault(t){var e=this.content.toMarkdown(t);if(this.inline){var r=Dlt(this.name,e,t??{});if("string"==typeof r)return r}let n="",i=("italic"===t?.tag||void 0===t?.tag?n="*":"bold"===t?.tag?n="**":"bold-italic"===t?.tag&&(n="***"),n+"@"+this.name+n);return 1===this.content.inlines.length?i=i+" — "+e:1<this.content.inlines.length&&(i=i+`
|
|
|
`+e),this.inline?`{${i}}`:i}},Ae(Dlt,"renderInlineTag"),Ae(Olt,"renderLinkDefault"),qlt=class{static{Ae(this,"JSDocTextImpl")}constructor(t,e){this.inlines=t,this.range=e}toString(){let e="";for(let t=0;t<this.inlines.length;t++){var r=this.inlines[t],n=this.inlines[t+1];e+=r.toString(),n&&n.range.start.line>r.range.start.line&&(e+=`
|
|
|
`)}return e}toMarkdown(e){let r="";for(let t=0;t<this.inlines.length;t++){var n=this.inlines[t],i=this.inlines[t+1];r+=n.toMarkdown(e),i&&i.range.start.line>n.range.start.line&&(r+=`
|
|
|
`)}return r}},Ylt=class{static{Ae(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},Ae(Plt,"fillNewlines")}),Jlt=t(()=>{bK(),Qlt(),jlt=class{static{Ae(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&xlt(t))return vlt(t).toMarkdown({renderLink:Ae((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:Ae(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var n=null!=(n=this.findNameInPrecomputedScopes(t,e))?n:this.findNameInGlobalScope(t,e);return n&&n.nameSegment?(t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var n=cK(e).precomputedScopes;if(n){let t=e;do{var i=n.get(t).find(t=>t.name===r);if(i)return i}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),tct=t(()=>{Gst(),hV(),Hlt=class{static{Ae(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Bst(t)?t.$comment:null==(t=ZW(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),ect={},rct=t(()=>{et(ect,rt(Pot(),1))}),nct=t(()=>{Xot(),rct(),Wlt=class{static{Ae(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t){return Promise.resolve(this.syncParser.parse(t))}},Vlt=class{static{Ae(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{var t;0<this.queue.length&&(t=this.queue.shift())&&(e.lock(),t.resolve(e))}),this.workerPool.push(e)}}async parse(t,e){let r=await this.acquireParserWorker(e),n=new Vot,i,a=e.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),n.resolve(t)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new Vot;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Wot)}),this.queue.push(r),r.promise}},Xlt=class{static{Ae(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new ect.Emitter,this.deferred=new Vot,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Wot),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Vot,this.sendMessage(t),this.deferred.promise}}}),ict=t(()=>{$ot(),Xot(),Klt=class{static{Ae(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Fot.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=new Fot.CancellationTokenSource;return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r){var n=new Vot,e={action:e,deferred:n,cancellationToken:r??Fot.CancellationToken.None};return t.push(e),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0<this.writeQueue.length)t.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))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 n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){qot(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),act=t(()=>{Vat(),iK(),MW(),bK(),Mst(),hV(),Zlt=class{static{Ae(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new xst,this.tokenTypeIdMap=new xst,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors.map(t=>Object.assign({},t)),parserErrors:t.parserErrors.map(t=>Object.assign({},t)),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}createDehyrationContext(t){var e,r=new Map,n=new Map;for(e of pK(t))r.set(e,{});if(t.$cstNode)for(var i of qW(t.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(i.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,o=[];i[r]=o;for(a of n)EW(a)?o.push(this.dehydrateAstNode(a,e)):_W(a)?o.push(this.dehydrateReference(a,e)):o.push(a)}else EW(n)?i[r]=this.dehydrateAstNode(n,e):_W(n)?i[r]=this.dehydrateReference(n,e):void 0!==n&&(i[r]=n);return i}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 NW(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),AW(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):LW(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,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,n=new Map;for(e of pK(t))r.set(e,{});let i;if(t.$cstNode)for(var a of qW(t.$cstNode)){let t;"fullText"in a?(t=new Yat(a.fullText),i=t):"content"in a?t=new Uat:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(n.set(a,t),t.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode&&(i.$cstNode=e.cstNodes.get(t.$cstNode));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,o=[];i[r]=o;for(a of n)EW(a)?o.push(this.setParent(this.hydrateAstNode(a,e),i)):_W(a)?o.push(this.hydrateReference(a,i,r,e)):o.push(a)}else EW(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):_W(n)?i[r]=this.hydrateReference(n,i,r,e):void 0!==n&&(i[r]=n);return i}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),AW(n))for(var i of t.content)i=this.hydrateCstNode(i,e,r++),n.content.push(i);return n}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset,n=t.length,i=t.startLine,a=t.startColumn,o=t.endLine,s=t.endColumn,t=t.hidden;return new Gat(r,n,{start:{line:i,character:a},end:{line:o,character:s}},e,t)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();var e=this.grammarElementIdMap.getKey(t);if(e)return e;throw new Error("Invalid grammar element id: "+t)}createGrammarElementIdMap(){let t=0;for(var e of pK(this.grammar))kV(e)&&this.grammarElementIdMap.set(e,t++)}}});function oct(t){return{documentation:{CommentProvider:Ae(t=>new Hlt(t),"CommentProvider"),DocumentationProvider:Ae(t=>new jlt(t),"DocumentationProvider")},parser:{AsyncParser:Ae(t=>new Wlt(t),"AsyncParser"),GrammarConfig:Ae(t=>FZ(t),"GrammarConfig"),LangiumParser:Ae(t=>Cot(t),"LangiumParser"),CompletionParser:Ae(t=>Eot(t),"CompletionParser"),ValueConverter:Ae(()=>new Lot,"ValueConverter"),TokenBuilder:Ae(()=>new Aot,"TokenBuilder"),Lexer:Ae(t=>new mlt(t),"Lexer"),ParserErrorMessageProvider:Ae(()=>new eot,"ParserErrorMessageProvider")},workspace:{AstNodeLocator:Ae(()=>new Jst,"AstNodeLocator"),AstNodeDescriptionProvider:Ae(t=>new Zst(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Ae(t=>new Qst(t),"ReferenceDescriptionProvider")},references:{Linker:Ae(t=>new cst(t),"Linker"),NameProvider:Ae(()=>new mst,"NameProvider"),ScopeProvider:Ae(t=>new Lst(t),"ScopeProvider"),ScopeComputation:Ae(t=>new bst(t),"ScopeComputation"),References:Ae(t=>new yst(t),"References")},serializer:{Hydrator:Ae(t=>new Zlt(t),"Hydrator"),JsonSerializer:Ae(t=>new $st(t),"JsonSerializer")},validation:{DocumentValidator:Ae(t=>new Xst(t),"DocumentValidator"),ValidationRegistry:Ae(t=>new jst(t),"ValidationRegistry")},shared:Ae(()=>t.shared,"shared")}}function sct(e){return{ServiceRegistry:Ae(()=>new zst,"ServiceRegistry"),workspace:{LangiumDocuments:Ae(t=>new lst(t),"LangiumDocuments"),LangiumDocumentFactory:Ae(t=>new sst(t),"LangiumDocumentFactory"),DocumentBuilder:Ae(t=>new rlt(t),"DocumentBuilder"),IndexManager:Ae(t=>new nlt(t),"IndexManager"),WorkspaceManager:Ae(t=>new ilt(t),"WorkspaceManager"),FileSystemProvider:Ae(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Ae(()=>new Klt,"WorkspaceLock"),ConfigurationProvider:Ae(t=>new tlt(t),"ConfigurationProvider")}}}var lct=t(()=>{$Z(),_ot(),Iot(),Mot(),Rot(),gst(),Nst(),Ist(),Rst(),Pst(),Gst(),Ust(),alt(),Hst(),olt(),slt(),llt(),hlt(),pst(),ult(),dlt(),ylt(),Jlt(),tct(),aot(),nct(),ict(),act(),Ae(oct,"createDefaultCoreModule"),Ae(sct,"createDefaultSharedCoreModule")});function cct(t,e,r,n,i,a,o,s,l){return uct([t,e,r,n,i,a,o,s,l].reduce(pct,{}))}function hct(t){if(t&&t[fct])for(var e of Object.values(t))hct(e);return t}function uct(r,n){let i=new Proxy({},{deleteProperty:Ae(()=>!1,"deleteProperty"),get:Ae((t,e)=>dct(t,e,r,n||i),"get"),getOwnPropertyDescriptor:Ae((t,e)=>(dct(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:Ae((t,e)=>e in r,"has"),ownKeys:Ae(()=>[...Reflect.ownKeys(r),fct],"ownKeys")});return i[fct]=!0,i}function dct(t,e,r,n){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]===mct)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=mct;try{t[e]="function"==typeof r?r(n):uct(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function pct(t,e){if(e)for(var[r,n]of Object.entries(e)){var i;void 0!==n&&(null!==(i=t[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?t[r]=pct(i,n):t[r]=n)}return t}var gct,fct,mct,yct,vct,xct=t(()=>{(gct=gct||{}).merge=(t,e)=>pct(pct({},t),e),Ae(cct,"inject"),fct=Symbol("isProxy"),Ae(hct,"eagerLoad"),Ae(uct,"_inject"),mct=Symbol(),Ae(dct,"_resolve"),Ae(pct,"_merge")}),bct=t(()=>{}),wct=t(()=>{tct(),Jlt(),Qlt()}),kct=t(()=>{}),Tct=t(()=>{$Z(),kct()}),Ect=t(()=>{}),_ct=t(()=>{nct(),_ot(),Vat(),Iot(),aot(),ylt(),Ect(),Mot(),Rot()}),Cct=t(()=>{gst(),Nst(),Ist(),Dst(),Rst(),Pst()}),Sct=t(()=>{act(),Gst()}),Act=t(()=>{yct=class{static{Ae(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},vct={fileSystemProvider:Ae(()=>new yct,"fileSystemProvider")}});function Lct(){var t=cct(sct(vct),Mct),e=cct(oct({shared:t}),Ict);return t.ServiceRegistry.register(e),e}function Nct(t){var e=Lct(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,nst.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Ict,Mct,Rct=t(()=>{lct(),xct(),iK(),Act(),dst(),Ict={Grammar:Ae(()=>{},"Grammar"),LanguageMetaData:Ae(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Mct={AstReflection:Ae(()=>new rK,"AstReflection")},Ae(Lct,"createMinimalGrammarServices"),Ae(Nct,"loadGrammarFromJson")}),Dct={},Oct=(J(Dct,{AstUtils:()=>aK,BiMap:()=>xst,Cancellation:()=>Fot,ContextCache:()=>Cst,CstUtils:()=>UW,DONE_RESULT:()=>FW,Deferred:()=>Vot,Disposable:()=>elt,DisposableCache:()=>Est,DocumentCache:()=>Sst,EMPTY_STREAM:()=>BW,ErrorWithLocation:()=>dV,GrammarUtils:()=>JK,MultiMap:()=>vst,OperationCancelled:()=>Wot,Reduction:()=>zW,RegExpUtils:()=>zK,SimpleCache:()=>_st,StreamImpl:()=>PW,TreeStreamImpl:()=>$W,URI:()=>nst,UriUtils:()=>ast,WorkspaceCache:()=>Ast,assertUnreachable:()=>uV,delayNextTick:()=>zot,interruptAndCheck:()=>Yot,isOperationCancelled:()=>qot,loadGrammarFromJson:()=>Nct,setInterruptionPeriod:()=>Uot,startCancelableOperation:()=>Got,stream:()=>OW}),t(()=>{Ost(),rct(),et(Dct,ect),Mst(),clt(),pV(),Rct(),Xot(),GW(),dst(),bK(),$ot(),hV(),BZ(),QK()})),Pct=t(()=>{alt(),Hst()}),Bct=t(()=>{olt(),slt(),llt(),hlt(),pst(),Act(),ult(),ict(),dlt()}),Fct={},$ct=(J(Fct,{AbstractAstReflection:()=>IW,AbstractCstNode:()=>zat,AbstractLangiumParser:()=>Qat,AbstractParserErrorMessageProvider:()=>tot,AbstractThreadedAsyncParser:()=>Vlt,AstUtils:()=>aK,BiMap:()=>xst,Cancellation:()=>Fot,CompositeCstNodeImpl:()=>Uat,ContextCache:()=>Cst,CstNodeBuilder:()=>$at,CstUtils:()=>UW,DONE_RESULT:()=>FW,DatatypeSymbol:()=>Kat,DefaultAstNodeDescriptionProvider:()=>Zst,DefaultAstNodeLocator:()=>Jst,DefaultAsyncParser:()=>Wlt,DefaultCommentProvider:()=>Hlt,DefaultConfigurationProvider:()=>tlt,DefaultDocumentBuilder:()=>rlt,DefaultDocumentValidator:()=>Xst,DefaultHydrator:()=>Zlt,DefaultIndexManager:()=>nlt,DefaultJsonSerializer:()=>$st,DefaultLangiumDocumentFactory:()=>sst,DefaultLangiumDocuments:()=>lst,DefaultLexer:()=>mlt,DefaultLinker:()=>cst,DefaultNameProvider:()=>mst,DefaultReferenceDescriptionProvider:()=>Qst,DefaultReferences:()=>yst,DefaultScopeComputation:()=>bst,DefaultScopeProvider:()=>Lst,DefaultServiceRegistry:()=>zst,DefaultTokenBuilder:()=>Aot,DefaultValueConverter:()=>Lot,DefaultWorkspaceLock:()=>Klt,DefaultWorkspaceManager:()=>ilt,Deferred:()=>Vot,Disposable:()=>elt,DisposableCache:()=>Est,DocumentCache:()=>Sst,DocumentState:()=>ost,DocumentValidator:()=>Kst,EMPTY_SCOPE:()=>Tst,EMPTY_STREAM:()=>BW,EmptyFileSystem:()=>vct,EmptyFileSystemProvider:()=>yct,ErrorWithLocation:()=>dV,GrammarAST:()=>gV,GrammarUtils:()=>JK,JSDocDocumentationProvider:()=>jlt,LangiumCompletionParser:()=>rot,LangiumParser:()=>Jat,LangiumParserErrorMessageProvider:()=>eot,LeafCstNodeImpl:()=>Gat,MapScope:()=>kst,Module:()=>gct,MultiMap:()=>vst,OperationCancelled:()=>Wot,ParserWorker:()=>Xlt,Reduction:()=>zW,RegExpUtils:()=>zK,RootCstNodeImpl:()=>Yat,SimpleCache:()=>_st,StreamImpl:()=>PW,StreamScope:()=>wst,TextDocument:()=>rst,TreeStreamImpl:()=>$W,URI:()=>nst,UriUtils:()=>ast,ValidationCategory:()=>Yst,ValidationRegistry:()=>jst,ValueConverter:()=>Not,WorkspaceCache:()=>Ast,assertUnreachable:()=>uV,createCompletionParser:()=>Eot,createDefaultCoreModule:()=>oct,createDefaultSharedCoreModule:()=>sct,createGrammarConfig:()=>FZ,createLangiumParser:()=>Cot,delayNextTick:()=>zot,diagnosticData:()=>qst,eagerLoad:()=>hct,getDiagnosticRange:()=>Wst,inject:()=>cct,interruptAndCheck:()=>Yot,isAstNode:()=>EW,isAstNodeDescription:()=>CW,isAstNodeWithComment:()=>Bst,isCompositeCstNode:()=>AW,isIMultiModeLexerDefinition:()=>glt,isJSDoc:()=>xlt,isLeafCstNode:()=>LW,isLinkingError:()=>SW,isNamed:()=>fst,isOperationCancelled:()=>qot,isReference:()=>_W,isRootCstNode:()=>NW,isTokenTypeArray:()=>plt,isTokenTypeDictionary:()=>flt,loadGrammarFromJson:()=>Nct,parseJSDoc:()=>vlt,prepareLangiumParser:()=>Sot,setInterruptionPeriod:()=>Uot,startCancelableOperation:()=>Got,stream:()=>OW,toDiagnosticSeverity:()=>Vst}),t(()=>{lct(),xct(),Ust(),bct(),MW(),wct(),Tct(),_ct(),Cct(),Sct(),Oct(),et(Fct,Dct),Pct(),Bct(),iK()}));function zct(t){return tht.isInstance(t,"Architecture")}function Gct(t){return tht.isInstance(t,"Branch")}function Uct(t){return tht.isInstance(t,"Commit")}function qct(t){return tht.isInstance(t,"Common")}function Yct(t){return tht.isInstance(t,"GitGraph")}function jct(t){return tht.isInstance(t,"Info")}function Hct(t){return tht.isInstance(t,"Merge")}function Wct(t){return tht.isInstance(t,"Packet")}function Vct(t){return tht.isInstance(t,"PacketBlock")}function Xct(t){return tht.isInstance(t,"Pie")}function Kct(t){return tht.isInstance(t,"PieSection")}var Zct,Qct,Jct,tht,eht,rht,nht,iht,aht,oht,sht,lht,cht,hht,uht,dht,pht,ght,fht,mht,yht,vht,xht,bht,wht,kht,Tht,Eht,_ht,Cht=t(()=>{$ct(),$ct(),$ct(),$ct(),Zct=Object.defineProperty,Qct=Ae((t,e)=>Zct(t,"name",{value:e,configurable:!0}),"__name"),Ae(zct,"isArchitecture"),Qct(zct,"isArchitecture"),Ae(Gct,"isBranch"),Qct(Gct,"isBranch"),Ae(Uct,"isCommit"),Qct(Uct,"isCommit"),Ae(qct,"isCommon"),Qct(qct,"isCommon"),Ae(Yct,"isGitGraph"),Qct(Yct,"isGitGraph"),Ae(jct,"isInfo"),Qct(jct,"isInfo"),Ae(Hct,"isMerge"),Qct(Hct,"isMerge"),Ae(Wct,"isPacket"),Qct(Wct,"isPacket"),Ae(Vct,"isPacketBlock"),Qct(Vct,"isPacketBlock"),Ae(Xct,"isPie"),Qct(Xct,"isPie"),Ae(Kct,"isPieSection"),Qct(Kct,"isPieSection"),Jct=class extends IW{static{Ae(this,"MermaidAstReflection")}static{Qct(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(t,e){switch(t){case"Branch":case"Checkout":case"CherryPicking":case"Commit":case"Merge":return this.isSubtype("Statement",e);case"Direction":return this.isSubtype("GitGraph",e);default:return!1}}getReferenceType(t){throw t=t.container.$type+":"+t.property,new Error(t+" is not a valid reference id.")}getTypeMetaData(t){switch(t){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};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"GitGraph":return{name:"GitGraph",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"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",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"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},tht=new Jct,rht=Qct(()=>eht=eht??Nct('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"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","name":"TitleAndAccessibilities","fragment":true,"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","name":"EOL","fragment":true,"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"),iht=Qct(()=>nht=nht??Nct(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"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","name":"TitleAndAccessibilities","fragment":true,"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","name":"EOL","fragment":true,"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"),oht=Qct(()=>aht=aht??Nct('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"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","name":"TitleAndAccessibilities","fragment":true,"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","name":"EOL","fragment":true,"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"),lht=Qct(()=>sht=sht??Nct('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"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","name":"Statement","fragment":true,"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","name":"LeftPort","fragment":true,"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","name":"RightPort","fragment":true,"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","name":"Arrow","fragment":true,"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","name":"TitleAndAccessibilities","fragment":true,"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","name":"EOL","fragment":true,"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"),hht=Qct(()=>cht=cht??Nct(`{"$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","name":"TitleAndAccessibilities","fragment":true,"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","name":"EOL","fragment":true,"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","name":"GitGraph","entry":true,"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"),fht={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(ght={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(pht={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(dht={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(uht={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1})})})})},mht={AstReflection:Qct(()=>new Jct,"AstReflection")},yht={Grammar:Qct(()=>rht(),"Grammar"),LanguageMetaData:Qct(()=>uht,"LanguageMetaData"),parser:{}},vht={Grammar:Qct(()=>iht(),"Grammar"),LanguageMetaData:Qct(()=>dht,"LanguageMetaData"),parser:{}},xht={Grammar:Qct(()=>oht(),"Grammar"),LanguageMetaData:Qct(()=>pht,"LanguageMetaData"),parser:{}},bht={Grammar:Qct(()=>lht(),"Grammar"),LanguageMetaData:Qct(()=>ght,"LanguageMetaData"),parser:{}},wht={Grammar:Qct(()=>hht(),"Grammar"),LanguageMetaData:Qct(()=>fht,"LanguageMetaData"),parser:{}},kht={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Tht=class extends Lot{static{Ae(this,"AbstractMermaidValueConverter")}static{Qct(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var n=this.runCommonConverter(t,e,r);return void 0===(n=void 0===n?this.runCustomConverter(t,e,r):n)?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){return void 0!==(t=kht[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}},Eht=class extends Tht{static{Ae(this,"CommonValueConverter")}static{Qct(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},class extends(_ht=class extends Aot{static{Ae(this,"AbstractMermaidTokenBuilder")}static{Qct(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}}){static{Ae(this,"CommonTokenBuilder")}static{Qct(this,"CommonTokenBuilder")}}});function Sht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),wht,Lht);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var Aht,Lht,Nht=t(()=>{Cht(),$ct(),Aht=class extends _ht{static{Ae(this,"GitGraphTokenBuilder")}static{Qct(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},Lht={parser:{TokenBuilder:Qct(()=>new Aht,"TokenBuilder"),ValueConverter:Qct(()=>new Eht,"ValueConverter")}},Ae(Sht,"createGitGraphServices"),Qct(Sht,"createGitGraphServices")});function Iht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),yht,Rht);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var Mht,Rht,Dht=t(()=>{Cht(),$ct(),Mht=class extends _ht{static{Ae(this,"InfoTokenBuilder")}static{Qct(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Rht={parser:{TokenBuilder:Qct(()=>new Mht,"TokenBuilder"),ValueConverter:Qct(()=>new Eht,"ValueConverter")}},Ae(Iht,"createInfoServices"),Qct(Iht,"createInfoServices")});function Oht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),vht,Bht);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var Pht,Bht,Fht=t(()=>{Cht(),$ct(),Pht=class extends _ht{static{Ae(this,"PacketTokenBuilder")}static{Qct(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},Bht={parser:{TokenBuilder:Qct(()=>new Pht,"TokenBuilder"),ValueConverter:Qct(()=>new Eht,"ValueConverter")}},Ae(Oht,"createPacketServices"),Qct(Oht,"createPacketServices")});function $ht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),xht,Uht);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var zht,Ght,Uht,qht=t(()=>{Cht(),$ct(),zht=class extends _ht{static{Ae(this,"PieTokenBuilder")}static{Qct(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Ght=class extends Tht{static{Ae(this,"PieValueConverter")}static{Qct(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},Uht={parser:{TokenBuilder:Qct(()=>new zht,"TokenBuilder"),ValueConverter:Qct(()=>new Ght,"ValueConverter")}},Ae($ht,"createPieServices"),Qct($ht,"createPieServices")});function Yht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),bht,Wht);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var jht,Hht,Wht,Vht=t(()=>{Cht(),$ct(),jht=class extends _ht{static{Ae(this,"ArchitectureTokenBuilder")}static{Qct(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Hht=class extends Tht{static{Ae(this,"ArchitectureValueConverter")}static{Qct(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},Wht={parser:{TokenBuilder:Qct(()=>new jht,"TokenBuilder"),ValueConverter:Qct(()=>new Hht,"ValueConverter")}},Ae(Yht,"createArchitectureServices"),Qct(Yht,"createArchitectureServices")}),Xht={},Kht=(J(Xht,{InfoModule:()=>Rht,createInfoServices:()=>Iht}),t(()=>{Dht(),Cht()})),Zht={},Qht=(J(Zht,{PacketModule:()=>Bht,createPacketServices:()=>Oht}),t(()=>{Fht(),Cht()})),Jht={},tut=(J(Jht,{PieModule:()=>Uht,createPieServices:()=>$ht}),t(()=>{qht(),Cht()})),eut={},rut=(J(eut,{ArchitectureModule:()=>Wht,createArchitectureServices:()=>Yht}),t(()=>{Vht(),Cht()})),nut={},iut=(J(nut,{GitGraphModule:()=>Lht,createGitGraphServices:()=>Sht}),t(()=>{Nht(),Cht()}));async function aut(t,e){var r=sut[t];if(!r)throw new Error("Unknown diagram type: "+t);if(out[t]||await r(),0<(r=out[t].parse(e)).lexerErrors.length||0<r.parserErrors.length)throw new lut(r);return r.value}var out,sut,lut,cut=t(()=>{Nht(),Dht(),Fht(),qht(),Vht(),Cht(),out={},sut={info:Qct(async()=>{var t=(t=(await Promise.resolve().then(()=>(Kht(),Xht))).createInfoServices)().Info.parser.LangiumParser;out.info=t},"info"),packet:Qct(async()=>{var t=(t=(await Promise.resolve().then(()=>(Qht(),Zht))).createPacketServices)().Packet.parser.LangiumParser;out.packet=t},"packet"),pie:Qct(async()=>{var t=(t=(await Promise.resolve().then(()=>(tut(),Jht))).createPieServices)().Pie.parser.LangiumParser;out.pie=t},"pie"),architecture:Qct(async()=>{var t=(t=(await Promise.resolve().then(()=>(rut(),eut))).createArchitectureServices)().Architecture.parser.LangiumParser;out.architecture=t},"architecture"),gitGraph:Qct(async()=>{var t=(t=(await Promise.resolve().then(()=>(iut(),nut))).createGitGraphServices)().GitGraph.parser.LangiumParser;out.gitGraph=t},"gitGraph")},Ae(aut,"parse"),Qct(aut,"parse"),lut=class extends Error{static{Ae(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{Qct(this,"MermaidParseError")}}});function hut(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var uut,dut,put=t(()=>{Ae(hut,"populateCommonDb")}),gut=t(()=>{uut={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),fut=t(()=>{dut=class{constructor(t){this.init=t,this.records=this.init()}static{Ae(this,"ImperativeState")}reset(){this.records=this.init()}}});function mut(){return O8({length:7})}function yut(t,n){let i=Object.create(null);return t.reduce((t,e)=>{var r=n(e);return i[r]||(i[r]=!0,t.push(e)),t},[])}function vut(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function xut(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var n,i=[r,e.id,e.seq];for(n in w.records.branches)w.records.branches.get(n)===e.id&&i.push(n);if(R.debug(i.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=w.records.commits.get(e.parents[0]);vut(t,e,a),e.parents[1]&&t.push(w.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=w.records.commits.get(e.parents[0]),vut(t,e,a))}xut(t=yut(t,t=>t.id))}var but,wut,w,kut,Tut,Eut,_ut,Cut,Sut,Aut,Lut,Nut,Iut,Mut,Rut,Dut,Out,Put,But,Fut,$ut,zut,Gut,Uut,qut,Yut,jut,Hut,Wut,Vut,Xut,Kut,Zut,Qut,Jut,tdt,edt,rdt,ndt,idt,adt,odt,sdt,ldt,cdt,hdt,udt,ddt,pdt,gdt,fdt,mdt,ydt,vdt,xdt,bdt,wdt,kdt,Tdt,Edt,_dt,Cdt,Sdt=t(()=>{e(),K8(),Mn(),tc(),fh(),gut(),fut(),Nn(),but=xr.gitGraph,wut=Ae(()=>b8({...but,...Rr().gitGraph}),"getConfig"),w=new dut(()=>{var t=(e=wut()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),Ae(mut,"getID"),Ae(yut,"uniqBy"),kut=Ae(function(t){w.records.direction=t},"setDirection"),Tut=Ae(function(t){R.debug("options str",t),t=t?.trim()||"{}";try{w.records.options=JSON.parse(t)}catch(t){R.error("error while parsing gitGraph options",t.message)}},"setOptions"),Eut=Ae(function(){return w.records.options},"getOptions"),_ut=Ae(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags,a=(R.info("commit",e,r,n,i),R.debug("Entering commit:",e,r,n,i),wut());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||w.records.seq+"-"+mut(),message:e,seq:w.records.seq++,type:n??uut.NORMAL,tags:i??[],parents:null==w.records.head?[]:[w.records.head.id],branch:w.records.currBranch},w.records.head=t,R.info("main branch",a.mainBranchName),w.records.commits.set(t.id,t),w.records.branches.set(w.records.currBranch,t.id),R.debug("in pushCommit "+t.id)},"commit"),Cut=Ae(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,wut());if(w.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);w.records.branches.set(e,null!=w.records.head?w.records.head.id:null),w.records.branchConfig.set(e,{name:e,order:t}),Lut(e),R.debug("in createBranch")},"branch"),Sut=Ae(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=wut(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=w.records.branches.get(w.records.currBranch),a=w.records.branches.get(e),t=t?w.records.commits.get(t):void 0,o=a?w.records.commits.get(a):void 0;if(t&&o&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(w.records.currBranch===e)throw(s=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},s;if(void 0===t||!t)throw(s=new Error(`Incorrect usage of "merge". Current branch (${w.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},s;if(!w.records.branches.has(e))throw(s=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},s;if(void 0===o||!o)throw(s=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},s;if(t===o)throw(s=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},s;if(r&&w.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} ${n} `+i?.join(" "),token:`merge ${e} ${r} ${n} `+i?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${n} `+i?.join(" ")]},t;var o=a||"",s={id:r||w.records.seq+"-"+mut(),message:`merged branch ${e} into `+w.records.currBranch,seq:w.records.seq++,parents:null==w.records.head?[]:[w.records.head.id,o],branch:w.records.currBranch,type:uut.MERGE,customType:n,customId:!!r,tags:i??[]};w.records.head=s,w.records.commits.set(s.id,s),w.records.branches.set(w.records.currBranch,s.id),R.debug(w.records.branches),R.debug("in mergeBranch")},"merge"),Aut=Ae(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(R.debug("Entering cherryPick:",e,r,n),wut());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),n=n?.map(t=>L.sanitizeText(t,a)),i=L.sanitizeText(i,a),!e||!w.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=w.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(t.parents)||!t.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var o=t.branch;if(t.type===uut.MERGE&&!i)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||!w.records.commits.has(r)){if(o===w.records.currBranch)throw(o=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"]},o;if(void 0===(o=w.records.branches.get(w.records.currBranch))||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${w.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;var s=w.records.commits.get(o);if(void 0===s||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${w.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},o;s={id:w.records.seq+"-"+mut(),message:`cherry-picked ${t?.message} into `+w.records.currBranch,seq:w.records.seq++,parents:null==w.records.head?[]:[w.records.head.id,t.id],branch:w.records.currBranch,type:uut.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===uut.MERGE?"|parent:"+i:"")]},w.records.head=s,w.records.commits.set(s.id,s),w.records.branches.set(w.records.currBranch,s.id),R.debug(w.records.branches),R.debug("in cherryPick")}},"cherryPick"),Lut=Ae(function(t){var e;if(t=L.sanitizeText(t,wut()),!w.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;w.records.currBranch=t,e=w.records.branches.get(w.records.currBranch),w.records.head=void 0!==e&&e?w.records.commits.get(e)??null:null},"checkout"),Ae(vut,"upsert"),Ae(xut,"prettyPrintCommitHistory"),Nut=Ae(function(){R.debug(w.records.commits),xut([Out()[0]])},"prettyPrint"),Iut=Ae(function(){w.reset(),lc()},"clear"),Mut=Ae(function(){return[...w.records.branchConfig.values()].map((t,e)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),Rut=Ae(function(){return w.records.branches},"getBranches"),Dut=Ae(function(){return w.records.commits},"getCommits"),Out=Ae(function(){var t=[...w.records.commits.values()];return t.forEach(function(t){R.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),Put=Ae(function(){return w.records.currBranch},"getCurrentBranch"),But=Ae(function(){return w.records.direction},"getDirection"),Fut=Ae(function(){return w.records.head},"getHead"),$ut={commitType:uut,getConfig:wut,setDirection:kut,setOptions:Tut,getOptions:Eut,commit:_ut,branch:Cut,merge:Sut,cherryPick:Aut,checkout:Lut,prettyPrint:Nut,clear:Iut,getBranchesAsObjArray:Mut,getBranches:Rut,getCommits:Dut,getCommitsArray:Out,getCurrentBranch:Put,getDirection:But,getHead:Fut,setAccTitle:cc,getAccTitle:hc,getAccDescription:dc,setAccDescription:uc,setDiagramTitle:pc,getDiagramTitle:gc}}),Adt=t(()=>{cut(),e(),put(),Sdt(),gut(),zut=Ae((t,e)=>{hut(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)Gut(r,e)},"populate"),Gut=Ae((t,e)=>{var r={Commit:Ae(t=>e.commit(Uut(t)),"Commit"),Branch:Ae(t=>e.branch(qut(t)),"Branch"),Merge:Ae(t=>e.merge(Yut(t)),"Merge"),Checkout:Ae(t=>e.checkout(jut(t)),"Checkout"),CherryPicking:Ae(t=>e.cherryPick(Hut(t)),"CherryPicking")}[t.$type];r?r(t):R.error("Unknown statement type: "+t.$type)},"parseStatement"),Uut=Ae(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?uut[t.type]:uut.NORMAL,tags:t.tags??void 0}),"parseCommit"),qut=Ae(t=>({name:t.name,order:t.order??0}),"parseBranch"),Yut=Ae(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?uut[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),jut=Ae(t=>t.branch,"parseCheckout"),Hut=Ae(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Wut={parse:Ae(async t=>{t=await aut("gitGraph",t),R.debug(t),zut(t,$ut)},"parse")}}),Ldt=t(()=>{Q3(),i(),e(),K8(),gut(),Tdt=D(),Vut=Tdt?.gitGraph,Xut=new Map,Kut=new Map,Zut=new Map,Qut=[],Jut=0,tdt="LR",edt=Ae(()=>{Xut.clear(),Kut.clear(),Zut.clear(),Jut=0,Qut=[],tdt="LR"},"clear"),rdt=Ae(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"),ndt=Ae(t=>{let r,n,i;return i="BT"===tdt?(n=Ae((t,e)=>t<=e,"comparisonFunc"),1/0):(n=Ae((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===tdt||"BT"==tdt?Kut.get(t)?.y:Kut.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),idt=Ae(t=>{let r="",n=1/0;return t.forEach(t=>{var e=Kut.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),adt=Ae((t,n,e)=>{let i=e,a=e,r=[];t.forEach(t=>{var e=n.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(i=sdt(e),a=Math.max(i,a)):r.push(e),ldt(e,i)}),i=a,r.forEach(t=>{cdt(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=idt(t.parents),(i=Kut.get(e).y-40)<=a&&(a=i),e=Xut.get(t.branch).pos,r=i-10,Kut.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),odt=Ae(t=>{var e=ndt(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=Kut.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),sdt=Ae(t=>odt(t)+40,"calculateCommitPosition"),ldt=Ae((t,e)=>{var r=Xut.get(t.branch);if(r)return r=r.pos,Kut.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),cdt=Ae((t,e,r)=>{var n=Xut.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,Kut.set(t.id,{x:n,y:e+r})},"setRootPosition"),hdt=Ae((t,e,r,n,i,a)=>{var o;a===uut.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${i%8} ${n}-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${i%8} ${n}-inner`)):a===uut.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+n),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} `+n),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} `+n),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} `+n),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} `+n)):((o=t.append("circle")).attr("cx",r.x),o.attr("cy",r.y),o.attr("r",e.type===uut.MERGE?9:10),o.attr("class",`commit ${e.id} commit`+i%8),a===uut.MERGE&&((o=t.append("circle")).attr("cx",r.x),o.attr("cy",r.y),o.attr("r",6),o.attr("class",`commit ${n} ${e.id} commit`+i%8)),a===uut.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 ${n} ${e.id} commit`+i%8))},"drawCommitBullet"),udt=Ae((t,e,r,n)=>{var i,a;e.type!==uut.CHERRY_PICK&&(e.customId&&e.type===uut.MERGE||e.type!==uut.MERGE)&&Vut?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(e=t.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===tdt||"BT"===tdt?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):e.attr("x",r.posWithOffset-i.width/2),Vut.rotateCommitLabel)&&("TB"===tdt||"BT"===tdt?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),ddt=Ae((i,a,o,s)=>{if(0<a.tags.length){let t=0,e=0,r=0,n=[];for(var l of a.tags.reverse()){var c=i.insert("polygon"),h=i.append("circle"),u=(l=i.append("text").attr("y",o.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",o.posWithOffset-u.width/2),n.push({tag:l,hole:h,rect:c,yOffset:t}),t+=20}for(var{tag:d,hole:p,rect:g,yOffset:f}of n){var m=r/2,y=o.y-19.2-f;g.attr("class","tag-label-bkg").attr("points",`
|
|
|
${s-e/2-2},${2+y}
|
|
|
${s-e/2-2},${y-2}
|
|
|
${o.posWithOffset-e/2-4},${y-m-2}
|
|
|
${o.posWithOffset+e/2+4},${y-m-2}
|
|
|
${o.posWithOffset+e/2+4},${y+m+2}
|
|
|
${o.posWithOffset-e/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",s-e/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==tdt&&"BT"!==tdt||(y=s+f,g.attr("class","tag-label-bkg").attr("points",`
|
|
|
${o.x},${y+2}
|
|
|
${o.x},${y-2}
|
|
|
${o.x+10},${y-m-2}
|
|
|
${o.x+10+e+4},${y-m-2}
|
|
|
${o.x+10+e+4},${y+m+2}
|
|
|
${o.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+o.x+","+s+")"),p.attr("cx",o.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+o.x+","+s+")"),d.attr("x",o.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+o.x+","+s+")"))}}},"drawCommitTags"),pdt=Ae(t=>{switch(t.customType??t.type){case uut.NORMAL:return"commit-normal";case uut.REVERSE:return"commit-reverse";case uut.HIGHLIGHT:return"commit-highlight";case uut.MERGE:return"commit-merge";case uut.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),gdt=Ae((t,e,r,n)=>{var i,a={x:0,y:0};return 0<t.parents.length?(i=ndt(t.parents))?(i=n.get(i)??a,"TB"===e?i.y+40:"BT"===e?(n.get(t.id)??a).y-40:i.x+40):0:"TB"===e?30:"BT"===e?(n.get(t.id)??a).y-40:0},"calculatePosition"),fdt=Ae((t,e,r)=>{var r="BT"===tdt&&r?e:e+10,e="TB"===tdt||"BT"===tdt?r:Xut.get(t.branch)?.pos,n="TB"===tdt||"BT"===tdt?Xut.get(t.branch)?.pos:r;if(void 0===n||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:n,y:e,posWithOffset:r}},"getCommitPosition"),mdt=Ae((t,a,o)=>{if(!Vut)throw new Error("GitGraph config not found");let s=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===tdt||"BT"===tdt?30:0,e=[...a.keys()],h=Vut?.parallelCommits??!1,r=Ae((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),n=e.sort(r);"BT"===tdt&&(h&&adt(n,a,c),n=n.reverse()),n.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=gdt(e,tdt,c,Kut));var r,n,i,t=fdt(e,c,h);o&&(r=pdt(e),n=e.customType??e.type,i=Xut.get(e.branch)?.index??0,hdt(s,e,t,r,i,n),udt(l,e,t,c),ddt(l,e,t,c)),"TB"===tdt||"BT"===tdt?Kut.set(e.id,{x:t.x,y:t.posWithOffset}):Kut.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===tdt&&h?c+40:c+40+10)>Jut&&(Jut=c)})},"drawCommits"),ydt=Ae((e,r,t,n,i)=>{let a=(("TB"===tdt||"BT"===tdt?t.x<n.x:t.y<n.y)?r:e).branch,o=Ae(t=>t.branch===a,"isOnBranchToGetCurve"),s=Ae(t=>t.seq>e.seq&&t.seq<r.seq,"isBetweenCommits");return[...i.values()].some(t=>s(t)&&o(t))},"shouldRerouteArrow"),vdt=Ae((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;var i;return 5<r?n:Qut.every(t=>10<=Math.abs(t-n))?(Qut.push(n),n):(i=Math.abs(t-e),vdt(t,e-i/5,r+1))},"findLane"),xdt=Ae((t,e,r,n)=>{var i,a=Kut.get(e.id),o=Kut.get(r.id);if(void 0===a||void 0===o)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let s=ydt(e,r,a,o,n),l="",c="",h=0,u=0,d=Xut.get(r.branch)?.index;r.type===uut.MERGE&&e.id!==r.parents[0]&&(d=Xut.get(e.branch)?.index);let p;if(s?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.y<o.y?vdt(a.y,o.y):vdt(o.y,a.y),i=a.x<o.x?vdt(a.x,o.x):vdt(o.x,a.x),p="TB"===tdt?a.x<o.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${c} ${i} ${a.y+u} L ${i} ${o.y-h} ${l} ${i+u} ${o.y} L ${o.x} `+o.y:(d=Xut.get(e.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${l} ${i} ${a.y+u} L ${i} ${o.y-h} ${c} ${i-u} ${o.y} L ${o.x} `+o.y):"BT"===tdt?a.x<o.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${l} ${i} ${a.y-u} L ${i} ${o.y+h} ${c} ${i+u} ${o.y} L ${o.x} `+o.y:(d=Xut.get(e.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${c} ${i} ${a.y-u} L ${i} ${o.y+h} ${l} ${i-u} ${o.y} L ${o.x} `+o.y):a.y<o.y?`M ${a.x} ${a.y} L ${a.x} ${n-h} ${l} ${a.x+u} ${n} L ${o.x-h} ${n} ${c} ${o.x} ${n+u} L ${o.x} `+o.y:(d=Xut.get(e.branch)?.index,`M ${a.x} ${a.y} L ${a.x} ${n+h} ${c} ${a.x+u} ${n} L ${o.x-h} ${n} ${l} ${o.x} ${n-u} L ${o.x} `+o.y)):(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,"TB"===tdt?(a.x<o.x&&(p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${o.y-h} ${l} ${a.x+u} ${o.y} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${o.x-h} ${a.y} ${c} ${o.x} ${a.y+u} L ${o.x} `+o.y),a.x>o.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${o.y-h} ${c} ${a.x-u} ${o.y} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${o.x+h} ${a.y} ${l} ${o.x} ${a.y+u} L ${o.x} `+o.y),a.x===o.x&&(p=`M ${a.x} ${a.y} L ${o.x} `+o.y)):"BT"===tdt?(a.x<o.x&&(p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${o.y+h} ${c} ${a.x+u} ${o.y} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${o.x-h} ${a.y} ${l} ${o.x} ${a.y-u} L ${o.x} `+o.y),a.x>o.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${o.y+h} ${l} ${a.x-u} ${o.y} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${o.x-h} ${a.y} ${l} ${o.x} ${a.y-u} L ${o.x} `+o.y),a.x===o.x&&(p=`M ${a.x} ${a.y} L ${o.x} `+o.y)):(a.y<o.y&&(p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${o.x-h} ${a.y} ${c} ${o.x} ${a.y+u} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${a.x} ${o.y-h} ${l} ${a.x+u} ${o.y} L ${o.x} `+o.y),a.y>o.y&&(p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${o.x-h} ${a.y} ${l} ${o.x} ${a.y-u} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${a.x} ${o.y+h} ${c} ${a.x+u} ${o.y} L ${o.x} `+o.y),a.y===o.y&&(p=`M ${a.x} ${a.y} L ${o.x} `+o.y))),void 0===p)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),bdt=Ae((t,r)=>{let n=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=>{xdt(n,r.get(t),e,r)})})},"drawArrows"),wdt=Ae((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=Xut.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",Jut),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===tdt?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",Jut),n.attr("x2",r)):"BT"===tdt&&(n.attr("y1",Jut),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),Qut.push(r);var n=t.name,t=rdt(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(i.node().appendChild(t),t.getBBox());n.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===Vut?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),i.attr("transform","translate("+(-t.width-14-(!0===Vut?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===tdt?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===tdt?(n.attr("x",r-t.width/2-10).attr("y",Jut),i.attr("transform","translate("+(r-t.width/2-5)+", "+Jut+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),kdt=Ae(function(t,e,r,n,i){return Xut.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===tdt||"BT"===tdt?n.width/2:0))},"setBranchPosition"),Tdt=Ae(function(t,e,r,n){if(edt(),R.debug("in gitgraph renderer",t+`
|
|
|
`,"id:",e,r),!Vut)throw new Error("GitGraph config not found");let o=Vut.rotateCommitLabel??!1,i=n.db,s=(Zut=i.getCommits(),t=i.getBranchesAsObjArray(),tdt=i.getDirection(),O(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=rdt(t.name),n=s.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=kdt(t.name,l,e,r,o),a.remove(),i.remove(),n.remove()}),mdt(s,Zut,!1),Vut.showBranches&&wdt(s,t),bdt(s,Zut),mdt(s,Zut,!0),H8.insertTitle(s,"gitTitleText",Vut.titleTopMargin??0,i.getDiagramTitle()),bc(void 0,s,Vut.diagramPadding,Vut.useMaxWidth)},"draw"),Edt={draw:Tdt}}),Ndt=t(()=>{_dt=Ae(e=>`
|
|
|
.commit-id,
|
|
|
.commit-msg,
|
|
|
.branch-label {
|
|
|
fill: lightgrey;
|
|
|
color: lightgrey;
|
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
|
font-family: var(--mermaid-font-family);
|
|
|
}
|
|
|
${[0,1,2,3,4,5,6,7].map(t=>`
|
|
|
.branch-label${t} { fill: ${e["gitBranchLabel"+t]}; }
|
|
|
.commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
|
|
|
.commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
|
|
|
.label${t} { fill: ${e["git"+t]}; }
|
|
|
.arrow${t} { stroke: ${e["git"+t]}; }
|
|
|
`).join(`
|
|
|
`)}
|
|
|
|
|
|
.branch {
|
|
|
stroke-width: 1;
|
|
|
stroke: ${e.lineColor};
|
|
|
stroke-dasharray: 2;
|
|
|
}
|
|
|
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};}
|
|
|
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; }
|
|
|
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
|
.tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; }
|
|
|
.tag-hole { fill: ${e.textColor}; }
|
|
|
|
|
|
.commit-merge {
|
|
|
stroke: ${e.primaryColor};
|
|
|
fill: ${e.primaryColor};
|
|
|
}
|
|
|
.commit-reverse {
|
|
|
stroke: ${e.primaryColor};
|
|
|
fill: ${e.primaryColor};
|
|
|
stroke-width: 3;
|
|
|
}
|
|
|
.commit-highlight-outer {
|
|
|
}
|
|
|
.commit-highlight-inner {
|
|
|
stroke: ${e.primaryColor};
|
|
|
fill: ${e.primaryColor};
|
|
|
}
|
|
|
|
|
|
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
|
.gitTitleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: 18px;
|
|
|
fill: ${e.textColor};
|
|
|
}
|
|
|
`,"getStyles"),Cdt=_dt}),Idt={};J(Idt,{diagram:()=>Mdt});var Mdt,Rdt,Ddt,Odt=t(()=>{Adt(),Sdt(),Ldt(),Ndt(),Mdt={parser:Wut,db:$ut,renderer:Edt,styles:Cdt}}),Pdt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],_=[1,25],C=[1,35],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:n.TopAxis(),this.$=a[s].substr(8);break;case 20:n.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:n.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:n.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:n.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:n.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:n.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:n.addTask(a[s-1],a[s]),this.$="task";break;case 34:this.$=a[s-1],n.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],null),n.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],n.setClickEvent(a[s-2],a[s],null),n.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-1],a[s]),n.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],n.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+" "+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 44:case 46:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s]}},"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:n,13:i,14:a,15:o,16:s,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:_,40:C},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:o,16:s,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:_,40:C},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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:break;case 11:return 10;case 12:case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(Rdt=new((t.prototype=n).Parser=t)).parser=Rdt,Ddt=Rdt}),Bdt=jMt((t,e)=>{function r(){return function(t,e,i){var a=Ae(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),o=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,n;return this.$utils().u(t)?(r=a(this),n=this.isoWeekYear(),e=4-(n=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),4<n.isoWeekday()&&(e+=7),n=n.add(e,"day"),r.diff(n,"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(),n=!!r.u(e)||e;return"isoweek"===r.p(t)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.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()}),Fdt=jMt((t,e)=>{function r(){var s={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?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=Ae(function(t){return(t=+t)+(68<t?1900:2e3)},"a"),a=Ae(function(e){return function(t){this[e]=+t}},"f"),o=[/[+-]\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=Ae(function(t){return(t=g[t])&&(t.indexOf?t:t.s.concat(t.f))},"u"),h=Ae(function(t,e){var r,n=g.meridiem;if(n){for(var i=1;i<=24;i+=1)if(-1<t.indexOf(n(i,0,e))){r=12<i;break}}else r=t===(e?"pm":"PM");return r},"d"),d={A:[n,function(t){this.afternoon=h(t,!1)}],a:[n,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:[n,function(t){var e=g.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var n=1;n<=31;n+=1)e(n).replace(/\[|\]/g,"")===t&&(this.day=n)}],w:[r,a("week")],ww:[e,a("week")],M:[r,a("month")],MM:[e,a("month")],MMM:[n,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:[n,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=i(t)}],YYYY:[/\d{4}/,a("year")],Z:o,ZZ:o};function T(t){for(var e=t,i=g&&g.formats,h=(t=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,e,r){var n=r&&r.toUpperCase();return e||i[r]||s[r]||i[n].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 n=h[r],a=(o=d[n])&&o[0],o=o&&o[1];h[r]=o?{regex:a,parser:o}:n.replace(/^\[|\]$/g,"")}return function(t){for(var e,r,n,i={},a=0,o=0;a<u;a+=1){var s,l,c=h[a];"string"==typeof c?o+=c.length:(l=c.regex,c=c.parser,s=t.slice(o),l=l.exec(s)[0],c.call(i,l),t=t.replace(l,""))}return void 0!==(n=(e=i).afternoon)&&(r=e.hours,n?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon),i}}return Ae(T,"l"),function(t,e,d){d.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(i=t.parseTwoDigitYear);var p=(t=e.prototype).parse;t.parse=function(t){var e=t.date,r=t.utc,n=t.args,i=(this.$u=r,n[1]);if("string"==typeof i){var a=!0===n[2],o=!0===n[3],s=a||o,l=n[2];o&&(l=n[2]),g=this.$locale(),!a&&l&&(g=d.Ls[l]),this.$d=function(t,e,r,n){try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var i=T(e)(t),a=i.year,o=i.month,s=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.week,g=new Date,f=s||(a||o?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!o||(y=0<o?o-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?n(v).week(p).toDate():v)}catch{return new Date("")}}(e,i,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),s&&e!=this.format(i)&&(this.$d=new Date("")),g={}}else if(i instanceof Array)for(var c=i.length,h=1;h<=c;h+=1){n[1]=i[h-1];var u=d.apply(this,n);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()}),$dt=jMt((t,e)=>{function r(){return function(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,n=this,i=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((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return e.s(n.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(n.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===n.$H?24:n.$H),"k"===t?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.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 zdt(r,n,t){let i=!0;for(;i;)i=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(n[t]=!0,r.shift(1),i=!0)})}var Gdt,Udt,qdt,Ydt,jdt,Hdt,Wdt,Vdt,Xdt,Kdt,Zdt,Qdt,Jdt,t0t,e0t,r0t,n0t,i0t,a0t,o0t,s0t,l0t,c0t,h0t,u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t,w0t,k0t,T0t,E0t,_0t,C0t,S0t,A0t,L0t,N0t,I0t,M0t,R0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,G0t,U0t,q0t,Y0t,j0t,H0t,W0t,V0t,X0t,K0t,Z0t,Q0t,J0t,tpt,ept,rpt,npt,ipt,apt,opt,spt,lpt,cpt,hpt,upt,dpt,ppt,gpt=t(()=>{Gdt=rt(t5(),1),Udt=rt(nt(),1),l0t=rt(Bdt(),1),c0t=rt(Fdt(),1),h0t=rt($dt(),1),e(),i(),K8(),fh(),Udt.default.extend(l0t.default),Udt.default.extend(c0t.default),Udt.default.extend(h0t.default),qdt={friday:5,saturday:6},Wdt=jdt=Ydt="",Vdt=[],Xdt=[],Kdt=new Map,Zdt=[],Qdt=[],t0t=Jdt="",e0t=["active","done","crit","milestone"],i0t=n0t=!(r0t=[]),a0t="sunday",o0t="saturday",s0t=0,l0t=Ae(function(){Zdt=[],Qdt=[],r0t=[],H0t=[],Hdt=j0t=Y0t=void(z0t=0),Wdt=t0t=jdt=Ydt=Jdt="",Vdt=[],i0t=n0t=!(Xdt=[]),s0t=0,Kdt=new Map,lc(),a0t="sunday",o0t="saturday"},"clear"),c0t=Ae(function(t){jdt=t},"setAxisFormat"),h0t=Ae(function(){return jdt},"getAxisFormat"),u0t=Ae(function(t){Hdt=t},"setTickInterval"),d0t=Ae(function(){return Hdt},"getTickInterval"),p0t=Ae(function(t){Wdt=t},"setTodayMarker"),g0t=Ae(function(){return Wdt},"getTodayMarker"),f0t=Ae(function(t){Ydt=t},"setDateFormat"),m0t=Ae(function(){n0t=!0},"enableInclusiveEndDates"),y0t=Ae(function(){return n0t},"endDatesAreInclusive"),v0t=Ae(function(){i0t=!0},"enableTopAxis"),x0t=Ae(function(){return i0t},"topAxisEnabled"),b0t=Ae(function(t){t0t=t},"setDisplayMode"),w0t=Ae(function(){return t0t},"getDisplayMode"),k0t=Ae(function(){return Ydt},"getDateFormat"),T0t=Ae(function(t){Vdt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),E0t=Ae(function(){return Vdt},"getIncludes"),_0t=Ae(function(t){Xdt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),C0t=Ae(function(){return Xdt},"getExcludes"),S0t=Ae(function(){return Kdt},"getLinks"),A0t=Ae(function(t){Jdt=t,Zdt.push(t)},"addSection"),L0t=Ae(function(){return Zdt},"getSections"),N0t=Ae(function(){let t=Z0t(),e=0;for(;!t&&e<10;)t=Z0t(),e++;return Qdt=H0t},"getTasks"),I0t=Ae(function(t,e,r,n){return!n.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==qdt[o0t]&&t.isoWeekday()!==qdt[o0t]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),M0t=Ae(function(t){a0t=t},"setWeekday"),R0t=Ae(function(){return a0t},"getWeekday"),D0t=Ae(function(t){o0t=t},"setWeekend"),O0t=Ae(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,Udt.default)(e.startTime):(0,Udt.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,Udt.default)(e.endTime):(0,Udt.default)(e.endTime,r,!0),[r,n]=P0t(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),P0t=Ae(function(t,e,r,n,i){let a=!1,o=null;for(;t<=e;)a||(o=e.toDate()),(a=I0t(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,o]},"fixTaskDates"),B0t=Ae(function(t,e,r){r=r.trim();var n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=X0t(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,Udt.default)(r,e.trim(),!0)).isValid())return n.toDate();if(R.debug("Invalid date:"+r),R.debug("With date format:"+e.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4<n.getFullYear())throw new Error("Invalid date:"+r);return n},"getStartDate"),F0t=Ae(function(t){return null!==(t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim()))?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),$0t=Ae(function(t,e,r,n=!1){r=r.trim();var i=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=X0t(a))&&(!t||a.startTime<t.startTime)&&(t=a);return t?t.startTime:((i=new Date).setHours(0,0,0,0),i)}let o=(0,Udt.default)(r,e.trim(),!0);if(o.isValid())return(o=n?o.add(1,"d"):o).toDate();let s=(0,Udt.default)(t),[l,c]=F0t(r);return Number.isNaN(l)||(i=s.add(l,c)).isValid()&&(s=i),s.toDate()},"getEndDate"),z0t=0,G0t=Ae(function(t){return void 0===t?"task"+(z0t+=1):t},"parseId"),U0t=Ae(function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),n={};zdt(r,n,e0t);for(let t=0;t<r.length;t++)r[t]=r[t].trim();let i="";switch(r.length){case 1:n.id=G0t(),n.startTime=t.endTime,i=r[0];break;case 2:n.id=G0t(),n.startTime=B0t(void 0,Ydt,r[0]),i=r[1];break;case 3:n.id=G0t(r[0]),n.startTime=B0t(void 0,Ydt,r[1]),i=r[2]}return i&&(n.endTime=$0t(n.startTime,Ydt,i,n0t),n.manualEndTime=(0,Udt.default)(i,"YYYY-MM-DD",!0).isValid(),O0t(n,Ydt,Xdt,Vdt)),n},"compileData"),q0t=Ae(function(t,e){var r=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),n={};zdt(r,n,e0t);for(let t=0;t<r.length;t++)r[t]=r[t].trim();switch(r.length){case 1:n.id=G0t(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:r[0]};break;case 2:n.id=G0t(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=G0t(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]}}return n},"parseData"),H0t=[],W0t={},V0t=Ae(function(t,e){t={section:Jdt,type:Jdt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},e=q0t(j0t,e),t.raw.startTime=e.startTime,t.raw.endTime=e.endTime,t.id=e.id,t.prevTaskId=j0t,t.active=e.active,t.done=e.done,t.crit=e.crit,t.milestone=e.milestone,t.order=s0t,s0t++,e=H0t.push(t),W0t[j0t=t.id]=e-1},"addTask"),X0t=Ae(function(t){return H0t[W0t[t]]},"findTaskById"),K0t=Ae(function(t,e){t={section:Jdt,type:Jdt,description:t,task:t,classes:[]},e=U0t(Y0t,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,Y0t=t,Qdt.push(t)},"addTaskOrg"),Z0t=Ae(function(){let t=Ae(function(t){var e=H0t[t];switch(H0t[t].raw.startTime.type){case"prevTaskEnd":var r=X0t(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(r=B0t(void 0,Ydt,H0t[t].raw.startTime.startData))&&(H0t[t].startTime=r)}return H0t[t].startTime&&(H0t[t].endTime=$0t(H0t[t].startTime,Ydt,H0t[t].raw.endTime.data,n0t),H0t[t].endTime)&&(H0t[t].processed=!0,H0t[t].manualEndTime=(0,Udt.default)(H0t[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),O0t(H0t[t],Ydt,Xdt,Vdt)),H0t[t].processed},"compileTask"),e=!0;for(var[r,n]of H0t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),Q0t=Ae(function(t,e){let r=e;"loose"!==D().securityLevel&&(r=(0,Gdt.sanitizeUrl)(e)),t.split(",").forEach(function(t){void 0!==X0t(t)&&(ept(t,()=>{window.open(r,"_self")}),Kdt.set(t,r))}),J0t(t,"clickable")},"setLink"),J0t=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==(t=X0t(t))&&t.classes.push(e)})},"setClass"),tpt=Ae(function(t,e,n){if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),void 0!==X0t(t)&&ept(t,()=>{H8.runFunc(e,...r)})}},"setClickFun"),ept=Ae(function(e,r){r0t.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"),rpt=Ae(function(t,e,r){t.split(",").forEach(function(t){tpt(t,e,r)}),J0t(t,"clickable")},"setClickEvent"),npt=Ae(function(e){r0t.forEach(function(t){t(e)})},"bindFunctions"),ipt={getConfig:Ae(()=>D().gantt,"getConfig"),clear:l0t,setDateFormat:f0t,getDateFormat:k0t,enableInclusiveEndDates:m0t,endDatesAreInclusive:y0t,enableTopAxis:v0t,topAxisEnabled:x0t,setAxisFormat:c0t,getAxisFormat:h0t,setTickInterval:u0t,getTickInterval:d0t,setTodayMarker:p0t,getTodayMarker:g0t,setAccTitle:cc,getAccTitle:hc,setDiagramTitle:pc,getDiagramTitle:gc,setDisplayMode:b0t,getDisplayMode:w0t,setAccDescription:uc,getAccDescription:dc,addSection:A0t,getSections:L0t,getTasks:N0t,addTask:V0t,findTaskById:X0t,addTaskOrg:K0t,setIncludes:T0t,getIncludes:E0t,setExcludes:_0t,getExcludes:C0t,setClickEvent:rpt,setLink:Q0t,getLinks:S0t,bindFunctions:npt,parseDuration:F0t,isInvalidDate:I0t,setWeekday:M0t,getWeekday:R0t,setWeekend:D0t},Ae(zdt,"getTaskTags")}),fpt=t(()=>{apt=rt(nt(),1),e(),Q3(),tc(),i(),ec(),opt=Ae(function(){R.debug("Something is calling, setConf, remove the call")},"setConf"),spt={monday:iv,tuesday:av,wednesday:ov,thursday:sv,friday:lv,saturday:cv,sunday:nv},lpt=Ae((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(var a of n)for(let t=0;t<r.length;t++)if(a.startTime>=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),hpt=Ae(function(t,l,e,d){let p=D().gantt,r=D().securityLevel,n,i=("sandbox"===r&&(n=O("#i"+l)),O("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),o="sandbox"===r?n.nodes()[0].contentDocument:document,a=o.getElementById(l),s=(void 0===(cpt=a.parentElement.offsetWidth)&&(cpt=1200),void 0!==p.useWidth&&(cpt=p.useWidth),d.db.getTasks()),u=[];for(var c of s)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 s)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=lpt(y[m],t)+1;t+=v,g+=v*(p.barHeight+p.barGap),h[m]=v}}else{g+=s.length*(p.barHeight+p.barGap);for(let e of u)h[e]=s.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+cpt+" "+g);let x=i.select(`[id="${l}"]`),b=sb().domain([Hh(s,function(t){return t.startTime}),Yh(s,function(t){return t.endTime})]).rangeRound([0,cpt-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return n<r?i=1:r<n&&(i=-1),i}function k(t,e,r){var n=p.barHeight,i=n+p.barGap,a=p.topPadding,o=p.leftPadding;R2().domain([0,u.length]).range(["#00B9FA","#F95002"]).interpolate(fg),E(i,a,o,0,r,t,d.db.getExcludes(),d.db.getIncludes()),_(o,a,0,r),T(t,i,a,o,n,0,e),C(i,a),S(o,0,0,r)}function T(t,r,n,i,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+n-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 o=x.append("g").selectAll("rect").data(t).enter(),s=d.db.getLinks();if(o.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)+i+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+i}).attr("y",function(t,e){return t.order*r+n}).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)+i+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+n+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0<t.classes.length&&(e=t.classes.join(" ")),0);for(var[n,i]of u.entries())t.type===i&&(r=n%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))}),o.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+i-5:r+i+5:(r-e)/2+e+i}).attr("y",function(t,e){return t.order*r+p.barHeight/2+(p.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),n=(t.milestone&&(r=e+c),this.getBBox().width),i="",a=(0<t.classes.length&&(i=t.classes.join(" ")),0);for(var[o,s]of u.entries())t.type===s&&(a=o%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"),n>r-e?r+n+1.5*p.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===D().securityLevel){let a=O("#i"+l).nodes()[0].contentDocument;o.filter(function(t){return s.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),n=e.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",s.get(t.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(e),i.appendChild(r)})}}function E(o,s,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of e)(void 0===i||r<i)&&(i=r),(void 0===a||n>a)&&(a=n);if(i&&a)if(5<(0,apt.default)(a).diff((0,apt.default)(i),"year"))R.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,n=(0,apt.default)(i);for(;n.valueOf()<=a;)d.db.isInvalidDate(n,t,h,u)?r?r.end=n:r={start:n,end:n}:r&&(e.push(r),r=null),n=n.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-s-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*o+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function _(t,e,r,n){var i=ou(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(eb(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 o=a[1],s=a[2],l=d.db.getWeekday()||p.weekday;switch(s){case"millisecond":i.ticks(z2.every(o));break;case"second":i.ticks(G2.every(o));break;case"minute":i.ticks(U2.every(o));break;case"hour":i.ticks(Y2.every(o));break;case"day":i.ticks(H2.every(o));break;case"week":i.ticks(spt[l].every(o));break;case"month":i.ticks(yv.every(o))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(n-50)+")").call(i).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=au(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(eb(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],s=a[2],u=d.db.getWeekday()||p.weekday;switch(s){case"millisecond":c.ticks(z2.every(h));break;case"second":c.ticks(G2.every(h));break;case"minute":c.ticks(U2.every(h));break;case"hour":c.ticks(Y2.every(h));break;case"day":c.ticks(H2.every(h));break;case"week":c.ticks(spt[u].every(h));break;case"month":c.ticks(yv.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 C(r,n){let i=0,a=Object.keys(h).map(t=>[t,h[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,n=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,i=o.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([e,r]of t.entries()){var a=o.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,i.appendChild(a)}return i}).attr("x",10).attr("y",function(t,e){return 0<e?(i+=a[e-1][1],t[1]*r/2+i*r+n):t[1]*r/2+n}).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,n){var i,a,o=d.db.getTodayMarker();"off"!==o&&(a=x.append("g").attr("class","today"),i=new Date,(a=a.append("line")).attr("x1",b(i)+t).attr("x2",b(i)+t).attr("y1",p.titleTopMargin).attr("y2",n-p.titleTopMargin).attr("class","today"),""!==o)&&a.attr("style",o.replace(/,/g,";"))}function A(r){var n={},i=[];for(let t=0,e=r.length;t<e;++t)Object.prototype.hasOwnProperty.call(n,r[t])||(n[r[t]]=!0,i.push(r[t]));return i}Ae(w,"taskCompare"),s.sort(w),k(s,cpt,g),Vl(x,g,cpt,p.useMaxWidth),x.append("text").text(d.db.getDiagramTitle()).attr("x",cpt/2).attr("y",p.titleTopMargin).attr("class","titleText"),Ae(k,"makeGantt"),Ae(T,"drawRects"),Ae(E,"drawExcludeDays"),Ae(_,"makeGrid"),Ae(C,"vertLabels"),Ae(S,"drawToday"),Ae(A,"checkUnique")},"draw"),upt={setConf:opt,draw:hpt}}),mpt=t(()=>{dpt=Ae(t=>`
|
|
|
.mermaid-main-font {
|
|
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
|
}
|
|
|
|
|
|
.exclude-range {
|
|
|
fill: ${t.excludeBkgColor};
|
|
|
}
|
|
|
|
|
|
.section {
|
|
|
stroke: none;
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
|
|
|
.section0 {
|
|
|
fill: ${t.sectionBkgColor};
|
|
|
}
|
|
|
|
|
|
.section2 {
|
|
|
fill: ${t.sectionBkgColor2};
|
|
|
}
|
|
|
|
|
|
.section1,
|
|
|
.section3 {
|
|
|
fill: ${t.altSectionBkgColor};
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
|
|
|
.sectionTitle0 {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
.sectionTitle1 {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
.sectionTitle2 {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
.sectionTitle3 {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
.sectionTitle {
|
|
|
text-anchor: start;
|
|
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Grid and axis */
|
|
|
|
|
|
.grid .tick {
|
|
|
stroke: ${t.gridColor};
|
|
|
opacity: 0.8;
|
|
|
shape-rendering: crispEdges;
|
|
|
}
|
|
|
|
|
|
.grid .tick text {
|
|
|
font-family: ${t.fontFamily};
|
|
|
fill: ${t.textColor};
|
|
|
}
|
|
|
|
|
|
.grid path {
|
|
|
stroke-width: 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Today line */
|
|
|
|
|
|
.today {
|
|
|
fill: none;
|
|
|
stroke: ${t.todayLineColor};
|
|
|
stroke-width: 2px;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Task styling */
|
|
|
|
|
|
/* Default task */
|
|
|
|
|
|
.task {
|
|
|
stroke-width: 2;
|
|
|
}
|
|
|
|
|
|
.taskText {
|
|
|
text-anchor: middle;
|
|
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
|
}
|
|
|
|
|
|
.taskTextOutsideRight {
|
|
|
fill: ${t.taskTextDarkColor};
|
|
|
text-anchor: start;
|
|
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
|
}
|
|
|
|
|
|
.taskTextOutsideLeft {
|
|
|
fill: ${t.taskTextDarkColor};
|
|
|
text-anchor: end;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Special case clickable */
|
|
|
|
|
|
.task.clickable {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
.taskText.clickable {
|
|
|
cursor: pointer;
|
|
|
fill: ${t.taskTextClickableColor} !important;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.taskTextOutsideLeft.clickable {
|
|
|
cursor: pointer;
|
|
|
fill: ${t.taskTextClickableColor} !important;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.taskTextOutsideRight.clickable {
|
|
|
cursor: pointer;
|
|
|
fill: ${t.taskTextClickableColor} !important;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Specific task settings for the sections*/
|
|
|
|
|
|
.taskText0,
|
|
|
.taskText1,
|
|
|
.taskText2,
|
|
|
.taskText3 {
|
|
|
fill: ${t.taskTextColor};
|
|
|
}
|
|
|
|
|
|
.task0,
|
|
|
.task1,
|
|
|
.task2,
|
|
|
.task3 {
|
|
|
fill: ${t.taskBkgColor};
|
|
|
stroke: ${t.taskBorderColor};
|
|
|
}
|
|
|
|
|
|
.taskTextOutside0,
|
|
|
.taskTextOutside2
|
|
|
{
|
|
|
fill: ${t.taskTextOutsideColor};
|
|
|
}
|
|
|
|
|
|
.taskTextOutside1,
|
|
|
.taskTextOutside3 {
|
|
|
fill: ${t.taskTextOutsideColor};
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Active task */
|
|
|
|
|
|
.active0,
|
|
|
.active1,
|
|
|
.active2,
|
|
|
.active3 {
|
|
|
fill: ${t.activeTaskBkgColor};
|
|
|
stroke: ${t.activeTaskBorderColor};
|
|
|
}
|
|
|
|
|
|
.activeText0,
|
|
|
.activeText1,
|
|
|
.activeText2,
|
|
|
.activeText3 {
|
|
|
fill: ${t.taskTextDarkColor} !important;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Completed task */
|
|
|
|
|
|
.done0,
|
|
|
.done1,
|
|
|
.done2,
|
|
|
.done3 {
|
|
|
stroke: ${t.doneTaskBorderColor};
|
|
|
fill: ${t.doneTaskBkgColor};
|
|
|
stroke-width: 2;
|
|
|
}
|
|
|
|
|
|
.doneText0,
|
|
|
.doneText1,
|
|
|
.doneText2,
|
|
|
.doneText3 {
|
|
|
fill: ${t.taskTextDarkColor} !important;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* Tasks on the critical line */
|
|
|
|
|
|
.crit0,
|
|
|
.crit1,
|
|
|
.crit2,
|
|
|
.crit3 {
|
|
|
stroke: ${t.critBorderColor};
|
|
|
fill: ${t.critBkgColor};
|
|
|
stroke-width: 2;
|
|
|
}
|
|
|
|
|
|
.activeCrit0,
|
|
|
.activeCrit1,
|
|
|
.activeCrit2,
|
|
|
.activeCrit3 {
|
|
|
stroke: ${t.critBorderColor};
|
|
|
fill: ${t.activeTaskBkgColor};
|
|
|
stroke-width: 2;
|
|
|
}
|
|
|
|
|
|
.doneCrit0,
|
|
|
.doneCrit1,
|
|
|
.doneCrit2,
|
|
|
.doneCrit3 {
|
|
|
stroke: ${t.critBorderColor};
|
|
|
fill: ${t.doneTaskBkgColor};
|
|
|
stroke-width: 2;
|
|
|
cursor: pointer;
|
|
|
shape-rendering: crispEdges;
|
|
|
}
|
|
|
|
|
|
.milestone {
|
|
|
transform: rotate(45deg) scale(0.8,0.8);
|
|
|
}
|
|
|
|
|
|
.milestoneText {
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.doneCritText0,
|
|
|
.doneCritText1,
|
|
|
.doneCritText2,
|
|
|
.doneCritText3 {
|
|
|
fill: ${t.taskTextDarkColor} !important;
|
|
|
}
|
|
|
|
|
|
.activeCritText0,
|
|
|
.activeCritText1,
|
|
|
.activeCritText2,
|
|
|
.activeCritText3 {
|
|
|
fill: ${t.taskTextDarkColor} !important;
|
|
|
}
|
|
|
|
|
|
.titleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: 18px;
|
|
|
fill: ${t.titleColor||t.textColor};
|
|
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
|
}
|
|
|
`,"getStyles"),ppt=dpt}),ypt={};J(ypt,{diagram:()=>vpt});var vpt,xpt,bpt,wpt,kpt,Tpt,Ept,_pt,Cpt,Spt=t(()=>{Pdt(),gpt(),fpt(),mpt(),vpt={parser:Ddt,db:ipt,renderer:upt,styles:ppt}}),Apt=t(()=>{cut(),e(),xpt={parse:Ae(async t=>{t=await aut("info",t),R.debug(t)},"parse")}}),Lpt=t(()=>{bpt="11.2.1"}),Npt=t(()=>{Lpt(),wpt={version:bpt},kpt=Ae(()=>wpt.version,"getVersion"),Tpt={getVersion:kpt}}),Ipt=t(()=>{Q3(),i(),Ept=Ae(t=>{let e=D().securityLevel,r=O("body");var n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),Mpt=t(()=>{e(),Ipt(),ec(),_pt=Ae((t,e,r)=>{R.debug(`rendering info diagram
|
|
|
`+t),t=Ept(e),Vl(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),Cpt={draw:_pt}}),Rpt={};J(Rpt,{diagram:()=>Dpt});var Dpt,Opt,Ppt,Bpt,Fpt,$pt,zpt,Gpt,Upt,qpt,Ypt,jpt,Hpt,Wpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt=t(()=>{Apt(),Npt(),Mpt(),Dpt={parser:xpt,db:Tpt,renderer:Cpt}}),t1t=t(()=>{e(),fh(),Nn(),$pt=xr.pie,Opt={sections:new Map,showData:!1,config:$pt},Ppt=Opt.sections,Bpt=Opt.showData,Fpt=structuredClone($pt),$pt=Ae(()=>structuredClone(Fpt),"getConfig"),zpt=Ae(()=>{Ppt=new Map,Bpt=Opt.showData,lc()},"clear"),Gpt=Ae(({label:t,value:e})=>{Ppt.has(t)||(Ppt.set(t,e),R.debug(`added new section: ${t}, with value: `+e))},"addSection"),Upt=Ae(()=>Ppt,"getSections"),qpt=Ae(t=>{Bpt=t},"setShowData"),Ypt=Ae(()=>Bpt,"getShowData"),jpt={getConfig:$pt,clear:zpt,setDiagramTitle:pc,getDiagramTitle:gc,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addSection:Gpt,getSections:Upt,setShowData:qpt,getShowData:Ypt}}),e1t=t(()=>{cut(),e(),put(),t1t(),Hpt=Ae((t,e)=>{hut(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),Wpt={parse:Ae(async t=>{t=await aut("pie",t),R.debug(t),Hpt(t,jpt)},"parse")}}),r1t=t(()=>{Vpt=Ae(t=>`
|
|
|
.pieCircle{
|
|
|
stroke: ${t.pieStrokeColor};
|
|
|
stroke-width : ${t.pieStrokeWidth};
|
|
|
opacity : ${t.pieOpacity};
|
|
|
}
|
|
|
.pieOuterCircle{
|
|
|
stroke: ${t.pieOuterStrokeColor};
|
|
|
stroke-width: ${t.pieOuterStrokeWidth};
|
|
|
fill: none;
|
|
|
}
|
|
|
.pieTitleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: ${t.pieTitleTextSize};
|
|
|
fill: ${t.pieTitleTextColor};
|
|
|
font-family: ${t.fontFamily};
|
|
|
}
|
|
|
.slice {
|
|
|
font-family: ${t.fontFamily};
|
|
|
fill: ${t.pieSectionTextColor};
|
|
|
font-size:${t.pieSectionTextSize};
|
|
|
// fill: white;
|
|
|
}
|
|
|
.legend text {
|
|
|
fill: ${t.pieLegendTextColor};
|
|
|
font-family: ${t.fontFamily};
|
|
|
font-size: ${t.pieLegendTextSize};
|
|
|
}
|
|
|
`,"getStyles"),Xpt=Vpt}),n1t=t(()=>{Q3(),i(),e(),Ipt(),ec(),K8(),Kpt=Ae(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),r4().value(t=>t.value)(t)),"createPieArcs"),Zpt=Ae((t,e,r,n)=>{R.debug(`rendering pie chart
|
|
|
`+t);let i=n.db,a=D(),o=b8(i.getConfig(),a.pie),s=Ept(e),l=s.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=j8(t.pieOuterStrokeWidth);n??=2;let c=o.textPosition,h=Math.min(450,450)/2-40,u=zb().innerRadius(0).outerRadius(h),d=zb().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=Kpt(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=u2(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return i.getShowData()?t+` [${e}]`:t}),t=512+(n=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),s.attr("viewBox",`0 0 ${t} 450`),Vl(s,450,t,o.useMaxWidth)},"draw"),Qpt={draw:Zpt}}),i1t={};J(i1t,{diagram:()=>a1t});var a1t,o1t,s1t,l1t,c1t,h1t=t(()=>{e1t(),t1t(),r1t(),n1t(),a1t={parser:Wpt,db:jpt,renderer:Qpt,styles:Xpt}}),u1t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],o=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],s=[55,56,57],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],Y=[1,21],j=[1,22],H=[1,24],W=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],rt=[1,69],nt=[1,70],it=[1,71],at=[1,72],ot=[1,73],st=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],_=[1,90],C=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],M=[1,95],R=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+""+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],n.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:n.addPoint(a[s-3],"",a[s-1],a[s],[]);break;case 48:n.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:n.addPoint(a[s-4],"",a[s-2],a[s-1],a[s]);break;case 50:n.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:n.setXAxisLeftText(a[s-2]),n.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=" ⟶ ",n.setXAxisLeftText(a[s-1]);break;case 53:n.setXAxisLeftText(a[s]);break;case 54:n.setYAxisBottomText(a[s-2]),n.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=" ⟶ ",n.setYAxisBottomText(a[s-1]);break;case 56:n.setYAxisBottomText(a[s]);break;case 57:n.setQuadrant1Text(a[s]);break;case 58:n.setQuadrant2Text(a[s]);break;case 59:n.setQuadrant3Text(a[s]);break;case 60:n.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:"text"};break;case 65:this.$={text:a[s-1].text+""+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:"text"};break;case 67:this.$={text:a[s],type:"markdown"};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+""+a[s]}},"anonymous"),table:[{18:r,26:1,27:2,28:n,55:i,56:a,57:o},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:o},{18:r,26:9,27:2,28:n,55:i,56:a,57:o},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(s,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:Y,42:j,48:H,50:W,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:i,56:a,57:o},e(s,[2,37]),e(s,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:Y,42:j,48:H,50:W,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(s,[2,39]),e(s,[2,40]),e(s,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(s,[2,45]),e(s,[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(s,[2,38]),e(s,[2,42]),e(s,[2,43]),e(s,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:ot,13:st,14:lt,15:ct,21:63},e(s,[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(s,[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(s,[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(s,[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(s,[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(s,[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:nt,10:it,11:at,12:ot,13:st,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(s,[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(s,[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:_,5:C,6:S,8:A,11:L,13:N,16:89,17:I,18:M,19:R,20:D,22:88,23:87},e(E,[2,24]),e(s,[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(s,[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(s,[2,47],{22:88,16:89,23:100,4:_,5:C,6:S,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),{46:[1,101]},e(s,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:_,5:C,6:S,8:A,11:L,13:N,17:I,18:M,19:R,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(s,[2,49],{10:ht}),e(s,[2,48],{22:88,16:89,23:104,4:_,5:C,6:S,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),{4:_,5:C,6:S,8:A,11:L,13:N,16:89,17:I,18:M,19:R,20:D,22:105},e(O,[2,26]),e(s,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:_,5:C,6:S,8:A,11:L,13:N,17:I,18:M,19:R,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,Ae(t,"Parser"),(o1t=new((t.prototype=r).Parser=t)).parser=o1t,s1t=o1t}),d1t=t(()=>{Q3(),Nn(),e(),_n(),l1t=cr(),c1t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{Ae(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:xr.quadrantChart?.chartWidth||500,chartWidth:xr.quadrantChart?.chartHeight||500,titlePadding:xr.quadrantChart?.titlePadding||10,titleFontSize:xr.quadrantChart?.titleFontSize||20,quadrantPadding:xr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:xr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:xr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:xr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:xr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:xr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:xr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:xr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:xr.quadrantChart?.pointLabelFontSize||12,pointRadius:xr.quadrantChart?.pointRadius||5,xAxisPosition:xr.quadrantChart?.xAxisPosition||"top",yAxisPosition:xr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:xr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:xr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:l1t.quadrant1Fill,quadrant2Fill:l1t.quadrant2Fill,quadrant3Fill:l1t.quadrant3Fill,quadrant4Fill:l1t.quadrant4Fill,quadrant1TextFill:l1t.quadrant1TextFill,quadrant2TextFill:l1t.quadrant2TextFill,quadrant3TextFill:l1t.quadrant3TextFill,quadrant4TextFill:l1t.quadrant4TextFill,quadrantPointFill:l1t.quadrantPointFill,quadrantPointTextFill:l1t.quadrantPointTextFill,quadrantXAxisTextFill:l1t.quadrantXAxisTextFill,quadrantYAxisTextFill:l1t.quadrantYAxisTextFill,quadrantTitleFill:l1t.quadrantTitleFill,quadrantInternalBorderStrokeFill:l1t.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l1t.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,R.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){R.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){R.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={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:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,o=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:i,titleSpace:e,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:o,quadrantHalfHeight:o/2}}}getAxisLabels(t,e,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:o,quadrantHalfWidth:s,quadrantTop:l,quadrantWidth:c}=n,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:o+(h?s/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.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:o+s+(h?s/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.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+o+c+this.config.quadrantPadding,y:l+a-(u?n/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+o+c+this.config.quadrantPadding,y:l+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=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+n,y:i,width:n,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:i,width:n,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:i+t,width:n,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+n,y:i+t,width:n,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:n,quadrantTop:i,quadrantWidth:a}=e,o=R2().domain([0,1]).range([n,a+n]),s=R2().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:o(t.x),y:s(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:s(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:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:o}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a,x2:n+o+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+o,y1:a+e,x2:n+o,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a+r,x2:n+o+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+e,x2:n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+e,x2:n+i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+e,y1:a+t,x2:n+o-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,n=0<this.data.points.length?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}}});function p1t(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function g1t(t){return!/^\d+$/.test(t)}function f1t(t){return!/^\d+px$/.test(t)}var m1t,y1t=t(()=>{m1t=class extends Error{static{Ae(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},Ae(p1t,"validateHexCode"),Ae(g1t,"validateNumber"),Ae(f1t,"validateSizeInPixels")});function v1t(t){return Sl(t.trim(),R1t)}function x1t(t){D1t.setData({quadrant1Text:v1t(t.text)})}function b1t(t){D1t.setData({quadrant2Text:v1t(t.text)})}function w1t(t){D1t.setData({quadrant3Text:v1t(t.text)})}function k1t(t){D1t.setData({quadrant4Text:v1t(t.text)})}function T1t(t){D1t.setData({xAxisLeftText:v1t(t.text)})}function E1t(t){D1t.setData({xAxisRightText:v1t(t.text)})}function _1t(t){D1t.setData({yAxisTopText:v1t(t.text)})}function C1t(t){D1t.setData({yAxisBottomText:v1t(t.text)})}function S1t(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(g1t(i))throw new m1t(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(p1t(i))throw new m1t(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(p1t(i))throw new m1t(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(f1t(i))throw new m1t(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function A1t(t,e,r,n,i){i=S1t(i),D1t.addPoints([{x:r,y:n,text:v1t(t.text),className:e,...i}])}function L1t(t,e){D1t.addClass(t,S1t(e))}function N1t(t){D1t.setConfig({chartWidth:t})}function I1t(t){D1t.setConfig({chartHeight:t})}function M1t(){var{themeVariables:t,quadrantChart:e}=D();return e&&D1t.setConfig(e),D1t.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}),D1t.setData({titleText:gc()}),D1t.build()}var R1t,D1t,O1t,P1t,B1t,F1t,$1t=t(()=>{i(),tc(),fh(),d1t(),y1t(),R1t=D(),Ae(v1t,"textSanitizer"),D1t=new c1t,Ae(x1t,"setQuadrant1Text"),Ae(b1t,"setQuadrant2Text"),Ae(w1t,"setQuadrant3Text"),Ae(k1t,"setQuadrant4Text"),Ae(T1t,"setXAxisLeftText"),Ae(E1t,"setXAxisRightText"),Ae(_1t,"setYAxisTopText"),Ae(C1t,"setYAxisBottomText"),Ae(S1t,"parseStyles"),Ae(A1t,"addPoint"),Ae(L1t,"addClass"),Ae(N1t,"setWidth"),Ae(I1t,"setHeight"),Ae(M1t,"getQuadrantData"),O1t=Ae(function(){D1t.clear(),lc()},"clear"),P1t={setWidth:N1t,setHeight:I1t,setQuadrant1Text:x1t,setQuadrant2Text:b1t,setQuadrant3Text:w1t,setQuadrant4Text:k1t,setXAxisLeftText:T1t,setXAxisRightText:E1t,setYAxisTopText:_1t,setYAxisBottomText:C1t,parseStyles:S1t,addPoint:A1t,addClass:L1t,getQuadrantData:M1t,clear:O1t,setAccTitle:cc,getAccTitle:hc,setDiagramTitle:pc,getDiagramTitle:gc,getAccDescription:dc,setAccDescription:uc}}),z1t=t(()=>{Q3(),i(),e(),ec(),B1t=Ae((t,e,r,n)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function o(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}Ae(i,"getDominantBaseLine"),Ae(a,"getTextAnchor"),Ae(o,"getTransformation");var s=D();R.debug(`Rendering quadrant chart
|
|
|
`+t);let l=s.securityLevel,c;"sandbox"===l&&(c=O("#i"+e));var e=(t=O("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=s.quadrantChart?.chartWidth??500,u=s.quadrantChart?.chartHeight??500,s=(Vl(t,u,h,s.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),n=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");s.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",s.title.fill).attr("font-size",s.title.fontSize).attr("dominant-baseline",i(s.title.horizontalPos)).attr("text-anchor",a(s.title.verticalPos)).attr("transform",o(s.title)).text(s.title.text),s.borderLines&&u.selectAll("line").data(s.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(s.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>o(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(s.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>o(t)),(u=h.selectAll("g.data-point").data(s.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>o(t.text))},"draw"),F1t={draw:B1t}}),G1t={};J(G1t,{diagram:()=>U1t});var U1t,q1t,Y1t,j1t=t(()=>{u1t(),$1t(),z1t(),U1t={parser:s1t,db:P1t,renderer:F1t,styles:Ae(()=>"","styles")}}),H1t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 5:n.setOrientation(a[s]);break;case 9:n.setDiagramTitle(a[s].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[s]);break;case 13:n.setLineData(a[s-1],a[s]);break;case 14:n.setBarData({text:"",type:"text"},a[s]);break;case 15:n.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:this.$=[Number(a[s-2]),...a[s]];break;case 21:this.$=[Number(a[s])];break;case 22:n.setXAxisTitle(a[s]);break;case 23:n.setXAxisTitle(a[s-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[s]);break;case 26:n.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 27:this.$=a[s-1];break;case 28:this.$=[a[s-2],...a[s]];break;case 29:this.$=[a[s]];break;case 30:n.setYAxisTitle(a[s]);break;case 31:n.setYAxisTitle(a[s-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 37:case 38:this.$={text:a[s],type:"text"};break;case 39:this.$={text:a[s],type:"markdown"};break;case 40:this.$=a[s];break;case 41:this.$=a[s-1]+""+a[s]}},"anonymous"),table:[e(r,n,{3:1,4:2,7:4,5:i,34:a,35:o,36:s}),{1:[3]},e(r,n,{4:2,7:4,3:8,5:i,34:a,35:o,36:s}),e(r,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:o,36:s}),{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,n,{4:2,7:4,3:21,5:i,34:a,35:o,36:s}),{1:[2,3]},e(l,[2,5]),e(r,[2,7],{4:22,34:a,35:o,36:s}),{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(_,[2,18]),{1:[2,2]},e(_,[2,8]),e(_,[2,9]),e(C,[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(C,[2,38]),e(C,[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(_,[2,10]),e(_,[2,22],{30:41,29:56,24:w,27:k}),e(_,[2,24]),e(_,[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(_,[2,11]),e(_,[2,30],{33:60,27:T}),e(_,[2,32]),{31:[1,61]},e(_,[2,12]),{17:62,24:E},{25:63,27:A},e(_,[2,14]),{17:65,24:E},e(_,[2,16]),e(_,[2,17]),e(S,[2,41]),e(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(_,[2,31]),{27:[1,69]},e(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(_,[2,15]),e(_,[2,26]),e(_,[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(_,[2,33]),e(_,[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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(q1t=new((t.prototype=n).Parser=t)).parser=q1t,Y1t=q1t});function W1t(t){return"bar"===t.type}function V1t(t){return"band"===t.type}function X1t(t){return"linear"===t.type}var K1t,Z1t,Q1t,J1t,tgt=t(()=>{Ae(W1t,"isBarPlot"),Ae(V1t,"isBandAxisData"),Ae(X1t,"isLinearAxisData")}),egt=t(()=>{KC(),K1t=class{constructor(t){this.parentGroup=t}static{Ae(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,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(o=jC(i,1,r))?o.width:r.length*e,o=o?o.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return i.remove(),n}}}),rgt=t(()=>{Z1t=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,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{Ae(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,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,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():[]}}}),ngt=t(()=>{Q3(),e(),rgt(),Q1t=class extends Z1t{static{Ae(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=g2().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=g2().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}}),igt=t(()=>{Q3(),rgt(),J1t=class extends Z1t{static{Ae(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=R2().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=R2().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function agt(t,e,r,n){return n=new K1t(n),V1t(t)?new Q1t(e,r,t.categories,t.title,n):new J1t(e,r,[t.min,t.max],t.title,n)}var ogt=t(()=>{tgt(),egt(),ngt(),igt(),Ae(agt,"getAxis")});function sgt(t,e,r,n){return n=new K1t(n),new lgt(n,t,e,r)}var lgt,cgt,hgt,ugt=t(()=>{egt(),lgt=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{Ae(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}},Ae(sgt,"getChartTitleComponent")}),dgt=t(()=>{Q3(),cgt=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{Ae(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?Kb().y(t=>t[0]).x(t=>t[1]):Kb().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}]}]:[]}}}),pgt=t(()=>{hgt=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{Ae(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 ggt(t,e,r){return new fgt(t,e,r)}var fgt,mgt,ygt,vgt=t(()=>{dgt(),pgt(),fgt=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{Ae(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 n=new cgt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new hgt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},Ae(ggt,"getPlotComponent")}),xgt=t(()=>{ogt(),ugt(),vgt(),tgt(),mgt=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:sgt(t,e,r,n),plot:ggt(t,e,r),xAxis:agt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:agt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{Ae(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});t-=o.width,e-=o.height,n=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=o.width)&&(i+=t),0<e&&(a+=e),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(t=>W1t(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});t-=s.width,e-=s.height,r=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(s=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,n=s.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,i=r+s.height,0<t&&(a+=t),0<e&&(o+=e),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(t=>W1t(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}}}),bgt=t(()=>{xgt(),ygt=class{static{Ae(this,"XYChartBuilder")}static build(t,e,r,n){return new mgt(t,e,r,n).getDrawableElement()}}});function wgt(){var t=cr(),e=Rr();return b8(t.xyChart,e.themeVariables.xyChart)}function kgt(){var t=Rr();return b8(xr.xyChart,t.xyChart)}function Tgt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Egt(t){var e=Rr();return Sl(t.trim(),e)}function _gt(t){Ggt=t}function Cgt(t){Ugt.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Sgt(t){Ygt.xAxis.title=Egt(t.text)}function Agt(t,e){Ygt.xAxis={type:"linear",title:Ygt.xAxis.title,min:t,max:e},Hgt=!0}function Lgt(t){Ygt.xAxis={type:"band",title:Ygt.xAxis.title,categories:t.map(t=>Egt(t.text))},Hgt=!0}function Ngt(t){Ygt.yAxis.title=Egt(t.text)}function Igt(t,e){Ygt.yAxis={type:"linear",title:Ygt.yAxis.title,min:t,max:e},Wgt=!0}function Mgt(t){var e=Math.min(...t),t=Math.max(...t),r=X1t(Ygt.yAxis)?Ygt.yAxis.min:1/0,n=X1t(Ygt.yAxis)?Ygt.yAxis.max:-1/0;Ygt.yAxis={type:"linear",title:Ygt.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function Rgt(r){let t=[];var e;if(0!==r.length&&(Hgt||(n=X1t(Ygt.xAxis)?Ygt.xAxis.min:1/0,e=X1t(Ygt.xAxis)?Ygt.xAxis.max:-1/0,Agt(Math.min(n,1),Math.max(e,r.length))),Wgt||Mgt(r),V1t(Ygt.xAxis)&&(t=Ygt.xAxis.categories.map((t,e)=>[t,r[e]])),X1t(Ygt.xAxis))){var n=Ygt.xAxis.min,i=Ygt.xAxis.max,a=(i-n)/(r.length-1),o=[];for(let t=n;t<=i;t+=a)o.push(""+t);t=o.map((t,e)=>[t,r[e]])}return t}function Dgt(t){return jgt[0===t?0:t%jgt.length]}function Ogt(t,e){e=Rgt(e),Ygt.plots.push({type:"line",strokeFill:Dgt(zgt),strokeWidth:2,data:e}),zgt++}function Pgt(t,e){e=Rgt(e),Ygt.plots.push({type:"bar",fill:Dgt(zgt),data:e}),zgt++}function Bgt(){if(0===Ygt.plots.length)throw Error("No Plot to render, please provide a plot with some data");return Ygt.title=gc(),ygt.build(Ugt,Ygt,qgt,Ggt)}function Fgt(){return qgt}function $gt(){return Ugt}var zgt,Ggt,Ugt,qgt,Ygt,jgt,Hgt,Wgt,Vgt,Xgt,Kgt,Zgt,Qgt=t(()=>{Mn(),Nn(),_n(),K8(),tc(),fh(),bgt(),tgt(),zgt=0,Ugt=kgt(),qgt=wgt(),Ygt=Tgt(),jgt=qgt.plotColorPalette.split(",").map(t=>t.trim()),Wgt=Hgt=!1,Ae(wgt,"getChartDefaultThemeConfig"),Ae(kgt,"getChartDefaultConfig"),Ae(Tgt,"getChartDefaultData"),Ae(Egt,"textSanitizer"),Ae(_gt,"setTmpSVGG"),Ae(Cgt,"setOrientation"),Ae(Sgt,"setXAxisTitle"),Ae(Agt,"setXAxisRangeData"),Ae(Lgt,"setXAxisBand"),Ae(Ngt,"setYAxisTitle"),Ae(Igt,"setYAxisRangeData"),Ae(Mgt,"setYAxisRangeFromPlotData"),Ae(Rgt,"transformDataWithoutCategory"),Ae(Dgt,"getPlotColorFromPalette"),Ae(Ogt,"setLineData"),Ae(Pgt,"setBarData"),Ae(Bgt,"getDrawableElem"),Ae(Fgt,"getChartThemeConfig"),Ae($gt,"getChartConfig"),Vgt=Ae(function(){lc(),zgt=0,Ugt=kgt(),Ygt=Tgt(),qgt=wgt(),jgt=qgt.plotColorPalette.split(",").map(t=>t.trim()),Wgt=Hgt=!1},"clear"),Xgt={getDrawableElem:Bgt,clear:Vgt,setAccTitle:cc,getAccTitle:hc,setDiagramTitle:pc,getDiagramTitle:gc,getAccDescription:dc,setAccDescription:uc,setOrientation:Cgt,setXAxisTitle:Sgt,setXAxisRangeData:Agt,setXAxisBand:Lgt,setYAxisTitle:Ngt,setYAxisRangeData:Igt,setLineData:Ogt,setBarData:Pgt,setTmpSVGG:_gt,getChartThemeConfig:Fgt,getChartConfig:$gt}}),Jgt=t(()=>{e(),Ipt(),ec(),Kgt=Ae((t,e,r,n)=>{var i,a=(n=n.db).getChartThemeConfig(),o=n.getChartConfig();function s(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})`}Ae(s,"getDominantBaseLine"),Ae(l,"getTextAnchor"),Ae(c,"getTextTransformation"),R.debug(`Rendering xychart chart
|
|
|
`+t);let h=Ept(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background"),p=(Vl(h,o.height,o.width,!0),h.attr("viewBox",`0 0 ${o.width} `+o.height),d.attr("fill",a.backgroundColor),n.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group")),n.getDrawableElem()),g={};function f(e){let r=u,n="";for(var[i]of e.entries()){let t=u;0<i&&g[n]&&(t=g[n]),n+=e[i],r=(r=g[n])||(g[n]=t.append("g").attr("class",e[i]))}return r}Ae(f,"getGroup");for(i of p)if(0!==i.data.length){var m=f(i.groupTexts);switch(i.type){case"rect":m.selectAll("rect").data(i.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth);break;case"text":m.selectAll("text").data(i.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>s(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":m.selectAll("path").data(i.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),Zgt={draw:Kgt}}),tft={};J(tft,{diagram:()=>eft});var eft,rft,nft,ift,aft,oft,sft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,Eft,_ft,Cft,Sft,Aft,Lft,Nft,Ift,Mft,Rft,Dft,Oft,Pft,Bft,Fft,$ft,zft,Gft,Uft,qft,Yft,jft,Hft=t(()=>{H1t(),Qgt(),Jgt(),eft={parser:Y1t,db:Xgt,renderer:Zgt}}),Wft=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],s=[1,18],l=[2,7],c=[1,22],h=[1,23],u=[1,24],d=[1,25],p=[1,26],g=[1,27],f=[1,20],m=[1,28],y=[1,29],v=[62,63],x=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],b=[1,47],w=[1,48],k=[1,49],T=[1,50],P=[1,51],B=[1,52],F=[1,53],E=[53,54],_=[1,64],C=[1,60],S=[1,61],A=[1,62],L=[1,63],N=[1,65],I=[1,69],M=[1,70],R=[1,67],D=[1,68],O=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(a[s-3],a[s-4]);break;case 14:n.setNewReqId(a[s-2]);break;case 15:n.setNewReqText(a[s-2]);break;case 16:n.setNewReqRisk(a[s-2]);break;case 17:n.setNewReqVerifyMethod(a[s-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(a[s-3]);break;case 34:n.setNewElementType(a[s-2]);break;case 35:n.setNewElementDocRef(a[s-2]);break;case 38:n.addRelationship(a[s-2],a[s],a[s-4]);break;case 39:n.addRelationship(a[s-2],a[s-4],a[s]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}},"anonymous"),table:[{3:1,4:2,6:r,9:n,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:n,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:r,9:n,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:s,7:31,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:32,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:33,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:34,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:s,7:35,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(v,[2,20]),e(v,[2,21]),e(v,[2,22]),e(v,[2,23]),e(v,[2,24]),e(v,[2,25]),e(x,[2,49]),e(x,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:b,56:w,57:k,58:T,59:P,60:B,61:F},{52:54,55:b,56:w,57:k,58:T,59:P,60:B,61:F},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(E,[2,40]),e(E,[2,41]),e(E,[2,42]),e(E,[2,43]),e(E,[2,44]),e(E,[2,45]),e(E,[2,46]),{54:[1,58]},{5:_,20:59,21:C,24:S,26:A,28:L,30:N},{5:I,30:M,46:66,47:R,49:D},{23:71,62:m,63:y},{23:72,62:m,63:y},e(O,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:_,20:77,21:C,24:S,26:A,28:L,30:N},e(O,[2,19]),e(O,[2,33]),{22:[1,78]},{22:[1,79]},{5:I,30:M,46:80,47:R,49:D},e(O,[2,37]),e(O,[2,38]),e(O,[2,39]),{23:81,62:m,63:y},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(O,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(O,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:_,20:106,21:C,24:S,26:A,28:L,30:N},{5:_,20:107,21:C,24:S,26:A,28:L,30:N},{5:_,20:108,21:C,24:S,26:A,28:L,30:N},{5:_,20:109,21:C,24:S,26:A,28:L,30:N},{5:I,30:M,46:110,47:R,49:D},{5:I,30:M,46:111,47:R,49:D},e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,34]),e(O,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},o={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};r.lexer=o,Ae(t,"Parser"),(rft=new((t.prototype=r).Parser=t)).parser=rft,nft=rft}),Vft=t(()=>{i(),e(),fh(),ift=[],aft={},oft=new Map,sft={},lft=new Map,cft={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},hft={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},uft={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},dft={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},pft=Ae((t,e)=>(oft.has(t)||oft.set(t,{name:t,type:e,id:aft.id,text:aft.text,risk:aft.risk,verifyMethod:aft.verifyMethod}),aft={},oft.get(t)),"addRequirement"),gft=Ae(()=>oft,"getRequirements"),fft=Ae(t=>{void 0!==aft&&(aft.id=t)},"setNewReqId"),mft=Ae(t=>{void 0!==aft&&(aft.text=t)},"setNewReqText"),yft=Ae(t=>{void 0!==aft&&(aft.risk=t)},"setNewReqRisk"),vft=Ae(t=>{void 0!==aft&&(aft.verifyMethod=t)},"setNewReqVerifyMethod"),xft=Ae(t=>(lft.has(t)||(lft.set(t,{name:t,type:sft.type,docRef:sft.docRef}),R.info("Added new requirement: ",t)),sft={},lft.get(t)),"addElement"),bft=Ae(()=>lft,"getElements"),wft=Ae(t=>{void 0!==sft&&(sft.type=t)},"setNewElementType"),kft=Ae(t=>{void 0!==sft&&(sft.docRef=t)},"setNewElementDocRef"),Tft=Ae((t,e,r)=>{ift.push({type:t,src:e,dst:r})},"addRelationship"),Eft=Ae(()=>ift,"getRelationships"),_ft=Ae(()=>{ift=[],aft={},oft=new Map,sft={},lft=new Map,lc()},"clear"),Cft={RequirementType:cft,RiskLevel:hft,VerifyType:uft,Relationships:dft,getConfig:Ae(()=>D().req,"getConfig"),addRequirement:pft,getRequirements:gft,setNewReqId:fft,setNewReqText:mft,setNewReqRisk:yft,setNewReqVerifyMethod:vft,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addElement:xft,getElements:bft,setNewElementType:wft,setNewElementDocRef:kft,addRelationship:Tft,getRelationships:Eft,clear:_ft}}),Xft=t(()=>{Sft=Ae(t=>`
|
|
|
|
|
|
marker {
|
|
|
fill: ${t.relationColor};
|
|
|
stroke: ${t.relationColor};
|
|
|
}
|
|
|
|
|
|
marker.cross {
|
|
|
stroke: ${t.lineColor};
|
|
|
}
|
|
|
|
|
|
svg {
|
|
|
font-family: ${t.fontFamily};
|
|
|
font-size: ${t.fontSize};
|
|
|
}
|
|
|
|
|
|
.reqBox {
|
|
|
fill: ${t.requirementBackground};
|
|
|
fill-opacity: 1.0;
|
|
|
stroke: ${t.requirementBorderColor};
|
|
|
stroke-width: ${t.requirementBorderSize};
|
|
|
}
|
|
|
|
|
|
.reqTitle, .reqLabel{
|
|
|
fill: ${t.requirementTextColor};
|
|
|
}
|
|
|
.reqLabelBox {
|
|
|
fill: ${t.relationLabelBackground};
|
|
|
fill-opacity: 1.0;
|
|
|
}
|
|
|
|
|
|
.req-title-line {
|
|
|
stroke: ${t.requirementBorderColor};
|
|
|
stroke-width: ${t.requirementBorderSize};
|
|
|
}
|
|
|
.relationshipLine {
|
|
|
stroke: ${t.relationColor};
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
.relationshipLabel {
|
|
|
fill: ${t.relationLabelColor};
|
|
|
}
|
|
|
|
|
|
`,"getStyles"),Aft=Sft}),Kft=t(()=>{Lft={CONTAINS:"contains",ARROW:"arrow"},Nft=Ae((t,e)=>{var r=t.append("defs").append("marker").attr("id",Lft.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Lft.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
|
|
|
L${e.line_height},${e.line_height/2}
|
|
|
M${e.line_height},${e.line_height/2}
|
|
|
L0,`+e.line_height).attr("stroke-width",1)},"insertLineEndings"),Ift={ReqMarkers:Lft,insertLineEndings:Nft}}),Zft=t(()=>{Q3(),yj(),iU(),i(),e(),ec(),tc(),Kft(),Mft={},Rft=0,Dft=Ae((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Mft.rect_min_width+"px").attr("height",Mft.rect_min_height+"px"),"newRectNode"),Oft=Ae((t,e,r)=>{let n=Mft.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",Mft.rect_padding).attr("dominant-baseline","hanging"),a=0;return r.forEach(t=>{(0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Mft.rect_min_width/2).attr("dy",0):i.append("tspan").attr("text-anchor","middle").attr("x",Mft.rect_min_width/2).attr("dy",.75*Mft.line_height)).text(t),a++}),e=1.5*Mft.rect_padding+a*Mft.line_height*.75,t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Mft.rect_min_width).attr("y1",e).attr("y2",e),{titleNode:i,y:e}},"newTitleNode"),Pft=Ae((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Mft.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,o=[];return r.forEach(t=>{let e=t.length;for(;30<e&&a<3;){var r=t.substring(0,30);t=t.substring(30,t.length),e=t.length,o[o.length]=r,a++}var n;3==a?(n=o[o.length-1],o[o.length-1]=n.substring(0,n.length-4)+"..."):o[o.length]=t,a=0}),o.forEach(t=>{i.append("tspan").attr("x",Mft.rect_padding).attr("dy",Mft.line_height).text(t)}),i},"newBodyNode"),Bft=Ae((t,e,r,n)=>{var i=e.node().getTotalLength(),e=e.node().getPointAtLength(.5*i),i="rel"+Rft,n=(Rft++,t.append("text").attr("class","req relationshipLabel").attr("id",i).attr("x",e.x).attr("y",e.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox());t.insert("rect","#"+i).attr("class","req reqLabelBox").attr("x",e.x-n.width/2).attr("y",e.y-n.height/2).attr("width",n.width).attr("height",n.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),Fft=Ae(function(t,e,r,n,i){var r=r.edge(qft(e.src),qft(e.dst)),a=Kb().x(function(t){return t.x}).y(function(t){return t.y}),n=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",a(r.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?n.attr("marker-start","url("+L.getUrl(Mft.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(n.attr("stroke-dasharray","10,7"),n.attr("marker-end","url("+L.getUrl(Mft.arrowMarkerAbsolute)+"#"+Ift.ReqMarkers.ARROW+"_line_ending)")),Bft(t,n,Mft,`<<${e.type}>>`)},"drawRelationshipFromLayout"),$ft=Ae((t,o,s)=>{t.forEach((t,e)=>{e=qft(e),R.info("Added new requirement: ",e);var r=s.append("g").attr("id",e),n=Dft(r,"req-"+e),i=[],a=Oft(r,e+"_title",[`<<${t.type}>>`,""+t.name]),r=(i.push(a.titleNode),Pft(r,e+"_body",["Id: "+t.id,"Text: "+t.text,"Risk: "+t.risk,"Verification: "+t.verifyMethod],a.y)),t=(i.push(r),n.node().getBBox());o.setNode(e,{width:t.width,height:t.height,shape:"rect",id:e})})},"drawReqs"),zft=Ae((t,s,l)=>{t.forEach((t,e)=>{var r=qft(e),n=l.append("g").attr("id",r),i=Dft(n,o="element-"+r),a=[],e=Oft(n,o+"_title",["<<Element>>",""+e]),n=(a.push(e.titleNode),Pft(n,o+"_body",["Type: "+(t.type||"Not Specified"),"Doc Ref: "+(t.docRef||"None")],e.y)),o=(a.push(n),i.node().getBBox());s.setNode(r,{width:o.width,height:o.height,shape:"rect",id:r})})},"drawElements"),Gft=Ae((t,n)=>(t.forEach(function(t){var e=qft(t.src),r=qft(t.dst);n.setEdge(e,r,{relationship:t})}),t),"addRelationships"),Uft=Ae(function(e,r){r.nodes().forEach(function(t){void 0!==t&&void 0!==r.node(t)&&(e.select("#"+t),e.select("#"+t).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))})},"adjustEntities"),qft=Ae(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),Yft=Ae((t,e,r,n)=>{let i=(Mft=D().requirement).securityLevel,a,o=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`)),s=(Ift.insertLineEndings(o,Mft),new rU({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Mft.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}})),l=n.db.getRequirements(),c=n.db.getElements(),h=n.db.getRelationships();$ft(l,s,o),zft(c,s,o),Gft(h,s),YY(s),Uft(o,s),h.forEach(function(t){Fft(o,t,s,e,n)});var u=Mft.rect_padding,d=o.node().getBBox(),p=d.width+2*u,g=d.height+2*u;Vl(o,g,p,Mft.useMaxWidth),o.attr("viewBox",`${d.x-u} ${d.y-u} ${p} `+g)},"draw"),jft={draw:Yft}}),Qft={};J(Qft,{diagram:()=>Jft});var Jft,tmt,emt,rmt=t(()=>{Wft(),Vft(),Xft(),Zft(),Jft={parser:nft,db:Cft,renderer:jft,styles:Aft}}),nmt=t(()=>{function P(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],B=[1,3],F=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],o=[1,14],s=[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],_=[1,39],C=[1,41],S=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],M=[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],R=[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:Ae(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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 3:return n.apply(a[s]),a[s];case 4:case 9:this.$=[];break;case 5:case 10:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 11:case 12:this.$=a[s];break;case 8:case 13:this.$=[];break;case 15:a[s].type="createParticipant",this.$=a[s];break;case 16:a[s-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[s-2])}),a[s-1].push({type:"boxEnd",boxText:a[s-2]}),this.$=a[s-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 29:n.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 30:n.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 31:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 34:a[s-1].unshift({type:"loopStart",loopText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:"rectStart",color:n.parseMessage(a[s-2]),signalType:n.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:n.parseMessage(a[s-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:"optStart",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:"altStart",altText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:"parStart",parText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:"parStart",parText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[s-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.CRITICAL_START}),a[s-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:"breakStart",breakText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.BREAK_START}),a[s-1].push({type:"breakEnd",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 43:this.$=a[s-3].concat([{type:"option",optionText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 45:this.$=a[s-3].concat([{type:"and",parText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.PAR_AND},a[s]]);break;case 47:this.$=a[s-3].concat([{type:"else",altText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.ALT_ELSE},a[s]]);break;case 48:a[s-3].draw="participant",a[s-3].type="addParticipant",a[s-3].description=n.parseMessage(a[s-1]),this.$=a[s-3];break;case 49:a[s-1].draw="participant",a[s-1].type="addParticipant",this.$=a[s-1];break;case 50:a[s-3].draw="actor",a[s-3].type="addParticipant",a[s-3].description=n.parseMessage(a[s-1]),this.$=a[s-3];break;case 51:a[s-1].draw="actor",a[s-1].type="addParticipant",this.$=a[s-1];break;case 52:a[s-1].type="destroyParticipant",this.$=a[s-1];break;case 53:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 54:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 55:this.$=[a[s-1],{type:"addLinks",actor:a[s-1].actor,text:a[s]}];break;case 56:this.$=[a[s-1],{type:"addALink",actor:a[s-1].actor,text:a[s]}];break;case 57:this.$=[a[s-1],{type:"addProperties",actor:a[s-1].actor,text:a[s]}];break;case 58:this.$=[a[s-1],{type:"addDetails",actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-2],a[s]];break;case 62:this.$=a[s];break;case 63:this.$=n.PLACEMENT.LEFTOF;break;case 64:this.$=n.PLACEMENT.RIGHTOF;break;case 65:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 66:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 67:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 68:this.$={type:"addParticipant",actor:a[s]};break;case 69:this.$=n.LINETYPE.SOLID_OPEN;break;case 70:this.$=n.LINETYPE.DOTTED_OPEN;break;case 71:this.$=n.LINETYPE.SOLID;break;case 72:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=n.LINETYPE.DOTTED;break;case 74:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=n.LINETYPE.SOLID_CROSS;break;case 76:this.$=n.LINETYPE.DOTTED_CROSS;break;case 77:this.$=n.LINETYPE.SOLID_POINT;break;case 78:this.$=n.LINETYPE.DOTTED_POINT;break;case 79:this.$=n.parseMessage(a[s].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:n,5:i,8:8,9:10,12:12,13:a,14:o,17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},t(M,[2,5]),{9:47,12:12,13:a,14:o,17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},t(M,[2,7]),t(M,[2,8]),t(M,[2,14]),{12:48,50:T,52:E,53:_},{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(M,[2,29]),t(M,[2,30]),{32:[1,61]},{34:[1,62]},t(M,[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(M,[2,6]),t(M,[2,15]),t(R,[2,9],{10:93}),t(M,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(M,[2,21]),{5:[1,97]},{5:[1,98]},t(M,[2,24]),t(M,[2,25]),t(M,[2,26]),t(M,[2,27]),t(M,[2,28]),t(M,[2,31]),t(M,[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:_},{5:[1,131]},t(M,[2,19]),t(M,[2,20]),t(M,[2,22]),t(M,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[1,132],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[1,133],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[1,134],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{16:[1,135]},{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[2,46],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{16:[1,137]},{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[2,44],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[2,42],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:o,16:[1,142],17:15,18:s,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:_,54:C,59:S,60:A,61:L,62:N,70:I},{15:[1,143]},t(M,[2,49]),{15:[1,144]},t(M,[2,51]),t(M,[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(M,[2,16]),t(R,[2,10]),{12:151,50:T,52:E,53:_},t(R,[2,12]),t(R,[2,13]),t(M,[2,18]),t(M,[2,34]),t(M,[2,35]),t(M,[2,36]),t(M,[2,37]),{15:[1,152]},t(M,[2,38]),{15:[1,153]},t(M,[2,39]),t(M,[2,40]),{15:[1,154]},t(M,[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(R,[2,11]),t(z,r,{7:103,40:160}),t(G,r,{7:105,42:161}),t(U,r,{7:108,45:162}),t(M,[2,48]),t(M,[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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{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,Ae(P,"Parser"),(tmt=new((P.prototype=e).Parser=P)).parser=tmt,emt=tmt});function imt(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}function amt(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}function omt(){smt.records.currentBox=void 0}var smt,lmt,cmt,hmt,umt,dmt,pmt,gmt,fmt,mmt,ymt,vmt,xmt,bmt,wmt,kmt,Tmt,Emt,_mt,Cmt,Smt,Amt,Lmt,Nmt,Imt,Mmt,Rmt,Dmt,Omt,Pmt,Bmt,Fmt,$mt,zmt,Gmt,Umt,qmt,Ymt,jmt,Hmt,Wmt,Vmt,Xmt,Kmt,Zmt,Qmt,Jmt,tyt,eyt,ryt,nyt,iyt,ayt,oyt,syt,lyt,cyt,hyt,uyt,dyt,pyt,gyt,fyt,myt,yyt,vyt,xyt,byt,wyt=t(()=>{i(),e(),fut(),tc(),fh(),smt=new dut(()=>({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})),lmt=Ae(function(t){smt.records.boxes.push({name:t.text,wrap:t.wrap??Smt(),fill:t.color,actorKeys:[]}),smt.records.currentBox=smt.records.boxes.slice(-1)[0]},"addBox"),cmt=Ae(function(t,e,r,n){let i=smt.records.currentBox,a=smt.records.actors.get(t);if(a){if(smt.records.currentBox&&a.box&&smt.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 '${smt.records.currentBox.name}' at the same time.`);if(i=a.box||smt.records.currentBox,a.box=i,a&&e===a.name&&null==r)return}null==r?.text&&(r={text:e,type:n}),null!=n&&null!=r.text||(r={text:e,type:n}),smt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??Smt(),prevActor:smt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),smt.records.prevActor&&(e=smt.records.actors.get(smt.records.prevActor))&&(e.nextActor=t),smt.records.currentBox&&smt.records.currentBox.actorKeys.push(t),smt.records.prevActor=t},"addActor"),hmt=Ae(t=>{let e,r=0;if(!t)return 0;for(e=0;e<smt.records.messages.length;e++)smt.records.messages[e].type===Imt.ACTIVE_START&&smt.records.messages[e].from===t&&r++,smt.records.messages[e].type===Imt.ACTIVE_END&&smt.records.messages[e].from===t&&r--;return r},"activationCount"),umt=Ae(function(t,e,r,n){smt.records.messages.push({from:t,to:e,message:r.text,wrap:r.wrap??Smt(),answer:n})},"addMessage"),dmt=Ae(function(t,e,r,n,i=!1){var a;if(n===Imt.ACTIVE_END&&hmt(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 smt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??Smt(),type:n,activate:i}),!0},"addSignal"),pmt=Ae(function(){return 0<smt.records.boxes.length},"hasAtLeastOneBox"),gmt=Ae(function(){return smt.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),fmt=Ae(function(){return smt.records.messages},"getMessages"),mmt=Ae(function(){return smt.records.boxes},"getBoxes"),ymt=Ae(function(){return smt.records.actors},"getActors"),vmt=Ae(function(){return smt.records.createdActors},"getCreatedActors"),xmt=Ae(function(){return smt.records.destroyedActors},"getDestroyedActors"),bmt=Ae(function(t){return smt.records.actors.get(t)},"getActor"),wmt=Ae(function(){return[...smt.records.actors.keys()]},"getActorKeys"),kmt=Ae(function(){smt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),Tmt=Ae(function(){smt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),Emt=Ae(()=>smt.records.sequenceNumbersEnabled,"showSequenceNumbers"),_mt=Ae(function(t){smt.records.wrapEnabled=t},"setWrap"),Cmt=Ae(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}},"extractWrap"),Smt=Ae(()=>void 0!==smt.records.wrapEnabled?smt.records.wrapEnabled:D().sequence?.wrap??!1,"autoWrap"),Amt=Ae(function(){smt.reset(),lc()},"clear"),Lmt=Ae(function(t){var t=t.trim(),{wrap:t,cleanedText:e}=Cmt(t),e={text:e,wrap:t};return R.debug("parseMessage: "+JSON.stringify(e)),e},"parseMessage"),Nmt=Ae(function(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=t.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=t.trim()));var{wrap:i,cleanedText:t}=Cmt(n);return{text:t?Sl(t,D()):void 0,color:r,wrap:i}},"parseBoxData"),Imt={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},Mmt={FILLED:0,OPEN:1},Rmt={LEFTOF:0,RIGHTOF:1,OVER:2},Dmt=Ae(function(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??Smt()},t=[].concat(t,t);smt.records.notes.push(n),smt.records.messages.push({from:t[0],to:t[1],message:r.text,wrap:r.wrap??Smt(),type:Imt.NOTE,placement:e})},"addNote"),Omt=Ae(function(e,r){e=bmt(e);try{let t=Sl(r.text,D());t=(t=t.replace(/&/g,"&")).replace(/=/g,"="),imt(e,JSON.parse(t))}catch(t){R.error("error while parsing actor link text",t)}},"addLinks"),Pmt=Ae(function(n,i){n=bmt(n);try{let t={},e=Sl(i.text,D()),r=e.indexOf("@");var a=(e=(e=e.replace(/&/g,"&")).replace(/=/g,"=")).slice(0,r-1).trim(),o=e.slice(r+1).trim();t[a]=o,imt(n,t)}catch(t){R.error("error while parsing actor link text",t)}},"addALink"),Ae(imt,"insertLinks"),Bmt=Ae(function(t,e){t=bmt(t);try{var r=Sl(e.text,D());amt(t,JSON.parse(r))}catch(t){R.error("error while parsing actor properties text",t)}},"addProperties"),Ae(amt,"insertProperties"),Ae(omt,"boxEnd"),Fmt=Ae(function(t,e){t=bmt(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&amt(t,n.properties),n.links&&imt(t,n.links)}catch(t){R.error("error while parsing actor details text",t)}},"addDetails"),$mt=Ae(function(t,e){if(void 0!==t?.properties)return t.properties[e]},"getActorProperty"),zmt=Ae(function(t){if(Array.isArray(t))t.forEach(function(t){zmt(t)});else switch(t.type){case"sequenceIndex":smt.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":cmt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(smt.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");smt.records.lastCreated=t.actor,cmt(t.actor,t.actor,t.description,t.draw),smt.records.createdActors.set(t.actor,smt.records.messages.length);break;case"destroyParticipant":smt.records.lastDestroyed=t.actor,smt.records.destroyedActors.set(t.actor,smt.records.messages.length);break;case"activeStart":case"activeEnd":dmt(t.actor,void 0,void 0,t.signalType);break;case"addNote":Dmt(t.actor,t.placement,t.text);break;case"addLinks":Omt(t.actor,t.text);break;case"addALink":Pmt(t.actor,t.text);break;case"addProperties":Bmt(t.actor,t.text);break;case"addDetails":Fmt(t.actor,t.text);break;case"addMessage":if(smt.records.lastCreated){if(t.to!==smt.records.lastCreated)throw new Error("The created participant "+smt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");smt.records.lastCreated=void 0}else if(smt.records.lastDestroyed){if(t.to!==smt.records.lastDestroyed&&t.from!==smt.records.lastDestroyed)throw new Error("The destroyed participant "+smt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");smt.records.lastDestroyed=void 0}dmt(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":lmt(t.boxData);break;case"boxEnd":omt();break;case"loopStart":dmt(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":dmt(void 0,void 0,void 0,t.signalType);break;case"rectStart":dmt(void 0,void 0,t.color,t.signalType);break;case"rectEnd":dmt(void 0,void 0,void 0,t.signalType);break;case"optStart":dmt(void 0,void 0,t.optText,t.signalType);break;case"optEnd":dmt(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":dmt(void 0,void 0,t.altText,t.signalType);break;case"altEnd":dmt(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":cc(t.text);break;case"parStart":case"and":dmt(void 0,void 0,t.parText,t.signalType);break;case"parEnd":dmt(void 0,void 0,void 0,t.signalType);break;case"criticalStart":dmt(void 0,void 0,t.criticalText,t.signalType);break;case"option":dmt(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":dmt(void 0,void 0,void 0,t.signalType);break;case"breakStart":dmt(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":dmt(void 0,void 0,void 0,t.signalType)}},"apply"),Gmt={addActor:cmt,addMessage:umt,addSignal:dmt,addLinks:Omt,addDetails:Fmt,addProperties:Bmt,autoWrap:Smt,setWrap:_mt,enableSequenceNumbers:kmt,disableSequenceNumbers:Tmt,showSequenceNumbers:Emt,getMessages:fmt,getActors:ymt,getCreatedActors:vmt,getDestroyedActors:xmt,getActor:bmt,getActorKeys:wmt,getActorProperty:$mt,getAccTitle:hc,getBoxes:mmt,getDiagramTitle:gc,setDiagramTitle:pc,getConfig:Ae(()=>D().sequence,"getConfig"),clear:Amt,parseMessage:Lmt,parseBoxData:Nmt,LINETYPE:Imt,ARROWTYPE:Mmt,PLACEMENT:Rmt,addNote:Dmt,setAccTitle:cc,apply:zmt,setAccDescription:uc,getAccDescription:dc,hasAtLeastOneBox:pmt,hasAtLeastOneBoxWithTitle:gmt}}),kyt=t(()=>{Umt=Ae(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"),qmt=Umt}),Tyt=t(()=>{function e(t,e,r,n,i,a,o){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),o)}function l(t,e,r,n,i,a,o,s){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=s,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("x",r).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,o)}}function r(t,e,r,n,i,a,o,s){(i=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),l(t,e,r,n,0,a,o,s),g(i,o)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}function n(t,e,r,n,i,a,o){f(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),o)}function c(t,e,r,n,i,a,o,s){var{actorFontSize:s,actorFontFamily:l,actorFontWeight:c}=s,[h,u]=j8(s),d=t.split(L.lineBreakRegex);for(let t=0;t<d.length;t++){var p=t*h-h*(d.length-1)/2,g=e.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").style("font-size",u).style("font-weight",c).style("font-family",l);g.append("tspan").attr("x",r+i/2).attr("dy",p).text(d[t]),g.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,o)}}function i(t,e,r,n,i,a,o,s){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,o,s),f(l,o)}async function a(t,e,r,n,i,a,o,s){var l=await Yl(t,Rr());(l=(e=e.append("switch")).append("foreignObject").attr("x",r+i/2-l.width/2).attr("y",n+a/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await jl(t,Rr())),c(t,e,r,n,i,a,o,s),f(l,o)}function f(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}tc(),e5(),K8(),Ymt=rt(t5(),1),Mn(),jmt=36,Hmt="actor-bottom",Wmt=Ae(function(t,e){return v3(t,e)},"drawRect"),Vmt=Ae(function(t,e,r,n,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,o=e.actorCnt,s=e.rectData,e="none",l=(i&&(e="block !important"),t.append("g")),i=(l.attr("id","actor"+o+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",e),""),c=(void 0!==s.class&&(i=" "+s.class),s.width>r?s.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",s.x),t.attr("y",s.height),t.attr("fill",s.fill),t.attr("stroke",s.stroke),t.attr("width",c),t.attr("height",s.height),t.attr("rx",s.rx),t.attr("ry",s.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,Ymt.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),xyt(n)(h,d,s.x+10,s.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:s.height+u,width:c}},"drawPopup"),Xmt=Ae(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Kmt=Ae(async function(n,i,a=null){var o=n.append("foreignObject"),s=await jl(i.text,Rr()),s=o.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(o.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),"noteText"===i.class)(n=n.node().firstChild).setAttribute("height",s.height+2*i.textMargin),n=n.getBBox(),o.attr("x",Math.round(n.x+n.width/2-s.width/2)).attr("y",Math.round(n.y+n.height/2-s.height/2));else if(a){let{startx:t,stopx:e,starty:r}=a;t>e&&(n=t,t=e,e=n),o.attr("x",Math.round(t+Math.abs(t-e)/2-s.width/2)),"loopText"===i.class?o.attr("y",Math.round(r)):o.attr("y",Math.round(r-s.height))}return[o]},"drawKatex"),Zmt=Ae(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,o]=j8(e.fontSize),s=[],l=0,c=Ae(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0<e.textMargin)switch(e.valign){case"top":case"start":c=Ae(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=Ae(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=Ae(()=>Math.round(e.y+(r+n+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 i.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!==o&&h.style("font-size",o),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||k8;(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&&(n+=(h._groups||h)[0][0].getBBox().height,r=n),s.push(h)}return s},"drawText"),Qmt=Ae(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}Ae(r,"genPoints");var n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,Zmt(t,e),n},"drawLabel"),Jmt=-1,tyt=Ae((r,n,t,i)=>{r.select&&t.forEach(t=>{var t=n.get(t),e=r.select("#actor"+t.actorCnt);!i.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):i.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),eyt=Ae(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,o=i+e.height,s=t=t.append("g").lower(),o=(n||(Jmt++,Object.keys(e.links||{}).length&&!r.forceMenus&&s.attr("onclick",Xmt(`actor${Jmt}_popup`)).attr("cursor","pointer"),s.append("line").attr("id","actor"+Jmt).attr("x1",a).attr("y1",o).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),s=t.append("g"),e.actorCnt=Jmt,null!=e.links&&s.attr("id","root-"+Jmt)),T3()),a="actor",t=(e.properties?.class?a=e.properties.class:o.fill="#eaeaea",a+=n?" "+Hmt:" actor-top",o.x=e.x,o.y=i,o.width=e.width,o.height=e.height,o.class=a,o.rx=3,o.ry=3,o.name=e.name,Wmt(s,o));e.rectData=o,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?k3(s,o.x+o.width-20,o.y+10,n.substr(1)):w3(s,o.x+o.width-20,o.y+10,n)),vyt(r,ql(e.description))(e.description,s,o.x,o.y,o.width,o.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(i=t.node().getBBox(),e.height=i.height,l=i.height),l},"drawActorTypeParticipant"),ryt=Ae(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,o=i+80,s=t.append("g").lower(),l=(n||(Jmt++,s.append("line").attr("id","actor"+Jmt).attr("x1",a).attr("y1",o).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=Jmt),t.append("g")),c="actor-man";return l.attr("class",c+=n?" "+Hmt:" actor-top"),l.attr("name",e.name),(s=T3()).x=e.x,s.y=i,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,l.append("line").attr("id","actor-man-torso"+Jmt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Jmt).attr("x1",a-jmt/2).attr("y1",i+33).attr("x2",a+jmt/2).attr("y2",i+33),l.append("line").attr("x1",a-jmt/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+jmt/2-2).attr("y2",i+60),(o=l.append("circle")).attr("cx",e.x+e.width/2),o.attr("cy",i+10),o.attr("r",15),o.attr("width",e.width),o.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,vyt(r,ql(e.description))(e.description,l,s.x,s.y+35,s.width,s.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),nyt=Ae(async function(t,e,r,n){switch(e.type){case"actor":return ryt(t,e,r,n);case"participant":return eyt(t,e,r,n)}},"drawActor"),iyt=Ae(function(t,e,r){t=t.append("g"),lyt(t,e),e.name&&vyt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),ayt=Ae(function(t){return t.append("g")},"anchorElement"),oyt=Ae(function(t,e,r,n,i){var a=T3(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,Wmt(o,a)},"drawActivation"),syt=Ae(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:o,labelBoxWidth:s,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=t.append("g"),d=Ae(function(t,e,r,n){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).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")}),E3());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=s||50,p.height=o||20,p.textMargin=a,p.class="labelText",Qmt(u,p),(p=myt()).text=e.title,p.x=e.startx+s/2+(e.stopx-e.startx)/2,p.y=e.starty+i+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=ql(p.text)?await Kmt(u,p,e):Zmt(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+i+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,ql(p.text)?(e.starty=e.sections[f].y,await Kmt(u,p,e)):Zmt(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-(i+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),lyt=Ae(function(t,e){x3(t,e)},"drawBackgroundRect"),cyt=Ae(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"),hyt=Ae(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"),uyt=Ae(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"),dyt=Ae(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"),pyt=Ae(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"),gyt=Ae(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"),fyt=Ae(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"),myt=Ae(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"),yyt=Ae(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ae(n,"byText"),Ae(c,"byTspan"),Ae(i,"byFo"),Ae(a,"byKatex"),Ae(f,"_setTextAttrs"),vyt=function(t,e=!1){return e?a:"fo"===t.textPlacement?i:"old"===t.textPlacement?n:c},Ae(e,"byText"),Ae(l,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),xyt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},byt={drawRect:Wmt,drawText:Zmt,drawLabel:Qmt,drawActor:nyt,drawBox:iyt,drawPopup:Vmt,anchorElement:ayt,drawActivation:oyt,drawLoop:syt,drawBackgroundRect:lyt,insertArrowHead:dyt,insertArrowFilledHead:pyt,insertSequenceNumber:gyt,insertArrowCrossHead:fyt,insertDatabaseIcon:cyt,insertComputerIcon:hyt,insertClockIcon:uyt,getTextObj:myt,getNoteRect:yyt,fixLifeLineHeights:tyt,sanitizeUrl:Ymt.sanitizeUrl}});async function Eyt(t,e){B.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,o=ql(i),i=o?await Yl(i,D()):H8.calculateTextDimensions(i,Nyt(P));o||(o=i.height/a,e.height+=o,B.bumpVerticalPos(o));let s,l=i.height-10,c=i.width;return r===n?(s=B.getVerticalPos()+l,P.rightAngles||(l+=P.boxMargin,s=B.getVerticalPos()+l),l+=30,a=L.getMax(c/2,P.width/2),B.insert(r-a,B.getVerticalPos()-10+l,n+a,B.getVerticalPos()+30+l)):(l+=P.boxMargin,s=B.getVerticalPos()+l,B.insert(r,s-10,n,s)),B.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,B.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),s}function _yt(t,e,r,n,i){B.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Nyt(P),e.message=H8.wrapLabel(`[${e.message}]`,r-2*P.wrapPadding,t),e.width=r,e.wrap=!0,r=H8.calculateTextDimensions(e.message,t),t=L.getMax(r.height,P.labelBoxHeight),a=n+t,R.debug(t+" - "+e.message)),i(e),B.bumpVerticalPos(a)}function Cyt(r,n,t,e,i,a,o){function s(t,e){t.x<i.get(r.from).x?(B.insert(n.stopx-e,n.starty,n.startx,n.stopy+t.height/2+P.noteMargin),n.stopx=n.stopx+e):(B.insert(n.startx,n.starty,n.stopx+e,n.stopy+t.height/2+P.noteMargin),n.stopx=n.stopx-e)}function l(t,e){t.x<i.get(r.to).x?(B.insert(n.startx-e,n.starty,n.stopx,n.stopy+t.height/2+P.noteMargin),n.startx=n.startx+e):(B.insert(n.stopx,n.starty,n.startx+e,n.stopy+t.height/2+P.noteMargin),n.startx=n.startx-e)}Ae(s,"receiverAdjustment"),Ae(l,"senderAdjustment"),a.get(r.to)==e?(s(a=i.get(r.to),"actor"==a.type?jmt/2+3:a.width/2+3),a.starty=t-a.height/2,B.bumpVerticalPos(a.height/2)):o.get(r.from)==e?(a=i.get(r.from),P.mirrorActors&&l(a,"actor"==a.type?jmt/2:a.width/2),a.stopy=t-a.height/2,B.bumpVerticalPos(a.height/2)):o.get(r.to)==e&&(a=i.get(r.to),P.mirrorActors&&s(a,"actor"==a.type?jmt/2+3:a.width/2+3),a.stopy=t-a.height/2,B.bumpVerticalPos(a.height/2))}async function Syt(t,e,r){var n,i={};for(n of e)if(t.get(n.to)&&t.get(n.from)){var a=t.get(n.to);if(n.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;var o=!(s=void 0!==n.placement),s=(s?Iyt:Nyt)(P),l=n.wrap?H8.wrapLabel(n.message,P.width-2*P.wrapPadding,s):n.message,l=(ql(l)?await Yl(n.message,D()):H8.calculateTextDimensions(l,s)).width+2*P.wrapPadding;o&&n.from===a.nextActor?i[n.to]=L.getMax(i[n.to]||0,l):o&&n.from===a.prevActor?i[n.from]=L.getMax(i[n.from]||0,l):o&&n.from===n.to?(i[n.from]=L.getMax(i[n.from]||0,l/2),i[n.to]=L.getMax(i[n.to]||0,l/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=L.getMax(i[n.from]||0,l):n.placement===r.db.PLACEMENT.LEFTOF?i[a.prevActor]=L.getMax(i[a.prevActor]||0,l):n.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(i[a.prevActor]=L.getMax(i[a.prevActor]||0,l/2)),a.nextActor)&&(i[n.from]=L.getMax(i[n.from]||0,l/2))}return R.debug("maxMessageWidthPerActor:",i),i}async function Ayt(n,t,e){let r=0;for(var i of n.keys()){(i=n.get(i)).wrap&&(i.description=H8.wrapLabel(i.description,P.width-2*P.wrapPadding,Myt(P)));var a=ql(i.description)?await Yl(i.description,D()):H8.calculateTextDimensions(i.description,Myt(P));i.width=i.wrap?P.width:L.getMax(P.width,a.width+2*P.wrapPadding),i.height=i.wrap?L.getMax(a.height,P.height):P.height,r=L.getMax(r,i.height)}for(var o in t){var s,l=n.get(o);l&&(s=(s=n.get(l.nextActor))?t[o]+P.actorMargin-l.width/2-s.width/2:t[o]+P.actorMargin-l.width/2,l.margin=L.getMax(s,P.actorMargin))}let c=0;return e.forEach(t=>{var e=Nyt(P),r=t.actorKeys.reduce((t,e)=>t+(n.get(e).width+(n.get(e).margin||0)),0),e=(r-=2*P.boxTextMargin,t.wrap&&(t.name=H8.wrapLabel(t.name,r-2*P.wrapPadding,e)),H8.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*P.wrapPadding));t.margin=P.boxTextMargin,r<e&&(t.margin+=(e-r)/2)}),e.forEach(t=>t.textMaxHeight=c),L.getMax(r,P.height)}var P,B,Lyt,Nyt,Iyt,Myt,Ryt,Dyt,Oyt,Pyt,Byt,Fyt,$yt,zyt,Gyt,Uyt,qyt,Yyt,jyt,Hyt=t(()=>{Q3(),Tyt(),e(),tc(),e5(),i(),Hr(),K8(),ec(),P={},B={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:Ae(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:Ae(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:Ae(function(t){this.boxes.push(t)},"addBox"),addActor:Ae(function(t){this.actors.push(t)},"addActor"),addLoop:Ae(function(t){this.loops.push(t)},"addLoop"),addMessage:Ae(function(t){this.messages.push(t)},"addMessage"),addNote:Ae(function(t){this.notes.push(t)},"addNote"),lastActor:Ae(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:Ae(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:Ae(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:Ae(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:Ae(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,Byt(D())},"init"),updateVal:Ae(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:Ae(function(n,i,a,o){let s=this,l=0;function t(r){return Ae(function(t){l++;var e=s.sequenceItems.length-l+1;s.updateVal(t,"starty",i-e*P.boxMargin,Math.min),s.updateVal(t,"stopy",o+e*P.boxMargin,Math.max),s.updateVal(B.data,"startx",n-e*P.boxMargin,Math.min),s.updateVal(B.data,"stopx",a+e*P.boxMargin,Math.max),"activation"!==r&&(s.updateVal(t,"startx",n-e*P.boxMargin,Math.min),s.updateVal(t,"stopx",a+e*P.boxMargin,Math.max),s.updateVal(B.data,"starty",i-e*P.boxMargin,Math.min),s.updateVal(B.data,"stopy",o+e*P.boxMargin,Math.max))},"updateItemBounds")}Ae(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:Ae(function(t,e,r,n){var i=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,n),e=L.getMax(e,n);this.updateVal(B.data,"startx",i,Math.min),this.updateVal(B.data,"starty",r,Math.min),this.updateVal(B.data,"stopx",t,Math.max),this.updateVal(B.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),newActivation:Ae(function(t,e,r){var r=r.get(t.from),n=Fyt(t.from).length||0,r=r.x+r.width/2+(n-1)*P.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+P.activationWidth,stopy:void 0,actor:t.from,anchored:byt.anchorElement(e)})},"newActivation"),endActivation:Ae(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:Ae(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:Ae(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:Ae(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:Ae(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:Ae(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:B.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:Ae(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:Ae(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:Ae(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:Ae(function(){return this.verticalPos},"getVerticalPos"),getBounds:Ae(function(){return{bounds:this.data,models:this.models}},"getBounds")},Lyt=Ae(async function(t,e){B.bumpVerticalPos(P.boxMargin),e.height=P.boxMargin,e.starty=B.getVerticalPos();var r=T3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||P.width,r.class="note",t.append("g")),n=byt.drawRect(t,r),t=((i=E3()).x=e.startx,i.y=e.starty,i.width=r.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=P.noteFontFamily,i.fontSize=P.noteFontSize,i.fontWeight=P.noteFontWeight,i.anchor=P.noteAlign,i.textMargin=P.noteMargin,i.valign="center",ql(i.text)?await Kmt(t,i):Zmt(t,i)),i=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",i+2*P.noteMargin),e.height+=i+2*P.noteMargin,B.bumpVerticalPos(i+2*P.noteMargin),e.stopy=e.starty+i+2*P.noteMargin,e.stopx=e.startx+r.width,B.insert(e.startx,e.starty,e.stopx,e.stopy),B.models.addNote(e)},"drawNote"),Nyt=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Iyt=Ae(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Myt=Ae(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),Ae(Eyt,"boundMessage"),Ryt=Ae(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:o,type:s,sequenceIndex:l,sequenceVisible:c}=e,h=H8.calculateTextDimensions(o,Nyt(P)),u=E3();u.x=e,u.y=a+10,u.width=i-e,u.class="messageText",u.dy="1em",u.text=o,u.fontFamily=P.messageFontFamily,u.fontSize=P.messageFontSize,u.fontWeight=P.messageFontWeight,u.anchor=P.messageAlign,u.valign="center",u.textMargin=P.wrapPadding,u.tspan=!1,ql(u.text)?await Kmt(t,u,{startx:e,stopx:i,starty:r}):Zmt(t,u);let d=h.width,p,g=(e===i?p=P.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(P.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",i),p.attr("y2",r)),s===n.db.LINETYPE.DOTTED||s===n.db.LINETYPE.DOTTED_CROSS||s===n.db.LINETYPE.DOTTED_POINT||s===n.db.LINETYPE.DOTTED_OPEN||s===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");P.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"),s!==n.db.LINETYPE.SOLID&&s!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),s!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&s!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),s!==n.db.LINETYPE.SOLID_POINT&&s!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),s!==n.db.LINETYPE.SOLID_CROSS&&s!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||P.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"),Dyt=Ae(function(t,e,r,n,i,a,o){let s=0,l=0,c,h=0;for(var u of n){var d=(u=e.get(u)).box;c&&c!=d&&(o||B.models.addBox(c),l+=P.boxMargin+c.margin),d&&d!=c&&(o||(d.x=s+l,d.y=i),l+=d.margin),u.width=u.width||P.width,u.height=L.getMax(u.height||P.height,P.height),u.margin=u.margin||P.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=s+l,u.starty=B.getVerticalPos(),B.insert(u.x,i,u.x+u.width,u.height),s+=u.width+l,u.box&&(u.box.width=s+d.margin-u.box.x),l=u.margin,c=u.box,B.models.addActor(u)}c&&!o&&B.models.addBox(c),B.bumpVerticalPos(h)},"addActorRenderingData"),Oyt=Ae(async function(e,r,n,t){if(t){let t=0;B.bumpVerticalPos(2*P.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=B.getVerticalPos()),i=await byt.drawActor(e,i,P,!0),t=L.getMax(t,i);B.bumpVerticalPos(t+P.boxMargin)}else for(var a of n)a=r.get(a),await byt.drawActor(e,a,P,!1)},"drawActors"),Pyt=Ae(function(t,e,r,n){let i=0,a=0;for(var o of r){var o=e.get(o),s=Gyt(o);(s=byt.drawPopup(t,o,s,P,P.forceMenus,n)).height>i&&(i=s.height),s.width+o.x>a&&(a=s.width+o.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Byt=Ae(function(t){ae(P,t),t.fontFamily&&(P.actorFontFamily=P.noteFontFamily=P.messageFontFamily=t.fontFamily),t.fontSize&&(P.actorFontSize=P.noteFontSize=P.messageFontSize=t.fontSize),t.fontWeight&&(P.actorFontWeight=P.noteFontWeight=P.messageFontWeight=t.fontWeight)},"setConf"),Fyt=Ae(function(e){return B.activations.filter(function(t){return t.actor===e})},"actorActivations"),$yt=Ae(function(t,e){return e=e.get(t),[(t=Fyt(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"),Ae(_yt,"adjustLoopHeightForWrap"),Ae(Cyt,"adjustCreatedDestroyedData"),zyt=Ae(async function(n,t,e,i){var{securityLevel:r,sequence:a}=D();P=a;let o;"sandbox"===r&&(o=O("#i"+t));var a=O("sandbox"===r?o.nodes()[0].contentDocument.body:"body"),s="sandbox"===r?o.nodes()[0].contentDocument:document;B.init(),R.debug(i.db);let l="sandbox"===r?a.select(`[id="${t}"]`):O(`[id="${t}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await Syt(c,g,i);if(P.height=await Ayt(c,v,d),byt.insertComputerIcon(l),byt.insertDatabaseIcon(l),byt.insertClockIcon(l),m&&(B.bumpVerticalPos(P.boxMargin),y)&&B.bumpVerticalPos(d[0].textMaxHeight),!0===P.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}Dyt(l,c,h,p,0,g,!1);var x,b,w,k=await Yyt(g,c,v,i);function T(t,e){var r=B.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),byt.drawActivation(l,r,e,P,Fyt(t.from).length),B.insert(r.startx,e-10,r.stopx,e)}byt.insertArrowHead(l),byt.insertArrowCrossHead(l),byt.insertArrowFilledHead(l),byt.insertSequenceNumber(l),Ae(T,"activeEnd");let E=1,_=1,C=[],S=[],A=0;for(x of g){let t,e,r;switch(x.type){case i.db.LINETYPE.NOTE:B.resetVerticalPos(),e=x.noteModel,await Lyt(l,e);break;case i.db.LINETYPE.ACTIVE_START:B.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,B.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:_yt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=B.endLoop(),await byt.drawLoop(l,t,"loop",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:_yt(k,x,P.boxMargin,P.boxMargin,t=>B.newLoop(void 0,t.message));break;case i.db.LINETYPE.RECT_END:t=B.endLoop(),S.push(t),B.models.addLoop(t),B.bumpVerticalPos(t.stopy-B.getVerticalPos());break;case i.db.LINETYPE.OPT_START:_yt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=B.endLoop(),await byt.drawLoop(l,t,"opt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:_yt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:_yt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=B.endLoop(),await byt.drawLoop(l,t,"alt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:_yt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t)),B.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:_yt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=B.endLoop(),await byt.drawLoop(l,t,"par",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:E=x.message.start||E,_=x.message.step||_,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:_yt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:_yt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=B.endLoop(),await byt.drawLoop(l,t,"critical",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:_yt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=B.endLoop(),await byt.drawLoop(l,t,"break",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;default:try{(r=x.msgModel).starty=B.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await Eyt(l,r);Cyt(x,r,L,A,c,h,u),C.push({messageModel:r,lineStartY:L}),B.models.addMessage(r)}catch(n){R.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=_),A++}R.debug("createdActors",h),R.debug("destroyedActors",u),await Oyt(l,c,p,!1);for(b of C)await Ryt(l,b.messageModel,b.lineStartY,i);P.mirrorActors&&await Oyt(l,c,p,!0),S.forEach(t=>byt.drawBackgroundRect(l,t)),tyt(l,c,p,P);for(w of B.models.boxes)w.height=B.getVerticalPos()-w.y,B.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)",byt.drawBox(l,w,P);m&&B.bumpVerticalPos(P.boxMargin),r=Pyt(l,c,p,s),void 0===(a=B.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*P.diagramMarginY,M=(P.mirrorActors&&(I=I-P.boxMargin+P.bottomMarginAdj),a.stopx-a.startx);t=(M<r.maxWidth?r.maxWidth:M)+2*P.diagramMarginX,f&&l.append("text").text(f).attr("x",(a.stopx-a.startx)/2-2*P.diagramMarginX).attr("y",-25),Vl(l,I,t,P.useMaxWidth),s=f?40:0,l.attr("viewBox",a.startx-P.diagramMarginX+" -"+(P.diagramMarginY+s)+" "+t+" "+(I+s)),R.debug("models:",B.models)},"draw"),Ae(Syt,"getMaxMessageWidthPerActor"),Gyt=Ae(function(t){let e=0,r=Myt(P);for(var n in t.links)n=H8.calculateTextDimensions(n,r).width+2*P.wrapPadding+2*P.boxMargin,e<n&&(e=n);return e},"getRequiredPopupWidth"),Ae(Ayt,"calculateActorMargins"),Uyt=Ae(async function(t,e,r){var n=e.get(t.from),e=e.get(t.to),i=n.x,a=e.x,o=t.wrap&&t.message,s=ql(t.message)?await Yl(t.message,D()):H8.calculateTextDimensions(o?H8.wrapLabel(t.message,P.width,Iyt(P)):t.message,Iyt(P)),l={width:o?P.width:L.getMax(P.width,s.width+2*P.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(l.width=o?L.getMax(P.width,s.width):L.getMax(n.width/2+e.width/2,s.width+2*P.noteMargin),l.startx=i+(n.width+P.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(l.width=o?L.getMax(P.width,s.width+2*P.noteMargin):L.getMax(n.width/2+e.width/2,s.width+2*P.noteMargin),l.startx=i-l.width+(n.width-P.actorMargin)/2):t.to===t.from?(s=H8.calculateTextDimensions(o?H8.wrapLabel(t.message,L.getMax(P.width,n.width),Iyt(P)):t.message,Iyt(P)),l.width=o?L.getMax(P.width,n.width):L.getMax(n.width,P.width,s.width+2*P.noteMargin),l.startx=i+(n.width-l.width)/2):(l.width=Math.abs(i+n.width/2-(a+e.width/2))+P.actorMargin,l.startx=i<a?i+n.width/2-P.actorMargin/2:a+e.width/2-P.actorMargin/2),o&&(l.message=H8.wrapLabel(t.message,l.width-2*P.wrapPadding,Iyt(P))),R.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${t.message}]`),l},"buildNoteModel"),qyt=Ae(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[n,i]=$yt(t.from,e),[a,o]=$yt(t.to,e),s=n<=a,l=s?i:n,c=s?a:o,h=2<Math.abs(a-o),u=Ae(t=>s?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(P.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=[n,i,a,o],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=H8.wrapLabel(t.message,L.getMax(r+2*P.wrapPadding,P.width),Nyt(P))),H8.calculateTextDimensions(t.message,Nyt(P)));return{width:L.getMax(t.wrap?0:d.width+2*P.wrapPadding,r+2*P.wrapPadding,P.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"),Yyt=Ae(async function(t,n,e,i){let a={},o=[],s,l,c;for(let r of t){switch(r.id=H8.random({length:10}),r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(s=o.pop(),a[s.id]=s,a[r.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=Fyt(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*P.activationWidth/2,stopx:h+P.activationWidth,actor:r.from,enabled:!0};B.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=B.activations.map(t=>t.actor).lastIndexOf(r.from),B.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Uyt(r,n,i),r.noteModel=l,o.forEach(t=>{(s=t).from=L.getMin(s.from,l.startx),s.to=L.getMax(s.to,l.startx+l.width),s.width=L.getMax(s.width,Math.abs(s.from-s.to))-P.labelBoxWidth})):(c=qyt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0<o.length&&o.forEach(t=>{var e;s=t,c.startx===c.stopx?(t=n.get(r.from),e=n.get(r.to),s.from=L.getMin(t.x-c.width/2,t.x-t.width/2,s.from),s.to=L.getMax(e.x+c.width/2,e.x+t.width/2,s.to),s.width=L.getMax(s.width,Math.abs(s.to-s.from))-P.labelBoxWidth):(s.from=L.getMin(c.startx,s.from),s.to=L.getMax(c.stopx,s.to),s.width=L.getMax(s.width,c.width)-P.labelBoxWidth)}))}return B.activations=[],R.debug("Loop type widths:",a),a},"calculateLoopBounds"),jyt={bounds:B,drawActors:Oyt,drawActorsPopup:Pyt,setConf:Byt,draw:zyt}}),Wyt={};J(Wyt,{diagram:()=>Vyt});var Vyt,Xyt,Kyt,Zyt,Qyt,Jyt,t2t,e2t,r2t,n2t,i2t,a2t,o2t,s2t,l2t,c2t,h2t,u2t,d2t,p2t,g2t,f2t,m2t,y2t,v2t,x2t,b2t,w2t,k2t,T2t,E2t,_2t,C2t,S2t,A2t,L2t,N2t,I2t,M2t,R2t,D2t,O2t,P2t,B2t,F2t,$2t,z2t,G2t,U2t,q2t,Y2t,j2t,H2t,W2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt=t(()=>{nmt(),wyt(),kyt(),Hyt(),Vyt={parser:emt,db:Gmt,renderer:jyt,styles:qmt,init:Ae(({wrap:t})=>{Gmt.setWrap(t)},"init")}}),nvt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,17],n=[1,18],i=[1,19],a=[1,39],o=[1,40],s=[1,25],l=[1,23],P=[1,24],B=[1,31],F=[1,32],$=[1,33],z=[1,34],G=[1,35],U=[1,36],q=[1,26],Y=[1,27],j=[1,28],H=[1,29],c=[1,43],W=[1,30],h=[1,42],u=[1,44],d=[1,41],p=[1,45],V=[1,9],g=[1,8,9],f=[1,56],m=[1,57],y=[1,58],v=[1,59],x=[1,60],X=[1,61],K=[1,62],b=[1,8,9,39],Z=[1,74],w=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],k=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],T=[13,74,80,95,97,98],E=[13,64,65,74,80,95,97,98],Q=[13,59,60,61,62,63,74,80,95,97,98],J=[1,93],_=[1,110],C=[1,108],S=[1,102],A=[1,103],L=[1,104],N=[1,105],I=[1,106],M=[1,107],R=[1,109],tt=[1,8,9,37,39,42],D=[1,8,9,21],et=[1,8,9,78],O=[1,8,9,21,73,74,78,80,81,82,83,84,85],k={trace:Ae(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,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 11:case 12:this.$=a[s];break;case 10:case 13:this.$=a[s-1]+a[s];break;case 14:case 15:this.$=a[s-1]+"~"+a[s]+"~";break;case 16:n.addRelation(a[s]);break;case 17:a[s-1].title=n.cleanupLabel(a[s]),n.addRelation(a[s-1]);break;case 27:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(a[s-3],a[s-1]);break;case 31:n.addClassesToNamespace(a[s-4],a[s-1]);break;case 32:this.$=a[s],n.addNamespace(a[s]);break;case 33:this.$=[a[s]];break;case 34:this.$=[a[s-1]];break;case 35:a[s].unshift(a[s-2]),this.$=a[s];break;case 37:n.setCssClass(a[s-2],a[s]);break;case 38:n.addMembers(a[s-3],a[s-1]);break;case 39:n.setCssClass(a[s-5],a[s-3]),n.addMembers(a[s-5],a[s-1]);break;case 40:this.$=a[s],n.addClass(a[s]);break;case 41:this.$=a[s-1],n.addClass(a[s-1]),n.setClassLabel(a[s-1],a[s]);break;case 42:n.addAnnotation(a[s],a[s-2]);break;case 43:this.$=[a[s]];break;case 44:a[s].push(a[s-1]),this.$=a[s];break;case 45:break;case 46:n.addMember(a[s-1],n.cleanupLabel(a[s]));break;case 47:case 48:break;case 49:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 51:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 52:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 53:n.addNote(a[s],a[s-1]);break;case 54:n.addNote(a[s]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 60:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 61:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 62:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=a[s-2],n.setClickEvent(a[s-1],a[s]);break;case 71:case 77:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1]),n.setTooltip(a[s-2],a[s]);break;case 72:this.$=a[s-2],n.setLink(a[s-1],a[s]);break;case 73:this.$=a[s-3],n.setLink(a[s-2],a[s-1],a[s]);break;case 74:this.$=a[s-3],n.setLink(a[s-2],a[s-1]),n.setTooltip(a[s-2],a[s]);break;case 75:this.$=a[s-4],n.setLink(a[s-3],a[s-2],a[s]),n.setTooltip(a[s-3],a[s-1]);break;case 78:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 79:this.$=a[s-4],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setTooltip(a[s-3],a[s]);break;case 80:this.$=a[s-3],n.setLink(a[s-2],a[s]);break;case 81:this.$=a[s-4],n.setLink(a[s-3],a[s-1],a[s]);break;case 82:this.$=a[s-4],n.setLink(a[s-3],a[s-1]),n.setTooltip(a[s-3],a[s]);break;case 83:this.$=a[s-5],n.setLink(a[s-4],a[s-2],a[s]),n.setTooltip(a[s-4],a[s-1]);break;case 84:this.$=a[s-2],n.setCssStyle(a[s-1],a[s]);break;case 85:n.setCssClass(a[s-1],a[s]);break;case 86:this.$=[a[s]];break;case 87:a[s-2].push(a[s]),this.$=a[s-2];break;case 89:this.$=a[s-1]+a[s]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:r,33:n,35:i,36:21,40:a,41:22,44:o,45:s,47:l,48:P,50:B,52:F,53:$,54:z,55:G,56:U,66:q,67:Y,69:j,73:H,74:c,76:W,80:h,95:u,97:d,98:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(V,[2,5],{8:[1,46]}),{8:[1,47]},e(g,[2,16],{21:[1,48]}),e(g,[2,18]),e(g,[2,19]),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]),{32:[1,49]},{34:[1,50]},e(g,[2,29]),e(g,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:f,60:m,61:y,62:v,63:x,64:X,65:K}),{37:[1,63]},e(b,[2,36],{37:[1,65],42:[1,64]}),e(g,[2,47]),e(g,[2,48]),{16:66,74:c,80:h,95:u,97:d},{16:37,17:67,18:38,74:c,80:h,95:u,97:d,98:p},{16:37,17:68,18:38,74:c,80:h,95:u,97:d,98:p},{16:37,17:69,18:38,74:c,80:h,95:u,97:d,98:p},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:c,80:h,95:u,97:d,98:p},{13:Z,51:73},e(g,[2,55]),e(g,[2,56]),e(g,[2,57]),e(g,[2,58]),e(w,[2,11],{16:37,18:38,17:75,19:[1,76],74:c,80:h,95:u,97:d,98:p}),e(w,[2,12],{19:[1,77]}),{15:78,16:79,74:c,80:h,95:u,97:d},{16:37,17:80,18:38,74:c,80:h,95:u,97:d,98:p},e(k,[2,112]),e(k,[2,113]),e(k,[2,114]),e(k,[2,115]),e([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),e(V,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:r,33:n,35:i,40:a,44:o,45:s,47:l,48:P,50:B,52:F,53:$,54:z,55:G,56:U,66:q,67:Y,69:j,73:H,74:c,76:W,80:h,95:u,97:d,98:p}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:r,33:n,35:i,36:21,40:a,41:22,44:o,45:s,47:l,48:P,50:B,52:F,53:$,54:z,55:G,56:U,66:q,67:Y,69:j,73:H,74:c,76:W,80:h,95:u,97:d,98:p},e(g,[2,17]),e(g,[2,27]),e(g,[2,28]),{13:[1,84],16:37,17:83,18:38,74:c,80:h,95:u,97:d,98:p},{49:85,57:54,58:55,59:f,60:m,61:y,62:v,63:x,64:X,65:K},e(g,[2,46]),{58:86,64:X,65:K},e(T,[2,62],{57:87,59:f,60:m,61:y,62:v,63:x}),e(E,[2,63]),e(E,[2,64]),e(E,[2,65]),e(E,[2,66]),e(E,[2,67]),e(Q,[2,68]),e(Q,[2,69]),{8:[1,89],23:90,38:88,41:22,44:o},{16:91,74:c,80:h,95:u,97:d},{43:92,47:J},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:_,73:C,74:S,75:99,77:100,79:101,80:A,81:L,82:N,83:I,84:M,85:R},{74:[1,111]},{13:Z,51:112},e(g,[2,54]),e(g,[2,117]),e(w,[2,13]),e(w,[2,14]),e(w,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:c,80:h,95:u,97:d},e(tt,[2,40],{11:114,12:[1,115]}),e(V,[2,7]),{9:[1,116]},e(D,[2,49]),{16:37,17:117,18:38,74:c,80:h,95:u,97:d,98:p},{13:[1,119],16:37,17:118,18:38,74:c,80:h,95:u,97:d,98:p},e(T,[2,61],{57:120,59:f,60:m,61:y,62:v,63:x}),e(T,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:o},{8:[1,123],39:[2,33]},e(b,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:J},{16:37,17:127,18:38,74:c,80:h,95:u,97:d,98:p},e(g,[2,70],{13:[1,128]}),e(g,[2,72],{13:[1,130],68:[1,129]}),e(g,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},e(g,[2,84],{78:[1,134]}),e(et,[2,86],{79:135,21:_,73:C,74:S,80:A,81:L,82:N,83:I,84:M,85:R}),e(O,[2,88]),e(O,[2,90]),e(O,[2,91]),e(O,[2,92]),e(O,[2,93]),e(O,[2,94]),e(O,[2,95]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(g,[2,85]),e(g,[2,53]),{37:[2,10]},e(tt,[2,41]),{13:[1,136]},{1:[2,4]},e(D,[2,51]),e(D,[2,50]),{16:37,17:137,18:38,74:c,80:h,95:u,97:d,98:p},e(T,[2,59]),e(g,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:o},{43:140,47:J},e(b,[2,38]),{39:[2,44]},e(g,[2,42]),e(g,[2,71]),e(g,[2,73]),e(g,[2,74],{68:[1,141]}),e(g,[2,77]),e(g,[2,78],{13:[1,142]}),e(g,[2,80],{13:[1,144],68:[1,143]}),{21:_,73:C,74:S,77:145,79:101,80:A,81:L,82:N,83:I,84:M,85:R},e(O,[2,89]),{14:[1,146]},e(D,[2,52]),e(g,[2,31]),{39:[2,35]},{39:[1,147]},e(g,[2,75]),e(g,[2,79]),e(g,[2,81]),e(g,[2,82],{68:[1,148]}),e(et,[2,87],{79:135,21:_,73:C,74:S,80:A,81:L,82:N,83:I,84:M,85:R}),e(tt,[2,8]),e(b,[2,39]),e(g,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:case 5:break;case 6:return this.begin("acc_title"),31;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 22:this.popState();break;case 23:return 71;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;case 29:return this.popState(),8;case 30:break;case 31:return this.begin("namespace-body"),37;case 32:return this.popState(),39;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),44;case 38:return this.popState(),8;case 39:break;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 42:return this.popState(),39;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:case 64:case 65:case 66:return 68;case 67:case 68:return 60;case 69:case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:case 84:return 84;case 85:return 85;case 86:case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:case 95:return 83;case 96:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_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,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};k.lexer=r,Ae(t,"Parser"),(Xyt=new((t.prototype=k).Parser=t)).parser=Xyt,Kyt=Xyt}),ivt=t(()=>{i(),tc(),Zyt=["#","+","~","-",""],Qyt=class{static{Ae(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",e=Sl(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Bl(this.id);"method"===this.memberType&&(t+=`(${Bl(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Bl(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";var r,n,i;"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(n=r[1]?r[1].trim():"",Zyt.includes(n)&&(this.visibility=n),this.id=r[2].trim(),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),Zyt.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),avt=t(()=>{Q3(),e(),i(),tc(),K8(),fh(),ivt(),Jyt="classId-",t2t=[],e2t=new Map,r2t=[],n2t=0,i2t=new Map,a2t=0,o2t=[],s2t=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),l2t=Ae(function(t){let e=L.sanitizeText(t,D()),r="",n=e;return 0<e.indexOf("~")&&(t=e.split("~"),n=s2t(t[0]),r=s2t(t[1])),{className:n,type:r}},"splitClassNameAndType"),c2t=Ae(function(t,e){t=L.sanitizeText(t,D()),e=e&&s2t(e),t=l2t(t).className,e2t.get(t).label=e},"setClassLabel"),h2t=Ae(function(t){var t=L.sanitizeText(t,D()),{className:t,type:e}=l2t(t);e2t.has(t)||(t=L.sanitizeText(t,D()),e2t.set(t,{id:t,type:e,label:t,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:Jyt+t+"-"+n2t}),n2t++)},"addClass"),u2t=Ae(function(t){if(t=L.sanitizeText(t,D()),e2t.has(t))return e2t.get(t).domId;throw new Error("Class not found: "+t)},"lookUpDomId"),d2t=Ae(function(){t2t=[],e2t=new Map,r2t=[],(o2t=[]).push(M2t),i2t=new Map,a2t=0,R2t="TB",lc()},"clear"),p2t=Ae(function(t){return e2t.get(t)},"getClass"),g2t=Ae(function(){return e2t},"getClasses"),f2t=Ae(function(){return t2t},"getRelations"),m2t=Ae(function(){return r2t},"getNotes"),y2t=Ae(function(t){R.debug("Adding relation: "+JSON.stringify(t)),h2t(t.id1),h2t(t.id2),t.id1=l2t(t.id1).className,t.id2=l2t(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),D()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),D()),t2t.push(t)},"addRelation"),v2t=Ae(function(t,e){t=l2t(t).className,e2t.get(t).annotations.push(e)},"addAnnotation"),x2t=Ae(function(t,e){h2t(t),t=l2t(t).className,t=e2t.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(s2t(e.substring(2,e.length-2))):0<e.indexOf(")")?t.methods.push(new Qyt(e,"method")):e&&t.members.push(new Qyt(e,"attribute")))},"addMember"),b2t=Ae(function(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>x2t(e,t)))},"addMembers"),w2t=Ae(function(t,e){e={id:"note"+r2t.length,class:e,text:t},r2t.push(e)},"addNote"),k2t=Ae(function(t){return t.startsWith(":")&&(t=t.substring(1)),s2t(t.trim())},"cleanupLabel"),T2t=Ae(function(t,r){t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=Jyt+e),(t=e2t.get(e))&&t.cssClasses.push(r)})},"setCssClass"),E2t=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==e&&(e2t.get(t).tooltip=s2t(e))})},"setTooltip"),_2t=Ae(function(t,e){return(e&&i2t.has(e)?i2t.get(e).classes:e2t).get(t).tooltip},"getTooltip"),C2t=Ae(function(t,r,n){let i=D();t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=Jyt+e),(t=e2t.get(e))&&(t.link=H8.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?s2t(n):"_blank")}),T2t(t,"clickable")},"setLink"),S2t=Ae(function(t,e,r){t.split(",").forEach(function(t){A2t(t,e,r),e2t.get(t).haveCallback=!0}),T2t(t,"clickable")},"setClickEvent"),A2t=Ae(function(t,n,i){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==n&&e2t.has(t)){let e=u2t(t),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(e),o2t.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){H8.runFunc(n,...r)},!1)})}},"setClickFunc"),L2t=Ae(function(e){o2t.forEach(function(t){t(e)})},"bindFunctions"),N2t={LINE:0,DOTTED_LINE:1},I2t={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},M2t=Ae(function(t){let r=O(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=O("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),O(t).select("svg").selectAll("g.node").on("mouseover",function(){var t,e=O(this);null!==e.attr("title")&&(t=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),o2t.push(M2t),R2t="TB",D2t=Ae(()=>R2t,"getDirection"),O2t=Ae(t=>{R2t=t},"setDirection"),P2t=Ae(function(t){i2t.has(t)||(i2t.set(t,{id:t,classes:new Map,children:{},domId:Jyt+t+"-"+a2t}),a2t++)},"addNamespace"),B2t=Ae(function(t){return i2t.get(t)},"getNamespace"),F2t=Ae(function(){return i2t},"getNamespaces"),$2t=Ae(function(t,e){if(i2t.has(t))for(var r of e)r=l2t(r).className,e2t.get(r).parent=t,i2t.get(t).classes.set(r,e2t.get(r))},"addClassesToNamespace"),z2t=Ae(function(t,e){var r=e2t.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),G2t={setAccTitle:cc,getAccTitle:hc,getAccDescription:dc,setAccDescription:uc,getConfig:Ae(()=>D().class,"getConfig"),addClass:h2t,bindFunctions:L2t,clear:d2t,getClass:p2t,getClasses:g2t,getNotes:m2t,addAnnotation:v2t,addNote:w2t,getRelations:f2t,addRelation:y2t,getDirection:D2t,setDirection:O2t,addMember:x2t,addMembers:b2t,cleanupLabel:k2t,lineType:N2t,relationType:I2t,setClickEvent:S2t,setCssClass:T2t,setLink:C2t,getTooltip:_2t,setTooltip:E2t,lookUpDomId:u2t,setDiagramTitle:pc,getDiagramTitle:gc,setClassLabel:c2t,addNamespace:P2t,addClassesToNamespace:$2t,getNamespace:B2t,getNamespaces:F2t,setCssStyle:z2t}}),ovt=t(()=>{U2t=Ae(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};
|
|
|
}
|
|
|
.edgeLabel .label span {
|
|
|
background: ${t.mainBkg};
|
|
|
}
|
|
|
|
|
|
.classTitle {
|
|
|
font-weight: bolder;
|
|
|
}
|
|
|
.node rect,
|
|
|
.node circle,
|
|
|
.node ellipse,
|
|
|
.node polygon,
|
|
|
.node path {
|
|
|
fill: ${t.mainBkg};
|
|
|
stroke: ${t.nodeBorder};
|
|
|
stroke-width: 1px;
|
|
|
}
|
|
|
|
|
|
|
|
|
.divider {
|
|
|
stroke: ${t.nodeBorder};
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
g.clickable {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
g.classGroup rect {
|
|
|
fill: ${t.mainBkg};
|
|
|
stroke: ${t.nodeBorder};
|
|
|
}
|
|
|
|
|
|
g.classGroup line {
|
|
|
stroke: ${t.nodeBorder};
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
.classLabel .box {
|
|
|
stroke: none;
|
|
|
stroke-width: 0;
|
|
|
fill: ${t.mainBkg};
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
|
|
|
.classLabel .label {
|
|
|
fill: ${t.nodeBorder};
|
|
|
font-size: 10px;
|
|
|
}
|
|
|
|
|
|
.relation {
|
|
|
stroke: ${t.lineColor};
|
|
|
stroke-width: 1;
|
|
|
fill: none;
|
|
|
}
|
|
|
|
|
|
.dashed-line{
|
|
|
stroke-dasharray: 3;
|
|
|
}
|
|
|
|
|
|
.dotted-line{
|
|
|
stroke-dasharray: 1 2;
|
|
|
}
|
|
|
|
|
|
#compositionStart, .composition {
|
|
|
fill: ${t.lineColor} !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#compositionEnd, .composition {
|
|
|
fill: ${t.lineColor} !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#dependencyStart, .dependency {
|
|
|
fill: ${t.lineColor} !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#dependencyStart, .dependency {
|
|
|
fill: ${t.lineColor} !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#extensionStart, .extension {
|
|
|
fill: transparent !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#extensionEnd, .extension {
|
|
|
fill: transparent !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#aggregationStart, .aggregation {
|
|
|
fill: transparent !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#aggregationEnd, .aggregation {
|
|
|
fill: transparent !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#lollipopStart, .lollipop {
|
|
|
fill: ${t.mainBkg} !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
#lollipopEnd, .lollipop {
|
|
|
fill: ${t.mainBkg} !important;
|
|
|
stroke: ${t.lineColor} !important;
|
|
|
stroke-width: 1;
|
|
|
}
|
|
|
|
|
|
.edgeTerminals {
|
|
|
font-size: 11px;
|
|
|
line-height: initial;
|
|
|
}
|
|
|
|
|
|
.classTitleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: 18px;
|
|
|
fill: ${t.textColor};
|
|
|
}
|
|
|
`,"getStyles"),q2t=U2t}),svt=t(()=>{Q3(),K8(),e(),tc(),Y2t=0,j2t=Ae(function(t,e,r,n,i){var a=Ae(function(t){switch(t){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let o=e.points,s=Kb().x(function(t){return t.x}).y(function(t){return t.y}).curve(d4),l=t.append("path").attr("d",s(o)).attr("id","edge"+Y2t).attr("class","relation"),c="";n.arrowMarkerAbsolute&&(c=(c=(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==r.relation.lineType&&l.attr("class","relation dashed-line"),10==r.relation.lineType&&l.attr("class","relation dotted-line"),"none"!==r.relation.type1&&l.attr("marker-start","url("+c+"#"+a(r.relation.type1)+"Start)"),"none"!==r.relation.type2&&l.attr("marker-end","url("+c+"#"+a(r.relation.type2)+"End)");var h,a=e.points.length,u=(d=H8.calcLabelPosition(e.points)).x,d=d.y;let p,g,f,m;a%2!=0&&1<a&&(h=H8.calcCardinalityPosition("none"!==r.relation.type1,e.points,e.points[0]),e=H8.calcCardinalityPosition("none"!==r.relation.type2,e.points,e.points[a-1]),R.debug("cardinality_1_point "+JSON.stringify(h)),R.debug("cardinality_2_point "+JSON.stringify(e)),p=h.x,g=h.y,f=e.x,m=e.y),void 0!==r.title&&(h=(a=t.append("g").attr("class","classLabel")).append("text").attr("class","label").attr("x",u).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title),e=(window.label=h).node().getBBox(),a.insert("rect",":first-child").attr("class","box").attr("x",e.x-n.padding/2).attr("y",e.y-n.padding/2).attr("width",e.width+n.padding).attr("height",e.height+n.padding)),R.info("Rendering relation "+JSON.stringify(r)),void 0!==r.relationTitle1&&"none"!==r.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",p).attr("y",g).attr("fill","black").attr("font-size","6").text(r.relationTitle1),void 0!==r.relationTitle2&&"none"!==r.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",f).attr("y",m).attr("fill","black").attr("font-size","6").text(r.relationTitle2),Y2t++},"drawEdge"),H2t=Ae(function(t,r,n,e){R.debug("Rendering class ",r,n);let i=r.id,a={id:i,label:r.id,width:0,height:0},o=t.append("g").attr("id",e.db.lookUpDomId(i)).attr("class","classGroup"),s,l=(s=(r.link?o.append("svg:a").attr("xlink:href",r.link).attr("target",r.linkTarget):o).append("text").attr("y",n.textHeight+n.padding).attr("x",0),!0),c=(r.annotations.forEach(function(t){t=s.append("tspan").text("«"+t+"»"),l||t.attr("dy",n.textHeight),l=!1}),t=W2t(r),e=s.append("tspan").text(t).attr("class","title"),l||e.attr("dy",n.textHeight),s.node().getBBox().height),h,u,d;if(0<r.members.length){h=o.append("line").attr("x1",0).attr("y1",n.padding+c+n.dividerMargin/2).attr("y2",n.padding+c+n.dividerMargin/2);let e=o.append("text").attr("x",n.padding).attr("y",c+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");l=!0,r.members.forEach(function(t){X2t(e,t,l,n),l=!1}),u=e.node().getBBox()}if(0<r.methods.length){d=o.append("line").attr("x1",0).attr("y1",n.padding+c+n.dividerMargin+u.height).attr("y2",n.padding+c+n.dividerMargin+u.height);let e=o.append("text").attr("x",n.padding).attr("y",c+2*n.dividerMargin+u.height+n.textHeight).attr("fill","white").attr("class","classText");l=!0,r.methods.forEach(function(t){X2t(e,t,l,n),l=!1})}t=o.node().getBBox(),e=" ",0<r.cssClasses.length&&(e+=r.cssClasses.join(" "));let p=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",t.width+2*n.padding).attr("height",t.height+n.padding+.5*n.dividerMargin).attr("class",e).node().getBBox().width;return s.node().childNodes.forEach(function(t){t.setAttribute("x",(p-t.getBBox().width)/2)}),r.tooltip&&s.insert("title").text(r.tooltip),h&&h.attr("x2",p),d&&d.attr("x2",p),a.width=p,a.height=t.height+n.padding+.5*n.dividerMargin,a},"drawClass"),W2t=Ae(function(t){let e=t.id;return t.type&&(e+="<"+Bl(t.type)+">"),e},"getClassTitleString"),V2t=Ae(function(t,e,r,n){R.debug("Rendering note ",e,r);let i=e.id,a={id:i,text:e.text,width:0,height:0},o=t.append("g").attr("id",i).attr("class","classGroup"),s=o.append("text").attr("y",r.textHeight+r.padding).attr("x",0),l=JSON.parse(`"${e.text}"`).split(`
|
|
|
`),c=(l.forEach(function(t){R.debug("Adding line: "+t),s.append("tspan").text(t).attr("class","title").attr("dy",r.textHeight)}),o.node().getBBox()),h=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",c.width+2*r.padding).attr("height",c.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach(function(t){t.setAttribute("x",(h-t.getBBox().width)/2)}),a.width=h,a.height=c.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,a},"drawNote"),X2t=Ae(function(t,e,r,n){var{displayText:i,cssStyle:a}=e.getDisplayDetails(),t=t.append("tspan").attr("x",n.padding).text(i);""!==a&&t.attr("style",e.cssStyle),r||t.attr("dy",n.textHeight)},"addTspan"),K2t={getClassTitleString:W2t,drawClass:H2t,drawEdge:j2t,drawNote:V2t}}),lvt=t(()=>{Q3(),yj(),iU(),e(),svt(),ec(),i(),Z2t={},Q2t=Ae(function(e){var t=Object.entries(Z2t).find(t=>t[1].label===e);if(t)return t[0]},"getGraphId"),J2t=Ae(function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),tvt=Ae(function(t,e,r,n){let i=D().class,a=(Z2t={},R.info("Rendering diagram "+t),D().securityLevel),o,s=("sandbox"===a&&(o=O("#i"+e)),O("sandbox"===a?o.nodes()[0].contentDocument.body:"body")),l=s.select(`[id='${e}']`),c=(J2t(l),new rU({multigraph:!0})),h=(c.setGraph({isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}}),n.db.getClasses()),u=[...h.keys()];for(var d of u)d=h.get(d),d=K2t.drawClass(l,d,i,n),Z2t[d.id]=d,c.setNode(d.id,d),R.info("Org height: "+d.height);n.db.getRelations().forEach(function(t){R.info("tjoho"+Q2t(t.id1)+Q2t(t.id2)+JSON.stringify(t)),c.setEdge(Q2t(t.id1),Q2t(t.id2),{relation:t},t.title||"DEFAULT")}),n.db.getNotes().forEach(function(t){R.debug("Adding note: "+JSON.stringify(t));var e=K2t.drawNote(l,t,i,n);Z2t[e.id]=e,c.setNode(e.id,e),t.class&&h.has(t.class)&&c.setEdge(t.id,Q2t(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),YY(c),c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)&&(R.debug("Node "+t+": "+JSON.stringify(c.node(t))),s.select("#"+(n.db.lookUpDomId(t)||t)).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y-c.node(t).height/2)+" )"))}),c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),K2t.drawEdge(l,c.edge(t),c.edge(t).relation,i,n))});var e=(t=l.node().getBBox()).width+40,p=t.height+40,t=(Vl(l,p,e,i.useMaxWidth),`${t.x-20} ${t.y-20} ${e} `+p);R.debug("viewBox "+t),l.attr("viewBox",t)},"draw"),evt={draw:tvt}}),cvt={};J(cvt,{diagram:()=>hvt});var hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt,kvt,Tvt,Evt,_vt,Cvt,Svt,Avt,Lvt,Nvt,Ivt,Mvt,Rvt,Dvt,Ovt,Pvt,Bvt,Fvt,$vt,zvt,Gvt,Uvt,qvt,Yvt,jvt,Hvt,Wvt,Vvt=t(()=>{nvt(),avt(),ovt(),lvt(),hvt={parser:Kyt,db:G2t,renderer:evt,styles:q2t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,G2t.clear()},"init")}}),Xvt=t(()=>{e(),uvt=Ae((e,t,r,n)=>{t.forEach(t=>{wvt[t](e,r,n)})},"insertMarkers"),dvt=Ae((t,e,r)=>{R.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"),pvt=Ae((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"),gvt=Ae((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"),fvt=Ae((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"),mvt=Ae((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"),yvt=Ae((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"),vvt=Ae((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"),xvt=Ae((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"),bvt=Ae((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"),wvt={extension:dvt,composition:pvt,aggregation:gvt,dependency:fvt,lollipop:mvt,point:yvt,circle:vvt,cross:xvt,barb:bvt},kvt=uvt}),Kvt=t(()=>{e(),Pj(),iU(),Tvt={},Evt={},_vt={},Cvt=Ae(()=>{Evt={},_vt={},Tvt={}},"clear"),Svt=Ae((t,e)=>(R.trace("In isDescendant",e," ",t," = ",Evt[e].includes(t)),!!Evt[e].includes(t)),"isDescendant"),Avt=Ae((t,e)=>(R.info("Descendants of ",e," is ",Evt[e]),R.info("Edge is ",t),t.v!==e&&t.w!==e&&(Evt[e]?Evt[e].includes(t.v)||Svt(t.v,e)||Svt(t.w,e)||Evt[e].includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))),"edgeInCluster"),Lvt=Ae((r,n,i,a)=>{R.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),R.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0<n.children(t).length?Lvt(t,n,i,a):(e=n.node(t),R.info("cp ",t," to ",a," with parent ",r),i.setNode(t,e),a!==n.parent(t)&&(R.warn("Setting parent",t,n.parent(t)),i.setParent(t,n.parent(t))),r!==a&&t!==r?(R.debug("Setting parent",t,r),i.setParent(t,r)):(R.info("In copy ",r,"root",a,"data",n.node(r),a),R.debug("Not Setting parent for node=",t,"cluster!==rootId",r!==a,"node!==clusterId",t!==r)),e=n.edges(t),R.debug("Copying Edges",e),e.forEach(t=>{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{Avt(t,a)?(R.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),R.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):R.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){R.error(t)}})),R.debug("Removing node",t),n.removeNode(t)})},"copy"),Nvt=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)_vt[i]=t,n=[...n,...Nvt(i,e)];return n},"extractDescendants"),Ivt=Ae((t,e)=>{R.trace("Searching",t);var r,n=e.children(t);if(R.trace("Searching children of id ",t,n),n.length<1)return R.trace("This is a valid node",t),t;for(r of n){var i=Ivt(r,e);if(i)return R.trace("Found replacement for",t," => ",i),i}},"findNonClusterChild"),Mvt=Ae(t=>Tvt[t]&&Tvt[t].externalConnections&&Tvt[t]?Tvt[t].id:t,"getAnchorId"),Rvt=Ae((s,t)=>{if(!s||10<t)R.debug("Opting out, no graph ");else{R.debug("Opting in, graph "),s.nodes().forEach(function(t){0<s.children(t).length&&(R.warn("Cluster identified",t," Replacement id in edges: ",Ivt(t,s)),Evt[t]=Nvt(t,s),Tvt[t]={id:Ivt(t,s),clusterData:s.node(t)})}),s.nodes().forEach(function(e){var t=s.children(e),r=s.edges();0<t.length?(R.debug("Cluster identified",e,Evt),r.forEach(t=>{t.v!==e&&t.w!==e&&Svt(t.v,e)^Svt(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",Evt[e]),Tvt[e].externalConnections=!0)})):R.debug("Not a cluster ",e,Evt)});for(var e of Object.keys(Tvt)){var r=Tvt[e].id;(r=s.parent(r))!==e&&Tvt[r]&&!Tvt[r].externalConnections&&(Tvt[e].id=r)}s.edges().forEach(function(t){var e,r,n,i=s.edge(t);R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(s.edge(t)));let a=t.v,o=t.w;R.warn("Fix XXX",Tvt,"ids:",t.v,t.w,"Translating: ",Tvt[t.v]," --- ",Tvt[t.w]),Tvt[t.v]&&Tvt[t.w]&&Tvt[t.v]===Tvt[t.w]?(R.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),R.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),a=Mvt(t.v),o=Mvt(t.w),s.removeEdge(t.v,t.w,t.name),n=t.w+"---"+t.v,s.setNode(n,{domId:n,id:n,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""}),r=structuredClone(i),e=structuredClone(i),r.label="",r.arrowTypeEnd="none",e.label="",r.fromCluster=t.v,e.toCluster=t.v,s.setEdge(a,n,r,t.name+"-cyclic-special"),s.setEdge(n,o,e,t.name+"-cyclic-special")):(Tvt[t.v]||Tvt[t.w])&&(R.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),a=Mvt(t.v),o=Mvt(t.w),s.removeEdge(t.v,t.w,t.name),a!==t.v&&(r=s.parent(a),Tvt[r].externalConnections=!0,i.fromCluster=t.v),o!==t.w&&(n=s.parent(o),Tvt[n].externalConnections=!0,i.toCluster=t.w),R.warn("Fix Replacing with XXX",a,o,t.name),s.setEdge(a,o,i,t.name))}),R.warn("Adjusted Graph",vj(s)),Dvt(s,0),R.trace(Tvt)}},"adjustClustersAndEdges"),Dvt=Ae((r,n)=>{if(R.warn("extractor - ",n,vj(r),r.children("D")),10<n)R.error("Bailing out");else{let t=r.nodes(),e=!1;for(var i of t)i=r.children(i),e=e||0<i.length;if(e){R.debug("Nodes = ",t,n);for(var a of t)if(R.debug("Extracting node",a,Tvt,Tvt[a]&&!Tvt[a].externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",n),Tvt[a])if(!Tvt[a].externalConnections&&r.children(a)&&0<r.children(a).length){R.warn("Cluster without external connections, without a parent and with children",a,n);let t="TB"===r.graph().rankdir?"LR":"TB";Tvt[a]?.clusterData?.dir&&(t=Tvt[a].clusterData.dir,R.warn("Fixing dir",Tvt[a].clusterData.dir,t));var o=new rU({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});R.warn("Old graph before copy",vj(r)),Lvt(a,r,o,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:Tvt[a].clusterData,labelText:Tvt[a].labelText,graph:o}),R.warn("New graph after copy node: (",a,")",vj(o)),R.debug("Old graph after copy",vj(r))}else R.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!Tvt[a].externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),n),R.debug(Tvt);else R.debug("Not a cluster",a,n);t=r.nodes(),R.warn("New list of nodes",t);for(var s of t){var l=r.node(s);R.warn(" Now next level",s,l),l.clusterNode&&Dvt(l.graph,n+1)}}else R.debug("Done, no node has children",r.nodes())}},"extractor"),Ovt=Ae((e,t)=>{if(0===t.length)return[];let r=Object.assign(t);return t.forEach(t=>{t=e.children(t),t=Ovt(e,t),r=[...r,...t]}),r},"sorter"),Pvt=Ae(t=>Ovt(t,t.children()),"sortNodesByHierarchy")}),Zvt=t(()=>{wS(),e(),eS(),KC(),Q3(),i(),tc(),dA(),Bvt=Ae((t,e)=>{R.info("Creating subgraph rect for ",e.id,e);let r=D(),n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),a=Dl(r.flowchart.htmlLabels),o=n.insert("g").attr("class","cluster-label"),s="markdown"===e.labelType?XC(o,e.labelText,{style:e.labelStyle,useHtmlLabels:a},r):o.node().appendChild(tS(e.labelText,e.labelStyle,void 0,!0)),l=s.getBBox();Dl(r.flowchart.htmlLabels)&&(t=s.children[0],c=O(s),l=t.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height));var c=(t=0*e.padding)/2,h=e.width<=l.width+t?l.width+t:e.width,c=(e.width<=l.width+t?e.diff=(l.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,R.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-c).attr("width",h).attr("height",e.height+t),cA(r).subGraphTitleTopMargin),h=(a?o.attr("transform",`translate(${e.x-l.width/2}, ${e.y-e.height/2+c})`):o.attr("transform",`translate(${e.x}, ${e.y-e.height/2+c})`),i.node().getBBox());return e.width=h.width,e.height=h.height,e.intersect=function(t){return vS(e,t)},n},"rect"),Fvt=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return vS(e,t)},t},"noteGroup"),$vt=Ae((t,e)=>{let r=D(),n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=n.insert("g").attr("class","cluster-label"),o=n.append("rect"),s=a.node().appendChild(tS(e.labelText,e.labelStyle,void 0,!0)),l=s.getBBox();Dl(r.flowchart.htmlLabels)&&(t=s.children[0],c=O(s),l=t.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)),l=s.getBBox();var c=(t=0*e.padding)/2,h=e.width<=l.width+e.padding?l.width+e.padding:e.width,c=(e.width<=l.width+e.padding?e.diff=(l.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-h/2-c).attr("y",e.y-e.height/2-c).attr("width",h+t).attr("height",e.height+t),o.attr("class","inner").attr("x",e.x-h/2-c).attr("y",e.y-e.height/2-c+l.height-1).attr("width",h+t).attr("height",e.height+t-l.height-3),cA(r).subGraphTitleTopMargin),h=(a.attr("transform",`translate(${e.x-l.width/2}, ${e.y-e.height/2-e.padding/3+(Dl(r.flowchart.htmlLabels)?5:3)+c})`),i.node().getBBox());return e.height=h.height,e.intersect=function(t){return vS(e,t)},n},"roundedWithTitle"),zvt=Ae((t,e)=>{var r=(t=t.insert("g").attr("class",e.classes).attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("class","divider").attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n),r.node().getBBox());return e.width=i.width,e.height=i.height,e.diff=-e.padding/2,e.intersect=function(t){return vS(e,t)},t},"divider"),Gvt={rect:Bvt,roundedWithTitle:$vt,noteGroup:Fvt,divider:zvt},Uvt={},qvt=Ae((t,e)=>{R.trace("Inserting cluster");var r=e.shape||"rect";Uvt[e.id]=Gvt[r](t,e)},"insertCluster"),Yvt=Ae(()=>{Uvt={}},"clear")}),Qvt=t(()=>{e(),jvt=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&Wvt(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&Wvt(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Hvt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Wvt=Ae((t,e,r,n,i,a)=>{var o=Hvt[r];o?t.attr("marker-"+e,`url(${n}#${i}_${a}-${o}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function Jvt(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var txt,ext,rxt,nxt,ixt,axt,oxt,sxt,lxt,cxt,hxt,uxt=t(()=>{e(),eS(),KC(),Q3(),i(),K8(),tc(),Q9(),dA(),Qvt(),txt={},ext={},rxt=Ae(()=>{txt={},ext={}},"clear"),nxt=Ae((t,e)=>{var r,n=D(),i=Dl(n.flowchart.htmlLabels),n="markdown"===e.labelType?XC(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):tS(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(n);let s=n.getBBox();i&&(i=n.children[0],r=O(n),s=i.getBoundingClientRect(),r.attr("width",s.width),r.attr("height",s.height)),o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),txt[e.id]=a,e.width=s.width,e.height=s.height;let l;return e.startLabelLeft&&(i=tS(e.startLabelLeft,e.labelStyle),o=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=o.node().appendChild(i),a=i.getBBox(),o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),ext[e.id]||(ext[e.id]={}),ext[e.id].startLeft=r,Jvt(l,e.startLabelLeft)),e.startLabelRight&&(i=tS(e.startLabelRight,e.labelStyle),a=(o=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=o.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),ext[e.id]||(ext[e.id]={}),ext[e.id].startRight=o,Jvt(l,e.startLabelRight)),e.endLabelLeft&&(i=tS(e.endLabelLeft,e.labelStyle),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),o=i.getBBox(),r.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.node().appendChild(i),ext[e.id]||(ext[e.id]={}),ext[e.id].endLeft=a,Jvt(l,e.endLabelLeft)),e.endLabelRight&&(r=tS(e.endLabelRight,e.labelStyle),i=(o=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+")"),o.node().appendChild(r),ext[e.id]||(ext[e.id]={}),ext[e.id].endRight=o,Jvt(l,e.endLabelRight)),n},"insertEdgeLabel"),Ae(Jvt,"setTerminalWidth"),ixt=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,txt[n.id],i);var a,o=i.updatedPath||i.originalPath,s=D(),s=cA(s).subGraphTitleTotalMargin;if(n.label){let t=txt[n.id],e=n.x,r=n.y;o&&(a=H8.calcLabelPosition(o),R.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+s/2})`)}if(n.startLabelLeft){let t=ext[n.id].startLeft,e=n.x,r=n.y;o&&(i=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",o),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=ext[n.id].startRight,e=n.x,r=n.y;o&&(a=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",o),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=ext[n.id].endLeft,e=n.x,r=n.y;o&&(s=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",o),e=s.x,r=s.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=ext[n.id].endRight,e=n.x,r=n.y;o&&(i=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",o),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),axt=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n),n=t.width/2,t=t.height/2;return n<=r||t<=e},"outsideNode"),oxt=Ae((t,n,i)=>{R.debug(`intersection calc abc89:
|
|
|
outsidePoint: ${JSON.stringify(n)}
|
|
|
insidePoint : ${JSON.stringify(i)}
|
|
|
node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),o=t.width/2,s=i.x<n.x?o-r:o+r,l=t.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x);var u;if(Math.abs(e-n.y)*o>Math.abs(a-n.x)*l)return t=i.y<n.y?n.y-l-e:e-l-n.y,s=h*t/c,u={x:i.x<n.x?i.x+s:i.x-h+s,y:i.y<n.y?i.y+c-t:i.y-c+t},0===s&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),R.debug(`abc89 topp/bott calc, Q ${c}, q ${t}, R ${h}, r `+s,u),u;{let t=c*(s=i.x<n.x?n.x-o-a:a-o-n.x)/h,e=i.x<n.x?i.x+h-s:i.x-h+s,r=i.y<n.y?i.y+t:i.y-t;return R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+s,{_x:e,_y:r}),0===s&&(e=n.x,r=n.y),0===h&&(e=n.x),0===c&&(r=n.y),{x:e,y:r}}},"intersection"),sxt=Ae((t,n)=>{R.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],o=!1;return t.forEach(t=>{if(axt(n,t)||o)a=t,o||i.push(t);else{let e=oxt(n,a,t),r=!1;i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)||i.push(e),o=!0}}),i},"cutPathAtIntersect"),lxt=Ae(function(t,e,r,n,i,a,o){let s=r.points,l=(R.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=((a=a.node(e.w))?.intersect&&c?.intersect&&((s=s.slice(1,r.points.length-1)).unshift(c.intersect(s[0])),s.push(a.intersect(s[s.length-1]))),r.toCluster&&(R.debug("to cluster abc88",n[r.toCluster]),s=sxt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(R.debug("from cluster abc88",n[r.fromCluster]),s=sxt(s.reverse(),n[r.fromCluster].node).reverse(),l=!0),s.filter(t=>!Number.isNaN(t.y))),u=d4,{x:d,y:p}=(!r.curve||"graph"!==i&&"flowchart"!==i||(u=r.curve),V9(r)),g=Kb().x(d).y(p).curve(u),f;switch(r.thickness){case"normal":f="edge-thickness-normal";break;case"thick":case"invisible":f="edge-thickness-thick";break;default:f=""}switch(r.pattern){case"solid":f+=" edge-pattern-solid";break;case"dotted":f+=" edge-pattern-dotted";break;case"dashed":f+=" edge-pattern-dashed"}let m=t.append("path").attr("d",g(h)).attr("id",r.id).attr("class"," "+f+(r.classes?" "+r.classes:"")).attr("style",r.style),y="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(y=(y=(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),jvt(m,r,y,o,i),e={},l&&(e.updatedPath=s),e.originalPath=r.points,e},"insertEdge")}),dxt=t(()=>{yj(),Pj(),Xvt(),AS(),Kvt(),hA(),Zvt(),uxt(),e(),dA(),i(),cxt=Ae(async(t,i,a,o,s,l)=>{R.info("Graph in recursive render: XXX",vj(i),s);let c=i.graph().rankdir,r=(R.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?R.info("Recursive render XXX",i.nodes()):R.info("No nodes found for",i),0<i.edges().length&&R.trace("Recursive edges",i.edge(i.edges()[0])),t.insert("g").attr("class","clusters")),n=t.insert("g").attr("class","edgePaths"),h=t.insert("g").attr("class","edgeLabels"),u=t.insert("g").attr("class","nodes"),d=(await Promise.all(i.nodes().map(async function(t){var e,r,n=i.node(t);void 0!==s&&(e=JSON.parse(JSON.stringify(s.clusterData)),R.info("Setting data for cluster XXX (",t,") ",e,s),i.setNode(s.id,e),i.parent(t)||(R.trace("Setting parent",t,s.id),i.setParent(t,s.id,e))),R.info("(Insert) Node XXX"+t+": "+JSON.stringify(i.node(t))),n?.clusterNode?(R.info("Cluster identified",t,n.width,i.node(t)),{ranksep:e,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:e,nodesep:r}),r=(e=await cxt(u,n.graph,a,o,i.node(t),l)).elem,_S(n,r),n.diff=e.diff||0,R.info("Node bounds (abc123)",t,n,n.width,n.x,n.y),aA(r,n),R.warn("Recursive render complete ",r,n)):0<i.children(t).length?(R.info("Cluster - the non recursive path XXX",t,n.id,n,i),R.info(Ivt(n.id,i)),Tvt[n.id]={id:Ivt(n.id,i),node:n}):(R.info("Node - the non recursive path",t,n.id,n),await iA(u,i.node(t),c))})),i.edges().forEach(async function(t){var e=i.edge(t.v,t.w,t.name);R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",Tvt,"ids:",t.v,t.w,"Translating: ",Tvt[t.v],Tvt[t.w]),await nxt(h,e)}),i.edges().forEach(function(t){R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))}),R.info("Graph before layout:",JSON.stringify(vj(i))),R.info("#############################################"),R.info("### Layout ###"),R.info("#############################################"),R.info(i),YY(i),R.info("Graph after layout:",JSON.stringify(vj(i))),0),p=cA(l).subGraphTitleTotalMargin;return Pvt(i).forEach(function(t){var e=i.node(t);R.info("Position "+t+": "+JSON.stringify(i.node(t))),R.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode?(e.y+=p,sA(e)):0<i.children(t).length?(e.height+=p,qvt(r,e),Tvt[e.id].node=e):(e.y+=p/2,sA(e))}),i.edges().forEach(function(t){var e=i.edge(t),t=(R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),lxt(n,t,e,Tvt,a,i,o));ixt(e,t)}),i.nodes().forEach(function(t){var e=i.node(t);R.info(t,e.type,e.diff),"group"===e.type&&(d=e.diff)}),{elem:t,diff:d}},"recursiveRender"),hxt=Ae(async(t,e,r,n,i)=>{kvt(t,r,n,i),oA(),rxt(),Yvt(),Cvt(),R.warn("Graph at first:",JSON.stringify(vj(e))),Rvt(e),R.warn("Graph after:",JSON.stringify(vj(e))),r=D(),await cxt(t,e,n,i,void 0,r)},"render")});function pxt(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}var gxt,fxt,mxt,yxt,vxt,xxt,bxt,wxt,kxt,Txt=t(()=>{Q3(),iU(),e(),i(),dxt(),K8(),K8(),ec(),tc(),gxt=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),fxt={dividerMargin:10,padding:5,textHeight:10,curve:void 0},mxt=Ae(function(t,r,n,i){R.info("keys:",[...t.keys()]),R.info(t),t.forEach(function(t){var e={shape:"rect",id:t.id,domId:t.domId,labelText:gxt(t.id),labelStyle:"",style:"fill: none; stroke: black",padding:D().flowchart?.padding??D().class?.padding};r.setNode(t.id,e),yxt(t.classes,r,n,i,t.id),R.info("setNode",e)})},"addNamespaces"),yxt=Ae(function(t,i,e,a,o){R.info("keys:",[...t.keys()]),R.info(t),[...t.values()].filter(t=>t.parent===o).forEach(function(t){var e=t.cssClasses.join(" "),r=f8(t.styles),n=t.label??t.id,n={labelStyle:r.labelStyle,shape:"class_box",labelText:gxt(n),classData:t,rx:0,ry:0,class:e,style:r.style,id:t.id,domId:t.domId,tooltip:a.db.getTooltip(t.id,o)||"",haveCallback:t.haveCallback,link:t.link,width:"group"===t.type?500:void 0,type:t.type,padding:D().flowchart?.padding??D().class?.padding};i.setNode(t.id,n),o&&i.setParent(t.id,o),R.info("setNode",n)})},"addClasses"),vxt=Ae(function(t,i,a,o){R.info(t),t.forEach(function(t,e){var r=t,n=r.text,n={labelStyle:"",shape:"note",labelText:gxt(n),noteData:r,rx:0,ry:0,class:"",style:"",id:r.id,domId:r.id,tooltip:"",type:"note",padding:D().flowchart?.padding??D().class?.padding};i.setNode(r.id,n),R.info("setNode",n),r.class&&o.has(r.class)&&(e={id:"edgeNote"+(t=a+e),classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:c8(fxt.curve,jb)},i.setEdge(r.id,r.class,e,t))})},"addNotes"),xxt=Ae(function(t,n){let i=D().flowchart,a=0;t.forEach(function(t){a++;var e,r={classes:"relation",pattern:1==t.relation.lineType?"dashed":"solid",id:X8(t.id1,t.id2,{prefix:"id",counter:a}),arrowhead:"arrow_open"===t.type?"none":"normal",startLabelRight:"none"===t.relationTitle1?"":t.relationTitle1,endLabelLeft:"none"===t.relationTitle2?"":t.relationTitle2,arrowTypeStart:pxt(t.relation.type1),arrowTypeEnd:pxt(t.relation.type2),style:"fill:none",labelStyle:"",curve:c8(i?.curve,jb)};R.info(r,t),void 0!==t.style&&(e=f8(t.style),r.style=e.style,r.labelStyle=e.labelStyle),t.text=t.title,void 0===t.text?void 0!==t.style&&(r.arrowheadStyle="fill: #333"):(r.arrowheadStyle="fill: #333",r.labelpos="c",D().flowchart?.htmlLabels??D().htmlLabels?(r.labelType="html",r.label='<span class="edgeLabel">'+t.text+"</span>"):(r.labelType="text",r.label=t.text.replace(L.lineBreakRegex,`
|
|
|
`),void 0===t.style&&(r.style=r.style||"stroke: #333; stroke-width: 1.5px;fill:none"),r.labelStyle=r.labelStyle.replace("color:","fill:"))),n.setEdge(t.id1,t.id2,r,a)})},"addRelations"),bxt=Ae(function(t){fxt={...fxt,...t}},"setConf"),wxt=Ae(async function(t,e,r,n){R.info("Drawing class - ",e);var i=D().flowchart??D().class,a=D().securityLevel,o=(R.info("config:",i),i?.nodeSpacing??50),s=i?.rankSpacing??50,o=new rU({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),s=n.db.getNamespaces(),l=n.db.getClasses(),c=n.db.getRelations(),h=n.db.getNotes();R.info(c),mxt(s,o,e,n),yxt(l,o,e,n),xxt(c,o),vxt(h,o,c.length+1,l);let u;if("sandbox"===a&&(u=O("#i"+e)),h=(s=O("sandbox"===a?u.nodes()[0].contentDocument.body:"body")).select(`[id="${e}"]`),c=s.select("#"+e+" g"),await hxt(c,o,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),H8.insertTitle(h,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),Xl(o,h,i?.diagramPadding,i?.useMaxWidth),!i?.htmlLabels){var d,p="sandbox"===a?u.nodes()[0].contentDocument:document;for(d of p.querySelectorAll('[id="'+e+'"] .edgeLabel .label')){var g=d.getBBox(),f=p.createElementNS("http://www.w3.org/2000/svg","rect");f.setAttribute("rx",0),f.setAttribute("ry",0),f.setAttribute("width",g.width),f.setAttribute("height",g.height),d.insertBefore(f,d.firstChild)}}},"draw"),Ae(pxt,"getArrowMarker"),kxt={setConf:bxt,draw:wxt}}),Ext={};J(Ext,{diagram:()=>_xt});var _xt,Cxt,Sxt,Axt,Lxt,Nxt,Ixt,Mxt,Rxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Gxt,Uxt,qxt,Yxt,jxt,Hxt,Wxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,nbt,ibt,abt,obt,sbt,lbt,cbt=t(()=>{nvt(),avt(),ovt(),Txt(),_xt={parser:Kyt,db:G2t,renderer:kxt,styles:q2t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,G2t.clear()},"init")}}),hbt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,2],n=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,32],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,34],_=[1,35],C=[1,36],S=[1,37],A=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 3:return n.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$="nl";break;case 12:this.$=a[s];break;case 13:(c=a[s-1]).description=n.trimColon(a[s]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[s-2],state2:a[s]};break;case 15:c=n.trimColon(a[s]),this.$={stmt:"relation",state1:a[s-3],state2:a[s-1],description:c};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 20:var l,c=a[s],h=a[s-2].trim();a[s].match(":")&&(c=(l=a[s].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:"state",id:a[s],type:"fork"};break;case 23:this.$={stmt:"state",id:a[s],type:"join"};break;case 24:this.$={stmt:"state",id:a[s],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:a[s-1].trim(),classes:a[s].trim()};break;case 34:this.$={stmt:"style",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 35:this.$={stmt:"applyClass",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 36:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:n.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:a[s].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:a[s-2].trim(),classes:[a[s].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},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:o,5:s,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:_,50:C,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:_,50:C,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:o,5:s,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:_,50:C,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:o,5:s,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:_,50:C,51:S,54:A},e(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:case 6:break;case 7:return 5;case 8:case 9:case 10:case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?: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=n,Ae(t,"Parser"),(Cxt=new((t.prototype=r).Parser=t)).parser=Cxt,Sxt=Cxt}),ubt=t(()=>{Axt="LR",Lxt="TB",Ixt="relation",Mxt="classDef",Rxt="style",Dxt="applyClass",Oxt="default",Bxt="fill:none",Fxt="fill: #333",$xt="c",zxt="text",Gxt="normal",Uxt="rect",qxt="rectWithTitle",Yxt="stateStart",jxt="stateEnd",Hxt=Pxt="divider",Wxt="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",sbt=(obt="----")+(ibt=Vxt="note"),lbt=""+obt+(nbt="parent")});function dbt(t="",e=0,r="",n=obt){return n=null!==r&&0<r.length?""+n+r:"",abt+`-${t}${n}-`+e}function pbt(t,e,r){var n;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])})),(n=t.find(t=>t.id===e.id))?Object.assign(n,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,_bt,Cbt=t(()=>{i(),e(),tc(),ubt(),mbt=new Map,ybt=0,Ae(dbt,"stateDomId"),vbt=Ae((r,t,n,i,a,o,s,l)=>{R.trace("items",t),t.forEach(t=>{switch(t.stmt){case Nxt:case Oxt:bbt(r,t,n,i,a,o,s,l);break;case Ixt:bbt(r,t.state1,n,i,a,o,s,l),bbt(r,t.state2,n,i,a,o,s,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:s};a.push(e),ybt++}})},"setupDoc"),xbt=Ae((t,e=Lxt)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Ae(pbt,"insertOrUpdateNode"),Ae(gbt,"getClassesFromDbInfo"),Ae(fbt,"getStylesFromDbInfo"),bbt=Ae((r,n,t,i,a,e,o,s)=>{var l=n.id,c=t.get(l),h=gbt(c),u=fbt(c);if(R.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=Uxt;if(!0===n.start?t=Yxt:!1===n.start&&(t=jxt),n.type!==Oxt&&(t=n.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),n.description&&(Array.isArray(c.description)?(c.shape=qxt,c.description.push(n.description)):0<c.description?.length?(c.shape=qxt,c.description===l?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=Uxt,c.description=n.description),c.description=L.sanitizeTextOrArray(c.description,D())),1===c.description?.length&&c.shape===qxt&&("group"===c.type?c.shape=Wxt:c.shape=Uxt),!c.type&&n.doc&&(R.info("Setting cluster for XCX",l,xbt(n)),c.type="group",c.isGroup=!0,c.dir=xbt(n),c.shape=n.type===Pxt?Hxt:Wxt,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:o}).shape===Hxt&&(h.label=""),r&&"root"!==r.id&&(R.trace("Setting node ",l," to be child of its parent ",r.id),h.parentId=r.id),h.centerLabel=!0,n.note){u={labelStyle:"",shape:Vxt,label:n.note.text,cssClasses:tbt,cssStyles:[],cssCompilesStyles:[],id:l+sbt+"-"+ybt,domId:dbt(l,ybt,ibt),type:c.type,isGroup:"group"===c.type,padding:D().flowchart.padding,look:o,position:n.note.position},r=l+lbt,c={labelStyle:"",shape:Xxt,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+lbt,domId:dbt(l,ybt,nbt),type:"group",isGroup:!0,padding:16,look:o,position:n.note.position},ybt++,u.parentId=c.id=r,pbt(i,c,s),pbt(i,u,s),pbt(i,h,s);let t=l,e=u.id;"left of"===n.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:o})}else pbt(i,h,s)}n.doc&&(R.trace("Adding nodes children "),vbt(n,n.doc,t,i,a,!e,o,s))},"dataFetcher"),wbt=Ae(()=>{mbt.clear(),ybt=0},"reset")}),Sbt=t(()=>{i(),e(),uA(),nH(),iH(),K8(),ubt(),kbt=Ae((t,e=Lxt)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Tbt=Ae(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),Ebt=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing state diagram (v2)",e);var{securityLevel:i,state:a,layout:o}=D(),s=(n.db.extract(n.db.getRootDocV2()),n.db.getData()),i=lA(e,i);s.type=n.type,s.layoutAlgorithm=o,s.nodeSpacing=a?.nodeSpacing||50,s.rankSpacing=a?.rankSpacing||50,s.markers=["barb"],s.diagramId=e,await qj(s,i),H8.insertTitle(i,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),jj(i,8,Kxt,a?.useMaxWidth??!0)},"draw"),_bt={getClasses:Tbt,draw:Ebt,getDir:kbt}});function Abt(){return new Map}function Lbt(t=""){let e=t;return"[*]"===t&&(Ubt++,e="start"+Ubt),e}function Nbt(t="",e=Oxt){return"[*]"===t?"start":e}function Ibt(t=""){let e=t;return"[*]"===t&&(Ubt++,e="end"+Ubt),e}function Mbt(t="",e=Oxt){return"[*]"===t?"end":e}function Rbt(t,e,r){var n=Lbt(t.id.trim()),i=Nbt(t.id.trim(),t.type),a=Lbt(e.id.trim()),o=Nbt(e.id.trim(),e.type);Qbt(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Qbt(a,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Gbt.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,D())})}var Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,Gbt,Ubt,qbt,Ybt,jbt,Hbt,Wbt,Vbt,Xbt,Kbt,Zbt,Qbt,Jbt,t4t,e4t,r4t,n4t,i4t,a4t,o4t,s4t,l4t,c4t,h4t,u4t,d4t,p4t,g4t,f4t,m4t,y4t,v4t,x4t,b4t,w4t,k4t,T4t,E4t,_4t,C4t,S4t,A4t,L4t,N4t,I4t,M4t,R4t,D4t,O4t,P4t,B4t,F4t,$4t,z4t,G4t,U4t,q4t,Y4t,j4t,H4t=t(()=>{e(),K8(),tc(),i(),fh(),Cbt(),Sbt(),ubt(),Ae(Abt,"newClassesList"),Dbt=[],Obt=[],Pbt=Axt,Bbt=[],Fbt=Abt(),$bt=Ae(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),zbt={root:$bt()},Gbt=zbt.root,Ybt={LINE:qbt=Ubt=0,DOTTED_LINE:1},jbt={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Hbt=Ae(t=>JSON.parse(JSON.stringify(t)),"clone"),Wbt=Ae(t=>{R.info("Setting root doc",t),Bbt=t},"setRootDoc"),Vbt=Ae(()=>Bbt,"getRootDoc"),Xbt=Ae((n,i,t)=>{if(i.stmt===Ixt)Xbt(n,i.state1,!0),Xbt(n,i.state2,!1);else if(i.stmt===Nxt&&("[*]"===i.id?(i.id=t?n.id+"_start":n.id+"_end",i.start=t):i.id=i.id.trim()),i.doc){let t=[],e=[],r;for(r=0;r<i.doc.length;r++){var a;i.doc[r].type===Pxt?((a=Hbt(i.doc[r])).doc=Hbt(e),t.push(a),e=[]):e.push(i.doc[r])}0<t.length&&0<e.length&&(n={stmt:Nxt,id:D8(),type:"divider",doc:Hbt(e)},t.push(Hbt(n)),i.doc=t),i.doc.forEach(t=>Xbt(i,t,!0))}},"docTranslator"),Kbt=Ae(()=>(Xbt({id:"root"},{id:"root",doc:Bbt},!0),{id:"root",doc:Bbt}),"getRootDocV2"),Zbt=Ae(t=>{var e=t.doc||t,t=(R.info(e),Jbt(!0),R.info("Extract initial document:",e),e.forEach(e=>{switch(R.warn("Statement",e.stmt),e.stmt){case Nxt:Qbt(e.id.trim(),e.type,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles);break;case Ixt:i4t(e.state1,e.state2,e.description);break;case Mxt:l4t(e.id.trim(),e.classes);break;case Rxt:{let t=e.id.trim().split(","),r=e.styleClass.split(",");t.forEach(t=>{let e=t4t(t);void 0===e&&(t=t.trim(),Qbt(t),e=t4t(t)),e.styles=r.map(t=>t.replace(/;/g,"")?.trim())})}break;case Dxt:h4t(e.id.trim(),e.styleClass)}}),e4t()),e=D().look;wbt(),bbt(void 0,Kbt(),t,Dbt,Obt,!0,e,Fbt),Dbt.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]}})},"extract"),Qbt=Ae(function(t,e=Oxt,r=null,n=null,i=null,a=null,o=null,s=null){let l=t?.trim();Gbt.states.has(l)?(Gbt.states.get(l).doc||(Gbt.states.get(l).doc=r),Gbt.states.get(l).type||(Gbt.states.get(l).type=e)):(R.info("Adding state ",l,n),Gbt.states.set(l,{id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]})),n&&(R.info("Setting state description",l,n),"string"==typeof n&&a4t(l,n.trim()),"object"==typeof n)&&n.forEach(t=>a4t(l,t.trim())),i&&((t=Gbt.states.get(l)).note=i,t.note.text=L.sanitizeText(t.note.text,D())),a&&(R.info("Setting state classes",l,a),("string"==typeof a?[a]:a).forEach(t=>h4t(l,t.trim()))),o&&(R.info("Setting state styles",l,o),("string"==typeof o?[o]:o).forEach(t=>u4t(l,t.trim()))),s&&(R.info("Setting state styles",l,o),("string"==typeof s?[s]:s).forEach(t=>d4t(l,t.trim())))},"addState"),Jbt=Ae(function(t){Dbt=[],Obt=[],zbt={root:$bt()},Gbt=zbt.root,Ubt=0,Fbt=Abt(),t||lc()},"clear"),t4t=Ae(function(t){return Gbt.states.get(t)},"getState"),e4t=Ae(function(){return Gbt.states},"getStates"),r4t=Ae(function(){R.info("Documents = ",zbt)},"logDocuments"),n4t=Ae(function(){return Gbt.relations},"getRelations"),Ae(Lbt,"startIdIfNeeded"),Ae(Nbt,"startTypeIfNeeded"),Ae(Ibt,"endIdIfNeeded"),Ae(Mbt,"endTypeIfNeeded"),Ae(Rbt,"addRelationObjs"),i4t=Ae(function(t,e,r){var n,i;"object"==typeof t?Rbt(t,e,r):(n=Lbt(t.trim()),t=Nbt(t),i=Ibt(e.trim()),e=Mbt(e),Qbt(n,t),Qbt(i,e),Gbt.relations.push({id1:n,id2:i,title:L.sanitizeText(r,D())}))},"addRelation"),a4t=Ae(function(t,e){t=Gbt.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t.descriptions.push(L.sanitizeText(e,D()))},"addDescription"),o4t=Ae(function(t){return(":"===t.substring(0,1)?t.substr(2):t).trim()},"cleanupLabel"),s4t=Ae(()=>"divider-id-"+ ++qbt,"getDividerId"),l4t=Ae(function(t,e=""){Fbt.has(t)||Fbt.set(t,{id:t,styles:[],textStyles:[]});let r=Fbt.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)})},"addStyleClass"),c4t=Ae(function(){return Fbt},"getClasses"),h4t=Ae(function(t,r){t.split(",").forEach(function(t){let e=t4t(t);void 0===e&&(t=t.trim(),Qbt(t),e=t4t(t)),e.classes.push(r)})},"setCssClass"),u4t=Ae(function(t,e){void 0!==(t=t4t(t))&&t.styles.push(e)},"setStyle"),d4t=Ae(function(t,e){void 0!==(t=t4t(t))&&t.textStyles.push(e)},"setTextStyle"),p4t=Ae(()=>Pbt,"getDirection"),g4t=Ae(t=>{Pbt=t},"setDirection"),f4t=Ae(t=>(t&&":"===t[0]?t.substr(1):t).trim(),"trimColon"),m4t=Ae(()=>{var t=D();return{nodes:Dbt,edges:Obt,other:{},config:t,direction:kbt(Kbt())}},"getData"),y4t={getConfig:Ae(()=>D().state,"getConfig"),getData:m4t,addState:Qbt,clear:Jbt,getState:t4t,getStates:e4t,getRelations:n4t,getClasses:c4t,getDirection:p4t,addRelation:i4t,getDividerId:s4t,setDirection:g4t,cleanupLabel:o4t,lineType:Ybt,relationType:jbt,logDocuments:r4t,getRootDoc:Vbt,setRootDoc:Wbt,getRootDocV2:Kbt,extract:Zbt,trimColon:f4t,getAccTitle:hc,setAccTitle:cc,getAccDescription:dc,setAccDescription:uc,addStyleClass:l4t,setCssClass:h4t,addDescription:a4t,setDiagramTitle:pc,getDiagramTitle:gc}}),W4t=t(()=>{v4t=Ae(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"),x4t=v4t}),V4t=t(()=>{b4t={},w4t=Ae((t,e)=>{b4t[t]=e},"set"),k4t=Ae(t=>b4t[t],"get"),T4t=Ae(()=>Object.keys(b4t),"keys"),E4t=Ae(()=>T4t().length,"size"),_4t={get:k4t,set:w4t,keys:T4t,size:E4t}}),X4t=t(()=>{Q3(),V4t(),H4t(),K8(),tc(),i(),e(),C4t=Ae(t=>t.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),S4t=Ae(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),A4t=Ae((t,e)=>{var r=(e=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),e},"drawSimpleState"),L4t=Ae((t,e)=>{let r=Ae(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",D().state.padding).attr("y",i+.4*D().state.padding+D().state.dividerMargin+D().state.textHeight).attr("class","state-description"),o=!0,s=!0;e.descriptions.forEach(function(t){o||(r(a,t,s),s=!1),o=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+i+D().state.dividerMargin/2).attr("y2",D().state.padding+i+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return e.attr("x2",c+3*D().state.padding),t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+i+2*D().state.padding).attr("rx",D().state.radius),t},"drawDescrState"),N4t=Ae((t,e,r)=>{let n=D().state.padding,i=2*D().state.padding,a=t.node().getBBox(),o=a.width,s=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,o);h===o&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=s-n,o<c&&(u=(o-h)/2+n),Math.abs(s-d.x)<n&&o<c&&(u=s-(c-o)/2),e=1-D().state.textHeight,t.insert("rect",":first-child").attr("x",u).attr("y",e).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+D().state.textHeight+D().state.titleShift+1).attr("rx","0"),l.attr("x",u+n),c<=o&&l.attr("x",s+(h-i)/2-c/2+n),t.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",3*D().state.textHeight).attr("rx",D().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",d.height+3+2*D().state.textHeight).attr("rx",D().state.radius),t},"addTitleAndBox"),I4t=Ae(t=>(t.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),M4t=Ae((t,e)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return e.parentId&&(e=r,r=n,n=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),R4t=Ae((t,e,r,n)=>{let i=0,a=n.append("text"),o=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"<br/>")),s=(o=o.replace(/\n/g,"<br/>")).split(L.lineBreakRegex),l=1.25*D().state.noteMargin;for(var c of s){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),i+=l,h.attr("x",e+D().state.noteMargin),h.attr("y",r+i+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),D4t=Ae((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}=R4t(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),O4t=Ae(function(t,e){var r=e.id,n={id:r,label:e.id,width:0,height:0},t=t.append("g").attr("id",r).attr("class","stateGroup"),e=("start"===e.type&&C4t(t),"end"===e.type&&I4t(t),"fork"!==e.type&&"join"!==e.type||M4t(t,e),"note"===e.type&&D4t(e.note.text,t),"divider"===e.type&&S4t(t),"default"===e.type&&0===e.descriptions.length&&A4t(t,e),"default"===e.type&&0<e.descriptions.length&&L4t(t,e),t.node().getBBox());return n.width=e.width+2*D().state.padding,n.height=e.height+2*D().state.padding,_4t.set(r,n),n},"drawState"),P4t=0,B4t=Ae(function(c,h,u){var d=Ae(function(t){switch(t){case y4t.relationType.AGGREGATION:return"aggregation";case y4t.relationType.EXTENSION:return"extension";case y4t.relationType.COMPOSITION:return"composition";case y4t.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(t=>!Number.isNaN(t.y));let t=h.points,e=Kb().x(function(t){return t.x}).y(function(t){return t.y}).curve(d4),r=c.append("path").attr("d",e(t)).attr("id","edge"+P4t).attr("class","transition"),n="";if(D().state.arrowMarkerAbsolute&&(n=(n=(n=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.attr("marker-end","url("+n+"#"+d(y4t.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:n}=H8.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,o=[],s=0,l=0;for(let t=0;t<=i.length;t++){var p=e.append("text").attr("text-anchor","middle").text(i[t]).attr("x",r).attr("y",n+a),g=p.node().getBBox();s=Math.max(s,g.width),l=Math.min(l,g.x),R.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,R.info("Title height",a,n)),o.push(p)}let t=a*i.length;if(1<i.length){let r=(i.length-1)*a*.5;o.forEach((t,e)=>t.attr("y",n+e*a-r)),t=a*i.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-s/2-D().state.padding/2).attr("y",n-t/2-D().state.padding/2-3.5).attr("width",s+D().state.padding).attr("height",t+D().state.padding),R.info(d)}P4t++},"drawEdge")}),K4t=t(()=>{Q3(),yj(),iU(),e(),tc(),X4t(),i(),ec(),$4t={},z4t=Ae(function(){},"setConf"),G4t=Ae(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"),U4t=Ae(function(t,e,r,n){F4t=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=O("#i"+e));var o=O("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?a.nodes()[0].contentDocument:document,t=(R.debug("Rendering diagram "+t),o.select(`[id='${e}']`)),e=(G4t(t),n.db.getRootDoc()),e=(Y4t(e,t,void 0,!1,o,s,n),F4t.padding),s=(o=t.node().getBBox()).width+2*e,n=o.height+2*e;Vl(t,n,1.75*s,F4t.useMaxWidth),t.attr("viewBox",`${o.x-F4t.padding} ${o.y-F4t.padding} `+s+" "+n)},"draw"),q4t=Ae(t=>t?t.length*F4t.fontSizeFactor:1,"getLabelWidth"),Y4t=Ae((t,e,r,n,i,a,o)=>{let s=new rU({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){c=!1;break}r?s.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:F4t.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):s.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:F4t.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),s.setDefaultEdgeLabel(function(){return{}}),o.db.extract(t);var h,u=o.db.getStates(),d=o.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=Y4t(f.doc,g,f.id,!n,i,a,o),g=(g=N4t(g,f,n)).node().getBBox(),t.width=g.width,t.height=g.height+F4t.padding/2,$4t[f.id]={y:F4t.compositTitleSize}):t=O4t(e,f,s),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=O4t(e,g,s),"left of"===f.note.position?(s.setNode(t.id+"-note",p),s.setNode(t.id,t)):(s.setNode(t.id,t),s.setNode(t.id+"-note",p)),s.setParent(t.id,t.id+"-group"),s.setParent(t.id+"-note",t.id+"-group")):s.setNode(t.id,t)}R.debug("Count=",s.nodeCount(),s);let m=0,y=(d.forEach(function(t){m++,R.debug("Setting edge",t),s.setEdge(t.id1,t.id2,{relation:t,width:q4t(t.title),height:F4t.labelHeight*L.getRows(t.title).length,labelpos:"c"},"id"+m)}),YY(s),R.debug("Graph after layout",s.nodes()),e.node());s.nodes().forEach(function(t){void 0!==t&&void 0!==s.node(t)?(R.warn("Node "+t+": "+JSON.stringify(s.node(t))),i.select("#"+y.id+" #"+t).attr("transform","translate("+(s.node(t).x-s.node(t).width/2)+","+(s.node(t).y+($4t[t]?$4t[t].y:0)-s.node(t).height/2)+" )"),i.select("#"+y.id+" #"+t).attr("data-x-shift",s.node(t).x-s.node(t).width/2),a.querySelectorAll("#"+y.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})):R.debug("No Node "+t+": "+JSON.stringify(s.node(t)))}),y.getBBox(),s.edges().forEach(function(t){void 0!==t&&void 0!==s.edge(t)&&(R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(s.edge(t))),B4t(e,s.edge(t),s.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*F4t.padding,v.height=d.height+2*F4t.padding,R.debug("Doc rendered",v,s),v},"renderDoc"),j4t={setConf:z4t,draw:U4t}}),Z4t={};J(Z4t,{diagram:()=>Q4t});var Q4t,J4t=t(()=>{hbt(),H4t(),W4t(),K4t(),Q4t={parser:Sxt,db:y4t,renderer:j4t,styles:x4t,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,y4t.clear()},"init")}}),t3t={};J(t3t,{diagram:()=>e3t});var e3t,r3t,n3t,i3t,a3t,o3t,s3t,l3t,c3t,h3t,u3t,d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t,E3t,_3t,C3t,S3t,A3t,L3t,N3t,I3t,M3t=t(()=>{hbt(),H4t(),W4t(),Sbt(),e3t={parser:Sxt,db:y4t,renderer:_bt,styles:x4t,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,y4t.clear()},"init")}}),R3t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],l=[1,14],n={trace:Ae(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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:n.addTask(a[s-1],a[s]),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:n,12:i,14:a,16:o,17:s,18:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:n,12:i,14:a,16:o,17:s,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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(r3t=new((t.prototype=n).Parser=t)).parser=r3t,n3t=r3t}),D3t=t(()=>{i(),fh(),i3t="",a3t=[],o3t=[],s3t=[],l3t=Ae(function(){a3t.length=0,o3t.length=0,i3t="",s3t.length=0,lc()},"clear"),c3t=Ae(function(t){i3t=t,a3t.push(t)},"addSection"),h3t=Ae(function(){return a3t},"getSections"),u3t=Ae(function(){let t=f3t(),e=0;for(;!t&&e<100;)t=f3t(),e++;return o3t.push(...s3t),o3t},"getTasks"),d3t=Ae(function(){let e=[];return o3t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),p3t=Ae(function(t,e){let r=e.substr(1).split(":"),n=0;e=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:i3t,type:i3t,people:e,task:t,score:n},s3t.push(e)},"addTask"),g3t=Ae(function(t){t={section:i3t,type:i3t,description:t,task:t,classes:[]},o3t.push(t)},"addTaskOrg"),f3t=Ae(function(){let t=Ae(function(t){return s3t[t].processed},"compileTask"),e=!0;for(var[r,n]of s3t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),m3t=Ae(function(){return d3t()},"getActors"),y3t={getConfig:Ae(()=>D().journey,"getConfig"),clear:l3t,setDiagramTitle:pc,getDiagramTitle:gc,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addSection:c3t,getSections:h3t,getTasks:u3t,addTask:p3t,addTaskOrg:g3t,getActors:m3t}}),O3t=t(()=>{v3t=Ae(t=>`.label {
|
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
|
font-family: var(--mermaid-font-family);
|
|
|
color: ${t.textColor};
|
|
|
}
|
|
|
.mouth {
|
|
|
stroke: #666;
|
|
|
}
|
|
|
|
|
|
line {
|
|
|
stroke: ${t.textColor}
|
|
|
}
|
|
|
|
|
|
.legend {
|
|
|
fill: ${t.textColor};
|
|
|
}
|
|
|
|
|
|
.label text {
|
|
|
fill: #333;
|
|
|
}
|
|
|
.label {
|
|
|
color: ${t.textColor}
|
|
|
}
|
|
|
|
|
|
.face {
|
|
|
${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"};
|
|
|
stroke: #999;
|
|
|
}
|
|
|
|
|
|
.node rect,
|
|
|
.node circle,
|
|
|
.node ellipse,
|
|
|
.node polygon,
|
|
|
.node path {
|
|
|
fill: ${t.mainBkg};
|
|
|
stroke: ${t.nodeBorder};
|
|
|
stroke-width: 1px;
|
|
|
}
|
|
|
|
|
|
.node .label {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.node.clickable {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
.arrowheadPath {
|
|
|
fill: ${t.arrowheadColor};
|
|
|
}
|
|
|
|
|
|
.edgePath .path {
|
|
|
stroke: ${t.lineColor};
|
|
|
stroke-width: 1.5px;
|
|
|
}
|
|
|
|
|
|
.flowchart-link {
|
|
|
stroke: ${t.lineColor};
|
|
|
fill: none;
|
|
|
}
|
|
|
|
|
|
.edgeLabel {
|
|
|
background-color: ${t.edgeLabelBackground};
|
|
|
rect {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
.cluster rect {
|
|
|
}
|
|
|
|
|
|
.cluster text {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
div.mermaidTooltip {
|
|
|
position: absolute;
|
|
|
text-align: center;
|
|
|
max-width: 200px;
|
|
|
padding: 2px;
|
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
|
font-family: var(--mermaid-font-family);
|
|
|
font-size: 12px;
|
|
|
background: ${t.tertiaryColor};
|
|
|
border: 1px solid ${t.border2};
|
|
|
border-radius: 2px;
|
|
|
pointer-events: none;
|
|
|
z-index: 100;
|
|
|
}
|
|
|
|
|
|
.task-type-0, .section-type-0 {
|
|
|
${t.fillType0?"fill: "+t.fillType0:""};
|
|
|
}
|
|
|
.task-type-1, .section-type-1 {
|
|
|
${t.fillType0?"fill: "+t.fillType1:""};
|
|
|
}
|
|
|
.task-type-2, .section-type-2 {
|
|
|
${t.fillType0?"fill: "+t.fillType2:""};
|
|
|
}
|
|
|
.task-type-3, .section-type-3 {
|
|
|
${t.fillType0?"fill: "+t.fillType3:""};
|
|
|
}
|
|
|
.task-type-4, .section-type-4 {
|
|
|
${t.fillType0?"fill: "+t.fillType4:""};
|
|
|
}
|
|
|
.task-type-5, .section-type-5 {
|
|
|
${t.fillType0?"fill: "+t.fillType5:""};
|
|
|
}
|
|
|
.task-type-6, .section-type-6 {
|
|
|
${t.fillType0?"fill: "+t.fillType6:""};
|
|
|
}
|
|
|
.task-type-7, .section-type-7 {
|
|
|
${t.fillType0?"fill: "+t.fillType7:""};
|
|
|
}
|
|
|
|
|
|
.actor-0 {
|
|
|
${t.actor0?"fill: "+t.actor0:""};
|
|
|
}
|
|
|
.actor-1 {
|
|
|
${t.actor1?"fill: "+t.actor1:""};
|
|
|
}
|
|
|
.actor-2 {
|
|
|
${t.actor2?"fill: "+t.actor2:""};
|
|
|
}
|
|
|
.actor-3 {
|
|
|
${t.actor3?"fill: "+t.actor3:""};
|
|
|
}
|
|
|
.actor-4 {
|
|
|
${t.actor4?"fill: "+t.actor4:""};
|
|
|
}
|
|
|
.actor-5 {
|
|
|
${t.actor5?"fill: "+t.actor5:""};
|
|
|
}
|
|
|
`,"getStyles"),x3t=v3t}),P3t=t(()=>{function e(t,e,r,n,i,a,o,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",s).style("text-anchor","middle").text(t),o)}function c(t,e,r,n,i,a,o,s,l){var{taskFontSize:c,taskFontFamily:h}=s,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,o)}}function r(t,e,r,n,i,a,o,s){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,o,s),g(l,o)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}Q3(),e5(),b3t=Ae(function(t,e){return v3(t,e)},"drawRect"),w3t=Ae(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(t){var e=zb().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(t){var e=zb().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),Ae(n,"smile"),Ae(i,"sad"),Ae(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(t),e},"drawFace"),k3t=Ae(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),T3t=Ae(function(t,e){return b3(t,e)},"drawText"),E3t=Ae(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}Ae(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,T3t(t,e)},"drawLabel"),_3t=Ae(function(t,e,r){var t=t.append("g"),n=T3();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,b3t(t,n),L3t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),C3t=-1,S3t=Ae(function(t,r,e){let n=r.x+e.width/2,i=t.append("g"),a=(C3t++,i.append("line").attr("id","task"+C3t).attr("x1",n).attr("y1",r.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),w3t(i,{cx:n,cy:300+30*(5-r.score),score:r.score}),(t=T3()).x=r.x,t.y=r.y,t.fill=r.fill,t.width=e.width,t.height=e.height,t.class="task task-type-"+r.num,t.rx=3,t.ry=3,b3t(i,t),r.x+14);r.people.forEach(t=>{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};k3t(i,e),a+=10}),L3t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),A3t=Ae(function(t,e){x3(t,e)},"drawBackgroundRect"),Ae(e,"byText"),Ae(c,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),L3t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},N3t=Ae(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"),I3t={drawRect:b3t,drawCircle:k3t,drawSection:_3t,drawText:T3t,drawLabel:E3t,drawTask:S3t,drawBackgroundRect:A3t,initGraphics:N3t}});function B3t(r){let n=D().journey,i=60;Object.keys($3t).forEach(t=>{var e=$3t[t].color,e={cx:20,cy:i,r:7,fill:e,stroke:"#000",pos:$3t[t].position},e=(I3t.drawCircle(r,e),{x:40,y:i+7,fill:"#666",text:t,textMargin:5|n.boxTextMargin});I3t.drawText(r,e),i+=20})}var F3t,$3t,z3t,G3t,U3t,q3t,Y3t,j3t,H3t,W3t,V3t=t(()=>{Q3(),P3t(),i(),ec(),F3t=Ae(function(e){Object.keys(e).forEach(function(t){z3t[t]=e[t]})},"setConf"),$3t={},Ae(B3t,"drawActorLegend"),z3t=D().journey,G3t=z3t.leftMargin,U3t=Ae(function(t,e,r,n){let i=D().journey,a=D().securityLevel,o;"sandbox"===a&&(o=O("#i"+e));var s,l=O("sandbox"===a?o.nodes()[0].contentDocument.body:"body"),l=(q3t.init(),l.select("#"+e)),e=(I3t.initGraphics(l),n.db.getTasks()),c=n.db.getDiagramTitle(),n=n.db.getActors();for(s in $3t)delete $3t[s];let h=0;n.forEach(t=>{$3t[t]={color:i.actorColours[h%i.actorColours.length],position:h},h++}),B3t(l),q3t.insert(0,0,G3t,50*Object.keys($3t).length),H3t(l,e,0);var n=q3t.getBounds(),e=(c&&l.append("text").text(c).attr("x",G3t).attr("font-size","4ex").attr("font-weight","bold").attr("y",25),n.stopy-n.starty+2*i.diagramMarginY),u=G3t+n.stopx+2*i.diagramMarginX,c=(Vl(l,e,u,i.useMaxWidth),l.append("line").attr("x1",G3t).attr("y1",4*i.height).attr("x2",u-G3t-4).attr("y2",4*i.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),c?70:0);l.attr("viewBox",n.startx+` -25 ${u} `+(e+c)),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",e+c+25)},"draw"),q3t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:Ae(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:Ae(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:Ae(function(n,i,a,o){let s=D().journey,l=this,c=0;function t(r){return Ae(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",i-e*s.boxMargin,Math.min),l.updateVal(t,"stopy",o+e*s.boxMargin,Math.max),l.updateVal(q3t.data,"startx",n-e*s.boxMargin,Math.min),l.updateVal(q3t.data,"stopx",a+e*s.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",n-e*s.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*s.boxMargin,Math.max),l.updateVal(q3t.data,"starty",i-e*s.boxMargin,Math.min),l.updateVal(q3t.data,"stopy",o+e*s.boxMargin,Math.max))},"updateItemBounds")}Ae(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:Ae(function(t,e,r,n){var i=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,n),e=Math.max(e,n);this.updateVal(q3t.data,"startx",i,Math.min),this.updateVal(q3t.data,"starty",r,Math.min),this.updateVal(q3t.data,"stopx",t,Math.max),this.updateVal(q3t.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),bumpVerticalPos:Ae(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:Ae(function(){return this.verticalPos},"getVerticalPos"),getBounds:Ae(function(){return this.data},"getBounds")},Y3t=z3t.sectionFills,j3t=z3t.sectionColours,H3t=Ae(function(t,n,e){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,o=e+r,s=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=Y3t[s%Y3t.length],h=s%Y3t.length,c=j3t[s%j3t.length];let e=0,r=d.section;for(let t=u;t<n.length&&n[t].section==r;t++)e+=1;var p={x:u*i.taskMargin+u*i.width+G3t,y:50,text:d.section,fill:l,num:h,colour:c,taskCount:e};I3t.drawSection(t,p,i),a=d.section,s++}p=d.people.reduce((t,e)=>($3t[e]&&(t[e]=$3t[e]),t),{}),d.x=u*i.taskMargin+u*i.width+G3t,d.y=o,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,I3t.drawTask(t,d,i),q3t.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),W3t={setConf:F3t,draw:U3t}}),X3t={};J(X3t,{diagram:()=>K3t});var K3t,Z3t,Q3t,J3t=t(()=>{R3t(),D3t(),O3t(),V3t(),K3t={parser:n3t,db:y3t,renderer:W3t,styles:x3t,init:Ae(t=>{W3t.setConf(t.journey),y3t.clear()},"init")}}),t5t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],l=[1,16],c=[1,17],n={trace:Ae(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:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 15:n.addTask(a[s],0,""),this.$=a[s];break;case 16:n.addEvent(a[s].substr(2)),this.$=a[s]}},"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:n,12:i,14:a,16:o,17:s,18:14,19:15,20:l,21:c},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:n,12:i,14:a,16:o,17:s,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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(Z3t=new((t.prototype=n).Parser=t)).parser=Z3t,Q3t=Z3t}),e5t={};J(e5t,{addEvent:()=>p5t,addSection:()=>c5t,addTask:()=>d5t,addTaskOrg:()=>g5t,clear:()=>l5t,default:()=>m5t,getCommonDb:()=>s5t,getSections:()=>h5t,getTasks:()=>u5t});var r5t,n5t,i5t,a5t,o5t,s5t,l5t,c5t,h5t,u5t,d5t,p5t,g5t,f5t,m5t,y5t=t(()=>{fh(),r5t="",n5t=0,i5t=[],a5t=[],o5t=[],s5t=Ae(()=>nc,"getCommonDb"),l5t=Ae(function(){i5t.length=0,a5t.length=0,r5t="",o5t.length=0,lc()},"clear"),c5t=Ae(function(t){r5t=t,i5t.push(t)},"addSection"),h5t=Ae(function(){return i5t},"getSections"),u5t=Ae(function(){let t=f5t(),e=0;for(;!t&&e<100;)t=f5t(),e++;return a5t.push(...o5t),a5t},"getTasks"),d5t=Ae(function(t,e,r){t={id:n5t++,section:r5t,type:r5t,task:t,score:e||0,events:r?[r]:[]},o5t.push(t)},"addTask"),p5t=Ae(function(t){o5t.find(t=>t.id===n5t-1).events.push(t)},"addEvent"),g5t=Ae(function(t){t={section:r5t,type:r5t,description:t,task:t,classes:[]},a5t.push(t)},"addTaskOrg"),f5t=Ae(function(){let t=Ae(function(t){return o5t[t].processed},"compileTask"),e=!0;for(var[r,n]of o5t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),m5t={clear:l5t,getCommonDb:s5t,addSection:c5t,getSections:h5t,getTasks:u5t,addTask:d5t,addTaskOrg:g5t,addEvent:p5t}});function v5t(t,s){t.each(function(){var e,r=O(this),n=r.text().split(/(\s+|<br>)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),o=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;t<n.length;t++)e=n[n.length-1-t],i.push(e),o.text(i.join(" ").trim()),(o.node().getComputedTextLength()>s||"<br>"===e)&&(i.pop(),o.text(i.join(" ").trim()),i="<br>"===e?[""]:[e],o=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var x5t,b5t,w5t,k5t,T5t,E5t,_5t,C5t,S5t,A5t,L5t,N5t,I5t,M5t,R5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,G5t,U5t,q5t=t(()=>{function e(t,e,r,n,i,a,o,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",s).style("text-anchor","middle").text(t),o)}function c(t,e,r,n,i,a,o,s,l){var{taskFontSize:c,taskFontFamily:h}=s,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,o)}}function r(t,e,r,n,i,a,o,s){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,o,s),g(l,o)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}Q3(),x5t=Ae(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"),b5t=Ae(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(t){var e=zb().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(t){var e=zb().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),Ae(n,"smile"),Ae(i,"sad"),Ae(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(t),e},"drawFace"),w5t=Ae(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),k5t=Ae(function(t,e){var r=e.text.replace(/<br\s*\/?>/gi," "),n=((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 n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),T5t=Ae(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}Ae(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,k5t(t,e)},"drawLabel"),E5t=Ae(function(t,e,r){var t=t.append("g"),n=L5t();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,x5t(t,n),N5t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),_5t=-1,C5t=Ae(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");_5t++,t.append("line").attr("id","task"+_5t).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),b5t(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=L5t()).x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+e.num,n.rx=3,n.ry=3,x5t(t,n),N5t(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),S5t=Ae(function(t,e){x5t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),A5t=Ae(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),L5t=Ae(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ae(e,"byText"),Ae(c,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),N5t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},I5t=Ae(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"),Ae(v5t,"wrap"),M5t=Ae(function(t,e,r,n){var r=r%12-1,t=t.append("g"),i=(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(v5t,e.width).node().getBBox(),o=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=a.height+1.1*o*.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+")"),D5t(i,e,r,n),e},"drawNode"),R5t=Ae(function(t,e,r){var n=(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(v5t,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),n.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),D5t=Ae(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"),O5t={drawRect:x5t,drawCircle:w5t,drawSection:E5t,drawText:k5t,drawLabel:T5t,drawTask:C5t,drawBackgroundRect:S5t,getTextObj:A5t,getNoteRect:L5t,initGraphics:I5t,drawNode:M5t,getVirtualNodeHeight:R5t}}),Y5t=t(()=>{Q3(),q5t(),e(),i(),ec(),P5t=Ae(function(t,e,r,n){let i=D(),a=i.leftMargin??50,o=(R.debug("timeline",n.db),i.securityLevel),s,l=("sandbox"===o&&(s=O("#i"+e)),O("sandbox"===o?s.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();R.debug("task",c),O5t.initGraphics(l);var u,d,e=n.db.getSections();R.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=O5t.getVirtualNodeHeight(l,t,i),R.debug("sectionHeight before draw",t),p=Math.max(p,t+20)}),0),w=0;R.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=O5t.getVirtualNodeHeight(l,T,i);R.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+=O5t.getVirtualNodeHeight(l,E,i)}w=Math.max(w,t)}R.debug("maxSectionHeight before draw",p),R.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},n=(R.debug("sectionNode",r),l.append("g")),r=O5t.drawNode(n,r,v,i);R.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0<t.length&&B5t(l,t,v,m,y,g,i,b,w,p,!1),m+=200*Math.max(t.length,1),y=50,v++}):(x=!1,B5t(l,c,v,m,y,g,i,b,w,p,!0)),n=l.node().getBBox(),R.debug("bounds",n),h&&l.append("text").text(h).attr("x",n.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",n.width+3*a).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Xl(void 0,l,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),B5t=Ae(function(t,e,r,n,i,a,o,s,l,c,h){for(var u of e){var d={descr:u.task,section:r,number:r,width:150,padding:20,maxHeight:a},p=(R.debug("taskNode",d),t.append("g").attr("class","taskWrapper")),d=O5t.drawNode(p,d,r,o).height;R.debug("taskHeight after draw",d),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,d),u.events&&(p=t.append("g").attr("class","lineWrapper"),i+=100,F5t(t,u.events,r,n,i,o),i-=100,p.append("line").attr("x1",n+95).attr("y1",i+a).attr("x2",n+95).attr("y2",i+a+(h?a:c)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),n+=200,h&&!o.timeline?.disableMulticolor&&r++}},"drawTasks"),F5t=Ae(function(t,e,r,n,i,a){let o=0,s=i;i+=100;for(var l of e){var l={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50},c=(R.debug("eventNode",l),t.append("g").attr("class","eventWrapper")),l=O5t.drawNode(c,l,r,a).height;o+=l,c.attr("transform",`translate(${n}, ${i})`),i=i+10+l}return i=s,o},"drawEvents"),$5t={setConf:Ae(()=>{},"setConf"),draw:P5t}}),j5t=t(()=>{bn(),z5t=Ae(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],Ye(e["lineColor"+t])?e["lineColor"+t]=Ve(e["lineColor"+t],20):e["lineColor"+t]=Ke(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var n=""+(17-3*t);r+=`
|
|
|
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} path {
|
|
|
fill: ${e["cScale"+t]};
|
|
|
}
|
|
|
.section-${t-1} text {
|
|
|
fill: ${e["cScaleLabel"+t]};
|
|
|
}
|
|
|
.node-icon-${t-1} {
|
|
|
font-size: 40px;
|
|
|
color: ${e["cScaleLabel"+t]};
|
|
|
}
|
|
|
.section-edge-${t-1}{
|
|
|
stroke: ${e["cScale"+t]};
|
|
|
}
|
|
|
.edge-depth-${t-1}{
|
|
|
stroke-width: ${n};
|
|
|
}
|
|
|
.section-${t-1} line {
|
|
|
stroke: ${e["cScaleInv"+t]} ;
|
|
|
stroke-width: 3;
|
|
|
}
|
|
|
|
|
|
.lineWrapper line{
|
|
|
stroke: ${e["cScaleLabel"+t]} ;
|
|
|
}
|
|
|
|
|
|
.disabled, .disabled circle, .disabled text {
|
|
|
fill: lightgray;
|
|
|
}
|
|
|
.disabled text {
|
|
|
fill: #efefef;
|
|
|
}
|
|
|
`}return r},"genSections"),G5t=Ae(t=>`
|
|
|
.edge {
|
|
|
stroke-width: 3;
|
|
|
}
|
|
|
${z5t(t)}
|
|
|
.section-root rect, .section-root path, .section-root circle {
|
|
|
fill: ${t.git0};
|
|
|
}
|
|
|
.section-root text {
|
|
|
fill: ${t.gitBranchLabel0};
|
|
|
}
|
|
|
.icon-container {
|
|
|
height:100%;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
.edge {
|
|
|
fill: none;
|
|
|
}
|
|
|
.eventWrapper {
|
|
|
filter: brightness(120%);
|
|
|
}
|
|
|
`,"getStyles"),U5t=G5t}),H5t={};J(H5t,{diagram:()=>W5t});var W5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t6t,e6t,r6t,n6t,i6t,a6t,o6t,s6t,l6t,c6t,h6t,u6t=t(()=>{t5t(),y5t(),Y5t(),j5t(),W5t={db:e5t,renderer:$5t,parser:Q3t,styles:U5t}}),d6t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[s].id),n.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:n.getLogger().trace("Icon: ",a[s]),n.decorateNode({icon:a[s]});break;case 17:case 21:n.decorateNode({class:a[s]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[s].id),n.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:n.decorateNode({icon:a[s]});break;case 25:n.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:n.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:n.getType(a[s-2],a[s])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};r.lexer=c,Ae(t,"Parser"),(V5t=new((t.prototype=r).Parser=t)).parser=V5t,X5t=V5t}),p6t=t(()=>{i(),tc(),e(),Nn(),K5t=[],Z5t=0,Q5t={},J5t=Ae(()=>{K5t=[],Z5t=0,Q5t={}},"clear"),t6t=Ae(function(e){for(let t=K5t.length-1;0<=t;t--)if(K5t[t].level<e)return K5t[t];return null},"getParent"),e6t=Ae(()=>0<K5t.length?K5t[0]:null,"getMindmap"),r6t=Ae((t,e,r,n)=>{R.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??xr.mindmap.padding;switch(n){case n6t.ROUNDED_RECT:case n6t.RECT:case n6t.HEXAGON:a*=2}if(e={id:Z5t++,nodeId:Sl(e,i),level:t,descr:Sl(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??xr.mindmap.maxNodeWidth,padding:a},r=t6t(t))r.children.push(e);else if(0!==K5t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');K5t.push(e)},"addNode"),n6t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},i6t=Ae((t,e)=>{switch(R.debug("In get type",t,e),t){case"[":return n6t.RECT;case"(":return")"===e?n6t.ROUNDED_RECT:n6t.CLOUD;case"((":return n6t.CIRCLE;case")":return n6t.CLOUD;case"))":return n6t.BANG;case"{{":return n6t.HEXAGON;default:return n6t.DEFAULT}},"getType"),a6t=Ae((t,e)=>{Q5t[t]=e},"setElementForId"),o6t=Ae(t=>{var e,r;t&&(e=D(),r=K5t[K5t.length-1],t.icon&&(r.icon=Sl(t.icon,e)),t.class)&&(r.class=Sl(t.class,e))},"decorateNode"),s6t=Ae(t=>{switch(t){case n6t.DEFAULT:return"no-border";case n6t.RECT:return"rect";case n6t.ROUNDED_RECT:return"rounded-rect";case n6t.CIRCLE:return"circle";case n6t.CLOUD:return"cloud";case n6t.BANG:return"bang";case n6t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),l6t=Ae(()=>R,"getLogger"),c6t=Ae(t=>Q5t[t],"getElementById"),h6t={clear:J5t,addNode:r6t,getMindmap:e6t,nodeType:n6t,getType:i6t,setElementForId:a6t,decorateNode:o6t,type2Str:s6t,getLogger:l6t,getElementById:c6t}});function g6t(t){return(g6t="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 f6t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m6t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function y6t(t,e,r){return e&&m6t(t.prototype,e),r&&m6t(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function v6t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x6t(t,e){return b6t(t)||w6t(t,e)||k6t(t,e)||E6t()}function b6t(t){if(Array.isArray(t))return t}function w6t(t,e){var r=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}function k6t(t,e){var r;if(t)return"string"==typeof t?T6t(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)?T6t(t,e):void 0}function T6t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function E6t(){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 _6t(t,e){var r,n,i,a,o=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o)return n=!(r=!0),{s:Ae(function(){o=o.call(t)},"s"),n:Ae(function(){var t=o.next();return r=t.done,t},"n"),e:Ae(function(t){n=!0,i=t},"e"),f:Ae(function(){try{r||null==o.return||o.return()}finally{if(n)throw i}},"f")};if(Array.isArray(t)||(o=k6t(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),a=0,{s:e=Ae(function(){},"F"),n:Ae(function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:Ae(function(t){throw t},"e"),f:e};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C6t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function S6t(t,e){return t(e={exports:{}},e.exports),e.exports}function A6t(t){for(var e=t.length;e--&&w7t.test(t.charAt(e)););return e}function L6t(t){return t&&t.slice(0,k7t(t)+1).replace(T7t,"")}function N6t(t){var e=_7t.call(t,S7t),r=t[S7t];try{var n=!(t[S7t]=void 0)}catch{}var i=C7t.call(t);return n&&(e?t[S7t]=r:delete t[S7t]),i}function I6t(t){return L7t.call(t)}function M6t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(I7t&&I7t in Object(t)?A7t:N7t)(t)}function R6t(t){return null!=t&&"object"==typeof t}function D6t(t){return"symbol"==typeof t||R7t(t)&&"[object Symbol]"==M7t(t)}function O6t(t){if("number"==typeof t)return t;if(D7t(t))return O7t;if(y7t(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=y7t(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=E7t(t);var e=B7t.test(t);return e||F7t.test(t)?$7t(t.slice(2),e?2:8):P7t.test(t)?O7t:+t}function P6t(n,r,t){var i,a,o,s,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(t){var e=i,r=a;return i=a=void 0,h=t,s=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):s}function f(t){var e=r-(t-c);return u?U7t(e,o-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&o<=t-h}function y(){var t=b7t();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&i?p(t):(i=a=void 0,s)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?s:v(b7t())}function w(){var t=b7t(),e=m(t);if(i=arguments,a=this,c=t,e){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),s}return r=z7t(r)||0,y7t(t)&&(e=!!t.leading,u="maxWait"in t,o=u?G7t(z7t(t.maxWait)||0,r):o,d="trailing"in t?!!t.trailing:d),Ae(p,"invokeFunc"),Ae(g,"leadingEdge"),Ae(f,"remainingWait"),Ae(m,"shouldInvoke"),Ae(y,"timerExpired"),Ae(v,"trailingEdge"),Ae(x,"cancel"),Ae(b,"flush"),Ae(w,"debounced"),w.cancel=x,w.flush=b,w}function B6t(t,e,r,n,i,a){var o=Bkt(t)?t:pEt[t]||pEt.euclidean;return 0===e&&Bkt(t)?o(i,a):o(e,r,n,i,a)}function F6t(t,e){var r;return!JEt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!D7t(t))||e_t.test(t)||!t_t.test(t)||null!=e&&t in Object(e))}function $6t(t){return!!y7t(t)&&("[object Function]"==(t=M7t(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function z6t(t){return!!i_t&&i_t in t}function G6t(t){if(null!=t){try{return o_t.call(t)}catch{}try{return t+""}catch{}}return""}function U6t(t){return!(!y7t(t)||a_t(t))&&(n_t(t)?c_t:l_t).test(s_t(t))}function q6t(t,e){return t?.[e]}function Y6t(t,e){return t=u_t(t,e),h_t(t)?t:void 0}function j6t(){this.__data__=p_t?p_t(null):{},this.size=0}function H6t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function W6t(t){var e,r=this.__data__;return p_t?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:g_t.call(r,t)?r[t]:void 0}function V6t(t){var e=this.__data__;return p_t?void 0!==e[t]:f_t.call(e,t)}function X6t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=p_t&&void 0===e?"__lodash_hash_undefined__":e,this}function K6t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Z6t(){this.__data__=[],this.size=0}function Q6t(t,e){return t===e||t!=t&&e!=e}function J6t(t,e){for(var r=t.length;r--;)if(y_t(t[r][0],e))return r;return-1}function twt(t){var e=this.__data__;return!((t=v_t(e,t))<0||(t==e.length-1?e.pop():x_t.call(e,t,1),--this.size,0))}function ewt(t){var e=this.__data__;return(t=v_t(e,t))<0?void 0:e[t][1]}function rwt(t){return-1<v_t(this.__data__,t)}function nwt(t,e){var r=this.__data__,n=v_t(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function iwt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function awt(){this.size=0,this.__data__={hash:new m_t,map:new(w_t||b_t),string:new m_t}}function owt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function swt(t,e){return t=t.__data__,k_t(e)?t["string"==typeof e?"string":"hash"]:t.map}function lwt(t){return t=T_t(this,t).delete(t),this.size-=t?1:0,t}function cwt(t){return T_t(this,t).get(t)}function hwt(t){return T_t(this,t).has(t)}function uwt(t,e){var r=T_t(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function dwt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function pwt(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(__t);var a=Ae(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(pwt.Cache||E_t),a}function gwt(t){var e=(t=C_t(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}function fwt(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function mwt(t){var e;return"string"==typeof t?t:JEt(t)?N_t(t,mwt)+"":D7t(t)?M_t?M_t.call(t):"":"0"==(e=t+"")&&1/t==-I_t?"-0":e}function ywt(t){return null==t?"":R_t(t)}function vwt(t,e){return JEt(t)?t:r_t(t,e)?[t]:L_t(D_t(t))}function xwt(t){var e;return"string"==typeof t||D7t(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}function bwt(t,e){for(var r=0,n=(e=O_t(e,t)).length;null!=t&&r<n;)t=t[P_t(e[r++])];return r&&r==n?t:void 0}function wwt(t,e,r){return void 0===(t=null==t?void 0:B_t(t,e))?r:t}function kwt(t,e,r){"__proto__"==e&&$_t?$_t(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Twt(t,e,r){var n=t[e];G_t.call(t,e)&&y_t(n,r)&&(void 0!==r||e in t)||z_t(t,e,r)}function Ewt(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&q_t.test(t))&&-1<t&&t%1==0&&t<e}function _wt(t,e,r,n){if(y7t(t))for(var i=-1,a=(e=O_t(e,t)).length,o=a-1,s=t;null!=s&&++i<a;){var l,c=P_t(e[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;i!=o&&(l=s[c],void 0===(h=n?n(l,c,s):void 0))&&(h=y7t(l)?l:Y_t(e[i+1])?[]:{}),U_t(s,c,h),s=s[c]}return t}function Cwt(t,e,r){return null==t?t:j_t(t,e,r)}function Swt(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r<n;)e[r]=t[r];return e}function Awt(t){return JEt(t)?N_t(t,P_t):D7t(t)?[t]:W_t(L_t(D_t(t)))}function Lwt(t,e,r,n){for(var i=[],a=new ATt,o=t.cy().hasCompoundNodes(),s=0;s<t.length;s++){var l=t[s];r?i.push(l):o&&n(i,a,l)}for(;0<i.length;){var c=i.shift();e(c),a.add(c.id()),o&&n(i,a,c)}return t}function Nwt(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a)}}function Iwt(t,e,r){r.isChild()&&(r=r._private.parent,e.has(r.id())||t.push(r))}function Mwt(t,e,r){Iwt(t,e,r),Nwt(t,e,r)}function Rwt(o){return function(t){if(void 0===t&&(t=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var e=0,r=this[0],n=r._private.edges,i=0;i<n.length;i++){var a=n[i];!t&&a.isLoop()||(e+=o(r,a))}return e}}}function Dwt(a,o){return function(t){for(var e,r=this.nodes(),n=0;n<r.length;n++){var i=r[n][a](t);void 0===i||void 0!==e&&!o(i,e)||(e=i)}return e}}function Owt(){return!1}function Pwt(){return!0}function Bwt(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:zCt,e=1<arguments.length?arguments[1]:void 0,r=0;r<$Ct.length;r++){var n=$Ct[r];this[n]=t[n]||FCt[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}function Fwt(t,e,r){var n,i=r._private;return null==(n=(i=i.styleCache=i.styleCache||[])[t])?i[t]=e(r):n}function $wt(e,r){return e=rTt(e),Ae(function(t){return Fwt(e,r,t)},"cachedStyleFunction")}function zwt(e,r){e=rTt(e);var n=Ae(function(t){return r.call(t)},"selfFn");return Ae(function(){var t=this[0];if(t)return Fwt(e,n,t)},"cachedPrototypeStyleFunction")}function Gwt(t,e){var r=t._private.data.parent?t.parents():null;if(r)for(var n=0;n<r.length;n++)if(!e(r[n]))return!1;return!0}function Uwt(t){var n=t.ok,i=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,!!n(t)&&(t.isNode()?!r||Gwt(t,a):(t=e.source,e=e.target,i(t)&&(!r||Gwt(t,i))&&(t===e||i(e)&&(!r||Gwt(e,i)))))):void 0)}}function qwt(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 n=this[r],i=!l.ableField||n._private[l.ableField],a=n._private[l.field]!=l.value;if(l.overrideAble){var o=l.overrideAble(n);if(void 0!==o&&!(i=o))return this}i&&(n._private[l.field]=l.value,a)&&t.push(n)}var s=this.spawn(t);s.updateStyle(),s.emit(l.event),e&&s.emit(e)}return this}}function Ywt(r){KCt[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]}},KCt[r.on]=qwt({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),KCt[r.off]=qwt({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function jwt(i){return Ae(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r]._private[i.attr];n&&e.push(n)}return this.spawn(e,!0).filter(t)},"sourceImpl")}function Hwt(h){return Ae(function(t){var e=[],r=this._private.cy,n=h||{};Pkt(t)&&(t=r.$(t));for(var i=0;i<t.length;i++)for(var a=t[i]._private.edges,o=0;o<a.length;o++){var s=a[o],l=s._private.data,c=this.hasElementWithId(l.source)&&t.hasElementWithId(l.target),l=t.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!c&&!l||(n.thisIsSrc||n.thisIsTgt)&&(n.thisIsSrc&&!c||n.thisIsTgt&&!l)||e.push(s)}return this.spawn(e,!0)},"edgesWithImpl")}function Wwt(f){return f=l7t({},{codirected:!1},f),Ae(function(t){for(var e=[],r=this.edges(),n=f,i=0;i<r.length;i++)for(var a=r[i]._private,o=a.source,s=o._private.data.id,l=a.data.target,c=o._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===s;(n.codirected&&g||!n.codirected&&(g||s===d&&l===p))&&e.push(u)}return this.spawn(e,!0).filter(t)},"parallelEdgesImpl")}function Vwt(o,e,s,r){var t=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var n=0;n<4;++n)if("number"!=typeof arguments[n]||isNaN(arguments[n])||!isFinite(arguments[n]))return!1;o=Math.min(o,1),s=Math.min(s,1),o=Math.max(o,0),s=Math.max(s,0);var a=new(t?Float32Array:Array)(11);function i(t,e){return 1-3*e+3*t}function l(t,e,r){return((i(e,r)*t+(3*r-6*e))*t+3*e)*t}function c(t,e,r){return 3*i(e,r)*t*t+2*(3*r-6*e)*t+3*e}function h(t,e){for(var r=0;r<4;++r){var n=c(e,o,s);if(0===n)return e;e-=(l(e,o,s)-t)/n}return e}function u(){for(var t=0;t<11;++t)a[t]=l(.1*t,o,s)}function d(t,e,r){for(var n,i,a=0;0<(n=l(i=e+(r-e)/2,o,s)-t)?r=i:e=i,1e-7<Math.abs(n)&&++a<10;);return i}function p(t){for(var e=0,r=1;10!==r&&a[r]<=t;++r)e+=.1;var n=e+(t-a[--r])/(a[r+1]-a[r])*.1,i=c(n,o,s);return.001<=i?h(t,n):0===i?n:d(t,e,e+.1)}Ae(i,"A"),Ae(function(t,e){return 3*e-6*t},"B"),Ae(function(t){return 3*t},"C"),Ae(l,"calcBezier"),Ae(c,"getSlope"),Ae(h,"newtonRaphsonIterate"),Ae(u,"calcSampleValues"),Ae(d,"binarySubdivide"),Ae(p,"getTForX");var g=!1;function f(){g=!0,o===e&&s===r||u()}Ae(f,"precompute"),(t=Ae(function(t){return g||f(),o===e&&s===r?t:0===t?0:1===t?1:l(p(t),e,r)},"f")).getControlPoints=function(){return[{x:o,y:e},{x:s,y:r}]};var m="generateBezier("+[o,e,s,r]+")";return t.toString=function(){return m},t}function Xwt(t,e,r,n,i){return 1===n||e===r?r:(i=i(e,r,n),null!=t&&((t.roundValue||t.color)&&(i=Math.round(i)),void 0!==t.min&&(i=Math.max(i,t.min)),void 0!==t.max)?Math.min(i,t.max):i)}function Kwt(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function Zwt(t,e,r,n,i){var a=null!=i?i.type:null,o=(r<0?r=0:1<r&&(r=1),Kwt(t,i)),s=Kwt(e,i);if(it(o)&&it(s))return Xwt(a,o,s,r,n);if(Fkt(o)&&Fkt(s)){for(var l=[],c=0;c<s.length;c++){var h=o[c],u=s[c];null!=h&&null!=u?(h=Xwt(a,h,u,r,n),l.push(h)):l.push(u)}return l}}function Qwt(t,e,r,n){var i=!n,a=t._private,o=e._private,e=o.easing,s=o.startTime,l=(n?t:t.cy()).style(),c=(o.easingImpl||(null==e?o.easingImpl=tSt.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(o.duration),o.easingImpl=tSt[u].apply(null,e)):o.easingImpl=tSt[u])),o.easingImpl),h=0===o.duration?1:(r-s)/o.duration;if((h=o.applying?o.progress:h)<0?h=0:1<h&&(h=1),null==o.delay){var e=o.startPosition,s=((u=o.position)&&i&&!t.locked()&&(r={},Jwt(e.x,u.x)&&(r.x=Zwt(e.x,u.x,h,c)),Jwt(e.y,u.y)&&(r.y=Zwt(e.y,u.y,h,c)),t.position(r)),o.startPan),e=o.pan,u=a.pan,u=((r=null!=e&&n)&&(Jwt(s.x,e.x)&&(u.x=Zwt(s.x,e.x,h,c)),Jwt(s.y,e.y)&&(u.y=Zwt(s.y,e.y,h,c)),t.emit("pan")),o.startZoom),d=((e=null!=(s=o.zoom)&&n)&&(Jwt(u,s)&&(a.zoom=r8t(a.minZoom,Zwt(u,s,h,c),a.maxZoom)),t.emit("zoom")),(r||e)&&t.emit("viewport"),o.style);if(d&&0<d.length&&i){for(var p=0;p<d.length;p++){var g=(m=d[p]).name,f=o.startStyle[g],m=Zwt(f,m,h,c,l.properties[f.name]);l.overrideBypass(t,g,m)}t.emit("style")}}return o.progress=h}function Jwt(t,e){return!(null==t||null==e||!(it(t)&&it(e)||t&&e))}function tkt(t,e,r,n){(e=e._private).started=!0,e.startTime=r-e.progress*e.duration}function ekt(h,t){var e=t._private.aniEles,u=[];function r(t,e){var r,n=(i=t._private).animation.current,i=i.animation.queue,a=!1;0===n.length&&(r=i.shift())&&n.push(r);for(var o=Ae(function(t){for(var e=t.length-1;0<=e;e--)(0,t[e])();t.splice(0,t.length)},"callbacks"),s=n.length-1;0<=s;s--){var l=n[s],c=l._private;c.stopped?(n.splice(s,1),c.hooked=!1,c.playing=!1,c.started=!1,o(c.frames)):(c.playing||c.applying)&&(c.playing&&c.applying&&(c.applying=!1),c.started||tkt(0,l,h),Qwt(t,l,h,e),c.applying&&(c.applying=!1),o(c.frames),null!=c.step&&c.step(h),l.completed()&&(n.splice(s,1),c.hooked=!1,c.playing=!1,c.started=!1,o(c.completes)),a=!0)}return e||0!==n.length||0!==i.length||u.push(t),a}Ae(r,"stepOne");for(var n=!1,i=0;i<e.length;i++)var a=r(e[i]),n=n||a;var o=r(t,!0);(n||o)&&(0<e.length?t.notify("draw",e):t.notify("draw")),e.unmerge(u),t.emit("step")}function rkt(t){this.options=l7t({},cSt,hSt,t)}function nkt(t){this.options=l7t({},pSt,t)}function ikt(t){this.options=l7t({},gSt,t)}function akt(t){this.options=l7t({},mSt,t);var i=(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=i.some(function(t){return t.data("id")===e}),n=i.some(function(t){return t.data("id")===r});return!t||!n});this.options.eles=this.options.eles.not(t)}function okt(t){this.options=l7t({},PSt,t)}function skt(t){this.options=l7t({},BSt,t)}function lkt(t){this.options=l7t({},FSt,t)}function ckt(t){this.options=l7t({},$St,t)}function hkt(t){this.options=t,this.notifications=0}function ukt(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 dkt(t,e,r,n){return 0===n||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}:(aAt(t,e,r,n,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:GSt,cy:USt,radius:VSt,startX:QSt,startY:JSt,stopX:tAt,stopY:eAt,startAngle:qSt.ang+Math.PI/2*jSt,endAngle:YSt.ang-Math.PI/2*jSt,counterClockwise:HSt})}function pkt(t){var e=[];if(null!=t){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];e.push({x:n,y:i})}return e}}function gkt(t,e,r){for(var n=Ae(function(t,e,r,n){return JTt(t,e,r,n)},"qbezierAt$1"),i=e._private.rstyle.bezierPts,a=0;a<t.bezierProjPcts.length;a++){var o=t.bezierProjPcts[a];i.push({x:n(r[0],r[2],r[4],o),y:n(r[1],r[3],r[5],o)})}}function fkt(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function mkt(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];0===i&&(n=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function ykt(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y)}var o=r,e=r[0];for(t.moveTo(e.x,e.y),i=1;i<o.length;i++)a=o[i],t.lineTo(a.x,a.y);t.closePath&&t.closePath()}function vkt(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,2*Math.PI,!1);var a=e,r=a[0];t.moveTo(r.x,r.y);for(var o=0;o<a.length;o++){var s=a[o];t.lineTo(s.x,s.y)}t.closePath&&t.closePath()}function xkt(t,e,r,n){t.arc(e,r,n,0,2*Math.PI,!1)}function bkt(t,e,r,n,i){var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,o=6<arguments.length?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),o?t.stroke():t.fill()}function wkt(t,e){for(var r=atob(t),t=new ArrayBuffer(r.length),n=new Uint8Array(t),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([t],{type:e})}function kkt(t){var e=t.indexOf(",");return t.substr(e+1)}function Tkt(t,n,i){var e=Ae(function(){return n.toDataURL(i,t.quality)},"getB64Uri");switch(t.output){case"blob-promise":return new ZEt(function(e,r){try{n.toBlob(function(t){null!=t?e(t):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},i,t.quality)}catch(t){r(t)}});case"blob":return wkt(kkt(e()),i);case"base64":return kkt(e());default:return e()}}function Ekt(t){var a=this,e=a.cy.window().document,r=(a.data={canvases:new Array(WAt.CANVAS_LAYERS),contexts:new Array(WAt.CANVAS_LAYERS),canvasNeedsRedraw:new Array(WAt.CANVAS_LAYERS),bufferCanvases:new Array(WAt.BUFFER_COUNT),bufferContexts:new Array(WAt.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),n="rgba(0,0,0,0)",i=(a.data.canvasContainer=e.createElement("div"),a.data.canvasContainer.style),o=(a.data.canvasContainer.style[r]=n,i.position="relative",i.zIndex="0",i.overflow="hidden",(i=t.cy.container()).appendChild(a.data.canvasContainer),i.style[r]=n,{"-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()&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var s=0;s<WAt.CANVAS_LAYERS;s++){var l=a.data.canvases[s]=e.createElement("canvas");a.data.contexts[s]=l.getContext("2d"),Object.keys(o).forEach(function(t){l.style[t]=o[t]}),l.style.position="absolute",l.setAttribute("data-id","layer"+s),l.style.zIndex=String(WAt.CANVAS_LAYERS-s),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[s]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[WAt.NODE].setAttribute("data-id","layer"+WAt.NODE+"-node"),a.data.canvases[WAt.SELECT_BOX].setAttribute("data-id","layer"+WAt.SELECT_BOX+"-selectbox"),a.data.canvases[WAt.DRAG].setAttribute("data-id","layer"+WAt.DRAG+"-drag"),s=0;s<WAt.BUFFER_COUNT;s++)a.data.bufferCanvases[s]=e.createElement("canvas"),a.data.bufferContexts[s]=a.data.bufferCanvases[s].getContext("2d"),a.data.bufferCanvases[s].style.position="absolute",a.data.bufferCanvases[s].setAttribute("data-id","buffer"+s),a.data.bufferCanvases[s].style.zIndex=String(-s-1),a.data.bufferCanvases[s].style.visibility="hidden";a.pathsEnabled=!0;var c=n8t(),h=Ae(function(t){return{x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2}},"getBoxCenter"),u=Ae(function(t){return{x:-t.w/2,y:-t.h/2}},"getCenterOffset"),t=Ae(function(t){return!((t=t[0]._private).oldBackgroundTimestamp===t.backgroundTimestamp)},"backgroundTimestampHasChanged"),i=Ae(function(t){return t[0]._private.nodeKey},"getStyleKey"),r=Ae(function(t){return t[0]._private.labelStyleKey},"getLabelKey"),n=Ae(function(t){return t[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),d=Ae(function(t){return t[0]._private.targetLabelStyleKey},"getTargetLabelKey"),p=Ae(function(t,e,r,n,i){return a.drawElement(t,e,r,!1,!1,i)},"drawElement"),g=Ae(function(t,e,r,n,i){return a.drawElementText(t,e,r,n,"main",i)},"drawLabel"),f=Ae(function(t,e,r,n,i){return a.drawElementText(t,e,r,n,"source",i)},"drawSourceLabel"),m=Ae(function(t,e,r,n,i){return a.drawElementText(t,e,r,n,"target",i)},"drawTargetLabel"),y=Ae(function(t){return t.boundingBox(),t[0]._private.bodyBounds},"getElementBox"),v=Ae(function(t){return t.boundingBox(),t[0]._private.labelBounds.main||c},"getLabelBox"),x=Ae(function(t){return t.boundingBox(),t[0]._private.labelBounds.source||c},"getSourceLabelBox"),b=Ae(function(t){return t.boundingBox(),t[0]._private.labelBounds.target||c},"getTargetLabelBox"),w=Ae(function(t,e){return e},"isLabelVisibleAtScale"),k=Ae(function(t){return h(y(t))},"getElementRotationPoint"),T=Ae(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"),E=Ae(function(t,e,r){return{x:(t=t[0]._private.rscratch)[e],y:t[r]}},"getRsPt"),_=Ae(function(t){return T("",E(t,"labelX","labelY"),t)},"getLabelRotationPoint"),C=Ae(function(t){return T("source",E(t,"sourceLabelX","sourceLabelY"),t)},"getSourceLabelRotationPoint"),S=Ae(function(t){return T("target",E(t,"targetLabelX","targetLabelY"),t)},"getTargetLabelRotationPoint"),A=Ae(function(t){return u(y(t))},"getElementRotationOffset"),L=Ae(function(t){return u(x(t))},"getSourceLabelRotationOffset"),N=Ae(function(t){return u(b(t))},"getTargetLabelRotationOffset"),P=Ae(function(t){var e=v(t),r=u(v(t));if(t.isNode()){switch(t.pstyle("text-halign").value){case"left":r.x=-e.w;break;case"right":r.x=0}switch(t.pstyle("text-valign").value){case"top":r.y=-e.h;break;case"bottom":r.y=0}}return r},"getLabelRotationOffset"),I=a.data.eleTxrCache=new vAt(a,{getKey:i,doesEleInvalidateKey:t,drawElement:p,getBoundingBox:y,getRotationPoint:k,getRotationOffset:A,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),M=a.data.lblTxrCache=new vAt(a,{getKey:r,drawElement:g,getBoundingBox:v,getRotationPoint:_,getRotationOffset:P,isVisible:w}),R=a.data.slbTxrCache=new vAt(a,{getKey:n,drawElement:f,getBoundingBox:x,getRotationPoint:C,getRotationOffset:L,isVisible:w}),D=a.data.tlbTxrCache=new vAt(a,{getKey:d,drawElement:m,getBoundingBox:b,getRotationPoint:S,getRotationOffset:N,isVisible:w}),O=a.data.lyrTxrCache=new xAt(a),i=(a.onUpdateEleCalcs(Ae(function(t,e){I.invalidateElements(e),M.invalidateElements(e),R.invalidateElements(e),D.invalidateElements(e),O.invalidateElements(e);for(var r=0;r<e.length;r++){var n=e[r]._private;n.oldBackgroundTimestamp=n.backgroundTimestamp}},"invalidateTextureCaches")),Ae(function(t){for(var e=0;e<t.length;e++)O.enqueueElementRefinement(t[e].ele)},"refineInLayers"));I.onDequeue(i),M.onDequeue(i),R.onDequeue(i),D.onDequeue(i)}function _kt(e,r,n){var t=n,i=Ae(function(t){fTt("Can not register `"+r+"` for `"+e+"` since `"+t+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===e){if(sSt.prototype[r])return i(r);sSt.prototype[r]=n}else if("collection"===e){if(ZCt.prototype[r])return i(r);ZCt.prototype[r]=n}else if("layout"===e){for(var a=(g=Ae(function(t){this.options=t,n.call(this,t),$kt(this._private)||(this._private={}),this._private.cy=t.cy,this._private.listeners=[],this.createEmitter()},"Layout")).prototype=Object.create(n.prototype),o=[],s=0;s<o.length;s++){var l=o[s];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=n.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},Ae(function(t){return t._private.cy},"getCy")),u={addEventFields:Ae(function(t,e){e.layout=t,e.cy=h(t),e.target=t},"addEventFields"),bubble:Ae(function(){return!0},"bubble"),parent:Ae(function(t){return h(t)},"parent")};l7t(a,{createEmitter:Ae(function(){return this._private.emitter=new Bwt(u,this),this},"createEmitter"),emitter:Ae(function(){return this._private.emitter},"emitter"),on:Ae(function(t,e){return this.emitter().on(t,e),this},"on"),one:Ae(function(t,e){return this.emitter().one(t,e),this},"one"),once:Ae(function(t,e){return this.emitter().one(t,e),this},"once"),removeListener:Ae(function(t,e){return this.emitter().removeListener(t,e),this},"removeListener"),removeAllListeners:Ae(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:Ae(function(t,e){return this.emitter().emit(t,e),this},"emit")}),X_t.eventAliasesOn(a),t=g}else if("renderer"===e&&"null"!==r&&"base"!==r){var d,p,g,f=Ckt("renderer","base"),m=f.prototype,y=n,v=n.prototype,x=(g=Ae(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var b=m[d];if(null!=v[d])return i(d);x[d]=b}for(p in v)x[p]=v[p];m.clientFunctions.forEach(function(t){x[t]=x[t]||function(){pTt("Renderer does not implement `renderer."+t+"()` on its prototype")}}),t=g}else if("__proto__"===e||"constructor"===e||"prototype"===e)return pTt(e+" is an illegal type to be registered, possibly lead to prototype pollutions");return f7t({map:KAt,keys:[e,r],value:t})}function Ckt(t,e){return m7t({map:KAt,keys:[t,e]})}function Skt(t,e,r,n,i){return f7t({map:ZAt,keys:[t,e,r,n],value:i})}function Akt(t,e,r,n){return m7t({map:ZAt,keys:[t,e,r,n]})}var Lkt,Nkt,Ikt,Mkt,Rkt,Dkt,Okt,Pkt,Bkt,Fkt,$kt,zkt,it,Gkt,Ukt,qkt,Ykt,jkt,Hkt,Wkt,Vkt,Xkt,Kkt,Zkt,Qkt,Jkt,t7t,e7t,r7t,n7t,i7t,a7t,o7t,s7t,l7t,c7t,h7t,u7t,d7t,p7t,g7t,f7t,m7t,y7t,v7t,x7t,b7t,w7t,k7t,T7t,E7t,_7t,C7t,S7t,A7t,L7t,N7t,I7t,M7t,R7t,D7t,O7t,P7t,B7t,F7t,$7t,z7t,G7t,U7t,q7t,Y7t,j7t,H7t,W7t,V7t,X7t,K7t,Z7t,Q7t,J7t,tTt,eTt,rTt,nTt,iTt,aTt,oTt,sTt,lTt,cTt,hTt,uTt,dTt,pTt,gTt,fTt,mTt,yTt,vTt,xTt,bTt,wTt,kTt,TTt,ETt,_Tt,CTt,STt,ATt,LTt,NTt,ITt,MTt,RTt,DTt,OTt,PTt,BTt,FTt,$Tt,zTt,GTt,UTt,qTt,YTt,jTt,HTt,WTt,VTt,XTt,KTt,ZTt,QTt,JTt,t8t,e8t,r8t,n8t,i8t,a8t,o8t,s8t,l8t,c8t,h8t,u8t,d8t,p8t,g8t,f8t,m8t,y8t,v8t,x8t,b8t,w8t,k8t,T8t,E8t,_8t,C8t,S8t,A8t,L8t,N8t,I8t,M8t,R8t,D8t,O8t,P8t,B8t,F8t,$8t,z8t,G8t,U8t,q8t,Y8t,j8t,H8t,W8t,V8t,X8t,K8t,Z8t,Q8t,J8t,tEt,eEt,rEt,nEt,iEt,aEt,oEt,sEt,lEt,cEt,hEt,uEt,dEt,pEt,gEt,fEt,mEt,yEt,vEt,xEt,bEt,wEt,kEt,TEt,EEt,_Et,CEt,SEt,AEt,LEt,NEt,IEt,MEt,REt,DEt,OEt,PEt,BEt,FEt,$Et,zEt,GEt,UEt,qEt,YEt,jEt,HEt,WEt,VEt,XEt,KEt,ZEt,QEt,JEt,t_t,e_t,r_t,n_t,i_t,a_t,o_t,s_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,__t,C_t,S_t,A_t,L_t,N_t,I_t,M_t,R_t,D_t,O_t,P_t,B_t,F_t,$_t,z_t,G_t,U_t,q_t,Y_t,j_t,H_t,W_t,V_t,X_t,K_t,Z_t,q,Q_t,J_t,tCt,eCt,rCt,nCt,iCt,aCt,oCt,sCt,lCt,cCt,hCt,uCt,dCt,pCt,gCt,fCt,mCt,yCt,vCt,xCt,bCt,wCt,kCt,TCt,ECt,_Ct,CCt,SCt,ACt,LCt,NCt,ICt,MCt,RCt,DCt,OCt,PCt,BCt,FCt,$Ct,zCt,GCt,UCt,qCt,YCt,jCt,HCt,WCt,VCt,XCt,KCt,ZCt,QCt,JCt,tSt,eSt,rSt,nSt,iSt,aSt,oSt,sSt,lSt,cSt,hSt,uSt,dSt,pSt,gSt,fSt,mSt,ySt,vSt,xSt,bSt,wSt,kSt,TSt,ESt,_St,CSt,SSt,ASt,LSt,NSt,ISt,MSt,RSt,DSt,OSt,PSt,BSt,FSt,$St,zSt,GSt,USt,qSt,YSt,jSt,HSt,WSt,VSt,XSt,KSt,ZSt,QSt,JSt,tAt,eAt,rAt,nAt,iAt,aAt,oAt,sAt,lAt,cAt,hAt,uAt,dAt,pAt,gAt,fAt,mAt,yAt,vAt,xAt,Y,bAt,wAt,kAt,TAt,EAt,_At,CAt,SAt,AAt,LAt,NAt,IAt,MAt,RAt,DAt,OAt,j,PAt,BAt,FAt,$At,zAt,GAt,UAt,qAt,YAt,jAt,HAt,WAt,VAt,XAt,KAt,ZAt,QAt,JAt,H,t9t,e9t=t(()=>{function n(t){if(f6t(this,n),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(){f6t(this,t),this._obj={}}Ae(g6t,"_typeof"),Ae(f6t,"_classCallCheck"),Ae(m6t,"_defineProperties"),Ae(y6t,"_createClass"),Ae(v6t,"_defineProperty$1"),Ae(x6t,"_slicedToArray"),Ae(b6t,"_arrayWithHoles"),Ae(w6t,"_iterableToArrayLimit"),Ae(k6t,"_unsupportedIterableToArray"),Ae(T6t,"_arrayLikeToArray"),Ae(E6t,"_nonIterableRest"),Ae(_6t,"_createForOfIteratorHelper"),Lkt="u"<typeof window?null:window,Nkt=Lkt?Lkt.navigator:null,Lkt&&Lkt.document,Ikt=g6t(""),Mkt=g6t({}),Rkt=g6t(function(){}),Dkt="u"<typeof HTMLElement?"undefined":g6t(HTMLElement),Okt=Ae(function(t){return t&&t.instanceString&&Bkt(t.instanceString)?t.instanceString():null},"instanceStr"),Pkt=Ae(function(t){return null!=t&&g6t(t)==Ikt},"string"),Bkt=Ae(function(t){return null!=t&&g6t(t)===Rkt},"fn"),Fkt=Ae(function(t){return!qkt(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},"array"),$kt=Ae(function(t){return null!=t&&g6t(t)===Mkt&&!Fkt(t)&&t.constructor===Object},"plainObject"),zkt=Ae(function(t){return null!=t&&g6t(t)===Mkt},"object"),it=Ae(function(t){return null!=t&&g6t(t)===g6t(1)&&!isNaN(t)},"number"),Gkt=Ae(function(t){return it(t)&&Math.floor(t)===t},"integer"),Ukt=Ae(function(t){if("undefined"!==Dkt)return null!=t&&t instanceof HTMLElement},"htmlElement"),qkt=Ae(function(t){return Ykt(t)||jkt(t)},"elementOrCollection"),Ykt=Ae(function(t){return"collection"===Okt(t)&&t._private.single},"element"),jkt=Ae(function(t){return"collection"===Okt(t)&&!t._private.single},"collection"),Hkt=Ae(function(t){return"core"===Okt(t)},"core"),Wkt=Ae(function(t){return"stylesheet"===Okt(t)},"stylesheet"),Vkt=Ae(function(t){return"event"===Okt(t)},"event"),Xkt=Ae(function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},"emptyString"),Kkt=Ae(function(t){return!("u"<typeof HTMLElement)&&t instanceof HTMLElement},"domElement"),Zkt=Ae(function(t){return $kt(t)&&it(t.x1)&&it(t.x2)&&it(t.y1)&&it(t.y2)},"boundingBox"),Qkt=Ae(function(t){return zkt(t)&&Bkt(t.then)},"promise"),Jkt=Ae(function(){return Nkt&&Nkt.userAgent.match(/msie|trident|edge/i)},"ms"),t7t=Ae(function(i,a){a=a||Ae(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=Ae(function t(){var e=arguments,r=a.apply(this,e),n=t.cache;return n[r]||(n[r]=i.apply(this,e))},"memoizedFn");return t.cache={},t},"memoize"),e7t=t7t(function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}),r7t=t7t(function(t){return t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}),n7t=t7t(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),i7t=Ae(function(t){return Xkt(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},"capitalize"),a7t="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",o7t=Ae(function(t,e){return t<e?-1:e<t?1:0},"ascending"),s7t=Ae(function(t,e){return-1*o7t(t,e)},"descending"),l7t=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(null!=n)for(var i=Object.keys(n),a=0;a<i.length;a++){var o=i[a];t[o]=n[o]}}return t},c7t=Ae(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"),h7t=Ae(function(t){var e,r,n,i,a,o,s;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(Ae(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,(i=parseFloat(t[3]))<0)||100<i||(i/=100,void 0!==(n=t[4])&&((n=parseFloat(n))<0||1<n)))return;0===r?a=o=s=Math.round(255*i):(i=2*i-(t=i<.5?i*(1+r):i+r-i*r),a=Math.round(255*l(i,t,e+1/3)),o=Math.round(255*l(i,t,e)),s=Math.round(255*l(i,t,e-1/3))),r=[a,o,s,n]}return r},"hsl2tuple"),u7t=Ae(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=[],n=[],i=1;i<=3;i++){var a=e[i];if("%"===a[a.length-1]&&(n[i]=!0),a=parseFloat(a),(a=n[i]?a/100*255:a)<0||255<a)return;r.push(Math.floor(a))}if((n[1]||n[2]||n[3])&&!(n[1]&&n[2]&&n[3]))return;if(void 0!==(t=e[4])){if((t=parseFloat(t))<0||1<t)return;r.push(t)}}return r},"rgb2tuple"),d7t=Ae(function(t){return g7t[t.toLowerCase()]},"colorname2tuple"),p7t=Ae(function(t){return(Fkt(t)?t:null)||d7t(t)||c7t(t)||u7t(t)||h7t(t)},"color2tuple"),g7t={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]},f7t=Ae(function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if($kt(a))throw Error("Tried to set map with object key");i<r.length-1?(null==e[a]&&(e[a]={}),e=e[a]):e[a]=t.value}},"setMap"),m7t=Ae(function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if($kt(a))throw Error("Tried to get map with object key");if(null==(e=e[a]))return e}return e},"getMap"),Ae(C6t,"isObject"),y7t=C6t,v7t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ae(S6t,"createCommonjsModule"),cTt="object"==typeof v7t&&v7t&&v7t.Object===Object&&v7t,j="object"==typeof self&&self&&self.Object===Object&&self,cTt=cTt||j||Function("return this")(),x7t=cTt,j=Ae(function(){return x7t.Date.now()},"now"),b7t=j,w7t=/\s/,Ae(A6t,"trimmedEndIndex"),k7t=A6t,T7t=/^\s+/,Ae(L6t,"baseTrim"),E7t=L6t,cTt=x7t.Symbol,j=cTt,cTt=Object.prototype,_7t=cTt.hasOwnProperty,C7t=cTt.toString,S7t=j?j.toStringTag:void 0,Ae(N6t,"getRawTag"),A7t=N6t,cTt=Object.prototype,L7t=cTt.toString,Ae(I6t,"objectToString"),N7t=I6t,I7t=j?j.toStringTag:void 0,Ae(M6t,"baseGetTag"),M7t=M6t,Ae(R6t,"isObjectLike"),R7t=R6t,Ae(D6t,"isSymbol"),D7t=D6t,O7t=NaN,P7t=/^[-+]0x[0-9a-f]+$/i,B7t=/^0b[01]+$/i,F7t=/^0o[0-7]+$/i,$7t=parseInt,Ae(O6t,"toNumber"),z7t=O6t,G7t=Math.max,U7t=Math.min,Ae(P6t,"debounce"),q7t=P6t,Y7t=Lkt?Lkt.performance:null,j7t=Y7t&&Y7t.now?function(){return Y7t.now()}:function(){return Date.now()},H7t=function(){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(j7t())},1e3/60)}}(),W7t=Ae(function(t){return H7t(t)},"requestAnimationFrame"),V7t=j7t,X7t=Ae(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"),K7t=Ae(function(t){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+t|0},"hashInt"),Z7t=Ae(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(e<<5)+e+t|0},"hashIntAlt"),Q7t=Ae(function(t,e){return 2097152*t+e},"combineHashes"),J7t=Ae(function(t){return 2097152*t[0]+t[1]},"combineHashesArray"),tTt=Ae(function(t,e){return[K7t(t[0],e[0]),Z7t(t[1],e[1])]},"hashArrays"),eTt=Ae(function(t,e){var r={value:0,done:!1},n=0,i=t.length,a={next:Ae(function(){return n<i?r.value=t[n++]:r.done=!0,r},"next")};return X7t(a,e)},"hashIntsArray"),rTt=Ae(function(t,e){var r={value:0,done:!1},n=0,i=t.length,a={next:Ae(function(){return n<i?r.value=t.charCodeAt(n++):r.done=!0,r},"next")};return X7t(a,e)},"hashString"),nTt=Ae(function(){return iTt(arguments)},"hashStrings"),iTt=Ae(function(t){for(var e=0;e<t.length;e++)var r=t[e],n=0===e?rTt(r):rTt(r,n);return n},"hashStringsArray"),aTt=!0,oTt=null!=console.warn,sTt=null!=console.trace,lTt=Number.MAX_SAFE_INTEGER||9007199254740991,cTt=Ae(function(){return!0},"trueify"),hTt=Ae(function(){return!1},"falsify"),uTt=Ae(function(){return 0},"zeroify"),dTt=Ae(function(){},"noop"),pTt=Ae(function(t){throw new Error(t)},"error"),gTt=Ae(function(t){if(void 0===t)return aTt;aTt=!!t},"warnings"),fTt=Ae(function(t){gTt()&&(oTt?console.warn(t):(console.log(t),sTt&&console.trace()))},"warn"),mTt=Ae(function(t){return l7t({},t)},"clone"),yTt=Ae(function(t){return null==t?t:Fkt(t)?t.slice():$kt(t)?mTt(t):t},"copy"),vTt=Ae(function(t){return t.slice()},"copyArray"),xTt=Ae(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"),bTt={},wTt=Ae(function(){return bTt},"staticEmptyObject"),JAt=Ae(function(a){var o=Object.keys(a);return function(t){for(var e={},r=0;r<o.length;r++){var n=o[r],i=t?.[n];e[n]=void 0===i?a[n]:i}return e}},"defaults"),kTt=Ae(function(t,e,r){for(var n=t.length-1;0<=n&&(t[n]!==e||(t.splice(n,1),!r));n--);},"removeFromArray"),TTt=Ae(function(t){t.splice(0,t.length)},"clearArray"),ETt=Ae(function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.push(n)}},"push"),_Tt=Ae(function(t,e,r){return t[e=r?n7t(r,e):e]},"getPrefixedProperty"),CTt=Ae(function(t,e,r,n){t[e=r?n7t(r,e):e]=n},"setPrefixedProperty"),Ae(t,"ObjectMap"),y6t(t,[{key:"set",value:Ae(function(t,e){return this._obj[t]=e,this},"set")},{key:"delete",value:Ae(function(t){return this._obj[t]=void 0,this},"_delete")},{key:"clear",value:Ae(function(){this._obj={}},"clear")},{key:"has",value:Ae(function(t){return void 0!==this._obj[t]},"has")},{key:"get",value:Ae(function(t){return this._obj[t]},"get")}]),H=t,STt=typeof Map<"u"?Map:H,Ae(n,"ObjectSet"),y6t(n,[{key:"instanceString",value:Ae(function(){return"set"},"instanceString")},{key:"add",value:Ae(function(t){var e=this._obj;1!==e[t]&&(e[t]=1,this.size++)},"add")},{key:"delete",value:Ae(function(t){var e=this._obj;1===e[t]&&(e[t]=0,this.size--)},"_delete")},{key:"clear",value:Ae(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:Ae(function(t){return 1===this._obj[t]},"has")},{key:"toArray",value:Ae(function(){var e=this;return Object.keys(this._obj).filter(function(t){return e.has(t)})},"toArray")},{key:"forEach",value:Ae(function(t,e){return this.toArray().forEach(t,e)},"forEach")}]),H=n,ATt="undefined"!==("u"<typeof Set?"undefined":g6t(Set))?Set:H,LTt=Ae(function(t,e){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&Hkt(t)){var n=e.group;if("nodes"!==(n=null==n?e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes":n)&&"edges"!==n)pTt("An element must be of type `nodes` or `edges`; you specified `"+n+"`");else{this.length=1;var i,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:n,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"===n:!!e.pannable,active:!1,classes:new ATt,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}},o=(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),e.renderedPosition&&(n=e.renderedPosition,i=t.pan(),t=t.zoom(),a.position={x:(n.x-i.x)/t,y:(n.y-i.y)/t}),[]);Fkt(e.classes)?o=e.classes:Pkt(e.classes)&&(o=e.classes.split(/\s+/));for(var s=0,l=o.length;s<l;s++){var c=o[s];c&&""!==c&&a.classes.add(c)}this.createEmitter(),(n=e.style||e.css)&&(fTt("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(n)),void 0!==r&&!r||this.restore()}}else pTt("An element must have a core reference and parameters set")},"Element"),(H={breadthFirstSearch:(H=Ae(function(T){return T={bfs:T.bfs||!T.dfs,dfs:T.dfs||!T.bfs},Ae(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,n=0;n<r.length;n++){var i=r[n],a=i.id();i.isNode()&&(g.unshift(i),T.bfs&&(v[a]=!0,f.push(i)),y[a]=0)}for(var o=Ae(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],n=m[t],i=null!=n?n.source():null,a=null!=n?n.target():null,a=null==n?void 0:(e.same(i)?a:i)[0];if(!0===(i=u(e,n,a,x++,r)))return p=e,"break";if(!1===i)return"break";for(var o=e.connectedEdges().filter(function(t){return(!d||t.source().same(e))&&w.has(t)}),s=0;s<o.length;s++){var l=o[s],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 s=o();if("continue"!==s&&"break"===s)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:H({dfs:!0})}).bfs=H.breadthFirstSearch,H.dfs=H.depthFirstSearch,DAt=S6t(function(o,t){!function(){var d,l,p,g,e,c,r,f,m,t,n,i,h,u;function a(t){this.cmp=t??d,this.nodes=[]}l=Math.floor,m=Math.min,d=Ae(function(t,e){return t<e?-1:e<t?1:0},"defaultCmp"),f=Ae(function(t,e,r,n,i){var a;if(null==i&&(i=d),(r=null==r?0:r)<0)throw new Error("lo must be non-negative");for(null==n&&(n=t.length);r<n;)i(e,t[a=l((r+n)/2)])<0?n=a:r=a+1;return[].splice.apply(t,[r,r-r].concat(e)),e},"insort"),e=Ae(function(t,e,r){return null==r&&(r=d),t.push(e),h(t,0,t.length-1,r)},"heappush"),g=Ae(function(t,e){var r,n;return null==e&&(e=d),r=t.pop(),t.length?(n=t[0],t[0]=r,u(t,0,e)):n=r,n},"heappop"),r=Ae(function(t,e,r){var n;return null==r&&(r=d),n=t[0],t[0]=e,u(t,0,r),n},"heapreplace"),c=Ae(function(t,e,r){var n;return null==r&&(r=d),t.length&&r(t[0],e)<0&&(e=(n=[t[0],e])[0],t[0]=n[1],u(t,0,r)),e},"heappushpop"),p=Ae(function(r,t){var e,n,i,a,o,s;for(null==t&&(t=d),o=[],n=0,i=(a=function(){s=[];for(var t=0,e=l(r.length/2);0<=e?t<e:e<t;0<=e?t++:t--)s.push(t);return s}.apply(this).reverse()).length;n<i;n++)e=a[n],o.push(u(r,e,t));return o},"heapify"),i=Ae(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=Ae(function(t,e,r){var n,i,a,o,s;if(null==r&&(r=d),!(i=t.slice(0,e)).length)return i;for(p(i,r),a=0,o=(s=t.slice(e)).length;a<o;a++)n=s[a],c(i,n,r);return i.sort(r).reverse()},"nlargest"),n=Ae(function(t,e,r){var n,i,a,o,s,l,c,h,u;if(null==r&&(r=d),10*e<=t.length){if((a=t.slice(0,e).sort(r)).length)for(i=a[a.length-1],o=0,l=(c=t.slice(e)).length;o<l;o++)r(n=c[o],i)<0&&(f(a,n,0,null,r),a.pop(),i=a[a.length-1]);return a}for(p(t,r),u=[],s=0,h=m(e,t.length);0<=h?s<h:h<s;0<=h?++s:--s)u.push(g(t,r));return u},"nsmallest"),h=Ae(function(t,e,r,n){var i,a,o;for(null==n&&(n=d),i=t[r];e<r&&n(i,a=t[o=r-1>>1])<0;)t[r]=a,r=o;return t[r]=i},"_siftdown"),u=Ae(function(t,e,r){var n,i,a,o,s;for(null==r&&(r=d),i=t.length,a=t[s=e],n=2*e+1;n<i;)(o=n+1)<i&&!(r(t[n],t[o])<0)&&(n=o),t[e]=t[n],n=2*(e=n)+1;return t[e]=a,h(t,s,e,r)},"_siftup"),a.push=e,a.pop=g,a.replace=r,a.pushpop=c,a.heapify=p,a.updateItem=i,a.nlargest=t,a.nsmallest=n,Ae(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 i(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,o.exports=a}.call(v7t)}),NTt=DAt,ITt=JAt({root:null,weight:Ae(function(t){return 1},"weight"),directed:!1}),DAt={dijkstra:Ae(function(t){$kt(t)||(t={root:(e=arguments)[0],weight:e[1],directed:e[2]});var e=ITt(t),t=e.root,r=e.weight,l=e.directed,a=this,c=r,n=(Pkt(t)?this.filter(t):t)[0],i={},o={},s={},h=(e=this.byGroup()).nodes,u=e.edges;u.unmergeBy(function(t){return t.isLoop()});for(var d=Ae(function(t){return i[t.id()]},"getDist"),p=Ae(function(t,e){i[t.id()]=e,g.updateItem(t)},"setDist"),g=new NTt(function(t,e){return d(t)-d(e)}),f=0;f<h.length;f++){var m=h[f];i[m.id()]=m.same(n)?0:1/0,g.push(m)}for(var y=Ae(function(t,e){for(var r,n=(l?t.edgesTo(e):t.edgesWith(e)).intersect(u),i=1/0,a=0;a<n.length;a++){var o=n[a],s=c(o);(s<i||!r)&&(i=s,r=o)}return{edge:r,dist:i}},"distBetween");0<g.size();){var v=g.pop(),x=d(v),b=v.id();if((s[b]=x)!==1/0)for(var w=v.neighborhood().intersect(h),k=0;k<w.length;k++){var T=w[k],E=T.id(),_=y(v,T),C=x+_.dist;C<d(T)&&(p(T,C),o[E]={node:v,edge:_.edge})}}return{distanceTo:Ae(function(t){return t=(Pkt(t)?h.filter(t):t)[0],s[t.id()]},"distanceTo"),pathTo:Ae(function(t){var e=[],r=t=(Pkt(t)?h.filter(t):t)[0],n=r.id();if(0<t.length)for(e.unshift(t);o[n];){var i=o[n];e.unshift(i.edge),e.unshift(i.node),n=(r=i.node).id()}return a.spawn(e)},"pathTo")}},"dijkstra")},XAt={kruskal:Ae(function(r){r=r||function(t){return 1};for(var t=(e=this.byGroup()).nodes,e=e.edges,n=t.length,i=new Array(n),a=t,o=Ae(function(t){for(var e=0;e<i.length;e++)if(i[e].has(t))return e},"findSetIndex"),s=0;s<n;s++)i[s]=this.spawn(t[s]);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=o(u),d=o(d),p=i[u],g=i[d];u!==d&&(a.merge(h),p.merge(g),i.splice(d,1))}return a},"kruskal")},MTt=JAt({root:null,goal:null,weight:Ae(function(t){return 1},"weight"),heuristic:Ae(function(t){return 0},"heuristic"),directed:!1}),gAt={aStar:Ae(function(t){var e,r,n=this.cy(),i=(t=MTt(t)).root,a=t.goal,o=t.heuristic,s=t.directed,l=t.weight,i=n.collection(i)[0],a=n.collection(a)[0],t=i.id(),c=a.id(),h={},u={},d={},p=new NTt(function(t,e){return u[t.id()]-u[e.id()]}),g=new ATt,f={},m={},y=Ae(function(t,e){p.push(t),g.add(e)},"addToOpenSet"),v=Ae(function(){e=p.pop(),r=e.id(),g.delete(r)},"popFromOpenSet"),x=Ae(function(t){return g.has(t)},"isInOpenSet");y(i,t),h[t]=0,u[t]=o(i);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 _=e._private.edges,C=0;C<_.length;C++){var S,A,L,N=_[C];!this.hasElementWithId(N.id())||s&&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)+o(S),f[A]=e,m[A]=N):(u[A]=(h[A]=L)+o(S),y(S,A),f[A]=e,m[A]=N)))}}return{found:!1,distance:void 0,path:void 0,steps:b}},"aStar")},RTt=JAt({weight:Ae(function(t){return 1},"weight"),directed:!1}),PAt={floydWarshall:Ae(function(t){for(var o=this.cy(),e=(t=RTt(t)).weight,r=t.directed,n=e,i=(t=this.byGroup()).nodes,a=t.edges,s=i.length,l=s*s,c=Ae(function(t){return i.indexOf(t)},"indexOf"),h=Ae(function(t){return i[t]},"atIndex"),u=new Array(l),d=0;d<l;d++){var p=d%s;u[d]=(d-p)/s==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*s+w,y=n(x),u[v]>y&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*s+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k<s;k++)for(var T=0;T<s;T++)for(var E=T*s+k,_=0;_<s;_++){var C=T*s+_,S=k*s+_;u[E]+u[S]<u[C]&&(u[C]=u[E]+u[S],g[C]=g[E])}var A=Ae(function(t){return(Pkt(t)?o.filter(t):t)[0]},"getArgEle"),L=Ae(function(t){return c(A(t))},"indexOfArgEle");return{distance:Ae(function(t,e){return t=L(t),e=L(e),u[t*s+e]},"distance"),path:Ae(function(t,e){var r=L(t),n=L(e),t=h(r);if(r===n)return t.collection();if(null==g[r*s+n])return o.collection();var i,a=o.collection();for(a.merge(t);r!==n;)r=g[(i=r)*s+n],i=f[i*s+r],a.merge(i),a.merge(h(r));return a},"path")}},"floydWarshall")},DTt=JAt({weight:Ae(function(t){return 1},"weight"),directed:!1,root:null}),YAt={bellmanFord:Ae(function(t){var P=this,e=(m=DTt(t)).weight,r=m.directed,o=m.root,n=e,s=this,i=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new STt,u=!1,d=[],o=i.collection(o)[0];a.unmergeBy(function(t){return t.isLoop()});for(var p=a.length,g=Ae(function(t){var e=h.get(t.id());return e||(e={},h.set(t.id(),e)),e},"getInfo"),f=Ae(function(t){return(Pkt(t)?i.$(t):t)[0]},"getNodeFromTo"),e=Ae(function(t){return g(f(t)).dist},"distanceTo"),m=Ae(function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o,r=[],n=f(t);;){if(null==n)return P.spawn();var i=(a=g(n)).edge,a=a.pred;if(r.unshift(n[0]),n.same(e)&&0<r.length)break;null!=i&&r.unshift(i),n=a}return s.spawn(r)},"pathTo"),y=0;y<c;y++){var v=l[y],x=g(v);v.same(o)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var b=!1,B=Ae(function(t,e,r,n,i,a){(a=n.dist+a)<i.dist&&!r.same(n.edge)&&(i.dist=a,i.pred=t,i.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(),$=n(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=[],_=0;_<p;_++){var q=(C=a[_]).source(),Y=C.target(),C=n(C),S=g(q).dist,A=g(Y).dist;if(S+C<A||!r&&A+C<S){if(u||(fTt("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===t.findNegativeWeightCycles)break;var L=[];S+C<A&&L.push(q),!r&&A+C<S&&L.push(Y);for(var j=L.length,N=0;N<j;N++){var I=L[N],M=[I];M.push(g(I).edge);for(var R=g(I).pred;-1===M.indexOf(R);)M.push(R),M.push(g(R).edge),R=g(R).pred;for(var H=(M=M.slice(M.indexOf(R)))[0].id(),D=0,O=2;O<M.length;O+=2)M[O].id()<H&&(H=M[O].id(),D=O);(M=M.slice(D).concat(M.slice(0,D))).push(M[0]),I=M.map(function(t){return t.id()}).join(","),-1===U.indexOf(I)&&(d.push(s.spawn(M)),U.push(I))}}}return{distanceTo:e,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},OTt=Math.sqrt(2),PTt=Ae(function(t,e,r){0===r.length&&pTt("Karger-Stein must be run on a connected (sub)graph");for(var n=(t=r[t])[1],t=t[2],i=e[n],a=e[t],o=r,s=o.length-1;0<=s;s--){var l=(c=o[s])[1],c=c[2];(e[l]===i&&e[c]===a||e[l]===a&&e[c]===i)&&o.splice(s,1)}for(var h=0;h<o.length;h++){var u=o[h];u[1]===a?(o[h]=u.slice(),o[h][1]=i):u[2]===a&&(o[h]=u.slice(),o[h][2]=i)}for(var d=0;d<e.length;d++)e[d]===a&&(e[d]=i);return o},"collapse"),BTt=Ae(function(t,e,r,n){for(;n<r;){var i=Math.floor(Math.random()*e.length);e=PTt(i,t,e),r--}return e},"contractUntil"),jAt={kargerStein:Ae(function(){var r=this,t=this.byGroup(),e=t.nodes,n=t.edges,i=(n.unmergeBy(function(t){return t.isLoop()}),e.length),a=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/OTt);if(!(i<2)){for(var l=[],c=0;c<a;c++){var h=n[c];l.push([c,e.indexOf(h.source()),e.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(i),g=new Array(i),f=new Array(i),m=Ae(function(t,e){for(var r=0;r<i;r++)e[r]=t[r]},"copyNodesMap"),y=0;y<=o;y++){for(var v=0;v<i;v++)g[v]=v;var x=(b=BTt(g,l.slice(),i,s)).slice(),b=(m(g,f),BTt(g,b,s,2)),x=BTt(f,x,s,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 n[t[0]]})),k=this.spawn(),T=this.spawn(),E=p[0],_=0;_<p.length;_++){var C=p[_],S=e[_];(C===E?k:T).merge(S)}return t=[(t=Ae(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}}pTt("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},FTt=Ae(function(t){return{x:t.x,y:t.y}},"copyPosition"),$Tt=Ae(function(t,e,r){return{x:t.x*e+r.x,y:t.y*e+r.y}},"modelToRenderedPosition"),zTt=Ae(function(t,e,r){return{x:(t.x-r.x)/e,y:(t.y-r.y)/e}},"renderedToModelPosition"),GTt=Ae(function(t){return{x:t[0],y:t[1]}},"array2point"),UTt=Ae(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,n=1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.min(a,n))}return n},"min"),qTt=Ae(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,n=-1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.max(a,n))}return n},"max"),YTt=Ae(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,n=0,i=0,a=e;a<r;a++){var o=t[a];isFinite(o)&&(n+=o,i++)}return n/i},"mean"),jTt=Ae(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,n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];n?t=t.slice(e,r):(r<t.length&&t.splice(r,t.length-r),0<e&&t.splice(0,e));for(var o=0,s=t.length-1;0<=s;s--){var l=t[s];a?isFinite(l)||(t[s]=-1/0,o++):t.splice(s,1)}return i&&t.sort(function(t,e){return t-e}),n=t.length,r=Math.floor(n/2),n%2!=0?t[r+1+o]:(t[r-1+o]+t[r+o])/2},"median"),HTt=Ae(function(t){return Math.PI*t/180},"deg2rad"),WTt=Ae(function(t,e){return Math.atan2(e,t)-Math.PI/2},"getAngleFromDisp"),VTt=Math.log2||function(t){return Math.log(t)/Math.log(2)},XTt=Ae(function(t){return 0<t?1:t<0?-1:0},"signum"),KTt=Ae(function(t,e){return Math.sqrt(ZTt(t,e))},"dist"),ZTt=Ae(function(t,e){var r=e.x-t.x;return r*r+(e=e.y-t.y)*e},"sqdist"),QTt=Ae(function(t){for(var e=t.length,r=0,n=0;n<e;n++)r+=t[n];for(var i=0;i<e;i++)t[i]=t[i]/r;return t},"inPlaceSumNormalize"),JTt=Ae(function(t,e,r,n){return(1-n)*(1-n)*t+2*(1-n)*n*e+n*n*r},"qbezierAt"),t8t=Ae(function(t,e,r,n){return{x:JTt(t.x,e.x,r.x,n),y:JTt(t.y,e.y,r.y,n)}},"qbezierPtAt"),e8t=Ae(function(t,e,r,n){var i=e.x-t.x,a=e.y-t.y,e=KTt(t,e);return r=r??0,{x:t.x+i/e*(n=n??r*e),y:t.y+a/e*n}},"lineAt"),r8t=Ae(function(t,e,r){return Math.max(t,Math.min(r,e))},"bound"),n8t=Ae(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"),i8t=Ae(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),a8t=Ae(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=Ae(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"),s8t=Ae(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"),l8t=Ae(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"),c8t=Ae(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"),h8t=Ae(function(t){var e,r,n,i,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?e=r=n=i=a[0]:2===a.length?(e=n=a[0],i=r=a[1]):4===a.length&&(e=(a=x6t(a,4))[0],r=a[1],n=a[2],i=a[3]),t.x1-=i,t.x2+=r,t.y1-=e,t.y2+=n,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBoxSides"),u8t=Ae(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"),d8t=Ae(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"),p8t=Ae(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),g8t=Ae(function(t,e){return p8t(t,e.x,e.y)},"pointInBoundingBox"),f8t=Ae(function(t,e){return p8t(t,e.x1,e.y1)&&p8t(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),m8t=Ae(function(t,e,r,n,i,a,o){var s,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?$8t(i,a):l,i=i/2,a=a/2,c=(l=Math.min(l,i,a))!==i,h=l!==a;if(c){var u=n-a-o;if(0<(u=M8t(t,e,r,n,r-i+l-o,u,r+i-l+o,u,!1)).length)return u}return h&&0<(u=M8t(t,e,r,n,s=r+i+o,n-a+l-o,s,n+a-l+o,!1)).length||c&&0<(u=M8t(t,e,r,n,r-i+l-o,s=n+a+o,r+i-l+o,s,!1)).length||h&&0<(u=M8t(t,e,r,n,c=r-i-o,n-a+l-o,c,n+a-l+o,!1)).length?u:0<(c=N8t(t,e,r,n,s=r-i+l,h=n-a+l,l+o)).length&&c[0]<=s&&c[1]<=h||0<(c=N8t(t,e,r,n,u=r+i-l,s=n-a+l,l+o)).length&&c[0]>=u&&c[1]<=s||0<(c=N8t(t,e,r,n,h=r+i-l,u=n+a-l,l+o)).length&&c[0]>=h&&c[1]>=u||0<(c=N8t(t,e,r,n,s=r-i+l,h=n+a-l,l+o)).length&&c[0]<=s&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),y8t=Ae(function(t,e,r,n,i,a,o){var s=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return s-o<=t&&t<=r+o&&i-o<=e&&e<=n+o},"inLineVicinity"),v8t=Ae(function(t,e,r,n,i,a,o,s,l){var c=Math.min(r,o,i)-l,r=Math.max(r,o,i)+l,o=Math.min(n,s,a)-l,i=Math.max(n,s,a)+l;return!(t<c||r<t||e<o||i<e)},"inBezierVicinity"),x8t=Ae(function(t,e,r,n){return(n=e*e-4*t*(r-=n))<0?[]:[(-e+(r=Math.sqrt(n)))/(n=2*t),(-e-r)/n]},"solveQuadratic"),b8t=Ae(function(t,e,r,n,i){var a,o,s;n=-27*(n/=t=0===t?1e-5:t)+(e/=t)*(9*(r/=t)-e*e*2),r=(t=(3*r-e*e)/9)*t*t+(n/=54)*n,e/=3,(i[1]=0)<r?(a=(a=n+Math.sqrt(r))<0?-Math.pow(-a,1/3):Math.pow(a,1/3),o=(o=n-Math.sqrt(r))<0?-Math.pow(-o,1/3):Math.pow(o,1/3),i[0]=-e+a+o,i[4]=i[2]=-(e+=(a+o)/2),e=Math.sqrt(3)*(-o+a)/2,i[3]=e,i[5]=-e):(i[5]=i[3]=0)==r?(s=n<0?-Math.pow(-n,1/3):Math.pow(n,1/3),i[0]=2*s-e,i[4]=i[2]=-(s+e)):(t=-t,o=Math.acos(n/Math.sqrt(t*t*t)),s=2*Math.sqrt(t),i[0]=-e+s*Math.cos(o/3),i[2]=-e+s*Math.cos((o+2*Math.PI)/3),i[4]=-e+s*Math.cos((o+4*Math.PI)/3))},"solveCubic"),w8t=Ae(function(t,e,r,n,i,a,o,s){var l=[];b8t(+r*r-4*r*i+2*r*o+4*i*i-4*i*o+o*o+n*n-4*n*a+2*n*s+4*a*a-4*a*s+s*s,9*r*i-3*r*r-3*r*o-6*i*i+3*i*o+9*n*a-3*n*n-3*n*s-6*a*a+3*a*s,3*r*r-6*r*i+r*o-r*t+2*i*i+2*i*t-o*t+3*n*n-6*n*a+n*s-n*e+2*a*a+2*a*e-s*e,+r*i-r*r+r*t-i*t+n*a-n*n+n*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]*i+c[g]*c[g]*o,u=Math.pow(1-c[g],2)*n+2*(1-c[g])*c[g]*a+c[g]*c[g]*s,d=Math.pow(d-t,2)+Math.pow(u-e,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),k8t=Ae(function(t,e,r,n,i,a){var o=[t-r,e-n],n=(r=[i-r,a-n])[0]*r[0]+r[1]*r[1],s=o[0]*o[0]+o[1]*o[1],r=(o=o[0]*r[0]+o[1]*r[1])*o/n;return o<0?s:n<r?(t-i)*(t-i)+(e-a)*(e-a):s-r},"sqdistToFiniteLine"),T8t=Ae(function(t,e,r){for(var n,i,a,o,s=0,l=0;l<r.length/2;l++)if(n=r[2*l],i=r[2*l+1],o=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]),n!=t||a!=t){if(!(t<=n&&a<=t||n<=t&&t<=a))continue;e<(t-n)/(a-n)*(o-i)+i&&s++}return s%2!=0},"pointInsidePolygonPoints"),E8t=Ae(function(t,e,r,n,i,a,o,s,l){var c=new Array(r.length);null!=s[0]?(h=Math.atan(s[1]/s[0]),s[0]<0?h+=Math.PI/2:h=-h-Math.PI/2):h=s;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]=o/2*(r[2*p+1]*u+r[2*p]*d),c[2*p]+=n,c[2*p+1]+=i;return h=0<l?(s=S8t(c,-l),C8t(s)):c,T8t(t,e,h)},"pointInsidePolygon"),_8t=Ae(function(t,e,r,n,i,a,o,s){for(var l=new Array(2*r.length),c=0;c<s.length;c++){var h=s[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 T8t(t,e,l)},"pointInsideRoundPolygon"),C8t=Ae(function(t){for(var e,r,n,i=new Array(t.length/2),a=0;a<t.length/4;a++){var o=t[4*a],s=t[4*a+1],l=t[4*a+2],c=t[4*a+3],h=a<t.length/4-1?(e=t[4*(a+1)],r=t[4*(a+1)+1],n=t[4*(a+1)+2],t[4*(a+1)+3]):(e=t[0],r=t[1],n=t[2],t[3]),o=M8t(o,s,l,c,e,r,n,h,!0);i[2*a]=o[0],i[2*a+1]=o[1]}return i},"joinLines"),S8t=Ae(function(t,e){for(var r,n=new Array(2*t.length),i=0;i<t.length/2;i++){var a,o=t[2*i],s=t[2*i+1],l=(a=i<t.length/2-1?(r=t[2*(i+1)],t[2*(i+1)+1]):(r=t[0],t[1]))-s,c=-(r-o),h=Math.sqrt(l*l+c*c),c=c/h;n[4*i]=o+(l/=h)*e,n[4*i+1]=s+c*e,n[4*i+2]=r+l*e,n[4*i+3]=a+c*e}return n},"expandPolygon"),A8t=Ae(function(t,e,r,n,i,a){var o=r-t,s=n-e;return o/=i,s/=a,(a=(i=Math.sqrt(o*o+s*s))-1)<0?[]:[(r-t)*(o=a/i)+t,(n-e)*o+e]},"intersectLineEllipse"),L8t=Ae(function(t,e,r,n,i,a,o){return(t=(t-i)/(r/2+o))*t+(e=(e-a)/(n/2+o))*e<=1},"checkInEllipse"),N8t=Ae(function(t,e,r,n,i,a,o){return r=[r-t,n-e],n=[t-i,e-a],i=r[0]*r[0]+r[1]*r[1],(n=(a=2*(n[0]*r[0]+n[1]*r[1]))*a-4*i*(n[0]*n[0]+n[1]*n[1]-o*o))<0||(o=(-a+Math.sqrt(n))/(2*i),a=(-a-Math.sqrt(n))/(2*i),n=Math.min(o,a),i=Math.max(o,a),o=[],0<=n&&n<=1&&o.push(n),0<=i&&i<=1&&o.push(i),0===o.length)?[]:(a=o[0]*r[0]+t,n=o[0]*r[1]+e,1<o.length&&o[0]!=o[1]?[a,n,o[1]*r[0]+t,o[1]*r[1]+e]:[a,n])},"intersectLineCircle"),I8t=Ae(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=Ae(function(t,e,r,n,i,a,o,s,l){var c=t-i,h=r-t,u=o-i,d=n-e,p=s-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?I8t(t,r,o)===o?[o,s]:I8t(t,r,i)===i?[i,a]:I8t(i,o,r)===r?[r,n]:[]:[]},"finiteLinesIntersect"),R8t=Ae(function(t,e,r,n,i,a,o,s){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+n,c[2*u+1]=r[2*u+1]*o+i;h=0<s?(s=S8t(c,-s),C8t(s)):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,n,i,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),D8t=Ae(function(r,n,t,i,a,e,o,s,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=N8t(r,n,i,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,n,i,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]-n,2),f=1;f<h.length/2;f++){var m=Math.pow(h[2*f]-r,2)+Math.pow(h[2*f+1]-n,2);m<=g&&(p[0]=h[2*f],p[1]=h[2*f+1],g=m)}return p}return h},"roundPolygonIntersectLine"),O8t=Ae(function(t,e,r){var t=[t[0]-e[0],t[1]-e[1]],n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=(n-r)/n;return[e[0]+(r=r<0?1e-5:r)*t[0],e[1]+r*t[1]]},"shortenIntersection"),P8t=Ae(function(t,e){return t=F8t(t,e),B8t(t)},"generateUnitNgonPointsFitToSquare"),B8t=Ae(function(t){for(var e,r,n=t.length/2,i=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<n;l++)e=t[2*l],r=t[2*l+1],i=Math.min(i,e),o=Math.max(o,e),a=Math.min(a,r),s=Math.max(s,r);for(var c=2/(o-i),h=2/(s-a),u=0;u<n;u++)e=t[2*u]=t[2*u]*c,r=t[2*u+1]=t[2*u+1]*h,i=Math.min(i,e),o=Math.max(o,e),a=Math.min(a,r),s=Math.max(s,r);if(a<-1)for(var d=0;d<n;d++)r=t[2*d+1]=t[2*d+1]+(-1-a);return t},"fitPolygonToSquare"),F8t=Ae(function(t,e){var r=1/t*2*Math.PI,n=t%2==0?Math.PI/2+r/2:Math.PI/2;n+=e;for(var i,a=new Array(2*t),o=0;o<t;o++)i=o*r+n,a[2*o]=Math.cos(i),a[2*o+1]=Math.sin(-i);return a},"generateUnitNgonPoints"),$8t=Ae(function(t,e){return Math.min(t/4,e/4,8)},"getRoundRectangleRadius"),z8t=Ae(function(t,e){return Math.min(t/10,e/10,8)},"getRoundPolygonRadius"),G8t=Ae(function(){return 8},"getCutRectangleCornerLength"),U8t=Ae(function(t,e,r){return[t-2*e+r,2*(e-t),t]},"bezierPtsToQuadCoeff"),q8t=Ae(function(t,e){return{heightOffset:Math.min(15,.05*e),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),Y8t=JAt({dampingFactor:.8,precision:1e-6,iterations:200,weight:Ae(function(t){return 1},"weight")}),IAt={pageRank:Ae(function(t){for(var e=(t=Y8t(t)).dampingFactor,r=t.precision,n=t.iterations,i=t.weight,a=this._private.cy,o=(t=this.byGroup()).nodes,s=t.edges,l=o.length,c=s.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=s[f],y=m.data("source"),v=m.data("target");y!==v&&(y=o.indexOfId(y),v=o.indexOfId(v),m=i(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),_=new Array(l),C=0;C<l;C++)E[C]=1;for(var S=0;S<n;S++){for(var A=0;A<l;A++)_[A]=0;for(var L=0;L<l;L++)for(var N=0;N<l;N++)_[L]+=h[L*l+N]*E[N];QTt(_);for(var I=E,E=_,_=I,M=0,R=0;R<l;R++){var D=I[R]-E[R];M+=D*D}if(M<r)break}return{rank:Ae(function(t){return t=a.collection(t)[0],E[o.indexOf(t)]},"rank")}},"pageRank")},j8t=JAt({root:null,weight:Ae(function(t){return 1},"weight"),directed:!1,alpha:0}),(zSt={degreeCentralityNormalized:Ae(function(t){t=j8t(t);var e=this.cy(),r=this.nodes(),n=r.length;if(t.directed){for(var i={},a={},o=0,s=0,l=0;l<n;l++){var c=(h=r[l]).id(),h=(t.root=h,this.degreeCentrality(t));o<h.indegree&&(o=h.indegree),s<h.outdegree&&(s=h.outdegree),i[c]=h.indegree,a[c]=h.outdegree}return{indegree:Ae(function(t){return 0==o?0:(Pkt(t)&&(t=e.filter(t)),i[t.id()]/o)},"indegree"),outdegree:Ae(function(t){return 0===s?0:(Pkt(t)&&(t=e.filter(t)),a[t.id()]/s)},"outdegree")}}for(var u={},d=0,p=0;p<n;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:Ae(function(t){return 0===d?0:(Pkt(t)&&(t=e.filter(t)),u[t.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:Ae(function(t){t=j8t(t);var e=this.cy(),r=this,n=t.root,i=t.weight,a=t.directed,t=t.alpha,n=e.collection(n)[0];if(a){for(var o=(e=n.connectedEdges()).filter(function(t){return t.target().same(n)&&r.has(t)}),s=e.filter(function(t){return t.source().same(n)&&r.has(t)}),a=o.length,e=s.length,l=0,c=0,h=0;h<o.length;h++)l+=i(o[h]);for(var u=0;u<s.length;u++)c+=i(s[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=n.connectedEdges().intersection(r),a=d.length,p=0,g=0;g<d.length;g++)p+=i(d[g]);return{degree:Math.pow(a,1-t)*Math.pow(p,t)}},"degreeCentrality")}).dc=zSt.degreeCentrality,zSt.dcn=zSt.degreeCentralityNormalised=zSt.degreeCentralityNormalized,H8t=JAt({harmonic:!0,weight:Ae(function(){return 1},"weight"),directed:!1,root:null}),(Y={closenessCentralityNormalized:Ae(function(t){for(var e=(t=H8t(t)).harmonic,r=t.weight,t=t.directed,n=this.cy(),i={},a=0,o=this.nodes(),s=this.floydWarshall({weight:r,directed:t}),l=0;l<o.length;l++){for(var c,h=0,u=o[l],d=0;d<o.length;d++)l!==d&&(c=s.distance(u,o[d]),h+=e?1/c:c);a<(h=e?h:1/h)&&(a=h),i[u.id()]=h}return{closeness:Ae(function(t){return 0==a?0:(t=(Pkt(t)?n.filter(t)[0]:t).id(),i[t]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:Ae(function(t){for(var e=(t=H8t(t)).root,r=t.weight,n=t.directed,i=t.harmonic,e=this.filter(e)[0],a=this.dijkstra({root:e,weight:r,directed:n}),o=0,s=this.nodes(),l=0;l<s.length;l++){var c=s[l];c.same(e)||(c=a.distanceTo(c),o+=i?1/c:c)}return i?o:1/o},"closenessCentrality")}).cc=Y.closenessCentrality,Y.ccn=Y.closenessCentralityNormalised=Y.closenessCentralityNormalized,W8t=JAt({weight:null,directed:!1}),(MAt={betweennessCentrality:Ae(function(t){for(var e=(t=W8t(t)).directed,w=t.weight,k=null!=w,T=this.cy(),E=this.nodes(),_={},r={},n=0,C={set:Ae(function(t,e){n<(r[t]=e)&&(n=e)},"set"),get:Ae(function(t){return r[t]},"get")},i=0;i<E.length;i++){var a=E[i],o=a.id();_[o]=(e?a.outgoers():a.openNeighborhood()).nodes(),C.set(o,0)}for(var s=Ae(function(t){for(var e=E[t].id(),r=[],n={},i={},a={},o=new NTt(function(t,e){return a[t]-a[e]}),s=0;s<E.length;s++){var l=E[s].id();n[l]=[],a[l]=1/(i[l]=0)}for(i[e]=1,a[e]=0,o.push(e);!o.empty();){var c=o.pop();if(r.push(c),k)for(var h=0;h<_[c].length;h++){var u=_[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,o.nodes.indexOf(u)<0?o.push(u):o.updateItem(u),i[u]=0,n[u]=[]),a[u]==a[c]+p&&(i[u]=i[u]+i[c],n[u].push(c))}else for(var g=0;g<_[c].length;g++){var f=_[c][g].id();a[f]==1/0&&(o.push(f),a[f]=a[c]+1),a[f]==a[c]+1&&(i[f]=i[f]+i[c],n[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<n[v].length;x++){var b=n[v][x];m[b]=m[b]+i[b]/i[v]*(1+m[v])}v!=E[t].id()&&C.set(v,C.get(v)+m[v])}},"_loop"),l=0;l<E.length;l++)s(l);return(t={betweenness:Ae(function(t){return t=T.collection(t).id(),C.get(t)},"betweenness"),betweennessNormalized:Ae(function(t){return 0==n?0:(t=T.collection(t).id(),C.get(t)/n)},"betweennessNormalized")}).betweennessNormalised=t.betweennessNormalized,t},"betweennessCentrality")}).bc=MAt.betweennessCentrality,V8t=JAt({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),X8t=Ae(function(t){return V8t(t)},"setOptions"),K8t=Ae(function(t,e){for(var r=0,n=0;n<e.length;n++)r+=e[n](t);return r},"getSimilarity"),Z8t=Ae(function(t,e,r){for(var n=0;n<e;n++)t[n*e+n]=r},"addLoops"),Q8t=Ae(function(t,e){for(var r=0;r<e;r++){for(var n=0,i=0;i<e;i++)n+=t[i*e+r];for(var a=0;a<e;a++)t[a*e+r]=t[a*e+r]/n}},"normalize"),J8t=Ae(function(t,e,r){for(var n=new Array(r*r),i=0;i<r;i++){for(var a=0;a<r;a++)n[i*r+a]=0;for(var o=0;o<r;o++)for(var s=0;s<r;s++)n[i*r+s]+=t[i*r+o]*e[o*r+s]}return n},"mmult"),tEt=Ae(function(t,e,r){for(var n=t.slice(0),i=1;i<r;i++)t=J8t(t,n,e);return t},"expand"),eEt=Ae(function(t,e,r){for(var n=new Array(e*e),i=0;i<e*e;i++)n[i]=Math.pow(t[i],r);return Q8t(n,e),n},"inflate"),rEt=Ae(function(t,e,r,n){for(var i=0;i<r;i++)if(Math.round(t[i]*Math.pow(10,n))/Math.pow(10,n)!=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n))return!1;return!0},"hasConverged"),nEt=Ae(function(t,e,r,n){for(var i=[],a=0;a<e;a++){for(var o=[],s=0;s<e;s++)0<Math.round(1e3*t[a*e+s])/1e3&&o.push(r[s]);0!==o.length&&i.push(n.collection(o))}return i},"assign"),iEt=Ae(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"),aEt=Ae(function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t.length;r++)e!=r&&iEt(t[e],t[r])&&t.splice(r,1);return t},"removeDuplicates"),OAt={markovClustering:OAt=Ae(function(t){for(var e=this.nodes(),r=this.edges(),n=this.cy(),i=X8t(t),a={},o=0;o<e.length;o++)a[e[o].id()]=o;for(var s,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=K8t(f,i.attributes);h[p*l+g]+=f,h[g*l+p]+=f}Z8t(h,l,i.multFactor),Q8t(h,l);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,s=tEt(h,l,i.expandFactor),h=eEt(s,l,i.inflateFactor),rEt(h,s,c,4)||(m=!0),y++;return t=nEt(h,l,e,n),aEt(t)},"markovClustering"),mcl:OAt},oEt=Ae(function(t){return t},"identity"),sEt=Ae(function(t,e){return Math.abs(e-t)},"absDiff"),lEt=Ae(function(t,e,r){return t+sEt(e,r)},"addAbsDiff"),cEt=Ae(function(t,e,r){return t+Math.pow(r-e,2)},"addSquaredDiff"),hEt=Ae(function(t){return Math.sqrt(t)},"sqrt"),uEt=Ae(function(t,e,r){return Math.max(t,sEt(e,r))},"maxAbsDiff"),dEt=Ae(function(t,e,r,n,i){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:oEt,o=n,s=0;s<t;s++)o=i(o,e(s),r(s));return a(o)},"getDistance"),(pEt={euclidean:Ae(function(t,e,r){return 2<=t?dEt(t,e,r,0,cEt,hEt):dEt(t,e,r,0,lEt)},"euclidean"),squaredEuclidean:Ae(function(t,e,r){return dEt(t,e,r,0,cEt)},"squaredEuclidean"),manhattan:Ae(function(t,e,r){return dEt(t,e,r,0,lEt)},"manhattan"),max:Ae(function(t,e,r){return dEt(t,e,r,-1/0,uEt)},"max")})["squared-euclidean"]=pEt.squaredEuclidean,pEt.squaredeuclidean=pEt.squaredEuclidean,Ae(B6t,"clusteringDistance"),gEt=JAt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),fEt=Ae(function(t){return gEt(t)},"setOptions"),mEt=Ae(function(t,e,r,n,i){var i="kMedoids"!==i?function(t){return r[t]}:function(t){return n[t](r)},a=Ae(function(t){return n[t](e)},"getQ");return B6t(t,n.length,i,a,r,e)},"getDist"),yEt=Ae(function(t,e,r){for(var n=r.length,i=new Array(n),a=new Array(n),o=new Array(e),s=null,l=0;l<n;l++)i[l]=t.min(r[l]).value,a[l]=t.max(r[l]).value;for(var c=0;c<e;c++){for(var s=[],h=0;h<n;h++)s[h]=Math.random()*(a[h]-i[h])+i[h];o[c]=s}return o},"randomCentroids"),vEt=Ae(function(t,e,r,n,i){for(var a=1/0,o=0,s=0;s<e.length;s++){var l=mEt(r,t,e[s],n,i);l<a&&(a=l,o=s)}return o},"classify"),xEt=Ae(function(t,e,r){for(var n=[],i=null,a=0;a<e.length;a++)r[(i=e[a]).id()]===t&&n.push(i);return n},"buildCluster"),bEt=Ae(function(t,e,r){return Math.abs(e-t)<=r},"haveValuesConverged"),wEt=Ae(function(t,e,r){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(r<Math.abs(t[n][i]-e[n][i]))return!1;return!0},"haveMatricesConverged"),kEt=Ae(function(t,e,r){for(var n=0;n<r;n++)if(t===e[n])return!0;return!1},"seenBefore"),TEt=Ae(function(t,e){var r=new Array(e);if(t.length<50)for(var n=0;n<e;n++){for(var i=t[Math.floor(Math.random()*t.length)];kEt(i,r,n);)i=t[Math.floor(Math.random()*t.length)];r[n]=i}else for(var a=0;a<e;a++)r[a]=t[Math.floor(Math.random()*t.length)];return r},"randomMedoids"),EEt=Ae(function(t,e,r){for(var n=0,i=0;i<e.length;i++)n+=mEt("manhattan",e[i],t,r,"kMedoids");return n},"findCost"),kAt=Ae(function(t){for(var e=this.cy(),r=this.nodes(),n=null,i=fEt(t),a=new Array(i.k),o={},s=i.testMode?"number"==typeof i.testCentroids?(i.testCentroids,yEt(r,i.k,i.attributes)):"object"===g6t(i.testCentroids)?i.testCentroids:yEt(r,i.k,i.attributes):yEt(r,i.k,i.attributes),l=!0,c=0;l&&c<i.maxIterations;){for(var h=0;h<r.length;h++)o[(n=r[h]).id()]=vEt(n,s,i.distance,i.attributes,"kMeans");for(var l=!1,u=0;u<i.k;u++){var d=xEt(u,r,o);if(0!==d.length){for(var p=i.attributes.length,g=s[u],f=new Array(p),m=new Array(p),y=0;y<p;y++){for(var v=m[y]=0;v<d.length;v++)n=d[v],m[y]+=i.attributes[y](n);f[y]=m[y]/d.length,bEt(f[y],g[y],i.sensitivityThreshold)||(l=!0)}s[u]=f,a[u]=e.collection(d)}}c++}return a},"kMeans"),dAt=Ae(function(t){var e,r,n=this.cy(),i=this.nodes(),a=null,o=fEt(t),s=new Array(o.k),l={},c=new Array(o.k);o.testMode?"number"!=typeof o.testCentroids&&(e="object"===g6t(o.testCentroids)?o.testCentroids:TEt(i,o.k)):e=TEt(i,o.k);for(var h=!0,u=0;h&&u<o.maxIterations;){for(var d=0;d<i.length;d++)l[(a=i[d]).id()]=vEt(a,e,o.distance,o.attributes,"kMedoids");for(var h=!1,p=0;p<e.length;p++){var g=xEt(p,i,l);if(0!==g.length){c[p]=EEt(e[p],g,o.attributes);for(var f=0;f<g.length;f++)(r=EEt(g[f],g,o.attributes))<c[p]&&(c[p]=r,e[p]=g[f],h=!0);s[p]=n.collection(g)}}u++}return s},"kMedoids"),_Et=Ae(function(t,e,r,n,i){for(var a=0;a<e.length;a++)for(var o=0;o<t.length;o++)n[a][o]=Math.pow(r[a][o],i.m);for(var s=0;s<t.length;s++)for(var l=0;l<i.attributes.length;l++){for(var c=0,h=0,u=0;u<e.length;u++)c+=n[u][s]*i.attributes[l](e[u]),h+=n[u][s];t[s][l]=c/h}},"updateCentroids"),CEt=Ae(function(t,e,r,n,i){for(var a=0;a<t.length;a++)e[a]=t[a].slice();for(var o,s,l=2/(i.m-1),c=0;c<r.length;c++)for(var h=0;h<n.length;h++){for(var u=0,d=0;d<r.length;d++)o=mEt(i.distance,n[h],r[c],i.attributes,"cmeans"),s=mEt(i.distance,n[h],r[d],i.attributes,"cmeans"),u+=Math.pow(o/s,l);t[h][c]=1/u}},"updateMembership"),SEt=Ae(function(t,e,r,n){for(var i=new Array(r.k),a=0;a<i.length;a++)i[a]=[];for(var o=0;o<e.length;o++){for(var s=-1/0,l=-1,c=0;c<e[0].length;c++)e[o][c]>s&&(s=e[o][c],l=c);i[l].push(t[o])}for(var h=0;h<i.length;h++)i[h]=n.collection(i[h]);return i},"assign"),RAt=Ae(function(t){for(var e=this.cy(),r=this.nodes(),n=fEt(t),i=new Array(r.length),a=0;a<r.length;a++)i[a]=new Array(n.k);for(var o=new Array(r.length),s=0;s<r.length;s++)o[s]=new Array(n.k);for(var l=0;l<r.length;l++){for(var c=0,h=0;h<n.k;h++)o[l][h]=Math.random(),c+=o[l][h];for(var u=0;u<n.k;u++)o[l][u]=o[l][u]/c}for(var d=new Array(n.k),p=0;p<n.k;p++)d[p]=new Array(n.attributes.length);for(var g=new Array(r.length),f=0;f<r.length;f++)g[f]=new Array(n.k);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,_Et(d,r,o,g,n),CEt(o,i,d,r,n),wEt(o,i,n.sensitivityThreshold)||(m=!0),y++;return{clusters:SEt(r,o,n,e),degreeOfMembership:o}},"fuzzyCMeans"),AEt=JAt({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(kAt={kMeans:kAt,kMedoids:dAt,fuzzyCMeans:RAt,fcm:RAt}),dendrogramDepth:0,attributes:[]}),LEt={single:"min",complete:"max"},NEt=Ae(function(t){var t=AEt(t),e=LEt[t.linkage];return null!=e&&(t.linkage=e),t},"setOptions"),IEt=Ae(function(t,e,r,n,i){for(var a,o=0,s=1/0,l=i.attributes,c=Ae(function(e,r){return B6t(i.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][n[u]];d<s&&(o=u,s=d)}if("threshold"===i.mode&&s>=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p=e[o],g=e[n[o]],f="dendrogram"===i.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"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.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"===i.linkage?(r[p.key][y.key]*p.size+r[g.key][y.key]*g.size)/(p.size+g.size):"dendrogram"===i.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(n[x]===p.key||n[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)}n[x]=b}t[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),MEt=Ae(function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},"getAllChildren"),REt=Ae(function t(e,r){var n,i,a;return e?e.left&&e.right?(n=t(e.left,r),i=t(e.right,r),a=r.add({group:"nodes",data:{id:n+","+i}}),r.add({group:"edges",data:{source:n,target:a.id()}}),r.add({group:"edges",data:{source:i,target:a.id()}}),a.id()):e.value?e.value.id():void 0:""},"buildDendrogram"),DEt=Ae(function t(e,r,n){var i,a,o;return e?(i=[],a=[],0===r?(e.left&&MEt(e.left,i),e.right&&MEt(e.right,a),o=i.concat(a),[n.collection(o)]):1===r?e.value?[n.collection(e.value)]:(e.left&&MEt(e.left,i),e.right&&MEt(e.right,a),[n.collection(i),n.collection(a)]):e.value?[n.collection(e.value)]:(e.left&&(i=t(e.left,r-1,n)),e.right&&(a=t(e.right,r-1,n)),i.concat(a))):[]},"buildClustersFromTree"),dAt=Ae(function(t){for(var r=this.cy(),e=this.nodes(),n=NEt(t),i=n.attributes,a=Ae(function(e,r){return B6t(n.distance,i.length,function(t){return i[t](e)},function(t){return i[t](r)},e,r)},"getDist"),o=[],s=[],l=[],c=[],h=0;h<e.length;h++){var u={value:"dendrogram"===n.mode?e[h]:[e[h]],key:h,index:h};c[h]=o[h]=u,s[h]=[],l[h]=0}for(var d=0;d<o.length;d++)for(var p=0;p<=d;p++){var g="dendrogram"===n.mode?d===p?1/0:a(o[d].value,o[p].value):d===p?1/0:a(o[d].value[0],o[p].value[0]);s[d][p]=g,(s[p][d]=g)<s[d][l[d]]&&(l[d]=p)}for(var f,m=IEt(o,c,s,l,n);m;)m=IEt(o,c,s,l,n);return"dendrogram"===n.mode?(f=DEt(o[0],n.dendrogramDepth,r),n.addDendrogram&&REt(o[0],r)):(f=new Array(o.length),o.forEach(function(t,e){t.key=t.index=null,f[e]=r.collection(t.value)})),f},"hierarchicalClustering"),RAt={hierarchicalClustering:dAt,hca:dAt},OEt=JAt({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),PEt=Ae(function(t){var e=t.damping,r=t.preference;return.5<=e&&e<1||pTt("Damping must range on [0.5, 1). Got: ".concat(e)),(e=["median","mean","min","max"]).some(function(t){return t===r})||it(r)||pTt("Preference must be one of [".concat(e.map(function(t){return"'".concat(t,"'")}).join(", "),"] or a number. Got: ").concat(r)),OEt(t)},"setOptions"),BEt=Ae(function(t,e,r,n){var i=Ae(function(t,e){return n[e](t)},"attr");return-B6t(t,n.length,function(t){return i(e,t)},function(t){return i(r,t)},e,r)},"getSimilarity"),FEt=Ae(function(t,e){return"median"===e?jTt(t):"mean"===e?YTt(t):"min"===e?UTt(t):"max"===e?qTt(t):e},"getPreference"),$Et=Ae(function(t,e,r){for(var n=[],i=0;i<t;i++)0<e[i*t+i]+r[i*t+i]&&n.push(i);return n},"findExemplars"),zEt=Ae(function(t,e,r){for(var n=[],i=0;i<t;i++){for(var a=-1,o=-1/0,s=0;s<r.length;s++){var l=r[s];e[i*t+l]>o&&(o=e[i*t+(a=l)])}0<a&&n.push(a)}for(var c=0;c<r.length;c++)n[r[c]]=r[c];return n},"assignClusters"),GEt=Ae(function(t,e,r){for(var n=zEt(t,e,r),i=0;i<r.length;i++){for(var a=[],o=0;o<n.length;o++)n[o]===r[i]&&a.push(o);for(var s=-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&&(s=c,l=h)}r[i]=a[s]}return zEt(t,e,r)},"assign"),dAt=Ae(function(P){for(var B=this.cy(),t=this.nodes(),e=PEt(P),F={},r=0;r<t.length;r++)F[t[r].id()]=r;for(var n,i=(n=t.length)*n,a=new Array(i),o=0;o<i;o++)a[o]=-1/0;for(var s=0;s<n;s++)for(var l=0;l<n;l++)s!==l&&(a[s*n+l]=BEt(e.distance,t[s],t[l],e.attributes));for(var $=FEt(a,e.preference),c=0;c<n;c++)a[c*n+c]=$;for(var h=new Array(i),u=0;u<i;u++)h[u]=0;for(var d=new Array(i),p=0;p<i;p++)d[p]=0;for(var g=new Array(n),f=new Array(n),m=new Array(n),y=0;y<n;y++)g[y]=0,f[y]=0,m[y]=0;for(var v,x=new Array(n*e.minIterations),z=0;z<x.length;z++)x[z]=0;for(v=0;v<e.maxIterations;v++){for(var b=0;b<n;b++){for(var w,k=-1/0,T=-1/0,E=-1,_=0;_<n;_++)g[_]=h[b*n+_],k<=(w=d[b*n+_]+a[b*n+_])?(T=k,k=w,E=_):T<w&&(T=w);for(var C=0;C<n;C++)h[b*n+C]=(1-e.damping)*(a[b*n+C]-k)+e.damping*g[C];h[b*n+E]=(1-e.damping)*(a[b*n+E]-T)+e.damping*g[E]}for(var S=0;S<n;S++){for(var A=0,L=0;L<n;L++)g[L]=d[L*n+S],f[L]=Math.max(0,h[L*n+S]),A+=f[L];A-=f[S],f[S]=h[S*n+S],A+=f[S];for(var N=0;N<n;N++)d[N*n+S]=(1-e.damping)*Math.min(0,A-f[N])+e.damping*g[N];d[S*n+S]=(1-e.damping)*(A-f[S])+e.damping*g[S]}for(var G=0,I=0;I<n;I++){var U=0<d[I*n+I]+h[I*n+I]?1:0;G+=x[v%e.minIterations*n+I]=U}if(0<G&&(v>=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,M=0;M<n;M++){for(var Y=m[M]=0;Y<e.minIterations;Y++)m[M]+=x[Y*n+M];0!==m[M]&&m[M]!==e.minIterations||q++}if(q===n)break}}for(var R=$Et(n,h,d),j=GEt(n,a,R),H={},W=0;W<R.length;W++)H[R[W]]=[];for(var D=0;D<t.length;D++){var V=j[F[t[D].id()]];null!=V&&H[V].push(t[D])}for(var X=new Array(R.length),O=0;O<R.length;O++)X[O]=B.collection(H[R[O]]);return X},"affinityPropagation"),UEt=JAt({root:void 0,directed:!(dAt={affinityPropagation:dAt,ap:dAt})}),EAt={hierholzer:Ae(function(t){$kt(t)||(t={root:(r=arguments)[0],directed:r[1]});var a,o,e,r=UEt(t),t=r.root,s=r.directed,l=!1,c=(t&&(e=(Pkt(t)?this.filter(t):t)[0].id()),{}),h={},n=(s?this.forEach(function(t){var e,r,n,i=t.id();t.isNode()?(r=t.indegree(!0),n=(e=t.outdegree(!0))-r,1==(r-=e)?a?l=!0:a=i:1==n?o?l=!0:o=i:(1<n||1<r)&&(l=!0),c[i]=[],t.outgoers().forEach(function(t){t.isEdge()&&c[i].push(t.id())})):h[i]=[void 0,t.target().id()]}):this.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(a?o?l=!0:o=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(o&&a)if(s){if(e&&o!=e)return n;e=o}else{if(e&&o!=e&&a!=e)return n;e=e||o}else e=e||this[0].id();for(var i,u=Ae(function(t){for(var e,r,n,i=t,a=[t];c[i].length;)e=c[i].shift(),r=h[e][0],i!=(n=h[e][1])?(c[n]=c[n].filter(function(t){return t!=e}),i=n):s||i==r||(c[r]=c[r].filter(function(t){return t!=e}),i=r),a.unshift(e),a.unshift(i);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(i in d.unshift(this.getElementById(p.shift())),c)if(c[i].length)return n;n.found=!0,n.trail=this.spawn(d,!0)}return n},"hierholzer")},HAt={hopcroftTarjanBiconnected:HAt=Ae(function(){var s=this,l={},c=0,h=0,u=[],d=[],p={},g=Ae(function(t,e){for(var r=d.length-1,n=[],i=s.spawn();d[r].x!=t||d[r].y!=e;)n.push(d.pop().edge),r--;n.push(d.pop().edge),n.forEach(function(t){var e=t.connectedNodes().intersection(s);i.merge(t),e.forEach(function(t){var e=t.id(),r=t.connectedEdges().intersection(s);i.merge(t),l[e].cutVertex?i.merge(r.filter(function(t){return t.isLoop()})):i.merge(r)})}),u.push(i)},"buildComponent"),e=Ae(function e(r,n,i){r===i&&(h+=1),l[n]={id:c,low:c++,cutVertex:!1};var a,o,t=s.getElementById(n).connectedEdges().intersection(s);0===t.size()?u.push(s.spawn(s.getElementById(n))):t.forEach(function(t){o=t.source().id(),a=t.target().id(),(a=o===n?a:o)!==i&&(o=t.id(),p[o]||(p[o]=!0,d.push({x:n,y:a,edge:t})),a in l?l[n].low=Math.min(l[n].low,l[a].id):(e(r,a,n),l[n].low=Math.min(l[n].low,l[a].low),l[n].id<=l[a].low&&(l[n].cutVertex=!0,g(n,a))))})},"biconnectedSearch"),t=(s.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 s.getElementById(t)}));return{cut:s.spawn(t),components:u}},"hopcroftTarjanBiconnected"),htbc:HAt,htb:HAt,hopcroftTarjanBiconnectedComponents:HAt},BAt=Ae(function(){var a=this,o={},s=0,l=[],c=[],h=a.spawn(a),e=Ae(function e(r){if(c.push(r),o[r]={index:s,low:s++,explored:!1},a.getElementById(r).connectedEdges().intersection(a).forEach(function(t){(t=t.target().id())!==r&&(t in o||e(t),o[t].explored||(o[r].low=Math.min(o[r].low,o[t].low)))}),o[r].index===o[r].low){for(var t=a.spawn();;){var n=c.pop();if(t.merge(a.getElementById(n)),o[n].low=o[r].index,o[n].explored=!0,n===r)break}var i=t.edgesWith(t),i=t.merge(i);l.push(i),h=h.difference(i)}},"stronglyConnectedSearch");return a.forEach(function(t){!t.isNode()||(t=t.id())in o||e(t)}),{cut:h,components:l}},"tarjanStronglyConnected"),qEt={},[H,DAt,XAt,gAt,PAt,YAt,jAt,IAt,zSt,Y,MAt,OAt,kAt,RAt,dAt,EAt,HAt,{tarjanStronglyConnected:BAt,tsc:BAt,tscc:BAt,tarjanStronglyConnectedComponents:BAt}].forEach(function(t){l7t(qEt,t)}),YEt=0,(jEt=Ae(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=YEt,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:Ae(function(t){return HEt(this,1,"fulfillValue",t)},"fulfill"),reject:Ae(function(t){return HEt(this,2,"rejectReason",t)},"reject"),then:Ae(function(t,e){var r=new jEt;return this.onFulfilled.push(XEt(t,r,"fulfill")),this.onRejected.push(XEt(e,r,"reject")),WEt(this),r.proxy},"then")},HEt=Ae(function(t,e,r,n){return t.state===YEt&&(t.state=e,t[r]=n,WEt(t)),t},"deliver"),WEt=Ae(function(t){1===t.state?VEt(t,"onFulfilled",t.fulfillValue):2===t.state&&VEt(t,"onRejected",t.rejectReason)},"execute"),VEt=Ae(function(t,e,r){var n;0!==t[e].length&&(n=t[e],t[e]=[],t=Ae(function(){for(var t=0;t<n.length;t++)n[t](r)},"func"),"function"==typeof setImmediate?setImmediate(t):setTimeout(t,0))},"execute_handlers"),XEt=Ae(function(r,n,i){return function(t){if("function"!=typeof r)n[i].call(n,t);else{var e;try{e=r(t)}catch(t){return void n.reject(t)}KEt(n,e)}}},"resolver"),KEt=Ae(function e(r,n){if(r===n||r.proxy===n)r.reject(new TypeError("cannot resolve promise with itself"));else{var t;if("object"===g6t(n)&&null!==n||"function"==typeof n)try{t=n.then}catch(t){return void r.reject(t)}if("function"==typeof t){var i=!1;try{t.call(n,function(t){i||(i=!0,t===n?r.reject(new TypeError("circular thenable chain")):e(r,t))},function(t){i||(i=!0,r.reject(t))})}catch(t){i||r.reject(t)}}else r.fulfill(n)}},"resolve"),jEt.all=function(s){return new jEt(function(r,n){for(var i=new Array(s.length),a=0,o=Ae(function(t,e){i[t]=e,++a===s.length&&r(i)},"fulfill"),t=0;t<s.length;t++)!function(e){var t=s[e];null!=t&&null!=t.then?t.then(function(t){o(e,t)},function(t){n(t)}):o(e,t)}(t)})},jEt.resolve=function(r){return new jEt(function(t,e){t(r)})},jEt.reject=function(r){return new jEt(function(t,e){e(r)})},ZEt=typeof Promise<"u"?Promise:jEt,QEt=Ae(function(t,e,r){var n=Hkt(t),i=!n;(e=this._private=l7t({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),i&&(r=t.position(),e.startPosition=e.startPosition||{x:r.x,y:r.y},e.startStyle=e.startStyle||t.cy().style().getAnimationStartStyle(t,e.style)),n&&(i=t.pan(),e.startPan={x:i.x,y:i.y},e.startZoom=t.zoom()),this.length=1,this[0]=this},"Animation"),H=QEt.prototype,l7t(H,{instanceString:Ae(function(){return"animation"},"instanceString"),hook:Ae(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:Ae(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:Ae(function(){return this._private.playing},"playing"),apply:Ae(function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},"apply"),applying:Ae(function(){return this._private.applying},"applying"),pause:Ae(function(){var t=this._private;return t.playing=!1,t.started=!1,this},"pause"),stop:Ae(function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},"stop"),rewind:Ae(function(){return this.progress(0)},"rewind"),fastforward:Ae(function(){return this.progress(1)},"fastforward"),time:Ae(function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},"time"),progress:Ae(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:Ae(function(){return 1===this._private.progress},"completed"),reverse:Ae(function(){var n=this._private,t=n.playing,e=(t&&this.pause(),n.progress=1-n.progress,n.started=!1,Ae(function(t,e){var r=n[t];null!=r&&(n[t]=n[e],n[e]=r)},"swap"));if(e("zoom","startZoom"),e("pan","startPan"),e("position","startPosition"),n.style)for(var r=0;r<n.style.length;r++){var i=n.style[r],a=i.name,o=n.startStyle[a];n.startStyle[a]=i,n.style[r]=o}return t&&this.play(),this},"reverse"),promise:Ae(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 ZEt(function(t,e){r.push(function(){t()})})},"promise")}),H.complete=H.completed,H.run=H.play,H.running=H.playing,DAt={animated:Ae(function(){return Ae(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:Ae(function(){return Ae(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:Ae(function(){return Ae(function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this},"delayImpl")},"delay"),delayAnimation:Ae(function(){return Ae(function(t,e){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:e}):this},"delayAnimationImpl")},"delayAnimation"),animation:Ae(function(){return Ae(function(t,e){var r=void 0!==this.length,n=r?this:[this],i=this._private.cy||this,a=!(r=!r);if(!i.styleEnabled())return this;var o=i.style();if(t=l7t({},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=o.getPropsList(t.style||t.css),t.css=void 0),a&&null!=t.renderedPosition&&(e=t.renderedPosition,o=i.pan(),a=i.zoom(),t.position=zTt(e,a,o)),r&&null!=t.panBy&&(e=t.panBy,a=i.pan(),t.pan={x:a.x+e.x,y:a.y+e.y}),o=t.center||t.centre,r&&null!=o&&null!=(a=i.getCenterPan(o.eles,t.zoom))&&(t.pan=a),r&&null!=t.fit&&(e=t.fit,null!=(o=i.getFitViewport(e.eles||e.boundingBox,e.padding)))&&(t.pan=o.pan,t.zoom=o.zoom),r&&$kt(t.zoom)&&(null!=(a=i.getZoomedViewport(t.zoom))?(a.zoomed&&(t.zoom=a.zoom),a.panned&&(t.pan=a.pan)):t.zoom=null)}return new QEt(n[0],t)},"animationImpl")},"animation"),animate:Ae(function(){return Ae(function(t,e){var r=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled()){e&&(t=l7t({},t,e));for(var n=0;n<r.length;n++){var i=r[n],a=i.animated()&&(void 0===t.queue||t.queue);i.animation(t,a?{queue:!0}:void 0).play()}}return this},"animateImpl")},"animate"),stop:Ae(function(){return Ae(function(t,e){var r=void 0!==this.length?this:[this],n=this._private.cy||this;if(n.styleEnabled()){for(var i=0;i<r.length;i++){for(var a=r[i]._private,o=a.animation.current,s=0;s<o.length;s++){var l=o[s]._private;e&&(l.duration=0)}t&&(a.animation.queue=[]),e||(a.animation.current=[])}n.notify("draw")}return this},"stopImpl")},"stop")},XAt=Array.isArray,JEt=XAt,t_t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e_t=/^\w*$/,Ae(F6t,"isKey"),r_t=F6t,Ae($6t,"isFunction"),n_t=$6t,gAt=x7t["__core-js_shared__"],o=/[^.]+$/.exec((PAt=gAt)&&PAt.keys&&PAt.keys.IE_PROTO||""),i_t=o?"Symbol(src)_1."+o:"",Ae(z6t,"isMasked"),a_t=z6t,YAt=Function.prototype,o_t=YAt.toString,Ae(G6t,"toSource"),s_t=G6t,jAt=/[\\^$.*+?()[\]{}|]/g,l_t=/^\[object .+?Constructor\]$/,IAt=Function.prototype,zSt=Object.prototype,Y=IAt.toString,MAt=zSt.hasOwnProperty,c_t=RegExp("^"+Y.call(MAt).replace(jAt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae(U6t,"baseIsNative"),h_t=U6t,Ae(q6t,"getValue$1"),u_t=q6t,Ae(Y6t,"getNative"),OAt=(d_t=Y6t)(Object,"create"),p_t=OAt,Ae(j6t,"hashClear"),kAt=j6t,Ae(H6t,"hashDelete"),RAt=H6t,dAt=Object.prototype,g_t=dAt.hasOwnProperty,Ae(W6t,"hashGet"),EAt=W6t,HAt=Object.prototype,f_t=HAt.hasOwnProperty,Ae(V6t,"hashHas"),BAt=V6t,Ae(X6t,"hashSet"),H=X6t,Ae(K6t,"Hash"),K6t.prototype.clear=kAt,K6t.prototype.delete=RAt,K6t.prototype.get=EAt,K6t.prototype.has=BAt,K6t.prototype.set=H,m_t=K6t,Ae(Z6t,"listCacheClear"),XAt=Z6t,Ae(Q6t,"eq"),y_t=Q6t,Ae(J6t,"assocIndexOf"),v_t=J6t,gAt=Array.prototype,x_t=gAt.splice,Ae(twt,"listCacheDelete"),PAt=twt,Ae(ewt,"listCacheGet"),YAt=ewt,Ae(rwt,"listCacheHas"),IAt=rwt,Ae(nwt,"listCacheSet"),zSt=nwt,Ae(iwt,"ListCache"),iwt.prototype.clear=XAt,iwt.prototype.delete=PAt,iwt.prototype.get=YAt,iwt.prototype.has=IAt,iwt.prototype.set=zSt,b_t=iwt,Y=d_t(x7t,"Map"),w_t=Y,Ae(awt,"mapCacheClear"),MAt=awt,Ae(owt,"isKeyable"),k_t=owt,Ae(swt,"getMapData"),T_t=swt,Ae(lwt,"mapCacheDelete"),jAt=lwt,Ae(cwt,"mapCacheGet"),OAt=cwt,Ae(hwt,"mapCacheHas"),dAt=hwt,Ae(uwt,"mapCacheSet"),HAt=uwt,Ae(dwt,"MapCache"),dwt.prototype.clear=MAt,dwt.prototype.delete=jAt,dwt.prototype.get=OAt,dwt.prototype.has=dAt,dwt.prototype.set=HAt,E_t=dwt,__t="Expected a function",Ae(pwt,"memoize"),pwt.Cache=E_t,C_t=pwt,Ae(gwt,"memoizeCapped"),S_t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A_t=/\\(\\)?/g,kAt=gwt(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(S_t,function(t,e,r,n){i.push(r?n.replace(A_t,"$1"):e||t)}),i}),L_t=kAt,Ae(fwt,"arrayMap"),N_t=fwt,I_t=1/0,RAt=j?j.prototype:void 0,M_t=RAt?RAt.toString:void 0,Ae(mwt,"baseToString"),R_t=mwt,Ae(ywt,"toString$1"),D_t=ywt,Ae(vwt,"castPath"),O_t=vwt,Ae(xwt,"toKey"),P_t=xwt,Ae(bwt,"baseGet"),B_t=bwt,Ae(wwt,"get"),F_t=wwt,EAt=function(){try{var t=d_t(Object,"defineProperty");return t({},"",{}),t}catch{}}(),$_t=EAt,Ae(kwt,"baseAssignValue"),z_t=kwt,BAt=Object.prototype,G_t=BAt.hasOwnProperty,Ae(Twt,"assignValue"),U_t=Twt,q_t=/^(?:0|[1-9]\d*)$/,Ae(Ewt,"isIndex"),Y_t=Ewt,Ae(_wt,"baseSet"),j_t=_wt,Ae(Cwt,"set"),H_t=Cwt,Ae(Swt,"copyArray"),W_t=Swt,Ae(Awt,"toPath"),V_t=Awt,H={data:Ae(function(b){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:Ae(function(t){},"beforeGet"),beforeSet:Ae(function(t,e){},"beforeSet"),onSet:Ae(function(t){},"onSet"),canSet:Ae(function(t){return!0},"canSet")};return b=l7t({},t,b),Ae(function(t,e){var r,n=b,i=this,a=void 0!==i.length,o=a?i:[i],s=a?i[0]:i;if(Pkt(t)){var l,c=-1!==t.indexOf(".")&&V_t(t);if(n.allowGetting&&void 0===e)return s&&(n.beforeGet(s),l=c&&void 0===s._private[n.field][t]?F_t(s._private[n.field],c):s._private[n.field][t]),l;if(n.allowSetting&&void 0!==e&&!n.immutableKeys[t]){a=v6t({},t,e),n.beforeSet(i,a);for(var h=0,u=o.length;h<u;h++){var d=o[h];n.canSet(d)&&(c&&void 0===s._private[n.field][t]?H_t(d._private[n.field],c,e):d._private[n.field][t]=e)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}}else if(n.allowSetting&&$kt(t)){var p=t,g=Object.keys(p);n.beforeSet(i,p);for(var f=0;f<g.length;f++){var m,y=p[m=g[f]];if(!n.immutableKeys[m])for(var v=0;v<o.length;v++){var x=o[v];n.canSet(x)&&(x._private[n.field][m]=y)}}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}else if(n.allowBinding&&Bkt(t))i.on(n.bindingEvent,t);else if(n.allowGetting&&void 0===t)return s&&(n.beforeGet(s),r=s._private[n.field]),r;return i},"dataImpl")},"data"),removeData:Ae(function(f){return f=l7t({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),Ae(function(t){var e=f,r=void 0!==this.length?this:[this];if(Pkt(t)){for(var n=t.split(/\s+/),i=n.length,a=0;a<i;a++){var o=n[a];if(!Xkt(o)&&!e.immutableKeys[o])for(var s=0,l=r.length;s<l;s++)r[s]._private[e.field][o]=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")},gAt={eventAliasesOn:Ae(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 i=this,a=Array.prototype.slice.call(arguments,0);return new ZEt(function(e,t){var r=Ae(function(t){i.off.apply(i,n),e(t)},"callback"),n=(r=a.concat([r])).concat([]);i.on.apply(i,r)})}},"eventAliasesOn")},X_t={},[DAt,H,gAt].forEach(function(t){l7t(X_t,t)}),XAt={animate:X_t.animate(),animation:X_t.animation(),animated:X_t.animated(),clearQueue:X_t.clearQueue(),delay:X_t.delay(),delayAnimation:X_t.delayAnimation(),stop:X_t.stop()},(PAt={classes:Ae(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=[],n=new ATt(t),i=0;i<this.length;i++){for(var a=this[i],o=a._private,s=o.classes,l=!1,c=0;c<t.length;c++){var h=t[c];if(!s.has(h)){l=!0;break}}(l=l||s.size!==t.length)&&(o.classes=n,r.push(a))}return 0<r.length&&this.spawn(r).updateStyle().emit("class"),this},"classes"),addClass:Ae(function(t){return this.toggleClass(t,!0)},"addClass"),hasClass:Ae(function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},"hasClass"),toggleClass:Ae(function(t,e){Fkt(t)||(t=t.match(/\S+/g)||[]);for(var r=void 0===e,n=[],i=0,a=this.length;i<a;i++)for(var o=this[i],s=o._private.classes,l=!1,c=0;c<t.length;c++){var h=t[c],u=s.has(h),d=!1;e||r&&!u?(s.add(h),d=!0):(!e||r&&u)&&(s.delete(h),d=!0),!l&&d&&(n.push(o),l=!0)}return 0<n.length&&this.spawn(n).updateStyle().emit("class"),this},"toggleClass"),removeClass:Ae(function(t){return this.toggleClass(t,!1)},"removeClass"),flashClass:Ae(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,(K_t={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:a7t,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+K_t.metaChar+"))+",K_t.className="(?:[\\w-]|(?:\\\\"+K_t.metaChar+"))+",K_t.value=K_t.string+"|"+K_t.number,K_t.id=K_t.variable;for(var e,r=K_t.comparatorOp.split("|"),i=0;i<r.length;i++)e=r[i],K_t.comparatorOp+="|@"+e;for(r=K_t.comparatorOp.split("|"),i=0;i<r.length;i++)0<=(e=r[i]).indexOf("!")||"="===e||(K_t.comparatorOp+="|\\!"+e);function s(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:s(r)}}function h(t,e){var r=l(t,.5*e,o={dx:t.v,dv:s(t)}),n=l(t,.5*e,r),i=l(t,e,n),a=1/6*(o.dx+2*(r.dx+n.dx)+i.dx),o=1/6*(o.dv+2*(r.dv+n.dv)+i.dv);return t.x=t.x+a*e,t.v=t.v+o*e,t}Z_t=Ae(function(){return{checks:[]}},"newQuery"),q={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},Q_t=[{selector:":selected",matches:Ae(function(t){return t.selected()},"matches")},{selector:":unselected",matches:Ae(function(t){return!t.selected()},"matches")},{selector:":selectable",matches:Ae(function(t){return t.selectable()},"matches")},{selector:":unselectable",matches:Ae(function(t){return!t.selectable()},"matches")},{selector:":locked",matches:Ae(function(t){return t.locked()},"matches")},{selector:":unlocked",matches:Ae(function(t){return!t.locked()},"matches")},{selector:":visible",matches:Ae(function(t){return t.visible()},"matches")},{selector:":hidden",matches:Ae(function(t){return!t.visible()},"matches")},{selector:":transparent",matches:Ae(function(t){return t.transparent()},"matches")},{selector:":grabbed",matches:Ae(function(t){return t.grabbed()},"matches")},{selector:":free",matches:Ae(function(t){return!t.grabbed()},"matches")},{selector:":removed",matches:Ae(function(t){return t.removed()},"matches")},{selector:":inside",matches:Ae(function(t){return!t.removed()},"matches")},{selector:":grabbable",matches:Ae(function(t){return t.grabbable()},"matches")},{selector:":ungrabbable",matches:Ae(function(t){return!t.grabbable()},"matches")},{selector:":animated",matches:Ae(function(t){return t.animated()},"matches")},{selector:":unanimated",matches:Ae(function(t){return!t.animated()},"matches")},{selector:":parent",matches:Ae(function(t){return t.isParent()},"matches")},{selector:":childless",matches:Ae(function(t){return t.isChildless()},"matches")},{selector:":child",matches:Ae(function(t){return t.isChild()},"matches")},{selector:":orphan",matches:Ae(function(t){return t.isOrphan()},"matches")},{selector:":nonorphan",matches:Ae(function(t){return t.isChild()},"matches")},{selector:":compound",matches:Ae(function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()},"matches")},{selector:":loop",matches:Ae(function(t){return t.isLoop()},"matches")},{selector:":simple",matches:Ae(function(t){return t.isSimple()},"matches")},{selector:":active",matches:Ae(function(t){return t.active()},"matches")},{selector:":inactive",matches:Ae(function(t){return!t.active()},"matches")},{selector:":backgrounding",matches:Ae(function(t){return t.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:Ae(function(t){return!t.backgrounding()},"matches")}].sort(function(t,e){return s7t(t.selector,e.selector)}),J_t=function(){for(var t,e={},r=0;r<Q_t.length;r++)e[(t=Q_t[r]).selector]=t.matches;return e}(),tCt=Ae(function(t,e){return J_t[t](e)},"stateSelectorMatches"),YAt="("+Q_t.map(function(t){return t.selector}).join("|")+")",eCt=Ae(function(t){return t.replace(new RegExp("\\\\("+K_t.metaChar+")","g"),function(t,e){return e})},"cleanMetaChars"),rCt=Ae(function(t,e,r){t[t.length-1]=r},"replaceLastQuery"),(nCt=[{name:"group",query:!0,regex:"("+K_t.group+")",populate:Ae(function(t,e,r){r=x6t(r,1)[0],e.checks.push({type:q.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:YAt,populate:Ae(function(t,e,r){r=x6t(r,1)[0],e.checks.push({type:q.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+K_t.id+")",populate:Ae(function(t,e,r){r=x6t(r,1)[0],e.checks.push({type:q.ID,value:eCt(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+K_t.className+")",populate:Ae(function(t,e,r){r=x6t(r,1)[0],e.checks.push({type:q.CLASS,value:eCt(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+K_t.variable+")\\s*\\]",populate:Ae(function(t,e,r){r=x6t(r,1)[0],e.checks.push({type:q.DATA_EXIST,field:eCt(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+K_t.variable+")\\s*("+K_t.comparatorOp+")\\s*("+K_t.value+")\\s*\\]",populate:Ae(function(t,e,r){var n=(r=x6t(r,3))[0],i=r[1],r=r[2],r=null!=new RegExp("^"+K_t.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);e.checks.push({type:q.DATA_COMPARE,field:eCt(n),operator:i,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+K_t.boolOp+")\\s*("+K_t.variable+")\\s*\\]",populate:Ae(function(t,e,r){var n=(r=x6t(r,2))[0],r=r[1];e.checks.push({type:q.DATA_BOOL,field:eCt(r),operator:n})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+K_t.meta+")\\s*("+K_t.comparatorOp+")\\s*("+K_t.number+")\\s*\\]\\]",populate:Ae(function(t,e,r){var n=(r=x6t(r,3))[0],i=r[1],r=r[2];e.checks.push({type:q.META_COMPARE,field:eCt(n),operator:i,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:K_t.separator,populate:Ae(function(t,e){var r=t.currentSubject,n=t.edgeCount,i=t.compoundCount,a=t[t.length-1];return null!=r&&(a.subject=r,t.currentSubject=null),a.edgeCount=n,a.compoundCount=i,t.edgeCount=0,t.compoundCount=0,t[t.length++]=Z_t()},"populate")},{name:"directedEdge",separator:!0,regex:K_t.directedEdge,populate:Ae(function(t,e){var r,n,i;return null==t.currentSubject?(n=Z_t(),r=e,i=Z_t(),n.checks.push({type:q.DIRECTED_EDGE,source:r,target:i}),rCt(t,e,n)):(r=Z_t(),n=e,i=Z_t(),r.checks.push({type:q.NODE_SOURCE,source:n,target:i}),rCt(t,e,r)),t.edgeCount++,i},"populate")},{name:"undirectedEdge",separator:!0,regex:K_t.undirectedEdge,populate:Ae(function(t,e){var r,n,i;return null==t.currentSubject?(n=Z_t(),r=e,i=Z_t(),n.checks.push({type:q.UNDIRECTED_EDGE,nodes:[r,i]}),rCt(t,e,n),t.edgeCount++):(r=Z_t(),n=e,i=Z_t(),r.checks.push({type:q.NODE_NEIGHBOR,node:n,neighbor:i}),rCt(t,e,r)),i},"populate")},{name:"child",separator:!0,regex:K_t.child,populate:Ae(function(t,e){var r,n,i,a,o,s;return null==t.currentSubject?(s=Z_t(),a=Z_t(),r=t[t.length-1],s.checks.push({type:q.CHILD,parent:r,child:a}),rCt(t,e,s),t.compoundCount++,a):t.currentSubject===e?(r=Z_t(),s=t[t.length-1],a=Z_t(),n=Z_t(),i=Z_t(),o=Z_t(),r.checks.push({type:q.COMPOUND_SPLIT,left:s,right:a,subject:n}),n.checks=e.checks,e.checks=[{type:q.TRUE}],o.checks.push({type:q.TRUE}),a.checks.push({type:q.PARENT,parent:o,child:i}),rCt(t,s,r),t.currentSubject=n,t.compoundCount++,i):(a=Z_t(),o=Z_t(),s=[{type:q.PARENT,parent:a,child:o}],a.checks=e.checks,e.checks=s,t.compoundCount++,o)},"populate")},{name:"descendant",separator:!0,regex:K_t.descendant,populate:Ae(function(t,e){var r,n,i,a,o,s;return null==t.currentSubject?(s=Z_t(),a=Z_t(),r=t[t.length-1],s.checks.push({type:q.DESCENDANT,ancestor:r,descendant:a}),rCt(t,e,s),t.compoundCount++,a):t.currentSubject===e?(r=Z_t(),s=t[t.length-1],a=Z_t(),n=Z_t(),i=Z_t(),o=Z_t(),r.checks.push({type:q.COMPOUND_SPLIT,left:s,right:a,subject:n}),n.checks=e.checks,e.checks=[{type:q.TRUE}],o.checks.push({type:q.TRUE}),a.checks.push({type:q.ANCESTOR,ancestor:o,descendant:i}),rCt(t,s,r),t.currentSubject=n,t.compoundCount++,i):(a=Z_t(),o=Z_t(),s=[{type:q.ANCESTOR,ancestor:a,descendant:o}],a.checks=e.checks,e.checks=s,t.compoundCount++,o)},"populate")},{name:"subject",modifier:!0,regex:K_t.subject,populate:Ae(function(t,e){if(null!=t.currentSubject&&t.currentSubject!==e)return fTt("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=e,(t=null==(e=t[t.length-1].checks[0])?null:e.type)===q.DIRECTED_EDGE?e.type=q.NODE_TARGET:t===q.UNDIRECTED_EDGE&&(e.type=q.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)}),iCt=Ae(function(t){for(var e=0;e<nCt.length;e++){var r=(s=nCt[e]).name,n=t.match(s.regexObj);if(null!=n){var i=n,a=s,o=r,s=n[0];t=t.substring(s.length);break}}return{expr:a,match:i,name:o,remaining:t}},"consumeExpr"),aCt=Ae(function(t){var e=t.match(/^\s+/);return e&&(e=e[0],t=t.substring(e.length)),t},"consumeWhitespace"),IAt=Ae(function(t){var e=this,r=e.inputText=t,n=e[0]=Z_t();for(e.length=1,r=aCt(r);;){var i=iCt(r);if(null==i.expr)return fTt("The selector `"+t+"`is invalid"),!1;var a=i.match.slice(1);if(!1===(a=i.expr.populate(e,n,a)))return!1;if(null!=a&&(n=a),(r=i.remaining).match(/^\s*$/))break}var o=e[e.length-1];null!=e.currentSubject&&(o.subject=e.currentSubject),o.edgeCount=e.edgeCount,o.compoundCount=e.compoundCount;for(var s=0;s<e.length;s++){var l=e[s];if(0<l.compoundCount&&0<l.edgeCount)return fTt("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return fTt("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&fTt("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"),zSt=Ae(function(){if(null!=this.toStringCache)return this.toStringCache;for(var s=Ae(function(t){return t??""},"clean"),l=Ae(function(t){return Pkt(t)?'"'+t+'"':s(t)},"cleanVal"),c=Ae(function(t){return" "+t+" "},"space"),a=Ae(function(t,e){var r=t.type,n=t.value;switch(r){case q.GROUP:return(i=s(n)).substring(0,i.length-1);case q.DATA_COMPARE:var i=t.field,a=t.operator;return"["+i+c(s(a))+l(n)+"]";case q.DATA_BOOL:return i=t.operator,a=t.field,"["+s(i)+a+"]";case q.DATA_EXIST:return"["+t.field+"]";case q.META_COMPARE:return i=t.operator,"[["+t.field+c(s(i))+l(n)+"]]";case q.STATE:return n;case q.ID:return"#"+n;case q.CLASS:return"."+n;case q.PARENT:case q.CHILD:return h(t.parent,e)+c(">")+h(t.child,e);case q.ANCESTOR:case q.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case q.COMPOUND_SPLIT:var a=h(t.left,e),i=h(t.subject,e),o=h(t.right,e);return a+(0<a.length?" ":"")+i+o;case q.TRUE:return""}},"checkToString"),h=Ae(function(n,i){return n.checks.reduce(function(t,e,r){return t+(i===n&&0===r?"$":"")+a(e,i)},"")},"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"),Y={parse:IAt,toString:zSt},oCt=Ae(function(t,e,r){var n,i,a,o=Pkt(t),s=it(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),(o||l||c)&&(i=o||s?""+t:"",a=""+r),c&&(t=i=i.toLowerCase(),r=a=a.toLowerCase()),e){case"*=":n=0<=i.indexOf(a);break;case"$=":n=0<=i.indexOf(a,i.length-a.length);break;case"^=":n=0===i.indexOf(a);break;case"=":n=t===r;break;case">":u=!0,n=r<t;break;case">=":u=!0,n=r<=t;break;case"<":u=!0,n=t<r;break;case"<=":u=!0,n=t<=r;break;default:n=!1}return!h||null==t&&u?n:!n},"valCmp"),sCt=Ae(function(t,e){switch(e){case"?":return!!t;case"!":return!t;case"^":return void 0===t}},"boolCmp"),lCt=Ae(function(t){return void 0!==t},"existCmp"),cCt=Ae(function(t,e){return t.data(e)},"data"),hCt=Ae(function(t,e){return t[e]()},"meta"),uCt=[],dCt=Ae(function(t,e){return t.checks.every(function(t){return uCt[t.type](t,e)})},"matches"),uCt[q.GROUP]=function(t,e){return"*"===(t=t.value)||t===e.group()},uCt[q.STATE]=function(t,e){return t=t.value,tCt(t,e)},uCt[q.ID]=function(t,e){return t=t.value,e.id()===t},uCt[q.CLASS]=function(t,e){return t=t.value,e.hasClass(t)},uCt[q.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,t=t.value;return oCt(hCt(e,r),n,t)},uCt[q.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,t=t.value;return oCt(cCt(e,r),n,t)},uCt[q.DATA_BOOL]=function(t,e){var r=t.field,t=t.operator;return sCt(cCt(e,r),t)},uCt[q.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,lCt(cCt(e,r))},uCt[q.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],t=t.nodes[1],n=e.source(),e=e.target();return dCt(r,n)&&dCt(t,e)||dCt(t,n)&&dCt(r,e)},uCt[q.NODE_NEIGHBOR]=function(e,t){return dCt(e.node,t)&&t.neighborhood().some(function(t){return t.isNode()&&dCt(e.neighbor,t)})},uCt[q.DIRECTED_EDGE]=function(t,e){return dCt(t.source,e.source())&&dCt(t.target,e.target())},uCt[q.NODE_SOURCE]=function(e,t){return dCt(e.source,t)&&t.outgoers().some(function(t){return t.isNode()&&dCt(e.target,t)})},uCt[q.NODE_TARGET]=function(e,t){return dCt(e.target,t)&&t.incomers().some(function(t){return t.isNode()&&dCt(e.source,t)})},uCt[q.CHILD]=function(t,e){return dCt(t.child,e)&&dCt(t.parent,e.parent())},uCt[q.PARENT]=function(e,t){return dCt(e.parent,t)&&t.children().some(function(t){return dCt(e.child,t)})},uCt[q.DESCENDANT]=function(e,t){return dCt(e.descendant,t)&&t.ancestors().some(function(t){return dCt(e.ancestor,t)})},uCt[q.ANCESTOR]=function(e,t){return dCt(e.ancestor,t)&&t.descendants().some(function(t){return dCt(e.descendant,t)})},uCt[q.COMPOUND_SPLIT]=function(t,e){return dCt(t.subject,e)&&dCt(t.left,e)&&dCt(t.right,e)},uCt[q.TRUE]=function(){return!0},uCt[q.COLLECTION]=function(t,e){return t.value.has(e)},uCt[q.FILTER]=function(t,e){return(0,t.value)(e)},MAt=Ae(function(t){var e,n=this;return 1===n.length&&1===n[0].checks.length&&n[0].checks[0].type===q.ID?t.getElementById(n[0].checks[0].value).collection():(e=Ae(function(t){for(var e=0;e<n.length;e++){var r=n[e];if(dCt(r,t))return!0}return!1},"selectorFunction"),null==n.text()&&(e=Ae(function(){return!0},"selectorFunction")),t.filter(e))},"filter"),jAt=Ae(function(t){for(var e=0;e<this.length;e++){var r=this[e];if(dCt(r,t))return!0}return!1},"matches"),OAt={matches:jAt,filter:MAt},pCt=Ae(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:q.COLLECTION,value:t.collection()}]}):Bkt(t)?this.addQuery({checks:[{type:q.FILTER,value:t}]}):Pkt(t)?this.parse(t)||(this.invalid=!0):pTt("A selector must be created from a string; found "))},"Selector"),gCt=pCt.prototype,[Y,OAt].forEach(function(t){return l7t(gCt,t)}),gCt.text=function(){return this.inputText},gCt.size=function(){return this.length},gCt.eq=function(t){return this[t]},gCt.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},gCt.addQuery=function(t){this[this.length++]=t},gCt.selector=gCt.toString,(dAt={allAre:Ae(function(t){var e=new pCt(t);return this.every(function(t){return e.matches(t)})},"allAre"),is:Ae(function(t){var e=new pCt(t);return this.some(function(t){return e.matches(t)})},"is"),some:Ae(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:Ae(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:Ae(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:Ae(function(e){return e=this.cy().collection(e),this.some(function(t){return e.hasElementWithId(t.id())})},"anySame"),allAreNeighbors:Ae(function(t){t=this.cy().collection(t);var e=this.neighborhood();return t.every(function(t){return e.hasElementWithId(t.id())})},"allAreNeighbors"),contains:Ae(function(t){t=this.cy().collection(t);var e=this;return t.every(function(t){return e.hasElementWithId(t.id())})},"contains")}).allAreNeighbours=dAt.allAreNeighbors,dAt.has=dAt.contains,dAt.equal=dAt.equals=dAt.same,HAt=Ae(function(o,s){return Ae(function(t,e,r,n){var i,a=t;return null==a?i="":qkt(a)&&1===a.length&&(i=a.id()),1===this.length&&i?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[s]=a[s]||[])[i=rTt(i)]||(a[i]=o.call(this,t,e,r,n)):o.call(this,t,e,r,n)},"traversalCache")},"cache"),kAt={parent:Ae(function(t){var e=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var n=0;n<this.length;n++){var i=this[n]._private.parent;i&&e.push(i)}return this.spawn(e,!0).filter(t)},"parent"),parents:Ae(function(t){for(var e=[],r=this.parent();r.nonempty();){for(var n=0;n<r.length;n++){var i=r[n];e.push(i)}r=r.parent()}return this.spawn(e,!0).filter(t)},"parents"),commonAncestors:Ae(function(t){for(var e=0;e<this.length;e++)var r=this[e].parents(),n=(n=n||r).intersect(r);return n.filter(t)},"commonAncestors"),orphans:Ae(function(t){return this.stdFilter(function(t){return t.isOrphan()}).filter(t)},"orphans"),nonorphans:Ae(function(t){return this.stdFilter(function(t){return t.isChild()}).filter(t)},"nonorphans"),children:HAt(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r]._private.children,i=0;i<n.length;i++)e.push(n[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:Ae(function(t){return this.parent().children().not(this).filter(t)},"siblings"),isParent:Ae(function(){var t=this[0];if(t)return t.isNode()&&0!==t._private.children.length},"isParent"),isChildless:Ae(function(){var t=this[0];if(t)return t.isNode()&&0===t._private.children.length},"isChildless"),isChild:Ae(function(){var t=this[0];if(t)return t.isNode()&&null!=t._private.parent},"isChild"),isOrphan:Ae(function(){var t=this[0];if(t)return t.isNode()&&null==t._private.parent},"isOrphan"),descendants:Ae(function(t){var n=[];function i(t){for(var e=0;e<t.length;e++){var r=t[e];n.push(r),r.children().nonempty()&&i(r.children())}}return Ae(i,"add"),i(this.children()),this.spawn(n,!0).filter(t)},"descendants")},Ae(Lwt,"forEachCompound"),Ae(Nwt,"addChildren"),kAt.forEachDown=function(t){return Lwt(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],Nwt)},Ae(Iwt,"addParent"),kAt.forEachUp=function(t){return Lwt(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],Iwt)},Ae(Mwt,"addParentAndChildren"),kAt.forEachUpAndDown=function(t){return Lwt(this,t,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],Mwt)},kAt.ancestors=kAt.parents,(RAt=j={data:X_t.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:X_t.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:X_t.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:X_t.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:X_t.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:X_t.removeData({field:"rscratch",triggerEvent:!1}),id:Ae(function(){var t=this[0];if(t)return t._private.data.id},"id")}).attr=RAt.data,RAt.removeAttr=RAt.removeData,EAt=j,BAt={},Ae(Rwt,"defineDegreeFunction"),l7t(BAt,{degree:Rwt(function(t,e){return e.source().same(e.target())?2:1}),indegree:Rwt(function(t,e){return e.target().same(t)?1:0}),outdegree:Rwt(function(t,e){return e.source().same(t)?1:0})}),Ae(Dwt,"defineDegreeBoundsFunction"),l7t(BAt,{minDegree:Dwt("degree",function(t,e){return t<e}),maxDegree:Dwt("degree",function(t,e){return e<t}),minIndegree:Dwt("indegree",function(t,e){return t<e}),maxIndegree:Dwt("indegree",function(t,e){return e<t}),minOutdegree:Dwt("outdegree",function(t,e){return t<e}),maxOutdegree:Dwt("outdegree",function(t,e){return e<t})}),l7t(BAt,{totalDegree:Ae(function(t){for(var e=0,r=this.nodes(),n=0;n<r.length;n++)e+=r[n].degree(t);return e},"totalDegree")}),fCt=Ae(function(t,e,r){for(var n=0;n<t.length;n++){var i,a=t[n];a.locked()||(i=a._private.position,i={x:null!=e.x?e.x-i.x:0,y:null!=e.y?e.y-i.y:0},!a.isParent()||0===i.x&&0===i.y||a.children().shift(i,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:Ae(function(t){t.updateCompoundBounds()},"beforeGet"),beforeSet:Ae(function(t,e){fCt(t,e,!1)},"beforeSet"),onSet:Ae(function(t){t.dirtyCompoundBoundsCache()},"onSet"),canSet:Ae(function(t){return!t.locked()},"canSet")},(gAt=H={position:X_t.data(DAt),silentPosition:X_t.data(l7t({},DAt,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:Ae(function(t,e){fCt(t,e,!0)},"beforeSet"),onSet:Ae(function(t){t.dirtyCompoundBoundsCache()},"onSet")})),positions:Ae(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 n=0;n<this.length;n++){var i,a=this[n];(i=r(a,n))&&(e?a.silentPosition(i):a.position(i))}t.endBatch()}return this},"positions"),silentPositions:Ae(function(t){return this.positions(t,!0)},"silentPositions"),shift:Ae(function(t,e,r){var n;if($kt(t)?(n={x:it(t.x)?t.x:0,y:it(t.y)?t.y:0},r=e):Pkt(t)&&it(e)&&((n={x:0,y:0})[t]=e),null!=n){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var o,s=this[a];i.hasCompoundNodes()&&s.isChild()&&s.ancestors().anySame(this)||(o={x:(o=s.position()).x+n.x,y:o.y+n.y},r?s.silentPosition(o):s.position(o))}i.endBatch()}return this},"shift"),silentShift:Ae(function(t,e){return $kt(t)?this.shift(t,!0):Pkt(t)&&it(e)&&this.shift(t,e,!0),this},"silentShift"),renderedPosition:Ae(function(t,e){var r=this[0],n=(o=this.cy()).zoom(),i=o.pan(),a=$kt(t)?t:void 0,o=void 0!==a||void 0!==e&&Pkt(t);if(r&&r.isNode()){if(!o)return r=r.position(),a=$Tt(r,n,i),void 0===t?a:a[t];for(var s=0;s<this.length;s++){var l=this[s];void 0!==e?l.position(t,(e-i[t])/n):void 0!==a&&l.position(zTt(a,n,i))}}else if(!o)return;return this},"renderedPosition"),relativePosition:Ae(function(t,e){var r,n=this[0],i=this.cy(),a=$kt(t)?t:void 0,o=void 0!==a||void 0!==e&&Pkt(t),s=i.hasCompoundNodes();if(n&&n.isNode()){if(!o)return i=n.position(),(r=(n=s?n.parent():null)&&0<n.length)&&(n=n[0]),r=r?n.position():{x:0,y:0},a={x:i.x-r.x,y:i.y-r.y},void 0===t?a:a[t];for(var l=0;l<this.length;l++){var c=this[l],h=s?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(!o)return;return this},"relativePosition")}).modelPosition=gAt.point=gAt.position,gAt.modelPositions=gAt.points=gAt.positions,gAt.renderedPoint=gAt.renderedPosition,gAt.relativePoint=gAt.relativePosition,YAt=H,zSt=IAt={renderedBoundingBox:function(t){var t=this.boundingBox(t),e=(r=this.cy()).zoom(),r=r.pan(),n=t.x1*e+r.x,i=t.x2*e+r.x,a=t.y1*e+r.y;return{x1:n,x2:i,y1:a,y2:t=t.y2*e+r.y,w:i-n,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())){Ae(a,"update");for(var r=0;r<this.length;r++){var n=this[r],i=n._private;i.compoundBoundsClean&&!t||(a(n),e.batching())||(i.compoundBoundsClean=!0)}}return this;function a(t){var e,r,n,i,a,o,s,l;function c(t,e,r){var n=0,i=0,a=e+r;return 0<t&&0<a&&(n=e/a*t,i=r/a*t),{biasDiff:n,biasComplementDiff:i}}function h(t,e,r,n){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(n){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,n=t.children(),i="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")}},n=n.boundingBox({includeLabels:i,includeOverlays:!1,useCache:!1}),i=e.position,0!==n.w&&0!==n.h||((n={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=i.x-n.w/2,n.x2=i.x+n.w/2,n.y1=i.y-n.h/2,n.y2=i.y+n.h/2),Ae(c,"computeBiasValues"),Ae(h,"computePaddingValues"),o=r.width.left.value,"px"===r.width.left.units&&0<r.width.val&&(o=100*o/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),s=r.height.bottom.value,"px"===r.height.bottom.units&&0<r.height.val&&(s=100*s/r.height.val),a=(o=c(r.width.val-n.w,o,a)).biasDiff,o=o.biasComplementDiff,s=(l=c(r.height.val-n.h,l,s)).biasDiff,l=l.biasComplementDiff,e.autoPadding=h(n.w,n.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(n.w,r.width.val),i.x=(-a+n.x1+n.x2+o)/2,e.autoHeight=Math.max(n.h,r.height.val),i.y=(-s+n.y1+n.y2+l)/2)}}},mCt=Ae(function(t){return t===1/0||t===-1/0?0:t},"noninf"),yCt=Ae(function(t,e,r,n,i){n-e!=0&&i-r!=0&&null!=e&&null!=r&&null!=n&&null!=i&&(t.x1=e<t.x1?e:t.x1,t.x2=n>t.x2?n:t.x2,t.y1=r<t.y1?r:t.y1,t.y2=i>t.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},"updateBounds"),vCt=Ae(function(t,e){return null==e?t:yCt(t,e.x1,e.y1,e.x2,e.y2)},"updateBoundsFromBox"),xCt=Ae(function(t,e,r){return _Tt(t,e,r)},"prefixedProperty"),bCt=Ae(function(t,e,r){var n,i,a,o;e.cy().headless()||(n=(a=(o=e._private).rstyle).arrowWidth/2,"none"!==e.pstyle(r+"-arrow-shape").value&&(e="source"===r?(i=a.srcX,a.srcY):"target"===r?(i=a.tgtX,a.tgtY):(i=a.midX,a.midY),(o=(a=o.arrowBounds=o.arrowBounds||{})[r]=a[r]||{}).x1=i-n,o.y1=e-n,o.x2=i+n,o.y2=e+n,o.w=o.x2-o.x1,o.h=o.y2-o.y1,c8t(o,1),yCt(t,o.x1,o.y1,o.x2,o.y2)))},"updateBoundsFromArrow"),wCt=Ae(function(t,e,r){if(!e.cy().headless()){var n=e._private,i=n.rstyle;if(e.pstyle((p=r?r+"-":"")+"label").strValue){var a=e.pstyle("text-halign"),o=e.pstyle("text-valign"),s=xCt(i,"labelWidth",r),l=xCt(i,"labelHeight",r),c=xCt(i,"labelX",r),h=xCt(i,"labelY",r),i=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=s,v=y/2,x=m/2;if(d)E=c-v,_=c+v,C=h-x,S=h+x;else{switch(a.value){case"left":E=c-y,_=c;break;case"center":E=c-v,_=c+v;break;case"right":_=(E=c)+y}switch(o.value){case"top":C=h-m,S=h;break;case"center":C=h-x,S=h+x;break;case"bottom":S=(C=h)+m}}if(E+=i-Math.max(g,f)-e-2,_+=i+Math.max(g,f)+e+2,C+=u-Math.max(g,f)-e-2,S+=u+Math.max(g,f)+e+2,(i=(s=n.labelBounds)[l=r||"main"]=s[l]||{}).x1=E,i.y1=C,i.x2=_,i.y2=S,i.w=_-E,i.h=S-C,u=d&&"autorotate"===p.strValue,g=null!=p.pfValue&&0!==p.pfValue,u||g){var f=u?xCt(n.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(f),w=Math.sin(f),k=(E+_)/2,T=(C+S)/2;if(!d){switch(a.value){case"left":k=_;break;case"right":k=E}switch(o.value){case"top":T=S;break;case"bottom":T=C}}var i=(e=Ae(function(t,e){return{x:(t-=k)*b-(e-=T)*w+k,y:t*w+e*b+T}},"rotate"))(E,C),g=e(E,S),u=e(_,C),r=e(_,S),E=Math.min(i.x,g.x,u.x,r.x),_=Math.max(i.x,g.x,u.x,r.x),C=Math.min(i.y,g.y,u.y,r.y),S=Math.max(i.y,g.y,u.y,r.y)}(f=s[p=l+"Rot"]=s[p]||{}).x1=E,f.y1=C,f.x2=_,f.y2=S,f.w=_-E,f.h=S-C,yCt(t,E,C,_,S),yCt(n.labelBounds.all,E,C,_,S)}return t}},"updateBoundsFromLabel"),kCt=Ae(function(t,e){var r,n,i,a;e.cy().headless()||(r=e.pstyle("outline-opacity").value,i=e.pstyle("outline-width").value,0<r&&0<i&&(r=e.pstyle("outline-offset").value,e=e.pstyle("shape").value,r=(t.w+2*(i+=r))/t.w,a=(t.h+2*i)/t.h,n=0,["diamond","pentagon","round-triangle"].includes(e)?(r=(t.w+2.4*i)/t.w,n=-i/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(e)?r=(t.w+2.4*i)/t.w:"star"===e?(r=(t.w+2.8*i)/t.w,a=(t.h+2.6*i)/t.h,n=-i/3.8):"triangle"===e?(r=(t.w+2.8*i)/t.w,a=(t.h+2.4*i)/t.h,n=-i/1.4):"vee"===e&&(r=(t.w+4.4*i)/t.w,a=(t.h+3.8*i)/t.h,n=.5*-i),e=t.h*a-t.h,i=t.w*r-t.w,h8t(t,[Math.ceil(e/2),Math.ceil(i/2)]),0!==n)&&(a=o8t(t,0,n),s8t(t,a)))},"updateBoundsFromOutline"),TCt=Ae(function(t,e){var r=(n=t._private.cy).styleEnabled(),n=n.headless(),i=n8t(),a=t._private,o=t.isNode(),s=t.isEdge(),l=a.rstyle,c=o&&r?t.pstyle("bounds-expansion").pfValue:[0],h=Ae(function(t){return"none"!==t.pstyle("display").value},"isDisplayed");if(h=!r||h(t)&&(!s||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),o&&e.includeNodes){var o=(d=t.position()).x,d=d.y,g=t.outerWidth()/2,f=t.outerHeight()/2;yCt(i,y=o-g,x=d-f,v=o+g,b=d+f),r&&e.includeOutlines&&kCt(i,t)}else if(s&&e.includeEdges)if(r&&!n){var m,o=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(yCt(i,y-=p,x-=p,v+=p,b+=p),"haystack"===o)(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),yCt(i,y-p,x-p,v+p,b+p));else if("bezier"===o||"unbundled-bezier"===o||o.endsWith("segments")||o.endsWith("taxi")){switch(o){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=k.x+p,x=k.y-p,b=k.y+p;yCt(i,y,x,v,b)}}}else n=t.source().position(),d=t.target().position(),y=n.x,v=d.x,x=n.y,v<y&&(g=y,y=v,v=g),(b=d.y)<x&&(f=x,x=b,b=f),yCt(i,y-=p,x-=p,v+=p,b+=p);r&&e.includeEdges&&s&&(bCt(i,t,"mid-source"),bCt(i,t,"mid-target"),bCt(i,t,"source"),bCt(i,t,"target")),r&&"yes"===t.pstyle("ghost").value&&(o=t.pstyle("ghost-offset-x").pfValue,n=t.pstyle("ghost-offset-y").pfValue,yCt(i,i.x1+o,i.y1+n,i.x2+o,i.y2+n)),g=a.bodyBounds=a.bodyBounds||{},u8t(g,i),h8t(g,c),c8t(g,1),r&&(y=i.x1,v=i.x2,x=i.y1,b=i.y2,yCt(i,y-u,x-u,v+u,b+u)),d=a.overlayBounds=a.overlayBounds||{},u8t(d,i),h8t(d,c),c8t(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?a8t(f.all):f.all=n8t(),r&&e.includeLabels&&(e.includeMainLabels&&wCt(i,t,null),s)&&(e.includeSourceLabels&&wCt(i,t,"source"),e.includeTargetLabels)&&wCt(i,t,"target")}return i.x1=mCt(i.x1),i.y1=mCt(i.y1),i.x2=mCt(i.x2),i.y2=mCt(i.y2),i.w=mCt(i.x2-i.x1),i.h=mCt(i.y2-i.y1),0<i.w&&0<i.h&&h&&(h8t(i,c),c8t(i,1)),i},"boundingBoxImpl"),ECt=Ae(function(t){var e=0,r=Ae(function(t){return(t?1:0)<<e++},"tf"),n=0;return(n+=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"),_Ct=Ae(function(t){var e,r;return t.isEdge()?(e=t.source().position(),t=t.target().position(),r=Ae(function(t){return Math.round(t)},"r"),eTt([r(e.x),r(e.y),r(t.x),r(t.y)])):0},"getBoundingBoxPosKey"),CCt=Ae(function(t,e){var r,n=t._private,i=t.isEdge(),a=(null==e?ACt:ECt(e))===ACt,o=_Ct(t),s=n.bbCachePosKey===o,l=e.useCache&&s,c=Ae(function(t){return null==t._private.bbCache||t._private.styleDirty},"isDirty");return!l||c(t)||i&&c(t.source())||c(t.target())?(s||t.recalculateRenderedStyle(l),r=TCt(t,SCt),n.bbCache=r,n.bbCachePosKey=o):r=n.bbCache,a||(c=t.isNode(),r=n8t(),(e.includeNodes&&c||e.includeEdges&&!c)&&(e.includeOverlays?vCt(r,n.overlayBounds):vCt(r,n.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?vCt(r,n.labelBounds.all):(e.includeMainLabels&&vCt(r,n.labelBounds.mainRot),e.includeSourceLabels&&vCt(r,n.labelBounds.sourceRot),e.includeTargetLabels&&vCt(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),ACt=ECt(SCt={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),LCt=JAt(SCt),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=LCt(t=t||SCt);if(this.cy().styleEnabled())for(var n=0;n<this.length;n++){var i=this[n],a=i._private,o=_Ct(i),o=a.bbCachePosKey===o,o=r.useCache&&o&&!a.styleDirty;i.recalculateRenderedStyle(o)}this.updateCompoundBounds(!t.useCache);for(var s=0;s<this.length;s++){var l=this[s];vCt(e,CCt(l,r))}}else t=void 0===t?SCt:LCt(t),e=CCt(this[0],t);return e.x1=mCt(e.x1),e.y1=mCt(e.y1),e.x2=mCt(e.x2),e.y2=mCt(e.y2),e.w=mCt(e.x2-e.x1),e.h=mCt(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(),n=this.cy(),i=n.hasCompoundNodes(),a=n.collection(),o=(i&&(a=e.filter(function(t){return t.isParent()}),e=e.not(a)),$kt(r)&&(t=r,r=Ae(function(){return t},"fn")),Ae(function(t,e){return t._private.bbAtOldPos=r(t,e)},"storeOldPos")),s=Ae(function(t){return t._private.bbAtOldPos},"getOldPos"),o=(n.startBatch(),e.forEach(o).silentPositions(r),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),i8t(this.boundingBox({useCache:!1})));return e.silentPositions(s),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),n.endBatch(),o},zSt.boundingbox=zSt.bb=zSt.boundingBox,zSt.renderedBoundingbox=zSt.renderedBoundingBox,jAt=IAt,NCt=MAt={},(Y=Ae(function(n){n.uppercaseName=i7t(n.name),n.autoName="auto"+n.uppercaseName,n.labelName="label"+n.uppercaseName,n.outerName="outer"+n.uppercaseName,n.uppercaseOuterName=i7t(n.outerName),NCt[n.name]=Ae(function(){var t=this[0],e=t._private,r=e.cy._private.styleEnabled;if(t)return r?t.isParent()?(t.updateCompoundBounds(),e[n.autoName]||0):"label"!==(r=t.pstyle(n.name)).strValue?r.pfValue:(t.recalculateRenderedStyle(),e.rstyle[n.labelName]||0):1},"dimImpl"),NCt["outer"+n.uppercaseName]=Ae(function(){var t=this[0],e=t._private.cy._private.styleEnabled;if(t)return e?t[n.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},"outerDimImpl"),NCt["rendered"+n.uppercaseName]=Ae(function(){var t=this[0];if(t)return t[n.name]()*this.cy().zoom()},"renderedDimImpl"),NCt["rendered"+n.uppercaseOuterName]=Ae(function(){var t=this[0];if(t)return t[n.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),Y({name:"height"}),MAt.padding=function(){var t=this[0],e=t._private;return t.isParent()&&(t.updateCompoundBounds(),void 0!==e.autoPadding)?e.autoPadding:t.pstyle("padding").pfValue},MAt.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},MAt.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()},OAt=MAt,ICt=Ae(function(t,e){if(t.isEdge())return e(t)},"ifEdge"),MCt=Ae(function(t,e){var r;if(t.isEdge())return r=t.cy(),$Tt(e(t),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),RCt=Ae(function(t,e){var r,n,i;if(t.isEdge())return r=t.cy(),n=r.pan(),i=r.zoom(),e(t).map(function(t){return $Tt(t,i,n)})},"ifEdgeRenderedPositions"),RAt=Ae(function(t){return t.renderer().getControlPoints(t)},"controlPoints"),j=Ae(function(t){return t.renderer().getSegmentPoints(t)},"segmentPoints"),DAt=Ae(function(t){return t.renderer().getSourceEndpoint(t)},"sourceEndpoint"),gAt=Ae(function(t){return t.renderer().getTargetEndpoint(t)},"targetEndpoint"),H=Ae(function(t){return t.renderer().getEdgeMidpoint(t)},"midpoint"),DCt={controlPoints:{get:RAt,mult:!0},segmentPoints:{get:j,mult:!0},sourceEndpoint:{get:DAt},targetEndpoint:{get:gAt},midpoint:{get:H}},OCt=Ae(function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)},"renderedName"),zSt=Object.keys(DCt).reduce(function(t,e){var r=DCt[e],n=OCt(e);return t[e]=function(){return ICt(this,r.get)},r.mult?t[n]=function(){return RCt(this,r.get)}:t[n]=function(){return MCt(this,r.get)},t},{}),IAt=l7t({},YAt,jAt,OAt,zSt),PCt=Ae(function(t,e){this.recycle(t,e)},"Event"),Ae(Owt,"returnFalse"),Ae(Pwt,"returnTrue"),PCt.prototype={instanceString:Ae(function(){return"event"},"instanceString"),recycle:Ae(function(t,e){var r,n;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Owt,null!=t&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?Pwt:Owt):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(),n=this.cy.pan(),this.renderedPosition={x:e.x*r+n.x,y:e.y*r+n.y}),this.timeStamp=t&&t.timeStamp||Date.now()},"recycle"),preventDefault:Ae(function(){this.isDefaultPrevented=Pwt;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},"preventDefault"),stopPropagation:Ae(function(){this.isPropagationStopped=Pwt;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},"stopPropagation"),stopImmediatePropagation:Ae(function(){this.isImmediatePropagationStopped=Pwt,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:Owt,isPropagationStopped:Owt,isImmediatePropagationStopped:Owt},BCt=/^([^.]+)(\.(?:[^.]+))?$/,FCt={qualifierCompare:Ae(function(t,e){return t===e},"qualifierCompare"),eventMatches:Ae(function(){return!0},"eventMatches"),addEventFields:Ae(function(){},"addEventFields"),callbackContext:Ae(function(t){return t},"callbackContext"),beforeEmit:Ae(function(){},"beforeEmit"),afterEmit:Ae(function(){},"afterEmit"),bubble:Ae(function(){return!1},"bubble"),parent:Ae(function(){return null},"parent"),context:null},$Ct=Object.keys(FCt),zCt={},Ae(Bwt,"Emitter"),Y=Bwt.prototype,GCt=Ae(function(t,e,r,n,i,a,o){Bkt(n)&&(i=n,n=null),o&&(a=null==a?o:l7t({},a,o));for(var s=Fkt(r)?r:r.split(/\s+/),l=0;l<s.length;l++){var c=s[l];if(!Xkt(c)){var h=c.match(BCt);if(h&&!1===e(t,c,h[1],h[2]||null,n,i,a))break}}},"forEachEvent"),UCt=Ae(function(t,e){return t.addEventFields(t.context,e),new PCt(e.type,e)},"makeEventObj"),qCt=Ae(function(t,e,r){if(Vkt(r))e(t,r);else if($kt(r))e(t,UCt(t,r));else for(var n=Fkt(r)?r:r.split(/\s+/),i=0;i<n.length;i++){var a,o=n[i];Xkt(o)||(o=o.match(BCt))&&(a=o[1],o=o[2]||null,e(t,UCt(t,{type:a,namespace:o,target:t.context})))}},"forEachEventObj"),Y.on=Y.addListener=function(t,e,r,n,i){return GCt(this,function(t,e,r,n,i,a,o){Bkt(a)&&t.listeners.push({event:e,callback:a,type:r,namespace:n,qualifier:i,conf:o})},t,e,r,n,i),this},Y.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},Y.removeListener=Y.off=function(l,t,e,r){var n=this;0!==this.emitting&&(this.listeners=vTt(this.listeners));for(var c=this.listeners,i=Ae(function(o){var s=c[o];GCt(n,function(t,e,r,n,i,a){if((s.type===r||"*"===l)&&(!n&&".*"!==s.namespace||s.namespace===n)&&(!i||t.qualifierCompare(s.qualifier,i))&&(!a||s.callback===a))return c.splice(o,1),!1},l,t,e,r)},"_loop"),a=c.length-1;0<=a;a--)i(a);return this},Y.removeAllListeners=function(){return this.removeListener("*")},Y.emit=Y.trigger=function(t,a,r){var o=this.listeners,s=o.length;return this.emitting++,Fkt(a)||(a=[a]),qCt(this,function(n,i){null!=r&&(o=[{event:i.event,type:i.type,namespace:i.namespace,callback:r}],s=o.length);for(var t=Ae(function(t){var e,r=o[t];r.type!==i.type||r.namespace&&r.namespace!==i.namespace&&".*"!==r.namespace||!n.eventMatches(n.context,r,i)||(t=[i],null!=a&&ETt(t,a),n.beforeEmit(n.context,r,i),r.conf&&r.conf.one&&(n.listeners=n.listeners.filter(function(t){return t!==r})),e=n.callbackContext(n.context,r,i),e=r.callback.apply(e,t),n.afterEmit(n.context,r,i),!1===e&&(i.stopPropagation(),i.preventDefault()))},"_loop2"),e=0;e<s;e++)t(e);n.bubble(n.context)&&!i.isPropagationStopped()&&n.parent(n.context).emit(i,a)},t),this.emitting--,this},YCt={qualifierCompare:Ae(function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},"qualifierCompare"),eventMatches:Ae(function(t,e,r){return null==(e=e.qualifier)||t!==r.target&&Ykt(r.target)&&e.matches(r.target)},"eventMatches"),addEventFields:Ae(function(t,e){e.cy=t.cy(),e.target=t},"addEventFields"),callbackContext:Ae(function(t,e,r){return null!=e.qualifier?r.target:t},"callbackContext"),beforeEmit:Ae(function(t,e){e.conf&&e.conf.once&&e.conf.onceCollection.removeListener(e.event,e.qualifier,e.callback)},"beforeEmit"),bubble:Ae(function(){return!0},"bubble"),parent:Ae(function(t){return t.isChild()?t.parent():t.cy()},"parent")},jCt=Ae(function(t){return Pkt(t)?new pCt(t):t},"argSelector"),MAt={createEmitter:Ae(function(){for(var t=0;t<this.length;t++){var e=this[t],r=e._private;r.emitter||(r.emitter=new Bwt(YCt,e))}return this},"createEmitter"),emitter:Ae(function(){return this._private.emitter},"emitter"),on:Ae(function(t,e,r){for(var n=jCt(e),i=0;i<this.length;i++)this[i].emitter().on(t,n,r);return this},"on"),removeListener:Ae(function(t,e,r){for(var n=jCt(e),i=0;i<this.length;i++)this[i].emitter().removeListener(t,n,r);return this},"removeListener"),removeAllListeners:Ae(function(){for(var t=0;t<this.length;t++)this[t].emitter().removeAllListeners();return this},"removeAllListeners"),one:Ae(function(t,e,r){for(var n=jCt(e),i=0;i<this.length;i++)this[i].emitter().one(t,n,r);return this},"one"),once:Ae(function(t,e,r){for(var n=jCt(e),i=0;i<this.length;i++)this[i].emitter().on(t,n,r,{once:!0,onceCollection:this})},"once"),emit:Ae(function(t,e){for(var r=0;r<this.length;r++)this[r].emitter().emit(t,e);return this},"emit"),emitAndNotify:Ae(function(t,e){if(0!==this.length)return this.cy().notify(t,this),this.emit(t,e),this},"emitAndNotify")},X_t.eventAliasesOn(MAt),RAt={nodes:Ae(function(t){return this.filter(function(t){return t.isNode()}).filter(t)},"nodes"),edges:Ae(function(t){return this.filter(function(t){return t.isEdge()}).filter(t)},"edges"),byGroup:Ae(function(){for(var t=this.spawn(),e=this.spawn(),r=0;r<this.length;r++){var n=this[r];(n.isNode()?t:e).push(n)}return{nodes:t,edges:e}},"byGroup"),filter:Ae(function(t,e){if(void 0===t)return this;if(Pkt(t)||qkt(t))return new pCt(t).filter(this);if(Bkt(t)){for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n];(e?t.apply(e,[i,n,this]):t(i,n,this))&&r.push(i)}return r}return this.spawn()},"filter"),not:Ae(function(t){if(t){Pkt(t)&&(t=this.filter(t));for(var e=this.spawn(),r=0;r<this.length;r++){var n=this[r];t.has(n)||e.push(n)}return e}return this},"not"),absoluteComplement:Ae(function(){return this.cy().mutableElements().not(this)},"absoluteComplement"),intersect:Ae(function(t){if(Pkt(t))return this.filter(t);for(var e=this.spawn(),r=this.length<t.length,n=r?this:t,i=r?t:this,a=0;a<n.length;a++){var o=n[a];i.has(o)&&e.push(o)}return e},"intersect"),xor:Ae(function(t){var e=this._private.cy,a=(Pkt(t)&&(t=e.$(t)),this.spawn()),e=t;return(t=Ae(function(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=n._private.data.id;e.hasElementWithId(i)||a.push(n)}},"add"))(this,e),t(e,this),a},"xor"),diff:Ae(function(t){var e=this._private.cy,e=(Pkt(t)&&(t=e.$(t)),this.spawn()),r=this.spawn(),o=this.spawn(),n=Ae(function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n],a=i._private.data.id;e.hasElementWithId(a)?o.merge(i):r.push(i)}},"add");return n(this,t,e),n(t,this,r),{left:e,right:r,both:o}},"diff"),add:Ae(function(t){var e,r=this._private.cy;if(!t)return this;Pkt(t)&&(e=t,t=r.mutableElements().filter(e));for(var n=this.spawnSelf(),i=0;i<t.length;i++){var a=t[i];this.has(a)||n.push(a)}return n},"add"),merge:Ae(function(t){var e,r=this._private,n=r.cy;if(t){Pkt(t)&&(e=t,t=n.mutableElements().filter(e));for(var i=r.map,a=0;a<t.length;a++){var o,s=t[a],l=s._private.data.id;i.has(l)||(o=this.length++,this[o]=s,i.set(l,{ele:s,index:o}))}}return this},"merge"),unmergeAt:Ae(function(t){var e,r,n=this[t].id(),i=this._private.map,n=(this[t]=void 0,i.delete(n),t===this.length-1);return 1<this.length&&!n&&(r=(e=this[n=this.length-1])._private.data.id,this[n]=void 0,this[t]=e,i.set(r,{ele:e,index:t})),this.length--,this},"unmergeAt"),unmergeOne:Ae(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:Ae(function(t){var e,r=this._private.cy;if(t){Pkt(t)&&(e=t,t=r.mutableElements().filter(e));for(var n=0;n<t.length;n++)this.unmergeOne(t[n])}return this},"unmerge"),unmergeBy:Ae(function(t){for(var e=this.length-1;0<=e;e--)t(this[e])&&this.unmergeAt(e);return this},"unmergeBy"),map:Ae(function(t,e){for(var r=[],n=0;n<this.length;n++){var i=this[n],i=e?t.apply(e,[i,n,this]):t(i,n,this);r.push(i)}return r},"map"),reduce:Ae(function(t,e){for(var r=e,n=0;n<this.length;n++)r=t(r,this[n],n,this);return r},"reduce"),max:Ae(function(t,e){for(var r,n=-1/0,i=0;i<this.length;i++){var a=this[i],o=e?t.apply(e,[a,i,this]):t(a,i,this);n<o&&(n=o,r=a)}return{value:n,ele:r}},"max"),min:Ae(function(t,e){for(var r,n=1/0,i=0;i<this.length;i++){var a=this[i],o=e?t.apply(e,[a,i,this]):t(a,i,this);o<n&&(n=o,r=a)}return{value:n,ele:r}},"min")},(j=RAt).u=j["|"]=j["+"]=j.union=j.or=j.add,j["\\"]=j["!"]=j["-"]=j.difference=j.relativeComplement=j.subtract=j.not,j.n=j["&"]=j["."]=j.and=j.intersection=j.intersect,j["^"]=j["(+)"]=j["(-)"]=j.symmetricDifference=j.symdiff=j.xor,j.fnFilter=j.filterFn=j.stdFilter=j.filter,j.complement=j.abscomp=j.absoluteComplement,DAt={isNode:Ae(function(){return"nodes"===this.group()},"isNode"),isEdge:Ae(function(){return"edges"===this.group()},"isEdge"),isLoop:Ae(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:Ae(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:Ae(function(){var t=this[0];if(t)return t._private.group},"group")},HCt=Ae(function(t,e){var r=t.cy().hasCompoundNodes();function n(t){var e=t.pstyle("z-compound-depth");return"auto"===e.value?r?t.zDepth():0:"bottom"===e.value?-1:"top"===e.value?lTt:0}Ae(n,"getDepth");var i=n(t)-n(e);return 0!=i||(Ae(a,"getEleDepth"),0!=(i=a(t)-a(e)))||0!=(i=t.pstyle("z-index").value-e.pstyle("z-index").value)?i:t.poolIndex()-e.poolIndex();function a(t){return"auto"===t.pstyle("z-index-compare").value&&t.isNode()?1:0}},"zIndexSort"),(WCt={forEach:Ae(function(t,e){if(Bkt(t))for(var r=this.length,n=0;n<r;n++){var i=this[n];if(!1===(e?t.apply(e,[i,n,this]):t(i,n,this)))break}return this},"forEach"),toArray:Ae(function(){for(var t=[],e=0;e<this.length;e++)t.push(this[e]);return t},"toArray"),slice:Ae(function(t,e){var r=[],n=this.length;(e=null==e?n:e)<0&&(e=n+e);for(var i=t=(t=null==t?0:t)<0?n+t:t;0<=i&&i<e&&i<n;i++)r.push(this[i]);return this.spawn(r)},"slice"),size:Ae(function(){return this.length},"size"),eq:Ae(function(t){return this[t]||this.spawn()},"eq"),first:Ae(function(){return this[0]||this.spawn()},"first"),last:Ae(function(){return this[this.length-1]||this.spawn()},"last"),empty:Ae(function(){return 0===this.length},"empty"),nonempty:Ae(function(){return!this.empty()},"nonempty"),sort:Ae(function(t){return Bkt(t)?(t=this.toArray().sort(t),this.spawn(t)):this},"sort"),sortByZIndex:Ae(function(){return this.sort(HCt)},"sortByZIndex"),zDepth:Ae(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:lTt-1):(r=e.source,t=e.target,e=r.zDepth(),r=t.zDepth(),Math.max(e,r,0))},"zDepth")}).each=WCt.forEach,Ae(function(){"undefined"!=("u"<typeof Symbol?"undefined":g6t(Symbol))&&"undefined"!=g6t(Symbol.iterator)&&(WCt[Symbol.iterator]=function(){var t=this,e={value:void 0,done:!1},r=0,n=this.length;return v6t({next:Ae(function(){return r<n?e.value=t[r++]:(e.value=void 0,e.done=!0),e},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),VCt=JAt({nodeDimensionsIncludeLabels:!1}),(gAt={layoutDimensions:Ae(function(t){return t=VCt(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:Ae(function(t,n,e){var i=this.nodes().filter(function(t){return!t.isParent()}),r=this.cy(),a=n.eles,o=Ae(function(t){return t.id()},"getMemoizeKey"),s=t7t(e,o),l=(t.emit({type:"layoutstart",layout:t}),t.animations=[],Ae(function(t,e,r){var n=e.x1+e.w/2,e=e.y1+e.h/2;return{x:n+(r.x-n)*t,y:e+(r.y-e)*t}},"calculateSpacing")),c=n.spacingFactor&&1!==n.spacingFactor,h=Ae(function(){if(!c)return null;for(var t=n8t(),e=0;e<i.length;e++){var r=i[e],r=s(r,e);l8t(t,r.x,r.y)}return t},"spacingBb")(),u=t7t(function(t,e){var r,e=s(t,e);return c&&(r=Math.abs(n.spacingFactor),e=l(r,h,e)),null!=n.transform?n.transform(t,e):e},o);if(n.animate){for(var d=0;d<i.length;d++){var p,g=i[d],f=u(g,d);null==n.animateFilter||n.animateFilter(g,d)?(p=g.animation({position:f,duration:n.animationDuration,easing:n.animationEasing}),t.animations.push(p)):g.position(f)}n.fit?(e=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:n.padding},duration:n.animationDuration,easing:n.animationEasing}),t.animations.push(e)):void 0!==n.zoom&&void 0!==n.pan&&(o=r.animation({zoom:n.zoom,pan:n.pan,duration:n.animationDuration,easing:n.animationEasing}),t.animations.push(o)),t.animations.forEach(function(t){return t.play()}),t.one("layoutready",n.ready),t.emit({type:"layoutready",layout:t}),ZEt.all(t.animations.map(function(t){return t.promise()})).then(function(){t.one("layoutstop",n.stop),t.emit({type:"layoutstop",layout:t})})}else i.positions(u),n.fit&&r.fit(n.eles,n.padding),null!=n.zoom&&r.zoom(n.zoom),n.pan&&r.pan(n.pan),t.one("layoutready",n.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",n.stop),t.emit({type:"layoutstop",layout:t});return this},"layoutPositions"),layout:Ae(function(t){return this.cy().makeLayout(l7t({},t,{eles:this}))},"layout")}).createLayout=gAt.makeLayout=gAt.layout,Ae(Fwt,"styleCache"),Ae($wt,"cacheStyleFunction"),Ae(zwt,"cachePrototypeStyleFunction"),H={recalculateRenderedStyle:Ae(function(t){var e=(r=this.cy()).renderer(),r=r.styleEnabled();return e&&r&&e.recalculateRenderedStyle(this,t),this},"recalculateRenderedStyle"),dirtyStyleCache:Ae(function(){var t=this.cy(),e=Ae(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:Ae(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:Ae(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:Ae(function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this[0],n=r.cy();if(n.styleEnabled()&&r)return this.cleanStyle(),r._private.style[t]??(e?n.style().getDefaultProperty(t):null)},"parsedStyle"),numericStyle:Ae(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:Ae(function(t){var e=this[0];if(e.cy().styleEnabled()&&e)return e.pstyle(t).units},"numericStyleUnits"),renderedStyle:Ae(function(t){var e,r=this.cy();return r.styleEnabled()?(e=this[0])?r.style().getRenderedStyle(e,t):void 0:this},"renderedStyle"),style:Ae(function(t,e){if((n=this.cy()).styleEnabled()){var r,n=n.style();if($kt(t))n.applyBypass(this,t,!1),this.emitAndNotify("style");else if(Pkt(t)){if(void 0===e)return(r=this[0])?n.getStylePropertyValue(r,t):void 0;n.applyBypass(this,t,e,!1),this.emitAndNotify("style")}else if(void 0===t)return(r=this[0])?n.getRawStyle(r):void 0}return this},"style"),removeStyle:Ae(function(t){var e=this.cy();if(e.styleEnabled()){var r=e.style();if(void 0===t)for(var n=0;n<this.length;n++){var i=this[n];r.removeAllBypasses(i,!1)}else{t=t.split(/\s+/);for(var a=0;a<this.length;a++){var o=this[a];r.removeBypasses(o,t,!1)}}this.emitAndNotify("style")}return this},"removeStyle"),show:Ae(function(){return this.css("display","element"),this},"show"),hide:Ae(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:Ae(function(){if(!(t=this.cy()).styleEnabled())return 1;var t=t.hasCompoundNodes(),e=this[0];if(e){var r=e._private,n=e.pstyle("opacity").value;if(t){var i=r.data.parent?e.parents():null;if(i)for(var a=0;a<i.length;a++)n*=i[a].pstyle("opacity").value}return n}},"effectiveOpacity"),transparent:Ae(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:Ae(function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding},"backgrounding")},Ae(Gwt,"checkCompound"),Ae(Uwt,"defineDerivedStateFunction"),XCt=$wt("eleTakesUpSpace",function(t){return"element"===t.pstyle("display").value&&0!==t.width()&&(!t.isNode()||0!==t.height())}),H.takesUpSpace=zwt("takesUpSpace",Uwt({ok:XCt})),YAt=$wt("eleInteractive",function(t){return"yes"===t.pstyle("events").value&&"visible"===t.pstyle("visibility").value&&XCt(t)}),jAt=$wt("parentInteractive",function(t){return"visible"===t.pstyle("visibility").value&&XCt(t)}),H.interactive=zwt("interactive",Uwt({ok:YAt,parentOk:jAt,edgeOkViaNode:XCt})),H.noninteractive=function(){var t=this[0];if(t)return!t.interactive()},OAt=$wt("eleVisible",function(t){return"visible"===t.pstyle("visibility").value&&0!==t.pstyle("opacity").pfValue&&XCt(t)}),zSt=XCt,H.visible=zwt("visible",Uwt({ok:OAt,edgeOkViaNode:zSt})),H.hidden=function(){var t=this[0];if(t)return!t.visible()},H.isBundledBezier=zwt("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),H.bypass=H.css=H.style,H.renderedCss=H.renderedStyle,H.removeBypass=H.removeCss=H.removeStyle,H.pstyle=H.parsedStyle,KCt={},Ae(qwt,"defineSwitchFunction"),Ae(Ywt,"defineSwitchSet"),Ywt({field:"locked",overrideField:Ae(function(t){return!!t.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),Ywt({field:"grabbable",overrideField:Ae(function(t){return!t.cy().autoungrabify()&&!t.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),Ywt({field:"selected",ableField:"selectable",overrideAble:Ae(function(t){return!t.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),Ywt({field:"selectable",overrideField:Ae(function(t){return!t.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),KCt.deselect=KCt.unselect,KCt.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},Ywt({field:"active",on:"activate",off:"unactivate"}),Ywt({field:"pannable",on:"panify",off:"unpanify"}),KCt.inactive=function(){var t=this[0];if(t)return!t._private.active},Y={},j=Ae(function(c){return Ae(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode()){for(var i=!1,a=n.connectedEdges(),o=0;o<a.length;o++){var s=(l=a[o]).source(),l=l.target();if(c.noIncomingEdges&&l===n&&s!==n||c.noOutgoingEdges&&s===n&&l!==n){i=!0;break}}i||e.push(n)}}return this.spawn(e,!0).filter(t)},"dagExtremityImpl")},"defineDagExtremity"),YAt=Ae(function(c){return function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n.connectedEdges(),a=0;a<i.length;a++){var o=i[a],s=o.source(),l=o.target();c.outgoing&&s===n?(e.push(o),e.push(l)):c.incoming&&l===n&&(e.push(o),e.push(s))}}return this.spawn(e,!0).filter(t)}},"defineDagOneHop"),jAt=Ae(function(c){return function(t){for(var e=this,r=[],n={};;){var i=c.outgoing?e.outgoers():e.incomers();if(0===i.length)break;for(var a=!1,o=0;o<i.length;o++){var s=i[o],l=s.id();n[l]||(n[l]=!0,r.push(s),a=!0)}if(!a)break;e=i}return this.spawn(r,!0).filter(t)}},"defineDagAllHops"),Y.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},l7t(Y,{roots:j({noIncomingEdges:!0}),leaves:j({noOutgoingEdges:!0}),outgoers:HAt(YAt({outgoing:!0}),"outgoers"),successors:jAt({outgoing:!0}),incomers:HAt(YAt({incoming:!0}),"incomers"),predecessors:jAt({incoming:!0})}),l7t(Y,{neighborhood:HAt(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),c=s.target();0<(c=i===l?c:l).length&&e.push(c[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:Ae(function(t){return this.neighborhood().add(this).filter(t)},"closedNeighborhood"),openNeighborhood:Ae(function(t){return this.neighborhood(t)},"openNeighborhood")}),Y.neighbourhood=Y.neighborhood,Y.closedNeighbourhood=Y.closedNeighborhood,Y.openNeighbourhood=Y.openNeighborhood,l7t(Y,{source:HAt(Ae(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:HAt(Ae(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:jwt({attr:"source"}),targets:jwt({attr:"target"})}),Ae(jwt,"defineSourceFunction"),l7t(Y,{edgesWith:HAt(Hwt(),"edgesWith"),edgesTo:HAt(Hwt({thisIsSrc:!0}),"edgesTo")}),Ae(Hwt,"defineEdgesWithFunction"),l7t(Y,{connectedEdges:HAt(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n._private.edges,a=0;a<i.length;a++){var o=i[a];e.push(o)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:HAt(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];n.isEdge()&&(e.push(n.source()[0]),e.push(n.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:HAt(Wwt(),"parallelEdges"),codirectedEdges:HAt(Wwt({codirected:!0}),"codirectedEdges")}),Ae(Wwt,"defineParallelEdgesFunction"),l7t(Y,{components:Ae(function(t){var r=this,n=r.cy(),i=n.collection(),a=(null==t?r:t).nodes(),o=[],s=(null!=t&&a.empty()&&(a=t.sources()),Ae(function(t,e){i.merge(t),a.unmerge(t),e.merge(t)},"visitInComponent"));if(a.empty())return r.spawn();for(var e=Ae(function(){var e=n.collection(),t=(o.push(e),a[0]);s(t,e),r.bfs({directed:!1,roots:t,visit:Ae(function(t){return s(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 o},"components"),component:Ae(function(){var t=this[0];return t.cy().mutableElements().components(t)[0]},"component")}),Y.componentsOf=Y.components,ZCt=Ae(function(t,e){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===t)pTt("A collection must have a reference to the core");else{var i=new STt,a=!1;if(e){if(0<e.length&&$kt(e[0])&&!Ykt(e[0])){for(var a=!0,o=[],s=new ATt,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=xTt();else if(t.hasElementWithId(u.id)||s.has(u.id))continue;h=new LTt(t,h,!1),o.push(h),s.add(u.id)}e=o}}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&&i.has(g)||(r&&i.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:Ae(function(){for(var t=this.lazyMap=new STt,e=this.eles,r=0;r<e.length;r++){var n=e[r];t.set(n.id(),{index:r,ele:n})}},"rebuildMap")},r&&(this._private.map=i),a&&!n&&this.restore()}},"Collection"),(QCt=LTt.prototype=ZCt.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},QCt.spawn=function(t,e){return new ZCt(this.cy(),t,e)},QCt.spawnSelf=function(){return this.spawn(this)},QCt.cy=function(){return this._private.cy},QCt.renderer=function(){return this._private.cy.renderer()},QCt.element=function(){return this[0]},QCt.collection=function(){return jkt(this)?this:new ZCt(this._private.cy,[this])},QCt.unique=function(){return new ZCt(this._private.cy,this,!0)},QCt.hasElementWithId=function(t){return this._private.map.has(t=""+t)},QCt.getElementById=function(t){var e=this._private.cy;return(t=this._private.map.get(t=""+t))?t.ele:new ZCt(e)},QCt.$id=QCt.getElementById,QCt.poolIndex=function(){var t=this._private.cy._private.elements,e=this[0]._private.data.id;return t._private.map.get(e).index},QCt.indexOf=function(t){return t=t[0]._private.data.id,this._private.map.get(t).index},QCt.indexOfId=function(t){return this._private.map.get(t=""+t).index},QCt.json=function(i){var a,t,e,r,n,o,s,l,c=this.element(),h=this.cy();return null==c&&i?this:null!=c?(a=c._private,$kt(i)?(h.startBatch(),i.data&&(c.data(i.data),t=a.data,c.isEdge()?(o=!1,e={},r=i.data.source,n=i.data.target,null!=r&&r!=t.source&&(e.source=""+r,o=!0),null!=n&&n!=t.target&&(e.target=""+n,o=!0),o&&(c=c.move(e))):(r="parent"in i.data,n=i.data.parent,!r||null==n&&null==t.parent||n==t.parent||(c=c.move({parent:n=null!=(n=void 0===n?null:n)?""+n:n})))),i.position&&c.position(i.position),(o=Ae(function(t,e,r){var n=i[t];null!=n&&n!==a[t]&&(n?c[e]():c[r]())},"checkSwitch"))("removed","remove","restore"),o("selected","select","unselect"),o("selectable","selectify","unselectify"),o("locked","lock","unlock"),o("grabbable","grabify","ungrabify"),o("pannable","panify","unpanify"),null!=i.classes&&c.classes(i.classes),h.endBatch(),this):void 0===i?((s={data:yTt(a.data),position:yTt(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 s.classes+=0==l++?t:" "+t}),s):void 0):void 0},QCt.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e].json();t.push(r)}return t},QCt.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r].json(),n=new LTt(t,n,!1);e.push(n)}return new ZCt(t,e)},QCt.copy=QCt.clone,QCt.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(),n=r._private,i=[],a=[],o=0,s=this.length;o<s;o++){var l=this[o];e&&!l.removed()||(l.isNode()?i:a).push(l)}for(var c=i.concat(a),h=Ae(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=xTt();else if(it(g.id))g.id=""+g.id;else{if(Xkt(g.id)||!Pkt(g.id)){pTt("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){pTt("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=it(k)?g[w]=""+g[w]:k)||""===k?(pTt("Can not create edge `"+f+"` with unspecified "+w),x=!0):r.hasElementWithId(k)||(pTt("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 STt,p.map.set(f,{ele:d,index:0}),p.removed=!1,e&&r.addToPool(d)}for(var _=0;_<i.length;_++){var C=i[_],S=C._private.data,A=(it(S.parent)&&(S.parent=""+S.parent),S.parent);if(null!=A||C._private.parent)if((A=C._private.parent?r.collection().merge(C._private.parent):r.getElementById(A)).empty())S.parent=void 0;else if(A[0].removed())fTt("Node added with missing parent, reference to parent removed"),S.parent=void 0,C._private.parent=null;else{for(var L=!1,N=A;!N.empty();){if(C.same(N)){L=!0,S.parent=void 0;break}N=N.parent()}L||(A[0]._private.children.push(C),C._private.parent=A[0],n.hasCompoundNodes=!0)}}if(0<c.length){for(var I=c.length===this.length?this:new ZCt(r,c),M=0;M<I.length;M++){var R=I[M];R.isNode()||(R.parallelEdges().clearTraversalCache(),R.source().clearTraversalCache(),R.target().clearTraversalCache())}(n.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},QCt.removed=function(){var t=this[0];return t&&t._private.removed},QCt.inside=function(){var t=this[0];return t&&!t._private.removed},QCt.remove=function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=[],i={},e=this._private.cy;function a(t){for(var e=t._private.edges,r=0;r<e.length;r++)s(e[r])}function o(t){for(var e=t._private.children,r=0;r<e.length;r++)s(e[r])}function s(t){var e=i[t.id()];r&&t.removed()||e||(i[t.id()]=!0,t.isNode()?(n.push(t),a(t),o(t)):n.unshift(t))}Ae(a,"addConnectedEdges"),Ae(o,"addChildren"),Ae(s,"add");for(var l=0,c=this.length;l<c;l++)s(this[l]);function h(t,e){var r=t._private.edges;kTt(r,e),t.clearTraversalCache()}function u(t){t.clearTraversalCache()}Ae(h,"removeEdgeRef"),Ae(u,"removeParallelRef");var d=[];function p(t,e){e=e[0];var r=(t=t[0])._private.children,n=t.id();kTt(r,e),e._private.parent=null,d.ids[n]||(d.ids[n]=!0,d.push(t))}d.ids={},Ae(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&e.removeFromPool(n);for(var g=0;g<n.length;g++){var f=n[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 ZCt(this.cy(),n);0<T.size()&&(t?T.emitAndNotify("remove"):r&&T.emit("remove"));for(var E=0;E<d.length;E++){var _=d[E];r&&_.removed()||_.updateStyle()}return T},QCt.move=function(t){var n,i,a,o,s,e=this._private.cy,l=this,r=Ae(function(t){return null==t?t:""+t},"toString");return void 0!==t.source||void 0!==t.target?(n=r(t.source),i=r(t.target),a=null!=n&&e.hasElementWithId(n),o=null!=i&&e.hasElementWithId(i),(a||o)&&(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=n),o)&&(r.target=i)}l.restore(!1,!1)}),l.emitAndNotify("move"))):void 0===t.parent||null!==(r=r(t.parent))&&!e.hasElementWithId(r)||(s=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],n=r._private.data;r.isNode()&&(n.parent=s)}t.restore(!1,!1)}),l.emitAndNotify("move")),this},[qEt,XAt,PAt,dAt,kAt,EAt,BAt,IAt,MAt,RAt,DAt,WCt,gAt,H,KCt,Y].forEach(function(t){l7t(QCt,t)}),OAt={add:Ae(function(t){if(qkt(t)){var e=t;if(e._private.cy===this)a=e.restore();else{for(var r=[],n=0;n<e.length;n++){var i=e[n];r.push(i.json())}a=new ZCt(this,r)}}else if(Fkt(t))var a=new ZCt(this,t);else if($kt(t)&&(Fkt(t.nodes)||Fkt(t.edges))){for(var o=t,s=[],l=["nodes","edges"],c=0,h=l.length;c<h;c++){var u=l[c],d=o[u];if(Fkt(d))for(var p=0,g=d.length;p<g;p++){var f=l7t({group:u},d[p]);s.push(f)}}a=new ZCt(this,s)}else a=new LTt(this,t).collection();return a},"add"),remove:Ae(function(t){var e;return qkt(t)||Pkt(t)&&(e=t,t=this.$(e)),t.remove()},"remove")},Ae(Vwt,"generateCubicBezier"),Ae(s,"springAccelerationForState"),Ae(l,"springEvaluateStateWithDerivative"),Ae(h,"springIntegrateState"),JCt=Ae(function t(e,r,n){var i,a,o,s={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(e=parseFloat(e)||500,r=parseFloat(r)||20,n=n||null,s.tension=e,s.friction=r,a=(i=null!==n)?(c=t(e,r))/n*.016:.016;o=h(o||s,a),l.push(1+o.x),c+=16,1e-4<Math.abs(o.x)&&1e-4<Math.abs(o.v););return i?function(t){return l[t*(l.length-1)|0]}:c},"springRK4Factory"),zSt=Ae(function(t,e,r,n){var i=Vwt(t,e,r,n);return function(t,e,r){return t+(e-t)*i(r)}},"cubicBezier"),tSt={linear:Ae(function(t,e,r){return t+(e-t)*r},"linear"),ease:zSt(.25,.1,.25,1),"ease-in":zSt(.42,0,1,1),"ease-out":zSt(0,0,.58,1),"ease-in-out":zSt(.42,0,.58,1),"ease-in-sine":zSt(.47,0,.745,.715),"ease-out-sine":zSt(.39,.575,.565,1),"ease-in-out-sine":zSt(.445,.05,.55,.95),"ease-in-quad":zSt(.55,.085,.68,.53),"ease-out-quad":zSt(.25,.46,.45,.94),"ease-in-out-quad":zSt(.455,.03,.515,.955),"ease-in-cubic":zSt(.55,.055,.675,.19),"ease-out-cubic":zSt(.215,.61,.355,1),"ease-in-out-cubic":zSt(.645,.045,.355,1),"ease-in-quart":zSt(.895,.03,.685,.22),"ease-out-quart":zSt(.165,.84,.44,1),"ease-in-out-quart":zSt(.77,0,.175,1),"ease-in-quint":zSt(.755,.05,.855,.06),"ease-out-quint":zSt(.23,1,.32,1),"ease-in-out-quint":zSt(.86,0,.07,1),"ease-in-expo":zSt(.95,.05,.795,.035),"ease-out-expo":zSt(.19,1,.22,1),"ease-in-out-expo":zSt(1,0,0,1),"ease-in-circ":zSt(.6,.04,.98,.335),"ease-out-circ":zSt(.075,.82,.165,1),"ease-in-out-circ":zSt(.785,.135,.15,.86),spring:Ae(function(t,e,r){var n;return 0===r?tSt.linear:(n=JCt(t,e,r),function(t,e,r){return t+(e-t)*n(r)})},"spring"),"cubic-bezier":zSt},Ae(Xwt,"getEasedValue"),Ae(Kwt,"getValue"),Ae(Zwt,"ease"),Ae(Qwt,"step$1"),Ae(Jwt,"valid"),Ae(tkt,"startAnimation"),Ae(ekt,"stepAll"),j={animate:X_t.animate(),animation:X_t.animation(),animated:X_t.animated(),clearQueue:X_t.clearQueue(),delay:X_t.delay(),delayAnimation:X_t.delayAnimation(),stop:X_t.stop(),addToAnimationPool:Ae(function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},"addToAnimationPool"),stopAnimationLoop:Ae(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:Ae(function(){var t,r=this;function e(){r._private.animationsRunning&&W7t(Ae(function(t){ekt(t,r),e()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(Ae(e,"headlessStep"),(t=r.renderer())&&t.beforeRender?t.beforeRender(Ae(function(t,e){ekt(e,r)},"rendererAnimationStep"),t.beforeRenderPriorities.animations):e())},"startAnimationLoop")},eSt={qualifierCompare:Ae(function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},"qualifierCompare"),eventMatches:Ae(function(t,e,r){return null==(e=e.qualifier)||t!==r.target&&Ykt(r.target)&&e.matches(r.target)},"eventMatches"),addEventFields:Ae(function(t,e){e.cy=t,e.target=t},"addEventFields"),callbackContext:Ae(function(t,e,r){return null!=e.qualifier?r.target:t},"callbackContext")},rSt=Ae(function(t){return Pkt(t)?new pCt(t):t},"argSelector"),YAt={createEmitter:Ae(function(){var t=this._private;return t.emitter||(t.emitter=new Bwt(eSt,this)),this},"createEmitter"),emitter:Ae(function(){return this._private.emitter},"emitter"),on:Ae(function(t,e,r){return this.emitter().on(t,rSt(e),r),this},"on"),removeListener:Ae(function(t,e,r){return this.emitter().removeListener(t,rSt(e),r),this},"removeListener"),removeAllListeners:Ae(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:Ae(function(t,e,r){return this.emitter().one(t,rSt(e),r),this},"one"),once:Ae(function(t,e,r){return this.emitter().one(t,rSt(e),r),this},"once"),emit:Ae(function(t,e){return this.emitter().emit(t,e),this},"emit"),emitAndNotify:Ae(function(t,e){return this.emit(t),this.notify(t,e),this},"emitAndNotify")},X_t.eventAliasesOn(YAt),(jAt={png:Ae(function(t){return this._private.renderer.png(t=t||{})},"png"),jpg:Ae(function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)},"jpg")}).jpeg=jAt.jpg,(HAt={layout:Ae(function(t){if(null==t)pTt("Layout options must be specified to make a layout");else if(null==t.name)pTt("A `name` must be specified to make a layout");else{var e,r=t.name,n=this.extension("layout",r);if(null!=n)return e=Pkt(t.eles)?this.$(t.eles):null!=t.eles?t.eles:this.$(),new n(l7t({},t,{cy:this,eles:e}));pTt("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=HAt.makeLayout=HAt.layout,XAt={notify:Ae(function(t,e){var r,n=this._private;this.batching()?(n.batchNotifications=n.batchNotifications||{},r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection(),null!=e&&r.merge(e)):n.notificationsEnabled&&(r=this.renderer(),!this.destroyed())&&r&&r.notify(t,e)},"notify"),notifications:Ae(function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},"notifications"),noNotifications:Ae(function(t){this.notifications(!1),t(),this.notifications(!0)},"noNotifications"),batching:Ae(function(){return 0<this._private.batchCount},"batching"),startBatch:Ae(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:Ae(function(){var r,n=this._private;return 0!==n.batchCount&&(n.batchCount--,0===n.batchCount)&&(n.batchStyleEles.updateStyle(),r=this.renderer(),Object.keys(n.batchNotifications).forEach(function(t){var e=n.batchNotifications[t];e.empty()?r.notify(t):r.notify(t,e)})),this},"endBatch"),batch:Ae(function(t){return this.startBatch(),t(),this.endBatch(),this},"batch"),batchData:Ae(function(i){var a=this;return this.batch(function(){for(var t=Object.keys(i),e=0;e<t.length;e++){var r=t[e],n=i[r];a.getElementById(r).data(n)}})},"batchData")},nSt=JAt({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),(PAt={renderTo:Ae(function(t,e,r,n){return this._private.renderer.renderTo(t,e,r,n),this},"renderTo"),renderer:Ae(function(){return this._private.renderer},"renderer"),forceRender:Ae(function(){return this.notify("draw"),this},"forceRender"),resize:Ae(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:Ae(function(t){var e=this.extension("renderer",t.name);null==e?pTt("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==t.wheelSensitivity&&fTt("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:Ae(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:Ae(function(t){return this.on("render",t)},"onRender"),offRender:Ae(function(t){return this.off("render",t)},"offRender")}).invalidateDimensions=PAt.resize,(dAt={collection:Ae(function(t,e){return Pkt(t)?this.$(t):qkt(t)?t.collection():Fkt(t)?new ZCt(this,t,(e=e||{}).unique,e.removed):new ZCt(this)},"collection"),nodes:Ae(function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},"nodes"),edges:Ae(function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},"edges"),$:Ae(function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},"$"),mutableElements:Ae(function(){return this._private.elements},"mutableElements")}).elements=dAt.filter=dAt.$,kAt={apply:function(t){for(var e=this._private.cy.collection(),r=0;r<t.length;r++){var n,i=t[r],a=this.getContextMeta(i);a.empty||(n=this.getContextStyle(a),a=this.applyContextStyle(a,n,i),i._private.appliedInitStyle?this.updateTransitions(i,a.diffProps):i._private.appliedInitStyle=!0,this.updateStyleHints(i)&&e.push(i))}return e},getPropertiesDiff:function(t,e){var r=this._private.propDiffs=this._private.propDiffs||{},n=t+"-"+e,i=r[n];if(i)return i;for(var a=[],o={},s=0;s<this.length;s++){var l=this[s],c="t"===t[s],h="t"===e[s],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=s+1;y<this.length;y++){var v=this[y];if("t"===e[y]&&(m=null!=v.properties[g.name]))break}o[f]||m||(o[f]=!0,a.push(f))}}}return r[n]=a},getContextMeta:function(t){for(var e="",r=t._private.styleCxtKey||"",n=0;n<this.length;n++){var i=this[n];e+=i.selector&&i.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}},n=0;n<this.length;n++){var i=this[n];if("t"===e[n])for(var a=0;a<i.properties.length;a++){var o=i.properties[a];r[o.name]=o}}return t[e]=r},applyContextStyle:function(t,e,r){for(var n=t.diffPropNames,i={},a=this.types,o=0;o<n.length;o++){var s=n[o],l=e[s],c=r.pstyle(s);if(!l){if(!c)continue;l=c.bypass?{name:s,deleteBypassed:!0}:{name:s,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=i[s]={prev:c},this.applyParsedProperty(r,l),h.next=r.pstyle(s),h.next&&h.next.bypass&&(h.next=h.next.bypassed)}}return{diffProps:i}},updateStyleHints:function(t){var r=t._private,n=this,e=(n.propertyGroupNames,n.propertyGroupKeys),i=Ae(function(t,e,r){return n.getPropertiesHash(t,e,r)},"propHash"),a=r.styleKey;if(t.removed())return!1;for(var o="nodes"===r.group,s=t._private.style,l=Object.keys(s),c=0;c<e.length;c++){var h=e[c];r.styleKeys[h]=[9261,5381]}for(var u=Ae(function(t,e){return r.styleKeys[e][0]=K7t(t,r.styleKeys[e][0])},"updateGrKey1"),d=Ae(function(t,e){return r.styleKeys[e][1]=Z7t(t,r.styleKeys[e][1])},"updateGrKey2"),p=Ae(function(t,e){u(t,e),d(t,e)},"updateGrKey"),g=Ae(function(t,e){for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);u(n,e),d(n,e)}},"updateGrKeyWStr"),f=Ae(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=s[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],_=0;_<e.length;_++){var C=e[_],C=r.styleKeys[C];E[0]=K7t(C[0],E[0]),E[1]=Z7t(C[1],E[1])}r.styleKey=Q7t(E[0],E[1]);var S=r.styleKeys,A=(r.labelDimsKey=J7t(S.labelDimensions),i(t,["label"],S.labelDimensions));return r.labelKey=J7t(A),r.labelStyleKey=J7t(tTt(S.commonLabel,A)),o||(A=i(t,["source-label"],S.labelDimensions),r.sourceLabelKey=J7t(A),r.sourceLabelStyleKey=J7t(tTt(S.commonLabel,A)),A=i(t,["target-label"],S.labelDimensions),r.targetLabelKey=J7t(A),r.targetLabelStyleKey=J7t(tTt(S.commonLabel,A))),o&&(A=[(i=r.styleKeys).nodeBody,i.nodeBorder,i.nodeOutline,i.backgroundImage,i.compound,S=i.pie].filter(function(t){return null!=t}).reduce(tTt,[9261,5381]),r.nodeKey=J7t(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 n=this,i=t,e=r._private.style,a=n.types,o=n.properties[i.name].type,s=i.bypass,l=e[i.name],c=l&&l.bypass,h=r._private,u="mapping",d=Ae(function(t){return null==t?null:null!=t.pfValue?t.pfValue:t.value},"getVal"),p=Ae(function(){var t=d(l),e=d(i);n.checkTriggers(r,i.name,t,e)},"checkTriggers");if((i="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",s):i).delete)e[i.name]=void 0;else{if(i.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,p(),!0):(p(),!0);if(i.deleteBypass)return l?!!l.bypass&&(e[i.name]=l.bypassed,p(),!0):(p(),!0);var g=Ae(function(){fTt("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")},"printMappingErr");switch(i.mapped){case a.mapData:for(var f=i.field.split("."),m=h.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!it(m))return fTt("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var v=i.fieldMax-i.fieldMin;if((v=0==v?0:(m-i.fieldMin)/v)<0?v=0:1<v&&(v=1),o.color)var x=i.valueMin[0],b=i.valueMax[0],w=i.valueMin[1],k=i.valueMax[1],T=i.valueMin[2],E=i.valueMax[2],_=null==i.valueMin[3]?1:i.valueMin[3],C=null==i.valueMax[3]?1:i.valueMax[3],b=[Math.round(x+(b-x)*v),Math.round(w+(k-w)*v),Math.round(T+(E-T)*v),Math.round(_+(C-_)*v)],x={bypass:i.bypass,name:i.name,value:b,strValue:"rgb("+b[0]+", "+b[1]+", "+b[2]+")"};else{if(!o.number)return!1;k=i.valueMin+(i.valueMax-i.valueMin)*v,x=this.parse(i.name,k,i.bypass,u)}if(!x)return g(),!1;x.mapping=i,i=x;break;case a.data:for(var S=i.field.split("."),A=h.data,L=0;L<S.length&&A;L++)A=A[S[L]];if(!(x=null!=A?this.parse(i.name,A,i.bypass,u):x))return g(),!1;x.mapping=i,i=x;break;case a.fn:if(w=i.value,E=null!=i.fnValue?i.fnValue:w(r),null==(i.prevFnValue=E))return fTt("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(x=this.parse(i.name,E,i.bypass,u)))return fTt("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+r.id()+"` is invalid)"),!1;x.mapping=yTt(i),i=x;break;case void 0:break;default:return!1}s?(i.bypassed=c?l.bypassed:l,e[i.name]=i):c?l.bypassed=i:e[i.name]=i}return p(),!0},cleanElements:function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),e)for(var i=n._private.style,a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],l=i[s];null!=l&&(l.bypass?l.bypassed=null:i[s]=null)}else n._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(e,t){var r=this,n=e._private,i=e.pstyle("transition-property").value,a=e.pstyle("transition-duration").pfValue,o=e.pstyle("transition-delay").pfValue;if(0<i.length&&0<a){for(var s={},l=!1,c=0;c<i.length;c++){var h,u,d=i[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)&&(it(h.pfValue)&&it(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):it(h.value)&&it(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)&&(s[d]=g.strValue,this.applyBypass(e,d,u),l=!0)}l&&(n.transitioning=!0,new ZEt(function(t){0<o?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1}))}else n.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1)},checkTrigger:function(t,e,r,n,i,a){null!=(i=i(e=this.properties[e]))&&i(r,n)&&a(e)},checkZOrderTrigger:function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(t){return t.triggersZOrder},function(){i._private.cy.notify("zorder",t)})},checkBoundsTrigger:function(e,r,n,i){this.checkTrigger(e,r,n,i,function(t){return t.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!t.triggersBoundsOfParallelBeziers||"curve-style"!==r||"bezier"!==n&&"bezier"!==i||e.parallelEdges().forEach(function(t){t.isBundledBezier()&&t.dirtyBoundingBoxCache()}),!t.triggersBoundsOfConnectedEdges||"display"!==r||"none"!==n&&"none"!==i||e.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},checkTriggers:function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)}},EAt={applyBypass:function(t,e,r,n){var i=[];if("*"===e||"**"===e){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var o=this.properties[a].name;(o=this.parse(o,r,!0))&&i.push(o)}}else if(Pkt(e)){var s=this.parse(e,r,!0);s&&i.push(s)}else{if(!$kt(e))return!1;var l=e;n=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[r7t(u)]:d)&&(u=this.parse(u,d,!0))&&i.push(u)}}if(0===i.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<i.length;v++){var x,b=i[v];n&&(x=f.pstyle(b.name),y=m[b.name]={prev:x}),p=this.applyParsedProperty(f,yTt(b))||p,n&&(y.next=f.pstyle(b.name))}p&&this.updateStyleHints(f),n&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(t,e,r){e=e7t(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],o=(s=this.properties[e].type).color,s=s.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=o?"rgb("+r.join(",")+")":s?r.join(" "):""+r,this.updateStyleHints(i)):this.applyBypass(i,e,r),this.checkTriggers(i,e,l,r)}},removeAllBypasses:function(t,e){return this.removeBypasses(t,this.propertyNames,e)},removeBypasses:function(t,e,r){for(var n=0;n<t.length;n++){for(var i=t[n],a={},o=0;o<e.length;o++){var s=e[o],l=this.properties[s],c=i.pstyle(l.name);c&&c.bypass&&(s=this.parse(s,"",!0),c=a[l.name]={prev:c},this.applyParsedProperty(i,s),c.next=i.pstyle(l.name))}this.updateStyleHints(i),r&&this.updateTransitions(i,a,!0)}}},BAt={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={},n=0;n<this.properties.length;n++){var i=this.properties[n],a=this.getStylePropertyValue(t,i.name,e);null!=a&&(r[i.name]=a,r[r7t(i.name)]=a)}return r}},getIndexedStyle:function(t,e,r,n){return t.pstyle(e)[r][n]??t.cy().style().getDefaultProperty(e)[r][0]},getStylePropertyValue:function(t,e,r){if(t=t[0]){var n=(e=(e=this.properties[e]).alias?e.pointsTo:e).type;if(e=t.pstyle(e.name)){var i,a,o,s=e.value,l=e.units,e=e.strValue;if(r&&n.number&&null!=s&&it(s))return i=t.cy().zoom(),a=Ae(function(t){return t*i},"getRenderedValue"),o=Ae(function(t,e){return a(t)+e},"getValueStringWithUnits"),((r=Fkt(s))?l.every(function(t){return null!=t}):null!=l)?r?s.map(function(t,e){return o(t,l[e])}).join(" "):o(s,l):r?s.map(function(t){return Pkt(t)?t:""+a(t)}).join(" "):""+a(s);if(null!=e)return e}return null}},getAnimationStartStyle:function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n].name,a=t.pstyle(i);(a=void 0!==a?$kt(a)?this.parse(i,a.strValue):this.parse(i,a):a)&&(r[i]=a)}return r},getPropsList:function(t){var e=[],r=t,n=this.properties;if(r)for(var i=Object.keys(r),a=0;a<i.length;a++){var o=r[s=i[a]],s=n[s]||n[e7t(s)];(s=this.parse(s.name,o))&&e.push(s)}return e},getNonDefaultPropertiesHash:function(t,e,r){for(var n,i,a,o,s=r.slice(),l=0;l<e.length;l++)if(n=e[l],null!=(n=t.pstyle(n,!1)))if(null!=n.pfValue)s[0]=K7t(a,s[0]),s[1]=Z7t(a,s[1]);else for(i=n.strValue,o=0;o<i.length;o++)a=i.charCodeAt(o),s[0]=K7t(a,s[0]),s[1]=Z7t(a,s[1]);return s}}).getPropertiesHash=IAt.getNonDefaultPropertiesHash,MAt={appendFromJson:function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.selector,i=r.style||r.css,a=Object.keys(i);this.selector(n);for(var o=0;o<a.length;o++){var s=a[o],l=i[s];this.css(s,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],n=r.selector,i=r.properties,a={},o=0;o<i.length;o++){var s=i[o];a[s.name]=s.strValue}t.push({selector:n?n.toString():"core",style:a})}return t}},RAt={appendFromString:function(t){var e=""+t;function r(){e=e.length>a.length?e.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),Ae(r,"removeSelAndBlockFromRemaining"),Ae(n,"removePropAndValFromRem");!e.match(/^\s*$/);){var i=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){fTt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=i[0],o=i[1];if("core"!==o&&new pCt(o).invalid)fTt("Skipping parsing of block: Invalid selector found in string stylesheet: "+o);else{for(var s=i[2],l=!1,c=s,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){fTt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+s),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}):fTt("Skipping property: Invalid property definition in: "+u):fTt("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(o);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}},iSt={};var a=a7t,o=Ae(function(t){return"^"+t+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),c=Ae(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)$","^(.+)$"],o=(iSt.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:o("data")},layoutData:{mapping:!0,regex:o("layoutData")},scratch:{mapping:!0,regex:o("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:Ae(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:Ae(function(t){return 1===(t=t.length)||2===t||4===t},"validate")}},{zeroNonZero:Ae(function(t,e){return(null==t||null==e)&&t!==e||0==t&&0!=e||0!=t&&0==e},"zeroNonZero"),any:Ae(function(t,e){return t!=e},"any"),emptyNonEmpty:Ae(function(t,e){return t=Xkt(t),e=Xkt(e),t&&!e||!t&&e},"emptyNonEmpty")}),d=iSt.types,c=[{name:"label",type:d.text,triggersBounds:o.any,triggersZOrder:o.emptyNonEmpty},{name:"text-rotation",type:d.textRotation,triggersBounds:o.any},{name:"text-margin-x",type:d.bidirectionalSize,triggersBounds:o.any},{name:"text-margin-y",type:d.bidirectionalSize,triggersBounds:o.any}],u=[{name:"source-label",type:d.text,triggersBounds:o.any},{name:"source-text-rotation",type:d.textRotation,triggersBounds:o.any},{name:"source-text-margin-x",type:d.bidirectionalSize,triggersBounds:o.any},{name:"source-text-margin-y",type:d.bidirectionalSize,triggersBounds:o.any},{name:"source-text-offset",type:d.size,triggersBounds:o.any}],p=[{name:"target-label",type:d.text,triggersBounds:o.any},{name:"target-text-rotation",type:d.textRotation,triggersBounds:o.any},{name:"target-text-margin-x",type:d.bidirectionalSize,triggersBounds:o.any},{name:"target-text-margin-y",type:d.bidirectionalSize,triggersBounds:o.any},{name:"target-text-offset",type:d.size,triggersBounds:o.any}],g=[{name:"font-family",type:d.fontFamily,triggersBounds:o.any},{name:"font-style",type:d.fontStyle,triggersBounds:o.any},{name:"font-weight",type:d.fontWeight,triggersBounds:o.any},{name:"font-size",type:d.size,triggersBounds:o.any},{name:"text-transform",type:d.textTransform,triggersBounds:o.any},{name:"text-wrap",type:d.textWrap,triggersBounds:o.any},{name:"text-overflow-wrap",type:d.textOverflowWrap,triggersBounds:o.any},{name:"text-max-width",type:d.size,triggersBounds:o.any},{name:"text-outline-width",type:d.size,triggersBounds:o.any},{name:"line-height",type:d.positiveNumber,triggersBounds:o.any}],f=[{name:"text-valign",type:d.valign,triggersBounds:o.any},{name:"text-halign",type:d.halign,triggersBounds:o.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:o.any},{name:"text-border-opacity",type:d.zeroOneNumber},{name:"text-border-color",type:d.color},{name:"text-border-width",type:d.size,triggersBounds:o.any},{name:"text-border-style",type:d.borderStyle,triggersBounds:o.any},{name:"text-background-shape",type:d.textBackgroundShape,triggersBounds:o.any},{name:"text-justification",type:d.justification}],m=[{name:"events",type:d.bool,triggersZOrder:o.any},{name:"text-events",type:d.bool,triggersZOrder:o.any}],y=[{name:"display",type:d.display,triggersZOrder:o.any,triggersBounds:o.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:d.visibility,triggersZOrder:o.any},{name:"opacity",type:d.zeroOneNumber,triggersZOrder:o.zeroNonZero},{name:"text-opacity",type:d.zeroOneNumber},{name:"min-zoomed-font-size",type:d.size},{name:"z-compound-depth",type:d.zCompoundDepth,triggersZOrder:o.any},{name:"z-index-compare",type:d.zIndexCompare,triggersZOrder:o.any},{name:"z-index",type:d.number,triggersZOrder:o.any}],v=[{name:"overlay-padding",type:d.size,triggersBounds:o.any},{name:"overlay-color",type:d.color},{name:"overlay-opacity",type:d.zeroOneNumber,triggersBounds:o.zeroNonZero},{name:"overlay-shape",type:d.overlayShape,triggersBounds:o.any},{name:"overlay-corner-radius",type:d.cornerRadius}],x=[{name:"underlay-padding",type:d.size,triggersBounds:o.any},{name:"underlay-color",type:d.color},{name:"underlay-opacity",type:d.zeroOneNumber,triggersBounds:o.zeroNonZero},{name:"underlay-shape",type:d.overlayShape,triggersBounds:o.any},{name:"underlay-corner-radius",type:d.cornerRadius}],b=[{name:"transition-property",type:d.propList},{name:"transition-duration",type:d.time},{name:"transition-delay",type:d.time},{name:"transition-timing-function",type:d.easing}],w=Ae(function(t,e){return"label"===e.value?-t.poolIndex():e.pfValue},"nodeSizeHashOverride"),w=[{name:"height",type:d.nodeSize,triggersBounds:o.any,hashOverride:w},{name:"width",type:d.nodeSize,triggersBounds:o.any,hashOverride:w},{name:"shape",type:d.nodeShape,triggersBounds:o.any},{name:"shape-polygon-points",type:d.polygonPointList,triggersBounds:o.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:o.any},{name:"padding-relative-to",type:d.paddingRelativeTo,triggersBounds:o.any},{name:"bounds-expansion",type:d.boundsExpansion,triggersBounds:o.any}],k=[{name:"border-color",type:d.color},{name:"border-opacity",type:d.zeroOneNumber},{name:"border-width",type:d.size,triggersBounds:o.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}],T=[{name:"outline-color",type:d.color},{name:"outline-opacity",type:d.zeroOneNumber},{name:"outline-width",type:d.size,triggersBounds:o.any},{name:"outline-style",type:d.borderStyle},{name:"outline-offset",type:d.size,triggersBounds:o.any}],E=[{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}],_=[{name:"position",type:d.position,triggersBounds:o.any},{name:"compound-sizing-wrt-labels",type:d.compoundIncludeLabels,triggersBounds:o.any},{name:"min-width",type:d.size,triggersBounds:o.any},{name:"min-width-bias-left",type:d.sizeMaybePercent,triggersBounds:o.any},{name:"min-width-bias-right",type:d.sizeMaybePercent,triggersBounds:o.any},{name:"min-height",type:d.size,triggersBounds:o.any},{name:"min-height-bias-top",type:d.sizeMaybePercent,triggersBounds:o.any},{name:"min-height-bias-bottom",type:d.sizeMaybePercent,triggersBounds:o.any}],P=[{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:o.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:d.zeroOneNumber,triggersBounds:o.any},{name:"source-endpoint",type:d.edgeEndpoint,triggersBounds:o.any},{name:"target-endpoint",type:d.edgeEndpoint,triggersBounds:o.any},{name:"control-point-step-size",type:d.size,triggersBounds:o.any},{name:"control-point-distances",type:d.bidirectionalSizes,triggersBounds:o.any},{name:"control-point-weights",type:d.numbers,triggersBounds:o.any},{name:"segment-distances",type:d.bidirectionalSizes,triggersBounds:o.any},{name:"segment-weights",type:d.numbers,triggersBounds:o.any},{name:"segment-radii",type:d.numbers,triggersBounds:o.any},{name:"radius-type",type:d.radiusType,triggersBounds:o.any},{name:"taxi-turn",type:d.bidirectionalSizeMaybePercent,triggersBounds:o.any},{name:"taxi-turn-min-distance",type:d.size,triggersBounds:o.any},{name:"taxi-direction",type:d.axisDirection,triggersBounds:o.any},{name:"taxi-radius",type:d.number,triggersBounds:o.any},{name:"edge-distances",type:d.edgeDistances,triggersBounds:o.any},{name:"arrow-scale",type:d.positiveNumber,triggersBounds:o.any},{name:"loop-direction",type:d.angle,triggersBounds:o.any},{name:"loop-sweep",type:d.angle,triggersBounds:o.any},{name:"source-distance-from-node",type:d.size,triggersBounds:o.any},{name:"target-distance-from-node",type:d.size,triggersBounds:o.any}],B=[{name:"ghost",type:d.bool,triggersBounds:o.any},{name:"ghost-offset-x",type:d.bidirectionalSize,triggersBounds:o.any},{name:"ghost-offset-y",type:d.bidirectionalSize,triggersBounds:o.any},{name:"ghost-opacity",type:d.zeroOneNumber}],F=[{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}],C=[];iSt.pieBackgroundN=16,C.push({name:"pie-size",type:d.sizeMaybePercent});for(var S=1;S<=iSt.pieBackgroundN;S++)C.push({name:"pie-"+S+"-background-color",type:d.color}),C.push({name:"pie-"+S+"-background-size",type:d.percent}),C.push({name:"pie-"+S+"-background-opacity",type:d.zeroOneNumber});var A=[],$=iSt.arrowPrefixes=["source","mid-source","target","mid-target"],L=([{name:"arrow-shape",type:d.arrowShape,triggersBounds:o.any},{name:"arrow-color",type:d.color},{name:"arrow-fill",type:d.arrowFill},{name:"arrow-width",type:d.arrowWidth}].forEach(function(n){$.forEach(function(t){var t=t+"-"+n.name,e=n.type,r=n.triggersBounds;A.push({name:t,type:e,triggersBounds:r})})},{}),iSt.properties=[].concat(m,b,y,v,x,B,f,g,c,u,p,w,k,T,E,C,_,P,A,F)),N=iSt.propertyGroups={behavior:m,transition:b,visibility:y,overlay:v,underlay:x,ghost:B,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:w,nodeBorder:k,nodeOutline:T,backgroundImage:E,pie:C,compound:_,edgeLine:P,edgeArrow:A,core:F},z=iSt.propertyGroupNames={},G=((iSt.propertyGroupKeys=Object.keys(N)).forEach(function(e){z[e]=N[e].map(function(t){return t.name}),N[e].forEach(function(t){return t.groupKey=e})}),iSt.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"}]);iSt.propertyNames=L.map(function(t){return t.name});for(var I=0;I<L.length;I++){var U=L[I];L[U.name]=U}for(var M=0;M<G.length;M++){var R=G[M],D=L[R.pointsTo],D={name:R.name,alias:!0,pointsTo:D};L.push(D),L[R.name]=D}function O(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:hTt;f6t(this,O),this.idsByKey=new STt,this.keyForId=new STt,this.cachesByLvl=new STt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=e}for(iSt.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},iSt.getDefaultProperties=function(){var t=this._private;if(null==t.defaultProperties){for(var e=l7t({"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<=iSt.pieBackgroundN;r++){var n=e.name.replace("{{i}}",r),i=e.value;t[n]=i}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(r,n){return iSt.arrowPrefixes.forEach(function(t){var t=t+"-"+n.name,e=n.value;r[t]=e}),r},{})),r={},n=0;n<this.properties.length;n++){var i,a=this.properties[n];a.pointsTo||(i=e[a=a.name],i=this.parse(a,i),r[a]=i)}t.defaultProperties=r}return t.defaultProperties},iSt.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,n){var i,a,o;return Bkt(e)?this.parseImplWarn(t,e,r,n):(i=nTt(t,""+e,r?"t":"f","mapping"===n||!0===n||!1===n||null==n?"dontcare":n),o=(o=(a=this.propCache=this.propCache||[])[i])||(a[i]=this.parseImplWarn(t,e,r,n)),(r||"mapping"===n)&&(o=yTt(o))&&(o.value=yTt(o.value)),o)},parseImplWarn:function(t,e,r,n){return(r=this.parseImpl(t,e,r,n))||null==e||fTt("The style property `".concat(t,": ").concat(e,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==e||fTt("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(e,r,n,t){e=e7t(e);var i=this.properties[e],a=r,o=this.types;if(!i||void 0===r)return null;i.alias&&(i=i.pointsTo,e=i.name);var s=Pkt(r),l=(s&&(r=r.trim()),i.type);if(!l)return null;if(n&&(""===r||null===r))return{name:e,value:r,bypass:!0,deleteBypass:!0};if(Bkt(r))return{name:e,value:r,strValue:"fn",mapped:o.fn,bypass:n};if(!(!s||t||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(i=new RegExp(o.data.regex).exec(r)))return!n&&(b=o.data,{name:e,value:i,strValue:""+r,mapped:b,field:i[1],bypass:n});if(10<=r.length&&"m"===r[0]&&(b=new RegExp(o.mapData.regex).exec(r))){if(n||l.multiple)return!1;if(i=o.mapData,!l.color&&!l.number)return!1;if(!(o=this.parse(e,b[4]))||o.mapped)return!1;if(!(w=this.parse(e,b[5]))||w.mapped)return!1;if(o.pfValue===w.pfValue||o.strValue===w.strValue)return fTt("`"+e+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+o.strValue+"`"),this.parse(e,o.strValue);if(l.color){var c=o.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:i,field:b[1],fieldMin:parseFloat(b[2]),fieldMax:parseFloat(b[3]),valueMin:o.value,valueMax:w.value,bypass:n}}}if(l.multiple&&"multiple"!==t){var u=s?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],n,"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:n}:null:{name:e,value:d,pfValue:g,strValue:f,bypass:n,units:p}}var x,b,c=Ae(function(){for(var t=0;t<l.enums.length;t++)if(l.enums[t]===r)return{name:e,value:r,strValue:""+r,bypass:n};return null},"checkEnums");if(l.number)return h="px",l.units&&(x=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(s?(i="px|em"+(l.allowPercent?"|\\%":""),x&&(i=x),(b=r.match("^("+a7t+")("+i+")?$"))&&(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:(o={name:e,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?o.pfValue=r:o.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(o.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(o.pfValue="rad"===x?r:HTt(r)),"%"===x&&(o.pfValue=r/100),o);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 _=T[E].trim();this.properties[_]?k.push(_):fTt("`"+_+"` 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:n}}if(l.color)return(t=p7t(r))?{name:e,value:t,pfValue:t,strValue:"rgb("+t[0]+","+t[1]+","+t[2]+")",bypass:n}:null;if(l.regex||l.regexes){if(l.enums&&(s=c()))return s;for(var C=l.regexes||[l.regex],S=0;S<C.length;S++){var A=new RegExp(C[S]).exec(r);if(A)return{name:e,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:n}}return null}return l.string?{name:e,value:""+r,strValue:""+r,bypass:n}:l.enums?c():null}},aSt=Ae(function t(e){if(!(this instanceof t))return new t(e);Hkt(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):pTt("A style must have a core reference")},"Style"),(oSt=aSt.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 pCt(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 n=this.properties[r],i=e[n.name];void 0!==(i=void 0===i?e[r7t(n.name)]:i)&&this.cssRule(n.name,i)}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 Wkt(t)?t.appendToStyle(this):Fkt(t)?this.appendFromJson(t):Pkt(t)&&this.appendFromString(t),this},aSt.fromJson=function(t,e){return(t=new aSt(t)).fromJson(e),t},aSt.fromString=function(t,e){return new aSt(t).fromString(e)},[kAt,EAt,BAt,IAt,MAt,RAt,iSt,DAt].forEach(function(t){l7t(oSt,t)}),aSt.types=oSt.types,aSt.properties=oSt.properties,aSt.propertyGroups=oSt.propertyGroups,aSt.propertyGroupNames=oSt.propertyGroupNames,aSt.propertyGroupKeys=oSt.propertyGroupKeys,gAt={style:Ae(function(t){return t&&this.setStyle(t).update(),this._private.style},"style"),setStyle:Ae(function(t){var e=this._private;return Wkt(t)?e.style=t.generateStyle(this):Fkt(t)?e.style=aSt.fromJson(this,t):Pkt(t)?e.style=aSt.fromString(this,t):e.style=aSt(this),e.style},"setStyle"),updateStyle:Ae(function(){this.mutableElements().updateStyle()},"updateStyle")},(H={autolock:Ae(function(t){return void 0===t?this._private.autolock:(this._private.autolock=!!t,this)},"autolock"),autoungrabify:Ae(function(t){return void 0===t?this._private.autoungrabify:(this._private.autoungrabify=!!t,this)},"autoungrabify"),autounselectify:Ae(function(t){return void 0===t?this._private.autounselectify:(this._private.autounselectify=!!t,this)},"autounselectify"),selectionType:Ae(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:Ae(function(t){return void 0===t?this._private.panningEnabled:(this._private.panningEnabled=!!t,this)},"panningEnabled"),userPanningEnabled:Ae(function(t){return void 0===t?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!t,this)},"userPanningEnabled"),zoomingEnabled:Ae(function(t){return void 0===t?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!t,this)},"zoomingEnabled"),userZoomingEnabled:Ae(function(t){return void 0===t?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!t,this)},"userZoomingEnabled"),boxSelectionEnabled:Ae(function(t){return void 0===t?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!t,this)},"boxSelectionEnabled"),pan:Ae(function(){var t,e,r,n=arguments,i=this._private.pan;switch(n.length){case 0:return i;case 1:if(Pkt(n[0]))return i[t=n[0]];if($kt(n[0])){if(!this._private.panningEnabled)return this;e=(r=n[0]).x,r=r.y,it(e)&&(i.x=e),it(r)&&(i.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=n[1],"x"!==(t=n[0])&&"y"!==t||!it(e)||(i[t]=e),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:Ae(function(t,e){var r,n,i=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(i.length){case 1:$kt(t)&&(r=(n=i[0]).x,n=n.y,it(r)&&(a.x+=r),it(n)&&(a.y+=n),this.emit("pan viewport"));break;case 2:r=e,"x"!==(n=t)&&"y"!==n||!it(r)||(a[n]+=r),this.emit("pan viewport")}this.notify("viewport")}return this},"panBy"),fit:Ae(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:Ae(function(t,e){if(it(t)&&void 0===e&&(e=t,t=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(Pkt(t)?(n=t,t=this.$(n)):Zkt(t)?((r={x1:(n=t).x1,y1:n.y1,x2:n.x2,y2:n.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(),n=this.width(),t=this.height();if(e=it(e)?e:0,!isNaN(n)&&!isNaN(t)&&0<n&&0<t&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:e=(e=(e=Math.min((n-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:(n-e*(r.x1+r.x2))/2,y:(t-e*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:Ae(function(t,e){var r,n=this._private;return null==e&&(t=(r=t).min,e=r.max),it(t)&&it(e)&&t<=e?(n.minZoom=t,n.maxZoom=e):it(t)&&void 0===e&&t<=n.maxZoom?n.minZoom=t:it(e)&&void 0===t&&e>=n.minZoom&&(n.maxZoom=e),this},"zoomRange"),minZoom:Ae(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:Ae(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:Ae(function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,o=!1;return n.zoomingEnabled||(o=!0),it(t)?r=t:$kt(t)&&(r=t.level,null!=t.position?e=$Tt(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(o=!0),r=(r=r>n.maxZoom?n.maxZoom:r)<n.minZoom?n.minZoom:r,!o&&it(r)&&r!==a&&(null==e||it(e.x)&&it(e.y))?null!=e?{zoomed:!0,panned:!0,zoom:t=r,pan:{x:-t/a*(e.x-i.x)+e.x,y:-t/a*(e.y-i.y)+e.y}}:{zoomed:!0,panned:!1,zoom:r,pan:i}:null},"getZoomedViewport"),zoom:Ae(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:Ae(function(t){var e=this._private,r=!0,n=!0,i=[],a=!1,o=!1;return t&&(it(t.zoom)||(r=!1),$kt(t.pan)||(n=!1),r||n)&&(r&&((r=t.zoom)<e.minZoom||r>e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,i.push("zoom"))),!n||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,it(r.x)&&(e.pan.x=r.x,o=!1),it(r.y)&&(e.pan.y=r.y,o=!1),o)||i.push("pan"),0<i.length)&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},"viewport"),center:Ae(function(t){return(t=this.getCenterPan(t))&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:Ae(function(t,e){var r,n;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(),n=this.height(),{x:(t-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(n-e*(r.y1+r.y2))/2}},"getCenterPan"),reset:Ae(function(){return this._private.panningEnabled&&this._private.zoomingEnabled&&this.viewport({pan:{x:0,y:0},zoom:1}),this},"reset"),invalidateSize:Ae(function(){this._private.sizeCache=null},"invalidateSize"),size:Ae(function(){var e,t=this._private,r=t.container;return t.sizeCache=t.sizeCache||(r?(e=this.window().getComputedStyle(r),t=Ae(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:Ae(function(){return this.size().width},"width"),height:Ae(function(){return this.size().height},"height"),extent:Ae(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:Ae(function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},"renderedExtent"),multiClickDebounceTime:Ae(function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime},"multiClickDebounceTime")}).centre=H.center,H.autolockNodes=H.autolock,H.autoungrabifyNodes=H.autoungrabify,(Y={data:X_t.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:X_t.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:X_t.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:X_t.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=Y.data,Y.removeAttr=Y.removeData,sSt=Ae(function(t){var i=this,r=(s=(s=(t=l7t({},t)).container)&&!Ukt(s)&&Ukt(s[0])?s[0]:s)?s._cyreg:null,n=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),e=(s&&(s._cyreg=r),r.cy=i,void 0!==Lkt&&void 0!==s&&!t.headless),a=t,t=(a.layout=l7t({name:e?"grid":"null"},a.layout),a.renderer=l7t({name:e?"canvas":"null"},a.renderer),Ae(function(t,e,r){return void 0!==e?e:void 0!==r?r:t},"defVal")),o=this._private={container:s,ready:!1,options:a,elements:new ZCt(this),listeners:[],aniEles:new ZCt(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:it(a.zoom)?a.zoom:1,pan:{x:$kt(a.pan)&&it(a.pan.x)?a.pan.x:0,y:$kt(a.pan)&&it(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:t(250,a.multiClickDebounceTime)},s=(this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),Ae(function(t,e){if(t.some(Qkt))return ZEt.all(t).then(e);e(t)},"loadExtData")),e=(o.styleEnabled&&i.setStyle([]),l7t({},a,a.renderer)),l=(i.initRenderer(e),Ae(function(t,e,r){i.notifications(!1);var n=i.mutableElements();0<n.length&&n.remove(),null!=t&&($kt(t)||Fkt(t))&&i.add(t),i.one("layoutready",function(t){i.notifications(!0),i.emit(t),i.one("load",e),i.emitAndNotify("load")}).one("layoutstop",function(){i.one("done",r),i.emit("done")}),(n=l7t({},i._private.options.layout)).eles=i.elements(),i.layout(n).run()},"setElesAndLayout"));s([a.style,a.elements],function(t){var e=t[0],t=t[1];o.styleEnabled&&i.style().append(e),l(t,function(){i.startAnimationLoop(),o.ready=!0,Bkt(a.ready)&&i.on("ready",a.ready);for(var t=0;t<n.length;t++){var e=n[t];i.on("ready",e)}r&&(r.readies=[]),i.emit("ready")},a.done)})},"Core"),lSt=sSt.prototype,l7t(lSt,{instanceString:Ae(function(){return"core"},"instanceString"),isReady:Ae(function(){return this._private.ready},"isReady"),destroyed:Ae(function(){return this._private.destroyed},"destroyed"),ready:Ae(function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},"ready"),destroy:Ae(function(){if(!this.destroyed())return this.stopAnimationLoop(),this.destroyRenderer(),this.emit("destroy"),this._private.destroyed=!0,this},"destroy"),hasElementWithId:Ae(function(t){return this._private.elements.hasElementWithId(t)},"hasElementWithId"),getElementById:Ae(function(t){return this._private.elements.getElementById(t)},"getElementById"),hasCompoundNodes:Ae(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:Ae(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:Ae(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:Ae(function(t){return this._private.elements.merge(t),this},"addToPool"),removeFromPool:Ae(function(t){return this._private.elements.unmerge(t),this},"removeFromPool"),container:Ae(function(){return this._private.container||null},"container"),window:Ae(function(){var t;return null!=this._private.container&&void 0!==(t=this._private.container.ownerDocument)&&null!=t&&t.defaultView||Lkt},"window"),mount:Ae(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(l7t({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),this.startAnimationLoop(),this.style(r.style),this.emit("mount"),this},"mount"),unmount:Ae(function(){return this.stopAnimationLoop(),this.destroyRenderer(),this.initRenderer({name:"null"}),this.emit("unmount"),this},"unmount"),options:Ae(function(){return yTt(this._private.options)},"options"),json:Ae(function(t){var r,u=this,e=u._private,n=u.mutableElements(),i=Ae(function(t){return u.getElementById(t.id())},"getFreshRef");if($kt(t)){if(u.startBatch(),t.elements){var d={},a=Ae(function(t,e){for(var r=[],n=[],i=0;i<t.length;i++){var a,o,s=t[i];s.data.id?(a=""+s.data.id,o=u.getElementById(a),d[a]=!0,0!==o.length?n.push({ele:o,json:s}):(e&&(s.group=e),r.push(s))):fTt("cy.json() cannot handle elements without an ID attribute")}u.add(r);for(var l=0;l<n.length;l++){var c=(h=n[l]).ele,h=h.json;c.json(h)}},"updateEles");if(Fkt(t.elements))a(t.elements);else for(var o=["nodes","edges"],s=0;s<o.length;s++){var l=o[s],c=t.elements[l];Fkt(c)&&a(c,l)}var h=u.collection();n.filter(function(t){return!d[t.id()]}).forEach(function(t){t.isParent()?h.merge(t):t.remove()}),h.forEach(function(t){return t.children().move({parent:null})}),h.forEach(function(t){return i(t).remove()})}t.style&&u.style(t.style),null!=t.zoom&&t.zoom!==e.zoom&&u.zoom(t.zoom),!t.pan||t.pan.x===e.pan.x&&t.pan.y===e.pan.y||u.pan(t.pan),t.data&&u.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]&&u[f](t[f])}return u.endBatch(),this}return r={},t?r.elements=this.elements().map(function(t){return t.json()}):(r.elements={},n.forEach(function(t){var e=t.group();r.elements[e]||(r.elements[e]=[]),r.elements[e].push(t.json())})),this._private.styleEnabled&&(r.style=u.style().json()),r.data=yTt(u.data()),n=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=yTt(e.pan),r.boxSelectionEnabled=e.boxSelectionEnabled,r.renderer=yTt(n.renderer),r.hideEdgesOnViewport=n.hideEdgesOnViewport,r.textureOnViewport=n.textureOnViewport,r.wheelSensitivity=n.wheelSensitivity,r.motionBlur=n.motionBlur,r.multiClickDebounceTime=n.multiClickDebounceTime,r},"json")}),lSt.$id=lSt.getElementById,[OAt,j,YAt,jAt,HAt,XAt,PAt,dAt,gAt,H,Y].forEach(function(t){l7t(lSt,t)}),cSt={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:Ae(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:Ae(function(t,e){return e},"transform")},hSt={maximal:!1,acyclic:!1},uSt=Ae(function(t){return t.scratch("breadthfirst")},"getInfo"),dSt=Ae(function(t,e){return t.scratch("breadthfirst",e)},"setInfo"),Ae(rkt,"BreadthFirstLayout"),pSt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(rkt.prototype.run=function(){var l=e=this.options,t=e.cy,c=l.eles,h=c.nodes().filter(function(t){return!t.isParent()}),e=c,r=l.directed,n=l.acyclic||l.maximal||0<l.maximalAdjustments,s=n8t(l.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()});if(qkt(l.roots))d=l.roots;else if(Fkt(l.roots)){for(var i=[],a=0;a<l.roots.length;a++){var o=l.roots[a],o=t.getElementById(o);i.push(o)}d=t.collection(i)}else if(Pkt(l.roots))d=t.$(l.roots);else if(r)d=h.roots();else for(var u=c.components(),d=t.collection(),P=Ae(function(t){var e=(t=u[t]).maxDegree(!1),t=t.filter(function(t){return t.degree(!1)===e});d=d.add(t)},"_loop"),p=0;p<u.length;p++)P(p);var g=[],f={},m=Ae(function(t,e){null==g[e]&&(g[e]=[]);var r=g[e].length;g[e].push(t),dSt(t,{index:r,depth:e})},"addToDepth"),B=Ae(function(t,e){var r=(n=uSt(t)).depth,n=n.index;g[r][n]=null,m(t,e)},"changeDepth");e.bfs({roots:d,directed:l.directed,visit:Ae(function(t,e,r,n,i){var a=(t=t[0]).id();m(t,i),f[a]=!0},"visit")});for(var y=[],v=0;v<h.length;v++){var x=h[v];f[x.id()]||y.push(x)}var b=Ae(function(t){for(var e=g[t],r=0;r<e.length;r++){var n=e[r];null==n?(e.splice(r,1),r--):dSt(n,{depth:t,index:r})}},"assignDepthsAt"),e=Ae(function(){for(var t=0;t<g.length;t++)b(t)},"assignDepths"),F=Ae(function(t,e){for(var r=uSt(t),n=t.incomers().filter(function(t){return t.isNode()&&c.has(t)}),i=-1,a=t.id(),o=0;o<n.length;o++)var s=n[o],s=uSt(s),i=Math.max(i,s.depth);return r.depth<=i&&(!l.acyclic&&e[a]?null:(B(t,r=i+1),e[a]=r,!0))},"adjustMaximally");if(r&&n){var w=[],$={},z=Ae(function(t){return w.push(t)},"enqueue"),G=Ae(function(){return w.shift()},"dequeue");for(h.forEach(function(t){return w.push(t)});0<w.length;){var k=G(),T=F(k,$);if(T)k.outgoers().filter(function(t){return t.isNode()&&c.has(t)}).forEach(z);else if(null===T){fTt("Detected double maximal shift for node `"+k.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}e();var E=0;if(l.avoidOverlap)for(var _=0;_<h.length;_++)var U=(C=h[_].layoutDimensions(l)).w,C=C.h,E=Math.max(E,U,C);var S={},A=Ae(function(t){if(S[t.id()])return S[t.id()];for(var e=uSt(t).depth,r=t.neighborhood(),n=0,i=0,a=0;a<r.length;a++){var o,s,l=r[a];l.isEdge()||l.isParent()||!h.has(l)||null!=(l=uSt(l))&&(o=l.index,l=l.depth,null!=o)&&null!=l&&(s=g[l].length,l<e)&&(n+=o/s,i++)}return n/=i=Math.max(1,i),0===i&&(n=0),S[t.id()]=n},"getWeightedPercent"),L=Ae(function(t,e){var r=A(t)-A(e);return 0==r?o7t(t.id(),e.id()):r},"sortFn");void 0!==l.depthSort&&(L=l.depthSort);for(var N=0;N<g.length;N++)g[N].sort(L),b(N);for(var I=[],M=0;M<y.length;M++)I.push(y[M]);g.unshift(I),e();for(var R=0,D=0;D<g.length;D++)R=Math.max(g[D].length,R);var O=s.x1+s.w/2,q=s.x1+s.h/2,Y=g.reduce(function(t,e){return Math.max(t,e.length)},0),r=Ae(function(t){var e,r=(t=uSt(t)).depth,t=t.index,n=g[r].length,i=Math.max(s.w/((l.grid?Y:n)+1),E),a=Math.max(s.h/(g.length+1),E),o=Math.min(s.w/2/g.length,s.h/2/g.length),o=Math.max(o,E);return l.circle?(o=o*r+o-(0<g.length&&g[0].length<=3?o/2:0),e=2*Math.PI/g[r].length*t,0===r&&1===g[0].length&&(o=1),{x:O+o*Math.cos(e),y:q+o*Math.sin(e)}):{x:O+(t+1-(n+1)/2)*i,y:(r+1)*a}},"getPosition");return c.nodes().layoutPositions(this,l,r),this}),spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:Ae(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:Ae(function(t,e){return e},"transform")},Ae(nkt,"CircleLayout"),nkt.prototype.run=function(){var n=t=this.options,t=t.cy,e=n.eles,i=void 0!==n.counterclockwise?!n.counterclockwise:n.clockwise,r=e.nodes().not(":parent");n.sort&&(r=r.sort(n.sort));for(var a,o=(t=n8t(n.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()})).x1+t.w/2,s=t.y1+t.h/2,l=(void 0===n.sweep?2*Math.PI-2*Math.PI/r.length:n.sweep)/Math.max(1,r.length-1),c=0,h=0;h<r.length;h++)var u=(d=r[h].layoutDimensions(n)).w,d=d.h,c=Math.max(c,u,d);a=it(n.radius)?n.radius:r.length<=1?0:Math.min(t.h,t.w)/2-c,1<r.length&&n.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=Ae(function(t,e){var e=n.startAngle+e*l*(i?1:-1),r=a*Math.cos(e),e=a*Math.sin(e);return{x:o+r,y:s+e}},"getPos");return e.nodes().layoutPositions(this,n,p),this},gSt={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:Ae(function(t){return t.degree()},"concentric"),levelWidth:Ae(function(t){return t.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:Ae(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:Ae(function(t,e){return e},"transform")},Ae(ikt,"ConcentricLayout"),ikt.prototype.run=function(){for(var t=r=this.options,e=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=r.cy,n=t.eles,i=n.nodes().not(":parent"),a=(r=n8t(t.boundingBox||{x1:0,y1:0,w:r.width(),h:r.height()})).x1+r.w/2,o=r.y1+r.h/2,s=[],l=0,c=0;c<i.length;c++){var h=i[c],u=t.concentric(h);s.push({value:u,node:h}),h._private.scratch.concentric=u}i.updateStyle();for(var d=0;d<i.length;d++)var p=i[d].layoutDimensions(t),l=Math.max(l,p.w,p.h);s.sort(function(t,e){return e.value-t.value});for(var P=t.levelWidth(i),g=[[]],f=g[0],m=0;m<s.length;m++){var y=s[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 _=0,C=0,S=0;S<g.length;S++)var B=g[S].r-C,_=Math.max(_,B);for(var C=0,A=0;A<g.length;A++){var L=g[A];0===A&&(C=L.r),L.r=C,C+=_}}for(var N={},I=0;I<g.length;I++)for(var M=g[I],F=M.dTheta,R=M.r,D=0;D<M.length;D++){var $=M[D],O=t.startAngle+(e?1:-1)*F*D,O={x:a+R*Math.cos(O),y:o+R*Math.sin(O)};N[$.node.id()]=O}return n.nodes().layoutPositions(this,t,function(t){return t=t.id(),N[t]}),this},mSt={ready:Ae(function(){},"ready"),stop:Ae(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:Ae(function(t,e){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:Ae(function(t){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:Ae(function(t){return 32},"idealEdgeLength"),edgeElasticity:Ae(function(t){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},Ae(akt,"CoseLayout"),akt.prototype.run=function(){var r=this.options,t=r.cy,n=this,i=(!(n.stopped=!1)!==r.animate&&!1!==r.animate||n.emit({type:"layoutstart",layout:n}),fSt=!0===r.debug,ySt(t,n,r)),a=(fSt&&(void 0)(i),r.randomize&&bSt(i),V7t()),o=Ae(function(){kSt(i,t,r),!0===r.fit&&t.fit(r.padding)},"refresh"),s=Ae(function(t){return!(n.stopped||t>=r.numIter||(TSt(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature<r.minTemp))},"mainLoop"),l=Ae(function(){var t,e;!0===r.animate||!1===r.animate?(o(),n.one("layoutstop",r.stop),n.emit({type:"layoutstop",layout:n})):(t=r.eles.nodes(),e=wSt(i,r,t),t.layoutPositions(n,r,e))},"done"),c=0,h=!0;if(!0===r.animate)Ae(function t(){for(var e=0;h&&e<r.refresh;)h=s(c),c++,e++;h?(V7t()-a>=r.animationThreshold&&o(),W7t(t)):(OSt(i,r),l())},"frame")();else{for(;h;)h=s(c),c++;OSt(i,r),l()}return this},akt.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},akt.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},ySt=Ae(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=n8t(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),o={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=r.eles.components(),l={},c=0;c<s.length;c++)for(var h=s[c],u=0;u<h.length;u++)l[h[u].id()]=c;for(c=0;c<o.nodeSize;c++){var d=(y=i[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,o.layoutNodes.push(I),o.idToIndex[I.id]=c}for(var p=[],g=0,f=-1,m=[],c=0;c<o.nodeSize;c++){var y,v=(y=o.layoutNodes[c]).parentId;(null!=v?o.layoutNodes[o.idToIndex[v]].children:(p[++f]=y.id,m)).push(y.id)}for(o.graphSet.push(m);g<=f;){var x=p[g++],x=o.idToIndex[x],b=o.layoutNodes[x].children;if(0<b.length)for(o.graphSet.push(b),c=0;c<b.length;c++)p[++f]=b[c]}for(c=0;c<o.graphSet.length;c++)for(var w=o.graphSet[c],u=0;u<w.length;u++){var k=o.idToIndex[w[u]];o.indexToGraph[k]=c}for(c=0;c<o.edgeSize;c++){var T=n[c],E={},_=(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,C=o.idToIndex[E.sourceId],S=o.idToIndex[E.targetId];if(o.indexToGraph[C]!=o.indexToGraph[S]){for(var A=vSt(E.sourceId,E.targetId,o),L=o.graphSet[A],N=0,I=o.layoutNodes[C];-1===L.indexOf(I.id);)I=o.layoutNodes[o.idToIndex[I.parentId]],N++;for(I=o.layoutNodes[S];-1===L.indexOf(I.id);)I=o.layoutNodes[o.idToIndex[I.parentId]],N++;_*=N*r.nestingFactor}E.idealLength=_,E.elasticity=T,o.layoutEdges.push(E)}return o},"createLayoutInfo"),vSt=Ae(function(t,e,r){return(t=xSt(t,e,0,r)).count<2?0:t.graph},"findLCA"),xSt=Ae(function t(e,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:n};for(var o=0,s=0;s<a.length;s++){var l=a[s],l=i.idToIndex[l];if(0!==(l=i.layoutNodes[l].children).length&&0!==(l=t(e,r,i.indexToGraph[i.idToIndex[l[0]]],i)).count){if(1!==l.count)return l;if(2==++o)break}}return{count:o,graph:n}},"findLCA_aux"),bSt=Ae(function(t,e){for(var r=t.clientWidth,n=t.clientHeight,i=0;i<t.nodeSize;i++){var a=t.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*n)}},"randomizePositions"),wSt=Ae(function(i,a,t){var o=i.boundingBox,s={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(t.forEach(function(t){t=i.layoutNodes[i.idToIndex[t.data("id")]],s.x1=Math.min(s.x1,t.positionX),s.x2=Math.max(s.x2,t.positionX),s.y1=Math.min(s.y1,t.positionY),s.y2=Math.max(s.y2,t.positionY)}),s.w=s.x2-s.x1,s.h=s.y2-s.y1),function(t,e){var r,n,t=i.layoutNodes[i.idToIndex[t.data("id")]];return a.boundingBox?(r=(t.positionX-s.x1)/s.w,n=(t.positionY-s.y1)/s.h,{x:o.x1+r*o.w,y:o.y1+n*o.h}):{x:t.positionX,y:t.positionY}}},"getScaleInBoundsFn"),kSt=Ae(function(t,e,r){var n=r.layout,i=r.eles.nodes(),a=wSt(t,r,i);i.positions(a),!0!==t.ready&&(t.ready=!0,n.one("layoutready",r.ready),n.emit({type:"layoutready",layout:this}))},"refreshPositions"),TSt=Ae(function(t,e,r){ESt(t,e),LSt(t),NSt(t,e),ISt(t),MSt(t)},"step"),ESt=Ae(function(t,e){for(var r=0;r<t.graphSet.length;r++)for(var n=t.graphSet[r],i=n.length,a=0;a<i;a++)for(var o=t.layoutNodes[t.idToIndex[n[a]]],s=a+1;s<i;s++){var l=t.layoutNodes[t.idToIndex[n[s]]];CSt(o,l,t,e)}},"calculateNodeForces"),_St=Ae(function(t){return-t+2*t*Math.random()},"randomDistance"),CSt=Ae(function(t,e,r,n){var i,a,o,s;t.cmptId!==e.cmptId&&!r.isCompound||(r=e.positionX-t.positionX,i=e.positionY-t.positionY,0===r&&0===i&&(r=_St(1),i=_St(1)),s=0<(s=SSt(t,e,r,i))?(o=n.nodeOverlap*s)*r/(a=Math.sqrt(r*r+i*i)):(n=ASt(t,r,i),s=(r=(s=ASt(e,-1*r,-1*i)).x-n.x)*r+(i=s.y-n.y)*i,a=Math.sqrt(s),(o=(t.nodeRepulsion+e.nodeRepulsion)/s)*r/a),n=o*i/a,t.isLocked||(t.offsetX-=s,t.offsetY-=n),e.isLocked)||(e.offsetX+=s,e.offsetY+=n)},"nodeRepulsion"),SSt=Ae(function(t,e,r,n){return r=0<r?t.maxX-e.minX:e.maxX-t.minX,n=0<n?t.maxY-e.minY:e.maxY-t.minY,0<=r&&0<=n?Math.sqrt(r*r+n*n):0},"nodesOverlap"),ASt=Ae(function(t,e,r){var n=t.positionX,i=t.positionY,a=t.height||1,o=r/e,s=a/(t=t.width||1),l={};return 0===e&&0<r||0===e&&r<0?(l.x=n,l.y=i+a/2):0<e&&-1*s<=o&&o<=s?(l.x=n+t/2,l.y=i+t*r/2/e):e<0&&-1*s<=o&&o<=s?(l.x=n-t/2,l.y=i-t*r/2/e):0<r&&(o<=-1*s||s<=o)?(l.x=n+a*e/2/r,l.y=i+a/2):r<0&&(o<=-1*s||s<=o)&&(l.x=n-a*e/2/r,l.y=i-a/2),l},"findClippingPoint"),LSt=Ae(function(t,e){for(var r=0;r<t.edgeSize;r++){var n,i,a=t.layoutEdges[r],o=t.idToIndex[a.sourceId],o=t.layoutNodes[o],s=t.idToIndex[a.targetId],l=(s=t.layoutNodes[s]).positionX-o.positionX,c=s.positionY-o.positionY;0==l&&0==c||(n=ASt(o,l,c),c=(l=ASt(s,-1*l,-1*c)).x-n.x,l=l.y-n.y,n=Math.sqrt(c*c+l*l),a=Math.pow(a.idealLength-n,2)/a.elasticity,c=0!==n?(i=a*c/n,a*l/n):i=0,o.isLocked||(o.offsetX+=i,o.offsetY+=c),s.isLocked)||(s.offsetX-=i,s.offsetY-=c)}},"calculateEdgeForces"),NSt=Ae(function(t,e){if(0!==e.gravity)for(var r=0;r<t.graphSet.length;r++)for(var n,i,a=t.graphSet[r],o=a.length,s=0===r?(i=t.clientHeight/2,t.clientWidth/2):(n=t.layoutNodes[t.idToIndex[a[0]]],i=(n=t.layoutNodes[t.idToIndex[n.parentId]]).positionX,n.positionY),l=0;l<o;l++){var c,h,u,d=t.layoutNodes[t.idToIndex[a[l]]];d.isLocked||(h=i-d.positionX,u=s-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"),ISt=Ae(function(t,e){var r=[],n=0,i=-1;for(r.push.apply(r,t.graphSet[0]),i+=t.graphSet[0].length;n<=i;){var a=r[n++],a=t.idToIndex[a],o=(a=t.layoutNodes[a]).children;if(0<o.length&&!a.isLocked){for(var s=a.offsetX,l=a.offsetY,c=0;c<o.length;c++){var h=t.layoutNodes[t.idToIndex[o[c]]];h.offsetX+=s,h.offsetY+=l,r[++i]=o[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),MSt=Ae(function(t,e){for(var r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(var n,r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length||i.isLocked||(n=RSt(i.offsetX,i.offsetY,t.temperature),i.positionX+=n.x,i.positionY+=n.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,DSt(i,t));for(var i,r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)},"updatePositions"),RSt=Ae(function(t,e,r){var n=Math.sqrt(t*t+e*e);return r<n?{x:r*t/n,y:r*e/n}:{x:t,y:e}},"limitForce"),DSt=Ae(function t(e,r){if(null!=(n=e.parentId)){var n,i=!1;if((null==(n=r.layoutNodes[r.idToIndex[n]]).maxX||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeft<n.minX)&&(n.minX=e.minX-n.padLeft,i=!0),(null==n.maxY||e.maxY+n.padBottom>n.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop<n.minY)&&(n.minY=e.minY-n.padTop,i=!0),i)return t(n,r)}},"updateAncestryBoundaries"),OSt=Ae(function(t,e){for(var r=t.layoutNodes,n=[],i=0;i<r.length;i++){var a=r[i],o=a.cmptId;(n[o]=n[o]||[]).push(a)}for(var s=0,i=0;i<n.length;i++)if(h=n[i]){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,s+=h.w*h.h}n.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(s)*t.clientWidth/t.clientHeight,i=0;i<n.length;i++)if(h=n[i]){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"),PSt={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:Ae(function(t){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:Ae(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:Ae(function(t,e){return e},"transform")},Ae(okt,"GridLayout"),okt.prototype.run=function(){var t=e=this.options,e=e.cy,r=(c=t.eles).nodes().not(":parent"),i=(t.sort&&(r=r.sort(t.sort)),n8t(t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}));if(0===i.h||0===i.w)c.nodes().layoutPositions(this,t,function(t){return{x:i.x1,y:i.y1}});else{var n=r.size(),e=Math.sqrt(n*i.h/i.w),a=Math.round(e),o=Math.round(i.w/i.h*e),s=Ae(function(t){if(null==t)return Math.min(a,o);Math.min(a,o)==a?a=t:o=t},"small"),l=Ae(function(t){if(null==t)return Math.max(a,o);Math.max(a,o)==a?a=t:o=t},"large"),c=t.rows,e=null!=t.cols?t.cols:t.columns;if(null!=c&&null!=e)a=c,o=e;else if(null!=c&&null==e)a=c,o=Math.ceil(n/a);else if(null==c&&null!=e)o=e,a=Math.ceil(n/o);else if(n<o*a)n<=((c=s())-1)*(e=l())?s(c-1):n<=(e-1)*c&&l(e-1);else for(;o*a<n;){var h=s(),u=l();n<=(u+1)*h?l(u+1):s(h+1)}var d=i.w/o,p=i.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=Ae(function(t,e){return!!v["c-"+t+"-"+e]},"used"),b=Ae(function(t,e){v["c-"+t+"-"+e]=!0},"use"),w=0,k=0,T=Ae(function(){o<=++k&&(k=0,w++)},"moveToNextCell"),E={},_=0;_<r.length;_++){var C=r[_],S=t.position(C);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[C.id()]=A,b(A.row,A.col)}}c=Ae(function(t,e){var r,n;if(t.locked()||t.isParent())return!1;if(t=E[t.id()])r=t.col*d+d/2+i.x1,n=t.row*p+p/2+i.y1;else{for(;x(w,k);)T();r=k*d+d/2+i.x1,n=w*p+p/2+i.y1,b(w,k),T()}return{x:r,y:n}},"getPos"),r.layoutPositions(this,t,c)}return this},BSt={ready:Ae(function(){},"ready"),stop:Ae(function(){},"stop")},Ae(skt,"NullLayout"),skt.prototype.run=function(){var t=this.options,e=t.eles;return t.cy,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},FSt={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(skt.prototype.stop=function(){return this}),animationDuration:500,animationEasing:void 0,animateFilter:Ae(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:Ae(function(t,e){return e},"transform")},Ae(lkt,"PresetLayout"),$St={fit:!0,padding:30,boundingBox:void 0,animate:!(lkt.prototype.run=function(){var e=this.options,t=e.eles.nodes(),r=Bkt(e.positions);function n(t){return null==e.positions?FTt(t.position()):r?e.positions(t):e.positions[t._private.data.id]??null}return Ae(n,"getPosition"),t.layoutPositions(this,e,function(t,e){var r=n(t);return!t.locked()&&null!=r&&r}),this}),animationDuration:500,animationEasing:void 0,animateFilter:Ae(function(t,e){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:Ae(function(t,e){return e},"transform")},Ae(ckt,"RandomLayout"),ckt.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=n8t(t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),e=Ae(function(t,e){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}},"getPos");return r.nodes().layoutPositions(this,t,e),this},zSt=[{name:"breadthfirst",impl:rkt},{name:"circle",impl:nkt},{name:"concentric",impl:ikt},{name:"cose",impl:akt},{name:"grid",impl:okt},{name:"null",impl:skt},{name:"preset",impl:lkt},{name:"random",impl:ckt}],Ae(hkt,"NullRenderer"),kAt=Ae(function(){},"noop"),EAt=Ae(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),hkt.prototype={recalculateRenderedStyle:kAt,notify:Ae(function(){this.notifications++},"notify"),init:kAt,isHeadless:Ae(function(){return!0},"isHeadless"),png:EAt,jpg:EAt},BAt={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},s=this,n=Ae(function(t,e,r,n,i,a,o){var s=i.x-r/2-o,l=i.x+r/2+o,c=i.y-r/2-o,i=i.y+r/2+o;return s<=t&&t<=l&&c<=e&&e<=i},"bbCollide"),l=Ae(function(t,e,r,n,i){var a=t*Math.cos(n)-e*Math.sin(n),t=t*Math.sin(n)+e*Math.cos(n);return{x:a*r+i.x,y:t*r+i.y}},"transform"),c=Ae(function(t,e,r,n){for(var i=[],a=0;a<t.length;a+=2){var o=t[a],s=t[a+1];i.push(l(o,s,e,r,n))}return i},"transformPoints"),h=Ae(function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n.x,n.y)}return e},"pointsToArr"),i=Ae(function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").pfValue*2},"standardGap"),t=Ae(function(t,e){Pkt(e)&&(e=r[e]),r[t]=l7t({name:t,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:Ae(function(t,e,r,n,i,a){return r=h(c(this.points,r+2*a,n,i)),T8t(t,e,r)},"collide"),roughCollide:n,draw:Ae(function(t,e,r,n){e=c(this.points,e,r,n),s.arrowShapeImpl("polygon")(t,e)},"draw"),spacing:Ae(function(t){return 0},"spacing"),gap:i},e)},"defineArrowShape");t("none",{collide:hTt,roughCollide:hTt,draw:dTt,spacing:uTt,gap:uTt}),t("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),t("arrow","triangle"),t("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:Ae(function(t,e,r,n,i){var a=c(this.points,e,r,n),o=this.controlPoint,o=l(o[0],o[1],e,r,n);s.arrowShapeImpl(this.name)(t,a,o)},"draw"),gap:Ae(function(t){return.8*i(t)},"gap")}),t("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:Ae(function(t,e,r,n,i,a,o){var s=h(c(this.points,r+2*o,n,i)),r=h(c(this.pointsTee,r+2*o,n,i));return T8t(t,e,s)||T8t(t,e,r)},"collide"),draw:Ae(function(t,e,r,n,i){var a=c(this.points,e,r,n),e=c(this.pointsTee,e,r,n);s.arrowShapeImpl(this.name)(t,a,e)},"draw")}),t("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:Ae(function(t,e,r,n,i,a,o){var s=i,s=Math.pow(s.x-t,2)+Math.pow(s.y-e,2)<=Math.pow((r+2*o)*this.radius,2),r=h(c(this.points,r+2*o,n,i));return T8t(t,e,r)||s},"collide"),draw:Ae(function(t,e,r,n,i){r=c(this.pointsTr,e,r,n),s.arrowShapeImpl(this.name)(t,r,n.x,n.y,this.radius*e)},"draw"),spacing:Ae(function(t){return s.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:Ae(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:Ae(function(t,e,r,n,i,a,o){var s=h(c(this.points,r+2*o,n,i)),a=h(c(this.crossLinePts(r,a),r+2*o,n,i));return T8t(t,e,s)||T8t(t,e,a)},"collide"),draw:Ae(function(t,e,r,n,i){var a=c(this.points,e,r,n),i=c(this.crossLinePts(e,i),e,r,n);s.arrowShapeImpl(this.name)(t,a,i)},"draw")}),t("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:Ae(function(t){return.525*i(t)},"gap")}),t("circle",{radius:.15,collide:Ae(function(t,e,r,n,i,a,o){return Math.pow(i.x-t,2)+Math.pow(i.y-e,2)<=Math.pow((r+2*o)*this.radius,2)},"collide"),draw:Ae(function(t,e,r,n,i){s.arrowShapeImpl(this.name)(t,n.x,n.y,this.radius*e)},"draw"),spacing:Ae(function(t){return s.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:Ae(function(t){return 1},"spacing"),gap:Ae(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:Ae(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:Ae(function(t){return.95*t.pstyle("width").pfValue*t.pstyle("arrow-scale").value},"gap")})}},IAt={projectIntoViewport:function(t,e){var r=this.cy,n=(a=this.findContainerClientCoords())[0],i=a[1],a=a[4],o=r.pan(),r=r.zoom();return[((t-n)/a-o.x)/r,((e-i)/a-o.y)/r]},findContainerClientCoords:function(){var e,t,r,n,i,a,o,s,l,c,h;return this.containerBB||(h=(s=this.container).getBoundingClientRect(),e=this.cy.window().getComputedStyle(s),t=(o=Ae(function(t){return parseFloat(e.getPropertyValue(t))},"styleValue"))("padding-left"),r=o("padding-right"),n=o("padding-top"),i=o("padding-bottom"),c=o("border-left-width"),l=o("border-right-width"),a=o("border-top-width"),o("border-bottom-width"),o=s.clientWidth,s=s.clientHeight,l=h.width/(o+(c+l)),c=h.left+t+c,h=h.top+n+a,this.containerBB=[c,h,o-(t+r),s-(n+i),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},findNearestElements:function(y,v,t,e){var n,i,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,o=1/0;function E(t,e){if(t.isNode()){if(i)return;i=t,w.push(t)}if(t.isEdge()&&(null==e||e<o))if(n){if(n.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value&&n.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,n=t,o=e??o;break}}else w.push(t),n=t,o=e??o}function _(t){var e=t.outerWidth()+2*l,r=t.outerHeight()+2*l,n=e/2,i=r/2,a=t.position(),o="auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,s=t._private.rscratch;if(a.x-n<=y&&y<=a.x+n&&a.y-i<=v&&v<=a.y+i&&b.nodeShapes[x.getNodeShape(t)].checkPoint(y,v,0,e,r,a.x,a.y,o,s))return E(t,0),!0}function s(t){var e,r=t._private,n=r.rscratch,i=t.pstyle("width").pfValue,a=t.pstyle("arrow-scale").value,o=(l=i/2+T)*l,s=2*l,l=r.source,c=r.target;if("segments"===n.edgeType||"straight"===n.edgeType||"haystack"===n.edgeType){for(var h=n.allpts,u=0;u+3<h.length;u+=2)if(y8t(y,v,h[u],h[u+1],h[u+2],h[u+3],s)&&o>(e=k8t(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(t,e),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5<n.allpts.length;u+=4)if(v8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],s)&&o>(e=w8t(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(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.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&&(_(l),_(c))}function f(t,e,r){return _Tt(t,e,r)}function c(t,e){var r=t._private,n=g,i=e?e+"-":"",a=(t.boundingBox(),r.labelBounds[e||"main"]),o=t.pstyle(i+"label").value;if("yes"===t.pstyle("text-events").strValue&&o){var s=f(r.rscratch,"labelX",e),l=f(r.rscratch,"labelY",e),o=f(r.rscratch,"labelAngle",e),r=t.pstyle(i+"text-margin-x").pfValue,e=t.pstyle(i+"text-margin-y").pfValue,i=a.x1-n-r,c=a.x2+n-r,h=a.y1-n-e,n=a.y2+n-e;if(o){var u=Math.cos(o),d=Math.sin(o),p=(o=Ae(function(t,e){return{x:(t-=s)*u-(e-=l)*d+s,y:t*d+e*u+l}},"rotate"))(i,h),i=o(i,n),h=o(c,h),o=o(c,n),c=[p.x+r,p.y+e,h.x+r,h.y+e,o.x+r,o.y+e,i.x+r,i.y+e];if(T8t(y,v,c))return E(t),!0}else if(p8t(a,y,v))return E(t),!0}}t&&(r=r.interactive),Ae(E,"addEle"),Ae(_,"checkNode"),Ae(s,"checkEdge"),Ae(f,"preprop"),Ae(c,"checkLabel");for(var h=r.length-1;0<=h;h--){var u=r[h];u.isNode()?_(u)||c(u):s(u)||c(u)||c(u,"source")||c(u,"target")}return w},getAllInBox:function(t,e,r,n){for(var i=this.getCachedZSortedEles().interactive,a=[],o=Math.min(t,r),s=Math.max(t,r),l=Math.min(e,n),c=Math.max(e,n),h=n8t({x1:t=o,y1:e=l,x2:r=s,y2:n=c}),u=0;u<i.length;u++){var d=i[u];if(d.isNode()){var p=d,g=p.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});d8t(h,g)&&!f8t(g,h)&&a.push(p)}else if((null==(d=(p=(g=d)._private).rscratch).startX||null==d.startY||p8t(h,d.startX,d.startY))&&(null==d.endX||null==d.endY||p8t(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(!g8t(h,f[y])){m=!1;break}m&&a.push(g)}else"haystack"!==d.edgeType&&"straight"!==d.edgeType||a.push(g)}return a}},(MAt={calculateArrowAngles:function(t){var e,r,n,i,a,o,s,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,n=v?(r=d-t.segpts[0],g-t.segpts[1]):y||x||b||m?(p=t.allpts,r=d-JTt(p[0],p[2],p[4],.1),g-JTt(p[1],p[3],p[5],.1)):(r=d-k,g-T),t.srcArrowAngle=WTt(r,n),t.midX),T=t.midY;f&&(k=(d+e)/2,T=(g+w)/2),r=e-d,n=w-g,v?n=(p=t.allpts).length/2%2==0?(i=(u=p.length/2)-2,r=p[u]-p[i],p[u+1]-p[i+1]):t.isRound?(r=t.midVector[1],-t.midVector[0]):(i=(u=p.length/2-1)-2,r=p[u]-p[i],p[u+1]-p[i+1]):(y||x||b)&&(p=t.allpts,f=t.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=JTt(p[c],p[l],p[h],0),o=JTt(p[c+1],p[l+1],p[h+1],0),s=JTt(p[c],p[l],p[h],1e-4),JTt(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=JTt(p[c=l-2],p[l],p[h],.4999),o=JTt(p[c+1],p[l+1],p[h+1],.4999),s=JTt(p[c],p[l],p[h],.5),JTt(p[c+1],p[l+1],p[h+1],.5)),r=s-a,n=f-o),t.midtgtArrowAngle=WTt(r,n),t.midDispX=r,t.midDispY=n,r*=-1,n*=-1,v&&(p=t.allpts).length/2%2!=0&&!t.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),n=-(p[d+1]-p[u+1])),t.midsrcArrowAngle=WTt(r,n),n=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-JTt(p[g-6],p[g-4],p[g-2],.9),w-JTt(p[g-5],p[g-3],p[g-1],.9)):(r=e-k,w-T),t.tgtArrowAngle=WTt(r,n)}}).getArrowWidth=MAt.getArrowHeight=function(t,e){var r,n=this.arrowWidthCache=this.arrowWidthCache||{};return n[t+", "+e]||(r=Math.max(Math.pow(13.37*t,.9),29)*e,n[t+", "+e]=r)},qSt={},YSt={},nAt=Ae(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"),iAt=Ae(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"),aAt=Ae(function(t,e,r,n,i){t!==rAt?nAt(e,t,qSt):iAt(YSt,qSt),nAt(e,r,YSt),ZSt=qSt.nx*YSt.ny-qSt.ny*YSt.nx,WSt=qSt.nx*YSt.nx-qSt.ny*-YSt.ny,ZSt=Math.asin(Math.max(-1,Math.min(1,ZSt))),Math.abs(ZSt)<1e-6?(GSt=e.x,USt=e.y,VSt=KSt=0):(HSt=!(jSt=1),WSt<0?ZSt<0?ZSt=Math.PI+ZSt:(ZSt=Math.PI-ZSt,jSt=-1,HSt=!0):0<ZSt&&(jSt=-1,HSt=!0),KSt=void 0!==e.radius?e.radius:n,WSt=ZSt/2,ZSt=Math.min(qSt.len/2,YSt.len/2),VSt=i?(XSt=Math.abs(Math.cos(WSt)*KSt/Math.sin(WSt)),ZSt<XSt?(XSt=ZSt,Math.abs(XSt*Math.sin(WSt)/Math.cos(WSt))):KSt):(XSt=Math.min(ZSt,KSt),Math.abs(XSt*Math.sin(WSt)/Math.cos(WSt))),tAt=e.x+YSt.nx*XSt,eAt=e.y+YSt.ny*XSt,GSt=tAt-YSt.ny*VSt*jSt,USt=eAt+YSt.nx*VSt*jSt,QSt=e.x+qSt.nx*XSt,JSt=e.y+qSt.ny*XSt,rAt=e)},"calcCornerArc"),Ae(ukt,"drawPreparedRoundCorner"),Ae(dkt,"getRoundCorner"),RAt={findMidptPtsEtc:function(t,e){var r,n,i,a,o,s,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=Ae(function(t,e,r,n){return n-=e,e=r-t,{x:-n/(r=Math.sqrt(e*e+n*n)),y:e/r}},"recalcVectorNormInverse");switch(t.pstyle("edge-distances").value){case"node-position":s=l;break;case"intersection":s=c;break;case"endpoints":s=p?(o={x1:r=(n=x6t(this.manualEndptToPx(t.source()[0],u),2))[0],y1:n=n[1],x2:i=(a=x6t(this.manualEndptToPx(t.target()[0],d),2))[0],y2:a=a[1]},h=g(r,n,i,a),o):(fTt("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:s,vectorNormInverse:h}},findHaystackPoints:function(t){for(var e=0;e<t.length;e++){var r=t[e],n=(a=r._private).rscratch,i=(n.haystack||(i=2*Math.random()*Math.PI,n.source={x:Math.cos(i),y:Math.sin(i)},i=2*Math.random()*Math.PI,n.target={x:Math.cos(i),y:Math.sin(i)}),a.source),a=a.target,o=i.position(),s=a.position(),l=i.width(),c=a.width(),h=i.height(),a=a.height(),u=r.pstyle("haystack-radius").value/2;n.haystackPts=n.allpts=[n.source.x*l*u+o.x,n.source.y*h*u+o.y,n.target.x*c*u+s.x,n.target.y*a*u+s.y],n.midX=(n.allpts[0]+n.allpts[2])/2,n.midY=(n.allpts[1]+n.allpts[3])/2,n.edgeType="haystack",n.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},findSegmentsPoints:function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),o=t.pstyle("radius-type"),s=Math.min(n.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],c=o.pfValue[o.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<s;h++){var u=n.pfValue[h],d=i.pfValue[h],p=1-u,g=(f=this.findMidptPtsEtc(t,e)).midptPts,f=f.vectorNormInverse,m=g.x1*p+g.x2*u,p=g.y1*p+g.y2*u;r.segpts.push(m+f.x*d,p+f.y*d),r.radii.push(void 0!==a.pfValue[h]?a.pfValue[h]:l),r.isArcRadius.push("arc-radius"===(void 0!==o.pfValue[h]?o.pfValue[h]:c))}},findLoopPoints:function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,e=e.srcPos,o=(o=t.pstyle("control-point-distances"))?o.pfValue[0]:void 0,s=t.pstyle("loop-direction").pfValue,l=t.pstyle("loop-sweep").pfValue,t=t.pstyle("control-point-step-size").pfValue;i.edgeType="self",n&&(r=0,t=o),o=(n=s-Math.PI/2)-l/2,n+=l/2,r=void 0===a[s=s+"_"+l]?a[s]=0:++a[s],i.ctrlpts=[e.x+1.4*Math.cos(o)*t*(r/3+1),e.y+1.4*Math.sin(o)*t*(r/3+1),e.x+1.4*Math.cos(n)*t*(r/3+1),e.y+1.4*Math.sin(n)*t*(r/3+1)]},findCompoundLoopPoints:function(t,e,r,n){var i=t._private.rscratch,a=(i.edgeType="compound",e.srcPos),o=e.tgtPos,s=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,n=(n&&(r=0,h=t),{x:a.x-s/2,y:a.y-l/2}),t={x:o.x-c/2,y:o.y-e/2},a={x:Math.min(n.x,t.x),y:Math.min(n.y,t.y)},l=Math.max(.5,Math.log(.01*s)),o=Math.max(.5,Math.log(.01*c));i.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)*o,a.y]},findStraightEdgePoints:function(t){t._private.rscratch.edgeType="straight"},findBezierPoints:function(t,e,r,n,i){var a=t._private.rscratch,o=t.pstyle("control-point-step-size").pfValue,s=t.pstyle("control-point-distances"),l=t.pstyle("control-point-weights"),c=s&&l?Math.min(s.value.length,l.value.length):1,h=s?s.pfValue[0]:void 0,u=l.value[0],d=n;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var g=(.5-e.eles.length/2+r)*o*(i?-1:1),f=XTt(g),f=(d&&(h=s?s.pfValue[p]:o,u=l.value[p]),void 0!==(m=n?h:void 0!==h?f*h:void 0)?m:g),m=1-u,g=u,y=(v=this.findMidptPtsEtc(t,e)).midptPts,v=v.vectorNormInverse,x=y.x1*m+y.x2*g,m=y.y1*m+y.y2*g;a.ctrlpts.push(x+v.x*f,m+v.y*f)}},findTaxiPoints:function(t,e){var r=t._private.rscratch,n=(r.edgeType="segments","vertical"),i="horizontal",a=e.posPts,o=e.srcW,s=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?(o+l)/2:0,y=c?(s+e)/2:0,v=a.x2-a.x1,x=a.y2-a.y1,m=(b=Ae(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)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=XTt(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0<h||"leftward"===u&&0<h||"rightward"===u&&h<0)||(w=(n*=-1)*Math.abs(w),b=!0),m=p?(d<0?1+d:d)*w:(d<0?w:0)+d*n,g=(y=Ae(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?i?(h=a.y1+m+(c?s/2*n:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,h]):(p=a.x1+m+(c?o/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(p=Math.abs(h)<=s/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)<=o/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,n,i,a,o,s,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,n=e.srcW,i=e.srcH,a=e.tgtW,o=e.tgtH,T=e.srcShape,s=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!it(E.startX)||!it(E.startY),f=!it(E.arrowStartX)||!it(E.arrowStartY),c=!it(E.endX)||!it(E.endY),h=!it(E.arrowEndX)||!it(E.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=KTt({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))<u,p=(d=KTt({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(n,i),y={x:E.ctrlpts[0]+2*k*y,y:E.ctrlpts[1]+2*f*y},T=T.intersectLine(m.x,m.y,n,i,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(n,i),k={x:E.ctrlpts[0]+2*x*w,y:E.ctrlpts[1]+2*b*w},T=s.intersectLine(r.x,r.y,a,o,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,n=t._private.rscratch;if("multibezier"===n.edgeType||"bezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType){n.allpts=[],n.allpts.push(n.startX,n.startY);for(var i,a=0;a+1<n.ctrlpts.length;a+=2)n.allpts.push(n.ctrlpts[a],n.ctrlpts[a+1]),a+3<n.ctrlpts.length&&n.allpts.push((n.ctrlpts[a]+n.ctrlpts[a+2])/2,(n.ctrlpts[a+1]+n.ctrlpts[a+3])/2);n.allpts.push(n.endX,n.endY),n.ctrlpts.length/2%2==0?(i=n.allpts.length/2-1,n.midX=n.allpts[i],n.midY=n.allpts[i+1]):(i=n.allpts.length/2-3,n.midX=JTt(n.allpts[i],n.allpts[i+2],n.allpts[i+4],.5),n.midY=JTt(n.allpts[i+1],n.allpts[i+3],n.allpts[i+5],.5))}else if("straight"===n.edgeType)n.allpts=[n.startX,n.startY,n.endX,n.endY],n.midX=(n.startX+n.endX+n.arrowStartX+n.arrowEndX)/4,n.midY=(n.startY+n.endY+n.arrowStartY+n.arrowEndY)/4;else if("segments"===n.edgeType){if(n.allpts=[],n.allpts.push(n.startX,n.startY),n.allpts.push.apply(n.allpts,n.segpts),n.allpts.push(n.endX,n.endY),n.isRound){n.roundCorners=[];for(var o=2;o+3<n.allpts.length;o+=2){var s=n.radii[o/2-1],l=n.isArcRadius[o/2-1];n.roundCorners.push(dkt({x:n.allpts[o-2],y:n.allpts[o-1]},{x:n.allpts[o],y:n.allpts[o+1],radius:s},{x:n.allpts[o+2],y:n.allpts[o+3]},s,l))}}n.segpts.length%4==0?(t=n.segpts.length/2,n.midX=(n.segpts[i=t-2]+n.segpts[t])/2,n.midY=(n.segpts[1+i]+n.segpts[1+t])/2):(i=n.segpts.length/2-1,n.isRound?(t=n.segpts[i],r=n.segpts[1+i],r=[t-(t=n.roundCorners[i/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}),n.midX=t.cx+r[0],n.midY=t.cy+r[1],n.midVector=r):(n.midX=n.segpts[i],n.midY=n.segpts[1+i]))}},checkForInvalidEdgeWarning:function(t){var e=t[0]._private.rscratch;e.nodesOverlap||it(e.startX)&&it(e.startY)&&it(e.endX)&&it(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,fTt("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 R=this;if(t&&0!==t.length){for(var D=this,O=D.cy.hasCompoundNodes(),P={map:new STt,get:Ae(function(t){var e=this.map.get(t[0]);return null!=e?e.get(t[1]):null},"get"),set:Ae(function(t,e){var r=this.map.get(t[0]);null==r&&(r=new STt,this.map.set(t[0],r)),r.set(t[1],e)},"set")},B=[],e=[],r=0;r<t.length;r++){var n,i,a=t[r],o=a._private,s=a.pstyle("curve-style").value;!a.removed()&&a.takesUpSpace()&&("haystack"===s?e.push(a):(n="unbundled-bezier"===s||s.endsWith("segments")||"straight"===s||"straight-triangle"===s||s.endsWith("taxi"),s="unbundled-bezier"===s||"bezier"===s,i=o.source,o=o.target,i=[i.poolIndex(),o.poolIndex()].sort(),null==(o=P.get(i))&&(P.set(i,o={eles:[]}),B.push(i)),o.eles.push(a),n&&(o.hasUnbundled=!0),s&&(o.hasBezier=!0)))}for(var l=Ae(function(t){var e=P.get(B[t]),r=void 0,n=(e.hasUnbundled||(t=e.eles[0].parallelEdges().filter(function(t){return t.isBundledBezier()}),TTt(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()),i=t.target(),a=(n.poolIndex()>i.poolIndex()&&(t=n,n=i,i=t),e.srcPos=n.position()),o=e.tgtPos=i.position(),s=e.srcW=n.outerWidth(),l=e.srcH=n.outerHeight(),c=e.tgtW=i.outerWidth(),h=e.tgtH=i.outerHeight(),u=e.srcShape=D.nodeShapes[R.getNodeShape(n)],d=e.tgtShape=D.nodeShapes[R.getNodeShape(i)],p=e.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=e.tgtRs=i._private.rscratch,m=e.srcRs=n._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=!n.same(S.source()),M=(e.calculatedIntersection||n===i||!e.hasBezier&&!e.hasUnbundled||(e.calculatedIntersection=!0,v=u.intersectLine(a.x,a.y,s,l,o.x,o.y,0,p,m),x=e.srcIntn=v,b=d.intersectLine(o.x,o.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:o.x,y1:a.y,y2:o.y},_=b[1]-v[1],E=b[0]-v[0],M=Math.sqrt(E*E+_*_),E=e.vector={x:E,y:_},C={x:-(_=e.vectorNorm={x:E.x/M,y:E.y/M}).y,y:_.x},e.nodesOverlap=!it(M)||d.checkPoint(v[0],v[1],0,c,h,o.x,o.y,g,f)||u.checkPoint(b[0],b[1],0,s,l,a.x,a.y,p,m),e.vectorNormInverse=C,r={nodesOverlap:e.nodesOverlap,dirCounts:e.dirCounts,calculatedIntersection:!0,hasBezier:e.hasBezier,hasUnbundled:e.hasUnbundled,eles:e.eles,srcPos:o,tgtPos:a,srcW:c,srcH:h,tgtW:s,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:-_.x,y:-_.y},vectorNormInverse:{x:-C.x,y:-C.y}}),I?r:e);A.nodesOverlap=M.nodesOverlap,A.srcIntn=M.srcIntn,A.tgtIntn=M.tgtIntn,A.isRound=L.startsWith("round"),O&&(n.isParent()||n.isChild()||i.isParent()||i.isChild())&&(n.parents().anySame(i)||i.parents().anySame(n)||n.same(i)&&n.isParent())?R.findCompoundLoopPoints(S,M,y,N):n===i?R.findLoopPoints(S,M,y,N):L.endsWith("segments")?R.findSegmentsPoints(S,M):L.endsWith("taxi")?R.findTaxiPoints(S,M):"straight"===L||!N&&e.eles.length%2==1&&y===Math.floor(e.eles.length/2)?R.findStraightEdgePoints(S):R.findBezierPoints(S,M,y,N,I),R.findEndpoints(S),R.tryToCorrectInvalidPoints(S,M),R.checkForInvalidEdgeWarning(S),R.storeAllpts(S),R.storeEdgeProjections(S),R.calculateArrowAngles(S),R.recalculateEdgeLabelProjections(S),R.calculateLabelAngles(S)}},"_loop"),c=0;c<B.length;c++)l(c);this.findHaystackPoints(e)}}},Ae(pkt,"getPts"),RAt.getSegmentPoints=function(t){var e=t[0]._private.rscratch;if("segments"===e.edgeType)return this.recalculateRenderedStyle(t),pkt(e.segpts)},RAt.getControlPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if("bezier"===r||"multibezier"===r||"self"===r||"compound"===r)return this.recalculateRenderedStyle(t),pkt(e.ctrlpts)},RAt.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,n=t.position(),i=t.outerWidth(),a=t.outerHeight(),o=t._private.rscratch;return 2===e.value.length?(r=[e.pfValue[0],e.pfValue[1]],"%"===e.units[0]&&(r[0]=r[0]*i),"%"===e.units[1]&&(r[1]=r[1]*a),r[0]+=n.x,r[1]+=n.y,r):(r=e.pfValue[0],r=-Math.PI/2+r,e=2*Math.max(i,a),r=[n.x+Math.cos(r)*e,n.y+Math.sin(r)*e],this.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,i,a,r[0],r[1],0,"auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,o))},findEndpoints:function(t){var e,r,n,i,a=t.source()[0],o=t.target()[0],s=a.position(),l=o.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=o._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,_=t.pstyle("target-endpoint"),y=y?"outside-to-node":_.value,C="auto"===o.pstyle("corner-radius").value?"auto":o.pstyle("corner-radius").pfValue,S=(m.srcManEndpt=f,m.tgtManEndpt=_,v?(v=[m.ctrlpts[0],m.ctrlpts[1]],i=x?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:v,n=v):b&&(x=w?m.segpts.slice(0,2):[l.x,l.y],i=w?m.segpts.slice(m.segpts.length-2):[s.x,s.y],n=x),"inside-to-node"===y?e=[l.x,l.y]:_.units?e=this.manualEndptToPx(o,_):"outside-to-line"===y?e=m.tgtIntn:("outside-to-node"===y||"outside-to-node-or-label"===y?S=i:"outside-to-line"!==y&&"outside-to-line-or-label"!==y||(S=[s.x,s.y]),e=this.nodeShapes[this.getNodeShape(o)].intersectLine(l.x,l.y,o.outerWidth(),o.outerHeight(),S[0],S[1],0,C,g),"outside-to-node-or-label"!==y&&"outside-to-line-or-label"!==y||(b=(v=o._private.rscratch).labelWidth,w=v.labelHeight,x=v.labelX,_=v.labelY,C=b/2,g=w/2,"top"===(y=o.pstyle("text-valign").value)?_-=g:"bottom"===y&&(_+=g),"left"===(v=o.pstyle("text-halign").value)?x-=C:"right"===v&&(x+=C),0<(b=R8t(S[0],S[1],[x-C,_-g,x+C,_-g,x+C,_+g,x-C,_+g],l.x,l.y)).length&&(y=ZTt(w=s,GTt(e)),(o=ZTt(w,GTt(b)))<(v=y)&&(e=b,v=o),2<b.length)&&ZTt(w,{x:b[2],y:b[3]})<v&&(e=[b[2],b[3]]))),O8t(e,i,this.arrowShapes[c].spacing(t)+u)),x=O8t(e,i,this.arrowShapes[c].gap(t)+u),E=(m.endX=x[0],m.endY=x[1],m.arrowEndX=S[0],m.arrowEndY=S[1],"inside-to-node"===T?e=[s.x,s.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=n:"outside-to-line"!==T&&"outside-to-line-or-label"!==T||(r=[l.x,l.y]),e=this.nodeShapes[this.getNodeShape(a)].intersectLine(s.x,s.y,a.outerWidth(),a.outerHeight(),r[0],r[1],0,E,p),"outside-to-node-or-label"!==T&&"outside-to-line-or-label"!==T||(_=(C=a._private.rscratch).labelWidth,g=C.labelHeight,y=C.labelX,o=C.labelY,w=_/2,v=g/2,"top"===(b=a.pstyle("text-valign").value)?o-=v:"bottom"===b&&(o+=v),"left"===(i=a.pstyle("text-halign").value)?y-=w:"right"===i&&(y+=w),0<(c=R8t(r[0],r[1],[y-w,o-v,y+w,o-v,y+w,o+v,y-w,o+v],s.x,s.y)).length&&(x=ZTt(u=l,GTt(e)),(S=ZTt(u,GTt(c)))<(f=x)&&(e=[c[0],c[1]],f=S),2<c.length)&&ZTt(u,{x:c[2],y:c[3]})<f&&(e=[c[2],c[3]]))),O8t(e,n,this.arrowShapes[h].spacing(t)+d)),p=O8t(e,n,this.arrowShapes[h].gap(t)+d);m.startX=p[0],m.startY=p[1],m.arrowStartX=E[0],m.arrowStartY=E[1],k&&(it(m.startX)&&it(m.startY)&&it(m.endX)&&it(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={},Ae(gkt,"pushBezierPts"),OAt.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,"multibezier"===n||"bezier"===n||"self"===n||"compound"===n){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)gkt(this,t,r.allpts.slice(i,i+6))}else if("segments"===n)for(var a=e.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else"haystack"===n&&(n=r.haystackPts,e.rstyle.haystackPts=[{x:n[0],y:n[1]},{x:n[2],y:n[3]}]);e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},OAt.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)},j={recalculateNodeLabelProjection:function(t){var e=t.pstyle("label").strValue;if(!Xkt(e)){var r,n,e=t._private,i=t.width(),a=t.height(),o=t.padding(),s=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=s.x-i/2-o;break;case"right":r=s.x+i/2+o;break;default:r=s.x}switch(c){case"top":n=s.y-a/2-o;break;case"bottom":n=s.y+a/2+o;break;default:n=s.y}h.labelX=r,h.labelY=n,e.labelX=r,e.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}}},oAt=Ae(function(t,e){return e=Math.atan(e/t),0===t&&e<0&&(e*=-1),e},"lineAngleFromDelta"),sAt=Ae(function(t,e){var r=e.x-t.x,e=e.y-t.y;return oAt(r,e)},"lineAngle"),lAt=Ae(function(t,e,r,n){var i=r8t(0,n-.001,1),n=r8t(0,n+.001,1),i=t8t(t,e,r,i),t=t8t(t,e,r,n);return sAt(i,t)},"bezierAngle"),j.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)&&(_={x:A.midX,y:A.midY},(C=Ae(function(t,e,r){CTt(p.rscratch,t,e,r),CTt(p.rstyle,t,e,r)},"setRs"))("labelX",null,_.x),C("labelY",null,_.y),t=oAt(A.midDispX,A.midDispY),C("labelAutoAngle",null,t),S=Ae(function t(){if(t.cache)return t.cache;for(var e=[],r=0;r+5<A.allpts.length;r+=4){var n={x:A.allpts[r],y:A.allpts[r+1]},i={x:A.allpts[r+2],y:A.allpts[r+3]},a={x:A.allpts[r+4],y:A.allpts[r+5]};e.push({p0:n,p1:i,p2:a,startDist:0,length:0,segments:[]})}var o=p.rstyle.bezierPts,s=g.bezierProjPcts.length;function l(t,e,r,n,i){var a=KTt(e,r),o=t.segments[t.segments.length-1],e={p0:e,p1:r,t0:n,t1:i,startDist:o?o.startDist+o.length:0,length:a};t.segments.push(e),t.length+=a}Ae(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,o[c*s],0,g.bezierProjPcts[0]);for(var d=0;d<s-1;d++)l(h,o[c*s+d],o[c*s+d+1],g.bezierProjPcts[d],g.bezierProjPcts[d+1]);l(h,o[c*s+s-1],h.p2,g.bezierProjPcts[s-1],1)}return t.cache=e},"createControlPointInfo"),(t=Ae(function(t){var e,r="source"===t;if(L[t]){var n=E.pstyle(t+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var i,a=S(),o=0,s=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,o=s;if(n<=(s+=u.length)||d){i={cp:c,segment:u};break}}if(i)break}var p=i.cp,g=(n-o)/(m=i.segment).length,f=m.t1-m.t0,m=r?m.t0+f*g:m.t1-f*g,m=r8t(0,m,1);_=t8t(p.p0,p.p1,p.p2,m),e=lAt(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,!(n<=(w+=y=KTt(x,b))));T+=2);f=r8t(0,(n-v)/y,1),_=e8t(x,b,f),e=sAt(x,b)}C("labelX",t,_.x),C("labelY",t,_.y),C("labelAutoAngle",t,e)}},"calculateEndProjection"))("source"),t("target"),this.applyLabelDimensions(E))},j.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},j.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),n=this.calculateLabelDimensions(t,n),i=t.pstyle("line-height").pfValue,t=t.pstyle("text-wrap").strValue,a=_Tt(r.rscratch,"labelWrapCachedLines",e)||[],t="wrap"!==t?1:Math.max(a.length,1),o=(a=n.height/t)*i,s=n.width,n=n.height+(t-1)*(i-1)*a;CTt(r.rstyle,"labelWidth",e,s),CTt(r.rscratch,"labelWidth",e,s),CTt(r.rstyle,"labelHeight",e,n),CTt(r.rscratch,"labelHeight",e,n),CTt(r.rscratch,"labelLineHeight",e,o)},j.getLabelText=function(t,r){var n=t._private,e=t.pstyle((r?r+"-":"")+"label").strValue,i=t.pstyle("text-transform").value,a=Ae(function(t,e){return e?(CTt(n.rscratch,t,r,e),e):_Tt(n.rscratch,t,r)},"rscratch");if(!e)return"";if("none"!=i&&("uppercase"==i?e=e.toUpperCase():"lowercase"==i&&(e=e.toLowerCase())),"wrap"===(i=t.pstyle("text-wrap").value)){var o=a("labelKey");if(null!=o&&a("labelWrapKey")===o)return a("labelWrapCachedText");for(var s=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<s.length;d++){var p=s[d],g=this.calculateLabelDimensions(t,p).width;if(c&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=_6t(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],w=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?w:m+w+b;this.calculateLabelDimensions(t,k).width<=l?m+=w+b:(m&&h.push(m),m=w+b)}}catch(t){v.e(t)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),e=a("labelWrapCachedText",h.join(`
|
|
|
`)),a("labelWrapKey",o)}else if("ellipsis"===i){var T=t.pstyle("text-max-width").pfValue,E="",_=!1;if(this.calculateLabelDimensions(t,e).width<T)return e;for(var C=0;C<e.length&&!(T<this.calculateLabelDimensions(t,E+e[C]+"…").width);C++)E+=e[C],C===e.length-1&&(_=!0);return _||(E+="…"),E}return e},j.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},j.calculateLabelDimensions=function(t,e){var r=this.cy.window().document,n=rTt(e,t._private.labelDimsKey),i=this.labelDimCache||(this.labelDimCache=[]);if(null!=(a=i[n]))return a;var a=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,s=t.pstyle("font-family").strValue,t=t.pstyle("font-weight").strValue,l=this.labelCalcCanvas,c=this.labelCalcCanvasContext;l||(l=this.labelCalcCanvas=r.createElement("canvas"),c=this.labelCalcCanvasContext=l.getContext("2d"),(r=l.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),c.font="".concat(a," ").concat(t," ").concat(o,"px ").concat(s);for(var h=0,u=0,d=e.split(`
|
|
|
`),p=0;p<d.length;p++){var g=d[p],g=c.measureText(g),g=Math.ceil(g.width),f=o,h=Math.max(g,h);u+=f}return i[n]={width:h+=0,height:u+=0}},j.calculateLabelAngle=function(t,e){var r=t._private.rscratch,n=t.isEdge();return"none"===(e=(t=t.pstyle((e?e+"-":"")+"text-rotation")).strValue)?0:n&&"autorotate"===e?r.labelAutoAngle:"autorotate"===e?0:t.pfValue},j.calculateLabelAngles=function(t){var e=t.isEdge(),r=t._private.rscratch;r.labelAngle=this.calculateLabelAngle(t),e&&(r.sourceLabelAngle=this.calculateLabelAngle(t,"source"),r.targetLabelAngle=this.calculateLabelAngle(t,"target"))},cAt=!1,hAt={},[IAt,MAt,RAt,DAt,OAt,j,{getNodeShape:function(t){var e=t.pstyle("shape").value;return"cutrectangle"===e&&(t.width()<28||t.height()<28)?(cAt||(fTt("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),cAt=!0),"rectangle"):t.isParent()?"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle":"polygon"===e?(t=t.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(t).name):e}},{registerCalculationListeners:function(){var o=this.cy,s=o.collection(),l=this,c=Ae(function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(s.merge(t),e)for(var r=0;r<t.length;r++){var n=t[r]._private.rstyle;n.clean=!1,n.cleanConnected=!1}},"enqueue"),t=(l.binder(o).on("bounds.* dirty.*",Ae(function(t){t=t.target,c(t)},"onDirtyBounds")).on("style.* background.*",Ae(function(t){t=t.target,c(t,!1)},"onDirtyStyle")),Ae(function(t){if(t){var e=l.onUpdateEleCalcsFns;s.cleanStyle();for(var r=0;r<s.length;r++){var n=s[r],i=n._private.rstyle;n.isNode()&&!i.cleanConnected&&(c(n.connectedEdges()),i.cleanConnected=!0)}if(e)for(var a=0;a<e.length;a++)(0,e[a])(t,s);l.recalculateRenderedStyle(s),s=o.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){t(!0)},l.beforeRender(t,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var r=Ae(function(t){return t._private.rstyle.cleanConnected},"isCleanConnected"),n=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var o=t[a],s=o._private,l=s.rstyle;!o.isEdge()||r(o.source())&&r(o.target())||(l.clean=!1),e&&l.clean||o.removed()||"none"===o.pstyle("display").value||(("nodes"===s.group?i:n).push(o),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var p=0;p<n.length;p++){var g=(f=n[p]._private).rstyle,f=f.rscratch;g.srcX=f.arrowStartX,g.srcY=f.arrowStartY,g.tgtX=f.arrowEndX,g.tgtY=f.arrowEndY,g.midX=f.midX,g.midY=f.midY,g.labelAngle=f.labelAngle,g.sourceLabelAngle=f.sourceLabelAngle,g.targetLabelAngle=f.targetLabelAngle}}}},{updateCachedGrabbedEles:function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=(i=t[r])._private.rscratch;(i.grabbed()&&!i.isParent()?e:n.inDragLayer?t.drag:t.nondrag).push(i)}for(r=0;r<e.length;r++){var i=e[r];t.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){var e;return t||!this.cachedZSortedEles?((e=this.cy.mutableElements().toArray()).sort(HCt),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()):e=this.cachedZSortedEles,e}}].forEach(function(t){l7t(hAt,t)}),YAt={getCachedImage:function(t,e,r){var n,i=this.imageCache=this.imageCache||{},a=i[t];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((n=(a=i[t]=i[t]||{}).image=new Image).addEventListener("load",r),n.addEventListener("error",function(){n.error=!0}),"data:"!==t.substring(0,"data:".length).toLowerCase()&&(n.crossOrigin=e="null"===e?null:e),n.src=t,n)}},jAt={registerBinding:function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]),t=this.binder(t);return t.on.apply(t,i)},binder:function(i){var a=this,t=a.cy.window(),o=i===t||i===t.document||i===t.document.body||Kkt(i);if(null==a.supportsPassiveEvents){var e=!1;try{var r=Object.defineProperty({},"passive",{get:Ae(function(){return e=!0},"get")});t.addEventListener("test",null,r)}catch{}a.supportsPassiveEvents=e}return{on:t=Ae(function(t,e,r){var n=Array.prototype.slice.call(arguments);return o&&a.supportsPassiveEvents&&(n[2]={capture:r??!1,passive:!1,once:!1}),a.bindings.push({target:i,args:n}),(i.addEventListener||i.on).apply(i,n),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=Ae(function(t){return t.selected()},"isSelected"),I=Ae(function(t,e,r,n){null==t&&(t=N.cy);for(var i=0;i<e.length;i++){var a=e[i];t.emit({originalEvent:r,type:a,position:n})}},"triggerEvents"),v=Ae(function(t){return t.shiftKey||t.metaKey||t.ctrlKey},"isMultSelKeyDown"),M=Ae(function(t,e){var r=!0;if(N.cy.hasCompoundNodes()&&t&&t.pannable()){for(var n=0;e&&n<e.length;n++)if((t=e[n]).isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),w=Ae(function(t){t[0]._private.grabbed=!0},"setGrabbed"),k=Ae(function(t){t[0]._private.grabbed=!1},"setFreed"),n=Ae(function(t){t[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),T=Ae(function(t){t[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),E=Ae(function(t){t[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),_=Ae(function(t){t[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),i=Ae(function(t,e){(e=e.addToList).has(t)||!t.grabbable()||t.locked()||(e.merge(t),w(t))},"addToDragList"),C=Ae(function(t,e){!t.cy().hasCompoundNodes()||null==e.inDragLayer&&null==e.addToList||(t=t.descendants(),e.inDragLayer&&(t.forEach(n),t.connectedEdges().forEach(n)),e.addToList&&i(t,e))},"addDescendantsToDrag"),R=Ae(function(t,e){e=e||{};var r=t.cy().hasCompoundNodes();e.inDragLayer&&(t.forEach(n),t.neighborhood().stdFilter(function(t){return!r||t.isEdge()}).forEach(n)),e.addToList&&t.forEach(function(t){i(t,e)}),C(t,e),A(t,{inDragLayer:e.inDragLayer}),N.updateCachedGrabbedEles()},"addNodesToDrag"),S=R,D=Ae(function(t){t&&(N.getCachedZSortedEles().forEach(function(t){k(t),T(t),_(t)}),N.updateCachedGrabbedEles())},"freeDraggedElements"),A=Ae(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(n),r.forEach(n)),e.addToList&&r.forEach(function(t){i(t,e)}))},"updateAncestorsInDragLayer"),L=Ae(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),e=typeof MutationObserver<"u",j=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 n=0;n<r.length;n++)if(r[n]===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()}),q7t(function(){N.cy.resize()},100)),e=(e&&(N.styleObserver=new MutationObserver(r),N.styleObserver.observe(N.container,{attributes:!0})),N.registerBinding(t,"resize",r),j&&(N.resizeObserver=new ResizeObserver(r),N.resizeObserver.observe(N.container)),Ae(function(t,e){for(;null!=t;)e(t),t=t.parentNode},"forEachUp")),a=Ae(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()}),Ae(function(){return 0!==N.selection[4]},"inBoxSelection")),O=Ae(function(t){for(var e=N.findContainerClientCoords(),r=e[0],n=e[1],i=e[2],a=e[3],o=t.touches||[t],s=!1,l=0;l<o.length;l++){var c=o[l];if(r<=c.clientX&&c.clientX<=r+i&&n<=c.clientY&&c.clientY<=n+a){s=!0;break}}if(!s)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"),W=(N.registerBinding(N.container,"mousedown",Ae(function(e){var t,r,n,i,a,o,s,l,c,h;!O(e)||1===N.hoverData.which&&1!==e.which||(e.preventDefault(),L(),N.hoverData.capture=!0,N.hoverData.which=e.which,t=N.cy,o=[e.clientX,e.clientY],r=N.projectIntoViewport(o[0],o[1]),n=N.selection,a=(i=N.findNearestElements(r[0],r[1],!0,!1))[0],c=N.dragData.possibleDragElements,N.hoverData.mdownPos=r,N.hoverData.mdownGPos=o,o=Ae(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)&&(s=Ae(function(t){return{originalEvent:e,type:t,position:{x:r[0],y:r[1]}}},"makeEvent"),l=Ae(function(t){t.emit(s("grab"))},"triggerGrab"),E(a),a.selected()?(c=N.dragData.possibleDragElements=t.collection(),h=t.$(function(t){return t.isNode()&&t.selected()&&N.nodeIsGrabbable(t)}),R(h,{addToList:c}),a.emit(s("grabon")),h.forEach(l)):(c=N.dragData.possibleDragElements=t.collection(),S(a,{addToList:c}),a.emit(s("grabon")).emit(s("grab"))),N.redrawHint("eles",!0),N.redrawHint("drag",!0)),N.hoverData.down=a,N.hoverData.downs=i,N.hoverData.downTime=(new Date).getTime(),I(a,["mousedown","tapstart","vmousedown"],e,{x:r[0],y:r[1]}),null==a?(n[4]=1,N.data.bgActivePosistion={x:r[0],y:r[1]},N.redrawHint("select",!0),N.redraw()):a.pannable()&&(n[4]=1),o()),n[0]=n[2]=r[0],n[1]=n[3]=r[1])},"mousedownHandler"),!1),N.registerBinding(t,"mousemove",Ae(function(t){if(N.hoverData.capture||O(t)){var e,r,n,i=!1,a=N.cy,o=a.zoom(),s=[t.clientX,t.clientY],l=N.projectIntoViewport(s[0],s[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=s[0]-h[0],s=s[1]-h[1],N.hoverData.isOverThresholdDrag=e=e*e+s*s>=N.desktopTapThreshold2),v(t)),s=(e&&(N.hoverData.tapholdCancelled=!0),Ae(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=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),Ae(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?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,n={x:(l[0]-r[0])*o,y:(l[1]-r[1])*o},N.hoverData.justStartedPan=!1):n={x:f[0]*o,y:f[1]*o},a.panBy(n),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||R(m,{inDragLayer:!0}),o={x:0,y:0},it(f[0])&&it(f[1])&&(o.x+=f[0],o.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&it(n[0])&&it(n[1])&&(o.x+=n[0],o.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(o).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):s()),i=!0):e&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&M(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=GTt(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(t,"mouseup",Ae(function(t){var e,r,n,i,a,o,s,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),n=N.selection,s=N.findNearestElement(r[0],r[1],!0,!1),i=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?(o={originalEvent:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(o),N.hoverData.cxtDragged||(o={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(o)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(s,["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<i.length&&N.redrawHint("eles",!0),N.dragData.possibleDragElements=i=e.collection()),s!=a||N.dragData.didDrag||N.hoverData.selecting||null==s||!s._private.selectable||(N.hoverData.dragging||("additive"===e.selectionType()||l?s.selected()?s.unselect(["tapunselect"]):s.select(["tapselect"]):l||(e.$(d).unmerge(s).unselect(["tapunselect"]),s.select(["tapselect"]))),N.redrawHint("eles",!0)),N.hoverData.selecting&&(o=e.collection(N.getAllInBox(n[0],n[1],n[2],n[3])),N.redrawHint("select",!0),0<o.length&&N.redrawHint("eles",!0),e.emit({type:"boxend",originalEvent:t,position:{x:r[0],y:r[1]}}),s=Ae(function(t){return t.selectable()&&!t.selected()},"eleWouldBeSelected"),"additive"===e.selectionType()||l||e.$(d).unmerge(o).unselect(),o.emit("box").stdFilter(s).select().emit("boxselect"),N.redraw()),N.hoverData.dragging&&(N.hoverData.dragging=!1,N.redrawHint("select",!0),N.redrawHint("eles",!0),N.redraw()),n[4]||(N.redrawHint("drag",!0),N.redrawHint("eles",!0),l=a&&a.grabbed(),D(i),l&&(a.emit("freeon"),i.emit("free"),N.dragData.didDrag)&&(a.emit("dragfreeon"),i.emit("dragfree")))),n[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)},"mouseupHandler"),!1),Ae(function(t){var e,r,n,i;N.scrollingPage||(n=(e=N.cy).zoom(),i=e.pan(),r=[(r=N.projectIntoViewport(t.clientX,t.clientY))[0]*n+i.x,r[1]*n+i.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),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=N.wheelSensitivity,1===t.deltaMode&&(n*=33),i=e.zoom()*Math.pow(10,n),"gesturechange"===t.type&&(i=N.gestureStartZoom*t.scale),e.zoom({level:i,renderedPosition:{x:r[0],y:r[1]}}),e.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")))},"wheelHandler"));N.registerBinding(N.container,"wheel",W,!0),N.registerBinding(t,"scroll",Ae(function(t){N.scrollingPage=!0,clearTimeout(N.scrollingPageTimeout),N.scrollingPageTimeout=setTimeout(function(){N.scrollingPage=!1},250)},"scrollHandler"),!0),N.registerBinding(N.container,"gesturestart",Ae(function(t){N.gestureStartZoom=N.cy.zoom(),N.hasTouchStarted||t.preventDefault()},"gestureStartHandler"),!0),N.registerBinding(N.container,"gesturechange",function(t){N.hasTouchStarted||W(t)},!0),N.registerBinding(N.container,"mouseout",Ae(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",Ae(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,Y,p,g,V,X,K,Z,Q,f,m,y,o,s,J,tt,l,et,x,b,rt=Ae(function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))},"distance"),nt=Ae(function(t,e,r,n){return(r-t)*(r-t)+(n-e)*(n-e)},"distanceSq");N.registerBinding(N.container,"touchstart",X=Ae(function(e){if(N.hasTouchStarted=!0,O(e)){L(),N.touchData.capture=!0,N.data.bgActivePosistion=void 0;var t,r,n,i=N.cy,a=N.touchData.now,o=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 s=N.findContainerClientCoords(),s=(q=s[0],Y=s[1],p=s[2],g=s[3],P=e.touches[0].clientX-q,B=e.touches[0].clientY-Y,F=e.touches[1].clientX-q,$=e.touches[1].clientY-Y,V=0<=P&&P<=p&&0<=F&&F<=p&&0<=B&&B<=g&&0<=$&&$<=g,i.pan()),l=i.zoom();if(z=rt(P,B,F,$),G=nt(P,B,F,$),U=[((p=[(P+F)/2,(B+$)/2])[0]-s.x)/l,(p[1]-s.y)/l],G<4e4&&!e.touches[2])return s=N.findNearestElement(a[0],a[1],!0,!0),l=N.findNearestElement(a[2],a[3],!0,!0),s&&s.isNode()?(s.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=s):l&&l.isNode()?(l.activate().emit({originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}}),N.touchData.start=l):i.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]?i.boxSelectionEnabled()&&e.preventDefault():e.touches[1]||e.touches[0]&&(null!=(l=(s=N.findNearestElements(a[0],a[1],!0,!0))[0])&&(l.activate(),N.touchData.start=l,N.touchData.starts=s,N.nodeIsGrabbable(l))&&(s=N.dragData.touchDragEles=i.collection(),N.redrawHint("eles",!(r=null)),N.redrawHint("drag",!0),l.selected()?(r=i.$(function(t){return t.selected()&&N.nodeIsGrabbable(t)}),R(r,{addToList:s})):S(l,{addToList:s}),E(l),n=Ae(function(t){return{originalEvent:e,type:t,position:{x:a[0],y:a[1]}}},"makeEvent"),l.emit(n("grabon")),r?r.forEach(function(t){t.emit(n("grab"))}):l.emit(n("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]=o[h]=a[h];i=e.touches[0],N.touchData.startGPosition=[i.clientX,i.clientY]}}},"touchstartHandler"),!1),N.registerBinding(t,"touchmove",K=Ae(function(t){var e=N.touchData.capture;if(e||O(t)){var r=N.selection,n=N.cy,i=N.touchData.now,a=N.touchData.earlier,o=n.zoom(),s=(t.touches[0]&&(S=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=S[0],i[1]=S[1]),t.touches[1]&&(S=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=S[0],i[3]=S[1]),t.touches[2]&&(S=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=S[0],i[5]=S[1]),N.touchData.startGPosition);if(e&&t.touches[0]&&s){for(var l=[],c=0;c<i.length;c++)l[c]=i[c]-a[c];var h=t.touches[0].clientX-s[0],u=t.touches[0].clientY-s[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-Y,w=t.touches[1].clientX-q,k=t.touches[1].clientY-Y,2.25<=(s=nt(x,b,w,k))/G||22500<=s)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,type:"cxttapend",position:{x:i[0],y:i[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):n.emit(p)),e&&N.touchData.cxt){var p={originalEvent:t,type:"cxtdrag",position:{x:i[0],y:i[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||n).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(i[0],i[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(e&&t.touches[2]&&n.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:t,type:"boxstart",position:{x:i[0],y:i[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(e&&t.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.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,s=N.touchData.start,x=t.touches[0].clientX-q,b=t.touches[0].clientY-Y,w=t.touches[1].clientX-q,k=t.touches[1].clientY-Y,r=(p=rt(x,b,w,k))/z;V&&(v=(x-P+(w-F))/2,_=(b-B+(k-$))/2,r=(L=n.zoom())*r,E=n.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-_)+y},s&&s.active()&&(T=N.dragData.touchDragEles,D(T),N.redrawHint("drag",!0),N.redrawHint("eles",!0),s.unactivate().emit("freeon"),T.emit("free"),N.dragData.didDrag)&&(s.emit("dragfreeon"),T.emit("dragfree")),n.viewport({zoom:r,pan:v,cancelOnFailedZoom:!0}),n.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),i[0]=S[0],i[1]=S[1]),t.touches[1]&&(S=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=S[0],i[3]=S[1]),t.touches[2]&&(S=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=S[0],i[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(i[0],i[1],!0,!0)),e&&null!=A&&t.preventDefault(),e&&null!=A&&N.nodeIsDraggable(A)&&(d?(T=N.dragData.touchDragEles,(E=!N.dragData.didDrag)&&R(T,{inDragLayer:!0}),N.dragData.didDrag=!0,_={x:0,y:0},it(l[0])&&it(l[1])&&(_.x+=l[0],_.y+=l[1],E)&&(N.redrawHint("eles",!0),(C=N.touchData.dragDelta)&&it(C[0])&&it(C[1])&&(_.x+=C[0],_.y+=C[1])),N.hoverData.draggingEles=!0,T.silentShift(_).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===(C=N.touchData.dragDelta=N.touchData.dragDelta||[]).length?(C.push(l[0]),C.push(l[1])):(C[0]+=l[0],C[1]+=l[1])),I(A||g,["touchmove","tapdrag","vmousemove"],t,{x:i[0],y:i[1]}),A&&A.grabbed()||g==L||(L&&L.emit({originalEvent:t,type:"tapdragout",position:{x:i[0],y:i[1]}}),!g)||g.emit({originalEvent:t,type:"tapdragover",position:{x:i[0],y:i[1]}}),N.touchData.last=g,e)for(f=0;f<i.length;f++)i[f]&&N.touchData.startPosition[f]&&d&&(N.touchData.singleTouchMoved=!0);e&&(null==A||A.pannable())&&n.panningEnabled()&&n.userPanningEnabled()&&(M(A,N.touchData.starts)&&(t.preventDefault(),N.data.bgActivePosistion||(N.data.bgActivePosistion=GTt(N.touchData.startPosition)),N.swipePanning?(n.panBy({x:l[0]*o,y:l[1]*o}),n.emit("dragpan")):d&&(N.swipePanning=!0,n.panBy({x:h*o,y:u*o}),n.emit("dragpan"),A)&&(A.unactivate(),N.redrawHint("select",!0),N.touchData.start=null)),S=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=S[0],i[1]=S[1])}for(c=0;c<i.length;c++)a[c]=i[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",Z=Ae(function(t){var e=N.touchData.start;N.touchData.capture=!1,e&&e.unactivate()},"touchcancelHandler")),N.registerBinding(t,"touchend",Q=Ae(function(t){var e=N.touchData.start;if(N.touchData.capture){0===t.touches.length&&(N.touchData.capture=!1),t.preventDefault();var r,n=N.selection,i=(N.swipePanning=!1,N.hoverData.draggingEles=!1,N.cy),a=i.zoom(),o=N.touchData.now,s=N.touchData.earlier;if(t.touches[0]&&(r=N.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),o[0]=r[0],o[1]=r[1]),t.touches[1]&&(r=N.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),o[2]=r[0],o[3]=r[1]),t.touches[2]&&(r=N.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),o[4]=r[0],o[5]=r[1]),e&&e.unactivate(),N.touchData.cxt)r={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}},(e||i).emit(r),N.touchData.cxtDragged||(r={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}},(e||i).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]&&i.boxSelectionEnabled()&&N.touchData.selecting&&(N.touchData.selecting=!1,r=i.collection(N.getAllInBox(n[0],n[1],n[2],n[3])),n[0]=void 0,n[1]=void 0,n[2]=void 0,n[3]=void 0,n[4]=0,N.redrawHint("select",!0),i.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}}),n=Ae(function(t){return t.selectable()&&!t.selected()},"eleWouldBeSelected"),r.emit("box").stdFilter(n).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),n=N.dragData.touchDragEles,null!=e?(r=e._private.grabbed,D(n),N.redrawHint("drag",!0),N.redrawHint("eles",!0),r&&(e.emit("freeon"),n.emit("free"),N.dragData.didDrag)&&(e.emit("dragfreeon"),n.emit("dragfree")),I(e,["touchend","tapend","vmouseup","tapdragout"],t,{x:o[0],y:o[1]}),e.unactivate(),N.touchData.start=null):(r=N.findNearestElement(o[0],o[1],!0,!0),I(r,["touchend","tapend","vmouseup","tapdragout"],t,{x:o[0],y:o[1]})),n=((n=N.touchData.startPosition[0]-o[0])*n+(r=N.touchData.startPosition[1]-o[1])*r)*a*a,N.touchData.singleTouchMoved||(e||i.$(":selected").unselect(["tapunselect"]),I(e,["tap","vclick"],t,{x:o[0],y:o[1]}),f=!1,t.timeStamp-y<=i.multiClickDebounceTime()?(m&&clearTimeout(m),f=!0,y=null,I(e,["dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(m=setTimeout(function(){f||I(e,["onetap","voneclick"],t,{x:o[0],y:o[1]})},i.multiClickDebounceTime()),y=t.timeStamp)),null!=e&&!N.dragData.didDrag&&e._private.selectable&&n<N.touchTapThreshold2&&!N.pinching&&("single"===i.selectionType()?(i.$(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<o.length;l++)s[l]=o[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&&(o=[],s=Ae(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"),J=Ae(function(t){return{event:t,touch:s(t)}},"makePointer"),tt=Ae(function(t){o.push(J(t))},"addPointer"),l=Ae(function(t){for(var e=0;e<o.length;e++)if(o[e].event.pointerId===t.pointerId)return void o.splice(e,1)},"removePointer"),et=Ae(function(e){var t=o.filter(function(t){return t.event.pointerId===e.pointerId})[0];t.event=e,t.touch=s(e)},"updatePointer"),x=Ae(function(t){t.touches=o.map(function(t){return t.touch})},"addTouchesToEvent"),b=Ae(function(t){return"mouse"===t.pointerType||4===t.pointerType},"pointerIsMouse"),N.registerBinding(N.container,"pointerdown",function(t){b(t)||(t.preventDefault(),tt(t),x(t),X(t))}),N.registerBinding(N.container,"pointerup",function(t){b(t)||(l(t),x(t),Q(t))}),N.registerBinding(N.container,"pointercancel",function(t){b(t)||(l(t),x(t),Z(t))}),N.registerBinding(N.container,"pointermove",function(t){b(t)||(t.preventDefault(),et(t),x(t),K(t))}))}},HAt={generatePolygon:function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:Ae(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl("polygon",t,e,r,n,i,this.points)},"draw"),intersectLine:Ae(function(t,e,r,n,i,a,o,s){return R8t(i,a,this.points,t,e,r/2,n/2,o)},"intersectLine"),checkPoint:Ae(function(t,e,r,n,i,a,o,s){return E8t(t,e,this.points,a,o,n,i,[0,-1],r)},"checkPoint")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:Ae(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},"draw"),intersectLine:Ae(function(t,e,r,n,i,a,o,s){return A8t(i,a,t,e,r/2+o,n/2+o)},"intersectLine"),checkPoint:Ae(function(t,e,r,n,i,a,o,s){return L8t(t,e,n,i,a,o,r)},"checkPoint")}},generateRoundPolygon:function(t,m){return this.nodeShapes[t]={renderer:this,name:t,points:m,getOrCreateCorners:Ae(function(t,e,r,n,i,a,o){if(void 0===a[o]||a[o+"-cx"]!==t||a[o+"-cy"]!==e){a[o]=new Array(m.length/2),a[o+"-cx"]=t,a[o+"-cy"]=e;var s=r/2,l=n/2;i="auto"===i?z8t(r,n):i;for(var c=new Array(m.length/2),h=0;h<m.length/2;h++)c[h]={x:t+s*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[o][f]=dkt(g,u,d,i),g=u}return a[o]},"getOrCreateCorners"),draw:Ae(function(t,e,r,n,i,a,o){this.renderer.nodeShapeImpl("round-polygon",t,e,r,n,i,this.points,this.getOrCreateCorners(e,r,n,i,a,o,"drawCorners"))},"draw"),intersectLine:Ae(function(t,e,r,n,i,a,o,s,l){return D8t(i,a,this.points,t,e,r,n,o,this.getOrCreateCorners(t,e,r,n,s,l,"corners"))},"intersectLine"),checkPoint:Ae(function(t,e,r,n,i,a,o,s,l){return _8t(t,e,this.points,a,o,n,i,this.getOrCreateCorners(a,o,n,i,s,l,"corners"))},"checkPoint")}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:P8t(4,0),draw:Ae(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,this.points,a)},"draw"),intersectLine:Ae(function(t,e,r,n,i,a,o,s){return m8t(i,a,t,e,r,n,o,s)},"intersectLine"),checkPoint:Ae(function(t,e,r,n,i,a,o,s){var l=n/2,c=i/2,h=(s="auto"===s?$8t(n,i):s,2*(s=Math.min(l,c,s)));return!!(E8t(t,e,this.points,a,o,n,i-h,[0,-1],r)||E8t(t,e,this.points,a,o,n-h,i,[0,-1],r)||L8t(t,e,h,h,a-l+s,o-c+s,r)||L8t(t,e,h,h,a+l-s,o-c+s,r)||L8t(t,e,h,h,a+l-s,o+c-s,r)||L8t(t,e,h,h,a-l+s,o+c-s,r))},"checkPoint")}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:G8t(),points:P8t(4,0),draw:Ae(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,null,a)},"draw"),generateCutTrianglePts:Ae(function(t,e,r,n,i){var a=r-(t/=2),r=r+t;return{topLeft:[a,(t=n-(e/=2))+(i="auto"===i?this.cornerLength:i),a+i,t,a+i,t+i],topRight:[r-i,t,r,t+i,r-i,t+i],bottomRight:[r,(n+=e)-i,r-i,n,r-i,n-i],bottomLeft:[a+i,n,a,n-i,a+i,n-i]}},"generateCutTrianglePts"),intersectLine:Ae(function(t,e,r,n,i,a,o,s){return r=this.generateCutTrianglePts(r+2*o,n+2*o,t,e,s),n=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),R8t(i,a,n,t,e)},"intersectLine"),checkPoint:Ae(function(t,e,r,n,i,a,o,s){return s="auto"===s?this.cornerLength:s,!(!E8t(t,e,this.points,a,o,n,i-2*s,[0,-1],r)&&!E8t(t,e,this.points,a,o,n-2*s,i,[0,-1],r))||(s=this.generateCutTrianglePts(n,i,a,o),T8t(t,e,s.topLeft))||T8t(t,e,s.topRight)||T8t(t,e,s.bottomRight)||T8t(t,e,s.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:P8t(4,0),draw:Ae(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},"draw"),intersectLine:Ae(function(t,e,r,n,i,a,o,s){return r=this.generateBarrelBezierPts(r+2*o,n+2*o,t,e),n=Ae(function(t){var e=t8t({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.15),r=t8t({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.5),n=t8t({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,n.x,n.y,t[4],t[5]]},"approximateBarrelCurvePts"),o=[].concat(n(r.topLeft),n(r.topRight),n(r.bottomRight),n(r.bottomLeft)),R8t(i,a,o,t,e)},"intersectLine"),generateBarrelBezierPts:Ae(function(t,e,r,n){var i=e/2,a=r-(o=t/2),r=r+o,o=n-i,n=n+i,e=(i=q8t(t,e)).heightOffset,s=i.widthOffset;return(t={topLeft:[a,o+e,a+(i=i.ctrlPtOffsetPct*t),o,a+s,o],topRight:[r-s,o,r-i,o,r,o+e],bottomRight:[r,n-e,r-i,n,r-s,n],bottomLeft:[a+s,n,a+i,n,a,n-e]}).topLeft.isTop=!0,t.topRight.isTop=!0,t.bottomLeft.isBottom=!0,t.bottomRight.isBottom=!0,t},"generateBarrelBezierPts"),checkPoint:Ae(function(t,e,r,n,i,a,o,s){var l=(c=q8t(n,i)).heightOffset,c=c.widthOffset;if(E8t(t,e,this.points,a,o,n,i-2*l,[0,-1],r)||E8t(t,e,this.points,a,o,n-2*c,i,[0,-1],r))return!0;for(var h=this.generateBarrelBezierPts(n,i,a,o),u=Ae(function(t,e,r){var n=r[4],i=r[2],a=r[0],o=r[5],r=r[1],s=Math.min(n,a),l=Math.max(n,a),c=Math.min(o,r),o=Math.max(o,r);return s<=t&&t<=l&&c<=e&&e<=o&&(r=U8t(n,i,a),0<(s=x8t(r[0],r[1],r[2],t).filter(function(t){return 0<=t&&t<=1})).length)?s[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=JTt(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:P8t(4,0),draw:Ae(function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,this.points,a)},"draw"),intersectLine:Ae(function(t,e,r,n,i,a,o,s){var l=e-(n/2+o);return 0<(l=M8t(i,a,t,e,t-(r/2+o),l,t+(r/2+o),l,!1)).length?l:m8t(i,a,t,e,r,n,o,s)},"intersectLine"),checkPoint:Ae(function(t,e,r,n,i,a,o,s){var l,c,h=2*(s="auto"===s?$8t(n,i):s);return!(!E8t(t,e,this.points,a,o,n,i-h,[0,-1],r)&&!E8t(t,e,this.points,a,o,n-h,i,[0,-1],r)&&!(T8t(t,e,[a-(l=n/2+2*r),o-(c=i/2+2*r),a-l,o,a+l,o,a+l,o-c])||L8t(t,e,h,h,a+n/2-s,o+i/2-s,r)||L8t(t,e,h,h,a-n/2+s,o+i/2-s,r)))},"checkPoint")}},registerNodeShapes:function(){var t=this.nodeShapes={},r=this,e=(this.generateEllipse(),this.generatePolygon("triangle",P8t(3,0)),this.generateRoundPolygon("round-triangle",P8t(3,0)),this.generatePolygon("rectangle",P8t(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),n=(this.generatePolygon("diamond",e),this.generateRoundPolygon("round-diamond",e),this.generatePolygon("pentagon",P8t(5,0)),this.generateRoundPolygon("round-pentagon",P8t(5,0)),this.generatePolygon("hexagon",P8t(6,0)),this.generateRoundPolygon("round-hexagon",P8t(6,0)),this.generatePolygon("heptagon",P8t(7,0)),this.generateRoundPolygon("round-heptagon",P8t(7,0)),this.generatePolygon("octagon",P8t(8,0)),this.generateRoundPolygon("round-octagon",P8t(8,0)),new Array(20)),i=F8t(5,0),a=F8t(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<a.length/2;s++)a[2*s]*=o,a[2*s+1]*=o;for(s=0;s<5;s++)n[4*s]=i[2*s],n[4*s+1]=i[2*s+1],n[4*s+2]=a[2*s],n[4*s+3]=a[2*s+1];n=B8t(n),this.generatePolygon("star",n),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)}}},XAt={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(t){t=t||wTt(),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&&pTt("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:t,priority:e}),r.sort(function(t,e){return e.priority-t.priority}))}},uAt=Ae(function(t,e,r){for(var n=t.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(e,r)},"beforeRenderCallbacks"),XAt.startRenderLoop=function(){var t,i=this,a=i.cy;i.renderLoopStarted||(i.renderLoopStarted=!0,t=Ae(function t(e){var r,n;i.destroyed||(a.batching()||(i.requestedFrame&&!i.skipFrame?(uAt(i,!0,e),r=V7t(),i.render(i.renderOptions),n=i.lastDrawTime=V7t(),void 0===i.averageRedrawTime&&(i.averageRedrawTime=n-r),void 0===i.redrawCount&&(i.redrawCount=0),i.redrawCount++,void 0===i.redrawTotalTime&&(i.redrawTotalTime=0),i.redrawTotalTime+=n-=r,i.lastRedrawTime=n,i.averageRedrawTime=i.averageRedrawTime/2+n/2,i.requestedFrame=!1):uAt(i,!1,e)),i.skipFrame=!1,W7t(t))},"renderFn"),W7t(t))},PAt=Ae(function(t){this.init(t)},"BaseRenderer"),(pAt=(dAt=PAt).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],pAt.init=function(t){var e,r,n,i,a=this,o=(a.options=t,a.cy=t.cy,a.container=t.cy.container()),s=a.cy.window();s&&(r=(e=s.document).head,n="__________cytoscape_container",i=null!=e.getElementById("__________cytoscape_stylesheet"),o.className.indexOf(n)<0&&(o.className=(o.className||"")+" "+n),i||((i=e.createElement("style")).id="__________cytoscape_stylesheet",i.textContent="."+n+" { position: relative; }",r.insertBefore(i,r.children[0])),"static"===s.getComputedStyle(o).getPropertyValue("position"))&&fTt("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.hideEdgesOnViewport=t.hideEdgesOnViewport,a.textureOnViewport=t.textureOnViewport,a.wheelSensitivity=t.wheelSensitivity,a.motionBlurEnabled=t.motionBlur,a.forcedPixelRatio=it(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()},pAt.notify=function(t,e){var r=this,n=r.cy;this.destroyed||("init"===t?r.load():"destroy"===t?r.destroy():(("add"===t||"remove"===t||"move"===t&&n.hasCompoundNodes()||"load"===t||"zorder"===t||"mount"===t)&&r.invalidateCachedZSortedEles(),"viewport"===t&&r.redrawHint("select",!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()))},pAt.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],n=r.target;(n.off||n.removeEventListener).apply(n,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{}},pAt.isHeadless=function(){return!1},[BAt,hAt,YAt,jAt,HAt,XAt].forEach(function(t){l7t(pAt,t)}),gAt={setupDequeueing:Ae(function(f){return Ae(function(){var d,t,e,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=q7t(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),t=Ae(function(t,e){var r=V7t(),n=g.averageRedrawTime,i=g.lastRedrawTime,a=[],o=g.cy.extent(),s=g.getPixelRatio();for(t||g.flushRenderedStyleQueue();;){var l=(c=V7t())-r,c=c-e;if(i<1e3/60){if(c>=f.deqFastCost*(1e3/60-(t?n:0)))break}else if(t){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,s,o);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,s,o)&&d()},"dequeue"),e=f.priority||dTt,g.beforeRender(t,e(p)))},"setupDequeueingImpl")},"setupDequeueing")},Ae(O,"ElementTextureCacheLookup"),y6t(O,[{key:"getIdsFor",value:Ae(function(t){null==t&&pTt("Can not get id list for null key");var e=this.idsByKey,r=this.idsByKey.get(t);return r||(r=new ATt,e.set(t,r)),r},"getIdsFor")},{key:"addIdForKey",value:Ae(function(t,e){null!=t&&this.getIdsFor(t).add(e)},"addIdForKey")},{key:"deleteIdForKey",value:Ae(function(t,e){null!=t&&this.getIdsFor(t).delete(e)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:Ae(function(t){return null==t?0:this.getIdsFor(t).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:Ae(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:Ae(function(t){var t=t.id(),e=this.keyForId.get(t);this.deleteIdForKey(e,t),this.keyForId.delete(t)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:Ae(function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)},"keyHasChangedFor")},{key:"isInvalid",value:Ae(function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)},"isInvalid")},{key:"getCachesAt",value:Ae(function(t){var e=this.cachesByLvl,r=this.lvls,n=e.get(t);return n||(n=new STt,e.set(t,n),r.push(t)),n},"getCachesAt")},{key:"getCache",value:Ae(function(t,e){return this.getCachesAt(e).get(t)},"getCache")},{key:"get",value:Ae(function(t,e){var r=this.getKey(t);return null!=(r=this.getCache(r,e))&&this.updateKeyMappingFor(t),r},"get")},{key:"getForCachedKey",value:Ae(function(t,e){return t=this.keyForId.get(t.id()),this.getCache(t,e)},"getForCachedKey")},{key:"hasCache",value:Ae(function(t,e){return this.getCachesAt(e).has(t)},"hasCache")},{key:"has",value:Ae(function(t,e){return t=this.getKey(t),this.hasCache(t,e)},"has")},{key:"setCache",value:Ae(function(t,e,r){r.key=t,this.getCachesAt(e).set(t,r)},"setCache")},{key:"set",value:Ae(function(t,e,r){var n=this.getKey(t);this.setCache(n,e,r),this.updateKeyMappingFor(t)},"set")},{key:"deleteCache",value:Ae(function(t,e){this.getCachesAt(e).delete(t)},"deleteCache")},{key:"delete",value:Ae(function(t,e){t=this.getKey(t),this.deleteCache(t,e)},"_delete")},{key:"invalidateKey",value:Ae(function(e){var r=this;this.lvls.forEach(function(t){return r.deleteCache(e,t)})},"invalidateKey")},{key:"invalidate",value:Ae(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=O,mAt={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},yAt=JAt({getKey:null,doesEleInvalidateKey:hTt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:cTt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vAt=Ae(function(t,e){this.renderer=t,this.onDequeues=[],t=yAt(e),l7t(this,t),this.lookup=new fAt(t.getKey,t.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(H=vAt.prototype).reasons=mAt,H.getTextureQueue=function(t){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[t]=this.eleImgCaches[t]||[]},H.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},H.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new NTt(function(t,e){return e.reqs-t.reqs})},H.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},H.getElement=function(t,e,r,n,i){var a=this,o=this.renderer,s=o.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((n=null==n?Math.ceil(VTt(s*r)):n)<-4)n=-4;else if(7.99<=s||3<n)return null;var s=Math.pow(2,n),c=e.h*s,h=e.w*s,u=o.eleTextBiggerThanMin(t,s);if(!this.isVisible(t,u))return null;if((o=l.get(t,n))&&o.invalidated&&(o.invalidated=!1,o.texture.invalidatedWidth-=o.width),!o){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=Ae(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=Ae(function(t){return t&&t.scaledLabelShown===u},"scalableFrom"),g=i&&i===mAt.dequeue,y=i&&i===mAt.highQuality,i=i&&i===mAt.downscale,v=n+1;v<=3;v++){var x=l.get(t,v);if(x){f=x;break}}var b,w=f&&f.level===n+1?f:null,k=Ae(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;n<T;T--)w=a.getElement(t,e,r,T,mAt.downscale);k()}else{if(!g&&!y&&!i)for(var E=n-1;-4<=E;E--){var _=l.get(t,E);if(_){b=_;break}}if(m(b))return a.queueElement(t,n),b;p.context.translate(p.usedWidth,0),p.context.scale(s,s),this.drawElement(p.context,t,e,u,!1),p.context.scale(1/s,1/s),p.context.translate(-p.usedWidth,0)}o={x:p.usedWidth,texture:p,level:n,scale:s,width:h,height:c,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+h),p.eleCaches.push(o),l.set(t,n,o),a.checkTextureFullness(p)}return o},H.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},H.invalidateElement=function(t){var e=this.lookup,r=[];if(e.isInvalid(t)){for(var n=-4;n<=3;n++){var i=e.getForCachedKey(t,n);i&&r.push(i)}if(e.invalidate(t))for(var a=0;a<r.length;a++){var o=r[a],s=o.texture;s.invalidatedWidth+=o.width,o.invalidated=!0,this.checkTextureUtility(s)}this.removeFromQueue(t)}},H.checkTextureUtility=function(t){t.invalidatedWidth>=.2*t.width&&this.retireTexture(t)},H.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8<t.usedWidth/t.width&&10<=t.fullnessChecks?kTt(e,t):t.fullnessChecks++},H.retireTexture=function(t){var e=t.height,r=this.getTextureQueue(e),n=this.lookup;kTt(r,t),t.retired=!0;for(var i=t.eleCaches,a=0;a<i.length;a++){var o=i[a];n.deleteCache(o.key,o.level)}TTt(i),this.getRetiredTextureQueue(e).push(t)},H.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},H.recycleTexture=function(t,e){for(var r=this.getTextureQueue(t),n=this.getRetiredTextureQueue(t),i=0;i<n.length;i++){var a=n[i];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,TTt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),kTt(n,a),r.push(a),a}},H.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];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:i},r.push(a),n[i]=a)},H.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0<e.size();a++){var o=e.pop(),s=o.key,l=o.eles[0],c=i.hasCache(l,o.level);r[s]=null,c||(n.push(o),s=this.getBoundingBox(l),this.getElement(l,s,t,o.level,mAt.dequeue))}return n},H.removeFromQueue=function(t){var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(t),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=lTt,e.updateItem(i),e.pop(),r[n]=null):i.eles.unmerge(t))},H.onDequeue=function(t){this.onDequeues.push(t)},H.offDequeue=function(t){kTt(this.onDequeues,t)},H.setupDequeueing=gAt.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:Ae(function(t,e,r){return t.dequeue(e,r)},"deq"),onDeqd:Ae(function(t,e){for(var r=0;r<t.onDequeues.length;r++)(0,t.onDequeues[r])(e)},"onDeqd"),shouldRedraw:Ae(function(t,e,r,n){for(var i=0;i<e.length;i++)for(var a=e[i].eles,o=0;o<a.length;o++){var s=a[o].boundingBox();if(d8t(s,n))return!0}return!1},"shouldRedraw"),priority:Ae(function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),xAt=Ae(function(t){var r=this,e=(t=r.renderer=t).cy,e=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=V7t()-500,r.skipping=!1,r.eleTxrDeqs=e.collection(),r.scheduleElementRefinement=q7t(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),Ae(function(t,e){return e.reqs-t.reqs},"qSort"));r.layersQueue=new NTt(e),r.setupDequeueing()},"LayeredTextureCache"),Y=xAt.prototype,bAt=0,wAt=Math.pow(2,53)-1,Y.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),e=(t={id:bAt=++bAt%wAt,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,n=-t.bb.x1,i=-t.bb.y1;return e.scale(r,r),e.translate(n,i),t},Y.getLayers=function(i,t,a){var o=this,e=o.renderer.cy.zoom(),r=o.firstGet;if(o.firstGet=!1,null==a)if((a=Math.ceil(VTt(e*t)))<-4)a=-4;else if(3.99<=e||2<a)return null;o.validateLayersElesOrdering(a,i);var n,s,l=o.layersByLevel,c=Math.pow(2,a),h=l[a]=l[a]||[],e=o.levelIsComplete(a,i),u=Ae(function(){var r=Ae(function(t){if(o.validateLayersElesOrdering(t,i),o.levelIsComplete(t,i))return s=l[t],!0},"canUseAsTmpLvl"),t=Ae(function(t){if(!s)for(var e=a+t;-4<=e&&e<=2&&!r(e);e+=t);},"checkLvls");t(1),t(-1);for(var e=h.length-1;0<=e;e--){var n=h[e];n.invalid&&kTt(h,n)}},"checkTempLevels");if(e)return h;u();var d=Ae(function(){if(!n){n=n8t();for(var t=0;t<i.length;t++)s8t(n,i[t].boundingBox())}return n},"getBb"),p=Ae(function(t){var e,r=(t=t||{}).after;return d(),16e6<n.w*c*(n.h*c)?null:(e=o.makeLayer(n,a),null!=r?(r=h.indexOf(r)+1,h.splice(r,0,e)):void 0!==t.insert&&!t.insert||h.unshift(e),e)},"makeLayer");if(o.skipping&&!r)return null;for(var g=null,f=+i.length,m=!r,y=0;y<i.length;y++){var v=i[y],x=v._private.rscratch,b=(x=x.imgLayerCaches=x.imgLayerCaches||{})[a];if(b)g=b;else{if((!g||g.eles.length>=f||!f8t(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;s||m?o.queueLayer(g,v):o.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return s||(m?null:h)},Y.getEleLevelForLayerLevel=function(t,e){return t},Y.drawEleInLayer=function(t,e,r,n){var i=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(t,!1),i.drawCachedElement(t,e,null,null,r,!0),i.setImgSmoothing(t,!0))},Y.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;i<r.length;i++){var a=r[i];if(0<a.reqs||a.invalid)return!1;n+=a.eles.length}return n===e.length},Y.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,o=0;o<e.length;o++)if(i.eles[0]===e[o]){a=o;break}if(a<0)this.invalidateLayer(i);else for(var s=a,o=0;o<i.eles.length;o++)if(i.eles[o]!==e[s+o]){this.invalidateLayer(i);break}}},Y.updateElementsInLayers=function(t,e){for(var r=Ykt(t[0]),n=0;n<t.length;n++)for(var i=r?null:t[n],a=r?t[n]:t[n].ele,o=a._private.rscratch,s=o.imgLayerCaches=o.imgLayerCaches||{},l=-4;l<=2;l++){var c=s[l];!c||i&&this.getEleLevelForLayerLevel(c.level)!==i.level||e(c,a,i)}},Y.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},Y.invalidateElements=function(t){var n=this;0!==t.length&&(n.lastInvalidationTime=V7t(),0!==t.length)&&n.haveLayers()&&n.updateElementsInLayers(t,Ae(function(t,e,r){n.invalidateLayer(t)},"invalAssocLayers"))},Y.invalidateLayer=function(t){if(this.lastInvalidationTime=V7t(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];kTt(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}},Y.refineElementTextures=function(t){var a=this;a.updateElementsInLayers(t,Ae(function(t,e,r){var n=t.replacement;if(n||((n=t.replacement=a.makeLayer(t.bb,t.level)).replaces=t,n.eles=t.eles),!n.reqs)for(var i=0;i<n.eles.length;i++)a.queueLayer(n,n.eles[i])},"refineEachEle"))},Y.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},Y.queueLayer=function(t,e){var r=this.layersQueue,n=t.elesQueue,i=n.hasId=n.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;n.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,r.updateItem(t)):(t.reqs=1,r.push(t))}},Y.dequeue=function(t){for(var e=this.layersQueue,r=[],n=0;n<1&&0!==e.size();){var i,a=e.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?e.pop():((i=a.elesQueue.shift())&&(this.drawEleInLayer(a,i,a.level,t),n++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(e.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},Y.applyLayerReplacement=function(t){var e=this.layersByLevel[t.level],r=t.replaces,n=e.indexOf(r);if(!(n<0||r.invalid)){e[n]=t;for(var i=0;i<t.eles.length;i++){var a=t.eles[i]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[t.level]=t)}this.requestRedraw()}},Y.requestRedraw=q7t(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),Y.setupDequeueing=gAt.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:Ae(function(t,e){return t.dequeue(e)},"deq"),onDeqd:dTt,shouldRedraw:cTt,priority:Ae(function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),kAt={},Ae(fkt,"polygon"),Ae(mkt,"triangleBackcurve"),Ae(ykt,"triangleTee"),Ae(vkt,"circleTriangle"),Ae(xkt,"circle"),kAt.arrowShapeImpl=function(t){return(TAt=TAt||{polygon:fkt,"triangle-backcurve":mkt,"triangle-tee":ykt,"circle-triangle":vkt,"triangle-cross":ykt,circle:xkt})[t]},EAt={drawElement:function(t,e,r,n,i,a){e.isNode()?this.drawNode(t,e,r,n,i,a):this.drawEdge(t,e,r,n,i,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,n,i,a,o,s){var l,c,h,u,d,p,g,f=r.getBoundingBox(e);0!==f.w&&0!==f.h&&(null!=(n=r.getElement(e,f,n,i,a))?0!==(i=s(this,e))&&(a=o(this,e),s=f.x1,o=f.y1,l=f.w,f=f.h,p=0!==a?(h=(u=r.getRotationPoint(e)).x,u=u.y,t.translate(h,u),t.rotate(a),(c=this.getImgSmoothing(t))||this.setImgSmoothing(t,!0),d=(p=r.getRotationOffset(e)).x,p.y):(d=s,o),1!==i&&(g=t.globalAlpha,t.globalAlpha=g*i),t.drawImage(n.texture.canvas,n.x,0,n.width,n.height,d,p,l,f),1!==i&&(t.globalAlpha=g),0!==a)&&(t.rotate(-a),t.translate(-h,-u),c||this.setImgSmoothing(t,!1)):r.drawElement(t,e))}},_At=Ae(function(){return 0},"getZeroRotation"),CAt=Ae(function(t,e){return t.getTextAngle(e,null)},"getLabelRotation"),SAt=Ae(function(t,e){return t.getTextAngle(e,"source")},"getSourceLabelRotation"),AAt=Ae(function(t,e){return t.getTextAngle(e,"target")},"getTargetLabelRotation"),LAt=Ae(function(t,e){return e.effectiveOpacity()},"getOpacity"),NAt=Ae(function(t,e){return e.pstyle("text-opacity").pfValue*e.effectiveOpacity()},"getTextOpacity"),EAt.drawCachedElement=function(t,e,r,n,i,a){var o=(c=this.data).eleTxrCache,s=c.lblTxrCache,l=c.slbTxrCache,c=c.tlbTxrCache,h=e.boundingBox(),a=!0===a?o.reasons.highQuality:null;0===h.w||0===h.h||!e.visible()||n&&!d8t(h,n)||(h=e.isEdge(),n=e.element()._private.rscratch.badLine,this.drawElementUnderlay(t,e),this.drawCachedElementPortion(t,e,o,r,i,a,_At,LAt),h&&n||this.drawCachedElementPortion(t,e,s,r,i,a,CAt,NAt),h&&!n&&(this.drawCachedElementPortion(t,e,l,r,i,a,SAt,NAt),this.drawCachedElementPortion(t,e,c,r,i,a,AAt,NAt)),this.drawElementOverlay(t,e))},EAt.drawElements=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];this.drawElement(t,n)}},EAt.drawCachedElements=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];this.drawCachedElement(t,a,r,n)}},EAt.drawCachedNodes=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];a.isNode()&&this.drawCachedElement(t,a,r,n)}},EAt.drawLayeredElements=function(t,e,r,n){var i=this.data.lyrTxrCache.getLayers(e,r);if(i)for(var a=0;a<i.length;a++){var o=i[a],s=o.bb;0!==s.w&&0!==s.h&&t.drawImage(o.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(t,e,r,n)},IAt={drawEdge:function(e,r,t){var n,i,a,o,s,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(-(n=t).x1,-n.y1),d=k?r.pstyle("opacity").value:1,k=k?r.pstyle("line-opacity").value:1,i=r.pstyle("curve-style").value,a=r.pstyle("line-style").value,o=r.pstyle("width").pfValue,s=r.pstyle("line-cap").value,l=r.pstyle("line-outline-width").value,c=r.pstyle("line-outline-color").value,u=h=d*k,d=Ae(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;"straight-triangle"===i?(T.eleStrokeStyle(e,r,t),T.drawEdgeTrianglePath(r,e,E.allpts)):(e.lineWidth=o,e.lineCap=s,T.eleStrokeStyle(e,r,t),T.drawEdgePath(r,e,E.allpts,a),e.lineCap="butt")},"drawLine"),k=Ae(function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;e.lineWidth=o+l,e.lineCap=s,0<l?(T.colorStrokeStyle(e,c[0],c[1],c[2],t),"straight-triangle"===i?T.drawEdgeTrianglePath(r,e,E.allpts):(T.drawEdgePath(r,e,E.allpts,a),e.lineCap="butt")):e.lineCap="butt"},"drawLineOutline"),p=Ae(function(){w&&T.drawEdgeOverlay(e,r)},"drawOverlay"),g=Ae(function(){w&&T.drawEdgeUnderlay(e,r)},"drawUnderlay"),f=Ae(function(){T.drawArrowheads(e,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=Ae(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(n.x1,n.y1))}},MAt=Ae(function(s){if(["overlay","underlay"].includes(s))return function(t,e){var r,n,i,a,o;e.visible()&&0!==(r=e.pstyle("".concat(s,"-opacity")).value)&&(n=this.usePaths(),i=e._private.rscratch,a=2*e.pstyle("".concat(s,"-padding")).pfValue,o=e.pstyle("".concat(s,"-color")).value,t.lineWidth=a,"self"!==i.edgeType||n?t.lineCap="round":t.lineCap="butt",this.colorStrokeStyle(t,o[0],o[1],o[2],r),this.drawEdgePath(e,t,i.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),IAt.drawEdgeOverlay=MAt("overlay"),IAt.drawEdgeUnderlay=MAt("underlay"),IAt.drawEdgePath=function(t,e,r,n){var i,a=t._private.rscratch,o=e,s=!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?(i=e=a.pathCache,s=!0):(i=e=new Path2D,a.pathCacheKey=t,a.pathCache=i)),o.setLineDash)switch(n){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(c),o.lineDashOffset=h;break;case"solid":o.setLineDash([])}if(!s&&!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=_6t(a.roundCorners);try{for(g.s();!(p=g.n()).done;)ukt(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=o,l?e.stroke(i):e.stroke(),e.setLineDash&&e.setLineDash([])},IAt.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),o=[(a=[a[1]/o,-a[0]/o])[0]*n/2,a[1]*n/2];e.beginPath(),e.moveTo(r[i]-o[0],r[i+1]-o[1]),e.lineTo(r[i]+o[0],r[i+1]+o[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill()}},IAt.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i="haystack"===n.edgeType;i||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},IAt.drawArrowhead=function(t,e,r,n,i,a,o){var s,l,c,h,u,d,p;isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a||"none"!==(s=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===(o=void 0===o?p:o)&&"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,s,u,n,i,a),t.globalCompositeOperation=d),p=e.pstyle(r+"-arrow-color").value,this.colorFillStyle(t,p[0],p[1],p[2],o),this.colorStrokeStyle(t,p[0],p[1],p[2],o),this.drawArrowShape(e,t,c,h,s,u,n,i,a))},IAt.drawArrowShape=function(t,e,r,n,i,a,o,s,l){var c,h,u,d=this.usePaths()&&"triangle-cross"!==i,p=!1,g=e,f={x:o,y:s},t=t.pstyle("arrow-scale").value,t=this.getArrowWidth(n,t),m=this.arrowShapes[i];d&&(null!=(u=(h=this.arrowPathCache=this.arrowPathCache||[])[i=rTt(i)])?(c=e=u,p=!0):(c=e=new Path2D,h[i]=c)),p||(e.beginPath&&e.beginPath(),d?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,t,l,f,n),e.closePath&&e.closePath()),e=g,d&&(e.translate(o,s),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(-o,-s))},RAt={safeDrawImage:function(t,e,r,n,i,a,o,s,l,c){if(!(i<=0||a<=0||l<=0||c<=0))try{t.drawImage(e,r,n,i,a,o,s,l,c)}catch(t){fTt(t)}},drawInscribedImage:function(t,e,r,n,i){var a,o,s,l=(c=r.position()).x,c=c.y,h=r.cy().style(),u=(h=h.getIndexedStyle.bind(h))(r,"background-fit","value",n),d=h(r,"background-repeat","value",n),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===h(r,"background-width-relative-to","value",n)?0:f),g=g+("inner"===h(r,"background-height-relative-to","value",n)?0:f),f=r._private.rscratch,m="node"===h(r,"background-clip","value",n),i=h(r,"background-image-opacity","value",n)*i,y=h(r,"background-image-smoothing","value",n),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",n)&&(w="%"===h(r,"background-width","units",n)?h(r,"background-width","pfValue",n)*p:h(r,"background-width","pfValue",n)),"auto"!==h(r,"background-height","value",n)&&(k="%"===h(r,"background-height","units",n)?h(r,"background-height","pfValue",n)*g:h(r,"background-height","pfValue",n)),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",n),o=h(r,"background-position-x","pfValue",n),u+="%"===a?(p-w)*o:o,a=h(r,"background-offset-x","units",n),o=h(r,"background-offset-x","pfValue",n),u+="%"===a?(p-w)*o:o,a=c-g/2,o=h(r,"background-position-y","units",n),s=h(r,"background-position-y","pfValue",n),a+="%"===o?(g-k)*s:s,o=h(r,"background-offset-y","units",n),s=h(r,"background-offset-y","pfValue",n),a+="%"===o?(g-k)*s:s,f.pathCache&&(u-=l,a-=c,c=l=0),h=t.globalAlpha,t.globalAlpha=i,n=this.getImgSmoothing(t),o=!1,"no"===y&&n?(this.setImgSmoothing(t,!1),o=!0):"yes"!==y||n||(this.setImgSmoothing(t,!0),o=!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()):(s=t.createPattern(e,d),t.fillStyle=s,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,o)&&this.setImgSmoothing(t,n)}},DAt={eleTextBiggerThanMin:function(t,e){var r,n;return e||(n=t.cy().zoom(),r=this.getPixelRatio(),n=Math.ceil(VTt(n*r)),e=Math.pow(2,n)),!(t.pstyle("font-size").pfValue*e<t.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(t,e,r,n,i){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==n){if(a&&!this.eleTextBiggerThanMin(e))return}else if(!1===n)return;if(e.isNode()){if(!(n=e.pstyle("label"))||!n.value)return;n=this.getLabelJustification(e),t.textAlign=n}else{var n=e.element()._private.rscratch.badLine,o=e.pstyle("label"),s=e.pstyle("source-label"),l=e.pstyle("target-label");if(n||(!o||!o.value)&&(!s||!s.value)&&(!l||!l.value))return;t.textAlign="center"}t.textBaseline="bottom";var c,n=!r;r&&t.translate(-(c=r).x1,-c.y1),null==i?(this.drawText(t,e,null,n,a),e.isEdge()&&(this.drawText(t,e,"source",n,a),this.drawText(t,e,"target",n,a))):this.drawText(t,e,i,n,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],n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,r=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,s=e.pstyle("text-outline-opacity").value*r,l=e.pstyle("color").value,e=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,l[0],l[1],l[2],r),this.colorStrokeStyle(t,e[0],e[1],e[2],s)}},Ae(bkt,"roundRect"),DAt.getTextAngle=function(t,e){var r=t._private.rscratch,n=t.pstyle((e?e+"-":"")+"text-rotation"),r=_Tt(r,"labelAngle",e);return"autorotate"===n.strValue?t.isEdge()?r:0:"none"===n.strValue?0:n.pfValue},DAt.drawText=function(t,e,r){var n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=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 o,s,l=_Tt(i,"labelX",r="main"===r?null:r),c=_Tt(i,"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=_Tt(i,"labelWidth",r),p=_Tt(i,"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=n?this.getTextAngle(e,r):0)&&(o=l,s=c,t.translate(o,s),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,n=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-n;switch(m){case"left":b-=d;break;case"center":b-=d/2}var w=c-p-n,k=d+2*n,n=p+2*n;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?bkt(t,b,w,k,n,2):t.fillRect(b,w,k,n),t.fillStyle=E),0<v&&0<u){var T=t.strokeStyle,g=t.lineWidth,E=e.pstyle("text-border-color").value,_=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+E[0]+","+E[1]+","+E[2]+","+u*a+")",t.lineWidth=v,t.setLineDash)switch(_){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?bkt(t,b,w,k,n,2,"stroke"):t.strokeRect(b,w,k,n),"double"===_&&(E=v/2,x?bkt(t,b+E,w+E,k-2*E,n-2*E,2,"stroke"):t.strokeRect(b+E,w+E,k-2*E,n-2*E)),t.setLineDash&&t.setLineDash([]),t.lineWidth=g,t.strokeStyle=T}}var C=2*e.pstyle("text-outline-width").pfValue;if(0<C&&(t.lineWidth=C),"wrap"===e.pstyle("text-wrap").value){var S=_Tt(i,"labelWrapCachedLines",r),A=_Tt(i,"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<C&&t.strokeText(S[L],l,c),t.fillText(S[L],l,c),c+=A}else 0<C&&t.strokeText(h,l,c),t.fillText(h,l,c);0!==f&&(t.rotate(-f),t.translate(-o,-s))}}},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],_=this,o=E._private,s=o.rscratch,C=E.position();if(it(C.x)&&it(C.y)&&(!r||E.visible())){var n,l=r?E.effectiveOpacity():1,S=_.usePaths(),i=!1,r=E.padding(),A=E.width()+2*r,L=E.height()+2*r;t&&T.translate(-(n=t).x1,-n.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]=_.getCachedImage(d,B,function(){o.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,Y=E.pstyle("border-opacity").value*l,M=E.pstyle("outline-width").pfValue,b=E.pstyle("outline-color").value,j=E.pstyle("outline-style").value,H=E.pstyle("outline-opacity").value*l,R=E.pstyle("outline-offset").value,D=E.pstyle("corner-radius").value,r=("auto"!==D&&(D=E.pstyle("corner-radius").pfValue),Ae(function(){_.eleFillStyle(T,E,0<arguments.length&&void 0!==arguments[0]?arguments[0]:F)},"setupShapeColor")),W=Ae(function(){_.colorStrokeStyle(T,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:Y)},"setupBorderColor"),V=Ae(function(){_.colorStrokeStyle(T,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:H)},"setupOutlineColor"),X=Ae(function(t,e,r,n){var i,a=_.nodePathCache=_.nodePathCache||[],n=nTt("polygon"===r?r+","+n.join(","):r,""+e,""+t,""+D),e=!1;return null!=(r=a[n])?(e=!0,s.pathCache=i=r):(i=new Path2D,a[n]=s.pathCache=i),{path:i,cacheHit:e}},"getPath"),w=E.pstyle("shape").strValue,k=E.pstyle("shape-polygon-points").pfValue,k=(S&&(T.translate(C.x,C.y),w=X(A,L,w,k),p=w.path,i=w.cacheHit),Ae(function(){var t;i||(t=S?{x:0,y:0}:C,_.nodeShapes[_.getNodeShape(E)].draw(p||T,t.x,t.y,A,L,D,s)),S?T.fill(p):T.fill()},"drawShape")),w=Ae(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=o.backgrounding,n=0,i=0;i<h.length;i++){var a=E.cy().style().getIndexedStyle(E,"background-image-containment","value",i);e&&"over"===a||!e&&"inside"===a?n++:c[i]&&h[i].complete&&!h[i].error&&(n++,_.drawInscribedImage(T,h[i],E,i,t))}o.backgrounding=n!==P,r!==o.backgrounding&&E.updateStyle(!1)},"drawImages"),K=Ae(function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;_.hasPie(E)&&(_.drawPie(T,E,e),t)&&(S||_.nodeShapes[_.getNodeShape(E)].draw(T,C.x,C.y,A,L,D,s))},"drawPie"),Z=Ae(function(){var t=0<v?0:255;0!==v&&(_.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=Ae(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=Ae(function(){if(0<M){if(T.lineWidth=M,T.lineCap="butt",T.setLineDash)switch(j){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash([4,2]);break;case"solid":case"double":T.setLineDash([])}var t,e=C,r=(S&&(e={x:0,y:0}),_.getNodeShape(E)),n="inside"===I?0:N,i=("outside"===I&&(n*=2),(A+n+(M+R))/A),a=(L+n+(M+R))/L,o=A*i,s=L*a,l=_.nodeShapes[r].points;if(S&&(t=X(o,s,r,l).path),"ellipse"===r)_.drawEllipsePath(t||T,e.x,e.y,o,s);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*(n+R+M):"round-heptagon"===r?(c=1.075*(n+R+M),u=-(n/2+R+M)/35):"round-hexagon"===r?c=1.12*(n+R+M):"round-pentagon"===r?(c=1.13*(n+R+M),u=-(n/2+R+M)/15):"round-tag"===r?(c=1.12*(n+R+M),h=.07*(n/2+M+R)):"round-triangle"===r&&(c=(n+R+M)*(Math.PI/2),u=-(n+R/2+M)/Math.PI),0!==c&&(o=A*(i=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(s=L*(a=(L+c)/L)));for(var d=o/2,p=s/2,g=(D="auto"===D?z8t(o,s):D)+(n+M+R)/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]=dkt(w,v,x,g),w=v;_.drawRoundPolygonPath(t||T,e.x+h,e.y+u,A*i,L*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(D="auto"===D?$8t(o,s):D,_.drawRoundRectanglePath(t||T,e.x,e.y,o,s,D+(n+M+R)/2)):["cutrectangle","cut-rectangle"].includes(r)?(D="auto"===D?G8t():D,_.drawCutRectanglePath(t||T,e.x,e.y,o,s,null,D+(n+M+R)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(D="auto"===D?$8t(o,s):D,_.drawBottomRoundRectanglePath(t||T,e.x,e.y,o,s,D+(n+M+R)/2)):"barrel"===r?_.drawBarrelPath(t||T,e.x,e.y,o,s):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?C8t(S8t(l,(n+M+R)/A)):C8t(S8t(l,-(n+M+R)/A)),_.drawPolygonPath(t||T,e.x,e.y,A,L,l));S?T.stroke(t):T.stroke(),"double"===j&&(T.lineWidth=n/3,c=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",S?T.stroke(t):T.stroke(),T.globalCompositeOperation=c),T.setLineDash&&T.setLineDash([])}},"drawOutline"),tt=Ae(function(){e&&_.drawNodeOverlay(T,E,C,A,L)},"drawOverlay"),et=Ae(function(){e&&_.drawNodeUnderlay(T,E,C,A,L)},"drawUnderlay"),rt=Ae(function(){_.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),W(m*Y),Q(),K(0!==v||0!==N),w(y,!1),Z(y),T.translate(-g,-f)),S&&T.translate(-C.x,-C.y),et(),S&&T.translate(C.x,C.y),V(),J(),r(),k(),w(l,!0),W(),Q(),K(0!==v||0!==N),w(l,!1),Z(),S&&T.translate(-C.x,-C.y),rt(),tt(),t&&T.translate(n.x1,n.y1)}}},j=Ae(function(u){if(["overlay","underlay"].includes(u))return function(t,e,r,n,i){var a,o,s,l,c,h;e.visible()&&(a=e.pstyle("".concat(u,"-padding")).pfValue,o=e.pstyle("".concat(u,"-opacity")).value,s=e.pstyle("".concat(u,"-color")).value,l=e.pstyle("".concat(u,"-shape")).value,c=e.pstyle("".concat(u,"-corner-radius")).value,0<o)&&(r=r||e.position(),null!=n&&null!=i||(h=e.padding(),n=e.width()+2*h,i=e.height()+2*h),this.colorFillStyle(t,s[0],s[1],s[2],o),this.nodeShapes[l].draw(t,r.x,r.y,n+2*a,i+2*a,c),t.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),OAt.drawNodeOverlay=j("overlay"),OAt.drawNodeUnderlay=j("underlay"),OAt.hasPie=function(t){return(t=t[0])._private.hasPie},OAt.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),o=n.x,s=n.y,n=e.width(),l=e.height(),c=Math.min(n,l)/2,h=0;this.usePaths()&&(s=o=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var u=1;u<=i.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(o,s),t.arc(o,s,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||[],n=!0,i=0;i<r.length;i++)if((e=r[i]).context===t){n=!1;break}return n&&r.push(e={context:t}),e},createGradientStyleFor:function(t,e,r,n,i){var a=this.usePaths(),o=r.pstyle(e+"-gradient-stop-colors").value,s=r.pstyle(e+"-gradient-stop-positions").pfValue;if("radial-gradient"===n)n=r.isEdge()?(e=r.sourceEndpoint(),n=r.targetEndpoint(),l=r.midpoint(),e=KTt(e,l),KTt(n,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,n));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=s.length===o.length,g=o.length,f=0;f<g;f++)c.addColorStop(p?s[f]:f/(g-1),"rgba("+o[f][0]+","+o[f][1]+","+o[f][2]+","+i+")");return c},gradientFillStyle:function(t,e,r,n){if(!(e=this.createGradientStyleFor(t,"background",e,r,n)))return null;t.fillStyle=e},colorFillStyle:function(t,e,r,n,i){t.fillStyle="rgba("+e+","+r+","+n+","+i+")"},eleFillStyle:function(t,e,r){var n=e.pstyle("background-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientFillStyle(t,e,n,r):(n=e.pstyle("background-color").value,this.colorFillStyle(t,n[0],n[1],n[2],r))},gradientStrokeStyle:function(t,e,r,n){if(!(e=this.createGradientStyleFor(t,"line",e,r,n)))return null;t.strokeStyle=e},colorStrokeStyle:function(t,e,r,n,i){t.strokeStyle="rgba("+e+","+r+","+n+","+i+")"},eleStrokeStyle:function(t,e,r){var n=e.pstyle("line-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientStrokeStyle(t,e,n,r):(n=e.pstyle("line-color").value,this.colorStrokeStyle(t,n[0],n[1],n[2],r))},matchCanvasSize:function(t){var e,r=this,n=r.data,i=(o=r.findContainerClientCoords())[2],a=o[3],o=r.getPixelRatio(),s=r.motionBlurPxRatio,l=i*(o=t!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]&&t!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]?o:s),c=a*o;if(l!==r.canvasWidth||c!==r.canvasHeight){r.fontCaches=null,(t=n.canvasContainer).style.width=i+"px",t.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(e=n.canvases[h]).width=l,e.height=c,e.style.width=i+"px",e.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(e=n.bufferCanvases[h]).width=l,e.height=c,e.style.width=i+"px",e.style.height=a+"px";o<=(r.textureMult=1)&&(e=n.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,e.width=l*r.textureMult,e.height=c*r.textureMult),r.canvasWidth=l,r.canvasHeight=c}},renderTo:function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},render:function(t){var o=(t=t||wTt()).forcedContext,s=t.drawAllLayers,e=t.drawOnlyNodeLayer,l=t.forcedZoom,c=t.forcedPan,h=this,r=void 0===t.forcedPxRatio?this.getPixelRatio():t.forcedPxRatio,n=h.cy,u=h.data,i=u.canvasNeedsRedraw,a=h.textureOnViewport&&!o&&(h.pinching||h.hoverData.dragging||h.swipePanning||h.data.wheelZooming),t=(void 0!==t.motionBlur?t:h).motionBlur,d=h.motionBlurPxRatio,p=n.hasCompoundNodes(),g=h.hoverData.draggingEles,f=!(!h.hoverData.selecting&&!h.touchData.selecting),m=t=t&&!o&&h.motionBlurEnabled&&!f,f=(o||(h.prevPxRatio!==r&&(h.invalidateContainerClientCoordsCache(),h.matchCanvasSize(h.container),h.redrawHint("eles",!0),h.redrawHint("drag",!0)),h.prevPxRatio=r),!o&&h.motionBlurTimeout&&clearTimeout(h.motionBlurTimeout),t&&(null==h.mbFrames&&(h.mbFrames=0),h.mbFrames++,h.mbFrames<3&&(m=!1),h.mbFrames>h.minMbLowQualFrames)&&(h.motionBlurPxRatio=h.mbPxRBlurry),h.clearingMotionBlur&&(h.motionBlurPxRatio=1),h.textureDrawLastFrame&&!a&&(i[h.NODE]=!0,i[h.SELECT_BOX]=!0),n.style()),y=n.zoom(),v=void 0!==l?l:y,x=n.pan(),b={x:x.x,y:x.y},w={zoom:y,pan:{x:x.x,y:x.y}},k=(void 0===(k=h.prevViewport)||w.zoom!==k.zoom||w.pan.x!==k.pan.x||w.pan.y!==k.pan.y||g&&!p||(h.motionBlurPxRatio=1),v*=r,(b=c||b).x*=r,b.y*=r,h.getCachedZSortedEles());function T(t,e,r,n,i){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",h.colorFillStyle(t,255,255,255,h.motionBlurTransparency),t.fillRect(e,r,n,i),t.globalCompositeOperation=a}function E(t,e){var r,n,i,a=h.clearingMotionBlur||t!==u.bufferContexts[h.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[h.MOTIONBLUR_BUFFER_DRAG]?(r=b,n=v,i=h.canvasWidth,h.canvasHeight):(r={x:x.x*d,y:x.y*d},n=y*d,i=h.canvasWidth*d,h.canvasHeight*d);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?T(t,0,0,i,a):o||void 0!==e&&!e||t.clearRect(0,0,i,a),s||(t.translate(r.x,r.y),t.scale(n,n)),c&&t.translate(c.x,c.y),l&&t.scale(l,l)}Ae(T,"mbclear"),Ae(E,"setContextTransform"),a||(h.textureDrawLastFrame=!1),a?(h.textureDrawLastFrame=!0,h.textureCache||(h.textureCache={},h.textureCache.bb=n.mutableElements().boundingBox(),h.textureCache.texture=h.data.bufferCanvases[h.TEXTURE_BUFFER],(g=h.data.bufferContexts[h.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),g.clearRect(0,0,h.canvasWidth*h.textureMult,h.canvasHeight*h.textureMult),h.render({forcedContext:g,drawOnlyNodeLayer:!0,forcedPxRatio:r*h.textureMult}),(w=h.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:h.canvasWidth,height:h.canvasHeight}).mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}),i[h.DRAG]=!1,i[h.NODE]=!1,_=u.contexts[h.NODE],p=h.textureCache.texture,w=h.textureCache.viewport,_.setTransform(1,0,0,1,0,0),t?T(_,0,0,w.width,w.height):_.clearRect(0,0,w.width,w.height),g=f.core("outside-texture-bg-color").value,S=f.core("outside-texture-bg-opacity").value,h.colorFillStyle(_,g[0],g[1],g[2],S),_.fillRect(0,0,w.width,w.height),y=n.zoom(),E(_,!1),_.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/r,w.height/w.zoom/r),_.drawImage(p,w.mpan.x,w.mpan.y,w.width/w.zoom/r,w.height/w.zoom/r)):h.textureOnViewport&&!o&&(h.textureCache=null);var _,C,g=n.extent(),S=h.pinching||h.hoverData.dragging||h.swipePanning||h.data.wheelZooming||h.hoverData.draggingEles||h.cy.animated(),p=h.hideEdgesOnViewport&&S;(S=[])[h.NODE]=!i[h.NODE]&&t&&!h.clearedForMotionBlur[h.NODE]||h.clearingMotionBlur,S[h.NODE]&&(h.clearedForMotionBlur[h.NODE]=!0),S[h.DRAG]=!i[h.DRAG]&&t&&!h.clearedForMotionBlur[h.DRAG]||h.clearingMotionBlur,S[h.DRAG]&&(h.clearedForMotionBlur[h.DRAG]=!0),(i[h.NODE]||s||e||S[h.NODE])&&(C=t&&!S[h.NODE]&&1!==d,E(_=o||(C?h.data.bufferContexts[h.MOTIONBLUR_BUFFER_NODE]:u.contexts[h.NODE]),t&&!C?"motionBlur":void 0),p?h.drawCachedNodes(_,k.nondrag,r,g):h.drawLayeredElements(_,k.nondrag,r,g),h.debug&&h.drawDebugPoints(_,k.nondrag),s||t||(i[h.NODE]=!1)),!e&&(i[h.DRAG]||s||S[h.DRAG])&&(C=t&&!S[h.DRAG]&&1!==d,E(_=o||(C?h.data.bufferContexts[h.MOTIONBLUR_BUFFER_DRAG]:u.contexts[h.DRAG]),t&&!C?"motionBlur":void 0),p?h.drawCachedNodes(_,k.drag,r,g):h.drawCachedElements(_,k.drag,r,g),h.debug&&h.drawDebugPoints(_,k.drag),s||t||(i[h.DRAG]=!1)),(h.showFps||!e&&i[h.SELECT_BOX]&&!s)&&(E(_=o||u.contexts[h.SELECT_BOX]),1==h.selection[4]&&(h.hoverData.selecting||h.touchData.selecting)&&(y=h.cy.zoom(),C=f.core("selection-box-border-width").value/y,_.lineWidth=C,_.fillStyle="rgba("+f.core("selection-box-color").value[0]+","+f.core("selection-box-color").value[1]+","+f.core("selection-box-color").value[2]+","+f.core("selection-box-opacity").value+")",_.fillRect(h.selection[0],h.selection[1],h.selection[2]-h.selection[0],h.selection[3]-h.selection[1]),0<C)&&(_.strokeStyle="rgba("+f.core("selection-box-border-color").value[0]+","+f.core("selection-box-border-color").value[1]+","+f.core("selection-box-border-color").value[2]+","+f.core("selection-box-opacity").value+")",_.strokeRect(h.selection[0],h.selection[1],h.selection[2]-h.selection[0],h.selection[3]-h.selection[1])),u.bgActivePosistion&&!h.hoverData.selecting&&(y=h.cy.zoom(),p=u.bgActivePosistion,_.fillStyle="rgba("+f.core("active-bg-color").value[0]+","+f.core("active-bg-color").value[1]+","+f.core("active-bg-color").value[2]+","+f.core("active-bg-opacity").value+")",_.beginPath(),_.arc(p.x,p.y,f.core("active-bg-size").pfValue/y,0,2*Math.PI),_.fill()),r=h.lastRedrawTime,h.showFps&&r&&(r=Math.round(r),g=Math.round(1e3/r),_.setTransform(1,0,0,1,0,0),_.fillStyle="rgba(255, 0, 0, 0.75)",_.strokeStyle="rgba(255, 0, 0, 0.75)",_.lineWidth=1,_.fillText("1 frame = "+r+" ms = "+g+" fps",0,20),_.strokeRect(0,30,250,20),_.fillRect(0,30,250*Math.min(g/60,1),20)),s||(i[h.SELECT_BOX]=!1)),t&&1!==d&&(k=u.contexts[h.NODE],e=h.data.bufferCanvases[h.MOTIONBLUR_BUFFER_NODE],C=u.contexts[h.DRAG],p=h.data.bufferCanvases[h.MOTIONBLUR_BUFFER_DRAG],f=Ae(function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!m?t.clearRect(0,0,h.canvasWidth,h.canvasHeight):T(t,0,0,h.canvasWidth,h.canvasHeight),r=d,t.drawImage(e,0,0,h.canvasWidth*r,h.canvasHeight*r,0,0,h.canvasWidth,h.canvasHeight)},"drawMotionBlur"),(i[h.NODE]||S[h.NODE])&&(f(k,e,S[h.NODE]),i[h.NODE]=!1),i[h.DRAG]||S[h.DRAG])&&(f(C,p,S[h.DRAG]),i[h.DRAG]=!1),h.prevViewport=w,h.clearingMotionBlur&&(h.clearingMotionBlur=!1,h.motionBlurCleared=!0,h.motionBlur=!0),t&&(h.motionBlurTimeout=setTimeout(function(){h.motionBlurTimeout=null,h.clearedForMotionBlur[h.NODE]=!1,h.clearedForMotionBlur[h.DRAG]=!1,h.motionBlur=!1,h.clearingMotionBlur=!a,h.mbFrames=0,i[h.NODE]=!0,i[h.DRAG]=!0,h.redraw()},100)),o||n.emit("render")}},BAt={drawPolygonPath:function(t,e,r,n,i,a){var o=n/2,s=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*a[0],r+s*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+o*a[2*l],r+s*a[2*l+1]);t.closePath()},drawRoundPolygonPath:function(e,t,r,n,i,a,o){o.forEach(function(t){return ukt(e,t)}),e.closePath()},drawRoundRectanglePath:function(t,e,r,n,i,a){var o=n/2,s=i/2,n="auto"===a?$8t(n,i):Math.min(a,s,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.arcTo(e+o,r-s,e+o,r,n),t.arcTo(e+o,r+s,e,r+s,n),t.arcTo(e-o,r+s,e-o,r,n),t.arcTo(e-o,r-s,e,r-s,n),t.lineTo(e,r-s),t.closePath()},drawBottomRoundRectanglePath:function(t,e,r,n,i,a){var o=n/2,s=i/2,n="auto"===a?$8t(n,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.lineTo(e+o,r-s),t.lineTo(e+o,r),t.arcTo(e+o,r+s,e,r+s,n),t.arcTo(e-o,r+s,e-o,r,n),t.lineTo(e-o,r-s),t.lineTo(e,r-s),t.closePath()},drawCutRectanglePath:function(t,e,r,n,i,a,o){n/=2,i/=2,o="auto"===o?G8t():o,t.beginPath&&t.beginPath(),t.moveTo(e-n+o,r-i),t.lineTo(e+n-o,r-i),t.lineTo(e+n,r-i+o),t.lineTo(e+n,r+i-o),t.lineTo(e+n-o,r+i),t.lineTo(e-n+o,r+i),t.lineTo(e-n,r+i-o),t.lineTo(e-n,r-i+o),t.closePath()},drawBarrelPath:function(t,e,r,n,i){var a=e-(o=n/2),e=e+o,o=r-(s=i/2),r=r+s,n=(s=q8t(n,i)).widthOffset,i=s.heightOffset,s=s.ctrlPtOffsetPct*n;t.beginPath&&t.beginPath(),t.moveTo(a,o+i),t.lineTo(a,r-i),t.quadraticCurveTo(a+s,r,a+n,r),t.lineTo(e-n,r),t.quadraticCurveTo(e-s,r,e,r-i),t.lineTo(e,o+i),t.quadraticCurveTo(e-s,o,e-n,o),t.lineTo(a+n,o),t.quadraticCurveTo(a+s,o,a,o+i),t.closePath()}},FAt=Math.sin(0),$At=Math.cos(0),zAt={},GAt={},UAt=Math.PI/40,qAt=0*Math.PI;qAt<2*Math.PI;qAt+=UAt)zAt[qAt]=Math.sin(qAt),GAt[qAt]=Math.cos(qAt);BAt.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,o,s=n/2,l=i/2,c=0*Math.PI;c<2*Math.PI;c+=UAt)a=e-s*zAt[c]*FAt+s*GAt[c]*$At,o=r+l*GAt[c]*FAt+l*zAt[c]*$At,0===c?t.moveTo(a,o):t.lineTo(a,o);t.closePath()},YAt={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(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(r.w):n[2],n=t.full?Math.ceil(r.h):n[3],a=it(t.maxWidth)||it(t.maxHeight),o=this.getPixelRatio(),s=1,l=(void 0!==t.scale?(i*=t.scale,n*=t.scale,s=t.scale):a&&(c=l=1/0,it(t.maxWidth)&&(l=s*t.maxWidth/i),it(t.maxHeight)&&(c=s*t.maxHeight/n),i*=s=Math.min(l,c),n*=s),a||(i*=o,n*=o,s*=o),document.createElement("canvas")),c=(l.width=i,l.height=n,l.style.width=i+"px",l.style.height=n+"px",l.getContext("2d"));return 0<i&&0<n&&(c.clearRect(0,0,i,n),c.globalCompositeOperation="source-over",a=this.getCachedZSortedEles(),t.full?(c.translate(-r.x1*s,-r.y1*s),c.scale(s,s),this.drawElements(c,a),c.scale(1/s,1/s),c.translate(r.x1*s,r.y1*s)):(r={x:(o=e.pan()).x*s,y:o.y*s},s*=e.zoom(),c.translate(r.x,r.y),c.scale(s,s),this.drawElements(c,a),c.scale(1/s,1/s),c.translate(-r.x,-r.y)),t.bg)&&(c.globalCompositeOperation="destination-over",c.fillStyle=t.bg,c.rect(0,0,i,n),c.fill()),l}},Ae(wkt,"b64ToBlob"),Ae(kkt,"b64UriToB64"),Ae(Tkt,"output"),YAt.png=function(t){return Tkt(t,this.bufferCanvasImage(t),"image/png")},YAt.jpg=function(t){return Tkt(t,this.bufferCanvasImage(t),"image/jpeg")},jAt={nodeShapeImpl:function(t,e,r,n,i,a,o,s){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,s);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}}},(WAt=(HAt=Ekt).prototype).CANVAS_LAYERS=3,WAt.SELECT_BOX=0,WAt.DRAG=1,WAt.NODE=2,WAt.BUFFER_COUNT=3,WAt.TEXTURE_BUFFER=0,WAt.MOTIONBLUR_BUFFER_NODE=1,WAt.MOTIONBLUR_BUFFER_DRAG=2,Ae(Ekt,"CanvasRenderer"),WAt.redrawHint=function(t,e){switch(t){case"eles":this.data.canvasNeedsRedraw[WAt.NODE]=e;break;case"drag":this.data.canvasNeedsRedraw[WAt.DRAG]=e;break;case"select":this.data.canvasNeedsRedraw[WAt.SELECT_BOX]=e}},VAt=typeof Path2D<"u",WAt.path2dEnabled=function(t){if(void 0===t)return this.pathsEnabled;this.pathsEnabled=!!t},WAt.usePaths=function(){return VAt&&this.pathsEnabled},WAt.setImgSmoothing=function(t,e){null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},WAt.getImgSmoothing=function(t){return null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},WAt.makeOffscreenCanvas=function(t,e){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":g6t(OffscreenCanvas))?r=new OffscreenCanvas(t,e):((r=this.cy.window().document.createElement("canvas")).width=t,r.height=e),r},[kAt,EAt,IAt,RAt,DAt,OAt,PAt,BAt,YAt,jAt].forEach(function(t){l7t(WAt,t)}),XAt=[{type:"layout",extensions:zSt},{type:"renderer",extensions:[{name:"null",impl:hkt},{name:"base",impl:dAt},{name:"canvas",impl:HAt}]}],KAt={},ZAt={},Ae(_kt,"setExtension"),Ae(Ckt,"getExtension"),Ae(Skt,"setModule"),Ae(Akt,"getModule"),QAt=Ae(function(){return 2===arguments.length?Ckt.apply(null,arguments):3===arguments.length?_kt.apply(null,arguments):4===arguments.length?Akt.apply(null,arguments):5===arguments.length?Skt.apply(null,arguments):void pTt("Invalid extension access syntax")},"extension"),sSt.prototype.extension=QAt,XAt.forEach(function(e){e.extensions.forEach(function(t){_kt(e.type,t.name,t.impl)})}),JAt=Ae(function t(){if(!(this instanceof t))return new t;this.length=0},"Stylesheet"),(H=JAt.prototype).instanceString=function(){return"stylesheet"},H.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this},H.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 n=t,i=Object.keys(n),a=0;a<i.length;a++){var o=i[a],s=n[o];null!=s&&null!=(o=aSt.properties[o]||aSt.properties[r7t(o)])&&(o=o.name,this[r].properties.push({name:o,value:s}))}return this},H.style=H.css,H.generateStyle=function(t){return t=new aSt(t),this.appendToStyle(t)},H.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var o=i[a];t.css(o.name,o.value)}}return t},(t9t=Ae(function(t){return $kt(t=void 0===t?{}:t)?new sSt(t):Pkt(t)?QAt.apply(QAt,arguments):void 0},"cytoscape")).use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(t9t),t.apply(null,e),this},t9t.warnings=function(t){return gTt(t)},t9t.version="3.30.1",t9t.stylesheet=t9t.Stylesheet=JAt}),r9t=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}Ae(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),o=r(9);function s(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in Ae(s,"LEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),o=r(13),s=r(0),l=r(16),c=r(4);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new o(e.x,e.y,r.width,r.height):new o}for(n in Ae(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(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=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)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=-s.INITIAL_WORLD_BOUNDARY,e=s.INITIAL_WORLD_BOUNDARY,e=s.WORLD_CENTER_X+l.nextDouble()*(e-t)+t,t=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY,r=s.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()),s.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)>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY),(r=this.rect.y)>s.WORLD_BOUNDARY?r=s.WORLD_BOUNDARY:r<-s.WORLD_BOUNDARY&&(r=-s.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 n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}Ae(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=r(2),d=r(10),a=r(0),o=r(6),s=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){i.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 o?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in Ae(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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 n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=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:(n.source=e,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),r!=e&&r.edges.push(n),n)},u.prototype.remove=function(t){var e=t;if(t instanceof s){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,n=e.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(o=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(o,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 o,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==(o=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(o,1)}},u.prototype.updateLeftTop=function(){for(var t,e=d.MAX_VALUE,r=d.MAX_VALUE,n=this.getNodes(),i=n.length,a=0;a<i;a++){var o,s=n[a];(o=s.getTop())<e&&(e=o),(o=s.getLeft())<r&&(r=o)}return e==d.MAX_VALUE?null:(t=null!=n[0].getParent().paddingLeft?n[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,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=d.MAX_VALUE,o=-d.MAX_VALUE,s=this.nodes,l=s.length,c=0;c<l;c++){var h=s[c];t&&null!=h.child&&h.updateBounds(),(e=h.getLeft())<n&&(n=e),i<(e=h.getRight())&&(i=e),(e=h.getTop())<a&&(a=e),o<(e=h.getBottom())&&(o=e)}var u=new p(n,a,i-n,o-a);n==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!=s[0].getParent().paddingLeft?s[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,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=t.length,o=0;o<a;o++){var s,l=t[o];(s=l.getLeft())<e&&(e=s),r<(s=l.getRight())&&(r=s),(s=l.getTop())<n&&(n=s),i<(s=l.getBottom())&&(i=s)}return new p(e,n,r-e,i-n)},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,n=0;n<r;n++)t+=e[n].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,n=new h,i=new Set,t=this.nodes[0];for(t.withChildren().forEach(function(t){n.push(t),i.add(t)});0!==n.length;)for(var a,o,s=(a=(t=n.shift()).getEdges()).length,l=0;l<s;l++)null==(o=a[l].getOtherEndInGraph(t,this))||i.has(o)||o.withChildren().forEach(function(t){n.push(t),i.add(t)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.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 n(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}Ae(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){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(i=r,r=t,t=(n=e).getOwner(),e=i.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,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-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},n.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,n=[],i=(n=n.concat(e.getEdges())).length,a=0;a<i;a++)r=n[a],e.remove(r);for(var o,s=[],i=(s=s.concat(e.getNodes())).length,a=0;a<i;a++)o=s[a],e.remove(o);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)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),r=e.length,n=0;n<r;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.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},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.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"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}for(n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,n,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++)if(e=(t=a[s]).source,r=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=r))t.lca=e.getOwner();else{for(n=e.getOwner();null==t.lca;){for(i=(t.targetInLca=r).getOwner();null==t.lca;){if(i==n){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var n=e.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var r,n=t.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},n.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=n},function(t,e,r){var n,i=r(0);function a(){}for(n in Ae(a,"FDLayoutConstants"),i)a[n]=i[n];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 n(){}Ae(n,"IGeometry"),n.calcSeparationAmount=function(t,e,r,n){if(!t.intersects(e))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(t,e,i),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*i[0]*(t/2+n),r[1]=-1*i[1]*(e/2+n)},n.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},n.getIntersection2=function(t,e,r){var n=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),o=e.getCenterY();if(t.intersects(e))return r[0]=n,r[1]=i,r[2]=a,r[3]=o,!0;var s=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(n===a){if(o<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<o&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===o){if(a<n)return r[0]=s,r[1]=i,r[2]=y,r[3]=o,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=o)}else{var t=t.height/t.width,e=e.height/e.width,_=(o-i)/(a-n),C=void 0,S=void 0,A=void 0;if(-t==_?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):t==_&&(a<n?(r[0]=s,r[1]=l):(r[0]=d,r[1]=u),T=!0),-e==_?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):e==_&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?o<i?(C=this.getCardinalDirection(t,_,4),this.getCardinalDirection(e,_,2)):(C=this.getCardinalDirection(-t,_,3),this.getCardinalDirection(-e,_,1)):o<i?(C=this.getCardinalDirection(-t,_,1),this.getCardinalDirection(-e,_,3)):(C=this.getCardinalDirection(t,_,2),this.getCardinalDirection(e,_,4)),!T)switch(C){case 1:S=l,r[0]=n+-g/_,r[1]=S;break;case 2:S=i+p*_,r[0]=d,r[1]=S;break;case 3:S=u,r[0]=n+g/_,r[1]=S;break;case 4:S=i+-p*_,r[0]=h,r[1]=S}if(!E)switch(c){case 1:A=m,r[2]=a+-k/_,r[3]=A;break;case 2:A=o+w*_,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/_,r[3]=A;break;case 4:A=o+-w*_,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(t,e,r){return e<t?r:1+r%4},n.getIntersection=function(t,e,r,n){var i,a,o,s,l,c;return null==n?this.getIntersection2(t,e,r):(i=t.x,t=t.y,a=e.x,e=e.y,l=r.x,r=r.y,s=a*t-i*e,c=(o=n.x)*r-l*(n=n.y),0==(n=(e-=t)*(t=l-o)-(l=n-r)*(o=i-a))?null:new h((o*c-t*s)/n,(l*s-e*c)/n))},n.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r<t?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(t,e,r,n){var i=t.x,t=t.y,a=e.x,e=e.y,o=r.x,r=r.y,s=n.x,l=(a-i)*((n=n.y)-r)-(s-o)*(e-t);return 0!=l&&(e=((t-e)*(s-i)+(a-i)*(n-t))/l,0<(a=((n-r)*(s-i)+(o-s)*(n-t))/l))&&a<1&&0<e&&e<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,r){function n(){}Ae(n,"IMath"),n.sign=function(t){return 0<t?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){function n(){}Ae(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Ae(n,"defineProperties"),Ae(i,"_classCallCheck");var a,o,s=Ae(function(t){return{value:t,next:null,prev:null}},"nodeFrom"),l=Ae(function(t,e,r,n){return null!==t?t.next=e:n.head=e,null!==r?r.prev=e:n.tail=e,e.prev=t,e.next=r,n.length++,e},"add"),c=Ae(function(t,e){var r=t.prev,n=t.next;return null!==r?r.next=n:e.head=n,null!==n?n.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},"_remove");function h(t){var e=this;i(this,h),this.length=0,this.head=null,this.tail=null,t?.forEach(function(t){return e.push(t)})}Ae(h,"LinkedList"),a=h,o=[{key:"size",value:Ae(function(){return this.length},"size")},{key:"insertBefore",value:Ae(function(t,e){return l(e.prev,s(t),e,this)},"insertBefore")},{key:"insertAfter",value:Ae(function(t,e){return l(e,s(t),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:Ae(function(t,e){return l(e.prev,t,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:Ae(function(t,e){return l(e,t,e.next,this)},"insertNodeAfter")},{key:"push",value:Ae(function(t){return l(this.tail,s(t),null,this)},"push")},{key:"unshift",value:Ae(function(t){return l(null,s(t),this.head,this)},"unshift")},{key:"remove",value:Ae(function(t){return c(t,this)},"remove")},{key:"pop",value:Ae(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:Ae(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:Ae(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:Ae(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:Ae(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:Ae(function(t,e){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;n.value=e}},"set_object_at")}],n(a.prototype,o),t.exports=h},function(t,e,r){function n(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)}Ae(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.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)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){function n(t,e,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=n&&(this.x=t,this.y=e,this.width=r,this.height=n)}Ae(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){var n="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 i(){}Ae(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return"Object#"+(null==t?i.lastID:t)},i.isPrimitive=function(t){var e="u"<typeof t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},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)}Ae(g,"_toConsumableArray");var n=r(0),i=r(6),a=r(3),o=r(1),s=r(5),l=r(4),c=r(17),h=r(27);function u(t){h.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}Ae(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 i(this);return this.graphManager=t},u.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},u.prototype.newNode=function(t){return new a(this.graphManager,t)},u.prototype.newEdge=function(t){return new o(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"!==n.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(),n=0;n<r.length;n++)update(r[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof o?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof s&&null!=t.vGraphObject&&t.vGraphObject.update(t)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.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 n=this.getAllNodes(),i=0;i<n.length;i++)n[i].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,n=t.getNodes(),i=0;i<n.length;i++)null==(r=(e=n[i]).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(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)for(var a=new Set,o=[],s=new Map,l=(l=[]).concat(r);0<l.length&&e;){for(o.push(l[0]);0<o.length&&e;){var c=o[0];o.splice(0,1),a.add(c);for(var h=c.getEdges(),i=0;i<h.length;i++){var u=h[i].getOtherEnd(c);if(s.get(c)!=u){if(a.has(u)){e=!1;break}o.push(u),s.set(u,c)}}}if(e){var d=[].concat(g(a));for(t.push(d),i=0;i<d.length;i++){var p=d[i];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,s=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null),o=(a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a),this.newEdge(null));this.graphManager.add(o,r,a),e.add(a),r=a}return o=this.newEdge(null),this.graphManager.add(o,r,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:n).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 n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],o=new l(a.getCenterX(),a.getCenterY()),s=r.bendpoints.get(i);s.x=o.x,s.y=o.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(t,e,r,n){var i,a;return null!=r&&null!=n?(i=e,t<=50?i-=(e-e/r)/50*(50-t):i+=(e*n-e)/50*(t-50),i):(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=[],n=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var o=0;o<e.length;o++){var s=(c=e[o]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==s&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].concat(l);for(var l=[],o=0;o<e.length;o++){var c=e[o],h=e.indexOf(c);0<=h&&e.splice(h,1),c.getNeighborsList().forEach(function(t){var e;r.indexOf(t)<0&&(1==(e=n.get(t)-1)&&l.push(t),n.set(t,e))})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,r){function n(){}Ae(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},t.exports=n},function(t,e,r){var n=r(4);function i(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}Ae(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=this.lworldExtX;return 0!=e?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/e:0},i.prototype.transformY=function(t){var e=this.lworldExtY;return 0!=e?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/e:0},i.prototype.inverseTransformX=function(t){var e=this.ldeviceExtX;return 0!=e?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/e:0},i.prototype.inverseTransformY=function(t){var e=this.ldeviceExtY;return 0!=e?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/e:0},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},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)}Ae(d,"_toConsumableArray");var n,i=r(15),p=r(7),s=r(0),c=r(8),h=r(9);function a(){i.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(n in Ae(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.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,n,i,a=this.getGraphManager().getAllEdges(),o=0;o<a.length;o++)(t=a[o]).idealLength=this.idealEdgeLength,t.isInterGraph&&(e=t.getSource(),r=t.getTarget(),n=t.getSourceInLca().getEstimatedSize(),i=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=n+i-2*s.SIMPLE_NODE_SIZE),n=t.getLca().getInclusionTreeDepth(),t.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(e.getInclusionTreeDepth()+r.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.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,n,i,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],s=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,t=0;t<s.length;t++)r=s[t],this.calculateRepulsionForceOfANode(r,i,a,o),i.add(r);else for(t=0;t<s.length;t++)for(r=s[t],e=t+1;e<s.length;e++)n=s[e],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},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,n,i=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(n=(e=this.springConstant*(r-e))*(t.lengthX/r),e*=t.lengthY/r,i.springForceX+=n,i.springForceY+=e,a.springForceX-=n,a.springForceY-=e)},a.prototype.calcRepulsionForce=function(t,e){var r,n,i,a=t.getRect(),o=e.getRect(),s=new Array(2),l=new Array(4);a.intersects(o)?(c.calcSeparationAmount(a,o,s,p.DEFAULT_EDGE_LENGTH/2),n=2*s[0],i=2*s[1],s=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=s*n,t.repulsionForceY-=s*i,e.repulsionForceX+=s*n,e.repulsionForceY+=s*i):(s=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(r=o.getCenterX()-a.getCenterX(),o.getCenterY()-a.getCenterY()):(c.getIntersection(a,o,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+(s=Math.abs(s)<p.MIN_REPULSION_DIST?h.sign(s)*p.MIN_REPULSION_DIST:s)*s,o=Math.sqrt(a),i=(l=this.repulsionConstant*t.noOfChildren*e.noOfChildren/a)*s/o,t.repulsionForceX-=n=l*r/o,t.repulsionForceY-=i,e.repulsionForceX+=n,e.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(t){var e,r=t.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=t.getCenterX()-n,i=t.getCenterY()-i,a=Math.abs(n)+t.getWidth()/2,o=Math.abs(i)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=r.getEstimatedSize()*this.gravityRangeFactor)<a||e<o)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*i):((e=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||e<o)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*i*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)),n=new Array(e),i=0;i<e;i++)n[i]=new Array(r);for(i=0;i<e;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(t,e,r){for(var n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange)),s=n;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(t),t.setGridCoordinates(n,i,a,o)},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,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=new Set;t.surrounding=new Array;for(var a=this.grid,o=t.startX-1;o<t.finishX+2;o++)for(var s=t.startY-1;s<t.finishY+2;s++)if(!(o<0||s<0||o>=a.length||s>=a[0].length))for(var l=0;l<a[o][s].length;l++){var c,h,u=a[o][s][l];t.getOwner()!=u.getOwner()||t==u||e.has(u)||i.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&&i.add(u))}t.surrounding=[].concat(d(i))}for(o=0;o<t.surrounding.length;o++)this.calcRepulsionForce(t,t.surrounding[o])},a.prototype.calcRepulsionRange=function(){return 0},t.exports=a},function(t,e,r){var n,i=r(1),a=r(7);function o(t,e,r){i.call(this,t,e,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(n in Ae(o,"FDLayoutEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var n,i=r(3);function a(t,e,r,n){i.call(this,t,e,r,n),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(n in Ae(a,"FDLayoutNode"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.setGridCoordinates=function(t,e,r,n){this.startX=t,this.finishX=e,this.startY=r,this.finishY=n},t.exports=a},function(t,e,r){function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}Ae(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,r){var n=r(14);function i(){this.map={},this.keys=[]}Ae(i,"HashMap"),i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},i.prototype.get=function(t){return t=n.createID(t),this.map[t]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){var n=r(14);function i(){this.set={}}Ae(i,"HashSet"),i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)t.push(this.set[e[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var n=t[r];this.add(n)}},t.exports=i},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Ae(n,"defineProperties"),Ae(i,"_classCallCheck");var a,o,s=r(11),r=(Ae(l,"Quicksort"),a=l,o=[{key:"_quicksort",value:Ae(function(t,e,r){var n;e<r&&(n=this._partition(t,e,r),this._quicksort(t,e,n),this._quicksort(t,n+1,r))},"_quicksort")},{key:"_partition",value:Ae(function(t,e,r){for(var n=this._get(t,e),i=e,a=r;;){for(;this.compareFunction(n,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),n);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}},"_partition")},{key:"_get",value:Ae(function(t,e){return t instanceof s?t.get_object_at(e):t[e]},"_get")},{key:"_set",value:Ae(function(t,e,r){t instanceof s?t.set_object_at(e,r):t[e]=r},"_set")},{key:"_swap",value:Ae(function(t,e,r){var n=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,n)},"_swap")},{key:"_defaultCompareFunction",value:Ae(function(t,e){return t<e},"_defaultCompareFunction")}],n(a.prototype,o),l);function l(t,e){i(this,l),null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof s?t.size():t.length,this._quicksort(t,0,e-1)}t.exports=r},function(t,e,r){var n,i;function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}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,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=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=n,this.gap_penalty=i,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 o=0;o<this.jMax;o++)this.grid[a][o]=0}this.tracebackGrid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.tracebackGrid[s]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[s][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}Ae(a,"defineProperties"),Ae(c,"_classCallCheck"),Ae(h,"NeedlemanWunsch"),n=h,i=[{key:"getScore",value:Ae(function(){return this.score},"getScore")},{key:"getAlignments",value:Ae(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:Ae(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 n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:Ae(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:Ae(function(t,e){for(var r=[],n=-1;-1!==(n=t.indexOf(e,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:Ae(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}],a(n.prototype,i),t.exports=h},function(t,e,r){var n=Ae(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),t.exports=n},function(t,e,r){function n(){this.listeners=[]}Ae(n,"Emitter");var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];t===n.event&&n.callback(e)}},t.exports=n}],i={},Ae(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?Ae(function(){return t.default},"getDefault"):Ae(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=26);function n(t){var e;return(i[t]||(e=i[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var r,i})}),n9t=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(r9t()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(r9t()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in Ae(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.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 n,i=r(0).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraphManager;function a(t){i.call(this,t)}for(n in Ae(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function o(t,e,r,n){i.call(this,t,e,r,n)}for(n in Ae(o,"CoSENode"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.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},o.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.moveBy(t,e),r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},o.prototype.setPred1=function(t){this.pred1=t},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(t){this.next=t},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(t){this.processed=t},o.prototype.isProcessed=function(){return processed},t.exports=o},function(t,e,r){var n,i=r(0).FDLayout,a=r(4),o=r(3),h=r(5),s=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(){i.call(this),this.toBeTiled={}}for(n in Ae(x,"CoSELayout"),x.prototype=Object.create(i.prototype),i)x[n]=i[n];x.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},x.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},x.prototype.newNode=function(t){return new h(this.graphManager,t)},x.prototype.newEdge=function(t){return new s(null,null,t)},x.prototype.initParameters=function(){i.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 n=t[r].rect,i=t[r].id;e[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.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(),n=r.length,i=0;i<n;i++)(t=r[i]).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 n=t[r];if(!e.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new f),n.getBendpoints().push(new f),this.createDummyNodesForBendpoints(n),e.add(n);else{var o=(o=(o=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!e.has(o[0])){if(1<o.length)for(var s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new f),this.createDummyNodesForBendpoints(l)}o.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)),n=0,i=0,a=0,o=new f(0,0),s=0;s<t.length;s++){s%r==0&&(i=n,(a=0)!=s&&(i+=u.DEFAULT_COMPONENT_SEPERATION),n=0);var l=t[s],c=m.findCenterOfTree(l);e.x=a,e.y=i,(o=x.radialLayout(l,c,e)).y>n&&(n=Math.floor(o.y)),a=Math.floor(o.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,n),l.calculateBounds(t)),i=new c;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(i);return n=new f(e.getMaxX(),e.getMaxY()),i.inverseTransformPoint(n)},x.branchRadialLayout=function(t,e,r,n,i,a){(o=(n-r+1)/2)<0&&(o+=180);var o=(o+r)%360*v.TWO_PI/360,s=(Math.cos(o),i*Math.cos(o)),o=i*Math.sin(o),l=(t.setCenter(s,o),[]),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 s=null!=e?(l.indexOf(d[0])+1)%u:0,g=Math.abs(n-r)/c,f=s;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,i+a,a),h++)}},x.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,r=0;r<t.length;r++){var n=t[r].getDiagonal();e<n&&(e=n)}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 n=(i=e[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||t.push(i)}for(r=0;r<t.length;r++){var i,a=(i=t[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}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()),n=new h(l.graphManager),i=(n.id=e,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[e]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var o=0;o<c[t].length;o++){var s=c[t][o];a.remove(s),i.add(s)}}})},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,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(t){var e=r.idToDummyNode[t];n[t]=r.tileNodes(r.memberGroups[t],e.paddingLeft+e.paddingRight),e.rect.width=n[t].width,e.rect.height=n[t].height})},x.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id,n=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i)}},x.prototype.repopulateZeroDegreeMembers=function(){var i=this,a=this.tiledZeroDegreePack;Object.keys(a).forEach(function(t){var e=i.idToDummyNode[t],r=e.paddingLeft,n=e.paddingTop;i.adjustLocations(a[t],e.rect.x,e.rect.y,r,n)})},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(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[e]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},x.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;n<e.length;n++){var i=e[n];i.getSource().id!==i.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(),n=0;n<r.length;n++){var i=r[n];e+=this.getNodeDegreeWithChildren(i)}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,n,i){r+=i;for(var a=e+=n,o=0;o<t.rows.length;o++){var s=t.rows[o];e=a;for(var l=0,c=0;c<s.length;c++){var h=s[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,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=n[t];i.tiledMemberPack[t]=i.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=i.tiledMemberPack[t].width,e.rect.height=i.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 n=0;n<t.length;n++){var i=t[n];0==r.rows.length?this.insertNodeToRow(r,i,0,e):this.canAddHorizontal(r,i.rect.width,i.rect.height)?this.insertNodeToRow(r,i,this.getShortestRowIndex(r),e):this.insertNodeToRow(r,i,r.rows.length,e),this.shiftToLastRow(r)}return r},x.prototype.insertNodeToRow=function(t,e,r,n){r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var n=t.rowWidth[r]+e.rect.width,n=(0<t.rows[r].length&&(n+=t.horizontalPadding),t.rowWidth[r]=n,t.width<n&&(t.width=n),e.rect.height),i=(0<r&&(n+=t.verticalPadding),0);n>t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<r&&(e=n,r=t.rowWidth[n]);return e},x.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>r&&(e=n,r=t.rowWidth[n]);return e},x.prototype.canAddHorizontal=function(t,e,r){var n,i,a=this.getShortestRowIndex(t);return a<0||(i=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[a]<r&&0<a&&(n=r+t.verticalPadding-t.rowHeight[a]),a=t.width-i>=e+t.horizontalPadding?(t.height+n)/(i+e+t.horizontalPadding):(t.height+n)/t.width,n=r+t.verticalPadding,(a<1?1/a:a)<((i=t.width<e?(t.height+n)/e:(t.height+n)/t.width)<1?1/i:i))},x.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,n=t.rows[e],i=n[n.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var o=Number.MIN_VALUE,s=0;s<n.length;s++)n[s].height>o&&(o=n[s].height);0<e&&(o+=t.verticalPadding),a=t.rowHeight[e]+t.rowHeight[r],t.rowHeight[e]=o,t.rowHeight[r]<i.height+t.verticalPadding&&(t.rowHeight[r]=i.height+t.verticalPadding),i=t.rowHeight[e]+t.rowHeight[r],t.height+=i-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 n=this.graphManager.getAllNodes(),i=[],r=!1,a=0;a<n.length;a++)1!=(t=n[a]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(i.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var o=[],s=0;s<i.length;s++)1==i[s][0].getEdges().length&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},x.prototype.growTree=function(t){for(var e,r=t[t.length-1],n=0;n<r.length;n++)e=r[n],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,n=t.finishX,i=t.startY,a=t.finishY,o=[0,0,0,0];if(0<i)for(var s=r;s<=n;s++)o[0]+=this.grid[s][i-1].length+this.grid[s][i].length-1;if(n<this.grid.length-1)for(s=i;s<=a;s++)o[1]+=this.grid[n+1][s].length+this.grid[n][s].length-1;if(a<this.grid[0].length-1)for(s=r;s<=n;s++)o[2]+=this.grid[s][a+1].length+this.grid[s][a].length-1;if(0<r)for(s=i;s<=a;s++)o[3]+=this.grid[r-1][s].length+this.grid[r][s].length-1;for(var l,c,h,u,d=y.MAX_VALUE,p=0;p<o.length;p++)o[p]<d?(d=o[p],l=1,c=p):o[p]==d&&l++;3==l&&0==d?0==o[0]&&0==o[1]&&0==o[2]?h=1:0==o[0]&&0==o[1]&&0==o[3]?h=0:0==o[0]&&0==o[2]&&0==o[3]?h=3:0==o[1]&&0==o[2]&&0==o[3]&&(h=2):h=2==l&&0==d?(u=Math.floor(2*Math.random()),0==o[0]&&0==o[1]?0==u?0:1:0==o[0]&&0==o[2]?0==u?0:2:0==o[0]&&0==o[3]?0==u?0:3:0==o[1]&&0==o[2]?0==u?1:2:0==o[1]&&0==o[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 n={};n.layoutBase=r(0),n.CoSEConstants=r(1),n.CoSEEdge=r(2),n.CoSEGraph=r(3),n.CoSEGraphManager=r(4),n.CoSELayout=r(6),n.CoSENode=r(5),t.exports=n}],a={},Ae(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?Ae(function(){return t.default},"getDefault"):Ae(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7);function n(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var i,a})}),i9t=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(n9t()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(n9t()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n=r(0).layoutBase.LayoutConstants,i=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,o={ready:Ae(function(){},"ready"),stop:Ae(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 s(t,e){var r,n={};for(r in t)n[r]=t[r];for(r in e)n[r]=e[r];return n}function l(t){this.options=s(o,t),c(this.options)}Ae(s,"extend"),Ae(l,"_CoSELayout");var c=Ae(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?n.QUALITY=0:"proof"==t.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=n.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 o,s,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 n=0;n<r.length;n++){var i=r[n],a=this.idToLNode[i.data("source")],u=this.idToLNode[i.data("target")];a!==u&&0==a.getEdgesBetween(u).length&&(t.add(c.newEdge(),a,u).id=i.id())}var d=Ae(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=Ae(function t(){for(var e,a,r=Ae(function(){l.fit&&l.cy.fit(l.eles,l.padding),o||(o=!0,h.cy.one("layoutready",l.ready),h.cy.trigger({type:"layoutready",layout:h}))},"afterReposition"),n=h.options.refresh,i=0;i<n&&!e;i++)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}),s&&cancelAnimationFrame(s),o=!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(),n=a[r],i=t;null==n&&(n=a[i.data("parent")]||a["DummyCompound_"+i.data("parent")],a[r]=n,null!=(i=i.parent()[0])););return null!=n?{x:n.x,y:n.y}:{x:t.position("x"),y:t.position("y")}}}),r(),s=requestAnimationFrame(t))},"iterateAnimated");return c.addListener("layoutstarted",function(){"during"===h.options.animate&&(s=requestAnimationFrame(p))}),c.runLayout(),"during"!==this.options.animate&&(h.options.eles.nodes().not(":parent").layoutPositions(h,h.options,d),o=!1),this},l.prototype.getTopMostNodes=function(t){for(var n={},e=0;e<t.length;e++)n[t[e].id()]=!0;return t.filter(function(t,e){for(var r=(t="number"==typeof t?e:t).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(t,e,r){for(var n=e.length,i=0;i<n;i++){var a,o,s,l=e[i],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()&&(s=l.boundingBox({includeLabels:!0,includeNodes:!1}).w,a=l.boundingBox({includeLabels:!0,includeNodes:!1}).h,o=l.css("text-halign"),h.labelWidth=s,h.labelHeight=a,h.labelPos=o),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&&(s=r.getGraphManager().add(r.newGraph(),h),this.processChildrenList(s,c,r))}},l.prototype.stop=function(){return this.stopped=!0,this},Ae(function(t){t("layout","cose-bilkent",l)},"register"));typeof cytoscape<"u"&&r(cytoscape),t.exports=r}],a={},Ae(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?Ae(function(){return t.default},"getDefault"):Ae(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1);function n(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var i,a})});function a9t(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")")}var o9t,s9t,l9t,c9t,h9t,u9t,d9t,p9t,g9t,f9t=t(()=>{KC(),K8(),o9t=Ae(function(t,e,r,n){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-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),s9t=Ae(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),l9t=Ae(function(t,e,r){var n=r.width,i=r.height,a=.15*n,o=.25*n,s=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*n},${-1*n*.1}
|
|
|
a${s},${s} 1 0,1 ${.4*n},${-1*n*.1}
|
|
|
a${o},${o} 1 0,1 ${.35*n},${.2*+n}
|
|
|
|
|
|
a${a},${a} 1 0,1 ${.15*n},${.35*+i}
|
|
|
a${l},${l} 1 0,1 ${-1*n*.15},${.65*+i}
|
|
|
|
|
|
a${o},${a} 1 0,1 ${-1*n*.25},${.15*n}
|
|
|
a${s},${s} 1 0,1 ${-1*n*.5},0
|
|
|
a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}
|
|
|
|
|
|
a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35}
|
|
|
a${l},${l} 1 0,1 ${.1*n},${-1*i*.65}
|
|
|
|
|
|
H0 V0 Z`)},"cloudBkg"),c9t=Ae(function(t,e,r){var n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*n},${-1*i*.1}
|
|
|
a${a},${a} 1 0,0 ${.25*n},0
|
|
|
a${a},${a} 1 0,0 ${.25*n},0
|
|
|
a${a},${a} 1 0,0 ${.25*n},${.1*+i}
|
|
|
|
|
|
a${a},${a} 1 0,0 ${.15*n},${.33*+i}
|
|
|
a${.8*a},${.8*a} 1 0,0 0,${.34*+i}
|
|
|
a${a},${a} 1 0,0 ${-1*n*.15},${.33*+i}
|
|
|
|
|
|
a${a},${a} 1 0,0 ${-1*n*.25},${.15*i}
|
|
|
a${a},${a} 1 0,0 ${-1*n*.25},0
|
|
|
a${a},${a} 1 0,0 ${-1*n*.25},0
|
|
|
a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15}
|
|
|
|
|
|
a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33}
|
|
|
a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}
|
|
|
a${a},${a} 1 0,0 ${.1*n},${-1*i*.33}
|
|
|
|
|
|
H0 V0 Z`)},"bangBkg"),h9t=Ae(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),Ae(a9t,"insertPolygonShape"),u9t=Ae(function(t,e,r){var n=r.height,i=n/4,a=r.width-r.padding+2*i;a9t(e,a,n,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],r)},"hexagonBkg"),d9t=Ae(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),p9t=Ae(async function(t,e,r,n,i){var a=i.htmlLabels,o=n%11,n=e.append("g");let s="section-"+(r.section=o);o<0&&(s+=" section-root"),n.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+s);var l=n.append("g"),e=n.append("g"),c=r.descr.replace(/(<br\/*>)/g,`
|
|
|
`),c=(await XC(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[i]=j8(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.nodeType.CIRCLE?(r.height+=50,r.width+=50,n.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),e.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,i=r.height,r.height=Math.max(i,60),i=Math.abs(r.height-i),n.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+i/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),e.attr("transform","translate("+(25+r.width/2)+", "+(i/2+r.padding/2)+")")):a?(i=(r.width-c.width)/2,a=(r.height-c.height)/2,e.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,i=r.padding/2,e.attr("transform","translate("+c+", "+i+")")),r.type){case t.nodeType.DEFAULT:o9t(t,l,r,o);break;case t.nodeType.ROUNDED_RECT:d9t(t,l,r,o);break;case t.nodeType.RECT:s9t(t,l,r,o);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),h9t(t,l,r,o);break;case t.nodeType.CLOUD:l9t(t,l,r,o);break;case t.nodeType.BANG:c9t(t,l,r,o);break;case t.nodeType.HEXAGON:u9t(t,l,r,o)}return t.setElementForId(r.id,n),r.height},"drawNode"),g9t=Ae(function(t,e){var t=t.getElementById(e.id),r=e.x||0,e=e.y||0;t.attr("transform","translate("+r+","+e+")")},"positionNode")});async function m9t(r,n,t,i,a){await p9t(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>m9t(r,n,t,i<0?e:i,a)))}function y9t(n,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,R.trace("Edge: ",e,r),n.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function v9t(e,r,n,i){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:i,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{v9t(t,r,n,i+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:i,section:t.section}})})}function x9t(n,i){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),r=t9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),v9t(n,r,i,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{R.info("Ready",t),e(r)})})}function b9t(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,g9t(i,r),i.getElementById(r.nodeId));R.info("Id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),n.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),n.attr("attr",`apa-${e})`)})}var w9t,k9t,T9t,E9t,_9t,C9t=t(()=>{e9t(),w9t=rt(i9t(),1),Q3(),i(),e(),Ipt(),ec(),f9t(),Nn(),t9t.use(w9t.default),Ae(m9t,"drawNodes"),Ae(y9t,"drawEdges"),Ae(v9t,"addNodes"),Ae(x9t,"layoutMindmap"),Ae(b9t,"positionNodes"),w9t=Ae(async(t,e,r,n)=>{var i,a,o;R.debug(`Rendering mindmap diagram
|
|
|
`+t),(n=(t=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(e=Ept(e)).append("g")).attr("class","mindmap-edges"),(o=e.append("g")).attr("class","mindmap-nodes"),await m9t(t,o,n,-1,i),y9t(a,o=await x9t(n,i)),b9t(t,o),Xl(void 0,e,i.mindmap?.padding??xr.mindmap.padding,i.mindmap?.useMaxWidth??xr.mindmap.useMaxWidth))},"draw"),k9t={draw:w9t}}),S9t=t(()=>{bn(),T9t=Ae(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],Ye(e["lineColor"+t])?e["lineColor"+t]=Ve(e["lineColor"+t],20):e["lineColor"+t]=Ke(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var n=""+(17-3*t);r+=`
|
|
|
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
|
|
|
fill: ${e["cScale"+t]};
|
|
|
}
|
|
|
.section-${t-1} text {
|
|
|
fill: ${e["cScaleLabel"+t]};
|
|
|
}
|
|
|
.node-icon-${t-1} {
|
|
|
font-size: 40px;
|
|
|
color: ${e["cScaleLabel"+t]};
|
|
|
}
|
|
|
.section-edge-${t-1}{
|
|
|
stroke: ${e["cScale"+t]};
|
|
|
}
|
|
|
.edge-depth-${t-1}{
|
|
|
stroke-width: ${n};
|
|
|
}
|
|
|
.section-${t-1} line {
|
|
|
stroke: ${e["cScaleInv"+t]} ;
|
|
|
stroke-width: 3;
|
|
|
}
|
|
|
|
|
|
.disabled, .disabled circle, .disabled text {
|
|
|
fill: lightgray;
|
|
|
}
|
|
|
.disabled text {
|
|
|
fill: #efefef;
|
|
|
}
|
|
|
`}return r},"genSections"),E9t=Ae(t=>`
|
|
|
.edge {
|
|
|
stroke-width: 3;
|
|
|
}
|
|
|
${T9t(t)}
|
|
|
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
|
fill: ${t.git0};
|
|
|
}
|
|
|
.section-root text {
|
|
|
fill: ${t.gitBranchLabel0};
|
|
|
}
|
|
|
.icon-container {
|
|
|
height:100%;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
.edge {
|
|
|
fill: none;
|
|
|
}
|
|
|
.mindmap-node-label {
|
|
|
dy: 1em;
|
|
|
alignment-baseline: middle;
|
|
|
text-anchor: middle;
|
|
|
dominant-baseline: middle;
|
|
|
text-align: center;
|
|
|
}
|
|
|
`,"getStyles"),_9t=E9t}),A9t={};J(A9t,{diagram:()=>L9t});var L9t,N9t,I9t,M9t,R9t,D9t,O9t,P9t,B9t,F9t,$9t,z9t,G9t,U9t,q9t,Y9t=t(()=>{d6t(),p6t(),C9t(),S9t(),L9t={db:h6t,renderer:k9t,parser:X5t,styles:_9t}}),j9t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[s-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[s-2].trim().replaceAll('""','"')),h=parseFloat(a[s].trim());n.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};i.lexer=r,Ae(t,"Parser"),(N9t=new((t.prototype=i).Parser=t)).parser=N9t,I9t=N9t}),H9t=t(()=>{i(),tc(),fh(),M9t=[],R9t=[],D9t=new Map,O9t=Ae(()=>{M9t=[],R9t=[],D9t=new Map,lc()},"clear"),P9t=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{Ae(this,"SankeyLink")}},B9t=Ae((t,e,r)=>{M9t.push(new P9t(t,e,r))},"addLink"),F9t=class{constructor(t){this.ID=t}static{Ae(this,"SankeyNode")}},$9t=Ae(t=>{t=L.sanitizeText(t,D());let e=D9t.get(t);return void 0===e&&(e=new F9t(t),D9t.set(t,e),R9t.push(e)),e},"findOrCreateNode"),z9t=Ae(()=>R9t,"getNodes"),G9t=Ae(()=>M9t,"getLinks"),U9t=Ae(()=>({nodes:R9t.map(t=>({id:t.ID})),links:M9t.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),q9t={nodesMap:D9t,getConfig:Ae(()=>D().sankey,"getConfig"),getNodes:z9t,getLinks:G9t,getGraph:U9t,addLink:B9t,findOrCreateNode:$9t,getAccTitle:hc,setAccTitle:cc,getAccDescription:dc,setAccDescription:uc,getDiagramTitle:gc,setDiagramTitle:pc,clear:O9t}});function W9t(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n<t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var V9t=t(()=>{Ae(W9t,"max")});function X9t(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var K9t=t(()=>{Ae(X9t,"min")});function Z9t(e,r){let n=0;if(void 0===r)for(var t of e)(t=+t)&&(n+=t);else{let t=-1;for(var i of e)(i=+r(i,++t,e))&&(n+=i)}return n}var Q9t=t(()=>{Ae(Z9t,"sum")}),J9t=t(()=>{V9t(),K9t(),Q9t()});function tLt(t){return t.target.depth}function eLt(t){return t.depth}function rLt(t,e){return e-1-t.height}function nLt(t,e){return t.sourceLinks.length?t.depth:e-1}function iLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?X9t(t.sourceLinks,tLt)-1:0}var aLt=t(()=>{J9t(),Ae(tLt,"targetDepth"),Ae(eLt,"left"),Ae(rLt,"right"),Ae(nLt,"justify"),Ae(iLt,"center")});function oLt(t){return function(){return t}}var sLt=t(()=>{Ae(oLt,"constant")});function lLt(t,e){return hLt(t.source,e.source)||t.index-e.index}function cLt(t,e){return hLt(t.target,e.target)||t.index-e.index}function hLt(t,e){return t.y0-e.y0}function uLt(t){return t.value}function dLt(t){return t.index}function pLt(t){return t.nodes}function gLt(t){return t.links}function fLt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function mLt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var n of r.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(var i of r.targetLinks)i.y1=e+i.width/2,e+=i.width}}function yLt(){let s=0,l=0,c=1,h=1,u=24,i=8,d,p=dLt,g=nLt,f,m,e=pLt,r=gLt,a=6;function n(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return o(t),y(t),v(t),x(t),k(t),mLt(t),t}function o({nodes:r,links:t}){for(var[e,n]of r.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];var i,a,o=new Map(r.map((t,e)=>[p(t,e,r),t]));for([i,a]of t.entries()){a.index=i;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=fLt(o,t)),"object"!=typeof e&&(e=a.target=fLt(o,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:s,targetLinks:l}of r)s.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(Z9t(e.sourceLinks,uLt),Z9t(e.targetLinks,uLt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:o}of a.sourceLinks)n.add(o)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:o}of a.targetLinks)n.add(o)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function b({nodes:t}){var e,r=W9t(t,t=>t.depth)+1,n=(c-s-u)/(r-1),i=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=s+a*n,e.x1=e.x0+u,i[a]?i[a].push(e):i[a]=[e]}if(f)for(var o of i)o.sort(f);return i}function w(t){var r,n=X9t(t,t=>(h-l-(t.length-1)*d)/Z9t(t,uLt));for(r of t){let e=l;for(var i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}e=(h-e+d)/(r.length+1);for(let t=0;t<r.length;++t){var o=r[t];o.y0+=e*(t+1),o.y1+=e*(t+1)}L(r)}}function k(t){var e=b(t);d=Math.min(i,(h-l)/(W9t(e,t=>t.length)-1)),w(e);for(let t=0;t<a;++t){var r=Math.pow(.99,t),n=Math.max(1-r,(t+1)/a);E(e,r,n),T(e,r,n)}}function T(r,n,i){for(let t=1,e=r.length;t<e;++t){var a,o,s=r[t];for(a of s){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&&(o=(t/e-a.y0)*n,a.y0+=o,a.y1+=o,A(a))}void 0===f&&s.sort(hLt),_(s,i)}}function E(r,n,i){for(let t=r.length,e=t-2;0<=e;--e){var a,o,s=r[e];for(a of s){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&&(o=(t/e-a.y0)*n,a.y0+=o,a.y1+=o,A(a))}void 0===f&&s.sort(hLt),_(s,i)}}function _(t,e){var r=t.length>>1,n=t[r];S(t,n.y0-d,r-1,e),C(t,n.y1+d,1+r,e),S(t,h,t.length-1,e),C(t,l,0,e)}function C(t,e,r,n){for(;r<t.length;++r){var i=t[r],a=(e-i.y0)*n;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+d}}function S(t,e,r,n){for(;0<=r;--r){var i=t[r],a=(i.y1-e)*n;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-d}}function A({sourceLinks:t,targetLinks:e}){if(void 0===m){for(var{source:{sourceLinks:r}}of e)r.sort(cLt);for(var{target:{targetLinks:n}}of t)n.sort(lLt)}}function L(t){if(void 0===m)for(var{sourceLinks:e,targetLinks:r}of t)e.sort(cLt),r.sort(lLt)}function N(t,e){let r=t.y0-(t.sourceLinks.length-1)*d/2;for(var{target:n,width:i}of t.sourceLinks){if(n===e)break;r+=i+d}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;r-=o}return r}function I(t,e){let r=e.y0-(e.targetLinks.length-1)*d/2;for(var{source:n,width:i}of e.targetLinks){if(n===t)break;r+=i+d}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;r-=o}return r}return Ae(n,"sankey"),n.update=function(t){return mLt(t),t},n.nodeId=function(t){return arguments.length?(p="function"==typeof t?t:oLt(t),n):p},n.nodeAlign=function(t){return arguments.length?(g="function"==typeof t?t:oLt(t),n):g},n.nodeSort=function(t){return arguments.length?(f=t,n):f},n.nodeWidth=function(t){return arguments.length?(u=+t,n):u},n.nodePadding=function(t){return arguments.length?(i=d=+t,n):i},n.nodes=function(t){return arguments.length?(e="function"==typeof t?t:oLt(t),n):e},n.links=function(t){return arguments.length?(r="function"==typeof t?t:oLt(t),n):r},n.linkSort=function(t){return arguments.length?(m=t,n):m},n.size=function(t){return arguments.length?(s=l=0,c=+t[0],h=+t[1],n):[c-s,h-l]},n.extent=function(t){return arguments.length?(s=+t[0][0],c=+t[1][0],l=+t[0][1],h=+t[1][1],n):[[s,l],[c,h]]},n.iterations=function(t){return arguments.length?(a=+t,n):a},Ae(o,"computeNodeLinks"),Ae(y,"computeNodeValues"),Ae(v,"computeNodeDepths"),Ae(x,"computeNodeHeights"),Ae(b,"computeNodeLayers"),Ae(w,"initializeNodeBreadths"),Ae(k,"computeNodeBreadths"),Ae(T,"relaxLeftToRight"),Ae(E,"relaxRightToLeft"),Ae(_,"resolveCollisions"),Ae(C,"resolveCollisionsTopToBottom"),Ae(S,"resolveCollisionsBottomToTop"),Ae(A,"reorderNodeLinks"),Ae(L,"reorderLinks"),Ae(N,"targetTop"),Ae(I,"sourceTop"),n}var vLt=t(()=>{J9t(),aLt(),sLt(),Ae(lLt,"ascendingSourceBreadth"),Ae(cLt,"ascendingTargetBreadth"),Ae(hLt,"ascendingBreadth"),Ae(uLt,"value"),Ae(dLt,"defaultId"),Ae(pLt,"defaultNodes"),Ae(gLt,"defaultLinks"),Ae(fLt,"find"),Ae(mLt,"computeLinkBreadths"),Ae(yLt,"Sankey")});function xLt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function bLt(){return new xLt}var wLt,kLt,TLt,ELt,_Lt=t(()=>{wLt=Math.PI,TLt=(kLt=2*wLt)-1e-6,Ae(xLt,"Path"),Ae(bLt,"path"),xLt.prototype=bLt.prototype={constructor:xLt,moveTo:Ae(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:Ae(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:Ae(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:Ae(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:Ae(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:Ae(function(t,e,r,n,i){var a,o,s=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(n=+n)-(e=+e),u=s-t,d=l-e,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):1e-6<p&&(1e-6<Math.abs(d*c-h*u)&&i?(o=c*c+h*h,n=(r-=s)*r+(s=n-l)*s,l=Math.sqrt(o),a=Math.sqrt(p),p=(o=i*Math.tan((wLt-Math.acos((o+p-n)/(2*l*a)))/2))/a,n=o/l,1e-6<Math.abs(p-1)&&(this._+="L"+(t+p*u)+","+(e+p*d)),this._+="A"+i+","+i+",0,0,"+ +(u*s<d*r)+","+(this._x1=t+n*c)+","+(this._y1=e+n*h)):this._+="L"+(this._x1=t)+","+(this._y1=e))},"arcTo"),arc:Ae(function(t,e,r,n,i,a){t=+t,e=+e,a=!!a;var o=(r=+r)*Math.cos(n),s=r*Math.sin(n),l=t+o,c=e+s,h=1^a,a=a?n-i:i-n;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&&(TLt<(a=a<0?a%kLt+kLt:a)?this._+="A"+r+","+r+",0,1,"+h+","+(t-o)+","+(e-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +(wLt<=a)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},"arc"),rect:Ae(function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:Ae(function(){return this._},"toString")},ELt=bLt}),CLt=t(()=>{_Lt()});function SLt(t){return Ae(function(){return t},"constant")}var ALt=t(()=>{Ae(SLt,"default")});function LLt(t){return t[0]}function NLt(t){return t[1]}var ILt,MLt=t(()=>{Ae(LLt,"x"),Ae(NLt,"y")}),RLt=t(()=>{ILt=Array.prototype.slice});function DLt(t){return t.source}function OLt(t){return t.target}function PLt(i){var a=DLt,o=OLt,s=LLt,l=NLt,c=null;function e(){var t,e=ILt.call(arguments),r=a.apply(this,e),n=o.apply(this,e);if(c=c||(t=ELt()),i(c,+s.apply(this,(e[0]=r,e)),+l.apply(this,e),+s.apply(this,(e[0]=n,e)),+l.apply(this,e)),t)return c=null,t+""||null}return Ae(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(o=t,e):o},e.x=function(t){return arguments.length?(s="function"==typeof t?t:SLt(+t),e):s},e.y=function(t){return arguments.length?(l="function"==typeof t?t:SLt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function BLt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function FLt(){return PLt(BLt)}var $Lt=t(()=>{CLt(),RLt(),ALt(),MLt(),Ae(DLt,"linkSource"),Ae(OLt,"linkTarget"),Ae(PLt,"link"),Ae(BLt,"curveHorizontal"),Ae(FLt,"linkHorizontal")}),zLt=t(()=>{$Lt()});function GLt(t){return[t.source.x1,t.y0]}function ULt(t){return[t.target.x0,t.y1]}function qLt(){return FLt().source(GLt).target(ULt)}var YLt,jLt,HLt,WLt,VLt,XLt=t(()=>{zLt(),Ae(GLt,"horizontalSource"),Ae(ULt,"horizontalTarget"),Ae(qLt,"default")}),KLt=t(()=>{vLt(),aLt(),XLt()}),ZLt=t(()=>{YLt=class e{static{Ae(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+")"}}}),QLt=t(()=>{i(),Q3(),KLt(),ec(),ZLt(),jLt={left:eLt,right:rLt,center:iLt,justify:nLt},HLt=Ae(function(t,e,r,n){let{securityLevel:i,sankey:a}=D(),o=vc.sankey,s,l=("sandbox"===i&&(s=O("#i"+e)),O("sandbox"===i?s.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${e}"]`):O(`[id="${e}"]`),h=a?.width??o.width,u=a?.height??o.width,d=a?.useMaxWidth??o.useMaxWidth,p=a?.nodeAlignment??o.nodeAlignment,g=a?.prefix??o.prefix,f=a?.suffix??o.suffix,m=a?.showValues??o.showValues,y=n.db.getGraph(),v=jLt[p],x=(yLt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),u2(ub));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=YLt.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=Ae(({id:t,value:e})=>m?t+`
|
|
|
`+g+Math.round(100*e)/100+f:t,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0<h/2?t.x1+6:t.x0-6).attr("y",t=>(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0<h/2?"start":"end").text(e),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((e=n.append("linearGradient").attr("id",t=>(t.uid=YLt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=Ae(t=>t.uid,"coloring");break;case"source":w=Ae(t=>x(t.source.id),"coloring");break;case"target":w=Ae(t=>x(t.target.id),"coloring");break;default:w=b}n.append("path").attr("d",qLt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Xl(void 0,c,0,d)},"draw"),WLt={draw:HLt}}),JLt=t(()=>{VLt=Ae(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
|
`).trim(),"prepareTextForParsing")}),tNt={};J(tNt,{diagram:()=>rNt});var eNt,rNt,nNt,iNt,aNt,oNt,sNt,lNt,cNt,hNt,uNt,dNt,pNt,gNt,fNt,mNt,yNt,vNt,xNt=t(()=>{j9t(),H9t(),QLt(),JLt(),eNt=I9t.parse.bind(I9t),I9t.parse=t=>eNt(VLt(t)),rNt={parser:I9t,db:q9t,renderer:WLt}}),bNt=t(()=>{Mn(),Nn(),K8(),fh(),nNt={packet:[]},iNt=structuredClone(nNt),aNt=xr.packet,oNt=Ae(()=>{var t=b8({...aNt,...Rr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),sNt=Ae(()=>iNt.packet,"getPacket"),lNt=Ae(t=>{0<t.length&&iNt.packet.push(t)},"pushWord"),cNt=Ae(()=>{lc(),iNt=structuredClone(nNt)},"clear"),hNt={pushWord:lNt,getPacket:sNt,getConfig:oNt,clear:cNt,setAccTitle:cc,getAccTitle:hc,setDiagramTitle:pc,getDiagramTitle:gc,getAccDescription:dc,setAccDescription:uc}}),wNt=t(()=>{cut(),e(),put(),bNt(),uNt=Ae(t=>{hut(t,hNt);let e=-1,r=[],n=1,i=hNt.getConfig().bitsPerRow;for(var{start:a,end:o,label:s}of t.blocks){if(o&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a!==e+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${e+1}.`);for(e=o??a,R.debug(`Packet block ${a} - ${e} with label `+s);r.length<=i+1&&hNt.getPacket().length<1e4;){var[l,c]=dNt({start:a,end:o,label:s},n,i);if(r.push(l),l.end+1===n*i&&(hNt.pushWord(r),r=[],n++),!c)break;({start:a,end:o,label:s}=c)}}hNt.pushWord(r)},"populate"),dNt=Ae((t,e,r)=>{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),pNt={parse:Ae(async t=>{t=await aut("packet",t),R.debug(t),uNt(t)},"parse")}}),kNt=t(()=>{Ipt(),ec(),gNt=Ae((t,e,r,n)=>{var i,a,o=(n=n.db).getConfig(),{rowHeight:s,paddingY:l,bitWidth:c,bitsPerRow:h}=o,u=n.getPacket(),n=n.getDiagramTitle(),s=(l=s+l)*(u.length+1)-(n?0:s),c=c*h+2,d=Ept(e);d.attr("viewbox",`0 0 ${c} `+s),Vl(d,s,c,o.useMaxWidth);for([i,a]of u.entries())fNt(d,a,i,o);d.append("text").text(n).attr("x",c/2).attr("y",s-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),fNt=Ae((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){var d,p,g=c.start%s*o+1,f=(c.end-c.start+1)*o-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),mNt={draw:gNt}}),TNt=t(()=>{K8(),yNt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},vNt=Ae(({packet:t}={})=>`
|
|
|
.packetByte {
|
|
|
font-size: ${(t=b8(yNt,t)).byteFontSize};
|
|
|
}
|
|
|
.packetByte.start {
|
|
|
fill: ${t.startByteColor};
|
|
|
}
|
|
|
.packetByte.end {
|
|
|
fill: ${t.endByteColor};
|
|
|
}
|
|
|
.packetLabel {
|
|
|
fill: ${t.labelColor};
|
|
|
font-size: ${t.labelFontSize};
|
|
|
}
|
|
|
.packetTitle {
|
|
|
fill: ${t.titleColor};
|
|
|
font-size: ${t.titleFontSize};
|
|
|
}
|
|
|
.packetBlock {
|
|
|
stroke: ${t.blockStrokeColor};
|
|
|
stroke-width: ${t.blockStrokeWidth};
|
|
|
fill: ${t.blockFillColor};
|
|
|
}
|
|
|
`,"styles")}),ENt={};J(ENt,{diagram:()=>_Nt});var _Nt,CNt,SNt,ANt=t(()=>{bNt(),wNt(),kNt(),TNt(),_Nt={parser:pNt,db:hNt,renderer:mNt,styles:vNt}}),LNt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,7],n=[1,13],i=[1,14],a=[1,15],o=[1,19],s=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],h={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[s-1]),n.setHierarchy(a[s-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[s]),"number"==typeof a[s].length?this.$=a[s]:this.$=[a[s]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:n.getLogger().debug("Rule: link: ",a[s],t),this.$={edgeTypeStr:a[s],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:var l=parseInt(a[s]),c=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[s-2],a[s-1],a[s]," typestr: ",a[s-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[s-1].edgeTypeStr),this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+"-"+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:"edge",directions:a[s].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[s].id,label:a[s].label,type:n.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:n.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[s]),this.$={id:a[s].id,label:a[s].label,type:n.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[s]),this.$={type:"column-setting",columns:"auto"===a[s]?-1:parseInt(a[s])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[s-2],a[s-1]),n.generateId(),this.$={...a[s-2],type:"composite",children:a[s-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[s-2],a[s-1],a[s]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[s-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[s]),this.$={id:a[s]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[s]),this.$=[a[s]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[s-3],a[s-2]," #3:",a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:"classDef",id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:"applyClass",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:"applyStyles",id:a[s-1].trim(),stylesStr:a[s].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:n,29:i,31:a,32:o,40:s,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:n,29:i,31:a,32:o,40:s,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:o},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:o,40:s,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:o},{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:n,29:i,31:a,32:o,40:s,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:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
|
|
|
`+g.showPosition()+`
|
|
|
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},d={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
|
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:case 42:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.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,Ae(t,"Parser"),(CNt=new((t.prototype=h).Parser=t)).parser=CNt,SNt=CNt});function NNt(t){switch(R.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return R.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 INt(t){return"=="!==(R.debug("typeStr2Type",t),t)?"normal":"thick"}function MNt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var RNt,DNt,ONt,PNt,BNt,FNt,$Nt,zNt,GNt,UNt,qNt,YNt,jNt,HNt,WNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt,rIt,nIt,iIt,aIt,oIt,sIt=t(()=>{kO(),Mn(),i(),e(),tc(),fh(),RNt=new Map,DNt=[],ONt=new Map,PNt=D(),BNt=new Map,FNt=Ae(t=>L.sanitizeText(t,PNt),"sanitizeText"),$Nt=Ae(function(t,e=""){let r=BNt.get(t);r||(r={id:t,styles:[],textStyles:[]},BNt.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"),zNt=Ae(function(t,e=""){t=RNt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),GNt=Ae(function(t,r){t.split(",").forEach(function(t){let e=RNt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},RNt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),UNt=Ae((t,e)=>{var r,n=[];for(r of t.flat())if(r.label&&(r.label=FNt(r.label)),"classDef"===r.type)$Nt(r.id,r.css);else if("applyClass"===r.type)GNt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&zNt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var i=(ONt.get(r.id)??0)+1;ONt.set(r.id,i),r.id=i+"-"+r.id,DNt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=RNt.get(r.id))?RNt.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&UNt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t<a;t++){var o=wO(r);o.id=o.id+"-"+t,RNt.set(o.id,o),n.push(o)}}else void 0===i&&n.push(r);e.children=n},"populateBlockDatabase"),qNt=[],YNt={id:"root",type:"composite",children:[],columns:-1},jNt=Ae(()=>{R.debug("Clear called"),lc(),YNt={id:"root",type:"composite",children:[],columns:-1},RNt=new Map([["root",YNt]]),qNt=[],BNt=new Map,DNt=[],ONt=new Map},"clear"),Ae(NNt,"typeStr2Type"),Ae(INt,"edgeTypeStr2Type"),Ae(MNt,"edgeStrToEdgeData"),HNt=0,WNt=Ae(()=>(HNt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+HNt),"generateId"),VNt=Ae(t=>{YNt.children=t,UNt(t,YNt),qNt=YNt.children},"setHierarchy"),XNt=Ae(t=>(t=RNt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),KNt=Ae(()=>[...RNt.values()],"getBlocksFlat"),ZNt=Ae(()=>qNt||[],"getBlocks"),QNt=Ae(()=>DNt,"getEdges"),JNt=Ae(t=>RNt.get(t),"getBlock"),tIt=Ae(t=>{RNt.set(t.id,t)},"setBlock"),rIt=Ae(()=>console,"getLogger"),eIt=Ae(function(){return BNt},"getClasses"),rIt={getConfig:Ae(()=>Rr().block,"getConfig"),typeStr2Type:NNt,edgeTypeStr2Type:INt,edgeStrToEdgeData:MNt,getLogger:rIt,getBlocksFlat:KNt,getBlocks:ZNt,getEdges:QNt,setHierarchy:VNt,getBlock:JNt,setBlock:tIt,getColumns:XNt,getClasses:eIt,clear:jNt,generateId:WNt},nIt=rIt}),lIt=t(()=>{bn(),iIt=Ae((t,e)=>{var r=(i=Fe)(t,"r"),n=i(t,"g"),i=i(t,"b");return Pe(r,n,i,e)},"fade"),aIt=Ae(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: ${iIt(t.edgeLabelBackground,.5)};
|
|
|
// background-color:
|
|
|
}
|
|
|
|
|
|
.node .cluster {
|
|
|
// fill: ${iIt(t.mainBkg,.5)};
|
|
|
fill: ${iIt(t.clusterBkg,.5)};
|
|
|
stroke: ${iIt(t.clusterBorder,.2)};
|
|
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
|
stroke-width: 1px;
|
|
|
}
|
|
|
|
|
|
.cluster text {
|
|
|
fill: ${t.titleColor};
|
|
|
}
|
|
|
|
|
|
.cluster span,p {
|
|
|
color: ${t.titleColor};
|
|
|
}
|
|
|
/* .cluster div {
|
|
|
color: ${t.titleColor};
|
|
|
} */
|
|
|
|
|
|
div.mermaidTooltip {
|
|
|
position: absolute;
|
|
|
text-align: center;
|
|
|
max-width: 200px;
|
|
|
padding: 2px;
|
|
|
font-family: ${t.fontFamily};
|
|
|
font-size: 12px;
|
|
|
background: ${t.tertiaryColor};
|
|
|
border: 1px solid ${t.border2};
|
|
|
border-radius: 2px;
|
|
|
pointer-events: none;
|
|
|
z-index: 100;
|
|
|
}
|
|
|
|
|
|
.flowchartTitleText {
|
|
|
text-anchor: middle;
|
|
|
font-size: 18px;
|
|
|
fill: ${t.textColor};
|
|
|
}
|
|
|
`,"getStyles"),oIt=aIt});function cIt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function hIt(o,s,l=0,c=0){if(R.debug("setBlockSizes abc95 (start)",o.id,o?.size?.x,"block width =",o?.size,"sieblingWidth",l),o?.size?.width||(o.size={width:l,height:c,x:0,y:0}),0<o.children?.length){for(var h of o.children)hIt(h,s);var u,d,p,g=fIt(o),f=g.width,m=g.height;R.debug("setBlockSizes abc95 maxWidth of",o.id,":s children is ",f,m);for(u of o.children)u.size&&(R.debug(`abc95 Setting size of children of ${o.id} id=${u.id} ${f} ${m} `+JSON.stringify(u.size)),u.size.width=f*(u.widthInColumns??1)+gIt*((u.widthInColumns??1)-1),u.size.height=m,u.size.x=0,u.size.y=0,R.debug(`abc95 updating size of ${o.id} children child:${u.id} maxWidth:${f} maxHeight:`+m));for(d of o.children)hIt(d,s,f,m);let t=o.columns??-1,e=0;for(p of o.children)e+=p.widthInColumns??1;let r=o.children.length,n=(0<t&&t<e&&(r=t),Math.ceil(e/r)),i=r*(f+gIt)+gIt,a=n*(m+gIt)+gIt;if(i<l){R.debug(`Detected to small siebling: abc95 ${o.id} sieblingWidth ${l} sieblingHeight ${c} width `+i),i=l,a=c;var y,v=(l-r*gIt-gIt)/r,x=(c-n*gIt-gIt)/n;R.debug("Size indata abc88",o.id,"childWidth",v,"maxWidth",f),R.debug("Size indata abc88",o.id,"childHeight",x,"maxHeight",m),R.debug("Size indata abc88 xSize",r,"padding",gIt);for(y of o.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(R.debug(`abc95 (finale calc) ${o.id} xSize ${r} ySize ${n} columns ${t}${o.children.length} width=`+Math.max(i,o.size?.width||0)),i<(o?.size?.width||0)&&(i=o?.size?.width||0,0<(g=0<t?Math.min(o.children.length,t):o.children.length))){var b,w=(i-g*gIt-gIt)/g;R.debug("abc95 (growing to fit) width",o.id,i,o.size?.width,w);for(b of o.children)b.size&&(b.size.width=w)}o.size={width:i,height:a,x:0,y:0}}R.debug("setBlockSizes abc94 (done)",o.id,o?.size?.x,o?.size?.width,o?.size?.y,o?.size?.height)}function uIt(n,i){R.debug(`abc85 layout blocks (=>layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var a=n.columns??-1;if(R.debug("layoutBlocks columns abc95",n.id,"=>",a,n),n.children&&0<n.children.length){var o,s=n?.children[0]?.size?.width??0,s=n.children.length*s+(n.children.length-1)*gIt;R.debug("widthOfChildren 88",s,"posX");let t=0,e=(R.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-gIt),r=0;for(o of n.children){var l,c,h,u,d=n;o.size&&({width:l,height:c}=o.size,{px:u,py:h}=cIt(a,t),h!=r&&(r=h,e=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-gIt,R.debug("New row in layout for block",n.id," and child ",o.id,r)),R.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${t} (px, py) ${u},${h} (${d?.size?.x},${d?.size?.y}) parent: ${d.id} width: `+l+gIt),d.size&&(u=l/2,o.size.x=e+gIt+u,R.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${e} new startingPosX${o.size.x} ${u} padding=${gIt} width=${l} halfWidth=${u} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(o?.widthInColumns??1)/2),e=o.size.x+u,o.size.y=d.size.y-d.size.height/2+h*(c+gIt)+c/2+gIt,R.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${e}${gIt}${u}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2`+l*(o?.widthInColumns??1)/2)),o.children&&uIt(o,i),t+=o?.widthInColumns??1,R.debug("abc88 columnsPos",o,t))}}R.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function dIt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,o,s,l;if(t.size&&"root"!==t.id&&({x:a,y:o,width:s,height:l}=t.size,a-s/2<e&&(e=a-s/2),o-l/2<r&&(r=o-l/2),n<a+s/2&&(n=a+s/2),i<o+l/2)&&(i=o+l/2),t.children)for(var c of t.children)({minX:e,minY:r,maxX:n,maxY:i}=dIt(c,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function pIt(t){var e,r,n=t.getBlock("root");if(n)return hIt(n,t,0,0),uIt(n,t),R.debug("getBlocks",JSON.stringify(n,null,2)),{minX:t,minY:n,maxX:e,maxY:r}=dIt(n),{x:t,y:n,width:e-t,height:r-n}}var gIt,fIt,mIt=t(()=>{e(),i(),gIt=D()?.block?.padding??8,Ae(cIt,"calculateBlockPosition"),fIt=Ae(t=>{let e=0,r=0;for(var n of t.children){var{width:i,height:a,x:o,y:s}=n.size??{width:0,height:0,x:0,y:0};R.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",o,"y:",s,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),Ae(hIt,"setBlockSizes"),Ae(uIt,"layoutBlocks"),Ae(dIt,"findBounds"),Ae(pIt,"layout")});function yIt(t,e,r=!1){let n=t,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),o="",s;switch(n.type){case"round":a=5,o="rect";break;case"composite":a=0,o="composite",s=0;break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}var t=f8(n?.styles??[]),l=n.label,c=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:o,labelText:l,rx:a,ry:a,class:i,style:t.style,id:n.id,directions:n.directions,width:c.width,height:c.height,x:c.x,y:c.y,positioned:r,intersect:void 0,type:n.type,padding:s??Rr()?.block?.padding??0}}async function vIt(t,e,r){var n;"group"!==(e=yIt(e,0,!1)).type&&(n=(t=await iA(t,e)).node().getBBox(),(e=r.getBlock(e.id)).size={width:n.width,height:n.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function xIt(t,e,r){var n=yIt(e,0,!0);"space"!==r.getBlock(n.id).type&&(await iA(t,n),e.intersect=n?.intersect,sA(n))}async function bIt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await bIt(t,i.children,r,n)}async function wIt(t,e,r){await bIt(t,e,r,vIt)}async function kIt(t,e,r){await bIt(t,e,r,xIt)}async function TIt(t,e,r,n,i){var a,o,s,l,c=new rU({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(o of e)o.start&&o.end&&(l=n.getBlock(o.start),s=n.getBlock(o.end),l?.size)&&s?.size&&(l=l.size,s=s.size,l=[{x:l.x,y:l.y},{x:l.x+(s.x-l.x)/2,y:l.y+(s.y-l.y)/2},{x:s.x,y:s.y}],lxt(t,{v:o.start,w:o.end,name:o.id},{...o,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),o.label)&&(await nxt(t,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),ixt({...o,x:l[1].x,y:l[1].y},{originalPath:l}))}var EIt,_It,CIt,SIt=t(()=>{iU(),Mn(),uxt(),hA(),K8(),Ae(yIt,"getNodeFromBlock"),Ae(vIt,"calculateBlockSize"),Ae(xIt,"insertBlockPositioned"),Ae(bIt,"performOperations"),Ae(wIt,"calculateBlockSizes"),Ae(kIt,"insertBlocks"),Ae(TIt,"insertEdges")}),AIt=t(()=>{Q3(),Mn(),Xvt(),e(),ec(),mIt(),SIt(),EIt=Ae(function(t,e){return e.db.getClasses()},"getClasses"),_It=Ae(async function(t,e,r,n){let{securityLevel:i,block:a}=Rr(),o=n.db,s;"sandbox"===i&&(s=O("#i"+e));var l=O("sandbox"===i?s.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${e}"]`):O(`[id="${e}"]`),n=(kvt(l,["point","circle","cross"],n.type,e),o.getBlocks()),c=o.getBlocksFlat(),h=o.getEdges(),u=l.insert("g").attr("class","block"),d=(await wIt(u,n,o),pIt(o));await kIt(u,n,o),await TIt(u,h,c,o,e),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,e=a.useMaxWidth,Vl(l,h,c,!!e),R.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),CIt={draw:_It,getClasses:EIt}}),LIt={};J(LIt,{diagram:()=>NIt});var NIt,IIt,MIt,RIt,DIt,OIt,PIt,BIt,FIt,$It,zIt,GIt,UIt,qIt,YIt,jIt,HIt,WIt,VIt=t(()=>{LNt(),sIt(),lIt(),AIt(),NIt={parser:SNt,db:nIt,renderer:CIt,styles:oIt}}),XIt=t(()=>{IIt={L:"left",R:"right",T:"top",B:"bottom"},MIt={L:Ae(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:Ae(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:Ae(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:Ae(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},RIt={L:Ae((t,e)=>t-e+2,"L"),R:Ae((t,e)=>t-2,"R"),T:Ae((t,e)=>t-e+2,"T"),B:Ae((t,e)=>t-2,"B")},DIt=Ae(function(t){return PIt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),OIt=Ae(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),PIt=Ae(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),BIt=Ae(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),FIt=Ae(function(t,e){var r=PIt(t)&&BIt(e),t=BIt(t)&&PIt(e);return r||t},"isArchitectureDirectionXY"),$It=Ae(function(t){var e=t[0],t=t[1],r=PIt(e)&&BIt(t),e=BIt(e)&&PIt(t);return r||e},"isArchitecturePairXY"),zIt=Ae(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),GIt=Ae(function(t,e){return zIt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),UIt=Ae(function([t,e],r){var n=r[0],r=r[1];return PIt(n)?BIt(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:PIt(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),qIt=Ae(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),YIt=Ae(function(t){return"service"===t.type},"isArchitectureService"),jIt=Ae(function(t){return"junction"===t.type},"isArchitectureJunction"),HIt=Ae(t=>t.data(),"edgeData"),WIt=Ae(t=>t.data(),"nodeData")});function KIt(t){var e=D().architecture;return(e?.[t]?e:ZIt)[t]}var ZIt,QIt,JIt,tMt,eMt,rMt,nMt,iMt,aMt,oMt,sMt,lMt,cMt,hMt,uMt,dMt,pMt,gMt,fMt,mMt,yMt,vMt,xMt,bMt,wMt,kMt,TMt,EMt=t(()=>{Nn(),i(),fut(),fh(),XIt(),ZIt=xr.architecture,QIt=new dut(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:ZIt,dataStructures:void 0,elements:{}})),JIt=Ae(()=>{QIt.reset(),lc()},"clear"),tMt=Ae(function({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==QIt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+QIt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===QIt.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"===QIt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}QIt.records.registeredIds[t]="node",QIt.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),eMt=Ae(()=>Object.values(QIt.records.nodes).filter(YIt),"getServices"),rMt=Ae(function({id:t,in:e}){QIt.records.registeredIds[t]="node",QIt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),nMt=Ae(()=>Object.values(QIt.records.nodes).filter(jIt),"getJunctions"),iMt=Ae(()=>Object.values(QIt.records.nodes),"getNodes"),aMt=Ae(t=>QIt.records.nodes[t],"getNode"),oMt=Ae(function({id:t,icon:e,in:r,title:n}){if(void 0!==QIt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+QIt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===QIt.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"===QIt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}QIt.records.registeredIds[t]="group",QIt.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),sMt=Ae(()=>Object.values(QIt.records.groups),"getGroups"),lMt=Ae(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:l}){if(!OIt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!OIt(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+n);if(void 0===QIt.records.nodes[t]&&void 0===QIt.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===QIt.records.nodes[e]&&void 0===QIt.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=QIt.records.nodes[t].in,h=QIt.records.nodes[e].in;if(o&&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(s&&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.`);QIt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:o,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:s,title:l}),QIt.records.nodes[t]&&QIt.records.nodes[e]&&(QIt.records.nodes[t].edges.push(QIt.records.edges[QIt.records.edges.length-1]),QIt.records.nodes[e].edges.push(QIt.records.edges[QIt.records.edges.length-1]))},"addEdge"),cMt=Ae(()=>QIt.records.edges,"getEdges"),hMt=Ae(()=>{if(void 0===QIt.records.dataStructures){let o=Object.entries(QIt.records.nodes).reduce((t,[n,e])=>(t[n]=e.edges.reduce((t,e)=>{var r;return e.lhsId===n?(r=GIt(e.lhsDir,e.rhsDir))&&(t[r]=e.rhsId):(r=GIt(e.rhsDir,e.lhsDir))&&(t[r]=e.lhsId),t},{}),t),{}),r=Object.keys(o)[0],s={[r]:1},l=Object.keys(o).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=Ae(t=>{let i={[t]:[0,0]},a=[t];for(;0<a.length;){var e=a.shift();if(e){s[e]=1,delete l[e];let t=o[e],[r,n]=i[e];Object.entries(t).forEach(([t,e])=>{s[e]||(i[e]=UIt([r,n],t),a.push(e))})}}return i},"BFS"),e=[t(r)];for(;0<Object.keys(l).length;)e.push(t(Object.keys(l)[0]));QIt.records.dataStructures={adjList:o,spatialMaps:e}}return QIt.records.dataStructures},"getDataStructures"),uMt=Ae((t,e)=>{QIt.records.elements[t]=e},"setElementForId"),dMt=Ae(t=>QIt.records.elements[t],"getElementById"),pMt={clear:JIt,setDiagramTitle:pc,getDiagramTitle:gc,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addService:tMt,getServices:eMt,addJunction:rMt,getJunctions:nMt,getNodes:iMt,getNode:aMt,addGroup:oMt,getGroups:sMt,addEdge:lMt,getEdges:cMt,setElementForId:uMt,getElementById:dMt,getDataStructures:hMt},Ae(KIt,"getConfigField")}),_Mt=t(()=>{cut(),e(),put(),EMt(),gMt=Ae((t,e)=>{hut(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"),fMt={parse:Ae(async t=>{t=await aut("architecture",t),R.debug(t),gMt(t,pMt)},"parse")}}),CMt=t(()=>{mMt=Ae(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"),yMt=mMt}),SMt=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}Ae(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),o=r(9);function s(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in Ae(s,"LEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),o=r(13),s=r(0),l=r(16),c=r(5);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new o(e.x,e.y,r.width,r.height):new o}for(n in Ae(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(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=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)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=-s.INITIAL_WORLD_BOUNDARY,e=s.INITIAL_WORLD_BOUNDARY,e=s.WORLD_CENTER_X+l.nextDouble()*(e-t)+t,t=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY,r=s.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()),s.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)>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY),(r=this.rect.y)>s.WORLD_BOUNDARY?r=s.WORLD_BOUNDARY:r<-s.WORLD_BOUNDARY&&(r=-s.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 n,i=r(0);function a(){}for(n in Ae(a,"FDLayoutConstants"),i)a[n]=i[n];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 n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}Ae(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=r(2),d=r(10),a=r(0),o=r(7),s=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){i.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 o?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in Ae(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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 n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=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:(n.source=e,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),r!=e&&r.edges.push(n),n)},u.prototype.remove=function(t){var e=t;if(t instanceof s){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,n=e.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(o=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(o,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 o,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==(o=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(o,1)}},u.prototype.updateLeftTop=function(){for(var t,e=d.MAX_VALUE,r=d.MAX_VALUE,n=this.getNodes(),i=n.length,a=0;a<i;a++){var o,s=n[a];(o=s.getTop())<e&&(e=o),(o=s.getLeft())<r&&(r=o)}return e==d.MAX_VALUE?null:(t=null!=n[0].getParent().paddingLeft?n[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,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=d.MAX_VALUE,o=-d.MAX_VALUE,s=this.nodes,l=s.length,c=0;c<l;c++){var h=s[c];t&&null!=h.child&&h.updateBounds(),(e=h.getLeft())<n&&(n=e),i<(e=h.getRight())&&(i=e),(e=h.getTop())<a&&(a=e),o<(e=h.getBottom())&&(o=e)}var u=new p(n,a,i-n,o-a);n==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!=s[0].getParent().paddingLeft?s[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,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=t.length,o=0;o<a;o++){var s,l=t[o];(s=l.getLeft())<e&&(e=s),r<(s=l.getRight())&&(r=s),(s=l.getTop())<n&&(n=s),i<(s=l.getBottom())&&(i=s)}return new p(e,n,r-e,i-n)},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,n=0;n<r;n++)t+=e[n].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,n=new h,i=new Set,t=this.nodes[0];for(t.withChildren().forEach(function(t){n.push(t),i.add(t)});0!==n.length;)for(var a,o,s=(a=(t=n.shift()).getEdges()).length,l=0;l<s;l++)null==(o=a[l].getOtherEndInGraph(t,this))||i.has(o)||o.withChildren().forEach(function(t){n.push(t),i.add(t)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.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 n(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}Ae(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){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(i=r,r=t,t=(n=e).getOwner(),e=i.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,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-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},n.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,n=[],i=(n=n.concat(e.getEdges())).length,a=0;a<i;a++)r=n[a],e.remove(r);for(var o,s=[],i=(s=s.concat(e.getNodes())).length,a=0;a<i;a++)o=s[a],e.remove(o);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)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),r=e.length,n=0;n<r;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.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},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},n.prototype.getRoot=function(){return this.rootGraph},n.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"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}for(n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,n,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++)if(e=(t=a[s]).source,r=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=r))t.lca=e.getOwner();else{for(n=e.getOwner();null==t.lca;){for(i=(t.targetInLca=r).getOwner();null==t.lca;){if(i==n){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var n=e.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var r,n=t.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},n.prototype.includesInvalidEdge=function(){for(var t,e=[],r=this.edges.length,n=0;n<r;n++)t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(n=0;n<e.length;n++)this.remove(e[n]);return!1},t.exports=n},function(t,e,r){var h=r(12);function n(){}Ae(n,"IGeometry"),n.calcSeparationAmount=function(t,e,r,n){if(!t.intersects(e))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(t,e,i),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*i[0]*(t/2+n),r[1]=-1*i[1]*(e/2+n)},n.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},n.getIntersection2=function(t,e,r){var n=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),o=e.getCenterY();if(t.intersects(e))return r[0]=n,r[1]=i,r[2]=a,r[3]=o,!0;var s=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(n===a){if(o<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<o&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===o){if(a<n)return r[0]=s,r[1]=i,r[2]=y,r[3]=o,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=o)}else{var t=t.height/t.width,e=e.height/e.width,_=(o-i)/(a-n),C=void 0,S=void 0,A=void 0;if(-t==_?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):t==_&&(a<n?(r[0]=s,r[1]=l):(r[0]=d,r[1]=u),T=!0),-e==_?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):e==_&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?o<i?(C=this.getCardinalDirection(t,_,4),this.getCardinalDirection(e,_,2)):(C=this.getCardinalDirection(-t,_,3),this.getCardinalDirection(-e,_,1)):o<i?(C=this.getCardinalDirection(-t,_,1),this.getCardinalDirection(-e,_,3)):(C=this.getCardinalDirection(t,_,2),this.getCardinalDirection(e,_,4)),!T)switch(C){case 1:S=l,r[0]=n+-g/_,r[1]=S;break;case 2:S=i+p*_,r[0]=d,r[1]=S;break;case 3:S=u,r[0]=n+g/_,r[1]=S;break;case 4:S=i+-p*_,r[0]=h,r[1]=S}if(!E)switch(c){case 1:A=m,r[2]=a+-k/_,r[3]=A;break;case 2:A=o+w*_,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/_,r[3]=A;break;case 4:A=o+-w*_,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(t,e,r){return e<t?r:1+r%4},n.getIntersection=function(t,e,r,n){var i,a,o,s,l,c;return null==n?this.getIntersection2(t,e,r):(i=t.x,t=t.y,a=e.x,e=e.y,l=r.x,r=r.y,s=a*t-i*e,c=(o=n.x)*r-l*(n=n.y),0==(n=(e-=t)*(t=l-o)-(l=n-r)*(o=i-a))?null:new h((o*c-t*s)/n,(l*s-e*c)/n))},n.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r<t?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(t,e,r,n){var i=t.x,t=t.y,a=e.x,e=e.y,o=r.x,r=r.y,s=n.x,l=(a-i)*((n=n.y)-r)-(s-o)*(e-t);return 0!=l&&(e=((t-e)*(s-i)+(a-i)*(n-t))/l,0<(a=((n-r)*(s-i)+(o-s)*(n-t))/l))&&a<1&&0<e&&e<1},n.findCircleLineIntersections=function(t,e,r,n,i,a,o){var s=(r-t)*(r-t)+(n-e)*(n-e);return 0<=(r=2*((t-i)*(r-t)+(e-a)*(n-e)))*r-4*s*(n=(t-i)*(t-i)+(e-a)*(e-a)-o*o)?(t=(-r+Math.sqrt(r*r-4*s*n))/(2*s),i=(-r-Math.sqrt(r*r-4*s*n))/(2*s),0<=t&&t<=1?[t]:0<=i&&i<=1?[i]:null):null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,r){function n(){}Ae(n,"IMath"),n.sign=function(t){return 0<t?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){function n(){}Ae(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Ae(n,"defineProperties"),Ae(i,"_classCallCheck");var a,o,s=Ae(function(t){return{value:t,next:null,prev:null}},"nodeFrom"),l=Ae(function(t,e,r,n){return null!==t?t.next=e:n.head=e,null!==r?r.prev=e:n.tail=e,e.prev=t,e.next=r,n.length++,e},"add"),c=Ae(function(t,e){var r=t.prev,n=t.next;return null!==r?r.next=n:e.head=n,null!==n?n.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},"_remove");function h(t){var e=this;i(this,h),this.length=0,this.head=null,this.tail=null,t?.forEach(function(t){return e.push(t)})}Ae(h,"LinkedList"),a=h,o=[{key:"size",value:Ae(function(){return this.length},"size")},{key:"insertBefore",value:Ae(function(t,e){return l(e.prev,s(t),e,this)},"insertBefore")},{key:"insertAfter",value:Ae(function(t,e){return l(e,s(t),e.next,this)},"insertAfter")},{key:"insertNodeBefore",value:Ae(function(t,e){return l(e.prev,t,e,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:Ae(function(t,e){return l(e,t,e.next,this)},"insertNodeAfter")},{key:"push",value:Ae(function(t){return l(this.tail,s(t),null,this)},"push")},{key:"unshift",value:Ae(function(t){return l(null,s(t),this.head,this)},"unshift")},{key:"remove",value:Ae(function(t){return c(t,this)},"remove")},{key:"pop",value:Ae(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:Ae(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:Ae(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:Ae(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:Ae(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:Ae(function(t,e){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;n.value=e}},"set_object_at")}],n(a.prototype,o),t.exports=h},function(t,e,r){function n(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)}Ae(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.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)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){function n(t,e,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=n&&(this.x=t,this.y=e,this.width=r,this.height=n)}Ae(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){var n="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 i(){}Ae(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return"Object#"+(null==t?i.lastID:t)},i.isPrimitive=function(t){var e="u"<typeof t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},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)}Ae(g,"_toConsumableArray");var n=r(0),i=r(7),a=r(3),o=r(1),s=r(6),l=r(5),c=r(17),h=r(29);function u(t){h.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}Ae(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 i(this);return this.graphManager=t},u.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},u.prototype.newNode=function(t){return new a(this.graphManager,t)},u.prototype.newEdge=function(t){return new o(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"!==n.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(),n=0;n<r.length;n++)update(r[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof o?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof s&&null!=t.vGraphObject&&t.vGraphObject.update(t)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.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 n=this.getAllNodes(),i=0;i<n.length;i++)n[i].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,n=t.getNodes(),i=0;i<n.length;i++)null==(r=(e=n[i]).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(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)for(var a=new Set,o=[],s=new Map,l=(l=[]).concat(r);0<l.length&&e;){for(o.push(l[0]);0<o.length&&e;){var c=o[0];o.splice(0,1),a.add(c);for(var h=c.getEdges(),i=0;i<h.length;i++){var u=h[i].getOtherEnd(c);if(s.get(c)!=u){if(a.has(u)){e=!1;break}o.push(u),s.set(u,c)}}}if(e){var d=[].concat(g(a));for(t.push(d),i=0;i<d.length;i++){var p=d[i];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,s=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null),o=(a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a),this.newEdge(null));this.graphManager.add(o,r,a),e.add(a),r=a}return o=this.newEdge(null),this.graphManager.add(o,r,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:n).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 n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],o=new l(a.getCenterX(),a.getCenterY()),s=r.bendpoints.get(i);s.x=o.x,s.y=o.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(t,e,r,n){var i,a;return null!=r&&null!=n?(i=e,t<=50?i-=(e-e/r)/50*(50-t):i+=(e*n-e)/50*(t-50),i):(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=[],n=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var o=0;o<e.length;o++){var s=(c=e[o]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==s&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].concat(l);for(var l=[],o=0;o<e.length;o++){var c=e[o],h=e.indexOf(c);0<=h&&e.splice(h,1),c.getNeighborsList().forEach(function(t){var e;r.indexOf(t)<0&&(1==(e=n.get(t)-1)&&l.push(t),n.set(t,e))})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,r){function n(){}Ae(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},t.exports=n},function(t,e,r){var n=r(5);function i(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}Ae(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=this.lworldExtX;return 0!=e?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/e:0},i.prototype.transformY=function(t){var e=this.lworldExtY;return 0!=e?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/e:0},i.prototype.inverseTransformX=function(t){var e=this.ldeviceExtX;return 0!=e?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/e:0},i.prototype.inverseTransformY=function(t){var e=this.ldeviceExtY;return 0!=e?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/e:0},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},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)}Ae(d,"_toConsumableArray");var n,i=r(15),p=r(4),l=r(0),c=r(8),h=r(9);function a(){i.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(n in Ae(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.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,n,i,a,o=this.getGraphManager().getAllEdges(),s=0;s<o.length;s++)e=(t=o[s]).idealLength,t.isInterGraph&&(r=t.getSource(),n=t.getTarget(),i=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=i+a-2*l.SIMPLE_NODE_SIZE),i=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.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.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,n,i,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],s=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,t=0;t<s.length;t++)r=s[t],this.calculateRepulsionForceOfANode(r,i,a,o),i.add(r);else for(t=0;t<s.length;t++)for(r=s[t],e=t+1;e<s.length;e++)n=s[e],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},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,n,i=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(n=(e=t.edgeElasticity*(r-e))*(t.lengthX/r),e*=t.lengthY/r,i.springForceX+=n,i.springForceY+=e,a.springForceX-=n,a.springForceY-=e)},a.prototype.calcRepulsionForce=function(t,e){var r,n,i,a=t.getRect(),o=e.getRect(),s=new Array(2),l=new Array(4);a.intersects(o)?(c.calcSeparationAmount(a,o,s,p.DEFAULT_EDGE_LENGTH/2),n=2*s[0],i=2*s[1],s=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=s*n,t.repulsionForceY-=s*i,e.repulsionForceX+=s*n,e.repulsionForceY+=s*i):(s=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(r=o.getCenterX()-a.getCenterX(),o.getCenterY()-a.getCenterY()):(c.getIntersection(a,o,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+(s=Math.abs(s)<p.MIN_REPULSION_DIST?h.sign(s)*p.MIN_REPULSION_DIST:s)*s,o=Math.sqrt(a),i=(l=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/a)*s/o,t.repulsionForceX-=n=l*r/o,t.repulsionForceY-=i,e.repulsionForceX+=n,e.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(t){var e,r=t.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=t.getCenterX()-n,i=t.getCenterY()-i,a=Math.abs(n)+t.getWidth()/2,o=Math.abs(i)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=r.getEstimatedSize()*this.gravityRangeFactor)<a||e<o)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*i):((e=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||e<o)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*i*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)),n=new Array(e),i=0;i<e;i++)n[i]=new Array(r);for(i=0;i<e;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(t,e,r){for(var n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange)),s=n;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(t),t.setGridCoordinates(n,i,a,o)},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,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=new Set;t.surrounding=new Array;for(var a=this.grid,o=t.startX-1;o<t.finishX+2;o++)for(var s=t.startY-1;s<t.finishY+2;s++)if(!(o<0||s<0||o>=a.length||s>=a[0].length))for(var l=0;l<a[o][s].length;l++){var c,h,u=a[o][s][l];t.getOwner()!=u.getOwner()||t==u||e.has(u)||i.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&&i.add(u))}t.surrounding=[].concat(d(i))}for(o=0;o<t.surrounding.length;o++)this.calcRepulsionForce(t,t.surrounding[o])},a.prototype.calcRepulsionRange=function(){return 0},t.exports=a},function(t,e,r){var n,i=r(1),a=r(4);function o(t,e,r){i.call(this,t,e,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(n in Ae(o,"FDLayoutEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];t.exports=o},function(t,e,r){var n,i=r(3),a=r(4);function o(t,e,r,n){i.call(this,t,e,r,n),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(n in Ae(o,"FDLayoutNode"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.setGridCoordinates=function(t,e,r,n){this.startX=t,this.finishX=e,this.startY=r,this.finishY=n},t.exports=o},function(t,e,r){function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}Ae(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,r){var n=r(14);function i(){this.map={},this.keys=[]}Ae(i,"HashMap"),i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},i.prototype.get=function(t){return t=n.createID(t),this.map[t]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){var n=r(14);function i(){this.set={}}Ae(i,"HashSet"),i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)t.push(this.set[e[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var n=t[r];this.add(n)}},t.exports=i},function(t,e,r){function n(){}Ae(n,"Matrix"),n.multMat=function(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<e[0].length;i++)for(var a=r[n][i]=0;a<t[0].length;a++)r[n][i]+=t[n][a]*e[a][i]}return r},n.transpose=function(t){for(var e=[],r=0;r<t[0].length;r++){e[r]=[];for(var n=0;n<t.length;n++)e[r][n]=t[n][r]}return e},n.multCons=function(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=t[n]*e;return r},n.minusOp=function(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=t[n]-e[n];return r},n.dotProduct=function(t,e){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[n];return r},n.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},n.normalize=function(t){for(var e=[],r=this.mag(t),n=0;n<t.length;n++)e[n]=t[n]/r;return e},n.multGamma=function(t){for(var e=[],r=0,n=0;n<t.length;n++)r+=t[n];r*=-1/t.length;for(var i=0;i<t.length;i++)e[i]=r+t[i];return e},n.multL=function(t,e,r){for(var n=[],i=[],a=[],o=0;o<e[0].length;o++){for(var s=0,l=0;l<e.length;l++)s+=-.5*e[l][o]*t[l];i[o]=s}for(var c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*i[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];n[d]=p}return n},t.exports=n},function(t,e,r){function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Ae(n,"defineProperties"),Ae(i,"_classCallCheck");var a,o,s=r(11),r=(Ae(l,"Quicksort"),a=l,o=[{key:"_quicksort",value:Ae(function(t,e,r){var n;e<r&&(n=this._partition(t,e,r),this._quicksort(t,e,n),this._quicksort(t,n+1,r))},"_quicksort")},{key:"_partition",value:Ae(function(t,e,r){for(var n=this._get(t,e),i=e,a=r;;){for(;this.compareFunction(n,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),n);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}},"_partition")},{key:"_get",value:Ae(function(t,e){return t instanceof s?t.get_object_at(e):t[e]},"_get")},{key:"_set",value:Ae(function(t,e,r){t instanceof s?t.set_object_at(e,r):t[e]=r},"_set")},{key:"_swap",value:Ae(function(t,e,r){var n=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,n)},"_swap")},{key:"_defaultCompareFunction",value:Ae(function(t,e){return t<e},"_defaultCompareFunction")}],n(a.prototype,o),l);function l(t,e){i(this,l),null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof s?t.size():t.length,this._quicksort(t,0,e-1)}t.exports=r},function(t,e,r){function At(){}Ae(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=function(t){for(var e=[];0<t--;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=(e=[this.m,P],Ae(function t(e){if(0==e.length)return 0;for(var r=[],n=0;n<e[0];n++)r.push(t(e.slice(1)));return r},"allocate")(e)),this.V=(e=[this.n,this.n],Ae(function t(e){if(0==e.length)return 0;for(var r=[],n=0;n<e[0];n++)r.push(t(e.slice(1)));return r},"allocate")(e));for(var B,F,$,r=function(t){for(var e=[];0<t--;)e.push(0);return e}(this.n),z=function(t){for(var e=[];0<t--;)e.push(0);return e}(this.m),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(n,i);a++){if(a<n){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 o=a+1;o<this.n;o++){if($=0!==this.s[a],a<n&&$){for(var q=0,Y=a;Y<this.m;Y++)q+=t[Y][a]*t[Y][o];for(var q=-q/t[a][a],j=a;j<this.m;j++)t[j][o]+=q*t[j][a]}r[o]=t[a][o]}if(a<n)for(var H=a;H<this.m;H++)this.U[H][a]=t[H][a];if(a<i){r[a]=0;for(var W=a+1;W<this.n;W++)r[a]=At.hypot(r[a],r[W]);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 s=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=t[n][n]),this.m<s&&(this.s[s-1]=0),i+1<s&&(r[i]=t[i][s-1]),r[s-1]=0;for(var l=n;l<P;l++){for(var rt=0;rt<this.m;rt++)this.U[rt][l]=0;this.U[l][l]=1}for(var c=n-1;0<=c;c--)if(0!==this.s[c]){for(var nt=c+1;nt<P;nt++){for(var it=0,at=c;at<this.m;at++)it+=this.U[at][c]*this.U[at][nt];for(var it=-it/this.U[c][c],ot=c;ot<this.m;ot++)this.U[ot][nt]+=it*this.U[ot][c]}for(var st=c;st<this.m;st++)this.U[st][c]=-this.U[st][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<i&&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=s-1,yt=Math.pow(2,-52),vt=Math.pow(2,-966);0<s;){for(var u=void 0,d=void 0,u=s-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===s-2)d=4;else{for(var p=void 0,p=s-1;u<=p&&p!==u;p--){var xt=(p!==s?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===s-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var bt=r[s-2];r[s-2]=0;for(var g=s-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][s-1],this.V[m][s-1]=-kt*this.V[m][g]+wt*this.V[m][s-1],this.V[m][g]=f}break;case 2:var Tt=r[u-1];r[u-1]=0;for(var y=u;y<s;y++){var v=At.hypot(this.s[y],Tt),Et=this.s[y]/v,_t=Tt/v;this.s[y]=v,Tt=-_t*r[y],r[y]=Et*r[y];for(var x=0;x<this.m;x++)v=Et*this.U[x][y]+_t*this.U[x][u-1],this.U[x][u-1]=-_t*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[s-1]),Math.abs(this.s[s-2])),Math.abs(r[s-2])),Math.abs(this.s[u])),Math.abs(r[u])),w=this.s[s-1]/b,k=this.s[s-2]/b,T=r[s-2]/b,Ct=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 _=(Ct+w)*(Ct-w)+E,C=Ct*b,S=u;S<s-1;S++){var A=At.hypot(_,C),L=_/A,N=C/A;S!==u&&(r[S-1]=A),_=L*this.s[S]+N*r[S],r[S]=L*r[S]-N*this.s[S],C=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=_/(A=At.hypot(_,C)),N=C/A,this.s[S]=A,_=L*r[S]+N*this.s[S+1],this.s[S+1]=-N*r[S]+L*this.s[S+1],C=N*r[S+1],r[S+1]=L*r[S+1],S<this.m-1)for(var M=0;M<this.m;M++)A=L*this.U[M][S]+N*this.U[M][S+1],this.U[M][S+1]=-N*this.U[M][S]+L*this.U[M][S+1],this.U[M][S]=A}r[s-2]=_;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 R=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=R,u<this.n-1)for(var D=0;D<this.n;D++)R=this.V[D][u+1],this.V[D][u+1]=this.V[D][u],this.V[D][u]=R;if(u<this.m-1)for(var O=0;O<this.m;O++)R=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=R;u++}s--}}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 n,i;function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}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,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=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=n,this.gap_penalty=i,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 o=0;o<this.jMax;o++)this.grid[a][o]=0}this.tracebackGrid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.tracebackGrid[s]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[s][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}Ae(a,"defineProperties"),Ae(c,"_classCallCheck"),Ae(h,"NeedlemanWunsch"),n=h,i=[{key:"getScore",value:Ae(function(){return this.score},"getScore")},{key:"getAlignments",value:Ae(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:Ae(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 n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:Ae(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:Ae(function(t,e){for(var r=[],n=-1;-1!==(n=t.indexOf(e,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:Ae(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}],a(n.prototype,i),t.exports=h},function(t,e,r){var n=Ae(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),t.exports=n},function(t,e,r){function n(){this.listeners=[]}Ae(n,"Emitter");var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];t===n.event&&n.callback(e)}},t.exports=n}],i={},Ae(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?Ae(function(){return t.default},"getDefault"):Ae(function(){return t},"getModuleExports");return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=28);function n(t){var e;return(i[t]||(e=i[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var r,i})}),AMt=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(SMt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(SMt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={45:(t,e,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),t.exports=n},806:(t,e,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in Ae(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.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 n,i=r(551).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},880:(t,e,r)=>{var n,i=r(551).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},578:(t,e,r)=>{var n,i=r(551).LGraphManager;function a(t){i.call(this,t)}for(n in Ae(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},765:(t,e,r)=>{var n,i=r(551).FDLayout,a=r(578),o=r(880),h=r(991),s=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(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in Ae(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new s(null,null,t)},k.prototype.initParameters=function(){i.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(){i.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 n=t[r].rect,i=t[r].id;e[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.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 o=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 n=Ae(function t(e){for(var r,n=e.getChild().getNodes(),i=0,a=0;a<n.length;a++)null==(r=n[a]).getChild()?o.fixedNodeSet.has(r.id)&&(i+=100):i+=t(r);return i},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(t){o.fixedNodeSet.add(t.nodeId)});for(var i,t=this.graphManager.getAllNodes(),e=0;e<t.length;e++)null!=(r=t[e]).getChild()&&0<(i=n(r))&&(r.fixedNodeWeight=i)}if(this.constraints.relativePlacementConstraint){var a,s,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){o.fixedNodesOnHorizontal.add(t),o.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),o.dummyToNodeForVerticalAlignment.get("dummy"+e).push(t),o.fixedNodeSet.has(t)&&o.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),o.dummyToNodeForHorizontalAlignment.get("dummy"+e).push(t),o.fixedNodeSet.has(t)&&o.fixedNodesOnVertical.add("dummy"+e)})}f.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(t){for(var e,r,n=t.length-1;n>=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=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,o.nodesInRelativeHorizontal.includes(r)||(o.nodesInRelativeHorizontal.push(r),o.nodeToRelativeConstraintMapHorizontal.set(r,[]),o.dummyToNodeForVerticalAlignment.has(r)?o.nodeToTempPositionMapHorizontal.set(r,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(r,o.idToNodeMap.get(r).getCenterX())),o.nodesInRelativeHorizontal.includes(e)||(o.nodesInRelativeHorizontal.push(e),o.nodeToRelativeConstraintMapHorizontal.set(e,[]),o.dummyToNodeForVerticalAlignment.has(e)?o.nodeToTempPositionMapHorizontal.set(e,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(e,o.idToNodeMap.get(e).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),o.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,o.nodesInRelativeVertical.includes(e)||(o.nodesInRelativeVertical.push(e),o.nodeToRelativeConstraintMapVertical.set(e,[]),o.dummyToNodeForHorizontalAlignment.has(e)?o.nodeToTempPositionMapVertical.set(e,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(e,o.idToNodeMap.get(e).getCenterY())),o.nodesInRelativeVertical.includes(r)||(o.nodesInRelativeVertical.push(r),o.nodeToRelativeConstraintMapVertical.set(r,[]),o.dummyToNodeForHorizontalAlignment.has(r)?o.nodeToTempPositionMapVertical.set(r,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(r,o.idToNodeMap.get(r).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(e).push({bottom:r,gap:t.gap}),o.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,s=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,s.has(e)?s.get(e).push(r):s.set(e,[r]),s.has(r)?s.get(r).push(e):s.set(r,[e]))}),c=(l=Ae(function(n,i){var a=[],o=[],s=new w,l=new Set,c=0;return n.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],o[c]=!1,s.push(r=e),l.add(r),a[c].push(r);0!=s.length;){var r=s.shift();i.has(r)&&(o[c]=!0),n.get(r).forEach(function(t){l.has(t)||(s.push(t),l.add(t),a[c].push(t))})}c++}}),{components:a,isFixed:o}},"constructComponents"))(a,o.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(s,o.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){(t=i.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,n=0;n<t[e].length;n++){if(this.fixedNodeSet.has(t[e][n])){r=0;break}r+=this.idToNodeMap.get(t[e][n]).displacementX}for(var a=r/t[e].length,n=0;n<t[e].length;n++)this.idToNodeMap.get(t[e][n]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var o=this.constraints.alignmentConstraint.horizontal,e=0;e<o.length;e++){for(var s=0,n=0;n<o[e].length;n++){if(this.fixedNodeSet.has(o[e][n])){s=0;break}s+=this.idToNodeMap.get(o[e][n]).displacementY}for(var l=s/o[e].length,n=0;n<o[e].length;n++)this.idToNodeMap.get(o[e][n]).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 n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForVerticalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForVerticalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementX,i.nodeToRelativeConstraintMapHorizontal.get(r).forEach(function(t){var e;t.right?(e=i.nodeToTempPositionMapHorizontal.get(t.right)-i.nodeToTempPositionMapHorizontal.get(r)-n)<t.gap&&(n-=t.gap-e):(e=i.nodeToTempPositionMapHorizontal.get(r)-i.nodeToTempPositionMapHorizontal.get(t.left)+n)<t.gap&&(n+=t.gap-e)}),i.nodeToTempPositionMapHorizontal.set(r,i.nodeToTempPositionMapHorizontal.get(r)+n),i.dummyToNodeForVerticalAlignment.has(r)?i.dummyToNodeForVerticalAlignment.get(r).forEach(function(t){i.idToNodeMap.get(t).displacementX=n}):i.idToNodeMap.get(r).displacementX=n)}),this.nodesInRelativeVertical.forEach(function(r){var n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForHorizontalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForHorizontalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementY,i.nodeToRelativeConstraintMapVertical.get(r).forEach(function(t){var e;t.bottom?(e=i.nodeToTempPositionMapVertical.get(t.bottom)-i.nodeToTempPositionMapVertical.get(r)-n)<t.gap&&(n-=t.gap-e):(e=i.nodeToTempPositionMapVertical.get(r)-i.nodeToTempPositionMapVertical.get(t.top)+n)<t.gap&&(n+=t.gap-e)}),i.nodeToTempPositionMapVertical.set(r,i.nodeToTempPositionMapVertical.get(r)+n),i.dummyToNodeForHorizontalAlignment.has(r)?i.dummyToNodeForHorizontalAlignment.get(r).forEach(function(t){i.idToNodeMap.get(t).displacementY=n}):i.idToNodeMap.get(r).displacementY=n)});else{for(e=0;e<this.componentsOnHorizontal.length;e++){var c=this.componentsOnHorizontal[e];if(this.fixedComponentsOnHorizontal[e])for(n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementX=0}):this.idToNodeMap.get(c[n]).displacementX=0;else{for(var h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForVerticalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementX,u++);for(var d=h/u,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementX=d}):this.idToNodeMap.get(c[n]).displacementX=d}}for(e=0;e<this.componentsOnVertical.length;e++)if(c=this.componentsOnVertical[e],this.fixedComponentsOnVertical[e])for(n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementY=0}):this.idToNodeMap.get(c[n]).displacementY=0;else{for(var p,h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForHorizontalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementY,u++);for(d=h/u,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(t){i.idToNodeMap.get(t).displacementY=d}):this.idToNodeMap.get(c[n]).displacementY=d}}},k.prototype.calculateNodesToApplyGravitationTo=function(){for(var t,e=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(t=r[i]).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 n=t[r];if(!e.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new p),n.getBendpoints().push(new p),this.createDummyNodesForBendpoints(n),e.add(n);else{var o=(o=(o=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!e.has(o[0])){if(1<o.length)for(var s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}o.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)),n=0,i=0,a=0,o=new p(0,0),s=0;s<t.length;s++){s%r==0&&(i=n,(a=0)!=s&&(i+=f.DEFAULT_COMPONENT_SEPERATION),n=0);var l=t[s],c=g.findCenterOfTree(l);e.x=a,e.y=i,(o=k.radialLayout(l,c,e)).y>n&&(n=Math.floor(o.y)),a=Math.floor(o.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},k.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,n),x.calculateBounds(t)),i=new b;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<t.length;a++)t[a].transform(i);return n=new p(e.getMaxX(),e.getMaxY()),i.inverseTransformPoint(n)},k.branchRadialLayout=function(t,e,r,n,i,a){(o=(n-r+1)/2)<0&&(o+=180);var o=(o+r)%360*v.TWO_PI/360,s=(Math.cos(o),i*Math.cos(o)),o=i*Math.sin(o),l=(t.setCenter(s,o),[]),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 s=null!=e?(l.indexOf(d[0])+1)%u:0,g=Math.abs(n-r)/c,f=s;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,i+a,a),h++)}},k.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,r=0;r<t.length;r++){var n=t[r].getDiagonal();e<n&&(e=n)}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 n=(i=e[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||t.push(i)}for(r=0;r<t.length;r++){var i,a=(i=t[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}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()),n=new h(l.graphManager),i=(n.id=e,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[e]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var o=0;o<c[t].length;o++){var s=c[t][o];a.remove(s),i.add(s)}}})},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 n=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(t){var e,r=n.idToDummyNode[t];i[t]=n.tileNodes(n.memberGroups[t],r.paddingLeft+r.paddingRight),r.rect.width=i[t].width,r.rect.height=i[t].height,r.setCenter(i[t].centerX,i[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,n=e.paddingLeft,i=e.paddingTop,a=e.labelMarginLeft,o=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i,a,o)}},k.prototype.repopulateZeroDegreeMembers=function(){var o=this,s=this.tiledZeroDegreePack;Object.keys(s).forEach(function(t){var e=o.idToDummyNode[t],r=e.paddingLeft,n=e.paddingTop,i=e.labelMarginLeft,a=e.labelMarginTop;o.adjustLocations(s[t],e.rect.x,e.rect.y,r,n,i,a)})},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(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[e]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},k.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;n<e.length;n++){var i=e[n];i.getSource().id!==i.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(),n=0;n<r.length;n++){var i=r[n];e+=this.getNodeDegreeWithChildren(i)}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,n,i,a,o){r+=i+o;for(var s=e+=n+a,l=0;l<t.rows.length;l++){var c=t.rows[l];e=s;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(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(t){var e,r=i[t];a.tiledMemberPack[t]=a.tileNodes(n[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,n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=t.length,o=0,s=0,l=0,t=(t.forEach(function(t){o+=t.getWidth(),s+=t.getHeight(),t.getWidth()>l&&(l=t.getWidth())}),o/a),c=s/a,c=Math.pow(n-i,2)+4*(t+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(t+i));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(t+i)-i)<l?l:n)+2*i},k.prototype.tileNodesByFavoringDim=function(t,e,r){var n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:i,centerX:0,centerY:0},s=(a&&(o.idealRowWidth=this.calcIdealRowWidth(t,r)),Ae(function(t){return t.rect.width*t.rect.height},"getNodeArea")),l=Ae(function(t,e){return s(e)-s(t)},"areaCompareFcn");t.sort(function(t,e){var r=l;return o.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(o.centerX=c/t.length,o.centerY=h/t.length,u=0;u<t.length;u++){var d,p=t[u];0==o.rows.length?this.insertNodeToRow(o,p,0,e):this.canAddHorizontal(o,p.rect.width,p.rect.height)?(d=o.rows.length-1,o.idealRowWidth||(d=this.getShortestRowIndex(o)),this.insertNodeToRow(o,p,d,e)):this.insertNodeToRow(o,p,o.rows.length,e),this.shiftToLastRow(o)}return o},k.prototype.insertNodeToRow=function(t,e,r,n){r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));var n=t.rowWidth[r]+e.rect.width,n=(0<t.rows[r].length&&(n+=t.horizontalPadding),t.rowWidth[r]=n,t.width<n&&(t.width=n),e.rect.height),i=(0<r&&(n+=t.verticalPadding),0);n>t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<r&&(e=n,r=t.rowWidth[n]);return e},k.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>r&&(e=n,r=t.rowWidth[n]);return e},k.prototype.canAddHorizontal=function(t,e,r){var n,i,a;return t.idealRowWidth?(i=t.rows.length-1,t.rowWidth[i]+e+t.horizontalPadding<=t.idealRowWidth):(i=this.getShortestRowIndex(t))<0||(a=t.rowWidth[i])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[i]<r&&0<i&&(n=r+t.verticalPadding-t.rowHeight[i]),i=t.width-a>=e+t.horizontalPadding?(t.height+n)/(a+e+t.horizontalPadding):(t.height+n)/t.width,n=r+t.verticalPadding,(i=i<1?1/i:i)<((a=t.width<e?(t.height+n)/e:(t.height+n)/t.width)<1?1/a:a))},k.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,n=t.rows[e],i=n[n.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var o=Number.MIN_VALUE,s=0;s<n.length;s++)n[s].height>o&&(o=n[s].height);0<e&&(o+=t.verticalPadding),a=t.rowHeight[e]+t.rowHeight[r],t.rowHeight[e]=o,t.rowHeight[r]<i.height+t.verticalPadding&&(t.rowHeight[r]=i.height+t.verticalPadding),i=t.rowHeight[e]+t.rowHeight[r],t.height+=i-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,n,i=this.graphManager.getAllNodes(),a=[],e=!1,o=0;o<i.length;o++)1!=(n=i[o]).getEdges().length||n.getEdges()[0].isInterGraph||null!=n.getChild()||(f.PURE_INCREMENTAL?(r=n.getEdges()[0].getOtherEnd(n),r=new c(n.getCenterX()-r.getCenterX(),n.getCenterY()-r.getCenterY()),a.push([n,n.getEdges()[0],n.getOwner(),r])):a.push([n,n.getEdges()[0],n.getOwner()]),e=!0);if(1==e){for(var s=[],l=0;l<a.length;l++)1==a[l][0].getEdges().length&&(s.push(a[l]),a[l][0].getOwner().remove(a[l][0]));t.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},k.prototype.growTree=function(t){for(var e,r=t[t.length-1],n=0;n<r.length;n++)e=r[n],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 n=r.startX,i=r.finishX,a=r.startY,o=r.finishY,s=[0,0,0,0];if(0<a)for(var l=n;l<=i;l++)s[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(i<this.grid.length-1)for(l=a;l<=o;l++)s[1]+=this.grid[i+1][l].length+this.grid[i][l].length-1;if(o<this.grid[0].length-1)for(l=n;l<=i;l++)s[2]+=this.grid[l][o+1].length+this.grid[l][o].length-1;if(0<n)for(l=a;l<=o;l++)s[3]+=this.grid[n-1][l].length+this.grid[n][l].length-1;for(var c,h,u,d,p=y.MAX_VALUE,g=0;g<s.length;g++)s[g]<p?(p=s[g],c=1,h=g):s[g]==p&&c++;3==c&&0==p?0==s[0]&&0==s[1]&&0==s[2]?u=1:0==s[0]&&0==s[1]&&0==s[3]?u=0:0==s[0]&&0==s[2]&&0==s[3]?u=3:0==s[1]&&0==s[2]&&0==s[3]&&(u=2):u=2==c&&0==p?(d=Math.floor(2*Math.random()),0==s[0]&&0==s[1]?0==d?0:1:0==s[0]&&0==s[2]?0==d?0:2:0==s[0]&&0==s[3]?0==d?0:3:0==s[1]&&0==s[2]?0==d?1:2:0==s[1]&&0==s[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 n,i=r(551).FDLayoutNode,a=r(551).IMath;function o(t,e,r,n){i.call(this,t,e,r,n)}for(n in Ae(o,"CoSENode"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.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)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},o.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},o.prototype.setPred1=function(t){this.pred1=t},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(t){this.next=t},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(t){this.processed=t},o.prototype.isProcessed=function(){return processed},t.exports=o},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)}Ae(Pt,"_toConsumableArray");var Bt=r(806),Ft=r(551).LinkedList,$t=r(551).Matrix,zt=r(551).SVD;function n(){}Ae(n,"ConstraintHandler"),n.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=[],n=t.getAllNodes(),P=0,i=0;i<n.length;i++){var a=n[i];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 o,B=Ae(function(t,e){return{x:t.x-e.x,y:t.y-e.y}},"calculatePositionDiff"),s=Ae(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=Ae(function(t,x,h,b,e){function i(t,e){var r=new Set(t),n=!0,t=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;r.add(s)}}catch(e){t=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(t)throw i}}return r}Ae(i,"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),o=new Map,s=new Ft;a.forEach(function(t,e){0==t?(s.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&&o.set(e,new Set([e]))}),h&&e.forEach(function(t){var e,r,n=[];t.forEach(function(t){h.has(t)&&n.push(t)}),0<n.length?(e=0,n.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/=n.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=Ae(function(){var n=s.shift();t.get(n).forEach(function(t){var e,r;w.get(t.id)<w.get(n)+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(n)+t.gap&&(e=w.get(n)+t.gap-r,o.get(n).forEach(function(t){w.set(t,w.get(t)-e)}))):w.set(t.id,w.get(n)+t.gap)),a.set(t.id,a.get(t.id)-1),0==a.get(t.id)&&s.push(t.id),h&&o.set(t.id,i(o.get(n),o.get(t.id)))})},"_loop");0!=s.length;)r();return h&&(u=new Set,t.forEach(function(t,e){0==t.length&&u.add(e)}),d=[],o.forEach(function(r,t){if(u.has(t)){var n,i,e=!1,a=!0,t=!1,o=void 0;try{for(var s,l=r[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var c=s.value;h.has(c)&&(e=!0)}}catch(e){t=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(t)throw o}}e||(n=!1,i=void 0,d.forEach(function(t,e){t.has([].concat(Pt(r))[0])&&(n=!0,i=e)}),n?r.forEach(function(t){d[i].add(t)}):d.push(new Set(r)))}}),d.forEach(function(t,e){var r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=!0,s=!1,l=void 0;try{for(var c,h=t[Symbol.iterator]();!(o=(c=h.next()).done);o=!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),i<d&&(i=d),p<n&&(n=p),a<p&&(a=p)}}catch(t){s=!0,l=t}finally{try{!o&&h.return&&h.return()}finally{if(s)throw l}}var g=(r+i)/2-(n+a)/2,f=!0,s=!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){s=!0,l=t}finally{try{!f&&y.return&&y.return()}finally{if(s)throw l}}})),w},"findAppropriatePositionForRelativePlacement"),l=Ae(function(t){var e=0,r=0,n=0,i=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)]?n++:i++}),r<e&&i<n)for(var a=0;a<k.size;a++)T[a]=-1*T[a],E[a]=-1*E[a];else if(r<e)for(var o=0;o<k.size;o++)T[o]=-1*T[o];else if(i<n)for(var s=0;s<k.size;s++)E[s]=-1*E[s]},"applyReflectionForRelativePlacement"),F=Ae(function(n){var i=[],a=new Ft,o=new Set,s=0;return n.forEach(function(t,e){if(!o.has(e)){for(i[s]=[],a.push(r=e),o.add(r),i[s].push(r);0!=a.length;){var r=a.shift();n.get(r).forEach(function(t){o.has(t.id)||(a.push(t.id),o.add(t.id),i[s].push(t.id))})}s++}}),i},"findComponents"),$=Ae(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=Ae(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=Ae(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)}))),n=0<r.size?T[k.get(r.values().next().value)]:s(e).x;G[t].forEach(function(t){c[y]=[n,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 Y=e.alignmentConstraint.horizontal,j=Ae(function(t){var e=new Set,r=(Y[t].forEach(function(t){e.add(t)}),new Set([].concat(Pt(e)).filter(function(t){return p.has(t)}))),n=0<r.size?T[k.get(r.values().next().value)]:s(e).y;Y[t].forEach(function(t){c[y]=[T[k.get(t)],n],h[y]=[T[k.get(t)],E[k.get(t)]],y++})},"_loop3"),H=0;H<Y.length;H++)j(H);u=!0}e.relativePlacementConstraint&&(d=!0)}else if(e.relativePlacementConstraint){for(var v,x,b,W,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,W=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]=[],W.has(t)?c[e][0]=W.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 _=$t.transpose(c),Z=$t.transpose(h),C=0;C<_.length;C++)_[C]=$t.multGamma(_[C]),Z[C]=$t.multGamma(Z[C]);for(var f=$t.multMat(_,$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&&(o={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);o.x+=t.x,o.y+=t.y}),o.x/=e.fixedNodeConstraint.length,o.y/=e.fixedNodeConstraint.length,T.forEach(function(t,e){T[e]+=o.x}),E.forEach(function(t,e){E[e]+=o.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=Ae(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)]:s(e).x);e.forEach(function(t){p.has(t)||(T[k.get(t)]=r)})},"_loop4"),nt=0;nt<et.length;nt++)rt(nt);if(e.alignmentConstraint.horizontal)for(var it=e.alignmentConstraint.horizontal,at=Ae(function(t){var e=new Set,r=(it[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)]:s(e).y);e.forEach(function(t){p.has(t)||(E[k.get(t)]=r)})},"_loop5"),ot=0;ot<it.length;ot++)at(ot)}if(e.relativePlacementConstraint){var L=new Map,N=new Map,I=new Map,M=new Map,st=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=Ae(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)}),st.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=Ae(function(e){M.set("dummy"+e,[]),gt[e].forEach(function(t){N.set(t,"dummy"+e),M.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 R=new Map,D=new Map,yt=Ae(function(n){g.get(n).forEach(function(t){var e=void 0,r=void 0;"horizontal"==t.direction?(e=L.get(n)?L.get(n):n,r=L.get(t.id)?{id:L.get(t.id),gap:t.gap,direction:t.direction}:t,R.has(e)?R.get(e).push(r):R.set(e,[r]),R.has(r.id)||R.set(r.id,[])):(e=N.get(n)?N.get(n):n,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=$(R),u=$(D),f=F(f),u=F(u),wt=z(R),kt=z(D),Tt=[],Et=[],_t=(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(R,"horizontal",ct,st,Tt)),Ct=t(D,"vertical",ht,lt,Et),St=Ae(function(e){I.get(e)?I.get(e).forEach(function(t){T[k.get(t)]=_t.get(e)}):T[k.get(e)]=_t.get(e)},"_loop9"),At=!0,f=!1,u=void 0;try{for(var Lt,Nt=_t.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=Ae(function(e){M.get(e)?M.get(e).forEach(function(t){E[k.get(t)]=Ct.get(e)}):E[k.get(e)]=Ct.get(e)},"_loop10"),Mt=!0,f=!1,u=void 0;try{for(var Rt,Dt=Ct.keys()[Symbol.iterator]();!(Mt=(Rt=Dt.next()).done);Mt=!0)It(Rt.value)}catch(t){f=!0,u=t}finally{try{!Mt&&Dt.return&&Dt.return()}finally{if(f)throw u}}}}for(var Ot=0;Ot<n.length;Ot++){var O=n[Ot];null==O.getChild()&&O.setCenter(T[k.get(O.id)],E[k.get(O.id)])}},t.exports=n},551:t=>{t.exports=e}},i={},Ae(r,"__webpack_require__"),r(45);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),LMt=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(AMt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(AMt()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={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),n=1;n<t;n++)e[n-1]=arguments[n];return e.forEach(function(e){Object.keys(e).forEach(function(t){return r[t]=e[t]})}),r}},548:(t,e,r)=>{Ae(_,"sliceIterator");var n=r(140).layoutBase.LinkedList;function _(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var n={},e=0;e<t.length;e++)n[t[e].id()]=!0;return t.filter(function(t,e){for(var r=(t="number"==typeof t?e:t).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,o,s,t){for(var l=new n,c=new Set,h=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],e=Ae(function(){var n=a.collection(),i=(y.push(n),s[0]),t=a.collection();t.merge(i).merge(i.descendants().intersection(o)),h.push(i),t.forEach(function(t){l.push(t),c.add(t),n.merge(t)});for(var e,r=Ae(function(){i=l.shift();var e=a.collection();i.neighborhood().nodes().forEach(function(t){0<o.intersection(i.edgesWith(t)).length&&e.merge(t)});for(var t=0;t<e.length;t++){var r=e[t];null==(u=s.intersection(r.union(r.ancestors())))||c.has(u[0])||u.union(u.descendants()).forEach(function(t){l.push(t),c.add(t),n.merge(t),s.has(t)&&h.push(t)})}},"_loop2");0!=l.length;)r();n.forEach(function(t){o.intersection(t.connectedEdges()).forEach(function(t){n.has(t.source())&&n.has(t.target())&&n.merge(t)})}),(!(g=h.length==s.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=[],s=s.difference(e),f++)},"_loop");e(),!g;);return t&&0<m.length&&t.set("dummy"+(t.size+1),m),y},relocateComponent:function(t,i,e){if(!e.fixedNodeConstraint){var a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if("draft"==e.quality){var r=!0,n=!1,c=void 0;try{for(var h,u=i.nodeIndexes[Symbol.iterator]();!(r=(h=u.next()).done);r=!0){var d,p,g,f,m,y=function(t){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return _(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=i.xCoords[x]-d.w/2,g=i.xCoords[x]+d.w/2,f=i.yCoords[x]-d.h/2,m=i.yCoords[x]+d.h/2,p<a&&(a=p),o<g&&(o=g),f<s&&(s=f),l<m)&&(l=m)}}catch(t){n=!0,c=t}finally{try{!r&&u.return&&u.return()}finally{if(n)throw c}}var w=t.x-(o+a)/2,k=t.y-(l+s)/2;i.xCoords=i.xCoords.map(function(t){return t+w}),i.yCoords=i.yCoords.map(function(t){return t+k})}else{Object.keys(i).forEach(function(t){var e=(t=i[t]).getRect().x,r=t.getRect().x+t.getRect().width,n=t.getRect().y,t=t.getRect().y+t.getRect().height;e<a&&(a=e),o<r&&(o=r),n<s&&(s=n),l<t&&(l=t)});var T=t.x-(o+a)/2,E=t.y-(l+s)/2;Object.keys(i).forEach(function(t){(t=i[t]).setCenter(t.getCenterX()+T,t.getCenterY()+E)})}}},calcBoundingBox:function(t,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=t.descendants().not(":parent"),c=l.length,h=0;h<c;h++){var u,d=l[h];(u=e[n.get(d.id())]-d.width()/2)<i&&(i=u),a<(u=e[n.get(d.id())]+d.width()/2)&&(a=u),(u=r[n.get(d.id())]-d.height()/2)<o&&(o=u),s<(u=r[n.get(d.id())]+d.height()/2)&&(s=u)}return(t={}).topLeftX=i,t.topLeftY=o,t.width=a-i,t.height=s-o,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),s=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=Ae(function(c,t){var e=c.cy,r=(i=c.eles).nodes(),n=i.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),Ae(function(t){return"function"==typeof t},"isFn")),m=Ae(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,i),t=Ae(function t(e,r,n,i){for(var a=r.length,o=0;o<a;o++){var s,l=r[o],c=null,h=void(0==l.intersection(y).length&&(c=l.children())),u=l.layoutDimensions({nodeDimensionsIncludeLabels:i.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?i.randomize?l.isParent()?(s=v.calcBoundingBox(l,p,g,d),0==l.intersection(y).length?e.add(new x(n.graphManager,new b(s.topLeftX,s.topLeftY),new w(s.width,s.height))):e.add(new x(n.graphManager,new b(s.topLeftX,s.topLeftY),new w(parseFloat(u.w),parseFloat(u.h))))):e.add(new x(n.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(n.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(i.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")),i.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(n.getGraphManager().add(n.newGraph(),h),c,n,i)}},"processChildrenList"),e=Ae(function(t,e,r){for(var n=0,i=0,a=0;a<r.length;a++){var o=r[a],s=f[o.data("source")],l=f[o.data("target")];s&&l&&s!==l&&0==s.getEdgesBetween(l).length&&((s=e.add(t.newEdge(),s,l)).id=o.id(),s.idealLength=m(c.idealEdgeLength,o),s.edgeElasticity=m(c.edgeElasticity,o),n+=s.idealLength,i++)}null!=c.idealEdgeLength&&(0<i?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=n/i: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"),i=Ae(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),"proof"==c.quality?l.QUALITY=2:l.QUALITY=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 s),o=a.newGraphManager();return t(o.addRoot(),v.getTopMostNodes(r),a,c),e(a,o,n),i(a,c),a.runLayout(),f},"coseLayout");t.exports={coseLayout:r}},212:(t,e,r)=>{function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Ae(n,"defineProperties"),Ae(i,"_classCallCheck");var a,o,s=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:Ae(function(t){return 4500},"nodeRepulsion"),idealEdgeLength:Ae(function(t){return 50},"idealEdgeLength"),edgeElasticity:Ae(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:Ae(function(){},"ready"),stop:Ae(function(){},"stop")}),r=(Ae(c,"Layout"),a=c,o=[{key:"run",value:Ae(function(){var h=this.options,t=h.cy,e=h.eles,u=[],d=[],r=void 0,n=[],i=(!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&&(i=(i=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(),n.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 o=t.collection();if(h.tile){var a=new Map,s=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},c=[];if(r.forEach(function(r,t){0==r.edges().length&&(r.nodes().forEach(function(t,e){o.merge(r.nodes()[e]),t.isParent()||(l.nodeIndexes.set(r.nodes()[e].id(),s++),l.xCoords.push(r.nodes()[0].position().x),l.yCoords.push(r.nodes()[0].position().y))}),c.push(t))}),1<o.length){a=o.boundingBox(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),r.push(o),u.push(l);for(var p=c.length-1;0<=p;p--)r.splice(c[p],1),u.splice(c[p],1),n.splice(c[p],1)}}r.forEach(function(t,e){h.eles=t,d.push(k(h,u[e])),b.relocateComponent(n[e],d[e],h)})}else r.forEach(function(t,e){b.relocateComponent(n[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,s){var l,r,c=void 0;"draft"==h.quality&&(c=u[s].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[s].xCoords,u[s].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[s].xCoords[r]-t.boundingbox().w/2,y:u[s].yCoords[r]-t.boundingbox().h/2,width:t.boundingbox().w,height:t.boundingbox().h})):d[s][t.id()]&&l.nodes.push({x:d[s][t.id()].getLeft(),y:d[s][t.id()].getTop(),width:d[s][t.id()].getWidth(),height:d[s][t.id()].getHeight()})}),t.edges().forEach(function(t){var e,r,n,i,a,o=t.source(),t=t.target();"none"!=o.css("display")&&"none"!=t.css("display")&&("draft"==h.quality?(e=c.get(o.id()),r=c.get(t.id()),n=[],i=[],o.isParent()?(a=b.calcBoundingBox(o,u[s].xCoords,u[s].yCoords,c),n.push(a.topLeftX+a.width/2),n.push(a.topLeftY+a.height/2)):(n.push(u[s].xCoords[e]),n.push(u[s].yCoords[e])),t.isParent()?(a=b.calcBoundingBox(t,u[s].xCoords,u[s].yCoords,c),i.push(a.topLeftX+a.width/2),i.push(a.topLeftY+a.height/2)):(i.push(u[s].xCoords[r]),i.push(u[s].yCoords[r])),l.edges.push({startX:n[0],startY:n[1],endX:i[0],endY:i[1]})):d[s][o.id()]&&d[s][t.id()]&&l.edges.push({startX:d[s][o.id()].getCenterX(),startY:d[s][o.id()].getCenterY(),endX:d[s][t.id()].getCenterX(),endY:d[s][t.id()].getCenterY()}))}),0<l.nodes.length)&&(g.push(l),v.add(s))}),m=i.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}),n=t.yCoords.map(function(t){return t+m[e].dy});t.xCoords=r,t.yCoords=n}):(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(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),h.randomize&&(i=w(h),u.push(i)),"default"==h.quality||"proof"==h.quality?(d.push(k(h,u[0])),b.relocateComponent(n[0],d[0],h)):b.relocateComponent(n[0],u[0],h);var x=Ae(function(r,t){var e,n,i,a;return"default"==h.quality||"proof"==h.quality?(n=e=void 0,i=(r="number"==typeof r?t:r).data("id"),d.forEach(function(t){i in t&&(e={x:t[i].getRect().getCenterX(),y:t[i].getRect().getCenterY()},n=t[i])}),h.nodeDimensionsIncludeLabels&&(n.labelWidth&&("left"==n.labelPosHorizontal?e.x+=n.labelWidth/2:"right"==n.labelPosHorizontal&&(e.x-=n.labelWidth/2)),n.labelHeight)&&("top"==n.labelPosVertical?e.y+=n.labelHeight/2:"bottom"==n.labelPosVertical&&(e.y-=n.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),i=e.filter(function(t){return"none"==t.css("display")}),h.eles=e.not(i),e.nodes().not(":parent").not(i).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")}],n(a.prototype,o),c);function c(t){i(this,c),this.options=s({},l,t)}t.exports=r},657:(t,e,r)=>{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=Ae(function(t){var i=t.cy,a=t.eles,e=a.nodes(),r=a.nodes(":parent"),o=new Map,m=new Map,s=new Map,y=[],g=[],f=[],h=[],v=[],x=[],u=[],b=[],w=void 0,k=t.piTol,n=t.samplingType,T=t.nodeSeparation,d=void 0,P=Ae(function(){for(var t=0,e=!1;t<d;){for(var r=Math.floor(Math.random()*w),e=!1,n=0;n<t;n++)if(h[n]==r){e=!0;break}e||(h[t]=r,t++)}},"randomSampleCR"),p=Ae(function(t,e,r){for(var n,i=[],a=0,o=0,s=[],l=0,c=1,h=0;h<w;h++)s[h]=1e8;for(s[i[o]=t]=0;a<=o;){for(var u=i[a++],d=y[u],p=0;p<d.length;p++)1e8==s[n=m.get(d[p])]&&(s[n]=s[u]+1,i[++o]=n);x[u][e]=s[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=Ae(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 n=0;n<d;n++)e=p(h[n]=e,n,t)}else{P();for(var i=0;i<d;i++)p(h[i],i,t,!1)}for(var a=0;a<w;a++)for(var o=0;o<d;o++)x[a][o]*=x[a][o];for(var s=0;s<d;s++)u[s]=[];for(var l=0;l<d;l++)for(var c=0;c<d;c++)u[l][c]=x[h[c]][l]},"allBFS"),B=Ae(function(){for(var t=(r=q.svd(u)).S,e=r.U,r=r.V,n=t[0]*t[0]*t[0],i=[],a=0;a<d;a++){i[a]=[];for(var o=0;o<d;o++)i[a][o]=0,a==o&&(i[a][o]=t[a]/(t[a]*t[a]+n/(t[a]*t[a])))}b=U.multMat(U.multMat(r,i),U.transpose(e))},"sample"),F=Ae(function(){for(var t=void 0,e=void 0,r=[],n=[],i=[],a=[],o=0;o<w;o++)r[o]=Math.random(),n[o]=Math.random();for(var r=U.normalize(r),n=U.normalize(n),s=1e-9,l=1e-9,c=void 0;;){for(var h=0;h<w;h++)i[h]=r[h];if(r=U.multGamma(U.multL(U.multGamma(i),x,b)),t=U.dotProduct(i,r),r=U.normalize(r),s=U.dotProduct(i,r),(c=Math.abs(s/l))<=1+k&&1<=c)break;l=s}for(var u=0;u<w;u++)i[u]=r[u];for(l=1e-9;;){for(var d=0;d<w;d++)a[d]=n[d];if(a=U.minusOp(a,U.multCons(i,U.dotProduct(i,a))),n=U.multGamma(U.multL(U.multGamma(a),x,b)),e=U.dotProduct(a,n),n=U.normalize(n),s=U.dotProduct(a,n),(c=Math.abs(s/l))<=1+k&&1<=c)break;l=s}for(var p=0;p<w;p++)a[p]=n[p];g=U.multCons(i,Math.sqrt(Math.abs(t))),f=U.multCons(a,Math.sqrt(Math.abs(e)))},"powerIteration");G.connectComponents(i,a,G.getTopMostNodes(e),o),r.forEach(function(t){G.connectComponents(i,a,G.getTopMostNodes(t.descendants().intersection(a)),o)});for(var c=0,E=0;E<e.length;E++)e[E].isParent()||m.set(e[E].id(),c++);var _=!0,C=!1,S=void 0;try{for(var A,L=o.keys()[Symbol.iterator]();!(_=(A=L.next()).done);_=!0){var $=A.value;m.set($,c++)}}catch(t){C=!0,S=t}finally{try{!_&&L.return&&L.return()}finally{if(C)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,n=e.nodes(":childless")[0].connectedEdges().length;e.nodes(":childless").forEach(function(t,e){t.connectedEdges().length<n&&(n=t.connectedEdges().length,r=e)}),s.set(t.id(),e.nodes(":childless")[r].id())}),e.forEach(function(e){var r=e.isParent()?m.get(s.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(s.get(t.id())):y[r].push(t.id()))})});var z=Ae(function(e){var r,n=m.get(e);o.get(e).forEach(function(t){r=i.getElementById(t).isParent()?s.get(t):t,y[n].push(r),y[m.get(r)].push(e)})},"_loop"),I=!0,C=!1,S=void 0;try{for(var M,R=o.keys()[Symbol.iterator]();!(I=(M=R.next()).done);I=!0)z(M.value)}catch(t){C=!0,S=t}finally{try{!I&&R.return&&R.return()}finally{if(C)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(n),B(),F()):m.forEach(function(t,e){g.push(i.getElementById(e).position("x")),f.push(i.getElementById(e).position("y"))})}else r=m.keys(),S=(C=i.getElementById(r.next().value)).position(),l=C.outerWidth(),g.push(S.x),f.push(S.y),2==w&&(n=i.getElementById(r.next().value).outerWidth(),g.push(S.x+l/2+n/2+t.idealEdgeLength),f.push(S.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");t.exports={spectralLayout:r}},579:(t,e,r)=>{var n=r(212),r=Ae(function(t){t&&t("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},i={},Ae(r,"__webpack_require__"),r(579);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),NMt=t(()=>{jt(),vMt=Ae(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),xMt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:vMt('<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:vMt('<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:vMt('<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:vMt('<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:vMt('<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:Dt,blank:{body:vMt("")}}}}),IMt=t(()=>{jt(),i(),KC(),EMt(),NMt(),XIt(),bMt=Ae(async function(w,t){let k=KIt("padding"),e=KIt("iconSize"),T=e/2,E=e/6,_=E/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:o,targetArrow:s,targetGroup:l,label:c}=HIt(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;i&&(PIt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(PIt(o)?g+="L"===o?-m:m:f+="T"===o?-m:m+18),i||"junction"!==pMt.getNode(e)?.type||(PIt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==pMt.getNode(a)?.type||(PIt(o)?g+="L"===o?T:-T:f+="T"===o?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"),n&&(b=PIt(r)?RIt[r](h,E):h-_,y=BIt(r)?RIt[r](u,E):u-_,t.insert("polygon").attr("points",MIt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),s&&(b=PIt(o)?RIt[o](g,E):g-_,y=BIt(o)?RIt[o](f,E):f-_,t.insert("polygon").attr("points",MIt[o](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=FIt(r,o)?"XY":PIt(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 XC(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=GIt(r,o))&&$It(y)&&(t=b.node().getBoundingClientRect(),[y,v]=qIt(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"),wMt=Ae(async function(l,t){let c=.75*KIt("padding"),h=KIt("fontSize"),u=KIt("iconSize")/2;await Promise.all(t.nodes().map(async n=>{var i=WIt(n);if("group"===i.type){var{h:n,w:a,x1:o,y1:s}=n.boundingBox();l.append("rect").attr("x",o+u).attr("y",s+u).attr("width",a).attr("height",n).attr("class","node-bkg");let t=l.append("g"),e=o,r=s;i.icon&&((n=t.append("g")).html(`<g>${await $t(i.icon,{height:c,width:c,fallbackPrefix:xMt.prefix})}</g>`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(o=t.append("g"),await XC(o,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),o.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),kMt=Ae(async function(t,e,r){for(var n of r){var i=e.append("g"),a=KIt("iconSize"),o=(n.title&&(o=i.append("g"),await XC(o,n.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+a/2+", "+a+")")),i.append("g")),{width:s,height:l}=(n.icon?o.html(`<g>${await $t(n.icon,{height:a,width:a,fallbackPrefix:xMt.prefix})}</g>`):n.iconText?(o.html(`<g>${await $t("blank",{height:a,width:a,fallbackPrefix:xMt.prefix})}</g>`),s=o.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),l=parseInt(window.getComputedStyle(s.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,s.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):o.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),i.attr("class","architecture-service"),i._groups[0][0].getBBox());n.width=s,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),TMt=Ae(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=KIt("iconSize"),{width:r,height:n}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=n,i.setElementForId(t.id,e)})},"drawJunctions")});function MMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:KIt("iconSize"),height:KIt("iconSize")},classes:"node-service"})})}function RMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:KIt("iconSize"),height:KIt("iconSize")},classes:"node-junction"})})}function DMt(r,t){t.nodes().map(t=>{var e=WIt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function OMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function PMt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:o,rhsDir:s,rhsGroup:l,title:c}=t,t=FIt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:o,sourceArrow:n,sourceGroup:i,sourceEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%",target:r,targetDir:s,targetArrow:a,targetGroup:l,targetEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%"},classes:t})})}function BMt(t){var[t,e]=t.map(t=>{let n={},i={};return Object.entries(t).forEach(([t,[e,r]])=>{n[r]||(n[r]=[]),i[e]||(i[e]=[]),n[r].push(t),i[e].push(t)}),{horiz:Object.values(n).filter(t=>1<t.length),vert:Object.values(i).filter(t=>1<t.length)}}).reduce(([t,e],{horiz:r,vert:n})=>[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:t,vertical:e}}function FMt(t){let l=[],c=Ae(t=>t[0]+","+t[1],"posToStr"),h=Ae(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntries(Object.entries(t).map(([t,e])=>[c(e),t])),o=[c([0,0])],s={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0<o.length;){var r=o.shift();if(r){s[r]=1;let i=a[r];if(i){let n=h(r);Object.entries(e).forEach(([t,e])=>{var e=c([n[0]+e[0],n[1]+e[1]]),r=a[e];r&&!s[e]&&(o.push(e),l.push({[IIt[t]]:r,[IIt[DIt(t)]]:i,gap:1.5*KIt("iconSize")}))})}}}}),l}function $Mt(i,a,l,c,{spatialMaps:h}){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),o=t9t({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":KIt("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:KIt("padding")+"px"}}]}),r=(t.remove(),OMt(l,o),MMt(i,o),RMt(a,o),PMt(c,o),BMt(h)),n=FMt(h),s=o.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=WIt(t).parent)===WIt(e).parent?1.5*KIt("iconSize"):.5*KIt("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=WIt(t).parent)===WIt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});s.one("layoutstop",()=>{function t(t,e,r,n){var{x:t,y:i}=t,{x:e,y:a}=e,o=(n-i+(t-r)*(i-a)/(t-e))/Math.sqrt(1+Math.pow((i-a)/(t-e),2)),s=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-t,2)-Math.pow(o,2));s/=Math.sqrt(Math.pow(e-t,2)+Math.pow(a-i,2));let l=(e-t)*(n-i)-(a-i)*(r-t);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(e-t)*(r-t)+(a-i)*(n-i);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(o)*l,weights:s*=c}}Ae(t,"getSegmentWeights"),o.startBatch();for(var e of Object.values(o.edges())){var r,n,i,a;e.data?.()&&({x:i,y:n}=e.source().position(),{x:a,y:r}=e.target().position(),i!==a)&&n!==r&&(i=e.sourceEndpoint(),a=e.targetEndpoint(),n=HIt(e).sourceDir,[r,n]=BIt(n)?[i.x,a.y]:[a.x,i.y],{weights:i,distances:a}=t(i,a,r,n),e.style("segment-distances",a),e.style("segment-weights",i))}o.endBatch(),s.run()}),s.run(),o.ready(t=>{R.info("Ready",t),e(o)})})}var zMt,GMt,UMt=t(()=>{jt(),e9t(),zMt=rt(LMt(),1),Q3(),e(),Ipt(),ec(),EMt(),NMt(),XIt(),IMt(),Bt([{name:xMt.prefix,icons:xMt}]),t9t.use(zMt.default),Ae(MMt,"addServices"),Ae(RMt,"addJunctions"),Ae(DMt,"positionNodes"),Ae(OMt,"addGroups"),Ae(PMt,"addEdges"),Ae(BMt,"getAlignments"),Ae(FMt,"getRelativeConstraints"),Ae($Mt,"layoutArchitecture"),zMt=Ae(async(t,e,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),o=n.getGroups(),s=n.getEdges(),l=n.getDataStructures(),c=(e=Ept(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 kMt(n,u,i),TMt(n,u,a),await $Mt(i,a,o,s,l));await bMt(c,u),await wMt(h,u),DMt(n,u),Xl(void 0,e,KIt("padding"),KIt("useMaxWidth"))},"draw"),GMt={draw:zMt}}),qMt={};J(qMt,{diagram:()=>YMt});var YMt,jMt,HMt=t(()=>{_Mt(),EMt(),CMt(),UMt(),YMt={parser:fMt,db:pMt,renderer:GMt,styles:yMt}}),WMt=(J(jMt={},{default:()=>nFt}),jt(),Gr(),Yr(),{id:"c4",detector:Ae(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:Ae(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(TE(),wE))).diagram}),"loader")}),VMt={id:"flowchart",detector:Ae((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:Ae(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(SH(),lH))).diagram}),"loader")},XMt="flowchart-v2",t=Ae((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"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(SH(),lH))).diagram;return{id:XMt,diagram:t}},"loader"),KMt={id:XMt,detector:t,loader:J},ZMt={id:"er",detector:Ae(t=>/^\s*erDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(TW(),wW))).diagram}),"loader")},QMt={id:"gitGraph",detector:Ae(t=>/^\s*gitGraph/.test(t),"detector"),loader:Ae(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(Odt(),Idt))).diagram}),"loader")},JMt={id:"gantt",detector:Ae(t=>/^\s*gantt/.test(t),"detector"),loader:Ae(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(Spt(),ypt))).diagram}),"loader")},tRt={id:"info",detector:Ae(t=>/^\s*info/.test(t),"detector"),loader:Ae(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(Jpt(),Rpt))).diagram}),"loader")},eRt={id:"pie",detector:Ae(t=>/^\s*pie/.test(t),"detector"),loader:Ae(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(h1t(),i1t))).diagram}),"loader")},rRt="quadrantChart",t=Ae(t=>/^\s*quadrantChart/.test(t),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(j1t(),G1t))).diagram;return{id:rRt,diagram:t}},"loader"),nRt={id:rRt,detector:t,loader:J},iRt={id:"xychart",detector:Ae(t=>/^\s*xychart-beta/.test(t),"detector"),loader:Ae(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(Hft(),tft))).diagram}),"loader")},aRt="requirement",t=Ae(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(rmt(),Qft))).diagram;return{id:aRt,diagram:t}},"loader"),oRt={id:aRt,detector:t,loader:J},sRt={id:"sequence",detector:Ae(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(rvt(),Wyt))).diagram}),"loader")},lRt={id:"class",detector:Ae((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(Vvt(),cvt))).diagram}),"loader")},cRt="classDiagram",t=Ae((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(cbt(),Ext))).diagram;return{id:cRt,diagram:t}},"loader"),hRt={id:cRt,detector:t,loader:J},uRt={id:"state",detector:Ae((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(J4t(),Z4t))).diagram}),"loader")},dRt="stateDiagram",t=Ae((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(M3t(),t3t))).diagram;return{id:dRt,diagram:t}},"loader"),pRt={id:dRt,detector:t,loader:J},gRt={id:"journey",detector:Ae(t=>/^\s*journey/.test(t),"detector"),loader:Ae(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(J3t(),X3t))).diagram}),"loader")},fRt=(e(),Ipt(),ec(),t={draw:Ae((t,e,r)=>{R.debug(`rendering svg for syntax error
|
|
|
`);var n=(e=Ept(e)).append("g");e.attr("viewBox","0 0 2412 512"),Vl(e,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),mRt={db:{},renderer:t,parser:{parse:Ae(()=>{},"parse")}},yRt="flowchart-elk",J=Ae((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(SH(),lH))).diagram;return{id:yRt,diagram:t}},"loader"),vRt={id:yRt,detector:J,loader:t},xRt={id:"timeline",detector:Ae(t=>/^\s*timeline/.test(t),"detector"),loader:Ae(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(u6t(),H5t))).diagram}),"loader")},bRt={id:"mindmap",detector:Ae(t=>/^\s*mindmap/.test(t),"detector"),loader:Ae(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(Y9t(),A9t))).diagram}),"loader")},wRt={id:"sankey",detector:Ae(t=>/^\s*sankey-beta/.test(t),"detector"),loader:Ae(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(xNt(),tNt))).diagram}),"loader")},kRt={id:"packet",detector:Ae(t=>/^\s*packet-beta/.test(t),"detector"),loader:Ae(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(ANt(),ENt))).diagram}),"loader")},TRt={id:"block",detector:Ae(t=>/^\s*block-beta/.test(t),"detector"),loader:Ae(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(VIt(),LIt))).diagram}),"loader")},ERt="architecture",J=Ae(t=>/^\s*architecture/.test(t),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(HMt(),qMt))).diagram;return{id:ERt,diagram:t}},"loader"),_Rt={id:ERt,detector:J,loader:t},CRt=(Yr(),i(),!1),SRt=Ae(()=>{CRt||(CRt=!0,Tc("error",mRt,t=>"error"===t.toLowerCase().trim()),Tc("---",{db:{clear:Ae(()=>{},"clear")},styles:{},renderer:{draw:Ae(()=>{},"draw")},parser:{parse:Ae(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:Ae(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Jt(WMt,hRt,lRt,ZMt,JMt,tRt,eRt,oRt,sRt,vRt,KMt,VMt,bRt,xRt,QMt,pRt,uRt,gRt,nRt,wRt,kRt,iRt,TRt,_Rt))},"addDiagrams"),ARt=(e(),Yr(),i(),Ae(async()=>{R.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Zt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Ec(t)}catch{try{var{diagram:n,id:i}=await r();Tc(i,n,e)}catch(e){throw R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Zt[t],e}}}))).filter(t=>"rejected"===t.status);if(0<t.length){R.error(`Failed to load ${t.length} external diagrams`);for(var e of t)R.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams")),LRt=(e(),Q3(),"comm"),NRt="rule",IRt="decl",MRt=Math.abs,RRt=String.fromCharCode;function DRt(t){return t.trim()}function ORt(t,e,r){return t.replace(e,r)}function PRt(t,e,r){return t.indexOf(e,r)}function BRt(t,e){return 0|t.charCodeAt(e)}function FRt(t,e,r){return t.slice(e,r)}function $Rt(t){return t.length}function zRt(t){return t.length}function GRt(t,e){return e.push(t),t}Ae(DRt,"trim"),Ae(ORt,"replace"),Ae(PRt,"indexof"),Ae(BRt,"charat"),Ae(FRt,"substr"),Ae($Rt,"strlen"),Ae(zRt,"sizeof"),Ae(GRt,"append");var URt=1,qRt=1,YRt=0,jRt=0,HRt=0,WRt="";function VRt(t,e,r,n,i,a,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:URt,column:qRt,length:o,return:"",siblings:s}}function XRt(){return HRt=0<jRt?BRt(WRt,--jRt):0,qRt--,10===HRt&&(qRt=1,URt--),HRt}function KRt(){return HRt=jRt<YRt?BRt(WRt,jRt++):0,qRt++,10===HRt&&(qRt=1,URt++),HRt}function ZRt(){return BRt(WRt,jRt)}function QRt(t,e){return FRt(WRt,t,e)}function JRt(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 tDt(t){return URt=qRt=1,YRt=$Rt(WRt=t),jRt=0,[]}function eDt(t){return WRt="",t}function rDt(t){return DRt(QRt(jRt-1,aDt(91===t?t+2:40===t?t+1:t)))}function nDt(t){for(;(HRt=ZRt())&&HRt<33;)KRt();return 2<JRt(t)||3<JRt(HRt)?"":" "}function iDt(t,e){for(;--e&&KRt()&&!(HRt<48||102<HRt||57<HRt&&HRt<65||70<HRt&&HRt<97););return QRt(t,jRt+(e<6&&32==ZRt()&&32==KRt()))}function aDt(t){for(;KRt();)switch(HRt){case t:return jRt;case 34:case 39:34!==t&&39!==t&&aDt(HRt);break;case 40:41===t&&aDt(t);break;case 92:KRt()}return jRt}function oDt(t,e){for(;KRt()&&t+HRt!==57&&(t+HRt!==84||47!==ZRt()););return"/*"+QRt(e,jRt-1)+"*"+RRt(47===t?t:KRt())}function sDt(t){for(;!JRt(ZRt());)KRt();return QRt(t,jRt)}function lDt(t){return eDt(cDt("",null,null,null,[""],t=tDt(t),0,[0],t))}function cDt(t,e,r,n,i,a,o,s,l){for(var c,h,u,d=0,p=0,g=o,f=0,m=0,y=1,v=1,x=1,b=0,w="",k=i,T=w;v;)switch(c=b,b=KRt()){case 40:if(108!=c&&58==BRt(T,g-1)){-1!=PRt(T+=ORt(rDt(b),"&","&\f"),"&\f",MRt(d?s[d-1]:0))&&(x=-1);break}case 34:case 39:case 91:T+=rDt(b);break;case 9:case 10:case 13:case 32:T+=nDt(c);break;case 92:T+=iDt(jRt-1,7);continue;case 47:switch(ZRt()){case 42:case 47:GRt(uDt(oDt(KRt(),jRt),e,r,l),l),5!=JRt(c||1)&&5!=JRt(ZRt()||1)||!$Rt(T)||" "===FRt(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*y:s[d++]=$Rt(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+p:-1==x&&(T=ORt(T,/\f/g,"")),0<m&&($Rt(T)-g||0===y&&47===c)&&GRt(32<m?dDt(T+";",n,r,g-1,l):dDt(ORt(T," ","")+";",n,r,g-2,l),l);break;case 59:T+=";";default:if(GRt(u=hDt(T,e,r,d,p,i,s,w,k=[],h=[],g,a),a),123===b)if(0===p)cDt(T,e,u,u,k,a,g,s,h);else switch(99===f&&110===BRt(T,3)?100:f){case 100:case 108:case 109:case 115:cDt(t,u,u,n&&GRt(hDt(t,u,u,0,0,i,s,w,i,k=[],g,h),h),i,h,g,s,n?k:h);break;default:cDt(T,u,u,u,[""],h,0,s,h)}}d=p=m=0,y=x=1,w=T="",g=o;break;case 58:g=1+$Rt(T),m=c;default:if(y<1)if(123==b)--y;else if(125==b&&0==y++&&125==XRt())continue;switch(T+=RRt(b),b*y){case 38:x=0<p?1:(T+="\f",-1);break;case 44:s[d++]=($Rt(T)-1)*x,x=1;break;case 64:45===ZRt()&&(T+=rDt(KRt())),f=ZRt(),p=g=$Rt(w=T+=sDt(jRt)),b++;break;case 45:45===c&&2==$Rt(T)&&(y=0)}}return a}function hDt(t,e,r,n,i,a,o,s,l,c,h,u){for(var d,p=i-1,g=0===i?a:[""],f=zRt(g),m=0,y=0;m<n;++m)for(var v,x=0,b=FRt(t,p+1,p=MRt(d=o[m]));x<f;++x)(v=DRt(0<d?g[x]+" "+b:ORt(b,/&\f/g,g[x])))&&(l[y++]=v);return VRt(t,e,r,0===i?NRt:s,l,c,h,u)}function uDt(t,e,r,n){return VRt(t,e,r,LRt,RRt(HRt),FRt(t,2,-2),0,n)}function dDt(t,e,r,n,i){return VRt(t,e,r,IRt,FRt(t,0,n),FRt(t,n+1,-1),n,i)}function pDt(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function gDt(t,e,r,n){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case IRt:return t.return=t.return||t.value;case LRt:return"";case"@keyframes":return t.return=t.value+"{"+pDt(t.children,n)+"}";case NRt:if(!$Rt(t.value=t.props.join(",")))return""}return $Rt(r=pDt(t.children,n))?t.return=t.value+"{"+r+"}":""}Ae(VRt,"node"),Ae(function(){return HRt},"char"),Ae(XRt,"prev"),Ae(KRt,"next"),Ae(ZRt,"peek"),Ae(function(){return jRt},"caret"),Ae(QRt,"slice"),Ae(JRt,"token"),Ae(tDt,"alloc"),Ae(eDt,"dealloc"),Ae(rDt,"delimit"),Ae(nDt,"whitespace"),Ae(iDt,"escaping"),Ae(aDt,"delimiter"),Ae(oDt,"commenter"),Ae(sDt,"identifier"),Ae(lDt,"compile"),Ae(cDt,"parse"),Ae(hDt,"ruleset"),Ae(uDt,"comment"),Ae(dDt,"declaration"),Ae(pDt,"serialize"),Ae(gDt,"stringify");var fDt=rt(Rn(),1);function mDt(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function yDt(t,e,r,n){var i;void 0!==t.insert&&(r&&(t.attr("aria-describedby",i="chart-desc-"+n),t.insert("desc",":first-child").attr("id",i).text(r)),e)&&(t.attr("aria-labelledby",i="chart-title-"+n),t.insert("title",":first-child").attr("id",i).text(e))}_$(),Lpt(),Ae(mDt,"setA11yDiagramInfo"),Ae(yDt,"addSVGa11yTitleDescription"),Hr(),Mn(),Mn(),i(),Yr(),qr(),K8();var vDt=class iFt{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{Ae(this,"Diagram")}static async fromText(t,e={}){var r=Rr(),n=Qt(t,r);t=W8(t)+`
|
|
|
`;try{Ec(n)}catch{if(!(i=ee(n)))throw new Kt(`Diagram ${n} not found.`);var{id:i,diagram:a}=await i();Tc(i,a)}var{db:i,parser:a,renderer:o,init:s}=Ec(n);return a.parser&&(a.parser.yy=i),i.clear?.(),s?.(r),e.title&&i.setDiagramTitle?.(e.title),await a.parse(t),new iFt(n,t,i,a,o)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},xDt=(tc(),[]),bDt=Ae(()=>{xDt.forEach(t=>{t()}),xDt=[]},"attachFunctions"),wDt=(e(),Ae(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function kDt(t){return"u"<typeof t||null===t}function TDt(t){return"object"==typeof t&&null!==t}function EDt(t){return Array.isArray(t)?t:kDt(t)?[]:[t]}function _Dt(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;r<n;r+=1)t[i=a[r]]=e[i];return t}function CDt(t,e){for(var r="",n=0;n<e;n+=1)r+=t;return r}function SDt(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}Ur(),Ae(kDt,"isNothing"),Ae(TDt,"isObject"),Ae(EDt,"toArray"),Ae(_Dt,"extend"),Ae(CDt,"repeat"),Ae(SDt,"isNegativeZero");var ADt={isNothing:kDt,isObject:TDt,toArray:EDt,repeat:CDt,isNegativeZero:SDt,extend:_Dt};function LDt(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
|
|
|
|
`+t.mark.snippet),n+" "+r):n}function NDt(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=LDt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Ae(LDt,"formatError"),Ae(NDt,"YAMLException$1"),((NDt.prototype=Object.create(Error.prototype)).constructor=NDt).prototype.toString=Ae(function(t){return this.name+": "+LDt(this,t)},"toString");var IDt=NDt;function MDt(t,e,r,n,i){var a="",o="";return(i=Math.floor(i/2)-1)<n-e&&(e=n-i+(a=" ... ").length),i<r-n&&(r=n+i-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:n-e+a.length}}function RDt(t,e){return ADt.repeat(" ",e-t.length)+t}function DDt(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);for(var s,l="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,h=e.maxLength-(e.indent+c+3),u=1;u<=e.linesBefore&&!(o-u<0);u++)s=MDt(t.buffer,i[o-u],a[o-u],t.position-(i[o]-i[o-u]),h),l=ADt.repeat(" ",e.indent)+RDt((t.line-u+1).toString(),c)+" | "+s.str+`
|
|
|
`+l;for(s=MDt(t.buffer,i[o],a[o],t.position,h),l=(l+=ADt.repeat(" ",e.indent)+RDt((t.line+1).toString(),c)+" | "+s.str+`
|
|
|
`)+ADt.repeat("-",e.indent+c+3+s.pos)+`^
|
|
|
`,u=1;u<=e.linesAfter&&!(a.length<=o+u);u++)s=MDt(t.buffer,i[o+u],a[o+u],t.position-(i[o]-i[o+u]),h),l+=ADt.repeat(" ",e.indent)+RDt((t.line+u+1).toString(),c)+" | "+s.str+`
|
|
|
`;return l.replace(/\n$/,"")}Ae(MDt,"getLine"),Ae(RDt,"padStart"),Ae(DDt,"makeSnippet");var ODt=DDt,PDt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],BDt=["scalar","sequence","mapping"];function FDt(t){var r={};return null!==t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){r[String(t)]=e})}),r}function $Dt(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===PDt.indexOf(t))throw new IDt('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(t){return t},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=FDt(t.styleAliases||null),-1===BDt.indexOf(this.kind))throw new IDt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Ae(FDt,"compileStyleAliases"),Ae($Dt,"Type$1");var zDt=$Dt;function GDt(t,e){var i=[];return t[e].forEach(function(r){var n=i.length;i.forEach(function(t,e){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(n=e)}),i[n]=r}),i}function UDt(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(Ae(n,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}function qDt(t){return this.extend(t)}function YDt(t){var e;return null===t||1===(e=t.length)&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function jDt(){return null}function HDt(t){return null===t}function WDt(t){var e;return null!==t&&(4===(e=t.length)&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t))}function VDt(t){return"true"===t||"True"===t||"TRUE"===t}function XDt(t){return"[object Boolean]"===Object.prototype.toString.call(t)}Ae(GDt,"compileList"),Ae(UDt,"compileMap"),Ae(qDt,"Schema$1"),qDt.prototype.extend=Ae(function(t){var e=[],r=[];if(t instanceof zDt)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new IDt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof zDt))throw new IDt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new IDt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new IDt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof zDt))throw new IDt("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(qDt.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=GDt(t,"implicit"),t.compiledExplicit=GDt(t,"explicit"),t.compiledTypeMap=UDt(t.compiledImplicit,t.compiledExplicit),t},"extend"),J=new qDt({explicit:[new zDt("tag:yaml.org,2002:str",{kind:"scalar",construct:Ae(function(t){return null!==t?t:""},"construct")}),new zDt("tag:yaml.org,2002:seq",{kind:"sequence",construct:Ae(function(t){return null!==t?t:[]},"construct")}),new zDt("tag:yaml.org,2002:map",{kind:"mapping",construct:Ae(function(t){return null!==t?t:{}},"construct")})]}),Ae(YDt,"resolveYamlNull"),Ae(jDt,"constructYamlNull"),Ae(HDt,"isNull"),t=new zDt("tag:yaml.org,2002:null",{kind:"scalar",resolve:YDt,construct:jDt,predicate:HDt,represent:{canonical:Ae(function(){return"~"},"canonical"),lowercase:Ae(function(){return"null"},"lowercase"),uppercase:Ae(function(){return"NULL"},"uppercase"),camelcase:Ae(function(){return"Null"},"camelcase"),empty:Ae(function(){return""},"empty")},defaultStyle:"lowercase"}),Ae(WDt,"resolveYamlBoolean"),Ae(VDt,"constructYamlBoolean"),Ae(XDt,"isBoolean");var KDt=new zDt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:WDt,construct:VDt,predicate:XDt,represent:{lowercase:Ae(function(t){return t?"true":"false"},"lowercase"),uppercase:Ae(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:Ae(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ZDt(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function QDt(t){return 48<=t&&t<=55}function JDt(t){return 48<=t&&t<=57}function tOt(t){if(null===t)return!1;var e,r=t.length,n=0,i=!1;if(!r)return!1;if("0"===(e="-"!==(e=t[n])&&"+"!==e?e:t[++n])){if(n+1===r)return!0;if("b"===(e=t[++n])){for(n++;n<r;n++)if("_"!==(e=t[n])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!ZDt(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!QDt(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;n<r;n++)if("_"!==(e=t[n])){if(!JDt(t.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===e)}function eOt(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 rOt(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!ADt.isNegativeZero(t)}Ae(ZDt,"isHexCode"),Ae(QDt,"isOctCode"),Ae(JDt,"isDecCode"),Ae(tOt,"resolveYamlInteger"),Ae(eOt,"constructYamlInteger"),Ae(rOt,"isInteger");var nOt=new zDt("tag:yaml.org,2002:int",{kind:"scalar",resolve:tOt,construct:eOt,predicate:rOt,represent:{binary:Ae(function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:Ae(function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:Ae(function(t){return t.toString(10)},"decimal"),hexadecimal:Ae(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"]}}),iOt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function aOt(t){return!(null===t||!iOt.test(t)||"_"===t[t.length-1])}function oOt(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)}Ae(aOt,"resolveYamlFloat"),Ae(oOt,"constructYamlFloat");var sOt=/^[-+]?[0-9]+e/;function lOt(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(ADt.isNegativeZero(t))return"-0.0";return e=t.toString(10),sOt.test(e)?e.replace("e",".e"):e}function cOt(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ADt.isNegativeZero(t))}Ae(lOt,"representYamlFloat"),Ae(cOt,"isFloat");var hOt=new zDt("tag:yaml.org,2002:float",{kind:"scalar",resolve:aOt,construct:oOt,predicate:cOt,represent:lOt,defaultStyle:"lowercase"}),t=J=J.extend({implicit:[t,KDt,nOt,hOt]}),uOt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dOt=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]))?))?$");function pOt(t){return null!==t&&(null!==uOt.exec(t)||null!==dOt.exec(t))}function gOt(t){var e,r,n,i,a,o=0,s=null,l=uOt.exec(t);if(null===(l=null===l?dOt.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(n=+l[4],i=+l[5],a=+l[6],l[7]){for(o=l[7].slice(0,3);o.length<3;)o+="0";o=+o}return l[9]&&(s=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9])&&(s=-s),l=new Date(Date.UTC(t,e,r,n,i,a,o)),s&&l.setTime(l.getTime()-s),l}function fOt(t){return t.toISOString()}function mOt(t){return"<<"===t||null===t}Ae(pOt,"resolveYamlTimestamp"),Ae(gOt,"constructYamlTimestamp"),Ae(fOt,"representYamlTimestamp"),KDt=new zDt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:pOt,construct:gOt,instanceOf:Date,represent:fOt}),Ae(mOt,"resolveYamlMerge");var nOt=new zDt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:mOt}),yOt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
|
\r`;function vOt(t){if(null===t)return!1;for(var e,r=0,n=t.length,i=yOt,a=0;a<n;a++)if(!(64<(e=i.indexOf(t.charAt(a))))){if(e<0)return!1;r+=6}return r%8==0}function xOt(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,n=yOt,i=0,a=[],o=0;o<r;o++)o%4==0&&o&&(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(o));return 0==(t=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==t?(a.push(i>>10&255),a.push(i>>2&255)):12==t&&a.push(i>>4&255),new Uint8Array(a)}function bOt(t){for(var e,r="",n=0,i=t.length,a=yOt,o=0;o<i;o++)o%3==0&&o&&(r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[o];return 0==(e=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==e?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function wOt(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Ae(vOt,"resolveYamlBinary"),Ae(xOt,"constructYamlBinary"),Ae(bOt,"representYamlBinary"),Ae(wOt,"isBinary");var hOt=new zDt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vOt,construct:xOt,predicate:wOt,represent:bOt}),kOt=Object.prototype.hasOwnProperty,TOt=Object.prototype.toString;function EOt(t){if(null!==t)for(var e,r,n,i=[],a=t,o=0,s=a.length;o<s;o+=1){if(e=a[o],n=!1,"[object Object]"!==TOt.call(e))return!1;for(r in e)if(kOt.call(e,r)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==i.indexOf(r))return!1;i.push(r)}return!0}function _Ot(t){return null!==t?t:[]}Ae(EOt,"resolveYamlOmap"),Ae(_Ot,"constructYamlOmap");var COt=new zDt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:EOt,construct:_Ot}),SOt=Object.prototype.toString;function AOt(t){if(null!==t)for(var e,r,n=t,i=new Array(n.length),a=0,o=n.length;a<o;a+=1){if(e=n[a],"[object Object]"!==SOt.call(e)||1!==(r=Object.keys(e)).length)return!1;i[a]=[r[0],e[r[0]]]}return!0}function LOt(t){if(null===t)return[];for(var e,r,n=t,i=new Array(n.length),a=0,o=n.length;a<o;a+=1)e=n[a],r=Object.keys(e),i[a]=[r[0],e[r[0]]];return i}Ae(AOt,"resolveYamlPairs"),Ae(LOt,"constructYamlPairs");var NOt=new zDt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:AOt,construct:LOt}),IOt=Object.prototype.hasOwnProperty;function MOt(t){if(null!==t){var e,r=t;for(e in r)if(IOt.call(r,e)&&null!==r[e])return!1}return!0}function ROt(t){return null!==t?t:{}}Ae(MOt,"resolveYamlSet"),Ae(ROt,"constructYamlSet");var DOt=new zDt("tag:yaml.org,2002:set",{kind:"mapping",resolve:MOt,construct:ROt}),OOt=t.extend({implicit:[KDt,nOt],explicit:[hOt,COt,NOt,DOt]}),POt=Object.prototype.hasOwnProperty,BOt=1,FOt=2,$Ot=3,zOt=4,GOt=1,UOt=2,qOt=3,YOt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jOt=/[\x85\u2028\u2029]/,HOt=/[,\[\]\{\}]/,WOt=/^(?:!|!!|![a-z\-]+!)$/i,VOt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function XOt(t){return Object.prototype.toString.call(t)}function KOt(t){return 10===t||13===t}function ZOt(t){return 9===t||32===t}function QOt(t){return 9===t||32===t||10===t||13===t}function JOt(t){return 44===t||91===t||93===t||123===t||125===t}function tPt(t){return 48<=t&&t<=57?t-48:97<=(t|=32)&&t<=102?t-97+10:-1}function ePt(t){return 120===t?2:117===t?4:85===t?8:0}function rPt(t){return 48<=t&&t<=57?t-48:-1}function nPt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?`
|
|
|
`:118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function iPt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}Ae(XOt,"_class"),Ae(KOt,"is_EOL"),Ae(ZOt,"is_WHITE_SPACE"),Ae(QOt,"is_WS_OR_EOL"),Ae(JOt,"is_FLOW_INDICATOR"),Ae(tPt,"fromHexCode"),Ae(ePt,"escapedHexLen"),Ae(rPt,"fromDecimalCode"),Ae(nPt,"simpleEscapeSequence"),Ae(iPt,"charFromCodepoint");for(var aPt=new Array(256),oPt=new Array(256),sPt=0;sPt<256;sPt++)aPt[sPt]=nPt(sPt)?1:0,oPt[sPt]=nPt(sPt);function lPt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||OOt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function cPt(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=ODt(t),new IDt(e,t)}function hPt(t,e){throw cPt(t,e)}function uPt(t,e){t.onWarning&&t.onWarning.call(null,cPt(t,e))}Ae(lPt,"State$1"),Ae(cPt,"generateError"),Ae(hPt,"throwError"),Ae(uPt,"throwWarning");var dPt={YAML:Ae(function(t,e,r){var n,i;null!==t.version&&hPt(t,"duplication of %YAML directive"),1!==r.length&&hPt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&hPt(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&hPt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&uPt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Ae(function(t,e,r){var n;2!==r.length&&hPt(t,"TAG directive accepts exactly two arguments"),n=r[0],r=r[1],WOt.test(n)||hPt(t,"ill-formed tag handle (first argument) of the TAG directive"),POt.call(t.tagMap,n)&&hPt(t,'there is a previously declared suffix for "'+n+'" tag handle'),VOt.test(r)||hPt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch{hPt(t,"tag prefix is malformed: "+r)}t.tagMap[n]=r},"handleTagDirective")};function pPt(t,e,r,n){var i,a,o,s;if(e<r){if(s=t.input.slice(e,r),n)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||hPt(t,"expected valid JSON character");else YOt.test(s)&&hPt(t,"the stream contains non-printable characters");t.result+=s}}function gPt(t,e,r,n){var i,a,o,s;for(ADt.isObject(r)||hPt(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(r)).length;o<s;o+=1)a=i[o],POt.call(e,a)||(e[a]=r[a],n[a]=!0)}function fPt(t,e,r,n,i,a,o,s,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&hPt(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===XOt(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===XOt(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)gPt(t,e,a[c],r);else gPt(t,e,a,r);else t.json||POt.call(r,i)||!POt.call(e,i)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,hPt(t,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e}function mPt(t){var e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):hPt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function yPt(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);0!==i;){for(;ZOt(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)for(;10!==(i=t.input.charCodeAt(++t.position))&&13!==i&&0!==i;);if(!KOt(i))break;for(mPt(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==r&&0!==n&&t.lineIndent<r&&uPt(t,"deficient indentation"),n}function vPt(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))&&!QOt(r))}function xPt(t,e){1===e?t.result+=" ":1<e&&(t.result+=ADt.repeat(`
|
|
|
`,e-1))}function bPt(t,e,r){var n,i,a,o,s,l,c,h=t.kind,u=t.result,d=t.input.charCodeAt(t.position);if(QOt(d)||JOt(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(QOt(n=t.input.charCodeAt(t.position+1))||r&&JOt(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==d;){if(58===d){if(QOt(n=t.input.charCodeAt(t.position+1))||r&&JOt(n))break}else if(35===d){if(QOt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&vPt(t)||r&&JOt(d))break;if(KOt(d)){if(s=t.line,l=t.lineStart,c=t.lineIndent,yPt(t,!1,-1),t.lineIndent>=e){o=!0,d=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(pPt(t,i,a,!1),xPt(t,t.line-s),i=a=t.position,o=!1),ZOt(d)||(a=t.position+1),d=t.input.charCodeAt(++t.position)}return pPt(t,i,a,!1),!!t.result||(t.kind=h,t.result=u,!1)}function wPt(t,e){var r,n,i=t.input.charCodeAt(t.position);if(39!==i)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(i=t.input.charCodeAt(t.position));)if(39===i){if(pPt(t,r,t.position,!0),39!==(i=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,n=t.position}else KOt(i)?(pPt(t,r,n,!0),xPt(t,yPt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&vPt(t)?hPt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);hPt(t,"unexpected end of the stream within a single quoted scalar")}function kPt(t,e){var r,n,i,a,o,s=t.input.charCodeAt(t.position);if(34!==s)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return pPt(t,r,t.position,!0),t.position++,!0;if(92===s){if(pPt(t,r,t.position,!0),KOt(s=t.input.charCodeAt(++t.position)))yPt(t,!1,e);else if(s<256&&aPt[s])t.result+=oPt[s],t.position++;else if(0<(o=ePt(s))){for(i=o,a=0;0<i;i--)0<=(o=tPt(s=t.input.charCodeAt(++t.position)))?a=(a<<4)+o:hPt(t,"expected hexadecimal character");t.result+=iPt(a),t.position++}else hPt(t,"unknown escape sequence");r=n=t.position}else KOt(s)?(pPt(t,r,n,!0),xPt(t,yPt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&vPt(t)?hPt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}hPt(t,"unexpected end of the stream within a double quoted scalar")}function TPt(t,e){var r,n,i,a,o,s,l,c,h,u,d,p=!0,g=t.tag,f=t.anchor,m=Object.create(null),y=t.input.charCodeAt(t.position);if(91===y)c=!(o=93),a=[];else{if(123!==y)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);0!==y;){if(yPt(t,!0,e),(y=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=f,t.kind=c?"mapping":"sequence",t.result=a,!0;p?44===y&&hPt(t,"expected the node content, but found ','"):hPt(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===y&&QOt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,yPt(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,NPt(t,e,BOt,!1,!0),u=t.tag,h=t.result,yPt(t,!0,e),y=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==y||(s=!0,y=t.input.charCodeAt(++t.position),yPt(t,!0,e),NPt(t,e,BOt,!1,!0),d=t.result),c?fPt(t,a,m,u,h,d,r,n,i):s?a.push(fPt(t,null,m,u,h,d,r,n,i)):a.push(h),yPt(t,!0,e),44===(y=t.input.charCodeAt(t.position))?(p=!0,y=t.input.charCodeAt(++t.position)):p=!1}hPt(t,"unexpected end of the stream within a flow collection")}function EPt(t,e){var r,n,i,a=GOt,o=!1,s=!1,l=e,c=0,h=!1,u=t.input.charCodeAt(t.position);if(124===u)n=!1;else{if(62!==u)return!1;n=!0}for(t.kind="scalar",t.result="";0!==u;)if(43===(u=t.input.charCodeAt(++t.position))||45===u)GOt===a?a=43===u?qOt:UOt:hPt(t,"repeat of a chomping mode identifier");else{if(!(0<=(i=rPt(u))))break;0===i?hPt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?hPt(t,"repeat of an indentation width identifier"):(l=e+i-1,s=!0)}if(ZOt(u)){for(;ZOt(u=t.input.charCodeAt(++t.position)););if(35===u)for(;!KOt(u=t.input.charCodeAt(++t.position))&&0!==u;);}for(;0!==u;){for(mPt(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!s||t.lineIndent<l)&&32===u;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>l&&(l=t.lineIndent),KOt(u))c++;else{if(t.lineIndent<l){a===qOt?t.result+=ADt.repeat(`
|
|
|
`,o?1+c:c):a===GOt&&o&&(t.result+=`
|
|
|
`);break}for(n?ZOt(u)?(h=!0,t.result+=ADt.repeat(`
|
|
|
`,o?1+c:c)):h?(h=!1,t.result+=ADt.repeat(`
|
|
|
`,c+1)):0===c?o&&(t.result+=" "):t.result+=ADt.repeat(`
|
|
|
`,c):t.result+=ADt.repeat(`
|
|
|
`,o?1+c:c),s=o=!0,c=0,r=t.position;!KOt(u)&&0!==u;)u=t.input.charCodeAt(++t.position);pPt(t,r,t.position,!1)}}return!0}function _Pt(t,e){var r,n,i=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,hPt(t,"tab characters must not be used in indentation")),45===n)&&QOt(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,yPt(t,!0,-1)&&t.lineIndent<=e)o.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,NPt(t,e,$Ot,!1,!0),o.push(t.result),yPt(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)hPt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=o,!0)}function CPt(t,e,r){var n,i,a,o,s,l,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,hPt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!QOt(n)){if(o=t.line,s=t.lineStart,l=t.position,!NPt(t,r,FOt,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);ZOt(c);)c=t.input.charCodeAt(++t.position);if(58===c)QOt(c=t.input.charCodeAt(++t.position))||hPt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(fPt(t,d,p,g,f,null,o,s,l),g=f=m=null),i=y=!(v=!0),g=t.tag,f=t.result;else{if(!v)return t.tag=h,t.anchor=u,!0;hPt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=h,t.anchor=u,!0;hPt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(fPt(t,d,p,g,f,null,o,s,l),g=f=m=null),i=y=v=!0):y?i=!(y=!1):hPt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=n;if((t.line===a||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,l=t.position),NPt(t,e,zOt,!0,i)&&(y?f=t.result:m=t.result),y||(fPt(t,d,p,g,f,m,o,s,l),g=f=m=null),yPt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)hPt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&fPt(t,d,p,g,f,null,o,s,l),v&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),v}function SPt(t){var e,r,n,i=!1,a=!1,o=t.input.charCodeAt(t.position);if(33!==o)return!1;if(null!==t.tag&&hPt(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(i=!0,o=t.input.charCodeAt(++t.position)):33===o?(a=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,i){for(;0!==(o=t.input.charCodeAt(++t.position))&&62!==o;);t.position<t.length?(n=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):hPt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!QOt(o);)33===o&&(a?hPt(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),WOt.test(r)||hPt(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),HOt.test(n)&&hPt(t,"tag suffix cannot contain flow indicator characters")}n&&!VOt.test(n)&&hPt(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{hPt(t,"tag name is malformed: "+n)}return i?t.tag=n:POt.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:hPt(t,'undeclared tag handle "'+r+'"'),!0}function APt(t){var e,r=t.input.charCodeAt(t.position);if(38!==r)return!1;for(null!==t.anchor&&hPt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!QOt(r)&&!JOt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&hPt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function LPt(t){var e,r=t.input.charCodeAt(t.position);if(42!==r)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!QOt(r)&&!JOt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&hPt(t,"name of an alias node must contain at least one character"),e=t.input.slice(e,t.position),POt.call(t.anchorMap,e)||hPt(t,'unidentified alias "'+e+'"'),t.result=t.anchorMap[e],yPt(t,!0,-1),!0}function NPt(t,e,r,n,i){var a,o,s,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=o=s=zOt===r||$Ot===r,n&&yPt(t,!0,-1)&&(p=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;SPt(t)||APt(t);)yPt(t,!0,-1)?(p=!0,s=a,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):s=!1;if(s=s&&(p||i),1!==d&&zOt!==r||(n=BOt===r||FOt===r?e:e+1,i=t.position-t.lineStart,1===d?s&&(_Pt(t,i)||CPt(t,i,n))||TPt(t,n)?g=!0:(o&&EPt(t,n)||wPt(t,n)||kPt(t,n)?g=!0:LPt(t)?(g=!0,null===t.tag&&null===t.anchor||hPt(t,"alias node should not have any properties")):bPt(t,n,BOt===r)&&(g=!0,null===t.tag)&&(t.tag="?"),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===d&&(g=s&&_Pt(t,i))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&hPt(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(POt.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||hPt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&hPt(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)):hPt(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 IPt(t){var e,r,n,i,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(yPt(t,!0,-1),i=t.input.charCodeAt(t.position),!(0<t.lineIndent||37!==i));){for(o=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!QOt(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&hPt(t,"directive name must not be less than one character in length");0!==i;){for(;ZOt(i);)i=t.input.charCodeAt(++t.position);if(35===i){for(;0!==(i=t.input.charCodeAt(++t.position))&&!KOt(i););break}if(KOt(i))break;for(e=t.position;0!==i&&!QOt(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&mPt(t),POt.call(dPt,r)?dPt[r](t,r,n):uPt(t,'unknown document directive "'+r+'"')}yPt(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,yPt(t,!0,-1)):o&&hPt(t,"directives end mark is expected"),NPt(t,t.lineIndent-1,zOt,!1,!0),yPt(t,!0,-1),t.checkLineBreaks&&jOt.test(t.input.slice(a,t.position))&&uPt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&vPt(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,yPt(t,!0,-1)):t.position<t.length-1&&hPt(t,"end of the stream or a document separator is expected")}function MPt(t,e){e=e||{};var r=new lPt(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,hPt(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)IPt(r);return r.documents}function RPt(t,e,r){null!==e&&"object"==typeof e&&"u"<typeof r&&(r=e,e=null);var n=MPt(t,r);if("function"!=typeof e)return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}function DPt(t,e){if(0!==(t=MPt(t,e)).length){if(1===t.length)return t[0];throw new IDt("expected a single document in the stream, but found more")}}Ae(pPt,"captureSegment"),Ae(gPt,"mergeMappings"),Ae(fPt,"storeMappingPair"),Ae(mPt,"readLineBreak"),Ae(yPt,"skipSeparationSpace"),Ae(vPt,"testDocumentSeparator"),Ae(xPt,"writeFoldedLines"),Ae(bPt,"readPlainScalar"),Ae(wPt,"readSingleQuotedScalar"),Ae(kPt,"readDoubleQuotedScalar"),Ae(TPt,"readFlowCollection"),Ae(EPt,"readBlockScalar"),Ae(_Pt,"readBlockSequence"),Ae(CPt,"readBlockMapping"),Ae(SPt,"readTagProperty"),Ae(APt,"readAnchorProperty"),Ae(LPt,"readAlias"),Ae(NPt,"composeNode"),Ae(IPt,"readDocument"),Ae(MPt,"loadDocuments"),Ae(RPt,"loadAll$1"),Ae(DPt,"load$1");var t={loadAll:RPt,load:DPt},OPt=Object.prototype.toString,PPt=Object.prototype.hasOwnProperty,BPt=65279,FPt=10,$Pt={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},zPt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],GPt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function UPt(t,e){var r,n,i,a,o,s,l;if(null===e)return{};for(r={},i=0,a=(n=Object.keys(e)).length;i<a;i+=1)o=n[i],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&PPt.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function qPt(t){var e,r,n=t.toString(16).toUpperCase();if(t<=255)e="x",r=2;else if(t<=65535)e="u",r=4;else{if(!(t<=4294967295))throw new IDt("code point within a string may not be greater than 0xFFFFFFFF");e="U",r=8}return"\\"+e+ADt.repeat("0",r-n.length)+n}Ae(UPt,"compileStyleMap"),Ae(qPt,"encodeHex");var YPt=2;function jPt(t){this.schema=t.schema||OOt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ADt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=UPt(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?YPt:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function HPt(t,e){for(var r,n,i=ADt.repeat(" ",e),a=0,o="",s=t.length;a<s;)a=-1===(r=t.indexOf(`
|
|
|
`,a))?(n=t.slice(a),s):(n=t.slice(a,r+1),r+1),n.length&&n!==`
|
|
|
`&&(o+=i),o+=n;return o}function WPt(t,e){return`
|
|
|
`+ADt.repeat(" ",t.indent*e)}function VPt(t,e){for(var r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function XPt(t){return 32===t||9===t}function KPt(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==BPt||65536<=t&&t<=1114111}function ZPt(t){return KPt(t)&&t!==BPt&&13!==t&&t!==FPt}function QPt(t,e,r){var n=ZPt(t),i=n&&!XPt(t);return(r?n:n&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||ZPt(e)&&!XPt(e)&&35===t||58===e&&i}function JPt(t){return KPt(t)&&t!==BPt&&!XPt(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function tBt(t){return!XPt(t)&&58!==t}function eBt(t,e){var r=t.charCodeAt(e);return 55296<=r&&r<=56319&&e+1<t.length&&56320<=(t=t.charCodeAt(e+1))&&t<=57343?1024*(r-55296)+t-56320+65536:r}function rBt(t){return/^\n* /.test(t)}Ae(jPt,"State"),Ae(HPt,"indentString"),Ae(WPt,"generateNextLine"),Ae(VPt,"testImplicitResolving"),Ae(XPt,"isWhitespace"),Ae(KPt,"isPrintable"),Ae(ZPt,"isNsCharOrWhitespace"),Ae(QPt,"isPlainSafe"),Ae(JPt,"isPlainSafeFirst"),Ae(tBt,"isPlainSafeLast"),Ae(eBt,"codePointAt"),Ae(rBt,"needIndentIndicator");var nBt=1,iBt=2,aBt=3,oBt=4,sBt=5;function lBt(t,e,r,n,i,a,o,s){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,g=-1,f=JPt(eBt(t,0))&&tBt(eBt(t,t.length-1));if(e||o)for(l=0;l<t.length;65536<=c?l+=2:l++){if(!KPt(c=eBt(t,l)))return sBt;f=f&&QPt(c,h,s),h=c}else{for(l=0;l<t.length;65536<=c?l+=2:l++){if((c=eBt(t,l))===FPt)u=!0,p&&(d=d||n<l-g-1&&" "!==t[g+1],g=l);else if(!KPt(c))return sBt;f=f&&QPt(c,h,s),h=c}d=d||p&&n<l-g-1&&" "!==t[g+1]}return u||d?9<r&&rBt(t)?sBt:o?a===YPt?sBt:iBt:d?oBt:aBt:!f||o||i(t)?a===YPt?sBt:iBt:nBt}function cBt(i,a,o,s,l){i.dump=function(){if(0===a.length)return i.quotingType===YPt?'""':"''";if(!i.noCompatMode&&(-1!==zPt.indexOf(a)||GPt.test(a)))return i.quotingType===YPt?'"'+a+'"':"'"+a+"'";var t=i.indent*Math.max(1,o),e=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-t),r=s||-1<i.flowLevel&&o>=i.flowLevel;function n(t){return VPt(i,t)}switch(Ae(n,"testAmbiguity"),lBt(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!s,l)){case nBt:return a;case iBt:return"'"+a.replace(/'/g,"''")+"'";case aBt:return"|"+hBt(a,i.indent)+uBt(HPt(a,t));case oBt:return">"+hBt(a,i.indent)+uBt(HPt(dBt(a,e),t));case sBt:return'"'+gBt(a)+'"';default:throw new IDt("impossible error: invalid scalar style")}}()}function hBt(t,e){var e=rBt(t)?String(e):"",r=t[t.length-1]===`
|
|
|
`;return e+(!r||t[t.length-2]!==`
|
|
|
`&&t!==`
|
|
|
`?r?"":"-":"+")+`
|
|
|
`}function uBt(t){return t[t.length-1]===`
|
|
|
`?t.slice(0,-1):t}function dBt(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(`
|
|
|
`))?r:t.length,n.lastIndex=r,pBt(t.slice(0,r),e)),a=t[0]===`
|
|
|
`||" "===t[0];s=n.exec(t);){var o=s[1],s=s[2],l=" "===s[0];i+=o+(a||l||""===s?"":`
|
|
|
`)+pBt(s,e),a=l}return i}function pBt(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,o=0,s="";n=i.exec(t);)e<(n=n.index)-a&&(s+=`
|
|
|
`+t.slice(a,r=a<o?o:n),a=r+1),o=n;return s+=`
|
|
|
`,t.length-a>e&&a<o?s+=t.slice(a,o)+`
|
|
|
`+t.slice(o+1):s+=t.slice(a),s.slice(1)}function gBt(t){for(var e,r,n="",i=0;i<t.length;65536<=e?i+=2:i++)e=eBt(t,i),!(r=$Pt[e])&&KPt(e)?(n+=t[i],65536<=e&&(n+=t[i+1])):n+=r||qPt(e);return n}function fBt(t,e,r){for(var n,i="",a=t.tag,o=0,s=r.length;o<s;o+=1)n=r[o],t.replacer&&(n=t.replacer.call(r,String(o),n)),(bBt(t,e,n,!1,!1)||"u"<typeof n&&bBt(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=a,t.dump="["+i+"]"}function mBt(t,e,r,n){for(var i,a="",o=t.tag,s=0,l=r.length;s<l;s+=1)i=r[s],t.replacer&&(i=t.replacer.call(r,String(s),i)),(bBt(t,e+1,i,!0,!0,!1,!0)||"u"<typeof i&&bBt(t,e+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=WPt(t,e)),t.dump&&FPt===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=o,t.dump=a||"[]"}function yBt(t,e,r){for(var n,i,a,o="",s=t.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==o&&(a+=", "),t.condenseFlow&&(a+='"'),i=r[n=l[c]],t.replacer&&(i=t.replacer.call(r,n,i)),bBt(t,e,n,!1,!1)&&(1024<t.dump.length&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bBt(t,e,i,!1,!1))&&(o+=a+=t.dump);t.tag=s,t.dump="{"+o+"}"}function vBt(t,e,r,n){var i,a,o,s,l,c="",h=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new IDt("sortKeys must be a boolean or a function");for(i=0,a=u.length;i<a;i+=1)l="",n&&""===c||(l+=WPt(t,e)),o=r[s=u[i]],t.replacer&&(o=t.replacer.call(r,s,o)),bBt(t,e+1,s,!0,!0,!0)&&((s=null!==t.tag&&"?"!==t.tag||t.dump&&1024<t.dump.length)&&(t.dump&&FPt===t.dump.charCodeAt(0)?l+="?":l+="? "),l+=t.dump,s&&(l+=WPt(t,e)),bBt(t,e+1,o,!0,s))&&(t.dump&&FPt===t.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=t.dump);t.tag=h,t.dump=c||"{}"}function xBt(t,e,r){for(var n,i,a,o=r?t.explicitTypes:t.implicitTypes,s=0,l=o.length;s<l;s+=1)if(((i=o[s]).instanceOf||i.predicate)&&(!i.instanceOf||"object"==typeof e&&e instanceof i.instanceOf)&&(!i.predicate||i.predicate(e))){if(r?i.multi&&i.representName?t.tag=i.representName(e):t.tag=i.tag:t.tag="?",i.represent){if(a=t.styleMap[i.tag]||i.defaultStyle,"[object Function]"===OPt.call(i.represent))n=i.represent(e,a);else{if(!PPt.call(i.represent,a))throw new IDt("!<"+i.tag+'> tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function bBt(t,e,r,n,i,a,o){t.tag=null,t.dump=r,xBt(t,r,!1)||xBt(t,r,!0);var s,l,c=OPt.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(s=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0<e)&&(i=!1),l&&t.usedDuplicates[s])t.dump="*ref_"+s;else{if(u&&l&&!t.usedDuplicates[s]&&(t.usedDuplicates[s]=!0),"[object Object]"===c)n&&0!==Object.keys(t.dump).length?(vBt(t,e,t.dump,i),l&&(t.dump="&ref_"+s+t.dump)):(yBt(t,e,t.dump),l&&(t.dump="&ref_"+s+" "+t.dump));else if("[object Array]"===c)n&&0!==t.dump.length?(t.noArrayIndent&&!o&&0<e?mBt(t,e-1,t.dump,i):mBt(t,e,t.dump,i),l&&(t.dump="&ref_"+s+t.dump)):(fBt(t,e,t.dump),l&&(t.dump="&ref_"+s+" "+t.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(t.skipInvalid)return!1;throw new IDt("unacceptable kind of an object to dump "+c)}"?"!==t.tag&&cBt(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(r=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),r="!"===t.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",t.dump=r+" "+t.dump)}return!0}function wBt(t,e){var r,n,i=[],a=[];for(kBt(t,i,a),r=0,n=a.length;r<n;r+=1)e.duplicates.push(i[a[r]]);e.usedDuplicates=new Array(n)}function kBt(t,e,r){var n,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)kBt(t[i],e,r);else for(i=0,a=(n=Object.keys(t)).length;i<a;i+=1)kBt(t[n[i]],e,r)}function TBt(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}Ae(lBt,"chooseScalarStyle"),Ae(cBt,"writeScalar"),Ae(hBt,"blockHeader"),Ae(uBt,"dropEndingNewline"),Ae(dBt,"foldString"),Ae(pBt,"foldLine"),Ae(gBt,"escapeString"),Ae(fBt,"writeFlowSequence"),Ae(mBt,"writeBlockSequence"),Ae(yBt,"writeFlowMapping"),Ae(vBt,"writeBlockMapping"),Ae(xBt,"detectType"),Ae(bBt,"writeNode"),Ae(wBt,"getDuplicateReferences"),Ae(kBt,"inspectNode"),Ae(function(t,e){return(e=new jPt(e=e||{})).noRefs||wBt(t,e),e.replacer&&(t=e.replacer.call({"":t},"",t)),bBt(e,0,t,!0,!0)?e.dump+`
|
|
|
`:""},"dump$1"),Ae(TBt,"renamed");var EBt=J,_Bt=t.load;function CBt(t){var e,r,n=t.match(Wt);return n?(r={},(e="object"!=typeof(e=_Bt(n[1],{schema:EBt})??{})||Array.isArray(e)?{}:e).displayMode&&(r.displayMode=e.displayMode.toString()),e.title&&(r.title=e.title.toString()),e.config&&(r.config=e.config),{text:t.slice(n[0].length),metadata:r}):{text:t,metadata:{}}}TBt("safeLoad","load"),TBt("safeLoadAll","loadAll"),TBt("safeDump","dump"),Ae(CBt,"extractFrontMatter"),K8();var SBt=Ae(t=>t.replace(/\r\n?/g,`
|
|
|
`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ABt=Ae(t=>{var{text:t,metadata:e}=CBt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),LBt=Ae(t=>{var e=H8.detectInit(t)??{},r=H8.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:S8(t),directive:e}},"processDirectives");function NBt(t){var e=SBt(t),e=ABt(e),r=LBt(e.text),n=b8(e.config,r.directive);return{code:t=wDt(r.text),title:e.title,config:n}}function IBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(NBt,"preprocessDiagram"),rc(),An(),K8(),Ae(IBt,"toBase64");var MBt=["foreignobject"],RBt=["dominant-baseline"];function DBt(t){return t=NBt(t),Pr(),Or(t.config??{}),t}async function OBt(t,e){SRt();try{var{code:r,config:n}=DBt(t);return{diagramType:(await jBt(r)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(DBt,"processAndSetConfigs"),Ae(OBt,"parse");var PBt=Ae((t,e,r=[])=>`
|
|
|
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),BBt=Ae((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=`
|
|
|
`+e.themeCSS),void 0!==e.fontFamily&&(n+=`
|
|
|
:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`
|
|
|
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{E$(e.styles)||t.forEach(t=>{n+=PBt(e.id,t,e.styles)}),E$(e.textStyles)||(n+=PBt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),FBt=Ae((t,e,r,n)=>(r=BBt(t,r),pDt(lDt(n+`{${Jl(e,r,t.themeVariables)}}`),gDt)),"createUserStyles"),$Bt=Ae((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=V8(n)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),zBt=Ae((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${IBt(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
|
|
The "iframe" tag is not supported by your browser.
|
|
|
</iframe>`,"putIntoIFrame"),GBt=Ae((t,e,r,n,i)=>{var a=t.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),t},"appendDivSvgG");function UBt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Ae(UBt,"sandboxedIframe");var qBt=Ae((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),KDt=Ae(async function(t,e,r){SRt();var n=DBt(e),i=(e=n.code,Rr());R.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,o="i"+t,s="#"+o,l="d"+t,c="#"+l,h=Ae(()=>{var t=O(d?s:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=O("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=UBt(O(r),o),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O(r),GBt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(qBt(document,t,l,o),d?(y=UBt(O("body"),o),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O("body"),GBt(u,t,l));let f,m;try{f=await vDt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await vDt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=FBt(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,bpt,f)}catch(r){throw i.suppressErrorRendering?h():fRt.draw(e,t,bpt),r}HBt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=$Bt(b,d,Dl(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=zBt(b,v)):p||(b=fDt.default.sanitize(b,{ADD_TAGS:MBt,ADD_ATTR:RBt})),bDt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function YBt(t={}){(t=ae({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Lr(t),t?.theme&&t.theme in gr?t.themeVariables=gr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=gr.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Ar(t):Ir(),k(t.logLevel),SRt()}Ae(YBt,"initialize");var jBt=Ae((t,e={})=>(t=NBt(t).code,vDt.fromText(t,e)),"getDiagramFromText");function HBt(t,e,r,n){mDt(e,t),yDt(e,r,n,e.attr("id"))}Ae(HBt,"addA11yInfo");var WBt=Object.freeze({render:KDt,parse:OBt,getDiagramFromText:jBt,initialize:YBt,getConfig:Rr,setConfig:Mr,getSiteConfig:Ir,updateSiteConfig:Nr,reset:Ae(()=>{Pr()},"reset"),globalReset:Ae(()=>{Pr(kr)},"globalReset"),defaultConfig:kr}),VBt=(k(Rr().logLevel),Pr(Rr()),nH(),K8(),Ae((t,e,r)=>{R.warn(t),x8(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),XBt=Ae(async function(e={querySelector:".mermaid"}){try{await KBt(e)}catch(t){if(x8(t)&&R.error(t.str),rFt.parseError&&rFt.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KBt=Ae(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=WBt.getConfig();R.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}R.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(R.debug("Start On Load: "+n?.startOnLoad),WBt.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,o=new H8.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s=[];for(a of Array.from(i))if(R.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+o.next(),c=a.innerHTML,h=(c=Ht(H8.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),H8.detectInit(c));h&&R.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await eFt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){VBt(t,s,rFt.parseError)}}if(0<s.length)throw s[0]},"runThrowsErrors"),ZBt=Ae(function(t){WBt.initialize(t)},"initialize"),nOt=Ae(async function(t,e,r){R.warn("mermaid.init is deprecated. Please use run instead."),t&&ZBt(t),t={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof e?t.querySelector=e:e&&(e instanceof HTMLElement?t.nodes=[e]:t.nodes=e),await XBt(t)},"init"),hOt=Ae(async(t,{lazyLoad:e=!0}={})=>{SRt(),Jt(...t),!1===e&&await ARt()},"registerExternalDiagrams"),COt=Ae(function(){rFt.startOnLoad&&WBt.getConfig().startOnLoad&&rFt.run().catch(t=>R.error("Mermaid failed to initialize",t))},"contentLoaded"),NOt=(typeof document<"u"&&window.addEventListener("load",COt,!1),Ae(function(t){rFt.parseError=t},"setParseErrorHandler")),QBt=[],JBt=!1,tFt=Ae(async()=>{if(!JBt){for(JBt=!0;0<QBt.length;){var t=QBt.shift();if(t)try{await t()}catch(t){R.error("Error executing queue",t)}}JBt=!1}},"executeQueue"),DOt=Ae(async(a,o)=>new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{WBt.parse(a,o).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),rFt.parseError?.(t),r(t),i(t)})}),"performCall");QBt.push(t),tFt().catch(i)}),"parse"),eFt=Ae((a,o,s)=>new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{WBt.render(a,o,s).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),rFt.parseError?.(t),r(t),i(t)})}),"performCall");QBt.push(t),tFt().catch(i)}),"render"),rFt={startOnLoad:!0,mermaidAPI:WBt,parse:DOt,render:eFt,init:nOt,run:XBt,registerExternalDiagrams:hOt,registerLayoutLoaders:Uj,initialize:ZBt,parseError:void 0,contentLoaded:COt,setParseErrorHandler:NOt,detectType:Qt,registerIconPacks:Bt},nFt=rFt;return J=jMt,tt(G({},"__esModule",{value:!0}),J)})();globalThis.mermaid=globalThis.__esbuild_esm_mermaid.default;
|