From 5f16885b36bccef4b7e0c24c234ba28211177cc2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:20:02 +0100 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20chore(deps):=20upgrade=20m?= =?UTF-8?q?ermaid=20to=20v11.4.0=20(#420)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: welpo --- static/js/mermaid.min.js | 587 ++++++++++++++++++++++----------------- 1 file changed, 338 insertions(+), 249 deletions(-) diff --git a/static/js/mermaid.min.js b/static/js/mermaid.min.js index ef25328fe..704de16b1 100644 --- a/static/js/mermaid.min.js +++ b/static/js/mermaid.min.js @@ -1,16 +1,16 @@ -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=(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},tt=(t,e,r)=>(J(t,e,"default"),r&&J(r,e,"default")),et=(t,e,r)=>(r=null!=t?z(V(t)):{},J(!e&&t&&t.__esModule?r:G(r,"default",{value:t,enumerable:!0}),t)),rt=(bBt=(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(){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){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=et(rt(),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,"",T("FATAL"))),e<=o.error&&(R.error=console.error?console.error.bind(console,T("ERROR"),"color: orange"):console.log.bind(console,"",T("ERROR"))),e<=o.warn&&(R.warn=console.warn?console.warn.bind(console,T("WARN"),"color: orange"):console.log.bind(console,"",T("WARN"))),e<=o.info&&(R.info=console.info?console.info.bind(console,T("INFO"),"color: lightblue"):console.log.bind(console,"",T("INFO"))),e<=o.debug&&(R.debug=console.debug?console.debug.bind(console,T("DEBUG"),"color: lightgreen"):console.log.bind(console,"",T("DEBUG"))),e<=o.trace&&(R.trace=console.debug?console.debug.bind(console,T("TRACE"),"color: lightgreen"):console.log.bind(console,"",T("TRACE")))},"setLogLevel"),T=Ae(t=>`%c${(0,a.default)().format("ss.SSS")} : ${t} : `,"format")}),nt=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})}),at=t(()=>{nt(),N=Object.freeze({width:null,height:null}),I=Object.freeze({...N,...C})}),ot=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!!t&&!(""!==t.provider&&!t.provider.match(M)||!(e&&""===t.prefix||t.prefix.match(M))||!t.name.match(M)),"validateIconName")});function st(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}var lt=t(()=>{Ae(st,"mergeIconTransformations")});function ct(t,e){var r,n=st(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 ht=t(()=>{nt(),lt(),Ae(ct,"mergeIconData")});function ut(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 dt=t(()=>{Ae(ut,"getIconsTree")});function pt(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function o(t){a=ct(n[t]||i[t],a)}return Ae(o,"parse"),o(e),r.forEach(o),ct(t,a)}function gt(t,e){var r;return t.icons[e]?pt(t,e,[]):(r=ut(t,[e])[e])?pt(t,e,r):null}var ft=t(()=>{ht(),dt(),Ae(pt,"internalGetIconData"),Ae(gt,"getIconData")});function mt(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(yt);if(null===i||!i.length)return t;let a=[],o=i.shift(),s=vt.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 yt,vt,xt=t(()=>{yt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,Ae(mt,"calculateSize")});function bt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;0<=n;){var i=t.indexOf(">",n),a=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 wt(t,e){return t?""+t+""+e:e}function kt(t,e,r){return wt((t=bt(t)).defs,e+t.content+r)}var Tt=t(()=>{Ae(bt,"splitSVGDefs"),Ae(wt,"mergeDefsAndContent"),Ae(kt,"wrapSVGContent")});function Et(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=kt(s,'',""))}),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=mt(u,l/c)):(h="auto"===i?l:i,u=null===a?mt(h,c/l):"auto"===a?c:a),{}),p=Ae((t,e)=>{_t(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 _t,Ct=t(()=>{nt(),at(),xt(),Tt(),_t=Ae(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),Ae(Et,"iconToSVG")});function St(n,i=Lt){for(var t,e=[];t=At.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+(Nt++).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 At,Lt,Nt,It=t(()=>{At=/\sid="(\S+)"/g,Lt="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Nt=0,Ae(St,"replaceIDs")});function Mt(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'"+t+""}var Rt,Dt,Ot,Pt,Bt,Ft,$t=t(()=>{Ae(Mt,"iconToHTML")}),zt=bBt((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{function r(e){function t(e){let r=0;for(let t=0;t{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""-"+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{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}),Ut=bBt((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=Gt()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),qt=t(()=>{ot(),ft(),Ct(),It(),$t(),et(Ut(),1)}),Yt=t(()=>{e(),qt(),Rt={body:'?',height:80,width:80},Dt=new Map,Ot=new Map,Pt=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)Ot.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.');Dt.set(e.name,e.icons)}}},"registerIconPacks"),Bt=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=Dt.get(e);if(!n){var i=Ot.get(e);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:e},Dt.set(e,n)}catch(t){throw R.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(i=gt(n,r.name))return i;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Ft=Ae(async(t,e)=>{let r;try{r=await Bt(t,e?.fallbackPrefix)}catch(t){R.error(t),r=Rt}return Mt(St((t=Et(r,e)).body),t.attributes)},"getIconSVG")});function jt(t){for(var e=[],r=1;r{var a,s,R,w,k,T,E,C,A,N,I,M,F,$,z=Object.create,U=Object.defineProperty,G=Object.getOwnPropertyDescriptor,W=Object.getOwnPropertyNames,V=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty,Ae=(t,e)=>U(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,J=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of W(r))Q.call(e,t)||t===n||U(e,t,{get:()=>r[t],enumerable:!(i=G(r,t))||i.enumerable});return e},tt=(t,e,r)=>(J(t,e,"default"),r&&J(r,e,"default")),et=(t,e,r)=>(r=null!=t?z(V(t)):{},J(!e&&t&&t.__esModule?r:U(r,"default",{value:t,enumerable:!0}),t)),rt=(kBt=(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",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal: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(){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(s);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){switch(t){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.s(s+1,2,"0");case"MMM":return c(p.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return d.$D;case"DD":return w.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return c(p.weekdaysMin,d.$W,o,2);case"ddd":return c(p.weekdaysShort,d.$W,o,3);case"dddd":return o[d.$W];case"H":return String(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),s=6e4*(a.utcOffset()-this.utcOffset()),o=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=(o-s)/6048e5;break;case g:n=(o-s)/864e5;break;case p:n=o/36e5;break;case d:n=o/6e4;break;case u:n=o/1e3;break;default:n=o}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()},_),T=k.prototype;function _(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[o],b.Ls=l,b.p={},b}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=r()}),e=t(()=>{a=et(rt(),1),s={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")},w=Ae(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},e<=s.fatal&&(R.fatal=console.error?console.error.bind(console,k("FATAL"),"color: orange"):console.log.bind(console,"",k("FATAL"))),e<=s.error&&(R.error=console.error?console.error.bind(console,k("ERROR"),"color: orange"):console.log.bind(console,"",k("ERROR"))),e<=s.warn&&(R.warn=console.warn?console.warn.bind(console,k("WARN"),"color: orange"):console.log.bind(console,"",k("WARN"))),e<=s.info&&(R.info=console.info?console.info.bind(console,k("INFO"),"color: lightblue"):console.log.bind(console,"",k("INFO"))),e<=s.debug&&(R.debug=console.debug?console.debug.bind(console,k("DEBUG"),"color: lightgreen"):console.log.bind(console,"",k("DEBUG"))),e<=s.trace&&(R.trace=console.debug?console.debug.bind(console,k("TRACE"),"color: lightgreen"):console.log.bind(console,"",k("TRACE")))},"setLogLevel"),k=Ae(t=>`%c${(0,a.default)().format("ss.SSS")} : ${t} : `,"format")}),nt=t(()=>{T=Object.freeze({left:0,top:0,width:16,height:16}),E=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),C=Object.freeze({...T,...E}),A=Object.freeze({...C,body:"",hidden:!1})}),at=t(()=>{nt(),N=Object.freeze({width:null,height:null}),I=Object.freeze({...N,...E})}),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!!t&&!(""!==t.provider&&!t.provider.match(M)||!(e&&""===t.prefix||t.prefix.match(M))||!t.name.match(M)),"validateIconName")});function ot(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 lt=t(()=>{Ae(ot,"mergeIconTransformations")});function ct(t,e){var r,n=ot(t,e);for(r in A)r in E?r in t&&!(r in n)&&(n[r]=E[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}var ht=t(()=>{nt(),lt(),Ae(ct,"mergeIconData")});function ut(t,e){let n=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function s(t){var e,r;return n[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=i[t]&&i[t].parent)&&s(e))&&(a[t]=[e].concat(r))),a[t])}return Ae(s,"resolve"),(e||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var dt=t(()=>{Ae(ut,"getIconsTree")});function pt(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(t){a=ct(n[t]||i[t],a)}return Ae(s,"parse"),s(e),r.forEach(s),ct(t,a)}function gt(t,e){var r;return t.icons[e]?pt(t,e,[]):(r=ut(t,[e])[e])?pt(t,e,r):null}var ft=t(()=>{ht(),dt(),Ae(pt,"internalGetIconData"),Ae(gt,"getIconData")});function mt(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(yt);if(null===i||!i.length)return t;let a=[],s=i.shift(),o=vt.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*e*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var yt,vt,xt=t(()=>{yt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,Ae(mt,"calculateSize")});function bt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;0<=n;){var i=t.indexOf(">",n),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function wt(t,e){return t?""+t+""+e:e}function kt(t,e,r){return wt((t=bt(t)).defs,e+t.content+r)}var Tt=t(()=>{Ae(bt,"splitSVGDefs"),Ae(wt,"mergeDefsAndContent"),Ae(kt,"wrapSVGContent")});function _t(t,e){let r={...C,...t},n={...I,...e},s={left:r.left,top:r.top,width:r.width,height:r.height},o=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("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):n&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.push("scale(1 -1)"),s.top=s.left=0);let a;switch(i<0&&(i-=4*Math.floor(i/4)),i%=4){case 1:a=s.height/2+s.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}i%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),e.length&&(o=kt(o,'',""))}),n.width),a=n.height,l=s.width,c=s.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=mt(u,l/c)):(h="auto"===i?l:i,u=null===a?mt(h,c/l):"auto"===a?c:a),{}),p=Ae((t,e)=>{Et(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[s.left,s.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:o}}var Et,Ct=t(()=>{nt(),at(),xt(),Tt(),Et=Ae(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),Ae(_t,"iconToSVG")});function St(n,i=Lt){for(var t,e=[];t=At.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+(Nt++).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 At,Lt,Nt,It=t(()=>{At=/\sid="(\S+)"/g,Lt="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Nt=0,Ae(St,"replaceIDs")});function Mt(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'"+t+""}var Rt,Dt,Ot,Pt,Bt,Ft,$t=t(()=>{Ae(Mt,"iconToHTML")}),zt=kBt((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{function r(e){function t(e){let r=0;for(let t=0;t{var r;return"%%"===t?"%":(i++,"function"==typeof(e=o.formatters[e])&&(r=a[i],t=e.call(n,r),a.splice(i,1),i--),t)}),o.formatArgs.call(n,a),(n.log||o.log).apply(n,a)}}return Ae(s,"debug"),s.namespace=t,s.useColors=o.useColors(),s.color=o.selectColor(t),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:Ae(()=>null!==e?e:(n!==o.namespaces&&(n=o.namespaces,i=o.enabled(t)),i),"get"),set:Ae(t=>{e=t},"set")}),"function"==typeof o.init&&o.init(s),s}function a(t,e){return(e=o(this.namespace+("u""-"+t)].join(",");return o.enable(""),t}function i(t){if("*"===t[t.length-1])return!0;let e,r;for(e=0,r=o.skips.length;e{o[t]=e[t]}),o.names=[],o.skips=[],o.formatters={},Ae(t,"selectColor"),o.selectColor=t,Ae(o,"createDebug"),Ae(a,"extend"),Ae(r,"enable"),Ae(n,"disable"),Ae(i,"enabled"),Ae(s,"toNamespace"),Ae(l,"coerce"),Ae(c,"destroy"),o.enable(o.load()),o}Ae(r,"setup"),e.exports=r}),Gt=kBt((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 s(){try{return localStorage}catch{}}e.formatArgs=n,e.save=i,e.load=a,e.useColors=t,e.storage=s(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],Ae(t,"useColors"),Ae(n,"formatArgs"),e.log=console.debug||console.log||(()=>{}),Ae(i,"save"),Ae(a,"load"),Ae(s,"localstorage"),r.exports=Ut()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),qt=t(()=>{st(),ft(),Ct(),It(),$t(),et(Gt(),1)}),jt=t(()=>{e(),qt(),Rt={body:'?',height:80,width:80},Dt=new Map,Ot=new Map,Pt=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)Ot.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.');Dt.set(e.name,e.icons)}}},"registerIconPacks"),Bt=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=Dt.get(e);if(!n){var i=Ot.get(e);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:e},Dt.set(e,n)}catch(t){throw R.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(i=gt(n,r.name))return i;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Ft=Ae(async(t,e)=>{let r;try{r=await Bt(t,e?.fallbackPrefix)}catch(t){R.error(t),r=Rt}return Mt(St((t=_t(r,e)).body),t.attributes)},"getIconSVG")});function Yt(t){for(var e=[],r=1;r{Ae(jt,"dedent")}),Gr=t(()=>{Ht=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Wt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vt=/\s*%%.*\n/gm}),Ur=t(()=>{Xt=class extends Error{static{Ae(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),qr=t(()=>{e(),Gr(),Ur(),Kt={},Zt=Ae(function(t,e){t=t.replace(Ht,"").replace(Wt,"").replace(Vt,` -`);for(var[r,{detector:n}]of Object.entries(Kt))if(n(t,e))return r;throw new Xt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Qt=Ae((...t)=>{for(var{id:e,detector:r,loader:n}of t)Jt(e,r,n)},"registerLazyLoadedDiagrams"),Jt=Ae((t,e,r)=>{Kt[t]&&R.warn(`Detector with key ${t} already exists. Overwriting.`),Kt[t]={detector:e,loader:r},R.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),te=Ae(t=>Kt[t].loader,"getDiagramLoader")}),Yr=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"{Ae(Yt,"dedent")}),Ur=t(()=>{Ht=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Wt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vt=/\s*%%.*\n/gm}),Gr=t(()=>{Xt=class extends Error{static{Ae(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),qr=t(()=>{e(),Ur(),Gr(),Kt={},Zt=Ae(function(t,e){t=t.replace(Ht,"").replace(Wt,"").replace(Vt,` +`);for(var[r,{detector:n}]of Object.entries(Kt))if(n(t,e))return r;throw new Xt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Qt=Ae((...t)=>{for(var{id:e,detector:r,loader:n}of t)Jt(e,r,n)},"registerLazyLoadedDiagrams"),Jt=Ae((t,e,r)=>{Kt[t]&&R.warn(`Detector with key ${t} already exists. Overwriting.`),Kt[t]={detector:e,loader:r},R.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),te=Ae(t=>Kt[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],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],_=[1,42],E=[1,43],C=[1,44],S=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],U=[1,51],G=[1,52],q=[1,53],j=[1,54],Y=[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,s){var o=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[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:C,60:S,61:A,62:L,63:N,64:I,65:U,66:G,67:q,68:j,69:Y,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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{ne=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=>ne(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]=ne(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),ie=ne}),Hr=t(()=>{ae={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(r<0&&(r+=1),1{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*ae.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*ae.hue2rgb(a,i,t);case"b":return 255*ae.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{se={clamp:Ae((t,e,r)=>rMath.round(1e10*t)/1e10,"round")},le=se}),Vr=t(()=>{ce={dec2hex:Ae(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},he=ce}),Xr=t(()=>{Hr(),Wr(),Vr(),ue={channel:oe,lang:le,unit:he}}),Kr=t(()=>{Xr(),de={};for(let t=0;t<=255;t++)de[t]=ue.unit.dec2hex(t);pe={ALL:0,RGB:1,HSL:2}}),Zr=t(()=>{Kr(),ge=class{static{Ae(this,"Type")}constructor(){this.type=pe.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=pe.ALL}is(t){return this.type===t}},fe=ge}),Qr=t(()=>{Xr(),Zr(),Kr(),ye=class{static{Ae(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new fe}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=pe.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=ue.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=ue.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=ue.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=ue.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=ue.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=ue.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(pe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(pe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(pe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(pe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(pe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(pe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},ve=ye}),Jr=t(()=>{Qr(),xe=new ve({r:0,g:0,b:0,a:0},"transparent"),be=xe}),tn=t(()=>{Jr(),Kr(),we={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(we.re);if(o)return o=o[1],e=parseInt(o,16),o=o.length,be.set({r:(e>>(n=(r=4>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?"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]+de[Math.round(255*n)]:"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]},"stringify")},ke=we}),en=t(()=>{Xr(),Jr(),Te={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:Ae(t=>{if(r=t.match(Te.hueRe)){var[,e,r]=r;switch(r){case"grad":return ue.channel.clamp.h(.9*parseFloat(e));case"rad":return ue.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return ue.channel.clamp.h(360*parseFloat(e))}}return ue.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(Te.re)))return[,a,e,r,n,i]=a,be.set({h:Te._hue2deg(a),s:ue.channel.clamp.s(parseFloat(e)),l:ue.channel.clamp.l(parseFloat(r)),a:n?ue.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(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%, ${n})`:`hsl(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%)`},"stringify")},Ee=Te}),rn=t(()=>{tn(),_e={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=_e.colors[t])return ke.parse(t)},"parse"),stringify:Ae(t=>{var e,r=ke.stringify(t);for(e in _e.colors)if(_e.colors[e]===r)return e},"stringify")},Ce=_e}),nn=t(()=>{Xr(),Jr(),Se={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:Ae(t=>{var e,r,n,i,a,o,s,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Se.re)))return[,l,e,r,n,i,a,o,s]=l,be.set({r:ue.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:ue.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:ue.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:o?ue.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(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)}, ${ue.lang.round(n)})`:`rgb(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)})`},"stringify")},Le=Se}),an=t(()=>{tn(),en(),rn(),nn(),Kr(),Ne={format:{keyword:Ce,hex:ke,rgb:Le,rgba:Le,hsl:Ee,hsla:Ee},parse:Ae(t=>{if("string"!=typeof t)return t;var e=ke.parse(t)||Le.parse(t)||Ee.parse(t)||Ce.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(pe.HSL)||void 0===t.data.r?Ee:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Le:ke).stringify(t),"stringify")},Ie=Ne}),on=t(()=>{Xr(),an(),Me=Ae((t,e)=>{var r,n=Ie.parse(t);for(r in e)n[r]=ue.channel.clamp[r](e[r]);return Ie.stringify(n)},"change"),Re=Me}),sn=t(()=>{Xr(),Jr(),an(),on(),De=Ae((t,e,r=0,n=1)=>"number"!=typeof t?Re(t,{a:e}):(t=be.set({r:ue.channel.clamp.r(t),g:ue.channel.clamp.g(e),b:ue.channel.clamp.b(r),a:ue.channel.clamp.a(n)}),Ie.stringify(t)),"rgba"),Oe=De}),ln=t(()=>{Xr(),an(),Pe=Ae((t,e)=>ue.lang.round(Ie.parse(t)[e]),"channel"),Be=Pe}),cn=t(()=>{Xr(),an(),Fe=Ae(t=>{var{r:t,g:e,b:r}=Ie.parse(t),t=.2126*ue.channel.toLinear(t)+.7152*ue.channel.toLinear(e)+.0722*ue.channel.toLinear(r);return ue.lang.round(t)},"luminance"),$e=Fe}),hn=t(()=>{cn(),ze=Ae(t=>.5<=$e(t),"isLight"),Ge=ze}),un=t(()=>{hn(),Ue=Ae(t=>!Ge(t),"isDark"),qe=Ue}),dn=t(()=>{Xr(),an(),Ye=Ae((t,e,r)=>{var n=(t=Ie.parse(t))[e];return n!==(r=ue.channel.clamp[e](n+r))&&(t[e]=r),Ie.stringify(t)},"adjustChannel"),je=Ye}),pn=t(()=>{dn(),He=Ae((t,e)=>je(t,"l",e),"lighten"),We=He}),gn=t(()=>{dn(),Ve=Ae((t,e)=>je(t,"l",-e),"darken"),Xe=Ve}),fn=t(()=>{an(),on(),Ke=Ae((t,e)=>{var r,n=Ie.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return Re(t,i)},"adjust"),r=Ke}),mn=t(()=>{an(),sn(),Ze=Ae((t,e,r=50)=>{var{r:t,g:n,b:i,a}=Ie.parse(t),{r:e,g:o,b:s,a:l}=Ie.parse(e),c=2*(r/=100)-1,h=a-l;return Oe(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"),Qe=Ze}),yn=t(()=>{an(),mn(),Je=Ae((t,e=100)=>{var r=Ie.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qe(r,t,e)},"invert"),n=Je}),vn=t(()=>{sn(),ln(),un(),pn(),gn(),fn(),yn()}),xn=t(()=>{vn()}),bn=t(()=>{tr="#ffffff",er="#f2f2f2"}),wn=t(()=>{xn(),rr=Ae((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),kn=t(()=>{xn(),bn(),wn(),nr=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||rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rr(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?Xe(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||Xe(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||We(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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ir=Ae(t=>{var e=new nr;return e.calculate(t),e},"getThemeVariables")}),Tn=t(()=>{xn(),wn(),ar=class{static{Ae(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=We(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=We(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oe(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=Xe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Xe(this.sectionBkgColor,10),this.taskBorderColor=Oe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oe(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=We(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=We(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=We(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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},or=Ae(t=>{var e=new ar;return e.calculate(t),e},"getThemeVariables")}),En=t(()=>{xn(),wn(),bn(),sr=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=rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=Oe(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||Xe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Xe(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},lr=Ae(t=>{var e=new sr;return e.calculate(t),e},"getThemeVariables")}),_n=t(()=>{xn(),bn(),wn(),cr=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=We("#cde498",10),this.primaryBorderColor=rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=Xe(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||Xe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Xe(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},hr=Ae(t=>{var e=new cr;return e.calculate(t),e},"getThemeVariables")}),Cn=t(()=>{xn(),wn(),bn(),ur=class{static{Ae(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=We(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=We(this.contrast,55),this.border2=this.contrast,this.actorBorder=We(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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},dr=Ae(t=>{var e=new ur;return e.calculate(t),e},"getThemeVariables")}),Sn=t(()=>{kn(),Tn(),En(),_n(),Cn(),pr={base:{getThemeVariables:ir},dark:{getThemeVariables:or},default:{getThemeVariables:lr},forest:{getThemeVariables:hr},neutral:{getThemeVariables:dr}}}),An=t(()=>{gr={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}}),Ln=t(()=>{Sn(),An(),fr={...gr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:pr.default.getThemeVariables(),sequence:{...gr.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:{...gr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...gr.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:{...gr.pie,useWidth:984},xyChart:{...gr.xyChart,useWidth:void 0},requirement:{...gr.requirement,useWidth:void 0},packet:{...gr.packet}},mr=Ae((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...mr(r[e],"")]:[...t,n+e],[]),"keyify"),yr=new Set(mr(fr,"")),vr=fr}),Nn=t(()=>{Ln(),e(),xr=Ae(t=>{if(R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>xr(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")||!yr.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),xr(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(R.debug("sanitizing css option",e),t[e]=br(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"),br=Ae(t=>{let e=0,r=0;for(var n of t){if(e{jr(),e(),Sn(),Ln(),Nn(),wr=Object.freeze(vr),kr=ie({},wr),Er=[],_r=ie({},wr),Cr=Ae((t,e)=>{let r=ie({},t),n={};for(var i of e)Rr(i),n=ie(n,i);return r=ie(r,n),n.theme&&n.theme in pr&&(t=ie({},Tr),e=ie(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in pr&&(r.themeVariables=pr[r.theme].getThemeVariables(e)),$r(_r=r),_r},"updateCurrentConfig"),Sr=Ae(t=>(kr=ie({},wr),kr=ie(kr,t),t.theme&&pr[t.theme]&&(kr.themeVariables=pr[t.theme].getThemeVariables(t.themeVariables)),Cr(kr,Er),kr),"setSiteConfig"),Ar=Ae(t=>{Tr=ie({},t)},"saveConfigFromInitialize"),Lr=Ae(t=>(kr=ie(kr,t),Cr(kr,Er),kr),"updateSiteConfig"),Nr=Ae(()=>ie({},kr),"getSiteConfig"),Ir=Ae(t=>($r(t),ie(_r,t),Mr()),"setConfig"),Mr=Ae(()=>ie({},_r),"getConfig"),Rr=Ae(e=>{e&&(["secure",...kr.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]&&Rr(e[t])}))},"sanitize"),Dr=Ae(t=>{xr(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Er.push(t),Cr(kr,Er)},"addDirective"),Or=Ae((t=kr)=>{Cr(t,Er=[])},"reset"),Pr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Br={},Fr=Ae(t=>{Br[t]||(R.warn(Pr[t]),Br[t]=!0)},"issueWarning"),$r=Ae(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Fr("LAZY_LOAD_DEPRECATED")},"checkConfig")}),Mn=bBt((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/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"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"+t:(n=te(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&A===S&&(t=''+t+"");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 -`+l),v&&Xt([Z,Q,J],t=>{l=ee(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0di[t])}function On(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 Pn(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function Bn(t){for(var e=0;e but got "+String(t)+".")}function s(t,e,r,n,i,a){pa[t][i]={font:e,group:r,replace:n},a&&n&&(pa[t][n]=pa[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;sAV".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{for(var r in e)G(t,r,{get:e[r],enumerable:!0})})(Rn,{default:()=>yl});var ci,hi,X,ui,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,K,Ji,ta,ea,ra,na,ia,aa,oa,sa,la,ca,ha,ua,da,pa,u,d,p,ga,g,fa,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,Z,Va,Xa,Ka,Za,Qa,Ja,to,eo,ro,no,io,ao,oo,so,lo,co,ho,uo,po,go,fo,E,mo,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,f,Xs,Ks,Zs,Qs,Js,tl,el,rl,nl,il,al,ol,sl,ll,cl,hl,ul,dl,m,pl,gl,fl,ml,y,yl,vl=t(()=>{for(ci=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}},hi=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,ci.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":">","<":"<",'"':""","'":"'"},pi=/[&><"']/g,Ae(Dn,"escape"),gi=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=gi(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),fi=Ae(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Ns=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"),mi={contains:Ps,deflt:y,escape:Dn,hyphenate:il,getBaseElem:gi,isCharacterBox:m,protocolFromUrl:Ns},yi={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:Ae(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor: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 ",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 ",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 ",cliProcessor:Ae(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},Ae(On,"getDefaultValue"),vi=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||{},yi){var r;yi.hasOwnProperty(e)&&(r=yi[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:On(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=mi.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Ps=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 xi[bi[this.id]]}sub(){return xi[wi[this.id]]}fracNum(){return xi[ki[this.id]]}fracDen(){return xi[Ti[this.id]]}cramp(){return xi[Ei[this.id]]}text(){return xi[_i[this.id]]}isTight(){return 2<=this.size}},xi=[new Ps(0,0,!1),new Ps(1,0,!0),new Ps(2,1,!1),new Ps(3,1,!0),new Ps(4,2,!1),new Ps(5,2,!0),new Ps(6,3,!1),new Ps(7,3,!0)],bi=[4,5,4,5,6,7,6,7],wi=[5,5,5,5,7,7,7,7],ki=[2,3,4,5,6,7,6,7],Ti=[3,3,5,5,7,7,7,7],Ei=[1,1,3,3,5,5,7,7],_i=[0,1,2,3,2,3,2,3],Ci={DISPLAY:xi[0],TEXT:xi[2],SCRIPT:xi[4],SCRIPTSCRIPT:xi[6]},Si=[{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(Pn,"scriptFromCodepoint"),Ai=[],Si.forEach(t=>t.blocks.forEach(t=>Ai.push(...t))),Ae(Bn,"supportedCodepoint"),Li=Ae(function(t,e){return"M95,"+(622+t+e)+` +`+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{ne=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=>ne(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]=ne(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),ie=ne}),Hr=t(()=>{ae={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(r<0&&(r+=1),1{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*ae.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*ae.hue2rgb(a,i,t);case"b":return 255*ae.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),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5{oe={clamp:Ae((t,e,r)=>rMath.round(1e10*t)/1e10,"round")},le=oe}),Vr=t(()=>{ce={dec2hex:Ae(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},he=ce}),Xr=t(()=>{Hr(),Wr(),Vr(),ue={channel:se,lang:le,unit:he}}),Kr=t(()=>{Xr(),de={};for(let t=0;t<=255;t++)de[t]=ue.unit.dec2hex(t);pe={ALL:0,RGB:1,HSL:2}}),Zr=t(()=>{Kr(),ge=class{static{Ae(this,"Type")}constructor(){this.type=pe.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=pe.ALL}is(t){return this.type===t}},fe=ge}),Qr=t(()=>{Xr(),Zr(),Kr(),ye=class{static{Ae(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new fe}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=pe.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=ue.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=ue.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=ue.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=ue.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=ue.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=ue.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(pe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(pe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(pe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(pe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(pe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(pe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},ve=ye}),Jr=t(()=>{Qr(),xe=new ve({r:0,g:0,b:0,a:0},"transparent"),be=xe}),tn=t(()=>{Jr(),Kr(),we={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,s=t.match(we.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,be.set({r:(e>>(n=(r=4>n*(2+i)&a)*r,b:(e>>n*(1+i)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:Ae(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]+de[Math.round(255*n)]:"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]},"stringify")},ke=we}),en=t(()=>{Xr(),Jr(),Te={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:Ae(t=>{if(r=t.match(Te.hueRe)){var[,e,r]=r;switch(r){case"grad":return ue.channel.clamp.h(.9*parseFloat(e));case"rad":return ue.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return ue.channel.clamp.h(360*parseFloat(e))}}return ue.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(Te.re)))return[,a,e,r,n,i]=a,be.set({h:Te._hue2deg(a),s:ue.channel.clamp.s(parseFloat(e)),l:ue.channel.clamp.l(parseFloat(r)),a:n?ue.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(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%, ${n})`:`hsl(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%)`},"stringify")},_e=Te}),rn=t(()=>{tn(),Ee={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=Ee.colors[t])return ke.parse(t)},"parse"),stringify:Ae(t=>{var e,r=ke.stringify(t);for(e in Ee.colors)if(Ee.colors[e]===r)return e},"stringify")},Ce=Ee}),nn=t(()=>{Xr(),Jr(),Se={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:Ae(t=>{var e,r,n,i,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Se.re)))return[,l,e,r,n,i,a,s,o]=l,be.set({r:ue.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:ue.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:ue.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?ue.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:Ae(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?`rgba(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)}, ${ue.lang.round(n)})`:`rgb(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)})`},"stringify")},Le=Se}),an=t(()=>{tn(),en(),rn(),nn(),Kr(),Ne={format:{keyword:Ce,hex:ke,rgb:Le,rgba:Le,hsl:_e,hsla:_e},parse:Ae(t=>{if("string"!=typeof t)return t;var e=ke.parse(t)||Le.parse(t)||_e.parse(t)||Ce.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(pe.HSL)||void 0===t.data.r?_e:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Le:ke).stringify(t),"stringify")},Ie=Ne}),sn=t(()=>{Xr(),an(),Me=Ae((t,e)=>{var r,n=Ie.parse(t);for(r in e)n[r]=ue.channel.clamp[r](e[r]);return Ie.stringify(n)},"change"),Re=Me}),on=t(()=>{Xr(),Jr(),an(),sn(),De=Ae((t,e,r=0,n=1)=>"number"!=typeof t?Re(t,{a:e}):(t=be.set({r:ue.channel.clamp.r(t),g:ue.channel.clamp.g(e),b:ue.channel.clamp.b(r),a:ue.channel.clamp.a(n)}),Ie.stringify(t)),"rgba"),Oe=De}),ln=t(()=>{Xr(),an(),Pe=Ae((t,e)=>ue.lang.round(Ie.parse(t)[e]),"channel"),Be=Pe}),cn=t(()=>{Xr(),an(),Fe=Ae(t=>{var{r:t,g:e,b:r}=Ie.parse(t),t=.2126*ue.channel.toLinear(t)+.7152*ue.channel.toLinear(e)+.0722*ue.channel.toLinear(r);return ue.lang.round(t)},"luminance"),$e=Fe}),hn=t(()=>{cn(),ze=Ae(t=>.5<=$e(t),"isLight"),Ue=ze}),un=t(()=>{hn(),Ge=Ae(t=>!Ue(t),"isDark"),qe=Ge}),dn=t(()=>{Xr(),an(),je=Ae((t,e,r)=>{var n=(t=Ie.parse(t))[e];return n!==(r=ue.channel.clamp[e](n+r))&&(t[e]=r),Ie.stringify(t)},"adjustChannel"),Ye=je}),pn=t(()=>{dn(),He=Ae((t,e)=>Ye(t,"l",e),"lighten"),We=He}),gn=t(()=>{dn(),Ve=Ae((t,e)=>Ye(t,"l",-e),"darken"),Xe=Ve}),fn=t(()=>{an(),sn(),Ke=Ae((t,e)=>{var r,n=Ie.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return Re(t,i)},"adjust"),r=Ke}),mn=t(()=>{an(),on(),Ze=Ae((t,e,r=50)=>{var{r:t,g:n,b:i,a}=Ie.parse(t),{r:e,g:s,b:o,a:l}=Ie.parse(e),c=2*(r/=100)-1,h=a-l;return Oe(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Qe=Ze}),yn=t(()=>{an(),mn(),Je=Ae((t,e=100)=>{var r=Ie.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qe(r,t,e)},"invert"),n=Je}),vn=t(()=>{on(),ln(),un(),pn(),gn(),fn(),yn()}),xn=t(()=>{vn()}),bn=t(()=>{tr="#ffffff",er="#f2f2f2"}),wn=t(()=>{xn(),rr=Ae((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),kn=t(()=>{xn(),bn(),wn(),nr=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||rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rr(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?Xe(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||Xe(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||We(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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ir=Ae(t=>{var e=new nr;return e.calculate(t),e},"getThemeVariables")}),Tn=t(()=>{xn(),wn(),ar=class{static{Ae(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=We(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=We(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oe(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=Xe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Xe(this.sectionBkgColor,10),this.taskBorderColor=Oe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oe(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=We(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=We(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=We(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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},sr=Ae(t=>{var e=new ar;return e.calculate(t),e},"getThemeVariables")}),_n=t(()=>{xn(),wn(),bn(),or=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=rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=Oe(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||Xe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Xe(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},lr=Ae(t=>{var e=new or;return e.calculate(t),e},"getThemeVariables")}),En=t(()=>{xn(),bn(),wn(),cr=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=We("#cde498",10),this.primaryBorderColor=rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=Xe(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||Xe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Xe(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},hr=Ae(t=>{var e=new cr;return e.calculate(t),e},"getThemeVariables")}),Cn=t(()=>{xn(),wn(),bn(),ur=class{static{Ae(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=We(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rr(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=We(this.contrast,55),this.border2=this.contrast,this.actorBorder=We(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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},dr=Ae(t=>{var e=new ur;return e.calculate(t),e},"getThemeVariables")}),Sn=t(()=>{kn(),Tn(),_n(),En(),Cn(),pr={base:{getThemeVariables:ir},dark:{getThemeVariables:sr},default:{getThemeVariables:lr},forest:{getThemeVariables:hr},neutral:{getThemeVariables:dr}}}),An=t(()=>{gr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},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}}),Ln=t(()=>{Sn(),An(),fr={...gr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:pr.default.getThemeVariables(),sequence:{...gr.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")},class:{hideEmptyMembersBox:!1},gantt:{...gr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...gr.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:{...gr.pie,useWidth:984},xyChart:{...gr.xyChart,useWidth:void 0},requirement:{...gr.requirement,useWidth:void 0},packet:{...gr.packet}},mr=Ae((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...mr(r[e],"")]:[...t,n+e],[]),"keyify"),yr=new Set(mr(fr,"")),vr=fr}),Nn=t(()=>{Ln(),e(),xr=Ae(t=>{if(R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>xr(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")||!yr.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),xr(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(R.debug("sanitizing css option",e),t[e]=br(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"),br=Ae(t=>{let e=0,r=0;for(var n of t){if(e{Yr(),e(),Sn(),Ln(),Nn(),wr=Object.freeze(vr),kr=ie({},wr),_r=[],Er=ie({},wr),Cr=Ae((t,e)=>{let r=ie({},t),n={};for(var i of e)Rr(i),n=ie(n,i);return r=ie(r,n),n.theme&&n.theme in pr&&(t=ie({},Tr),e=ie(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in pr&&(r.themeVariables=pr[r.theme].getThemeVariables(e)),$r(Er=r),Er},"updateCurrentConfig"),Sr=Ae(t=>(kr=ie({},wr),kr=ie(kr,t),t.theme&&pr[t.theme]&&(kr.themeVariables=pr[t.theme].getThemeVariables(t.themeVariables)),Cr(kr,_r),kr),"setSiteConfig"),Ar=Ae(t=>{Tr=ie({},t)},"saveConfigFromInitialize"),Lr=Ae(t=>(kr=ie(kr,t),Cr(kr,_r),kr),"updateSiteConfig"),Nr=Ae(()=>ie({},kr),"getSiteConfig"),Ir=Ae(t=>($r(t),ie(Er,t),Mr()),"setConfig"),Mr=Ae(()=>ie({},Er),"getConfig"),Rr=Ae(e=>{e&&(["secure",...kr.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]&&Rr(e[t])}))},"sanitize"),Dr=Ae(t=>{xr(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),_r.push(t),Cr(kr,_r)},"addDirective"),Or=Ae((t=kr)=>{Cr(t,_r=[])},"reset"),Pr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Br={},Fr=Ae(t=>{Br[t]||(R.warn(Pr[t]),Br[t]=!0)},"issueWarning"),$r=Ae(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Fr("LAZY_LOAD_DEPRECATED")},"checkConfig")}),Mn=kBt((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"),s(Array.prototype.forEach)),Kt=s(Array.prototype.pop),Zt=s(Array.prototype.push),Qt=s(String.prototype.toLowerCase),Jt=s(String.prototype.toString),te=s(String.prototype.match),ee=s(String.prototype.replace),we=s(String.prototype.indexOf),ke=s(String.prototype.trim),re=s(Object.prototype.hasOwnProperty),ne=s(RegExp.prototype.test),ie=r(TypeError);function s(i){return function(t){for(var e=arguments.length,r=new Array(1/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 Ee=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"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:U,trustedTypes:d}=t,r=F.prototype,G=oe(r,"cloneNode"),q=oe(r,"remove"),j=oe(r,"nextSibling"),Y=oe(r,"childNodes"),s=oe(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 s&&H&&void 0!==H.createHTMLDocument,Ee),at=Ee.IS_ALLOWED_URI,f=null,st=ae({},[...le,...ce,...he,...ue,...de]),m=null,ot=ae({},[...pe,...ge,...fe,...me]),o=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,_=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"]),E="http://www.w3.org/1998/Math/MathML",C="http://www.w3.org/2000/svg",S="http://www.w3.org/1999/xhtml",A=S,_t=!1,Et=null,Ct=ae({},[E,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"+t:(n=te(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&A===S&&(t=''+t+"");var n=p?p.createHTML(t):t;if(A===S)try{e=(new U).parseFromString(n,L)}catch{}if(!e||!e.documentElement){e=H.createDocument(A,"template",null);try{e.documentElement.innerHTML=_t?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"),Ut=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)&&(o.tagNameCheck instanceof RegExp&&ne(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(vt&&!_[t]){var n=s(e)||e.parentNode,i=Y(e)||e.childNodes;if(i&&n)for(let t=i.length-1;0<=t;--t){var a=G(i[t],!0);a.__removalCount=(e.__removalCount||0)+1,n.insertBefore(a,j(e))}}}}return M(e),!0},"_sanitizeElements"),Gt=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)&&(o.tagNameCheck instanceof RegExp&&ne(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&ne(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&ne(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.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"),jt=Ae(function(l){D("beforeSanitizeAttributes",l,null);var c=l.attributes;if(c){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:n}=t,i=N(e),a="value"===e?n:ke(n);if(s.attrName=i,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D("uponSanitizeAttribute",l,s),a=s.attrValue,pt&&ne(/((--!?|])>)|<\/(style|title)/i,a))R(e,l);else if(!s.forceKeepAttr&&(R(e,l),s.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(Gt(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"),Yt=Ae(function t(e){var r,n=Ft(e);for(D("beforeSanitizeShadowDOM",e,null);r=n.nextNode();)D("uponSanitizeShadowNode",r,null),Ut(r)||(r.content instanceof P&&t(r.content),jt(r));D("afterSanitizeShadowDOM",e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1 +`+l),v&&Xt([Z,Q,J],t=>{l=ee(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0di[t])}function On(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 Pn(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function Bn(t){for(var e=0;e but got "+String(t)+".")}function o(t,e,r,n,i,a){pa[t][i]={font:e,group:r,replace:n},a&&n&&(pa[t][n]=pa[t][i])}function l(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},o=0;oAV".indexOf(c)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p{for(var r in e)U(t,r,{get:e[r],enumerable:!0})})(Rn,{default:()=>yl});var ci,hi,X,ui,di,pi,gi,fi,mi,yi,vi,xi,bi,wi,ki,Ti,_i,Ei,Ci,Si,Ai,Li,Ni,Ii,Mi,Ri,Di,Oi,Pi,Bi,Fi,$i,zi,Ui,Gi,qi,ji,Yi,Hi,Wi,Vi,Xi,Ki,Zi,Qi,K,Ji,ta,ea,ra,na,ia,aa,sa,oa,la,ca,ha,ua,da,pa,u,d,p,ga,g,fa,ma,ya,va,xa,ba,wa,ka,Ta,_a,Ea,Ca,Sa,Aa,La,Na,Ia,Ma,Ra,Da,Oa,Pa,Ba,Fa,$a,za,Ua,Ga,qa,ja,Ya,Ha,Wa,Z,Va,Xa,Ka,Za,Qa,Ja,ts,es,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,_,fs,ms,ys,vs,xs,bs,ws,ks,Ts,_s,Es,Cs,Ss,As,Ls,Ns,Is,Ms,Rs,Ds,Os,Ps,Bs,Fs,$s,zs,Us,Gs,qs,js,Ys,Hs,Ws,Vs,Xs,Ks,Zs,Qs,Js,to,eo,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,xo,bo,wo,ko,To,_o,Eo,Co,So,Ao,Lo,No,Io,Mo,Ro,Do,Oo,Po,Bo,Fo,$o,zo,Uo,Go,qo,jo,Yo,Ho,Wo,Vo,f,Xo,Ko,Zo,Qo,Jo,tl,el,rl,nl,il,al,sl,ol,ll,cl,hl,ul,dl,m,pl,gl,fl,ml,y,yl,vl=t(()=>{for(ci=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}},hi=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,ci.range(this,t))}},(X=class s{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":">","<":"<",'"':""","'":"'"},pi=/[&><"']/g,Ae(Dn,"escape"),gi=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=gi(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),fi=Ae(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),No=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"),mi={contains:Po,deflt:y,escape:Dn,hyphenate:il,getBaseElem:gi,isCharacterBox:m,protocolFromUrl:No},yi={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:Ae(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor: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 ",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 ",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 ",cliProcessor:Ae(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},Ae(On,"getDefaultValue"),vi=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||{},yi){var r;yi.hasOwnProperty(e)&&(r=yi[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:On(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=mi.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Po=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 xi[bi[this.id]]}sub(){return xi[wi[this.id]]}fracNum(){return xi[ki[this.id]]}fracDen(){return xi[Ti[this.id]]}cramp(){return xi[_i[this.id]]}text(){return xi[Ei[this.id]]}isTight(){return 2<=this.size}},xi=[new Po(0,0,!1),new Po(1,0,!0),new Po(2,1,!1),new Po(3,1,!0),new Po(4,2,!1),new Po(5,2,!0),new Po(6,3,!1),new Po(7,3,!0)],bi=[4,5,4,5,6,7,6,7],wi=[5,5,5,5,7,7,7,7],ki=[2,3,4,5,6,7,6,7],Ti=[3,3,5,5,7,7,7,7],_i=[1,1,3,3,5,5,7,7],Ei=[0,1,2,3,2,3,2,3],Ci={DISPLAY:xi[0],TEXT:xi[2],SCRIPT:xi[4],SCRIPTSCRIPT:xi[6]},Si=[{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(Pn,"scriptFromCodepoint"),Ai=[],Si.forEach(t=>t.blocks.forEach(t=>Ai.push(...t))),Ae(Bn,"supportedCodepoint"),Li=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 @@ -264,10 +264,10 @@ 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 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"),zi=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 mi.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText(),"toText");return this.children.map(t).join("")}},Gi={"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]}},Ui={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]},qi={"Å":"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(Fn,"setFontMetrics"),Ae($n,"getCharacterMetrics"),Yi={},Ae(zn,"getGlobalMetrics"),ji=[[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]],Hi=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Wi=Ae(function(t,e){return e.size<2?t:ji[t-1][e.size-1]},"sizeAtStyle"),(Vi=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=Hi[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:Wi(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:Hi[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Wi(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=zn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Xi={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},Ki={ex:!0,em:!0,mu:!0},Zi=Ae(function(t){return(t="string"!=typeof t?t.unit:t)in Xi||t in Ki||"ex"===t},"validUnit"),Qi=Ae(function(t,e){var r;if(t.unit in Xi)r=Xi[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"),Ji=Ae(function(t){return t.filter(t=>t).join(" ")},"createClass"),ta=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"),ea=Ae(function(t){var e,r,n=document.createElement(t);for(e in n.className=Ji(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"},"toMarkup"),na=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,ta.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return mi.contains(this.classes,t)}toNode(){return ea.call(this,"span")}toMarkup(){return ra.call(this,"span")}},ia=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,ta.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return mi.contains(this.classes,t)}toNode(){return ea.call(this,"a")}toMarkup(){return ra.call(this,"a")}},aa=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 mi.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=''+mi.escape(this.alt)+'"}},oa={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},sa=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=Pn(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=oa[this.text])}hasClass(t){return mi.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0":i}},la=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"}},ca=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",Fi[this.pathName]),t}toMarkup(){return this.alternate?'':''}},ha=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=""}},Ae(Gn,"assertSymbolDomNode"),Ae(Un,"assertSpan"),ua={bin:1,close:1,inner:1,open:1,punct:1,rel:1},da={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},pa={math:{},text:{}},Ae(s,"defineSymbol"),d="text",y="ams",il="accent-token",m="bin",Ns="close",Ps="inner",ga="mathord",nl="op-token",gl="open",Ds="punct",pl="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,Ds,".","\\ldotp"),s(u,p,Ds,"⋅","\\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,Ns,"⎱","\\rmoustache",!0),s(u,p,gl,"⎰","\\lmoustache",!0),s(u,p,Ns,"⟯","\\rgroup",!0),s(u,p,gl,"⟮","\\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,gl,"┌","\\@ulcorner",!0),s(u,y,Ns,"┐","\\@urcorner",!0),s(u,y,gl,"└","\\@llcorner",!0),s(u,y,Ns,"┘","\\@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,ga,"α","\\alpha",!0),s(u,p,ga,"β","\\beta",!0),s(u,p,ga,"γ","\\gamma",!0),s(u,p,ga,"δ","\\delta",!0),s(u,p,ga,"ϵ","\\epsilon",!0),s(u,p,ga,"ζ","\\zeta",!0),s(u,p,ga,"η","\\eta",!0),s(u,p,ga,"θ","\\theta",!0),s(u,p,ga,"ι","\\iota",!0),s(u,p,ga,"κ","\\kappa",!0),s(u,p,ga,"λ","\\lambda",!0),s(u,p,ga,"μ","\\mu",!0),s(u,p,ga,"ν","\\nu",!0),s(u,p,ga,"ξ","\\xi",!0),s(u,p,ga,"ο","\\omicron",!0),s(u,p,ga,"π","\\pi",!0),s(u,p,ga,"ρ","\\rho",!0),s(u,p,ga,"σ","\\sigma",!0),s(u,p,ga,"τ","\\tau",!0),s(u,p,ga,"υ","\\upsilon",!0),s(u,p,ga,"ϕ","\\phi",!0),s(u,p,ga,"χ","\\chi",!0),s(u,p,ga,"ψ","\\psi",!0),s(u,p,ga,"ω","\\omega",!0),s(u,p,ga,"ε","\\varepsilon",!0),s(u,p,ga,"ϑ","\\vartheta",!0),s(u,p,ga,"ϖ","\\varpi",!0),s(u,p,ga,"ϱ","\\varrho",!0),s(u,p,ga,"ς","\\varsigma",!0),s(u,p,ga,"φ","\\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,gl,"⟨","\\langle",!0),s(u,p,gl,"∣","\\lvert"),s(u,p,gl,"∥","\\lVert"),s(u,p,Ns,"?","?"),s(u,p,Ns,"!","!"),s(u,p,Ns,"⟩","\\rangle",!0),s(u,p,Ns,"∣","\\rvert"),s(u,p,Ns,"∥","\\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,pl," ","\\ "),s(u,p,pl," ","\\space"),s(u,p,pl," ","\\nobreakspace"),s(d,p,pl," ","\\ "),s(d,p,pl," "," "),s(d,p,pl," ","\\space"),s(d,p,pl," ","\\nobreakspace"),s(u,p,pl,null,"\\nobreak"),s(u,p,pl,null,"\\allowbreak"),s(u,p,Ds,",",","),s(u,p,Ds,";",";"),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,gl,"{","\\{"),s(d,p,g,"{","\\{"),s(d,p,g,"{","\\textbraceleft"),s(u,p,Ns,"}","\\}"),s(d,p,g,"}","\\}"),s(d,p,g,"}","\\textbraceright"),s(u,p,gl,"{","\\lbrace"),s(u,p,Ns,"}","\\rbrace"),s(u,p,gl,"[","\\lbrack",!0),s(d,p,g,"[","\\lbrack",!0),s(u,p,Ns,"]","\\rbrack",!0),s(d,p,g,"]","\\rbrack",!0),s(u,p,gl,"(","\\lparen",!0),s(u,p,Ns,")","\\rparen",!0),s(d,p,g,"<","\\textless",!0),s(d,p,g,">","\\textgreater",!0),s(u,p,gl,"⌊","\\lfloor",!0),s(u,p,Ns,"⌋","\\rfloor",!0),s(u,p,gl,"⌈","\\lceil",!0),s(u,p,Ns,"⌉","\\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,nl,"∐","\\coprod"),s(u,p,nl,"⋁","\\bigvee"),s(u,p,nl,"⋀","\\bigwedge"),s(u,p,nl,"⨄","\\biguplus"),s(u,p,nl,"⋂","\\bigcap"),s(u,p,nl,"⋃","\\bigcup"),s(u,p,nl,"∫","\\int"),s(u,p,nl,"∫","\\intop"),s(u,p,nl,"∬","\\iint"),s(u,p,nl,"∭","\\iiint"),s(u,p,nl,"∏","\\prod"),s(u,p,nl,"∑","\\sum"),s(u,p,nl,"⨂","\\bigotimes"),s(u,p,nl,"⨁","\\bigoplus"),s(u,p,nl,"⨀","\\bigodot"),s(u,p,nl,"∮","\\oint"),s(u,p,nl,"∯","\\oiint"),s(u,p,nl,"∰","\\oiiint"),s(u,p,nl,"⨆","\\bigsqcup"),s(u,p,nl,"∫","\\smallint"),s(d,p,Ps,"…","\\textellipsis"),s(u,p,Ps,"…","\\mathellipsis"),s(d,p,Ps,"…","\\ldots",!0),s(u,p,Ps,"…","\\ldots",!0),s(u,p,Ps,"⋯","\\@cdots",!0),s(u,p,Ps,"⋱","\\ddots",!0),s(u,p,g,"⋮","\\varvdots"),s(u,p,il,"ˊ","\\acute"),s(u,p,il,"ˋ","\\grave"),s(u,p,il,"¨","\\ddot"),s(u,p,il,"~","\\tilde"),s(u,p,il,"ˉ","\\bar"),s(u,p,il,"˘","\\breve"),s(u,p,il,"ˇ","\\check"),s(u,p,il,"^","\\hat"),s(u,p,il,"⃗","\\vec"),s(u,p,il,"˙","\\dot"),s(u,p,il,"˚","\\mathring"),s(u,p,ga,"","\\@imath"),s(u,p,ga,"","\\@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,il,"ˊ","\\'"),s(d,p,il,"ˋ","\\`"),s(d,p,il,"ˆ","\\^"),s(d,p,il,"˜","\\~"),s(d,p,il,"ˉ","\\="),s(d,p,il,"˘","\\u"),s(d,p,il,"˙","\\."),s(d,p,il,"¸","\\c"),s(d,p,il,"˚","\\r"),s(d,p,il,"ˇ","\\v"),s(d,p,il,"¨",'\\"'),s(d,p,il,"˝","\\H"),s(d,p,il,"◯","\\textcircled"),fa={"--":!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"),ma='0123456789/@."',va=0;va{if(Ji(t.classes)!==Ji(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;ee&&(e=a.height),rnew na(t,e,r,n),"makeSvgSpan"),gl=Ae(function(t,e,r){return(t=Ga([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Ns=Ae(function(t,e,r,n){return t=new ia(t,e,r,n),za(t),t},"makeAnchor"),qa=Ae(function(t){return t=new zi(t),za(t),t},"makeFragment"),f=Ae(function(t,e){return t instanceof zi?Ga([],[t],e):t},"wrapFragment"),Ya=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{var r=Ga(["mspace"],[],e),t=Qi(t,e);return r.style.marginRight=K(t),r},"makeGlue"),ja=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"),Ha={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"}},Wa={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},il=Ae(function(t,e){var[t,r,n]=Wa[t],t=new ca(t),t=new la([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=Ua(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Ha,makeSymbol:Ba,mathsym:pl,makeSpan:Ga,makeSvgSpan:Ua,makeLineSpan:gl,makeAnchor:Ns,makeFragment:qa,wrapFragment:f,makeVList:nl,makeOrd:Ds,makeGlue:Ps,staticSvg:il,svgData:Wa,tryCombineChars:m},Va={mord:{mop:y={number:3,unit:"mu"},mbin:pl={number:4,unit:"mu"},mrel:gl={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:gl,minner:y},mbin:{mord:pl,mop:pl,mopen:pl,minner:pl},mrel:{mord:gl,mop:gl,mopen:gl,minner:gl},mopen:{},mclose:{mop:y,mbin:pl,mrel:gl,minner:y},mpunct:{mord:y,mop:y,mrel:gl,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:pl,mrel:gl,mopen:y,mpunct:y,minner:y}},Xa={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Ka={},Za={},Qa={},Ae(l,"defineFunction"),Ae(qn,"defineFunctionBuilders"),Ja=Ae(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),to=Ae(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),eo=Z.makeSpan,ro=["leftmost","mbin","mopen","mrel","mop","mpunct"],no=["rightmost","mrel","mclose","mpunct"],io={display:Ci.DISPLAY,text:Ci.TEXT,script:Ci.SCRIPT,scriptscript:Ci.SCRIPTSCRIPT},ao={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},oo=Ae(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,o=[],s=0;s{var r=e.classes[0],n=t.classes[0];"mbin"===r&&mi.contains(no,n)?e.classes[0]="mord":"mbin"===n&&mi.contains(ro,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),so(o,(t,e)=>{var e=ho(e),r=ho(t);if(t=e&&r?(t.hasClass("mtight")?Xa:Va)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),o},"buildExpression"),so=Ae(function t(r,e,n,i,a){i&&r.push(i);for(var o=0;ot=>{r.splice(e+1,0,t),o++})(o))}i&&r.pop()},"traverseNonSpaceNodes"),lo=Ae(function(t){return t instanceof zi||t instanceof ia||t instanceof na&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),co=Ae(function t(e,r){var n=lo(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"),ho=Ae(function(t,e){return t&&(e&&(t=co(t,e)),ao[t.classes[0]])||null},"getTypeOfDomTree"),uo=Ae(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),eo(e.concat(t))},"makeNullDelimiter"),po=Ae(function(t,e,r){if(!t)return eo();var n;if(Za[t.type])return n=Za[t.type](t,e),r&&e.size!==r.size&&(n=eo(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(Yn,"buildHTMLUnbreakable"),Ae(jn,"buildHTML"),Ae(Hn,"newDocumentFragment"),go=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"}toText(){return this.children.map(t=>t.toText()).join("")}},fo=class{static{Ae(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return mi.escape(this.toText())}toText(){return this.text}},Ns=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?""+this.character+"":''}toText(){return this.character||" "}},E={MathNode:go,TextNode:fo,SpaceNode:Ns,newDocumentFragment:Hn},mo=Ae(function(t,e,r){return!pa[e][t]||!pa[e][t].replace||55349===t.charCodeAt(0)||fa.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=pa[e][t].replace),new E.TextNode(t)},"makeText"),yo=Ae(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),vo=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":!mi.contains(["\\imath","\\jmath"],t=t.text)&&$n(t=pa[r][t]&&pa[r][t].replace?pa[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),xo=Ae(function(t,e,r){var n;if(1===t.length)return n=wo(t[0],e),r&&n instanceof go&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],o=0;o{t&&"supsub"===t.type?(s=(r=Vn(t.base,"accent")).base,t.base=s,n=Un(po(t,e)),t.base=r):s=(r=Vn(t,"accent")).base;var r,n,i,a,t=po(s,e.havingCrampedStyle()),o=0,s=(r.isShifty&&mi.isCharacterBox(s)&&(s=mi.getBaseElem(s),o=Gn(po(s,e.havingCrampedStyle())).skew),"\\c"===r.label),l=s?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=Lo.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=t.isStretchy?Lo.mathMLnode(t.label):new E.MathNode("mo",[mo(t.label,t.mode)]);return(t=new E.MathNode("mover",[wo(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Io=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=Ja(e[0]),r=!Io.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:No,mathmlBuilder:Ps}),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:No,mathmlBuilder:Ps}),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=po(t.base,e),n=Lo.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=Lo.mathMLnode(t.label);return(t=new E.MathNode("munder",[wo(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Mo=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(po(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(po(t.below,i,e),e)).classes.push(o+"-arrow-pad")),Lo.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,o=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25"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:Do(e[0]),body:to(e[1]),isCharacterBox:mi.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?Do(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:to(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:mi.isCharacterBox(n)}},htmlBuilder:Zn,mathmlBuilder:Qn}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:Do(e[0]),body:to(e[0])}},htmlBuilder(t,e){var r=oo(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=xo(t.body,e),(e=new E.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),Oo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Po=Ae(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Bo=Ae(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),Fo=Ae((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),Ae(Jn,"cdArrow"),Ae(ti,"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(po(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",[wo(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(po(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new E.MathNode("mrow",[wo(t.fragment,e)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Vn(e[0],"ordgroup").body,n="",i=0;i>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),il=Ae((t,e)=>(e=oo(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=Ae((t,e)=>(e=xo(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=Vn(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:to(e[1])}},htmlBuilder:il,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Vn(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:il,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&&Vn(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(Qi(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(Qi(t.size,e))),r}}),$o={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},zo=Ae(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),Go=Ae(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),Uo=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($o[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=$o[r.text]),Vn(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===$o[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=zo(t.gullet.popToken()),n=(t.gullet.consumeSpaces(),Go(t));return Uo(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=zo(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return Uo(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),qo=Ae(function(t,e,r){if(r=$n(pa.math[t]&&pa.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),Yo=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"),jo=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"),Ho=Ae(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=Yo(t,e,n,a),r&&jo(i,n,e),i},"makeSmallDelim"),Wo=Ae(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Vo=Ae(function(t,e,r,n,i,a){return t=Wo(t,e,i,n),i=Yo(Z.makeSpan(["delimsizing","size"+e],[t],n),Ci.TEXT,n,a),r&&jo(i,n,Ci.TEXT),i},"makeLargeDelim"),Xo=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"),Ko=Ae(function(t,e,r){var n=(Gi["Size4-Regular"][t.charCodeAt(0)]?Gi["Size4-Regular"]:Gi["Size1-Regular"])[t.charCodeAt(0)][4],t=new ca("inner",Bi(t,Math.round(1e3*e))),t=new la([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"),Zo={type:"kern",size:-.008},Qo=["|","\\lvert","\\rvert","\\vert"],Jo=["\\|","\\lVert","\\rVert","\\Vert"],ts=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"):mi.contains(Qo,t)?(o="∣",c="vert",h=333):mi.contains(Jo,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=qo(u,p,i)).height+t.depth),g=(g=qo(o,p,i)).height+g.depth,f=(f=qo(s,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=qo(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","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],as=[0,1.2,1.8,2.4,3],gl=Ae(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),mi.contains(rs,t)||mi.contains(is,t))return Vo(t,e,!1,r,n,i);if(mi.contains(ns,t))return ts(t,as[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),os=[{type:"small",style:Ci.SCRIPTSCRIPT},{type:"small",style:Ci.SCRIPT},{type:"small",style:Ci.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ss=[{type:"small",style:Ci.SCRIPTSCRIPT},{type:"small",style:Ci.SCRIPT},{type:"small",style:Ci.TEXT},{type:"stack"}],ls=[{type:"small",style:Ci.SCRIPTSCRIPT},{type:"small",style:Ci.SCRIPT},{type:"small",style:Ci.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],cs=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"),hs=Ae(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var o=mi.contains(is,t)?os:mi.contains(rs,t)?ls:ss;return"small"===(o=hs(t,e,o,n)).type?Ho(t,o.style,r,n,i,a):"large"===o.type?Vo(t,o.size,r,n,i,a):ts(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 us(t,r,!0,n,i,a)},"makeLeftRightDelim"),ds={sqrtImage:pl,sizedDelim:gl,sizeToMaxHeight:as,customSizedDelim:us,leftRightDelim:y},ps={"\\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}},gs=["(","\\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(ei,"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=ei(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:ps[t.funcName].size,mclass:ps[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:Ae((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):ds.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:Ae(t=>{var e=[],e=("."!==t.delim&&e.push(mo(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(ds.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),Ae(ri,"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:ei(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{var e=ei(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Vn(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)=>{ri(t);for(var r,n=oo(t.body,e,!0,["mopen","mclose"]),i=0,a=0,o=!1,s=0;s{ri(t);var r,e=xo(t.body,e);return"."!==t.left&&((r=new E.MathNode("mo",[mo(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new E.MathNode("mo",[mo(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),yo(e)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{if(e=ei(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=uo(e,[]):(r=ds.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?mo("|","text"):mo(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")}),Ns=Ae((t,e)=>{var r,n,i,a,o,s=Z.wrapFragment(po(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=mi.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=Qi({number:.6,unit:"pt"},e),o=Qi({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=Di(c),i=new la([new ca("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=Lo.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"),Ds=Ae((t,e)=>{var r=new E.MathNode(-1{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),Ae(ai,"getAutoTag"),Ae(oi,"parseArray"),Ae(si,"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(Ci.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?Qi({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;et))for(R=0;Rt.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:nl}),ni({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=oi(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:nl}),ni({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Kn(e[0])?[e[0]]:Vn(e[0],"ordgroup").body).map(function(t){var e=Xn(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=oi(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=t.font,e=e.withFont(r);return po(t.body,e)},"htmlBuilder$5"),m=Ae((t,e)=>{var r=t.font,e=e.withFont(r);return wo(t.body,e)},"mathmlBuilder$4"),bs={"\\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=Ja(e[0]);return{type:"font",mode:t.mode,font:(r=r in bs?bs[r]:r).slice(1),body:e}},"handler"),htmlBuilder:il,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:Ae((t,e)=>{var t=t.parser,e=e[0],r=mi.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:Do(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:il,mathmlBuilder:m}),ws=Ae((t,e)=>("display"===t?e=e.id>=Ci.SCRIPT.id?e.text():Ci.DISPLAY:"text"===t&&e.size===Ci.DISPLAY.size?e=Ci.TEXT:"script"===t?e=Ci.SCRIPT:"scriptscript"===t&&(e=Ci.SCRIPTSCRIPT),e),"adjustStyle"),pl=Ae((t,e)=>{var r,n,i,a,o=ws(t.size,e.style),s=o.fracNum(),l=o.fracDen(),s=e.havingStyle(s),c=po(t.numer,s,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height{var r=new E.MathNode("mfrac",[wo(t.numer,e),wo(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=Qi(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),ws(t.size,e.style));return n.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=n.size===Ci.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)),yo(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:pl,mathmlBuilder:gl}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:Ae((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),l({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:t,funcName:r,token: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}}}),ks=["display","text","script","scriptscript"],Ts=Ae(function(t){var e=null;return 0{var t=t.parser,r=e[0],n=fi(Vn(e[1],"infix").size),e=e[2],i=0{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?po(t.sup,e.havingStyle(i.sup()),e):po(t.sub,e.havingStyle(i.sub()),e),Vn(t.base,"horizBrace")):Vn(t,"horizBrace"),t=po(i.base,e.havingBaseStyle(Ci.DISPLAY)),a=Lo.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=Lo.mathMLnode(t.label);return new E.MathNode(t.isOver?"mover":"munder",[wo(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:Es,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=Vn(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:to(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:Ae((t,e)=>{var r=oo(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>((e=(e=bo(t.body,e))instanceof go?e:new go("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=Vn(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i{var{parser:t,funcName:r}=t,n=Vn(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{var r,n=oo(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)=>bo(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:to(e[0]),mathml:to(e[1])}),"handler"),htmlBuilder:Ae((t,e)=>(t=oo(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>bo(t.mathml,e),"mathmlBuilder")}),_s=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]},Zi(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=Vn(r[0],"raw").string.split(","),l=0;l{var r=Qi(t.height,e),n=0,i=(0{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),Qi(t.height,e)),i=0;return 0{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([],[po(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[po(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",[wo(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)}}),Cs=Ae((t,e)=>{switch(e.style.size){case Ci.DISPLAY.size:return t.display;case Ci.TEXT.size:return t.text;case Ci.SCRIPT.size:return t.script;case Ci.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:to(e[0]),text:to(e[1]),script:to(e[2]),scriptscript:to(e[3])}),"handler"),htmlBuilder:Ae((t,e)=>(t=Cs(t,e),t=oo(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=Cs(t,e),bo(t,e)),"mathmlBuilder")}),Ss=Ae((t,e,r,n,i,a,o)=>{t=Z.makeSpan([],[t]);var s,l,c=r&&mi.isCharacterBox(r);if(e&&(s={elem:e=po(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=po(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"),As=["\\smallint"],Ls=Ae((t,e)=>{var r,n,i,a=!1,o=("supsub"===t.type?(r=t.sup,n=t.sub,i=Vn(t.base,"op"),a=!0):i=Vn(t,"op"),!1);if((t=e.style).size===Ci.DISPLAY.size&&i.symbol&&!mi.contains(As,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{var r;return t.symbol?(r=new go("mo",[mo(t.name,t.mode)]),mi.contains(As,t.name)&&r.setAttribute("largeop","false")):r=t.body?new go("mo",xo(t.body,e)):(r=new go("mi",[new fo(t.name.slice(1))]),e=new go("mo",[mo("⁡","text")]),t.parentIsSupSub?new go("mrow",[r,e]):Hn([r,e])),r},"mathmlBuilder$1"),Is={"∏":"\\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=Is[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Ls,mathmlBuilder:Ns}),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:to(e)}),"handler"),htmlBuilder:Ls,mathmlBuilder:Ns}),Ms={"∫":"\\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:Ls,mathmlBuilder:Ns}),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:Ls,mathmlBuilder:Ns}),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=Ms[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Ls,mathmlBuilder:Ns}),Rs=Ae((t,e)=>{var r,n,i,a,o=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Vn(t.base,"operatorname"),o=!0):i=Vn(t,"operatorname"),0{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),s=oo(t,e.withFont("mathrm"),!0),l=0;l{for(var r=xo(t.body,e.withFont("mathrm")),n=!0,i=0;it.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var s=new E.MathNode("mo",[mo("⁡","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:to(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Rs,mathmlBuilder:Ds}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),qn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(oo(t.body,e,!1)):Z.makeSpan(["mord"],oo(t.body,e,!0),e)},mathmlBuilder(t,e){return bo(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=po(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",[wo(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:to(e)}),"handler"),htmlBuilder:Ae((t,e)=>(t=oo(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=xo(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([],[po(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n(t=xo(to(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"],[po(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=xo(to(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=Vn(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=po(t.body,e),t=Qi(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",[wo(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=Vn(e[0],"size"),e=Vn(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Vn(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=Qi(t.width,e),i=Qi(t.height,e),t=t.shift?Qi(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=Qi(t.width,e),n=Qi(t.height,e),t=t.shift?Qi(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(li,"sizingGroup"),Os=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ps=Ae((t,e)=>{var r=e.havingSize(t.size);return li(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Os,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:Os.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Ps,mathmlBuilder:Ae((t,e)=>(e=e.havingSize(t.size),t=xo(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]&&Vn(r[0],"ordgroup");if(a)for(var o,s=0;s{var r=Z.makeSpan([],[po(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n(e=new E.MathNode("mpadded",[wo(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=po(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.idr.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(Ci.SCRIPTSCRIPT),r=po(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",[wo(t,e),wo(r,e)]):new E.MathNode("msqrt",[wo(t,e)])}}),Bs={display:Ci.DISPLAY,text:Ci.TEXT,script:Ci.SCRIPT,scriptscript:Ci.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=Bs[t.style],r=e.havingStyle(r).withFont("");return li(t.body,r,e)},mathmlBuilder(t,e){var r=Bs[t.style],e=e.havingStyle(r),r=xo(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}}),Fs=Ae(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Ci.DISPLAY.size||r.alwaysHandleSupSub)?Ls:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Ci.DISPLAY.size||r.limits)?Rs:null:"accent"===r.type?mi.isCharacterBox(r.base)?No:null:"horizBrace"===r.type&&!t.sub===r.isOver?Es:null:null},"htmlBuilderDelegate"),qn({type:"supsub",htmlBuilder(t,e){if(a=Fs(t,e))return a(t,e);var r,n,i,{base:a,sup:o,sub:s}=t,l=po(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&mi.isCharacterBox(a),s=(o&&(i=e.havingStyle(e.style.sup()),r=po(o,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),s&&(o=e.havingStyle(e.style.sub()),n=po(s,o,e),a||(u=l.depth+o.fontMetrics().subDrop*o.sizeMultiplier/e.sizeMultiplier)),i=e.style===Ci.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 sa||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){var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),qn({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[Us(),new E.MathNode("mtd",[bo(t.body,e)]),Us(),new E.MathNode("mtd",[bo(t.tag,e)])])])).setAttribute("width","100%"),t}}),qs={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ys={"\\textbf":"textbf","\\textmd":"textmd"},js={"\\textit":"textit","\\textup":"textup"},Hs=Ae((t,e)=>(t=t.font)?qs[t]?e.withTextFontFamily(qs[t]):Ys[t]?e.withTextFontWeight(Ys[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(js[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:to(e),font:r}},htmlBuilder(t,e){return e=Hs(t,e),t=oo(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Hs(t,e),bo(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=po(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",[wo(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=po(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",[wo(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=Ws(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Vs=Ka,Xs=new RegExp("[̀-ͯ]+$"),Ks=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 hi("EOF",new ci(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new hi(t[e],new ci(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 hi(n,new ci(this,e,this.tokenRegex.lastIndex))}},Zs=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{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=>tl(t,!1,!0)),h("\\renewcommand",t=>tl(t,!0,!1)),h("\\providecommand",t=>tl(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),Vs[r],pa.math[r],pa.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\\;"),el={",":"\\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 el?e=el[t]:("\\not"===t.slice(0,4)||t in pa.math&&mi.contains(["bin","rel"],pa.math[t].group))&&(e="\\dotsb"),e}),rl={")":!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 rl?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in rl&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in rl?"\\@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{"+(nl=K(Gi["Main-Regular"][84][1]-.7*Gi["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+nl+"}{\\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",(il=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",il(!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}"),al={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ol=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 Zs(Qs,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Ks(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 hi("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0this.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 hi(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 Ks(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)||Vs.hasOwnProperty(t)||pa.math.hasOwnProperty(t)||pa.text.hasOwnProperty(t)||al.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Vs.hasOwnProperty(t)&&!Vs[t].primitive}},sl=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ll=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),cl={"́":{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"}},hl={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(ul=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 ol(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 hi("}")),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&&Vs[n.text]&&Vs[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{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),bl.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 bl,wl,kl,Tl,El,_l,Cl,Sl,Al,Ll,Nl,Il,Ml,Rl,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,Yl,L,jl,Hl,Wl,Vl,Xl,Kl,Zl,Ql,Jl=t(()=>{bl=et(Mn(),1),wl=//gi,kl=Ae(t=>t?Il(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Tl=(()=>{let t=!1;return()=>{t||(xl(),t=!0)}})(),Ae(xl,"setupDompurifyHooks"),El=Ae(t=>(Tl(),bl.default.sanitize(t)),"removeScript"),_l=Ae((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=El(t):"loose"!==e&&(t=(t=(t=Il(t)).replace(//g,">")).replace(/=/g,"="),t=Nl(t))),t),"sanitizeMore"),Cl=Ae((t,e)=>t&&(e.dompurifyConfig?bl.default.sanitize(_l(t,e),e.dompurifyConfig):bl.default.sanitize(_l(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Sl=Ae((t,e)=>"string"==typeof t?Cl(t,e):t.flat().map(t=>Cl(t,e)),"sanitizeTextOrArray"),Al=Ae(t=>wl.test(t),"hasBreaks"),Ll=Ae(t=>t.split(wl),"splitBreaks"),Nl=Ae(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Il=Ae(t=>t.replace(wl,"#br#"),"breakToPlaceholder"),Ml=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"),Rl=Ae(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Dl=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Ol=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Pl=Ae(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;eMath.max(0,t.split(e).length-1),"countOccurrence"),Fl=Ae((t,e)=>(t=Bl(t,"~"),e=Bl(e,"~"),1===t&&1===e),"shouldCombineSets"),$l=Ae(t=>{let e=Bl(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"),zl=Ae(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Gl=/\$\$(.*)\$\$/g,Ul=Ae(t=>0<(t.match(Gl)?.length??0),"hasKatex"),ql=Ae(async(t,e)=>(t=await Yl(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"),Yl=Ae(async(t,e)=>{if(!Ul(t))return t;if(!(zl()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Gl,"MathML is unsupported in this environment.");let r=(await Promise.resolve().then(()=>(vl(),Rn))).default,n=e.forceLegacyMathML||!zl()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(wl).map(t=>Ul(t)?`
${t}
`:`
${t}
`).join("").replace(Gl,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),L={getRows:kl,sanitizeText:Cl,sanitizeTextOrArray:Sl,hasBreaks:Al,splitBreaks:Ll,lineBreakRegex:wl,removeScript:El,getUrl:Ml,evaluate:Rl,getMax:Dl,getMin:Ol}}),tc=t(()=>{e(),jl=Ae(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Hl=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"),Wl=Ae(function(t,e,r,n){e=Hl(e,r,n),jl(t,e)},"configureSvgSize"),Vl=Ae(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,o=(R.info(`SVG bounds: ${a}x`+(o=i.height),i),R.info("Graph bounds: 0x0",t),R.info(`Calculated bounds: ${t=a+2*r}x`+(a=o+2*r)),Wl(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",o)},"setupGraphViewbox")}),ec=t(()=>{e(),Xl={},Kl=Ae((t,e,r)=>{let n="";return t in Xl&&Xl[t]?n=Xl[t](r):R.warn("No theme found for "+t),` & { +-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"),zi=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 mi.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.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]}},Gi={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]},qi={"Å":"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(Fn,"setFontMetrics"),Ae($n,"getCharacterMetrics"),ji={},Ae(zn,"getGlobalMetrics"),Yi=[[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]],Hi=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Wi=Ae(function(t,e){return e.size<2?t:Yi[t-1][e.size-1]},"sizeAtStyle"),(Vi=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=Hi[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:Wi(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:Hi[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Wi(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=zn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Xi={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},Ki={ex:!0,em:!0,mu:!0},Zi=Ae(function(t){return(t="string"!=typeof t?t.unit:t)in Xi||t in Ki||"ex"===t},"validUnit"),Qi=Ae(function(t,e){var r;if(t.unit in Xi)r=Xi[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"),Ji=Ae(function(t){return t.filter(t=>t).join(" ")},"createClass"),ta=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"),ea=Ae(function(t){var e,r,n=document.createElement(t);for(e in n.className=Ji(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"},"toMarkup"),na=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,ta.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return mi.contains(this.classes,t)}toNode(){return ea.call(this,"span")}toMarkup(){return ra.call(this,"span")}},ia=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,ta.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return mi.contains(this.classes,t)}toNode(){return ea.call(this,"a")}toMarkup(){return ra.call(this,"a")}},aa=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 mi.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=''+mi.escape(this.alt)+'"}},sa={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},oa=class{static{Ae(this,"SymbolNode")}constructor(t,e,r,n,i,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(t=Pn(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=sa[this.text])}hasClass(t){return mi.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0":i}},la=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"}},ca=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",Fi[this.pathName]),t}toMarkup(){return this.alternate?'':''}},ha=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=""}},Ae(Un,"assertSymbolDomNode"),Ae(Gn,"assertSpan"),ua={bin:1,close:1,inner:1,open:1,punct:1,rel:1},da={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},pa={math:{},text:{}},Ae(o,"defineSymbol"),d="text",y="ams",il="accent-token",m="bin",No="close",Po="inner",ga="mathord",nl="op-token",gl="open",Do="punct",pl="spacing",g="textord",o(u="math",p="main",f="rel","≡","\\equiv",!0),o(u,p,f,"≺","\\prec",!0),o(u,p,f,"≻","\\succ",!0),o(u,p,f,"∼","\\sim",!0),o(u,p,f,"⊥","\\perp"),o(u,p,f,"⪯","\\preceq",!0),o(u,p,f,"⪰","\\succeq",!0),o(u,p,f,"≃","\\simeq",!0),o(u,p,f,"∣","\\mid",!0),o(u,p,f,"≪","\\ll",!0),o(u,p,f,"≫","\\gg",!0),o(u,p,f,"≍","\\asymp",!0),o(u,p,f,"∥","\\parallel"),o(u,p,f,"⋈","\\bowtie",!0),o(u,p,f,"⌣","\\smile",!0),o(u,p,f,"⊑","\\sqsubseteq",!0),o(u,p,f,"⊒","\\sqsupseteq",!0),o(u,p,f,"≐","\\doteq",!0),o(u,p,f,"⌢","\\frown",!0),o(u,p,f,"∋","\\ni",!0),o(u,p,f,"∝","\\propto",!0),o(u,p,f,"⊢","\\vdash",!0),o(u,p,f,"⊣","\\dashv",!0),o(u,p,f,"∋","\\owns"),o(u,p,Do,".","\\ldotp"),o(u,p,Do,"⋅","\\cdotp"),o(u,p,g,"#","\\#"),o(d,p,g,"#","\\#"),o(u,p,g,"&","\\&"),o(d,p,g,"&","\\&"),o(u,p,g,"ℵ","\\aleph",!0),o(u,p,g,"∀","\\forall",!0),o(u,p,g,"ℏ","\\hbar",!0),o(u,p,g,"∃","\\exists",!0),o(u,p,g,"∇","\\nabla",!0),o(u,p,g,"♭","\\flat",!0),o(u,p,g,"ℓ","\\ell",!0),o(u,p,g,"♮","\\natural",!0),o(u,p,g,"♣","\\clubsuit",!0),o(u,p,g,"℘","\\wp",!0),o(u,p,g,"♯","\\sharp",!0),o(u,p,g,"♢","\\diamondsuit",!0),o(u,p,g,"ℜ","\\Re",!0),o(u,p,g,"♡","\\heartsuit",!0),o(u,p,g,"ℑ","\\Im",!0),o(u,p,g,"♠","\\spadesuit",!0),o(u,p,g,"§","\\S",!0),o(d,p,g,"§","\\S"),o(u,p,g,"¶","\\P",!0),o(d,p,g,"¶","\\P"),o(u,p,g,"†","\\dag"),o(d,p,g,"†","\\dag"),o(d,p,g,"†","\\textdagger"),o(u,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\textdaggerdbl"),o(u,p,No,"⎱","\\rmoustache",!0),o(u,p,gl,"⎰","\\lmoustache",!0),o(u,p,No,"⟯","\\rgroup",!0),o(u,p,gl,"⟮","\\lgroup",!0),o(u,p,m,"∓","\\mp",!0),o(u,p,m,"⊖","\\ominus",!0),o(u,p,m,"⊎","\\uplus",!0),o(u,p,m,"⊓","\\sqcap",!0),o(u,p,m,"∗","\\ast"),o(u,p,m,"⊔","\\sqcup",!0),o(u,p,m,"◯","\\bigcirc",!0),o(u,p,m,"∙","\\bullet",!0),o(u,p,m,"‡","\\ddagger"),o(u,p,m,"≀","\\wr",!0),o(u,p,m,"⨿","\\amalg"),o(u,p,m,"&","\\And"),o(u,p,f,"⟵","\\longleftarrow",!0),o(u,p,f,"⇐","\\Leftarrow",!0),o(u,p,f,"⟸","\\Longleftarrow",!0),o(u,p,f,"⟶","\\longrightarrow",!0),o(u,p,f,"⇒","\\Rightarrow",!0),o(u,p,f,"⟹","\\Longrightarrow",!0),o(u,p,f,"↔","\\leftrightarrow",!0),o(u,p,f,"⟷","\\longleftrightarrow",!0),o(u,p,f,"⇔","\\Leftrightarrow",!0),o(u,p,f,"⟺","\\Longleftrightarrow",!0),o(u,p,f,"↦","\\mapsto",!0),o(u,p,f,"⟼","\\longmapsto",!0),o(u,p,f,"↗","\\nearrow",!0),o(u,p,f,"↩","\\hookleftarrow",!0),o(u,p,f,"↪","\\hookrightarrow",!0),o(u,p,f,"↘","\\searrow",!0),o(u,p,f,"↼","\\leftharpoonup",!0),o(u,p,f,"⇀","\\rightharpoonup",!0),o(u,p,f,"↙","\\swarrow",!0),o(u,p,f,"↽","\\leftharpoondown",!0),o(u,p,f,"⇁","\\rightharpoondown",!0),o(u,p,f,"↖","\\nwarrow",!0),o(u,p,f,"⇌","\\rightleftharpoons",!0),o(u,y,f,"≮","\\nless",!0),o(u,y,f,"","\\@nleqslant"),o(u,y,f,"","\\@nleqq"),o(u,y,f,"⪇","\\lneq",!0),o(u,y,f,"≨","\\lneqq",!0),o(u,y,f,"","\\@lvertneqq"),o(u,y,f,"⋦","\\lnsim",!0),o(u,y,f,"⪉","\\lnapprox",!0),o(u,y,f,"⊀","\\nprec",!0),o(u,y,f,"⋠","\\npreceq",!0),o(u,y,f,"⋨","\\precnsim",!0),o(u,y,f,"⪹","\\precnapprox",!0),o(u,y,f,"≁","\\nsim",!0),o(u,y,f,"","\\@nshortmid"),o(u,y,f,"∤","\\nmid",!0),o(u,y,f,"⊬","\\nvdash",!0),o(u,y,f,"⊭","\\nvDash",!0),o(u,y,f,"⋪","\\ntriangleleft"),o(u,y,f,"⋬","\\ntrianglelefteq",!0),o(u,y,f,"⊊","\\subsetneq",!0),o(u,y,f,"","\\@varsubsetneq"),o(u,y,f,"⫋","\\subsetneqq",!0),o(u,y,f,"","\\@varsubsetneqq"),o(u,y,f,"≯","\\ngtr",!0),o(u,y,f,"","\\@ngeqslant"),o(u,y,f,"","\\@ngeqq"),o(u,y,f,"⪈","\\gneq",!0),o(u,y,f,"≩","\\gneqq",!0),o(u,y,f,"","\\@gvertneqq"),o(u,y,f,"⋧","\\gnsim",!0),o(u,y,f,"⪊","\\gnapprox",!0),o(u,y,f,"⊁","\\nsucc",!0),o(u,y,f,"⋡","\\nsucceq",!0),o(u,y,f,"⋩","\\succnsim",!0),o(u,y,f,"⪺","\\succnapprox",!0),o(u,y,f,"≆","\\ncong",!0),o(u,y,f,"","\\@nshortparallel"),o(u,y,f,"∦","\\nparallel",!0),o(u,y,f,"⊯","\\nVDash",!0),o(u,y,f,"⋫","\\ntriangleright"),o(u,y,f,"⋭","\\ntrianglerighteq",!0),o(u,y,f,"","\\@nsupseteqq"),o(u,y,f,"⊋","\\supsetneq",!0),o(u,y,f,"","\\@varsupsetneq"),o(u,y,f,"⫌","\\supsetneqq",!0),o(u,y,f,"","\\@varsupsetneqq"),o(u,y,f,"⊮","\\nVdash",!0),o(u,y,f,"⪵","\\precneqq",!0),o(u,y,f,"⪶","\\succneqq",!0),o(u,y,f,"","\\@nsubseteqq"),o(u,y,m,"⊴","\\unlhd"),o(u,y,m,"⊵","\\unrhd"),o(u,y,f,"↚","\\nleftarrow",!0),o(u,y,f,"↛","\\nrightarrow",!0),o(u,y,f,"⇍","\\nLeftarrow",!0),o(u,y,f,"⇏","\\nRightarrow",!0),o(u,y,f,"↮","\\nleftrightarrow",!0),o(u,y,f,"⇎","\\nLeftrightarrow",!0),o(u,y,f,"△","\\vartriangle"),o(u,y,g,"ℏ","\\hslash"),o(u,y,g,"▽","\\triangledown"),o(u,y,g,"◊","\\lozenge"),o(u,y,g,"Ⓢ","\\circledS"),o(u,y,g,"®","\\circledR"),o(d,y,g,"®","\\circledR"),o(u,y,g,"∡","\\measuredangle",!0),o(u,y,g,"∄","\\nexists"),o(u,y,g,"℧","\\mho"),o(u,y,g,"Ⅎ","\\Finv",!0),o(u,y,g,"⅁","\\Game",!0),o(u,y,g,"‵","\\backprime"),o(u,y,g,"▲","\\blacktriangle"),o(u,y,g,"▼","\\blacktriangledown"),o(u,y,g,"■","\\blacksquare"),o(u,y,g,"⧫","\\blacklozenge"),o(u,y,g,"★","\\bigstar"),o(u,y,g,"∢","\\sphericalangle",!0),o(u,y,g,"∁","\\complement",!0),o(u,y,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,y,g,"╱","\\diagup"),o(u,y,g,"╲","\\diagdown"),o(u,y,g,"□","\\square"),o(u,y,g,"□","\\Box"),o(u,y,g,"◊","\\Diamond"),o(u,y,g,"¥","\\yen",!0),o(d,y,g,"¥","\\yen",!0),o(u,y,g,"✓","\\checkmark",!0),o(d,y,g,"✓","\\checkmark"),o(u,y,g,"ℶ","\\beth",!0),o(u,y,g,"ℸ","\\daleth",!0),o(u,y,g,"ℷ","\\gimel",!0),o(u,y,g,"ϝ","\\digamma",!0),o(u,y,g,"ϰ","\\varkappa"),o(u,y,gl,"┌","\\@ulcorner",!0),o(u,y,No,"┐","\\@urcorner",!0),o(u,y,gl,"└","\\@llcorner",!0),o(u,y,No,"┘","\\@lrcorner",!0),o(u,y,f,"≦","\\leqq",!0),o(u,y,f,"⩽","\\leqslant",!0),o(u,y,f,"⪕","\\eqslantless",!0),o(u,y,f,"≲","\\lesssim",!0),o(u,y,f,"⪅","\\lessapprox",!0),o(u,y,f,"≊","\\approxeq",!0),o(u,y,m,"⋖","\\lessdot"),o(u,y,f,"⋘","\\lll",!0),o(u,y,f,"≶","\\lessgtr",!0),o(u,y,f,"⋚","\\lesseqgtr",!0),o(u,y,f,"⪋","\\lesseqqgtr",!0),o(u,y,f,"≑","\\doteqdot"),o(u,y,f,"≓","\\risingdotseq",!0),o(u,y,f,"≒","\\fallingdotseq",!0),o(u,y,f,"∽","\\backsim",!0),o(u,y,f,"⋍","\\backsimeq",!0),o(u,y,f,"⫅","\\subseteqq",!0),o(u,y,f,"⋐","\\Subset",!0),o(u,y,f,"⊏","\\sqsubset",!0),o(u,y,f,"≼","\\preccurlyeq",!0),o(u,y,f,"⋞","\\curlyeqprec",!0),o(u,y,f,"≾","\\precsim",!0),o(u,y,f,"⪷","\\precapprox",!0),o(u,y,f,"⊲","\\vartriangleleft"),o(u,y,f,"⊴","\\trianglelefteq"),o(u,y,f,"⊨","\\vDash",!0),o(u,y,f,"⊪","\\Vvdash",!0),o(u,y,f,"⌣","\\smallsmile"),o(u,y,f,"⌢","\\smallfrown"),o(u,y,f,"≏","\\bumpeq",!0),o(u,y,f,"≎","\\Bumpeq",!0),o(u,y,f,"≧","\\geqq",!0),o(u,y,f,"⩾","\\geqslant",!0),o(u,y,f,"⪖","\\eqslantgtr",!0),o(u,y,f,"≳","\\gtrsim",!0),o(u,y,f,"⪆","\\gtrapprox",!0),o(u,y,m,"⋗","\\gtrdot"),o(u,y,f,"⋙","\\ggg",!0),o(u,y,f,"≷","\\gtrless",!0),o(u,y,f,"⋛","\\gtreqless",!0),o(u,y,f,"⪌","\\gtreqqless",!0),o(u,y,f,"≖","\\eqcirc",!0),o(u,y,f,"≗","\\circeq",!0),o(u,y,f,"≜","\\triangleq",!0),o(u,y,f,"∼","\\thicksim"),o(u,y,f,"≈","\\thickapprox"),o(u,y,f,"⫆","\\supseteqq",!0),o(u,y,f,"⋑","\\Supset",!0),o(u,y,f,"⊐","\\sqsupset",!0),o(u,y,f,"≽","\\succcurlyeq",!0),o(u,y,f,"⋟","\\curlyeqsucc",!0),o(u,y,f,"≿","\\succsim",!0),o(u,y,f,"⪸","\\succapprox",!0),o(u,y,f,"⊳","\\vartriangleright"),o(u,y,f,"⊵","\\trianglerighteq"),o(u,y,f,"⊩","\\Vdash",!0),o(u,y,f,"∣","\\shortmid"),o(u,y,f,"∥","\\shortparallel"),o(u,y,f,"≬","\\between",!0),o(u,y,f,"⋔","\\pitchfork",!0),o(u,y,f,"∝","\\varpropto"),o(u,y,f,"◀","\\blacktriangleleft"),o(u,y,f,"∴","\\therefore",!0),o(u,y,f,"∍","\\backepsilon"),o(u,y,f,"▶","\\blacktriangleright"),o(u,y,f,"∵","\\because",!0),o(u,y,f,"⋘","\\llless"),o(u,y,f,"⋙","\\gggtr"),o(u,y,m,"⊲","\\lhd"),o(u,y,m,"⊳","\\rhd"),o(u,y,f,"≂","\\eqsim",!0),o(u,p,f,"⋈","\\Join"),o(u,y,f,"≑","\\Doteq",!0),o(u,y,m,"∔","\\dotplus",!0),o(u,y,m,"∖","\\smallsetminus"),o(u,y,m,"⋒","\\Cap",!0),o(u,y,m,"⋓","\\Cup",!0),o(u,y,m,"⩞","\\doublebarwedge",!0),o(u,y,m,"⊟","\\boxminus",!0),o(u,y,m,"⊞","\\boxplus",!0),o(u,y,m,"⋇","\\divideontimes",!0),o(u,y,m,"⋉","\\ltimes",!0),o(u,y,m,"⋊","\\rtimes",!0),o(u,y,m,"⋋","\\leftthreetimes",!0),o(u,y,m,"⋌","\\rightthreetimes",!0),o(u,y,m,"⋏","\\curlywedge",!0),o(u,y,m,"⋎","\\curlyvee",!0),o(u,y,m,"⊝","\\circleddash",!0),o(u,y,m,"⊛","\\circledast",!0),o(u,y,m,"⋅","\\centerdot"),o(u,y,m,"⊺","\\intercal",!0),o(u,y,m,"⋒","\\doublecap"),o(u,y,m,"⋓","\\doublecup"),o(u,y,m,"⊠","\\boxtimes",!0),o(u,y,f,"⇢","\\dashrightarrow",!0),o(u,y,f,"⇠","\\dashleftarrow",!0),o(u,y,f,"⇇","\\leftleftarrows",!0),o(u,y,f,"⇆","\\leftrightarrows",!0),o(u,y,f,"⇚","\\Lleftarrow",!0),o(u,y,f,"↞","\\twoheadleftarrow",!0),o(u,y,f,"↢","\\leftarrowtail",!0),o(u,y,f,"↫","\\looparrowleft",!0),o(u,y,f,"⇋","\\leftrightharpoons",!0),o(u,y,f,"↶","\\curvearrowleft",!0),o(u,y,f,"↺","\\circlearrowleft",!0),o(u,y,f,"↰","\\Lsh",!0),o(u,y,f,"⇈","\\upuparrows",!0),o(u,y,f,"↿","\\upharpoonleft",!0),o(u,y,f,"⇃","\\downharpoonleft",!0),o(u,p,f,"⊶","\\origof",!0),o(u,p,f,"⊷","\\imageof",!0),o(u,y,f,"⊸","\\multimap",!0),o(u,y,f,"↭","\\leftrightsquigarrow",!0),o(u,y,f,"⇉","\\rightrightarrows",!0),o(u,y,f,"⇄","\\rightleftarrows",!0),o(u,y,f,"↠","\\twoheadrightarrow",!0),o(u,y,f,"↣","\\rightarrowtail",!0),o(u,y,f,"↬","\\looparrowright",!0),o(u,y,f,"↷","\\curvearrowright",!0),o(u,y,f,"↻","\\circlearrowright",!0),o(u,y,f,"↱","\\Rsh",!0),o(u,y,f,"⇊","\\downdownarrows",!0),o(u,y,f,"↾","\\upharpoonright",!0),o(u,y,f,"⇂","\\downharpoonright",!0),o(u,y,f,"⇝","\\rightsquigarrow",!0),o(u,y,f,"⇝","\\leadsto"),o(u,y,f,"⇛","\\Rrightarrow",!0),o(u,y,f,"↾","\\restriction"),o(u,p,g,"‘","`"),o(u,p,g,"$","\\$"),o(d,p,g,"$","\\$"),o(d,p,g,"$","\\textdollar"),o(u,p,g,"%","\\%"),o(d,p,g,"%","\\%"),o(u,p,g,"_","\\_"),o(d,p,g,"_","\\_"),o(d,p,g,"_","\\textunderscore"),o(u,p,g,"∠","\\angle",!0),o(u,p,g,"∞","\\infty",!0),o(u,p,g,"′","\\prime"),o(u,p,g,"△","\\triangle"),o(u,p,g,"Γ","\\Gamma",!0),o(u,p,g,"Δ","\\Delta",!0),o(u,p,g,"Θ","\\Theta",!0),o(u,p,g,"Λ","\\Lambda",!0),o(u,p,g,"Ξ","\\Xi",!0),o(u,p,g,"Π","\\Pi",!0),o(u,p,g,"Σ","\\Sigma",!0),o(u,p,g,"Υ","\\Upsilon",!0),o(u,p,g,"Φ","\\Phi",!0),o(u,p,g,"Ψ","\\Psi",!0),o(u,p,g,"Ω","\\Omega",!0),o(u,p,g,"A","Α"),o(u,p,g,"B","Β"),o(u,p,g,"E","Ε"),o(u,p,g,"Z","Ζ"),o(u,p,g,"H","Η"),o(u,p,g,"I","Ι"),o(u,p,g,"K","Κ"),o(u,p,g,"M","Μ"),o(u,p,g,"N","Ν"),o(u,p,g,"O","Ο"),o(u,p,g,"P","Ρ"),o(u,p,g,"T","Τ"),o(u,p,g,"X","Χ"),o(u,p,g,"¬","\\neg",!0),o(u,p,g,"¬","\\lnot"),o(u,p,g,"⊤","\\top"),o(u,p,g,"⊥","\\bot"),o(u,p,g,"∅","\\emptyset"),o(u,y,g,"∅","\\varnothing"),o(u,p,ga,"α","\\alpha",!0),o(u,p,ga,"β","\\beta",!0),o(u,p,ga,"γ","\\gamma",!0),o(u,p,ga,"δ","\\delta",!0),o(u,p,ga,"ϵ","\\epsilon",!0),o(u,p,ga,"ζ","\\zeta",!0),o(u,p,ga,"η","\\eta",!0),o(u,p,ga,"θ","\\theta",!0),o(u,p,ga,"ι","\\iota",!0),o(u,p,ga,"κ","\\kappa",!0),o(u,p,ga,"λ","\\lambda",!0),o(u,p,ga,"μ","\\mu",!0),o(u,p,ga,"ν","\\nu",!0),o(u,p,ga,"ξ","\\xi",!0),o(u,p,ga,"ο","\\omicron",!0),o(u,p,ga,"π","\\pi",!0),o(u,p,ga,"ρ","\\rho",!0),o(u,p,ga,"σ","\\sigma",!0),o(u,p,ga,"τ","\\tau",!0),o(u,p,ga,"υ","\\upsilon",!0),o(u,p,ga,"ϕ","\\phi",!0),o(u,p,ga,"χ","\\chi",!0),o(u,p,ga,"ψ","\\psi",!0),o(u,p,ga,"ω","\\omega",!0),o(u,p,ga,"ε","\\varepsilon",!0),o(u,p,ga,"ϑ","\\vartheta",!0),o(u,p,ga,"ϖ","\\varpi",!0),o(u,p,ga,"ϱ","\\varrho",!0),o(u,p,ga,"ς","\\varsigma",!0),o(u,p,ga,"φ","\\varphi",!0),o(u,p,m,"∗","*",!0),o(u,p,m,"+","+"),o(u,p,m,"−","-",!0),o(u,p,m,"⋅","\\cdot",!0),o(u,p,m,"∘","\\circ",!0),o(u,p,m,"÷","\\div",!0),o(u,p,m,"±","\\pm",!0),o(u,p,m,"×","\\times",!0),o(u,p,m,"∩","\\cap",!0),o(u,p,m,"∪","\\cup",!0),o(u,p,m,"∖","\\setminus",!0),o(u,p,m,"∧","\\land"),o(u,p,m,"∨","\\lor"),o(u,p,m,"∧","\\wedge",!0),o(u,p,m,"∨","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,gl,"⟨","\\langle",!0),o(u,p,gl,"∣","\\lvert"),o(u,p,gl,"∥","\\lVert"),o(u,p,No,"?","?"),o(u,p,No,"!","!"),o(u,p,No,"⟩","\\rangle",!0),o(u,p,No,"∣","\\rvert"),o(u,p,No,"∥","\\rVert"),o(u,p,f,"=","="),o(u,p,f,":",":"),o(u,p,f,"≈","\\approx",!0),o(u,p,f,"≅","\\cong",!0),o(u,p,f,"≥","\\ge"),o(u,p,f,"≥","\\geq",!0),o(u,p,f,"←","\\gets"),o(u,p,f,">","\\gt",!0),o(u,p,f,"∈","\\in",!0),o(u,p,f,"","\\@not"),o(u,p,f,"⊂","\\subset",!0),o(u,p,f,"⊃","\\supset",!0),o(u,p,f,"⊆","\\subseteq",!0),o(u,p,f,"⊇","\\supseteq",!0),o(u,y,f,"⊈","\\nsubseteq",!0),o(u,y,f,"⊉","\\nsupseteq",!0),o(u,p,f,"⊨","\\models"),o(u,p,f,"←","\\leftarrow",!0),o(u,p,f,"≤","\\le"),o(u,p,f,"≤","\\leq",!0),o(u,p,f,"<","\\lt",!0),o(u,p,f,"→","\\rightarrow",!0),o(u,p,f,"→","\\to"),o(u,y,f,"≱","\\ngeq",!0),o(u,y,f,"≰","\\nleq",!0),o(u,p,pl," ","\\ "),o(u,p,pl," ","\\space"),o(u,p,pl," ","\\nobreakspace"),o(d,p,pl," ","\\ "),o(d,p,pl," "," "),o(d,p,pl," ","\\space"),o(d,p,pl," ","\\nobreakspace"),o(u,p,pl,null,"\\nobreak"),o(u,p,pl,null,"\\allowbreak"),o(u,p,Do,",",","),o(u,p,Do,";",";"),o(u,y,m,"⊼","\\barwedge",!0),o(u,y,m,"⊻","\\veebar",!0),o(u,p,m,"⊙","\\odot",!0),o(u,p,m,"⊕","\\oplus",!0),o(u,p,m,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,m,"⊘","\\oslash",!0),o(u,y,m,"⊚","\\circledcirc",!0),o(u,y,m,"⊡","\\boxdot",!0),o(u,p,m,"△","\\bigtriangleup"),o(u,p,m,"▽","\\bigtriangledown"),o(u,p,m,"†","\\dagger"),o(u,p,m,"⋄","\\diamond"),o(u,p,m,"⋆","\\star"),o(u,p,m,"◃","\\triangleleft"),o(u,p,m,"▹","\\triangleright"),o(u,p,gl,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,No,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,gl,"{","\\lbrace"),o(u,p,No,"}","\\rbrace"),o(u,p,gl,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,No,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,gl,"(","\\lparen",!0),o(u,p,No,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,gl,"⌊","\\lfloor",!0),o(u,p,No,"⌋","\\rfloor",!0),o(u,p,gl,"⌈","\\lceil",!0),o(u,p,No,"⌉","\\rceil",!0),o(u,p,g,"\\","\\backslash"),o(u,p,g,"∣","|"),o(u,p,g,"∣","\\vert"),o(d,p,g,"|","\\textbar",!0),o(u,p,g,"∥","\\|"),o(u,p,g,"∥","\\Vert"),o(d,p,g,"∥","\\textbardbl"),o(d,p,g,"~","\\textasciitilde"),o(d,p,g,"\\","\\textbackslash"),o(d,p,g,"^","\\textasciicircum"),o(u,p,f,"↑","\\uparrow",!0),o(u,p,f,"⇑","\\Uparrow",!0),o(u,p,f,"↓","\\downarrow",!0),o(u,p,f,"⇓","\\Downarrow",!0),o(u,p,f,"↕","\\updownarrow",!0),o(u,p,f,"⇕","\\Updownarrow",!0),o(u,p,nl,"∐","\\coprod"),o(u,p,nl,"⋁","\\bigvee"),o(u,p,nl,"⋀","\\bigwedge"),o(u,p,nl,"⨄","\\biguplus"),o(u,p,nl,"⋂","\\bigcap"),o(u,p,nl,"⋃","\\bigcup"),o(u,p,nl,"∫","\\int"),o(u,p,nl,"∫","\\intop"),o(u,p,nl,"∬","\\iint"),o(u,p,nl,"∭","\\iiint"),o(u,p,nl,"∏","\\prod"),o(u,p,nl,"∑","\\sum"),o(u,p,nl,"⨂","\\bigotimes"),o(u,p,nl,"⨁","\\bigoplus"),o(u,p,nl,"⨀","\\bigodot"),o(u,p,nl,"∮","\\oint"),o(u,p,nl,"∯","\\oiint"),o(u,p,nl,"∰","\\oiiint"),o(u,p,nl,"⨆","\\bigsqcup"),o(u,p,nl,"∫","\\smallint"),o(d,p,Po,"…","\\textellipsis"),o(u,p,Po,"…","\\mathellipsis"),o(d,p,Po,"…","\\ldots",!0),o(u,p,Po,"…","\\ldots",!0),o(u,p,Po,"⋯","\\@cdots",!0),o(u,p,Po,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(u,p,il,"ˊ","\\acute"),o(u,p,il,"ˋ","\\grave"),o(u,p,il,"¨","\\ddot"),o(u,p,il,"~","\\tilde"),o(u,p,il,"ˉ","\\bar"),o(u,p,il,"˘","\\breve"),o(u,p,il,"ˇ","\\check"),o(u,p,il,"^","\\hat"),o(u,p,il,"⃗","\\vec"),o(u,p,il,"˙","\\dot"),o(u,p,il,"˚","\\mathring"),o(u,p,ga,"","\\@imath"),o(u,p,ga,"","\\@jmath"),o(u,p,g,"ı","ı"),o(u,p,g,"ȷ","ȷ"),o(d,p,g,"ı","\\i",!0),o(d,p,g,"ȷ","\\j",!0),o(d,p,g,"ß","\\ss",!0),o(d,p,g,"æ","\\ae",!0),o(d,p,g,"œ","\\oe",!0),o(d,p,g,"ø","\\o",!0),o(d,p,g,"Æ","\\AE",!0),o(d,p,g,"Œ","\\OE",!0),o(d,p,g,"Ø","\\O",!0),o(d,p,il,"ˊ","\\'"),o(d,p,il,"ˋ","\\`"),o(d,p,il,"ˆ","\\^"),o(d,p,il,"˜","\\~"),o(d,p,il,"ˉ","\\="),o(d,p,il,"˘","\\u"),o(d,p,il,"˙","\\."),o(d,p,il,"¸","\\c"),o(d,p,il,"˚","\\r"),o(d,p,il,"ˇ","\\v"),o(d,p,il,"¨",'\\"'),o(d,p,il,"˝","\\H"),o(d,p,il,"◯","\\textcircled"),fa={"--":!0,"---":!0,"``":!0,"''":!0},o(d,p,g,"–","--",!0),o(d,p,g,"–","\\textendash"),o(d,p,g,"—","---",!0),o(d,p,g,"—","\\textemdash"),o(d,p,g,"‘","`",!0),o(d,p,g,"‘","\\textquoteleft"),o(d,p,g,"’","'",!0),o(d,p,g,"’","\\textquoteright"),o(d,p,g,"“","``",!0),o(d,p,g,"“","\\textquotedblleft"),o(d,p,g,"”","''",!0),o(d,p,g,"”","\\textquotedblright"),o(u,p,g,"°","\\degree",!0),o(d,p,g,"°","\\degree"),o(d,p,g,"°","\\textdegree",!0),o(u,p,g,"£","\\pounds"),o(u,p,g,"£","\\mathsterling",!0),o(d,p,g,"£","\\pounds"),o(d,p,g,"£","\\textsterling",!0),o(u,y,g,"✠","\\maltese"),o(d,y,g,"✠","\\maltese"),ma='0123456789/@."',va=0;va{if(Ji(t.classes)!==Ji(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;ee&&(e=a.height),rnew na(t,e,r,n),"makeSvgSpan"),gl=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"),No=Ae(function(t,e,r,n){return t=new ia(t,e,r,n),za(t),t},"makeAnchor"),qa=Ae(function(t){return t=new zi(t),za(t),t},"makeFragment"),f=Ae(function(t,e){return t instanceof zi?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{var r=Ua(["mspace"],[],e),t=Qi(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Ya=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"),Ha={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"}},Wa={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},il=Ae(function(t,e){var[t,r,n]=Wa[t],t=new ca(t),t=new la([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=Ga(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Ha,makeSymbol:Ba,mathsym:pl,makeSpan:Ua,makeSvgSpan:Ga,makeLineSpan:gl,makeAnchor:No,makeFragment:qa,wrapFragment:f,makeVList:nl,makeOrd:Do,makeGlue:Po,staticSvg:il,svgData:Wa,tryCombineChars:m},Va={mord:{mop:y={number:3,unit:"mu"},mbin:pl={number:4,unit:"mu"},mrel:gl={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:gl,minner:y},mbin:{mord:pl,mop:pl,mopen:pl,minner:pl},mrel:{mord:gl,mop:gl,mopen:gl,minner:gl},mopen:{},mclose:{mop:y,mbin:pl,mrel:gl,minner:y},mpunct:{mord:y,mop:y,mrel:gl,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:pl,mrel:gl,mopen:y,mpunct:y,minner:y}},Xa={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Ka={},Za={},Qa={},Ae(l,"defineFunction"),Ae(qn,"defineFunctionBuilders"),Ja=Ae(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),ts=Ae(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),es=Z.makeSpan,rs=["leftmost","mbin","mopen","mrel","mop","mpunct"],ns=["rightmost","mrel","mclose","mpunct"],is={display:Ci.DISPLAY,text:Ci.TEXT,script:Ci.SCRIPT,scriptscript:Ci.SCRIPTSCRIPT},as={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ss=Ae(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o{var r=e.classes[0],n=t.classes[0];"mbin"===r&&mi.contains(ns,n)?e.classes[0]="mord":"mbin"===n&&mi.contains(rs,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),os(s,(t,e)=>{var e=hs(e),r=hs(t);if(t=e&&r?(t.hasClass("mtight")?Xa:Va)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),s},"buildExpression"),os=Ae(function t(r,e,n,i,a){i&&r.push(i);for(var s=0;st=>{r.splice(e+1,0,t),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),ls=Ae(function(t){return t instanceof zi||t instanceof ia||t instanceof na&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),cs=Ae(function t(e,r){var n=ls(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"),hs=Ae(function(t,e){return t&&(e&&(t=cs(t,e)),as[t.classes[0]])||null},"getTypeOfDomTree"),us=Ae(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),es(e.concat(t))},"makeNullDelimiter"),ds=Ae(function(t,e,r){if(!t)return es();var n;if(Za[t.type])return n=Za[t.type](t,e),r&&e.size!==r.size&&(n=es(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(Yn,"buildHTML"),Ae(Hn,"newDocumentFragment"),ps=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"}toText(){return this.children.map(t=>t.toText()).join("")}},gs=class{static{Ae(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return mi.escape(this.toText())}toText(){return this.text}},No=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?""+this.character+"":''}toText(){return this.character||" "}},_={MathNode:ps,TextNode:gs,SpaceNode:No,newDocumentFragment:Hn},fs=Ae(function(t,e,r){return!pa[e][t]||!pa[e][t].replace||55349===t.charCodeAt(0)||fa.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=pa[e][t].replace),new _.TextNode(t)},"makeText"),ms=Ae(function(t){return 1===t.length?t[0]:new _.MathNode("mrow",t)},"makeRow"),ys=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":!mi.contains(["\\imath","\\jmath"],t=t.text)&&$n(t=pa[r][t]&&pa[r][t].replace?pa[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),vs=Ae(function(t,e,r){var n;if(1===t.length)return n=bs(t[0],e),r&&n instanceof ps&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s{t&&"supsub"===t.type?(o=(r=Vn(t.base,"accent")).base,t.base=o,n=Gn(ds(t,e)),t.base=r):o=(r=Vn(t,"accent")).base;var r,n,i,a,t=ds(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&mi.isCharacterBox(o)&&(o=mi.getBaseElem(o),s=Un(ds(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=As.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=t.isStretchy?As.mathMLnode(t.label):new _.MathNode("mo",[fs(t.label,t.mode)]);return(t=new _.MathNode("mover",[bs(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Ns=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=Ja(e[0]),r=!Ns.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:Ls,mathmlBuilder:Po}),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:Ls,mathmlBuilder:Po}),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=ds(t.base,e),n=As.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=As.mathMLnode(t.label);return(t=new _.MathNode("munder",[bs(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Is=Ae(t=>((t=new _.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(ds(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Z.wrapFragment(ds(t.below,i,e),e)).classes.push(s+"-arrow-pad")),As.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,s=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25"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:Rs(e[0]),body:ts(e[1]),isCharacterBox:mi.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?Rs(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:ts(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:mi.isCharacterBox(n)}},htmlBuilder:Zn,mathmlBuilder:Qn}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:Rs(e[0]),body:ts(e[0])}},htmlBuilder(t,e){var r=ss(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=vs(t.body,e),(e=new _.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),Ds={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Os=Ae(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Ps=Ae(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),Bs=Ae((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),Ae(Jn,"cdArrow"),Ae(ti,"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(ds(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 _.MathNode("mrow",[bs(t.label,e)]),(e=new _.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new _.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(ds(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new _.MathNode("mrow",[bs(t.fragment,e)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Vn(e[0],"ordgroup").body,n="",i=0;i>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),il=Ae((t,e)=>(e=ss(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=Ae((t,e)=>(e=vs(t.body,e.withColor(t.color)),(e=new _.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=Vn(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:ts(e[1])}},htmlBuilder:il,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Vn(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:il,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&&Vn(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(Qi(t.size,e))),r},mathmlBuilder(t,e){var r=new _.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(Qi(t.size,e))),r}}),Fs={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},$s=Ae(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),zs=Ae(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),Us=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(Fs[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=Fs[r.text]),Vn(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,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){i=e.gullet.future(),s[a].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=e.gullet.consumeArg().tokens;return i&&o.unshift(i),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},t===Fs[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=$s(t.gullet.popToken()),n=(t.gullet.consumeSpaces(),zs(t));return Us(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=$s(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return Us(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),Gs=Ae(function(t,e,r){if(r=$n(pa.math[t]&&pa.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),qs=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"),js=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"),Ys=Ae(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=qs(t,e,n,a),r&&js(i,n,e),i},"makeSmallDelim"),Hs=Ae(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Ws=Ae(function(t,e,r,n,i,a){return t=Hs(t,e,i,n),i=qs(Z.makeSpan(["delimsizing","size"+e],[t],n),Ci.TEXT,n,a),r&&js(i,n,Ci.TEXT),i},"makeLargeDelim"),Vs=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"),Xs=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 ca("inner",Bi(t,Math.round(1e3*e))),t=new la([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"),Ks={type:"kern",size:-.008},Zs=["|","\\lvert","\\rvert","\\vert"],Qs=["\\|","\\lVert","\\rVert","\\Vert"],Js=Ae(function(t,e,r,n,i,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):mi.contains(Zs,t)?(s="∣",c="vert",h=333):mi.contains(Qs,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=Gs(u,p,i)).height+t.depth),g=(g=Gs(s,p,i)).height+g.depth,f=(f=Gs(o,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=Gs(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","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],io=[0,1.2,1.8,2.4,3],gl=Ae(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),mi.contains(eo,t)||mi.contains(no,t))return Ws(t,e,!1,r,n,i);if(mi.contains(ro,t))return Js(t,io[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ao=[{type:"small",style:Ci.SCRIPTSCRIPT},{type:"small",style:Ci.SCRIPT},{type:"small",style:Ci.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],so=[{type:"small",style:Ci.SCRIPTSCRIPT},{type:"small",style:Ci.SCRIPT},{type:"small",style:Ci.TEXT},{type:"stack"}],oo=[{type:"small",style:Ci.SCRIPTSCRIPT},{type:"small",style:Ci.SCRIPT},{type:"small",style:Ci.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],lo=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"),co=Ae(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=mi.contains(no,t)?ao:mi.contains(eo,t)?oo:so;return"small"===(s=co(t,e,s,n)).type?Ys(t,s.style,r,n,i,a):"large"===s.type?Ws(t,s.size,r,n,i,a):Js(t,e,r,n,i,a)},"makeCustomSizedDelim"),y=Ae(function(t,e,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return ho(t,r,!0,n,i,a)},"makeLeftRightDelim"),uo={sqrtImage:pl,sizedDelim:gl,sizeToMaxHeight:io,customSizedDelim:ho,leftRightDelim:y},po={"\\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}},go=["(","\\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(ei,"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=ei(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:po[t.funcName].size,mclass:po[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:Ae((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):uo.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:Ae(t=>{var e=[],e=("."!==t.delim&&e.push(fs(t.delim,t.mode)),new _.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(uo.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),Ae(ri,"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:ei(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{var e=ei(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Vn(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)=>{ri(t);for(var r,n=ss(t.body,e,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o{ri(t);var r,e=vs(t.body,e);return"."!==t.left&&((r=new _.MathNode("mo",[fs(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new _.MathNode("mo",[fs(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),ms(e)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{if(e=ei(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=us(e,[]):(r=uo.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?fs("|","text"):fs(t.delim,t.mode),(t=new _.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),No=Ae((t,e)=>{var r,n,i,a,s,o=Z.wrapFragment(ds(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=mi.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=Qi({number:.6,unit:"pt"},e),s=Qi({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=Di(c),i=new la([new ca("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=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.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-o.depth)):c=u?.2:0,r=As.encloseSpan(o,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=o.depth+i,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),Do=Ae((t,e)=>{var r=new _.MathNode(-1{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),Ae(ai,"getAutoTag"),Ae(si,"parseArray"),Ae(oi,"dCellStyle"),f=Ae(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,n=0,i=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Ci.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?Qi({number:3,unit:"ex"},e):12*o),B=3*o,F=.7*(o=t.arraystretch*c),$=.3*o,h=0;function u(t){for(var e=0;et))for(R=0;Rt.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:nl}),ni({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=si(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:nl}),ni({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Kn(e[0])?[e[0]]:Vn(e[0],"ordgroup").body).map(function(t){var e=Xn(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{var r=t.font,e=e.withFont(r);return ds(t.body,e)},"htmlBuilder$5"),m=Ae((t,e)=>{var r=t.font,e=e.withFont(r);return bs(t.body,e)},"mathmlBuilder$4"),bo={"\\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=Ja(e[0]);return{type:"font",mode:t.mode,font:(r=r in bo?bo[r]:r).slice(1),body:e}},"handler"),htmlBuilder:il,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:Ae((t,e)=>{var t=t.parser,e=e[0],r=mi.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:Rs(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:il,mathmlBuilder:m}),wo=Ae((t,e)=>("display"===t?e=e.id>=Ci.SCRIPT.id?e.text():Ci.DISPLAY:"text"===t&&e.size===Ci.DISPLAY.size?e=Ci.TEXT:"script"===t?e=Ci.SCRIPT:"scriptscript"===t&&(e=Ci.SCRIPTSCRIPT),e),"adjustStyle"),pl=Ae((t,e)=>{var r,n,i,a,s=wo(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=ds(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height{var r=new _.MathNode("mfrac",[bs(t.numer,e),bs(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=Qi(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),wo(t.size,e.style));return n.size!==e.style.size&&(r=new _.MathNode("mstyle",[r]),e=n.size===Ci.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(n=[],null!=t.leftDelim&&((e=new _.MathNode("mo",[new _.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),n.push(r),null!=t.rightDelim&&((e=new _.MathNode("mo",[new _.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),ms(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,s=null,o="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="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:t.mode,continued:!1,numer:i,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:pl,mathmlBuilder:gl}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:Ae((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),l({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:t,funcName:r,token: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}}}),ko=["display","text","script","scriptscript"],To=Ae(function(t){var e=null;return 0{var t=t.parser,r=e[0],n=fi(Vn(e[1],"infix").size),e=e[2],i=0{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?ds(t.sup,e.havingStyle(i.sup()),e):ds(t.sub,e.havingStyle(i.sub()),e),Vn(t.base,"horizBrace")):Vn(t,"horizBrace"),t=ds(i.base,e.havingBaseStyle(Ci.DISPLAY)),a=As.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=As.mathMLnode(t.label);return new _.MathNode(t.isOver?"mover":"munder",[bs(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:_o,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=Vn(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:ts(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:Ae((t,e)=>{var r=ss(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>((e=(e=xs(t.body,e))instanceof ps?e:new ps("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=Vn(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i{var{parser:t,funcName:r}=t,n=Vn(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 s=n.split(","),o=0;o{var r,n=ss(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)=>xs(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:ts(e[0]),mathml:ts(e[1])}),"handler"),htmlBuilder:Ae((t,e)=>(t=ss(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>xs(t.mathml,e),"mathmlBuilder")}),Eo=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]},Zi(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"},s="";if(r[0])for(var o=Vn(r[0],"raw").string.split(","),l=0;l{var r=Qi(t.height,e),n=0,i=(0{var r=new _.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),Qi(t.height,e)),i=0;return 0{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([],[ds(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[ds(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 _.MathNode("mpadded",[bs(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)}}),Co=Ae((t,e)=>{switch(e.style.size){case Ci.DISPLAY.size:return t.display;case Ci.TEXT.size:return t.text;case Ci.SCRIPT.size:return t.script;case Ci.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:ts(e[0]),text:ts(e[1]),script:ts(e[2]),scriptscript:ts(e[3])}),"handler"),htmlBuilder:Ae((t,e)=>(t=Co(t,e),t=ss(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=Co(t,e),xs(t,e)),"mathmlBuilder")}),So=Ae((t,e,r,n,i,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&mi.isCharacterBox(r);if(e&&(o={elem:e=ds(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=ds(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s,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:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=t.height-s,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(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size: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"),Ao=["\\smallint"],Lo=Ae((t,e)=>{var r,n,i,a=!1,s=("supsub"===t.type?(r=t.sup,n=t.sub,i=Vn(t.base,"op"),a=!0):i=Vn(t,"op"),!1);if((t=e.style).size===Ci.DISPLAY.size&&i.symbol&&!mi.contains(Ao,i.name)&&(s=!0),i.symbol){var o,l=s?"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",s?"large-op":"small-op"]),0{var r;return t.symbol?(r=new ps("mo",[fs(t.name,t.mode)]),mi.contains(Ao,t.name)&&r.setAttribute("largeop","false")):r=t.body?new ps("mo",vs(t.body,e)):(r=new ps("mi",[new gs(t.name.slice(1))]),e=new ps("mo",[fs("⁡","text")]),t.parentIsSupSub?new ps("mrow",[r,e]):Hn([r,e])),r},"mathmlBuilder$1"),Io={"∏":"\\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=Io[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Lo,mathmlBuilder:No}),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:ts(e)}),"handler"),htmlBuilder:Lo,mathmlBuilder:No}),Mo={"∫":"\\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:Lo,mathmlBuilder:No}),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:Lo,mathmlBuilder:No}),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=Mo[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Lo,mathmlBuilder:No}),Ro=Ae((t,e)=>{var r,n,i,a,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Vn(t.base,"operatorname"),s=!0):i=Vn(t,"operatorname"),0{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=ss(t,e.withFont("mathrm"),!0),l=0;l{for(var r=vs(t.body,e.withFont("mathrm")),n=!0,i=0;it.toText()).join(""),r=[new _.TextNode(e)]),(e=new _.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new _.MathNode("mo",[fs("⁡","text")]);return t.parentIsSupSub?new _.MathNode("mrow",[e,o]):_.newDocumentFragment([e,o])},"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:ts(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Ro,mathmlBuilder:Do}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),qn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(ss(t.body,e,!1)):Z.makeSpan(["mord"],ss(t.body,e,!0),e)},mathmlBuilder(t,e){return xs(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=ds(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 _.MathNode("mo",[new _.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new _.MathNode("mover",[bs(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:ts(e)}),"handler"),htmlBuilder:Ae((t,e)=>(t=ss(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=vs(t.body,e),new _.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([],[ds(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n(t=vs(ts(t.body),e),e=new _.MathNode("mphantom",t),(t=new _.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"],[ds(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=vs(ts(t.body),e),e=new _.MathNode("mphantom",t),(t=new _.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=Vn(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=ds(t.body,e),t=Qi(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new _.MathNode("mpadded",[bs(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=Vn(e[0],"size"),e=Vn(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Vn(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=Qi(t.width,e),i=Qi(t.height,e),t=t.shift?Qi(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=Qi(t.width,e),n=Qi(t.height,e),t=t.shift?Qi(t.shift,e):0,e=e.color&&e.getColor()||"black",i=new _.MathNode("mspace"),e=(i.setAttribute("mathbackground",e),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new _.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(li,"sizingGroup"),Oo=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Po=Ae((t,e)=>{var r=e.havingSize(t.size);return li(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Oo,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:Oo.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Po,mathmlBuilder:Ae((t,e)=>(e=e.havingSize(t.size),t=vs(t.body,e),(t=new _.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]&&Vn(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[ds(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n(e=new _.MathNode("mpadded",[bs(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=ds(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.idr.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:i},{type:"kern",size:a}]},e));return t.index?(s=e.havingStyle(Ci.SCRIPTSCRIPT),r=ds(t.index,s,e),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,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 _.MathNode("mroot",[bs(t,e),bs(r,e)]):new _.MathNode("msqrt",[bs(t,e)])}}),Bo={display:Ci.DISPLAY,text:Ci.TEXT,script:Ci.SCRIPT,scriptscript:Ci.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=Bo[t.style],r=e.havingStyle(r).withFont("");return li(t.body,r,e)},mathmlBuilder(t,e){var r=Bo[t.style],e=e.havingStyle(r),r=vs(t.body,e),e=new _.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}}),Fo=Ae(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Ci.DISPLAY.size||r.alwaysHandleSupSub)?Lo:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Ci.DISPLAY.size||r.limits)?Ro:null:"accent"===r.type?mi.isCharacterBox(r.base)?Ls:null:"horizBrace"===r.type&&!t.sub===r.isOver?_o:null:null},"htmlBuilderDelegate"),qn({type:"supsub",htmlBuilder(t,e){if(a=Fo(t,e))return a(t,e);var r,n,i,{base:a,sup:s,sub:o}=t,l=ds(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&mi.isCharacterBox(a),o=(s&&(i=e.havingStyle(e.style.sup()),r=ds(s,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),n=ds(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),i=e.style===Ci.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof oa||o)&&(s=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){var t=new _.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),qn({type:"tag",mathmlBuilder(t,e){return(t=new _.MathNode("mtable",[new _.MathNode("mtr",[Go(),new _.MathNode("mtd",[xs(t.body,e)]),Go(),new _.MathNode("mtd",[xs(t.tag,e)])])])).setAttribute("width","100%"),t}}),qo={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},jo={"\\textbf":"textbf","\\textmd":"textmd"},Yo={"\\textit":"textit","\\textup":"textup"},Ho=Ae((t,e)=>(t=t.font)?qo[t]?e.withTextFontFamily(qo[t]):jo[t]?e.withTextFontWeight(jo[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Yo[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:ts(e),font:r}},htmlBuilder(t,e){return e=Ho(t,e),t=ss(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Ho(t,e),xs(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=ds(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 _.MathNode("mo",[new _.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new _.MathNode("munder",[bs(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=ds(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 _.MathNode("mpadded",[bs(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=Wo(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Vo=Ka,Xo=new RegExp("[̀-ͯ]+$"),Ko=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 hi("EOF",new ci(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new hi(t[e],new ci(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 hi(n,new ci(this,e,this.tokenRegex.lastIndex))}},Zo=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{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 s="",o=t.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);e=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>tl(t,!1,!0)),h("\\renewcommand",t=>tl(t,!0,!1)),h("\\providecommand",t=>tl(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),Vo[r],pa.math[r],pa.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\\;"),el={",":"\\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 el?e=el[t]:("\\not"===t.slice(0,4)||t in pa.math&&mi.contains(["bin","rel"],pa.math[t].group))&&(e="\\dotsb"),e}),rl={")":!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 rl?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in rl&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in rl?"\\@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{"+(nl=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{"+nl+"}{\\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",(il=Ae(l=>t=>{var e=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),Ae(r=>t=>{l&&(t.macros.set("|",a),i.length)&&t.macros.set("\\|",s);var e=r;return!r&&i.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?i:n,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),h("\\bra@set",il(!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}"),al={"^":!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 Zo(Qo,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Ko(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 hi("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0this.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 s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.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 hi(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 Ko(t,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Vo.hasOwnProperty(t)||pa.math.hasOwnProperty(t)||pa.text.hasOwnProperty(t)||al.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Vo.hasOwnProperty(t)&&!Vo[t].primitive}},ol=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ll=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),cl={"́":{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"}},hl={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(ul=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 hi("}")),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&&Vo[n.text]&&Vo[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{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),bl.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 bl,wl,kl,Tl,_l,El,Cl,Sl,Al,Ll,Nl,Il,Ml,Rl,Dl,Ol,Pl,Bl,Fl,$l,zl,Ul,Gl,ql,jl,L,Yl,Hl,Wl,Vl,Xl,Kl,Zl,Ql,Jl=t(()=>{bl=et(Mn(),1),wl=//gi,kl=Ae(t=>t?Il(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Tl=(()=>{let t=!1;return()=>{t||(xl(),t=!0)}})(),Ae(xl,"setupDompurifyHooks"),_l=Ae(t=>(Tl(),bl.default.sanitize(t)),"removeScript"),El=Ae((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=_l(t):"loose"!==e&&(t=(t=(t=Il(t)).replace(//g,">")).replace(/=/g,"="),t=Nl(t))),t),"sanitizeMore"),Cl=Ae((t,e)=>t&&(e.dompurifyConfig?bl.default.sanitize(El(t,e),e.dompurifyConfig):bl.default.sanitize(El(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Sl=Ae((t,e)=>"string"==typeof t?Cl(t,e):t.flat().map(t=>Cl(t,e)),"sanitizeTextOrArray"),Al=Ae(t=>wl.test(t),"hasBreaks"),Ll=Ae(t=>t.split(wl),"splitBreaks"),Nl=Ae(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Il=Ae(t=>t.replace(wl,"#br#"),"breakToPlaceholder"),Ml=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"),Rl=Ae(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Dl=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Ol=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Pl=Ae(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;eMath.max(0,t.split(e).length-1),"countOccurrence"),Fl=Ae((t,e)=>(t=Bl(t,"~"),e=Bl(e,"~"),1===t&&1===e),"shouldCombineSets"),$l=Ae(t=>{let e=Bl(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"),zl=Ae(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ul=/\$\$(.*)\$\$/g,Gl=Ae(t=>0<(t.match(Ul)?.length??0),"hasKatex"),ql=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(!Gl(t))return t;if(!(zl()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ul,"MathML is unsupported in this environment.");let r=(await Promise.resolve().then(()=>(vl(),Rn))).default,n=e.forceLegacyMathML||!zl()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(wl).map(t=>Gl(t)?`
${t}
`:`
${t}
`).join("").replace(Ul,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),L={getRows:kl,sanitizeText:Cl,sanitizeTextOrArray:Sl,hasBreaks:Al,splitBreaks:Ll,lineBreakRegex:wl,removeScript:_l,getUrl:Ml,evaluate:Rl,getMax:Dl,getMin:Ol}}),tc=t(()=>{e(),Yl=Ae(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Hl=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"),Wl=Ae(function(t,e,r,n){e=Hl(e,r,n),Yl(t,e)},"configureSvgSize"),Vl=Ae(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,s=(R.info(`SVG bounds: ${a}x`+(s=i.height),i),R.info("Graph bounds: 0x0",t),R.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Wl(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),ec=t(()=>{e(),Xl={},Kl=Ae((t,e,r)=>{let n="";return t in Xl&&Xl[t]?n=Xl[t](r):R.warn("No theme found for "+t),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} @@ -322,77 +322,38 @@ l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, ${n} ${e} -`},"getStyles"),Zl=Ae((t,e)=>{void 0!==e&&(Xl[t]=e)},"addStylesForDiagram"),Ql=Kl}),rc={};_Bt(rc,{clear:()=>sc,getAccDescription:()=>uc,getAccTitle:()=>cc,getDiagramTitle:()=>pc,setAccDescription:()=>hc,setAccTitle:()=>lc,setDiagramTitle:()=>dc});var nc,ic,ac,oc,sc,lc,cc,hc,uc,dc,pc,gc,fc,D,mc,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=t(()=>{Jl(),In(),ac=ic=nc="",oc=Ae(t=>Cl(t,Mr()),"sanitizeText"),sc=Ae(()=>{ic=ac=nc=""},"clear"),lc=Ae(t=>{nc=oc(t).replace(/^\s+/g,"")},"setAccTitle"),cc=Ae(()=>nc,"getAccTitle"),hc=Ae(t=>{ac=oc(t).replace(/\n\s+/g,` -`)},"setAccDescription"),uc=Ae(()=>ac,"getAccDescription"),dc=Ae(t=>{ic=oc(t)},"setDiagramTitle"),pc=Ae(()=>ic,"getDiagramTitle")}),fh=t(()=>{qr(),e(),In(),Jl(),tc(),ec(),gh(),gc=R,fc=k,D=Mr,mc=Ir,yc=wr,vc=Ae(t=>Cl(t,D()),"sanitizeText"),xc=Vl,bc=Ae(()=>rc,"getCommonDb"),wc={},kc=Ae((t,e,r)=>{wc[t]&&gc.warn(`Diagram with id ${t} already registered. Overwriting.`),wc[t]=e,r&&Jt(t,r),Zl(t,e.styles),e.injectUtils?.(gc,fc,D,vc,xc,bc(),()=>{})},"registerDiagram"),Tc=Ae(t=>{if(t in wc)return wc[t];throw new Ec(t)},"getDiagram"),Ec=class extends Error{static{Ae(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),mh=t(()=>{fh(),Jl(),gh(),_c=[],Cc=[""],Lc=[{alias:Sc="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Ac=""}],Ic="",Mc=!(Nc=[]),Rc=4,Dc=2,Pc=Ae(function(){return Oc},"getC4Type"),Bc=Ae(function(t){Oc=Cl(t,D())},"setC4Type"),Fc=Ae(function(r,n,i,a,o,s,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Nc.find(t=>t.from===n&&t.to===i);e?t=e:Nc.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=sh()}},"addRel"),$c=Ae(function(r,n,i,a,o,s,l){if(null!==n&&null!==i){let t={},e=_c.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,_c.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=Sc,t.wrap=sh()}},"addPersonOrSystem"),zc=Ae(function(r,n,i,a,o,s,l,c){if(null!==n&&null!==i){let t={},e=_c.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,_c.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=sh(),t.typeC4Shape={text:r},t.parentBoundary=Sc}},"addContainer"),Gc=Ae(function(r,n,i,a,o,s,l,c){if(null!==n&&null!==i){let t={},e=_c.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,_c.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=sh(),t.typeC4Shape={text:r},t.parentBoundary=Sc}},"addComponent"),Uc=Ae(function(r,n,i,a,o){if(null!==r&&null!==n){let t={},e=Lc.find(t=>t.alias===r);var s;e&&r===e.alias?t=e:(t.alias=r,Lc.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=Sc,t.wrap=sh(),Ac=Sc,Sc=r,Cc.push(Ac)}},"addPersonOrSystemBoundary"),qc=Ae(function(r,n,i,a,o){if(null!==r&&null!==n){let t={},e=Lc.find(t=>t.alias===r);var s;e&&r===e.alias?t=e:(t.alias=r,Lc.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=Sc,t.wrap=sh(),Ac=Sc,Sc=r,Cc.push(Ac)}},"addContainerBoundary"),Yc=Ae(function(r,n,i,a,o,t,s,l){if(null!==n&&null!==i){let t={},e=Lc.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Lc.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=Sc,t.wrap=sh(),Ac=Sc,Sc=n,Cc.push(Ac)}},"addDeploymentNode"),jc=Ae(function(){Sc=Ac,Cc.pop(),Ac=Cc.pop(),Cc.push(Ac)},"popBoundaryParseStack"),Hc=Ae(function(t,e,r,n,i,a,o,s,l,c,h){let u=_c.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Lc.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"),Wc=Ae(function(t,e,r,n,i,a,o){var s,l,c=Nc.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"),Vc=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&&(Rc=e),1<=n&&(Dc=n)},"updateLayoutConfig"),Xc=Ae(function(){return Rc},"getC4ShapeInRow"),Kc=Ae(function(){return Dc},"getC4BoundaryInRow"),Zc=Ae(function(){return Sc},"getCurrentBoundaryParse"),Qc=Ae(function(){return Ac},"getParentBoundaryParse"),Jc=Ae(function(e){return null==e?_c:_c.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),th=Ae(function(e){return _c.find(t=>t.alias===e)},"getC4Shape"),eh=Ae(function(t){return Object.keys(Jc(t))},"getC4ShapeKeys"),rh=Ae(function(e){return null==e?Lc:Lc.filter(t=>t.parentBoundary===e)},"getBoundaries"),nh=rh,ih=Ae(function(){return Nc},"getRels"),ah=Ae(function(){return Ic},"getTitle"),oh=Ae(function(t){Mc=t},"setWrap"),sh=Ae(function(){return Mc},"autoWrap"),lh=Ae(function(){_c=[],Lc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Sc="global",Cc=[Ac=""],Cc=[Ic=""],Mc=!(Nc=[]),Rc=4,Dc=2},"clear"),ch={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},hh={FILLED:0,OPEN:1},uh={LEFTOF:0,RIGHTOF:1,OVER:2},dh=Ae(function(t){Ic=Cl(t,D())},"setTitle"),ph={addPersonOrSystem:$c,addPersonOrSystemBoundary:Uc,addContainer:zc,addContainerBoundary:qc,addComponent:Gc,addDeploymentNode:Yc,popBoundaryParseStack:jc,addRel:Fc,updateElStyle:Hc,updateRelStyle:Wc,updateLayoutConfig:Vc,autoWrap:sh,setWrap:oh,getC4ShapeArray:Jc,getC4Shape:th,getC4ShapeKeys:eh,getBoundaries:rh,getBoundarys:nh,getCurrentBoundaryParse:Zc,getParentBoundaryParse:Qc,getRels:ih,getTitle:ah,getC4Type:Pc,getC4ShapeInRow:Xc,getC4BoundaryInRow:Kc,setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,setAccDescription:hc,getConfig:Ae(()=>D().c4,"getConfig"),clear:lh,LINETYPE:ch,ARROWTYPE:hh,PLACEMENT:uh,setTitle:dh,setC4Type:Bc}});function yh(t,e){return null==t||null==e?NaN:t{Ae(yh,"ascending")});function xh(t,e){return null==t||null==e?NaN:e{Ae(xh,"descending")});function wh(r){let a,o,i;function s(t,e,r=0,n=t.length){if(r>>1}while(o(t[i],e)<0?r=1+i:n=i,r>>1}while(o(t[i],e)<=0?r=1+i:n=i,r-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=t(()=>{Ae(Eh,"number")}),Ah=t(()=>{vh(),Th(),Sh(),_h=wh(yh).right,wh(Eh).center,Ch=_h});function Lh({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Nh({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Ih({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Mh(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Rh,Dh=t(()=>{Rh=class extends Map{static{Ae(this,"InternMap")}constructor(t,e=Mh){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(Lh(this,t))}has(t){return super.has(Lh(this,t))}set(t,e){return super.set(Nh(this,t),e)}delete(t){return super.delete(Ih(this,t))}},Ae(Lh,"intern_get"),Ae(Nh,"intern_set"),Ae(Ih,"intern_delete"),Ae(Mh,"keyof")});function Oh(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=$h<=a?10:zh<=a?5:Gh<=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/ce&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),l{$h=Math.sqrt(50),zh=Math.sqrt(10),Gh=Math.sqrt(2),Ae(Oh,"tickSpec"),Ae(Ph,"ticks"),Ae(Bh,"tickIncrement"),Ae(Fh,"tickStep")});function qh(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{Ae(qh,"max")});function jh(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 Hh=t(()=>{Ae(jh,"min")});function Wh(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{Ae(Wh,"range")}),Xh=t(()=>{Ah(),Th(),Yh(),Hh(),Vh(),Uh(),Dh()});function Kh(t){return t}var Zh=t(()=>{Ae(Kh,"default")});function Qh(t){return"translate("+t+",0)"}function Jh(t){return"translate(0,"+t+")"}function tu(e){return t=>+e(t)}function eu(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function ru(){return!this.__axis}function nu(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{Zh(),ou=1,su=3,Ae(Qh,"translateX"),Ae(Jh,"translateY"),Ae(tu,"number"),Ae(eu,"center"),Ae(ru,"entering"),Ae(nu,"axis"),Ae(iu,"axisTop"),Ae(au,"axisBottom")}),cu=t(()=>{lu()});function hu(){for(var t,e=0,r=arguments.length,n={};e{fu={value:Ae(()=>{},"value")},Ae(hu,"dispatch"),Ae(uu,"Dispatch"),Ae(du,"parseTypenames"),uu.prototype=hu.prototype={constructor:uu,on:Ae(function(t,e){var r,n=this._,i=du(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{xu()}),wu=t(()=>{vu={svg:"http://www.w3.org/2000/svg",xhtml:yu="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 ku(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),vu.hasOwnProperty(e)?{space:vu[e],local:t}:t}var Tu=t(()=>{wu(),Ae(ku,"default")});function Eu(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===yu&&t.documentElement.namespaceURI===yu?t.createElement(r):t.createElementNS(e,r)}}function _u(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Cu(t){return((t=ku(t)).local?_u:Eu)(t)}var Su=t(()=>{Tu(),wu(),Ae(Eu,"creatorInherit"),Ae(_u,"creatorFixed"),Ae(Cu,"default")});function Au(){}function Lu(t){return null==t?Au:function(){return this.querySelector(t)}}var Nu=t(()=>{Ae(Au,"none"),Ae(Lu,"default")});function Iu(t){"function"!=typeof t&&(t=Lu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{cp(),Nu(),Ae(Iu,"default")});function Ru(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Du=t(()=>{Ae(Ru,"array")});function Ou(){return[]}function Pu(t){return null==t?Ou:function(){return this.querySelectorAll(t)}}var Bu=t(()=>{Ae(Ou,"empty"),Ae(Pu,"default")});function Fu(t){return function(){return Ru(t.apply(this,arguments))}}function $u(t){t=("function"==typeof t?Fu:Pu)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{cp(),Du(),Bu(),Ae(Fu,"arrayAll"),Ae($u,"default")});function Gu(t){return function(){return this.matches(t)}}function Uu(e){return function(t){return t.matches(e)}}var qu=t(()=>{Ae(Gu,"default"),Ae(Uu,"childMatcher")});function Yu(t){return function(){return Wu.call(this.children,t)}}function ju(){return this.firstElementChild}function Hu(t){return this.select(null==t?ju:Yu("function"==typeof t?t:Uu(t)))}var Wu,Vu=t(()=>{qu(),Wu=Array.prototype.find,Ae(Yu,"childFind"),Ae(ju,"childFirst"),Ae(Hu,"default")});function Xu(){return Array.from(this.children)}function Ku(t){return function(){return Qu.call(this.children,t)}}function Zu(t){return this.selectAll(null==t?Xu:Ku("function"==typeof t?t:Uu(t)))}var Qu,Ju=t(()=>{qu(),Qu=Array.prototype.filter,Ae(Xu,"children"),Ae(Ku,"childrenFilter"),Ae(Zu,"default")});function td(t){"function"!=typeof t&&(t=Gu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{cp(),qu(),Ae(td,"default")});function rd(t){return new Array(t.length)}var nd=t(()=>{Ae(rd,"default")});function id(){return new ip(this._enter||this._groups.map(rd),this._parents)}function ad(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var od=t(()=>{nd(),cp(),Ae(id,"default"),Ae(ad,"EnterNode"),ad.prototype={constructor:ad,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 sd(t){return function(){return t}}var ld=t(()=>{Ae(sd,"default")});function cd(t,e,r,n,i,a){for(var o,s=0,l=e.length,c=a.length;s{cp(),od(),ld(),Ae(cd,"bindIndex"),Ae(hd,"bindKey"),Ae(ud,"datum"),Ae(dd,"default"),Ae(pd,"arraylike")});function fd(){return new ip(this._exit||this._groups.map(rd),this._parents)}var md=t(()=>{nd(),cp(),Ae(fd,"default")});function yd(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 vd=t(()=>{Ae(yd,"default")});function xd(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{cp(),Ae(xd,"default")});function wd(){for(var t=this._groups,e=-1,r=t.length;++e{Ae(wd,"default")});function Td(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||Ed,Ae(t,"compareNode");for(var e=this._groups,n=e.length,i=new Array(n),a=0;a{cp(),Ae(Td,"default"),Ae(Ed,"ascending")});function Cd(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var Sd=t(()=>{Ae(Cd,"default")});function Ad(){return Array.from(this)}var Ld=t(()=>{Ae(Ad,"default")});function Nd(){for(var t=this._groups,e=0,r=t.length;e{Ae(Nd,"default")});function Md(){let t=0;for(var e of this)++t;return t}var Rd=t(()=>{Ae(Md,"default")});function Dd(){return!this.node()}var Od=t(()=>{Ae(Dd,"default")});function Pd(t){for(var e=this._groups,r=0,n=e.length;r{Ae(Pd,"default")});function Fd(t){return function(){this.removeAttribute(t)}}function $d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zd(t,e){return function(){this.setAttribute(t,e)}}function Gd(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ud(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function qd(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 Yd(t,e){var r,t=ku(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?$d:Fd:"function"==typeof e?t.local?qd:Ud:t.local?Gd:zd)(t,e))}var jd=t(()=>{Tu(),Ae(Fd,"attrRemove"),Ae($d,"attrRemoveNS"),Ae(zd,"attrConstant"),Ae(Gd,"attrConstantNS"),Ae(Ud,"attrFunction"),Ae(qd,"attrFunctionNS"),Ae(Yd,"default")});function Hd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var Wd=t(()=>{Ae(Hd,"default")});function Vd(t){return function(){this.style.removeProperty(t)}}function Xd(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Kd(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function Zd(t,e,r){return 1{Wd(),Ae(Vd,"styleRemove"),Ae(Xd,"styleConstant"),Ae(Kd,"styleFunction"),Ae(Zd,"default"),Ae(Qd,"styleValue")});function t0(t){return function(){delete this[t]}}function e0(t,e){return function(){this[t]=e}}function r0(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function n0(t,e){return 1{Ae(t0,"propertyRemove"),Ae(e0,"propertyConstant"),Ae(r0,"propertyFunction"),Ae(n0,"default")});function a0(t){return t.trim().split(/^|\s+/)}function o0(t){return t.classList||new s0(t)}function s0(t){this._node=t,this._names=a0(t.getAttribute("class")||"")}function l0(t,e){for(var r=o0(t),n=-1,i=e.length;++n{Ae(a0,"classArray"),Ae(o0,"classList"),Ae(s0,"ClassList"),s0.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(l0,"classedAdd"),Ae(c0,"classedRemove"),Ae(h0,"classedTrue"),Ae(u0,"classedFalse"),Ae(d0,"classedFunction"),Ae(p0,"default")});function f0(){this.textContent=""}function m0(t){return function(){this.textContent=t}}function y0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function v0(t){return arguments.length?this.each(null==t?f0:("function"==typeof t?y0:m0)(t)):this.node().textContent}var x0=t(()=>{Ae(f0,"textRemove"),Ae(m0,"textConstant"),Ae(y0,"textFunction"),Ae(v0,"default")});function b0(){this.innerHTML=""}function w0(t){return function(){this.innerHTML=t}}function k0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function T0(t){return arguments.length?this.each(null==t?b0:("function"==typeof t?k0:w0)(t)):this.node().innerHTML}var E0=t(()=>{Ae(b0,"htmlRemove"),Ae(w0,"htmlConstant"),Ae(k0,"htmlFunction"),Ae(T0,"default")});function _0(){this.nextSibling&&this.parentNode.appendChild(this)}function C0(){return this.each(_0)}var S0=t(()=>{Ae(_0,"raise"),Ae(C0,"default")});function A0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function L0(){return this.each(A0)}var N0=t(()=>{Ae(A0,"lower"),Ae(L0,"default")});function I0(t){var e="function"==typeof t?t:Cu(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var M0=t(()=>{Su(),Ae(I0,"default")});function R0(){return null}function D0(t,e){var r="function"==typeof t?t:Cu(t),n=null==e?R0:"function"==typeof e?e:Lu(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var O0=t(()=>{Su(),Nu(),Ae(R0,"constantNull"),Ae(D0,"default")});function P0(){var t=this.parentNode;t&&t.removeChild(this)}function B0(){return this.each(P0)}var F0=t(()=>{Ae(P0,"remove"),Ae(B0,"default")});function $0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function z0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function G0(t){return this.select(t?z0:$0)}var U0=t(()=>{Ae($0,"selection_cloneShallow"),Ae(z0,"selection_cloneDeep"),Ae(G0,"default")});function q0(t){return arguments.length?this.property("__data__",t):this.node().__data__}var Y0=t(()=>{Ae(q0,"default")});function j0(e){return function(t){e.call(this,t,this.__data__)}}function H0(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 W0(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r{Ae(j0,"contextListener"),Ae(H0,"parseTypenames"),Ae(W0,"onRemove"),Ae(V0,"onAdd"),Ae(X0,"default")});function Z0(t,e,r){var n=Hd(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 Q0(t,e){return function(){return Z0(this,t,e)}}function J0(t,e){return function(){return Z0(this,t,e.apply(this,arguments))}}function tp(t,e){return this.each(("function"==typeof e?J0:Q0)(t,e))}var ep=t(()=>{Wd(),Ae(Z0,"dispatchEvent"),Ae(Q0,"dispatchConstant"),Ae(J0,"dispatchFunction"),Ae(tp,"default")});function*rp(){for(var t=this._groups,e=0,r=t.length;e{Ae(rp,"default")});function ip(t,e){this._groups=t,this._parents=e}function ap(){return new ip([[document.documentElement]],sp)}function op(){return this}var sp,lp,cp=t(()=>{Mu(),zu(),Vu(),Ju(),ed(),gd(),od(),md(),vd(),bd(),kd(),_d(),Sd(),Ld(),Id(),Rd(),Od(),Bd(),jd(),Jd(),i0(),g0(),x0(),E0(),S0(),N0(),M0(),O0(),F0(),U0(),Y0(),K0(),ep(),np(),sp=[null],Ae(ip,"Selection"),Ae(ap,"selection"),Ae(op,"selection_selection"),ip.prototype=ap.prototype={constructor:ip,select:Iu,selectAll:$u,selectChild:Hu,selectChildren:Zu,filter:td,data:dd,enter:id,exit:fd,join:yd,merge:xd,selection:op,order:wd,sort:Td,call:Cd,nodes:Ad,node:Nd,size:Md,empty:Dd,each:Pd,attr:Yd,style:Zd,property:n0,classed:p0,text:v0,html:T0,raise:C0,lower:L0,append:I0,insert:D0,remove:B0,clone:G0,datum:q0,on:X0,dispatch:tp,[Symbol.iterator]:rp},lp=ap});function O(t){return"string"==typeof t?new ip([[document.querySelector(t)]],[document.documentElement]):new ip([[t]],sp)}var hp=t(()=>{cp(),Ae(O,"default")}),up=t(()=>{qu(),Tu(),hp(),cp(),Nu(),Bu(),Jd()}),dp=t(()=>{});function pp(t,e,r){(t.prototype=e.prototype=r).constructor=t}function gp(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var fp=t(()=>{Ae(pp,"default"),Ae(gp,"extend")});function mp(){}function yp(){return this.rgb().formatHex()}function vp(){return this.rgb().formatHex8()}function xp(){return Dp(this).formatHsl()}function bp(){return this.rgb().formatRgb()}function wp(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=qp.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?kp(e):3===r?new Cp(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Tp(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Tp(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=Yp.exec(t))?new Cp(e[1],e[2],e[3],1):(e=jp.exec(t))?new Cp(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Hp.exec(t))?Tp(e[1],e[2],e[3],e[4]):(e=Wp.exec(t))?Tp(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Vp.exec(t))?Rp(e[1],e[2]/100,e[3]/100,1):(e=Xp.exec(t))?Rp(e[1],e[2]/100,e[3]/100,e[4]):Kp.hasOwnProperty(t)?kp(Kp[t]):"transparent"===t?new Cp(NaN,NaN,NaN,0):null}function kp(t){return new Cp(t>>16&255,t>>8&255,255&t,1)}function Tp(t,e,r,n){return new Cp(t=n<=0?e=r=NaN:t,e,r,n)}function Ep(t){return(t=t instanceof mp?t:wp(t))?new Cp((t=t.rgb()).r,t.g,t.b,t.opacity):new Cp}function _p(t,e,r,n){return 1===arguments.length?Ep(t):new Cp(t,e,r,n??1)}function Cp(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Sp(){return"#"+Mp(this.r)+Mp(this.g)+Mp(this.b)}function Ap(){return"#"+Mp(this.r)+Mp(this.g)+Mp(this.b)+Mp(255*(isNaN(this.opacity)?1:this.opacity))}function Lp(){var t=Np(this.opacity);return(1===t?"rgb(":"rgba(")+Ip(this.r)+`, ${Ip(this.g)}, `+Ip(this.b)+(1===t?")":`, ${t})`)}function Np(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ip(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mp(t){return((t=Ip(t))<16?"0":"")+t.toString(16)}function Rp(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Pp(t,e,r,n)}function Dp(t){var e,r,n,i,a,o,s,l;return t instanceof Pp?new Pp(t.h,t.s,t.l,t.opacity):(t=t instanceof mp?t:wp(t))?t instanceof Pp?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{fp(),Ae(mp,"Color"),zp="\\s*([+-]?\\d+)\\s*",Gp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Up="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qp=/^#([0-9a-f]{3,8})$/,Yp=new RegExp(`^rgb\\(${zp},${zp},${zp}\\)$`),jp=new RegExp(`^rgb\\(${Up},${Up},${Up}\\)$`),Hp=new RegExp(`^rgba\\(${zp},${zp},${zp},${Gp}\\)$`),Wp=new RegExp(`^rgba\\(${Up},${Up},${Up},${Gp}\\)$`),Vp=new RegExp(`^hsl\\(${Gp},${Up},${Up}\\)$`),Xp=new RegExp(`^hsla\\(${Gp},${Up},${Up},${Gp}\\)$`),Kp={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},pp(mp,wp,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yp,formatHex:yp,formatHex8:vp,formatHsl:xp,formatRgb:bp,toString:bp}),Ae(yp,"color_formatHex"),Ae(vp,"color_formatHex8"),Ae(xp,"color_formatHsl"),Ae(bp,"color_formatRgb"),Ae(wp,"color"),Ae(kp,"rgbn"),Ae(Tp,"rgba"),Ae(Ep,"rgbConvert"),Ae(_p,"rgb"),Ae(Cp,"Rgb"),pp(Cp,_p,gp(mp,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Cp(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Cp(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Cp(Ip(this.r),Ip(this.g),Ip(this.b),Np(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:Sp,formatHex:Sp,formatHex8:Ap,formatRgb:Lp,toString:Lp})),Ae(Sp,"rgb_formatHex"),Ae(Ap,"rgb_formatHex8"),Ae(Lp,"rgb_formatRgb"),Ae(Np,"clampa"),Ae(Ip,"clampi"),Ae(Mp,"hex"),Ae(Rp,"hsla"),Ae(Dp,"hslConvert"),Ae(Op,"hsl"),Ae(Pp,"Hsl"),pp(Pp,Op,gp(mp,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pp(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Pp(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 Cp($p(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),$p(t,r,e),$p(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Pp(Bp(this.h),Fp(this.s),Fp(this.l),Np(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=Np(this.opacity);return(1===t?"hsl(":"hsla(")+Bp(this.h)+`, ${100*Fp(this.s)}%, ${100*Fp(this.l)}%`+(1===t?")":`, ${t})`)}})),Ae(Bp,"clamph"),Ae(Fp,"clampt"),Ae($p,"hsl2rgb")}),t1=t(()=>{Zp=Math.PI/180,Qp=180/Math.PI});function e1(t){var e,r,n,i,a,o;return t instanceof n1?new n1(t.l,t.a,t.b,t.opacity):t instanceof h1?u1(t):(i=i1(.2225045*(e=s1((t=t instanceof Cp?t:Ep(t)).r))+.7168786*(r=s1(t.g))+.0606169*(n=s1(t.b))),e===r&&r===n?a=o=i:(a=i1((.4360747*e+.3850649*r+.1430804*n)/.96422),o=i1((.0139322*e+.0971045*r+.7141733*n)/.82521)),new n1(116*i-16,500*(a-i),200*(i-o),t.opacity))}function r1(t,e,r,n){return 1===arguments.length?e1(t):new n1(t,e,r,n??1)}function n1(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function i1(t){return f1{fp(),Jp(),t1(),d1=4/29,g1=3*(p1=6/29)*p1,f1=p1*p1*p1,Ae(e1,"labConvert"),Ae(r1,"lab"),Ae(n1,"Lab"),pp(n1,r1,gp(mp,{brighter(t){return new n1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new n1(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 Cp(o1(3.1338561*(e=.96422*a1(e))-1.6168667*(t=+a1(t))-.4906146*(r=.82521*a1(r))),o1(-.9787684*e+1.9161415*t+.033454*r),o1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Ae(i1,"xyz2lab"),Ae(a1,"lab2xyz"),Ae(o1,"lrgb2rgb"),Ae(s1,"rgb2lrgb"),Ae(l1,"hclConvert"),Ae(c1,"hcl"),Ae(h1,"Hcl"),Ae(u1,"hcl2lab"),pp(h1,c1,gp(mp,{brighter(t){return new h1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new h1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return u1(this).rgb()}}))}),y1=t(()=>{Jp(),m1()});function v1(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 x1(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{Ae(v1,"basis"),Ae(x1,"default")});function w1(n){var i=n.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*i),r=n[(e+i-1)%i];return v1((t-e/i)*i,r,n[e%i],n[(e+1)%i],n[(e+2)%i])}}var k1,T1=t(()=>{b1(),Ae(w1,"default")}),E1=t(()=>{k1=Ae(t=>()=>t,"default")});function _1(e,r){return function(t){return e+t*r}}function C1(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 S1(t,e){var r=e-t;return r?_1(t,180{E1(),Ae(_1,"linear"),Ae(C1,"exponential"),Ae(S1,"hue"),Ae(A1,"gamma"),Ae(L1,"nogamma")});function I1(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{y1(),b1(),T1(),N1(),M1=Ae(function t(e){var o=A1(e);function r(e,t){var r=o((e=_p(e)).r,(t=_p(t)).r),n=o(e.g,t.g),i=o(e.b,t.b),a=L1(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(I1,"rgbSpline"),I1(x1),I1(w1)});function D1(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{Ae(D1,"default"),Ae(O1,"isNumberArray")});function B1(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{Q1(),Ae(B1,"genericArray")});function $1(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var z1=t(()=>{Ae($1,"default")});function G1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var U1=t(()=>{Ae(G1,"default")});function q1(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]=Z1(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var Y1=t(()=>{Q1(),Ae(q1,"default")});function j1(t){return function(){return t}}function H1(e){return function(t){return e(t)+""}}function W1(t,n){var e,r,i,a=V1.lastIndex=X1.lastIndex=0,o=-1,s=[],l=[];for(t+="",n+="";(e=V1.exec(t))&&(r=X1.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:G1(e,r)})),a=X1.lastIndex;return a{U1(),V1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,X1=new RegExp(V1.source,"g"),Ae(j1,"zero"),Ae(H1,"one"),Ae(W1,"default")});function Z1(t,e){var r=typeof e;return null==e||"boolean"==r?k1(e):("number"==r?G1:"string"==r?(r=wp(e))?(e=r,M1):W1:e instanceof wp?M1:e instanceof Date?$1:O1(e)?D1:Array.isArray(e)?B1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?q1:G1)(t,e)}var Q1=t(()=>{y1(),R1(),F1(),z1(),U1(),Y1(),K1(),E1(),P1(),Ae(Z1,"default")});function J1(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var tg=t(()=>{Ae(J1,"default")});function eg(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{rg=180/Math.PI,ng={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ae(eg,"default")});function ag(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?ng:eg(t.a,t.b,t.c,t.d,t.e,t.f)}function og(t){return null!=t&&((sg=sg||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=sg.transform.baseVal.consolidate())?eg((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ng}var sg,lg=t(()=>{ig(),Ae(ag,"parseCss"),Ae(og,"parseSvg")});function cg(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:G1(t,r)},{i:o-2,x:G1(e,n)})):(r||n)&&i.push("translate("+r+s+n+l)}function o(t,e,r,n){t!==e?(180{U1(),lg(),Ae(cg,"interpolateTransform"),hg=cg(ag,"px, ","px)","deg)"),ug=cg(og,", ",")",")")});function pg(o){return function(e,t){var r=o((e=c1(e)).h,(t=c1(t)).h),n=L1(e.c,t.c),i=L1(e.l,t.l),a=L1(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 gg,fg=t(()=>{y1(),N1(),Ae(pg,"hcl"),gg=pg(S1),pg(L1)}),mg=t(()=>{Q1(),U1(),tg(),K1(),dg(),R1(),fg()});function yg(){return Rg||(Pg(vg),Rg=Og.now()+Dg)}function vg(){Rg=0}function xg(){this._call=this._time=this._next=null}function bg(t,e,r){var n=new xg;return n.restart(t,e,r),n}function wg(){yg(),++Cg;for(var t,e=Ng;e;)0<=(t=Rg-e._time)&&e._call.call(void 0,t),e=e._next;--Cg}function kg(){Rg=(Mg=Og.now())+Dg,Cg=Sg=0;try{wg()}finally{Cg=0,Eg(),Rg=0}}function Tg(){var t=Og.now(),e=t-Mg;Lgr._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Ng=e);Ig=t,_g(n)}function _g(t){Cg||(Sg=Sg&&clearTimeout(Sg),24{Lg=1e3,Dg=Rg=Mg=Ag=Sg=Cg=0,Og="object"==typeof performance&&performance.now?performance:Date,Pg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},Ae(yg,"now"),Ae(vg,"clearNow"),Ae(xg,"Timer"),xg.prototype=bg.prototype={constructor:xg,restart:Ae(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?yg():+r)+(null==e?0:+e),this._next||Ig===this||(Ig?Ig._next=this:Ng=this,Ig=this),this._call=t,this._time=r,_g()},"restart"),stop:Ae(function(){this._call&&(this._call=null,this._time=1/0,_g())},"stop")},Ae(bg,"timer"),Ae(wg,"timerFlush"),Ae(kg,"wake"),Ae(Tg,"poke"),Ae(Eg,"nap"),Ae(_g,"sleep")});function Fg(e,r,t){var n=new xg;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var $g=t(()=>{Bg(),Ae(Fg,"default")}),zg=t(()=>{Bg(),$g()});function Gg(t,e,r,n,i,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};jg(t,r,{name:e,index:n,group:i,on:Hg,tween:Wg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Vg})}function Ug(t,e){if((t=Yg(t,e)).state>Vg)throw new Error("too late; already scheduled");return t}function qg(t,e){if((t=Yg(t,e)).state>Zg)throw new Error("too late; already running");return t}function Yg(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function jg(a,o,s){var l,c=a.__transition;function t(t){s.state=Xg,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!==Xg)return d();for(e in c)if(i=c[e],i.name===s.name){if(i.state===Zg)return Fg(h);i.state===Qg?(i.state=tf,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e{bu(),zg(),Hg=mu("start","end","cancel","interrupt"),Wg=[],Vg=0,Xg=1,Kg=2,Zg=3,Qg=4,Jg=5,tf=6,Ae(Gg,"default"),Ae(Ug,"init"),Ae(qg,"set"),Ae(Yg,"get"),Ae(jg,"create")});function rf(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=Kg{ef(),Ae(rf,"default")});function af(t){return this.each(function(){rf(this,t)})}var of=t(()=>{nf(),Ae(af,"default")});function sf(i,a){var o,s;return function(){var t=qg(this,i),e=t.tween;if(e!==o)for(var r=0,n=(s=o=e).length;r{ef(),Ae(sf,"tweenRemove"),Ae(lf,"tweenFunction"),Ae(cf,"default"),Ae(hf,"tweenValue")});function df(t,e){var r;return("number"==typeof e?G1:e instanceof wp?M1:(r=wp(e))?(e=r,M1):W1)(t,e)}var pf=t(()=>{y1(),mg(),Ae(df,"default")});function gf(t){return function(){this.removeAttribute(t)}}function ff(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mf(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 yf(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 vf(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 xf(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 bf(t,e){var r=ku(t),n="transform"===r?ug:df;return this.attrTween(t,"function"==typeof e?(r.local?xf:vf)(r,n,hf(this,"attr."+t,e)):null==e?(r.local?ff:gf)(r):(r.local?yf:mf)(r,n,e))}var wf=t(()=>{mg(),up(),uf(),pf(),Ae(gf,"attrRemove"),Ae(ff,"attrRemoveNS"),Ae(mf,"attrConstant"),Ae(yf,"attrConstantNS"),Ae(vf,"attrFunction"),Ae(xf,"attrFunctionNS"),Ae(bf,"default")});function kf(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Tf(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Ef(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 _f(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&kf(e,t):n}return Ae(t,"tween"),t._value=r,t}function Cf(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=ku(t),this.tween(r,(t.local?Ef:_f)(t,e))}var Sf=t(()=>{up(),Ae(kf,"attrInterpolate"),Ae(Tf,"attrInterpolateNS"),Ae(Ef,"attrTweenNS"),Ae(_f,"attrTween"),Ae(Cf,"default")});function Af(t,e){return function(){Ug(this,t).delay=+e.apply(this,arguments)}}function Lf(t,e){return e=+e,function(){Ug(this,t).delay=e}}function Nf(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Af:Lf)(e,t)):Yg(this.node(),e).delay}var If=t(()=>{ef(),Ae(Af,"delayFunction"),Ae(Lf,"delayConstant"),Ae(Nf,"default")});function Mf(t,e){return function(){qg(this,t).duration=+e.apply(this,arguments)}}function Rf(t,e){return e=+e,function(){qg(this,t).duration=e}}function Df(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mf:Rf)(e,t)):Yg(this.node(),e).duration}var Of=t(()=>{ef(),Ae(Mf,"durationFunction"),Ae(Rf,"durationConstant"),Ae(Df,"default")});function Pf(t,e){if("function"!=typeof e)throw new Error;return function(){qg(this,t).ease=e}}function Bf(t){var e=this._id;return arguments.length?this.each(Pf(e,t)):Yg(this.node(),e).ease}var Ff=t(()=>{ef(),Ae(Pf,"easeConstant"),Ae(Bf,"default")});function $f(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;qg(this,e).ease=t}}function zf(t){if("function"!=typeof t)throw new Error;return this.each($f(this._id,t))}var Gf=t(()=>{ef(),Ae($f,"easeVarying"),Ae(zf,"default")});function Uf(t){"function"!=typeof t&&(t=Gu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{up(),Dm(),Ae(Uf,"default")});function Yf(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{Dm(),Ae(Yf,"default")});function Hf(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 Wf(r,n,i){var a,o,s=Hf(n)?Ug:qg;return function(){var t=s(this,r),e=t.on;e!==a&&(o=(a=e).copy()).on(n,i),t.on=o}}function Vf(t,e){var r=this._id;return arguments.length<2?Yg(this.node(),r).on.on(t):this.each(Wf(r,t,e))}var Xf=t(()=>{ef(),Ae(Hf,"start"),Ae(Wf,"onFunction"),Ae(Vf,"default")});function Kf(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Zf(){return this.on("end.remove",Kf(this._id))}var Qf=t(()=>{Ae(Kf,"removeFunction"),Ae(Zf,"default")});function Jf(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Lu(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o{up(),Dm(),ef(),Ae(Jf,"default")});function em(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Pu(t));for(var n=this._groups,i=n.length,a=[],o=[],s=0;s{up(),Dm(),ef(),Ae(em,"default")});function nm(){return new im(this._groups,this._parents)}var im,am=t(()=>{up(),im=lp.prototype.constructor,Ae(nm,"default")});function om(r,n){var i,a,o;return function(){var t=Qd(this,r),e=(this.style.removeProperty(r),Qd(this,r));return t===e?null:t===i&&e===a?o:o=n(i=t,a=e)}}function sm(t){return function(){this.style.removeProperty(t)}}function lm(e,r,n){var i,a,o=n+"";return function(){var t=Qd(this,e);return t===o?null:t===i?a:a=r(i=t,n)}}function cm(n,i,a){var o,s,l;return function(){var t=Qd(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=Qd(this,n)),t===r?null:t===o&&r===s?l:(s=r,l=i(o=t,e))}}function hm(n,i){var a,o,s,l,c="style."+i,h="end."+c;return function(){var t=qg(this,n),e=t.on,r=null==t.value[c]?l=l||sm(i):void 0;e===a&&s===r||(o=(a=e).copy()).on(h,s=r),t.on=o}}function um(t,e,r){var n="transform"==(t+="")?hg:df;return null==e?this.styleTween(t,om(t,n)).on("end.style."+t,sm(t)):"function"==typeof e?this.styleTween(t,cm(t,n,hf(this,"style."+t,e))).each(hm(this._id,t)):this.styleTween(t,lm(t,n,e),r).on("end.style."+t,null)}var dm=t(()=>{mg(),up(),ef(),uf(),pf(),Ae(om,"styleNull"),Ae(sm,"styleRemove"),Ae(lm,"styleConstant"),Ae(cm,"styleFunction"),Ae(hm,"styleMaybeRemove"),Ae(um,"default")});function pm(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function gm(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&pm(e,t,n):i}return Ae(t,"tween"),t._value=r,t}function fm(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,gm(t,e,r??""))}var mm=t(()=>{Ae(pm,"styleInterpolate"),Ae(gm,"styleTween"),Ae(fm,"default")});function ym(t){return function(){this.textContent=t}}function vm(e){return function(){var t=e(this);this.textContent=t??""}}function xm(t){return this.tween("text","function"==typeof t?vm(hf(this,"text",t)):ym(null==t?"":t+""))}var bm=t(()=>{uf(),Ae(ym,"textConstant"),Ae(vm,"textFunction"),Ae(xm,"default")});function wm(e){return function(t){this.textContent=e.call(this,t)}}function km(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&wm(t):r}return Ae(t,"tween"),t._value=e,t}function Tm(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,km(t))}var Em=t(()=>{Ae(wm,"textInterpolate"),Ae(km,"textTween"),Ae(Tm,"default")});function _m(){for(var t=this._name,e=this._id,r=++Mm,n=this._groups,i=n.length,a=0;a{Dm(),ef(),Ae(_m,"default")});function Sm(){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=qg(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 Am=t(()=>{ef(),Ae(Sm,"default")});function Lm(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Nm(t){return lp().transition(t)}function Im(){return++Mm}var Mm,Rm,Dm=t(()=>{up(),wf(),Sf(),If(),Of(),Ff(),Gf(),qf(),jf(),Xf(),Qf(),tm(),rm(),am(),dm(),mm(),bm(),Em(),Cm(),uf(),Am(),Mm=0,Ae(Lm,"Transition"),Ae(Nm,"transition"),Ae(Im,"newId"),Rm=lp.prototype,Lm.prototype=Nm.prototype={constructor:Lm,select:Jf,selectAll:em,selectChild:Rm.selectChild,selectChildren:Rm.selectChildren,filter:Uf,merge:Yf,selection:nm,transition:_m,call:Rm.call,nodes:Rm.nodes,node:Rm.node,size:Rm.size,empty:Rm.empty,each:Rm.each,on:Vf,attr:bf,attrTween:Cf,style:um,styleTween:fm,text:xm,textTween:Tm,remove:Zf,tween:cf,delay:Nf,duration:Df,ease:Bf,easeVarying:zf,end:Sm,[Symbol.iterator]:Rm[Symbol.iterator]}});function Om(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Pm=t(()=>{Ae(Om,"cubicInOut")}),Bm=t(()=>{Pm()});function Fm(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 $m(t){var e,r;t=t instanceof Lm?(e=t._id,t._name):(e=++Mm,(r=zm).time=yg(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a{Dm(),ef(),Bm(),zg(),zm={time:null,delay:0,duration:250,ease:Om},Ae(Fm,"inherit"),Ae($m,"default")}),Um=t(()=>{up(),of(),Gm(),lp.prototype.interrupt=af,lp.prototype.transition=$m}),qm=t(()=>{Um()}),Ym=t(()=>{}),jm=t(()=>{}),Hm=t(()=>{});function Wm(t){return[+t[0],+t[1]]}function Vm(t){return[Wm(t[0]),Wm(t[1])]}function Xm(t){return{type:t}}var Km,Zm,Qm,Jm=t(()=>{qm(),Ym(),jm(),Hm(),{abs:Km,max:Zm,min:Qm}=Math,Ae(Wm,"number1"),Ae(Vm,"number2"),["w","e"].map(Xm),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(Xm),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(Xm),Ae(function(t){return null==t?null:Vm(t)},"input"),Ae(function(t){return t},"output"),Ae(Xm,"type")}),ty=t(()=>{Jm()});function ey(r){this._+=r[0];for(let t=1,e=r.length;t{iy=Math.PI,sy=(ay=2*iy)-(oy=1e-6),Ae(ey,"append"),Ae(ry,"appendRound"),ly=class{static{Ae(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ey:ry(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}`:oyoy&&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((iy-Math.acos((o+p-n)/(2*l*a)))/2))/a,n=o/l,Math.abs(p-1)>oy&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*soy||Math.abs(this._y1-c)>oy)&&this._append`L${l},${c}`,r&&((a=a<0?a%ay+ay:a)>sy?this._append`A${r},${r},0,1,${h},${t-o},${e-s}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:oy{cy()}),uy=t(()=>{}),dy=t(()=>{}),py=t(()=>{}),gy=t(()=>{}),fy=t(()=>{}),my=t(()=>{}),yy=t(()=>{});function vy(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function xy(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 by=t(()=>{Ae(vy,"default"),Ae(xy,"formatDecimalParts")});function wy(t){return(t=xy(Math.abs(t)))?t[1]:NaN}var ky=t(()=>{by(),Ae(wy,"default")});function Ty(s,l){return function(t,e){for(var r=t.length,n=[],i=0,a=s[0],o=0;0e));)a=s[i=(i+1)%s.length];return n.reverse().join(l)}}var Ey=t(()=>{Ae(Ty,"default")});function _y(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Cy=t(()=>{Ae(_y,"default")});function Sy(t){var e;if(e=Ly.exec(t))return new Ay({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 Ay(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 Ly,Ny=t(()=>{Ly=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,Ae(Sy,"formatSpecifier"),Sy.prototype=Ay.prototype,Ae(Ay,"FormatSpecifier"),Ay.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 Iy(t){t:for(var e,r=t.length,n=1,i=-1;n{Ae(Iy,"default")});function Ry(t,e){var r,n,i=xy(t,e);return i?(r=i[0],(i=(i=i[1])-(Dy=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n{by(),Ae(Ry,"default")});function Py(t,e){var r;return(e=xy(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 By,Fy=t(()=>{by(),Ae(Py,"default")}),$y=t(()=>{by(),Oy(),Fy(),By={"%":Ae((t,e)=>(100*t).toFixed(e),"%"),b:Ae(t=>Math.round(t).toString(2),"b"),c:Ae(t=>t+"","c"),d:vy,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)=>Py(100*t,e),"p"),r:Py,s:Ry,X:Ae(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:Ae(t=>Math.round(t).toString(16),"x")}});function zy(t){return t}var Gy=t(()=>{Ae(zy,"default")});function Uy(t){var k=void 0===t.grouping||void 0===t.thousands?zy:Ty(qy.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?zy:_y(qy.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=Sy(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"):By[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=By[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=Iy(t)),i=((o=(!o||0!=+t||"+"===u)&&o)?"("===u?u:_:"-"===u||"("===u?"":u)+i,a=("s"===y?Yy[8+Dy/3]:"")+a+(o&&"("===u?")":""),w)for(e=-1,r=t.length;++e>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=Sy(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(wy(e)/3))),n=Math.pow(10,-t),i=Yy[8+t/3];return function(t){return r(n*t)+i}}return Ae(o,"newFormat"),Ae(e,"formatPrefix"),{format:o,formatPrefix:e}}var qy,Yy,jy=t(()=>{ky(),Ey(),Cy(),Ny(),My(),$y(),Oy(),Gy(),qy=Array.prototype.map,Yy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ae(Uy,"default")});function Hy(t){return Wy=Uy(t),Vy=Wy.format,Xy=Wy.formatPrefix,Wy}var Wy,Vy,Xy,Ky=t(()=>{jy(),Hy({thousands:",",grouping:[3],currency:["$",""]}),Ae(Hy,"defaultLocale")});function Zy(t){return Math.max(0,-wy(Math.abs(t)))}var Qy=t(()=>{ky(),Ae(Zy,"default")});function Jy(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wy(e)/3)))-wy(Math.abs(t)))}var t2=t(()=>{ky(),Ae(Jy,"default")});function e2(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wy(e)-wy(t))+1}var r2=t(()=>{ky(),Ae(e2,"default")}),n2=t(()=>{Ky(),Ny(),Qy(),t2(),r2()}),i2=t(()=>{}),a2=t(()=>{}),o2=t(()=>{}),s2=t(()=>{});function l2(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var c2=t(()=>{Ae(l2,"initRange")});function h2(){var r=new Rh,n=[],i=[],a=u2;function o(t){let e=r.get(t);if(void 0===e){if(a!==u2)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 Rh;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 h2(n,i).unknown(a)},l2.apply(o,arguments),o}var u2,d2=t(()=>{Xh(),c2(),u2=Symbol("implicit"),Ae(h2,"ordinal")});function p2(){var i,a,t=h2().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{Xh(),c2(),d2(),Ae(p2,"band")});function f2(t){return function(){return t}}var m2=t(()=>{Ae(f2,"constants")});function y2(t){return+t}var v2=t(()=>{Ae(y2,"number")});function x2(t){return t}function b2(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:f2(isNaN(r)?NaN:.5)}function w2(e,r){var t;return r{Xh(),mg(),m2(),v2(),S2=[0,1],Ae(x2,"identity"),Ae(b2,"normalize"),Ae(w2,"clamper"),Ae(k2,"bimap"),Ae(T2,"polymap"),Ae(E2,"copy"),Ae(_2,"transformer"),Ae(C2,"continuous")});function L2(t,e,r,n){var i,a=Fh(t,e,r);switch((n=Sy(n??",f")).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=Jy(a,o))||(n.precision=i),Xy(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=e2(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Zy(a))||(n.precision=i-2*("%"===n.type))}return Vy(n)}var N2=t(()=>{Xh(),n2(),Ae(L2,"tickFormat")});function I2(c){var h=c.domain;return c.ticks=function(t){var e=h();return Ph(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return L2(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{Xh(),A2(),c2(),N2(),Ae(I2,"linearish"),Ae(M2,"linear")});function D2(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],o=t[i];return o{Ae(D2,"nice")});function P2(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(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),tP2(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)=>(B2.setTime(+t),F2.setTime(+e),a(B2),a(F2),Math.floor(r(B2,F2))),s.every=e=>(e=Math.floor(e),isFinite(e)&&0n(t)%e==0:t=>s.count(0,t)%e==0):s:null)),s}var B2,F2,$2,z2,G2,U2,q2,Y2,j2,H2,W2,V2=t(()=>{B2=new Date,F2=new Date,Ae(P2,"timeInterval")}),X2=t(()=>{V2(),($2=P2(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):$2:null)}),K2=t(()=>{V2(),(z2=P2(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Z2=t(()=>{V2(),(G2=P2(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,(U2=P2(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),Q2=t(()=>{V2(),(q2=P2(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,(Y2=P2(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),J2=t(()=>{V2(),(j2=P2(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,(H2=P2(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(W2=P2(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 tv(e){return P2(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 ev(e){return P2(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 rv,nv,iv,av,ov,sv,lv,cv,hv,uv,dv,pv,gv,fv,mv,yv,vv,xv,bv=t(()=>{V2(),Ae(tv,"timeWeekday"),rv=tv(0),nv=tv(1),iv=tv(2),av=tv(3),ov=tv(4),sv=tv(5),lv=tv(6),rv.range,nv.range,iv.range,av.range,ov.range,sv.range,lv.range,Ae(ev,"utcWeekday"),cv=ev(0),hv=ev(1),uv=ev(2),dv=ev(3),pv=ev(4),gv=ev(5),fv=ev(6),cv.range,hv.range,uv.range,dv.range,pv.range,gv.range,fv.range}),wv=t(()=>{V2(),(mv=P2(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,(yv=P2(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}),kv=t(()=>{V2(),(vv=P2(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{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=P2(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{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Tv(a,t,e,r,n,i){let o=[[z2,1,1e3],[z2,5,5e3],[z2,15,15e3],[z2,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=et).right(o,n);return i===o.length?a.every(Fh(t/31536e6,e/31536e6,r)):0===i?$2.every(Math.max(Fh(t,e,r),1)):([t,e]=o[n/o[i-1][2]{Xh(),X2(),K2(),Z2(),Q2(),J2(),bv(),wv(),kv(),Ae(Tv,"ticker"),[Ev,_v]=Tv(xv,yv,cv,W2,Y2,U2),[Cv,Sv]=Tv(vv,mv,rv,j2,q2,G2)}),Lv=t(()=>{X2(),K2(),Z2(),Q2(),J2(),bv(),wv(),kv(),Av()});function Nv(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 Iv(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 Mv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Rv(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=Pv(e),h=Bv(e),P=Pv(r),B=Bv(r),F=Pv(o),$=Bv(o),z=Pv(s),G=Bv(s),U=Pv(l),q=Bv(l),u={a:E,A:_,b:C,B:S,c:null,d:ix,e:ix,f:cx,g:bx,G:kx,H:ax,I:ox,j:sx,L:lx,m:hx,M:ux,p:A,q:L,Q:jx,s:Hx,S:dx,u:px,U:gx,V:mx,w:yx,W:vx,x:null,X:null,y:xx,Y:wx,Z:Tx,"%":Yx},d={a:N,A:I,b:M,B:R,c:null,d:Ex,e:Ex,f:Lx,g:zx,G:Ux,H:_x,I:Cx,j:Sx,L:Ax,m:Nx,M:Ix,p:D,q:O,Q:jx,s:Hx,S:Mx,u:Rx,U:Dx,V:Px,w:Bx,W:Fx,x:null,X:null,y:$x,Y:Gx,Z:qx,"%":Yx},Y={a:y,A:v,b:x,B:b,c:w,d:Vv,e:Vv,f:tx,g:Yv,G:qv,H:Kv,I:Kv,j:Xv,L:Jv,m:Wv,M:Zv,p:m,q:Hv,Q:rx,s:nx,S:Qv,u:$v,U:zv,V:Gv,w:Fv,W:Uv,x:k,X:T,y:Yv,Y:qv,Z:jv,"%":ex};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[t.toLowerCase(),e]))}function Fv(t,e,r){return(e=Vx.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function $v(t,e,r){return(e=Vx.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function zv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Gv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function Uv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function qv(t,e,r){return(e=Vx.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function Yv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function jv(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 Hv(t,e,r){return(e=Vx.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Wv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Vv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Xv(t,e,r){return(e=Vx.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Kv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Zv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Qv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function Jv(t,e,r){return(e=Vx.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function tx(t,e,r){return(e=Vx.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function ex(t,e,r){return(e=Xx.exec(e.slice(r,r+1)))?r+e[0].length:-1}function rx(t,e,r){return(e=Vx.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function nx(t,e,r){return(e=Vx.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function ix(t,e){return Dv(t.getDate(),e,2)}function ax(t,e){return Dv(t.getHours(),e,2)}function ox(t,e){return Dv(t.getHours()%12||12,e,2)}function sx(t,e){return Dv(1+j2.count(vv(t),t),e,3)}function lx(t,e){return Dv(t.getMilliseconds(),e,3)}function cx(t,e){return lx(t,e)+"000"}function hx(t,e){return Dv(t.getMonth()+1,e,2)}function ux(t,e){return Dv(t.getMinutes(),e,2)}function dx(t,e){return Dv(t.getSeconds(),e,2)}function px(t){return 0===(t=t.getDay())?7:t}function gx(t,e){return Dv(rv.count(vv(t)-1,t),e,2)}function fx(t){var e=t.getDay();return 4<=e||0===e?ov(t):ov.ceil(t)}function mx(t,e){return t=fx(t),Dv(ov.count(vv(t),t)+(4===vv(t).getDay()),e,2)}function yx(t){return t.getDay()}function vx(t,e){return Dv(nv.count(vv(t)-1,t),e,2)}function xx(t,e){return Dv(t.getFullYear()%100,e,2)}function bx(t,e){return Dv((t=fx(t)).getFullYear()%100,e,2)}function wx(t,e){return Dv(t.getFullYear()%1e4,e,4)}function kx(t,e){var r=t.getDay();return Dv((t=4<=r||0===r?ov(t):ov.ceil(t)).getFullYear()%1e4,e,4)}function Tx(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Dv(t/60|0,"0",2)+Dv(t%60,"0",2)}function Ex(t,e){return Dv(t.getUTCDate(),e,2)}function _x(t,e){return Dv(t.getUTCHours(),e,2)}function Cx(t,e){return Dv(t.getUTCHours()%12||12,e,2)}function Sx(t,e){return Dv(1+H2.count(xv(t),t),e,3)}function Ax(t,e){return Dv(t.getUTCMilliseconds(),e,3)}function Lx(t,e){return Ax(t,e)+"000"}function Nx(t,e){return Dv(t.getUTCMonth()+1,e,2)}function Ix(t,e){return Dv(t.getUTCMinutes(),e,2)}function Mx(t,e){return Dv(t.getUTCSeconds(),e,2)}function Rx(t){return 0===(t=t.getUTCDay())?7:t}function Dx(t,e){return Dv(cv.count(xv(t)-1,t),e,2)}function Ox(t){var e=t.getUTCDay();return 4<=e||0===e?pv(t):pv.ceil(t)}function Px(t,e){return t=Ox(t),Dv(pv.count(xv(t),t)+(4===xv(t).getUTCDay()),e,2)}function Bx(t){return t.getUTCDay()}function Fx(t,e){return Dv(hv.count(xv(t)-1,t),e,2)}function $x(t,e){return Dv(t.getUTCFullYear()%100,e,2)}function zx(t,e){return Dv((t=Ox(t)).getUTCFullYear()%100,e,2)}function Gx(t,e){return Dv(t.getUTCFullYear()%1e4,e,4)}function Ux(t,e){var r=t.getUTCDay();return Dv((t=4<=r||0===r?pv(t):pv.ceil(t)).getUTCFullYear()%1e4,e,4)}function qx(){return"+0000"}function Yx(){return"%"}function jx(t){return+t}function Hx(t){return Math.floor(+t/1e3)}var Wx,Vx,Xx,Kx,Zx=t(()=>{Lv(),Ae(Nv,"localDate"),Ae(Iv,"utcDate"),Ae(Mv,"newDate"),Ae(Rv,"formatLocale"),Wx={"-":"",_:" ",0:"0"},Vx=/^\s*\d+/,Xx=/^%/,Kx=/[\\^$*+?|[\]().{}]/g,Ae(Dv,"pad"),Ae(Ov,"requote"),Ae(Pv,"formatRe"),Ae(Bv,"formatLookup"),Ae(Fv,"parseWeekdayNumberSunday"),Ae($v,"parseWeekdayNumberMonday"),Ae(zv,"parseWeekNumberSunday"),Ae(Gv,"parseWeekNumberISO"),Ae(Uv,"parseWeekNumberMonday"),Ae(qv,"parseFullYear"),Ae(Yv,"parseYear"),Ae(jv,"parseZone"),Ae(Hv,"parseQuarter"),Ae(Wv,"parseMonthNumber"),Ae(Vv,"parseDayOfMonth"),Ae(Xv,"parseDayOfYear"),Ae(Kv,"parseHour24"),Ae(Zv,"parseMinutes"),Ae(Qv,"parseSeconds"),Ae(Jv,"parseMilliseconds"),Ae(tx,"parseMicroseconds"),Ae(ex,"parseLiteralPercent"),Ae(rx,"parseUnixTimestamp"),Ae(nx,"parseUnixTimestampSeconds"),Ae(ix,"formatDayOfMonth"),Ae(ax,"formatHour24"),Ae(ox,"formatHour12"),Ae(sx,"formatDayOfYear"),Ae(lx,"formatMilliseconds"),Ae(cx,"formatMicroseconds"),Ae(hx,"formatMonthNumber"),Ae(ux,"formatMinutes"),Ae(dx,"formatSeconds"),Ae(px,"formatWeekdayNumberMonday"),Ae(gx,"formatWeekNumberSunday"),Ae(fx,"dISO"),Ae(mx,"formatWeekNumberISO"),Ae(yx,"formatWeekdayNumberSunday"),Ae(vx,"formatWeekNumberMonday"),Ae(xx,"formatYear"),Ae(bx,"formatYearISO"),Ae(wx,"formatFullYear"),Ae(kx,"formatFullYearISO"),Ae(Tx,"formatZone"),Ae(Ex,"formatUTCDayOfMonth"),Ae(_x,"formatUTCHour24"),Ae(Cx,"formatUTCHour12"),Ae(Sx,"formatUTCDayOfYear"),Ae(Ax,"formatUTCMilliseconds"),Ae(Lx,"formatUTCMicroseconds"),Ae(Nx,"formatUTCMonthNumber"),Ae(Ix,"formatUTCMinutes"),Ae(Mx,"formatUTCSeconds"),Ae(Rx,"formatUTCWeekdayNumberMonday"),Ae(Dx,"formatUTCWeekNumberSunday"),Ae(Ox,"UTCdISO"),Ae(Px,"formatUTCWeekNumberISO"),Ae(Bx,"formatUTCWeekdayNumberSunday"),Ae(Fx,"formatUTCWeekNumberMonday"),Ae($x,"formatUTCYear"),Ae(zx,"formatUTCYearISO"),Ae(Gx,"formatUTCFullYear"),Ae(Ux,"formatUTCFullYearISO"),Ae(qx,"formatUTCZone"),Ae(Yx,"formatLiteralPercent"),Ae(jx,"formatUnixTimestamp"),Ae(Hx,"formatUnixTimestampSeconds")});function Qx(t){return Jx=Rv(t),tb=Jx.format,Jx}var Jx,tb,eb=t(()=>{Zx(),Qx({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(Qx,"defaultLocale")}),rb=t(()=>{eb()});function nb(t){return new Date(t)}function ib(t){return t instanceof Date?+t:+new Date(+t)}function ab(r,n,e,i,a,o,s,l,c,h){var u=C2(),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){Lv(),rb(),A2(),c2(),O2(),Ae(nb,"date"),Ae(ib,"number"),Ae(ab,"calendar"),Ae(ob,"time")}),lb=t(()=>{g2(),R2(),d2(),sb()});function cb(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{Ae(cb,"default")}),db=t(()=>{ub(),hb=cb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),pb=t(()=>{db()});function gb(t){return Ae(function(){return t},"constant")}var fb=t(()=>{Ae(gb,"default")});function mb(t){return 1{vb=Math.abs,xb=Math.atan2,bb=Math.cos,wb=Math.max,kb=Math.min,Tb=Math.sin,Eb=Math.sqrt,_b=1e-12,Sb=(Cb=Math.PI)/2,Ab=2*Cb,Ae(mb,"acos"),Ae(yb,"asin")});function Nb(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 ly(n)}var Ib=t(()=>{hy(),Ae(Nb,"withPath")});function Mb(t){return t.innerRadius}function Rb(t){return t.outerRadius}function Db(t){return t.startAngle}function Ob(t){return t.endAngle}function Pb(t){return t&&t.padAngle}function Bb(t,e,r,n,i,a,o,s){var l=(s-=a)*(r-=t)-(o-=i)*(n-=e);if(!(l*l<_b))return[t+(l=(o*(e-a)-s*(t-i))/l)*r,e+l*n]}function Fb(t,e,r,n,i,a,o){var s=(o=(o?a:-a)/Eb((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)*Eb(wb(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 $b(){var A=Mb,L=Rb,N=gb(0),I=null,M=Db,R=Ob,D=Pb,O=null,P=Nb(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)-Sb,_=R.apply(this,arguments)-Sb,C=vb(_-E),S=E<_;if(O=O||(t=P()),T_b?(n+=u*=S?1:-1,i-=u):(a=0,n=i=(E+_)/2),(o-=2*d)>_b?(e+=d*=S?1:-1,r-=d):(o=0,e=r=(E+_)/2)),h=T*bb(e),u=T*Tb(e),d=k*bb(i),E=k*Tb(i),_b{fb(),Lb(),Ib(),Ae(Mb,"arcInnerRadius"),Ae(Rb,"arcOuterRadius"),Ae(Db,"arcStartAngle"),Ae(Ob,"arcEndAngle"),Ae(Pb,"arcPadAngle"),Ae(Bb,"intersect"),Ae(Fb,"cornerTangents"),Ae($b,"default")});function Gb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var Ub=t(()=>{Array.prototype.slice,Ae(Gb,"default")});function qb(t){this._context=t}function Yb(t){return new qb(t)}var jb=t(()=>{Ae(qb,"Linear"),qb.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(Yb,"default")});function Hb(t){return t[0]}function Wb(t){return t[1]}var Vb=t(()=>{Ae(Hb,"x"),Ae(Wb,"y")});function Xb(o,s){var l=gb(!0),c=null,h=Yb,u=null,d=Nb(e);function e(t){var e,r,n,i=(t=Gb(t)).length,a=!1;for(null==c&&(u=h(n=d())),e=0;e<=i;++e)!(e{Ub(),fb(),jb(),Ib(),Vb(),Ae(Xb,"default")});function Zb(t,e){return e{Ae(Zb,"default")});function Jb(t){return t}var t4=t(()=>{Ae(Jb,"default")});function e4(){var p=Jb,g=Zb,f=null,m=gb(0),y=gb(Ab),v=gb(0);function e(r){for(var t,e,n,i=(r=Gb(r)).length,a=0,o=new Array(i),s=new Array(i),l=+m.apply(this,arguments),c=Math.min(Ab,Math.max(-Ab,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{Ub(),fb(),Qb(),t4(),Lb(),Ae(e4,"default")});function n4(t){return new a4(t,!0)}function i4(t){return new a4(t,!1)}var a4,o4=t(()=>{a4=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(n4,"bumpX"),Ae(i4,"bumpY")});function s4(){}var l4=t(()=>{Ae(s4,"default")});function c4(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 h4(t){this._context=t}function u4(t){return new h4(t)}var d4=t(()=>{Ae(c4,"point"),Ae(h4,"Basis"),h4.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:c4(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:c4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(u4,"default")});function p4(t){this._context=t}function g4(t){return new p4(t)}var f4=t(()=>{l4(),d4(),Ae(p4,"BasisClosed"),p4.prototype={areaStart:s4,areaEnd:s4,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:c4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(g4,"default")});function m4(t){this._context=t}function y4(t){return new m4(t)}var v4=t(()=>{d4(),Ae(m4,"BasisOpen"),m4.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:c4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(y4,"default")});function x4(t,e){this._basis=new h4(t),this._beta=e}var b4,w4=t(()=>{d4(),Ae(x4,"Bundle"),x4.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{Ae(k4,"point"),Ae(T4,"Cardinal"),T4.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:k4(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:k4(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")},E4=Ae(function e(r){function t(t){return new T4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function C4(t,e){this._context=t,this._k=(1-e)/6}var S4,A4=t(()=>{l4(),_4(),Ae(C4,"CardinalClosed"),C4.prototype={areaStart:s4,areaEnd:s4,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:k4(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")},S4=Ae(function e(r){function t(t){return new C4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function L4(t,e){this._context=t,this._k=(1-e)/6}var N4,I4=t(()=>{_4(),Ae(L4,"CardinalOpen"),L4.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:k4(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")},N4=Ae(function e(r){function t(t){return new L4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function M4(t,e,r){var n,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;_b{Lb(),_4(),Ae(M4,"point"),Ae(R4,"CatmullRom"),R4.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:M4(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")},D4=Ae(function e(r){function t(t){return r?new R4(t,r):new T4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function P4(t,e){this._context=t,this._alpha=e}var B4,F4=t(()=>{A4(),l4(),O4(),Ae(P4,"CatmullRomClosed"),P4.prototype={areaStart:s4,areaEnd:s4,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:M4(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")},B4=Ae(function e(r){function t(t){return r?new P4(t,r):new C4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function $4(t,e){this._context=t,this._alpha=e}var z4,G4=t(()=>{I4(),O4(),Ae($4,"CatmullRomOpen"),$4.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:M4(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")},z4=Ae(function e(r){function t(t){return r?new $4(t,r):new L4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function U4(t){this._context=t}function q4(t){return new U4(t)}var Y4=t(()=>{l4(),Ae(U4,"LinearClosed"),U4.prototype={areaStart:s4,areaEnd:s4,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(q4,"default")});function j4(t){return t<0?-1:1}function H4(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(j4(i)+j4(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function W4(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function V4(t,e,r){var n=t._x0,i=t._x1,a=t._y1,o=(i-n)/3;t._context.bezierCurveTo(n+o,t._y0+o*e,i-o,a-o*r,i,a)}function X4(t){this._context=t}function K4(t){this._context=new Z4(t)}function Z4(t){this._context=t}function Q4(t){return new X4(t)}function J4(t){return new K4(t)}var t3=t(()=>{Ae(j4,"sign"),Ae(H4,"slope3"),Ae(W4,"slope2"),Ae(V4,"point"),Ae(X4,"MonotoneX"),X4.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:V4(this,this._t0,W4(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,V4(this,W4(this,r=H4(this,t,e)),r);break;default:V4(this,this._t0,r=H4(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},Ae(K4,"MonotoneY"),(K4.prototype=Object.create(X4.prototype)).point=function(t,e){X4.prototype.point.call(this,e,t)},Ae(Z4,"ReflectContext"),Z4.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(Q4,"monotoneX"),Ae(J4,"monotoneY")});function e3(t){this._context=t}function r3(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{Ae(e3,"Natural"),e3.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=r3(t),i=r3(e),a=0,o=1;o{Ae(a3,"Step"),a3.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{zb(),Kb(),r4(),f4(),v4(),d4(),o4(),w4(),A4(),I4(),_4(),F4(),G4(),O4(),Y4(),jb(),t3(),i3(),c3()}),u3=t(()=>{}),d3=t(()=>{});function p3(t,e,r){this.k=t,this.x=e,this.y=r}function g3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return f3;return t.__zoom}var f3,m3,y3,v3,x3,b3,w3,k3,T3,E3,_3,C3,S3,A3,L3,N3,I3,M3,R3,D3,O3,P3,B3,F3,$3,z3,G3,U3,q3,Y3,j3,H3,W3=t(()=>{Ae(p3,"Transform"),p3.prototype={constructor:p3,scale:Ae(function(t){return 1===t?this:new p3(this.k*t,this.x,this.y)},"scale"),translate:Ae(function(t,e){return 0===t&0===e?this:new p3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply: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")},f3=new p3(1,0,0),g3.prototype=p3.prototype,Ae(g3,"transform")}),V3=t(()=>{}),X3=t(()=>{qm(),u3(),d3(),W3(),V3()}),K3=t(()=>{X3(),W3()}),Z3=t(()=>{Xh(),cu(),ty(),uy(),y1(),dy(),py(),bu(),dp(),gy(),Bm(),fy(),yy(),n2(),i2(),a2(),mg(),hy(),o2(),my(),s2(),lb(),pb(),up(),h3(),Lv(),rb(),zg(),qm(),K3()}),Q3=bBt(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"}),J3=bBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=Q3();function o(t){return-1{m3=et(J3(),1),Jl(),y3=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"),v3=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"},y3(t,e).lower()},"drawBackgroundRect"),x3=Ae((t,e)=>{var r=e.text.replace(wl," "),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"),b3=Ae((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),w3=Ae((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),k3=Ae(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T3=Ae(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),e5=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{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());$3(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(),$3(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"),A3=Ae(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",o=e.fontColor||"black",s=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(_3(n,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}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=o,$3(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,$3(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,$3(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),L3=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"),k3());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=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},_3(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=F3(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":C3(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,$3(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?$3(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&&$3(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,$3(r)(e.descr.text,s,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),N3=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"),I3=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"),M3=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"),R3=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"),D3=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"),O3=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"),P3=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"),B3=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"),F3=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"),$3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},z3={drawRect:_3,drawBoundary:A3,drawC4Shape:L3,drawRels:S3,drawImage:C3,insertArrowHead:R3,insertArrowEnd:D3,insertArrowFilledHead:O3,insertDynamicNumber:P3,insertArrowCrossHead:B3,insertDatabaseIcon:N3,insertComputerIcon:I3,insertClockIcon:M3}}),r5=t(()=>{G3="object"==typeof global&&global&&global.Object===Object&&global,U3=G3}),n5=t(()=>{r5(),q3="object"==typeof self&&self&&self.Object===Object&&self,q3=U3||q3||Function("return this")(),Y3=q3}),i5=t(()=>{n5(),j3=Y3.Symbol,H3=j3});function a5(t){var e=s5.call(t,c5),r=t[c5];try{var n=!(t[c5]=void 0)}catch{}var i=l5.call(t);return n&&(e?t[c5]=r:delete t[c5]),i}var o5,s5,l5,c5,h5,u5=t(()=>{i5(),o5=Object.prototype,s5=o5.hasOwnProperty,l5=o5.toString,c5=H3?H3.toStringTag:void 0,Ae(a5,"getRawTag"),h5=a5});function d5(t){return g5.call(t)}var p5,g5,f5,m5=t(()=>{p5=Object.prototype,g5=p5.toString,Ae(d5,"objectToString"),f5=d5});function y5(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(v5&&v5 in Object(t)?h5:f5)(t)}var v5,x5,b5=t(()=>{i5(),u5(),m5(),v5=H3?H3.toStringTag:void 0,Ae(y5,"baseGetTag"),x5=y5});function w5(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var k5,T5=t(()=>{Ae(w5,"isObject"),k5=w5});function E5(t){return!!k5(t)&&("[object Function]"==(t=x5(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var _5,C5,S5,A5=t(()=>{b5(),T5(),Ae(E5,"isFunction"),_5=E5}),L5=t(()=>{n5(),C5=Y3["__core-js_shared__"],S5=C5});function N5(t){return!!I5&&I5 in t}var I5,M5,R5=t(()=>{var t;L5(),t=/[^.]+$/.exec(S5&&S5.keys&&S5.keys.IE_PROTO||""),I5=t?"Symbol(src)_1."+t:"",Ae(N5,"isMasked"),M5=N5});function D5(t){if(null!=t){try{return P5.call(t)}catch{}try{return t+""}catch{}}return""}var O5,P5,B5,F5=t(()=>{O5=Function.prototype,P5=O5.toString,Ae(D5,"toSource"),B5=D5});function $5(t){return!(!k5(t)||M5(t))&&(_5(t)?Y5:G5).test(B5(t))}var z5,G5,U5,q5,Y5,j5,H5=t(()=>{A5(),R5(),T5(),F5(),z5=/[\\^$.*+?()[\]{}|]/g,G5=/^\[object .+?Constructor\]$/,U5=Function.prototype,q5=Object.prototype,U5=U5.toString,q5=q5.hasOwnProperty,Y5=RegExp("^"+U5.call(q5).replace(z5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae($5,"baseIsNative"),j5=$5});function W5(t,e){return t?.[e]}var V5,X5=t(()=>{Ae(W5,"getValue"),V5=W5});function K5(t,e){return t=V5(t,e),j5(t)?t:void 0}var Z5,Q5,J5,t6=t(()=>{H5(),X5(),Ae(K5,"getNative"),Z5=K5}),e6=t(()=>{t6(),Q5=Z5(Object,"create"),J5=Q5});function r6(){this.__data__=J5?J5(null):{},this.size=0}var n6,i6=t(()=>{e6(),Ae(r6,"hashClear"),n6=r6});function a6(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var o6,s6=t(()=>{Ae(a6,"hashDelete"),o6=a6});function l6(t){var e,r=this.__data__;return J5?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:h6.call(r,t)?r[t]:void 0}var c6,h6,u6,d6=t(()=>{e6(),c6=Object.prototype,h6=c6.hasOwnProperty,Ae(l6,"hashGet"),u6=l6});function p6(t){var e=this.__data__;return J5?void 0!==e[t]:f6.call(e,t)}var g6,f6,m6,y6=t(()=>{e6(),g6=Object.prototype,f6=g6.hasOwnProperty,Ae(p6,"hashHas"),m6=p6});function v6(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=J5&&void 0===e?"__lodash_hash_undefined__":e,this}var x6,b6=t(()=>{e6(),Ae(v6,"hashSet"),x6=v6});function w6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{i6(),s6(),d6(),y6(),b6(),Ae(w6,"Hash"),w6.prototype.clear=n6,w6.prototype.delete=o6,w6.prototype.get=u6,w6.prototype.has=m6,w6.prototype.set=x6,k6=w6});function E6(){this.__data__=[],this.size=0}var _6,C6=t(()=>{Ae(E6,"listCacheClear"),_6=E6});function S6(t,e){return t===e||t!=t&&e!=e}var A6,L6=t(()=>{Ae(S6,"eq"),A6=S6});function N6(t,e){for(var r=t.length;r--;)if(A6(t[r][0],e))return r;return-1}var I6,M6=t(()=>{L6(),Ae(N6,"assocIndexOf"),I6=N6});function R6(t){var e=this.__data__;return!((t=I6(e,t))<0||(t==e.length-1?e.pop():O6.call(e,t,1),--this.size,0))}var D6,O6,P6,B6=t(()=>{M6(),D6=Array.prototype,O6=D6.splice,Ae(R6,"listCacheDelete"),P6=R6});function F6(t){var e=this.__data__;return(t=I6(e,t))<0?void 0:e[t][1]}var $6,z6=t(()=>{M6(),Ae(F6,"listCacheGet"),$6=F6});function G6(t){return-1{M6(),Ae(G6,"listCacheHas"),U6=G6});function Y6(t,e){var r=this.__data__,n=I6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var j6,H6=t(()=>{M6(),Ae(Y6,"listCacheSet"),j6=Y6});function W6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{C6(),B6(),z6(),q6(),H6(),Ae(W6,"ListCache"),W6.prototype.clear=_6,W6.prototype.delete=P6,W6.prototype.get=$6,W6.prototype.has=U6,W6.prototype.set=j6,V6=W6}),Q6=t(()=>{t6(),n5(),X6=Z5(Y3,"Map"),K6=X6});function J6(){this.size=0,this.__data__={hash:new k6,map:new(K6||V6),string:new k6}}var tw,ew=t(()=>{T6(),Z6(),Q6(),Ae(J6,"mapCacheClear"),tw=J6});function rw(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var nw,iw=t(()=>{Ae(rw,"isKeyable"),nw=rw});function aw(t,e){return t=t.__data__,nw(e)?t["string"==typeof e?"string":"hash"]:t.map}var ow,sw=t(()=>{iw(),Ae(aw,"getMapData"),ow=aw});function lw(t){return t=ow(this,t).delete(t),this.size-=t?1:0,t}var cw,hw=t(()=>{sw(),Ae(lw,"mapCacheDelete"),cw=lw});function uw(t){return ow(this,t).get(t)}var dw,pw=t(()=>{sw(),Ae(uw,"mapCacheGet"),dw=uw});function gw(t){return ow(this,t).has(t)}var fw,mw=t(()=>{sw(),Ae(gw,"mapCacheHas"),fw=gw});function yw(t,e){var r=ow(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var vw,xw=t(()=>{sw(),Ae(yw,"mapCacheSet"),vw=yw});function bw(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{ew(),hw(),pw(),mw(),xw(),Ae(bw,"MapCache"),bw.prototype.clear=tw,bw.prototype.delete=cw,bw.prototype.get=dw,bw.prototype.has=fw,bw.prototype.set=vw,ww=bw});function Tw(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(Ew);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(Tw.Cache||ww),a}var Ew,_w,Cw=t(()=>{kw(),Ew="Expected a function",Ae(Tw,"memoize"),Tw.Cache=ww,_w=Tw});function Sw(){this.__data__=new V6,this.size=0}var Aw,Lw=t(()=>{Z6(),Ae(Sw,"stackClear"),Aw=Sw});function Nw(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Iw,Mw=t(()=>{Ae(Nw,"stackDelete"),Iw=Nw});function Rw(t){return this.__data__.get(t)}var Dw,Ow=t(()=>{Ae(Rw,"stackGet"),Dw=Rw});function Pw(t){return this.__data__.has(t)}var Bw,Fw=t(()=>{Ae(Pw,"stackHas"),Bw=Pw});function $w(t,e){var r=this.__data__;if(r instanceof V6){var n=r.__data__;if(!K6||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ww(n)}return r.set(t,e),this.size=r.size,this}var zw,Gw=t(()=>{Z6(),Q6(),kw(),Ae($w,"stackSet"),zw=$w});function Uw(t){t=this.__data__=new V6(t),this.size=t.size}var qw,Yw,jw,Hw=t(()=>{Z6(),Lw(),Mw(),Ow(),Fw(),Gw(),Ae(Uw,"Stack"),Uw.prototype.clear=Aw,Uw.prototype.delete=Iw,Uw.prototype.get=Dw,Uw.prototype.has=Bw,Uw.prototype.set=zw,qw=Uw}),Ww=t(()=>{t6(),Yw=(()=>{try{var t=Z5(Object,"defineProperty");return t({},"",{}),t}catch{}})(),jw=Yw});function Vw(t,e,r){"__proto__"==e&&jw?jw(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Xw,Kw=t(()=>{Ww(),Ae(Vw,"baseAssignValue"),Xw=Vw});function Zw(t,e,r){(void 0===r||A6(t[e],r))&&(void 0!==r||e in t)||Xw(t,e,r)}var Qw,Jw=t(()=>{Kw(),L6(),Ae(Zw,"assignMergeValue"),Qw=Zw});function tk(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 ek,rk,nk,ik=t(()=>{Ae(tk,"createBaseFor"),ek=tk}),ak=t(()=>{ik(),rk=ek(),nk=rk});function ok(t,e){return e?t.slice():(e=t.length,e=ck?ck(e):new t.constructor(e),t.copy(e),e)}var sk,lk,ck,hk,uk,dk,pk=t(()=>{n5(),sk="object"==typeof exports&&exports&&!exports.nodeType&&exports,lk=(lk=sk&&"object"==typeof module&&module&&!module.nodeType&&module)&&lk.exports===sk?Y3.Buffer:void 0,ck=lk?lk.allocUnsafe:void 0,Ae(ok,"cloneBuffer"),hk=ok}),gk=t(()=>{n5(),uk=Y3.Uint8Array,dk=uk});function fk(t){var e=new t.constructor(t.byteLength);return new dk(e).set(new dk(t)),e}var mk,yk=t(()=>{gk(),Ae(fk,"cloneArrayBuffer"),mk=fk});function vk(t,e){return e=e?mk(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var xk,bk=t(()=>{yk(),Ae(vk,"cloneTypedArray"),xk=vk});function wk(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r{Ae(wk,"copyArray"),kk=wk}),Ck=t(()=>{function e(){}T5(),Tk=Object.create,Ae(e,"object"),Ek=function(t){return k5(t)?Tk?Tk(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function Sk(e,r){return function(t){return e(r(t))}}var Ak,Lk,Nk,Ik=t(()=>{Ae(Sk,"overArg"),Ak=Sk}),Mk=t(()=>{Ik(),Lk=Ak(Object.getPrototypeOf,Object),Nk=Lk});function Rk(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Dk)}var Dk,Ok,Pk=t(()=>{Dk=Object.prototype,Ae(Rk,"isPrototype"),Ok=Rk});function Bk(t){return"function"!=typeof t.constructor||Ok(t)?{}:Ek(Nk(t))}var Fk,$k=t(()=>{Ck(),Mk(),Pk(),Ae(Bk,"initCloneObject"),Fk=Bk});function zk(t){return null!=t&&"object"==typeof t}var Gk,Uk=t(()=>{Ae(zk,"isObjectLike"),Gk=zk});function qk(t){return Gk(t)&&"[object Arguments]"==x5(t)}var Yk,jk,Hk,Wk,Vk,Xk,Kk,Zk=t(()=>{b5(),Uk(),Ae(qk,"baseIsArguments"),Yk=qk}),Qk=t(()=>{Zk(),Uk(),Wk=Object.prototype,jk=Wk.hasOwnProperty,Hk=Wk.propertyIsEnumerable,Wk=Yk(function(){return arguments}())?Yk:function(t){return Gk(t)&&jk.call(t,"callee")&&!Hk.call(t,"callee")},Vk=Wk}),Jk=t(()=>{Xk=Array.isArray,Kk=Xk});function t7(t){return"number"==typeof t&&-1{Ae(t7,"isLength"),e7=t7});function n7(t){return null!=t&&e7(t.length)&&!_5(t)}var i7,a7=t(()=>{A5(),r7(),Ae(n7,"isArrayLike"),i7=n7});function o7(t){return Gk(t)&&i7(t)}var s7,l7=t(()=>{a7(),Uk(),Ae(o7,"isArrayLikeObject"),s7=o7});function c7(){return!1}var h7,u7,d7,p7,g7=t(()=>{Ae(c7,"stubFalse"),h7=c7}),f7=t(()=>{n5(),g7(),d7="object"==typeof exports&&exports&&!exports.nodeType&&exports,u7=(u7=d7&&"object"==typeof module&&module&&!module.nodeType&&module)&&u7.exports===d7?Y3.Buffer:void 0,d7=u7?u7.isBuffer:void 0,p7=d7||h7});function m7(t){return!(!Gk(t)||"[object Object]"!=x5(t))&&(null===(t=Nk(t))||"function"==typeof(t=b7.call(t,"constructor")&&t.constructor)&&t instanceof t&&x7.call(t)==w7)}var y7,v7,x7,b7,w7,k7,T7=t(()=>{b5(),Mk(),Uk(),y7=Function.prototype,v7=Object.prototype,x7=y7.toString,b7=v7.hasOwnProperty,w7=x7.call(Object),Ae(m7,"isPlainObject"),k7=m7});function E7(t){return Gk(t)&&e7(t.length)&&!!_7[x5(t)]}var _7,C7,S7=t(()=>{b5(),r7(),Uk(),(_7={})["[object Float32Array]"]=_7["[object Float64Array]"]=_7["[object Int8Array]"]=_7["[object Int16Array]"]=_7["[object Int32Array]"]=_7["[object Uint8Array]"]=_7["[object Uint8ClampedArray]"]=_7["[object Uint16Array]"]=_7["[object Uint32Array]"]=!0,_7["[object Arguments]"]=_7["[object Array]"]=_7["[object ArrayBuffer]"]=_7["[object Boolean]"]=_7["[object DataView]"]=_7["[object Date]"]=_7["[object Error]"]=_7["[object Function]"]=_7["[object Map]"]=_7["[object Number]"]=_7["[object Object]"]=_7["[object RegExp]"]=_7["[object Set]"]=_7["[object String]"]=_7["[object WeakMap]"]=!1,Ae(E7,"baseIsTypedArray"),C7=E7});function A7(e){return function(t){return e(t)}}var L7,N7,I7,M7,R7,D7,O7,P7=t(()=>{Ae(A7,"baseUnary"),L7=A7}),B7=t(()=>{r5(),M7="object"==typeof exports&&exports&&!exports.nodeType&&exports,N7=M7&&"object"==typeof module&&module&&!module.nodeType&&module,M7=N7&&N7.exports===M7,I7=M7&&U3.process,M7=(()=>{try{return N7&&N7.require&&N7.require("util").types||I7&&I7.binding&&I7.binding("util")}catch{}})(),R7=M7}),F7=t(()=>{S7(),P7(),B7(),D7=(D7=R7&&R7.isTypedArray)?L7(D7):C7,O7=D7});function $7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var z7,G7=t(()=>{Ae($7,"safeGet"),z7=$7});function U7(t,e,r){var n=t[e];Y7.call(t,e)&&A6(n,r)&&(void 0!==r||e in t)||Xw(t,e,r)}var q7,Y7,j7,H7=t(()=>{Kw(),L6(),q7=Object.prototype,Y7=q7.hasOwnProperty,Ae(U7,"assignValue"),j7=U7});function W7(t,e,r,n){var i=!r;r=r||{};for(var a=-1,o=e.length;++a{H7(),Kw(),Ae(W7,"copyObject"),V7=W7});function K7(t,e){for(var r=-1,n=Array(t);++r{Ae(K7,"baseTimes"),Z7=K7});function J7(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&tT.test(t))&&-1{tT=/^(?:0|[1-9]\d*)$/,Ae(J7,"isIndex"),eT=J7});function nT(t,e){var r,n=Kk(t),i=!n&&Vk(t),a=!n&&!i&&p7(t),o=!n&&!i&&!a&&O7(t),s=n||i||a||o,l=s?Z7(t.length,String):[],c=l.length;for(r in t)!e&&!aT.call(t,r)||s&&("length"==r||a&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||eT(r,c))||l.push(r);return l}var iT,aT,oT,sT=t(()=>{Q7(),Qk(),Jk(),f7(),rT(),F7(),iT=Object.prototype,aT=iT.hasOwnProperty,Ae(nT,"arrayLikeKeys"),oT=nT});function lT(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var cT,hT=t(()=>{Ae(lT,"nativeKeysIn"),cT=lT});function uT(t){if(!k5(t))return cT(t);var e,r=Ok(t),n=[];for(e in t)("constructor"!=e||!r&&pT.call(t,e))&&n.push(e);return n}var dT,pT,gT,fT=t(()=>{T5(),Pk(),hT(),dT=Object.prototype,pT=dT.hasOwnProperty,Ae(uT,"baseKeysIn"),gT=uT});function mT(t){return i7(t)?oT(t,!0):gT(t)}var yT,vT=t(()=>{sT(),fT(),a7(),Ae(mT,"keysIn"),yT=mT});function xT(t){return V7(t,yT(t))}var bT,wT=t(()=>{X7(),vT(),Ae(xT,"toPlainObject"),bT=xT});function kT(t,e,r,n,i,a,o){var s,l,c,h=z7(t,r),u=z7(e,r),d=o.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,o):void 0))&&(l=!(s=Kk(u))&&p7(u),c=!s&&!l&&O7(u),d=u,s||l||c?d=Kk(h)?h:s7(h)?kk(h):l?hk(u,!(e=!1)):c?xk(u,!(e=!1)):[]:k7(u)||Vk(u)?Vk(d=h)?d=bT(h):k5(h)&&!_5(h)||(d=Fk(u)):e=!1),e&&(o.set(u,d),i(d,u,n,a,o),o.delete(u))),Qw(t,r,d)}var TT,ET=t(()=>{Jw(),pk(),bk(),_k(),$k(),Qk(),Jk(),l7(),f7(),A5(),T5(),T7(),F7(),G7(),wT(),Ae(kT,"baseMergeDeep"),TT=kT});function _T(n,i,a,o,s){n!==i&&nk(i,function(t,e){var r;s=s||new qw,k5(t)?TT(n,i,e,a,_T,o,s):(r=o?o(z7(n,e),t,e+"",n,i,s):void 0,Qw(n,e,void 0===r?t:r))},yT)}var CT,ST=t(()=>{Hw(),Jw(),ak(),ET(),T5(),vT(),G7(),Ae(_T,"baseMerge"),CT=_T});function AT(t){return t}var LT,NT=t(()=>{Ae(AT,"identity"),LT=AT});function IT(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 MT,RT=t(()=>{Ae(IT,"apply"),MT=IT});function DT(a,o,s){return o=OT(void 0===o?a.length-1:o,0),function(){for(var t=arguments,e=-1,r=OT(t.length-o,0),n=Array(r);++e{RT(),OT=Math.max,Ae(DT,"overRest"),PT=DT});function FT(t){return function(){return t}}var $T,zT,GT=t(()=>{Ae(FT,"constant"),$T=FT}),UT=t(()=>{GT(),Ww(),NT(),zT=jw?function(t,e){return jw(t,"toString",{configurable:!0,enumerable:!1,value:$T(e),writable:!0})}:LT});function qT(r){var n=0,i=0;return function(){var t=YT(),e=16-(t-i);if(i=t,0{YT=Date.now,Ae(qT,"shortOut"),jT=qT}),XT=t(()=>{UT(),VT(),HT=jT(zT),WT=HT});function KT(t,e){return WT(PT(t,e,LT),t+"")}var ZT,QT=t(()=>{NT(),BT(),XT(),Ae(KT,"baseRest"),ZT=KT});function JT(t,e,r){var n;return!!k5(r)&&!!("number"==(n=typeof e)?i7(r)&&eT(e,r.length):"string"==n&&e in r)&&A6(r[e],t)}var t8,e8=t(()=>{L6(),a7(),rT(),T5(),Ae(JT,"isIterateeCall"),t8=JT});function r8(s){return ZT(function(t,e){var r=-1,n=e.length,i=1{QT(),e8(),Ae(r8,"createAssigner"),n8=r8}),s8=t(()=>{ST(),o8(),i8=n8(function(t,e,r){CT(t,e,r)}),a8=i8});function l8(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),k8[t]??e):e}function c8(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,b8.sanitizeUrl)(t):t}function h8(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function u8(t){let e,r=0;t.forEach(t=>{r+=h8(t,e),e=t});var n=r/2;return N8(t,n)}function d8(t){return 1===t.length?t[0]:u8(t)}function p8(t,e,r){var r=structuredClone(r),n=(R.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),n=N8(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 g8(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 f8(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t{b8=et(J3(),1),Z3(),Jl(),Nn(),e(),qr(),jr(),Cw(),s8(),Gr(),w8="​",k8={curveBasis:u4,curveBasisClosed:g4,curveBasisOpen:y4,curveBumpX:n4,curveBumpY:i4,curveBundle:b4,curveCardinalClosed:S4,curveCardinalOpen:N4,curveCardinal:E4,curveCatmullRomClosed:B4,curveCatmullRomOpen:z4,curveCatmullRom:D4,curveLinear:Yb,curveLinearClosed:q4,curveMonotoneX:Q4,curveMonotoneY:J4,curveNatural:n3,curveStep:o3,curveStepAfter:l3,curveStepBefore:s3},T8=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E8=Ae(function(t,e){var r,n=_8(t,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(t=>t.args),xr(r),ie(i,[...r])):n.args)return r=Zt(t,e),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),_8=Ae(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${T8.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=Wt.exec(t));)n.index===Wt.lastIndex&&Wt.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"),C8=Ae(function(t){return t.replace(Wt,"")},"removeDirectives"),S8=Ae(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),Ae(l8,"interpolateToCurve"),Ae(c8,"formatUrl"),A8=Ae((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),N8=Ae((t,e)=>{let r,n=e;for(var i of t){if(r){var a=h8(i,r);if(a{R.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=N8(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(p8,"calcTerminalLabelPosition"),Ae(g8,"getStylesFromArray"),M8=0,R8=Ae(()=>(M8++,"id-"+Math.random().toString(36).substr(2,12)+"-"+M8),"generateId"),Ae(f8,"makeRandomHex"),D8=Ae(t=>f8(t.length),"random"),O8=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"),P8=Ae(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=Y8(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"),B8=_w((t,o,s)=>{if(!t||(s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},s),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=y8(t+" ",s),a=y8(h,s);h=o""!==t).join(s.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),F8=_w((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=y8(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(m8,"calculateTextHeight"),Ae(y8,"calculateTextWidth"),$8=_w((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=Y8(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=O8();if(u.text=c||w8,0===(u=((u=P8(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),z8=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")}},U8=Ae(function(t){return G8=G8||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),G8.innerHTML=t,unescape(G8.textContent)},"entityDecode"),Ae(v8,"isDetailedError"),q8=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"),Y8=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(x8,"cleanAndMerge"),j8={assignWithDepth:ie,wrapLabel:B8,calculateTextHeight:m8,calculateTextWidth:y8,calculateTextDimensions:$8,cleanAndMerge:x8,detectInit:E8,detectDirective:_8,isSubstringInArray:S8,interpolateToCurve:l8,calcLabelPosition:d8,calcCardinalityPosition:I8,calcTerminalLabelPosition:p8,formatUrl:c8,getStylesFromArray:g8,generateId:R8,random:D8,runFunc:A8,entityDecode:U8,insertTitle:q8,parseFontSize:Y8,InitIDGenerator:z8},H8=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"),W8=Ae(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V8=Ae((t,e,{counter:r=0,prefix:n,suffix:i})=>(n?n+"_":"")+t+`_${e}_`+r+(i?"_"+i:""),"getEdgeId")});function K8(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=B8(e[t].text,i,n),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=i,e[t].height=m8(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(y8(o,n),e[t].width),a=m8(o,n),e[t].height=e[t].height+a}}function Z8(e,r,n,t,i){var a,o,s=new nE(i);s.data.widthLimit=n.data.widthLimit/Math.min(eE,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&&rE.wrap,c=oE(rE),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",K8("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+"]",K8("type",o,l,c=oE(rE),s.data.widthLimit),o.type.Y=t+5,t=o.type.Y+o.type.height),o.descr&&""!==o.descr.text&&((c=oE(rE)).fontSize=c.fontSize-2,K8("descr",o,l,c,s.data.widthLimit),o.descr.Y=t+20,t=o.descr.Y+o.descr.height),c=0==a||a%eE==0?(l=n.data.startx+rE.diagramMarginX,n.data.stopy+rE.diagramMarginY+t):(l=s.data.stopx!==s.data.startx?s.data.stopx+rE.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&&cE(s,e,l,c),r=o.alias,0<(l=i.db.getBoundarys(r)).length&&Z8(e,0,s,l,i),"global"!==o.alias&&lE(e,o,s),n.data.stopy=Math.max(s.data.stopy+rE.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+rE.c4ShapeMargin,n.data.stopx),Q8=Math.max(Q8,n.data.stopx),J8=Math.max(J8,n.data.stopy)}}var Q8,J8,tE,eE,rE,nE,iE,aE,oE,sE,lE,cE,hE,uE,dE,pE,gE,fE,mE,yE,vE=t(()=>{Z3(),e5(),e(),Yr(),Jl(),mh(),fh(),jr(),X8(),tc(),J8=Q8=0,tE=4,eE=2,ee.yy=ph,rE={},nE=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,iE(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>tE)&&(e=this.nextData.startx+t.margin+rE.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},iE(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},iE=Ae(function(t){ie(rE,t),t.fontFamily&&(rE.personFontFamily=rE.systemFontFamily=rE.messageFontFamily=t.fontFamily),t.fontSize&&(rE.personFontSize=rE.systemFontSize=rE.messageFontSize=t.fontSize),t.fontWeight&&(rE.personFontWeight=rE.systemFontWeight=rE.messageFontWeight=t.fontWeight)},"setConf"),aE=Ae((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),oE=Ae(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),sE=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Ae(K8,"calcC4ShapeTextWH"),lE=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=rE.c4ShapeMargin-35;var r=e.wrap&&rE.wrap,n=oE(rE),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",y8(e.label.text,n));K8("label",e,r,n,i),z3.drawBoundary(t,e,rE)},"drawBoundary"),cE=Ae(function(r,n,i,t){let a=0;for(var o of t){a=0;var s=i[o];switch((o=aE(rE,s.typeC4Shape.text)).fontSize=o.fontSize-2,s.typeC4Shape.width=y8("«"+s.typeC4Shape.text+"»",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=rE.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&&rE.wrap,l=rE.width-2*rE.c4ShapePadding,c=aE(rE,s.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",K8("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+"]",K8("type",s,o,aE(rE,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+"]",K8("techn",s,o,aE(rE,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&&(K8("descr",s,o,aE(rE,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+=rE.c4ShapePadding,s.width=Math.max(s.width||rE.width,e,rE.width),s.height=Math.max(s.height||rE.height,t,rE.height),s.margin=s.margin||rE.c4ShapeMargin,r.insert(s),z3.drawC4Shape(n,s,rE)}r.bumpLastMargin(rE.c4ShapeMargin)},"drawC4ShapeArray"),hE=class{static{Ae(this,"Point")}constructor(t,e){this.x=t,this.y=e}},uE=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{mE=Ae(t=>`.person { +`},"getStyles"),Zl=Ae((t,e)=>{void 0!==e&&(Xl[t]=e)},"addStylesForDiagram"),Ql=Kl}),rc={};SBt(rc,{clear:()=>oc,getAccDescription:()=>uc,getAccTitle:()=>cc,getDiagramTitle:()=>pc,setAccDescription:()=>hc,setAccTitle:()=>lc,setDiagramTitle:()=>dc});var nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,D,mc,yc,vc,xc,bc,wc,kc,Tc,_c,Ec,Cc,Sc,Ac,Lc,Nc,Ic,Mc,Rc,Dc,Oc,Pc,Bc,Fc,$c,zc,Uc,Gc,qc,jc,Yc,Hc,Wc,Vc,Xc,Kc,Zc,Qc,Jc,th,eh,rh,nh,ih,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh=t(()=>{Jl(),In(),ac=ic=nc="",sc=Ae(t=>Cl(t,Mr()),"sanitizeText"),oc=Ae(()=>{ic=ac=nc=""},"clear"),lc=Ae(t=>{nc=sc(t).replace(/^\s+/g,"")},"setAccTitle"),cc=Ae(()=>nc,"getAccTitle"),hc=Ae(t=>{ac=sc(t).replace(/\n\s+/g,` +`)},"setAccDescription"),uc=Ae(()=>ac,"getAccDescription"),dc=Ae(t=>{ic=sc(t)},"setDiagramTitle"),pc=Ae(()=>ic,"getDiagramTitle")}),fh=t(()=>{qr(),e(),In(),Jl(),tc(),ec(),gh(),gc=R,fc=w,D=Mr,mc=Ir,yc=wr,vc=Ae(t=>Cl(t,D()),"sanitizeText"),xc=Vl,bc=Ae(()=>rc,"getCommonDb"),wc={},kc=Ae((t,e,r)=>{wc[t]&&gc.warn(`Diagram with id ${t} already registered. Overwriting.`),wc[t]=e,r&&Jt(t,r),Zl(t,e.styles),e.injectUtils?.(gc,fc,D,vc,xc,bc(),()=>{})},"registerDiagram"),Tc=Ae(t=>{if(t in wc)return wc[t];throw new _c(t)},"getDiagram"),_c=class extends Error{static{Ae(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),mh=t(()=>{fh(),Jl(),gh(),Ec=[],Cc=[""],Lc=[{alias:Sc="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Ac=""}],Ic="",Mc=!(Nc=[]),Rc=4,Dc=2,Pc=Ae(function(){return Oc},"getC4Type"),Bc=Ae(function(t){Oc=Cl(t,D())},"setC4Type"),Fc=Ae(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Nc.find(t=>t.from===n&&t.to===i);e?t=e:Nc.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=oh()}},"addRel"),$c=Ae(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let t={},e=Ec.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Ec.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 s?([i,c]=Object.entries(s)[0],t[i]=c):t.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Sc,t.wrap=oh()}},"addPersonOrSystem"),zc=Ae(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=Ec.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Ec.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==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=oh(),t.typeC4Shape={text:r},t.parentBoundary=Sc}},"addContainer"),Uc=Ae(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=Ec.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Ec.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==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=oh(),t.typeC4Shape={text:r},t.parentBoundary=Sc}},"addComponent"),Gc=Ae(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Lc.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Lc.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Sc,t.wrap=oh(),Ac=Sc,Sc=r,Cc.push(Ac)}},"addPersonOrSystemBoundary"),qc=Ae(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Lc.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Lc.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Sc,t.wrap=oh(),Ac=Sc,Sc=r,Cc.push(Ac)}},"addContainerBoundary"),jc=Ae(function(r,n,i,a,s,t,o,l){if(null!==n&&null!==i){let t={},e=Lc.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Lc.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==s?t.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]={text:c}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Sc,t.wrap=oh(),Ac=Sc,Sc=n,Cc.push(Ac)}},"addDeploymentNode"),Yc=Ae(function(){Sc=Ac,Cc.pop(),Ac=Cc.pop(),Cc.push(Ac)},"popBoundaryParseStack"),Hc=Ae(function(t,e,r,n,i,a,s,o,l,c,h){let u=Ec.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Lc.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!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),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?([s,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),Wc=Ae(function(t,e,r,n,i,a,s){var o,l,c=Nc.find(t=>t.from===e&&t.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),Vc=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&&(Rc=e),1<=n&&(Dc=n)},"updateLayoutConfig"),Xc=Ae(function(){return Rc},"getC4ShapeInRow"),Kc=Ae(function(){return Dc},"getC4BoundaryInRow"),Zc=Ae(function(){return Sc},"getCurrentBoundaryParse"),Qc=Ae(function(){return Ac},"getParentBoundaryParse"),Jc=Ae(function(e){return null==e?Ec:Ec.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),th=Ae(function(e){return Ec.find(t=>t.alias===e)},"getC4Shape"),eh=Ae(function(t){return Object.keys(Jc(t))},"getC4ShapeKeys"),rh=Ae(function(e){return null==e?Lc:Lc.filter(t=>t.parentBoundary===e)},"getBoundaries"),nh=rh,ih=Ae(function(){return Nc},"getRels"),ah=Ae(function(){return Ic},"getTitle"),sh=Ae(function(t){Mc=t},"setWrap"),oh=Ae(function(){return Mc},"autoWrap"),lh=Ae(function(){Ec=[],Lc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Sc="global",Cc=[Ac=""],Cc=[Ic=""],Mc=!(Nc=[]),Rc=4,Dc=2},"clear"),ch={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},hh={FILLED:0,OPEN:1},uh={LEFTOF:0,RIGHTOF:1,OVER:2},dh=Ae(function(t){Ic=Cl(t,D())},"setTitle"),ph={addPersonOrSystem:$c,addPersonOrSystemBoundary:Gc,addContainer:zc,addContainerBoundary:qc,addComponent:Uc,addDeploymentNode:jc,popBoundaryParseStack:Yc,addRel:Fc,updateElStyle:Hc,updateRelStyle:Wc,updateLayoutConfig:Vc,autoWrap:oh,setWrap:sh,getC4ShapeArray:Jc,getC4Shape:th,getC4ShapeKeys:eh,getBoundaries:rh,getBoundarys:nh,getCurrentBoundaryParse:Zc,getParentBoundaryParse:Qc,getRels:ih,getTitle:ah,getC4Type:Pc,getC4ShapeInRow:Xc,getC4BoundaryInRow:Kc,setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,setAccDescription:hc,getConfig:Ae(()=>D().c4,"getConfig"),clear:lh,LINETYPE:ch,ARROWTYPE:hh,PLACEMENT:uh,setTitle:dh,setC4Type:Bc}});function yh(t,e){return null==t||null==e?NaN:t{Ae(yh,"ascending")});function xh(t,e){return null==t||null==e?NaN:e{Ae(xh,"descending")});function wh(r){let a,s,i;function o(t,e,r=0,n=t.length){if(r>>1}while(s(t[i],e)<0?r=1+i:n=i,r>>1}while(s(t[i],e)<=0?r=1+i:n=i,r-i(t[n],e)?n-1:n}return i=2!==r.length?(a=yh,s=Ae((t,e)=>yh(r(t),e),"compare2"),Ae((t,e)=>r(t)-e,"delta")):(a=r===yh||r===xh?r:kh,s=r),Ae(o,"left"),Ae(t,"right"),Ae(e,"center"),{left:o,center:e,right:t}}function kh(){return 0}var Th=t(()=>{vh(),bh(),Ae(wh,"bisector"),Ae(kh,"zero")});function _h(t){return null===t?NaN:+t}var Eh,Ch,Sh=t(()=>{Ae(_h,"number")}),Ah=t(()=>{vh(),Th(),Sh(),Eh=wh(yh).right,wh(_h).center,Ch=Eh});function Lh({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Nh({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Ih({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Mh(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Rh,Dh=t(()=>{Rh=class extends Map{static{Ae(this,"InternMap")}constructor(t,e=Mh){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(Lh(this,t))}has(t){return super.has(Lh(this,t))}set(t,e){return super.set(Nh(this,t),e)}delete(t){return super.delete(Ih(this,t))}},Ae(Lh,"intern_get"),Ae(Nh,"intern_set"),Ae(Ih,"intern_delete"),Ae(Mh,"keyof")});function Oh(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=$h<=a?10:zh<=a?5:Uh<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),l{$h=Math.sqrt(50),zh=Math.sqrt(10),Uh=Math.sqrt(2),Ae(Oh,"tickSpec"),Ae(Ph,"ticks"),Ae(Bh,"tickIncrement"),Ae(Fh,"tickStep")});function qh(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{Ae(qh,"max")});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 Hh=t(()=>{Ae(Yh,"min")});function Wh(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{Ae(Wh,"range")}),Xh=t(()=>{Ah(),Th(),jh(),Hh(),Vh(),Gh(),Dh()});function Kh(t){return t}var Zh=t(()=>{Ae(Kh,"default")});function Qh(t){return"translate("+t+",0)"}function Jh(t){return"translate(0,"+t+")"}function tu(e){return t=>+e(t)}function eu(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function ru(){return!this.__axis}function nu(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{Zh(),su=1,ou=3,Ae(Qh,"translateX"),Ae(Jh,"translateY"),Ae(tu,"number"),Ae(eu,"center"),Ae(ru,"entering"),Ae(nu,"axis"),Ae(iu,"axisTop"),Ae(au,"axisBottom")}),cu=t(()=>{lu()});function hu(){for(var t,e=0,r=arguments.length,n={};e{fu={value:Ae(()=>{},"value")},Ae(hu,"dispatch"),Ae(uu,"Dispatch"),Ae(du,"parseTypenames"),uu.prototype=hu.prototype={constructor:uu,on:Ae(function(t,e){var r,n=this._,i=du(t+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a{xu()}),wu=t(()=>{vu={svg:"http://www.w3.org/2000/svg",xhtml:yu="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 ku(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),vu.hasOwnProperty(e)?{space:vu[e],local:t}:t}var Tu=t(()=>{wu(),Ae(ku,"default")});function _u(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===yu&&t.documentElement.namespaceURI===yu?t.createElement(r):t.createElementNS(e,r)}}function Eu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Cu(t){return((t=ku(t)).local?Eu:_u)(t)}var Su=t(()=>{Tu(),wu(),Ae(_u,"creatorInherit"),Ae(Eu,"creatorFixed"),Ae(Cu,"default")});function Au(){}function Lu(t){return null==t?Au:function(){return this.querySelector(t)}}var Nu=t(()=>{Ae(Au,"none"),Ae(Lu,"default")});function Iu(t){"function"!=typeof t&&(t=Lu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{cp(),Nu(),Ae(Iu,"default")});function Ru(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Du=t(()=>{Ae(Ru,"array")});function Ou(){return[]}function Pu(t){return null==t?Ou:function(){return this.querySelectorAll(t)}}var Bu=t(()=>{Ae(Ou,"empty"),Ae(Pu,"default")});function Fu(t){return function(){return Ru(t.apply(this,arguments))}}function $u(t){t=("function"==typeof t?Fu:Pu)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{cp(),Du(),Bu(),Ae(Fu,"arrayAll"),Ae($u,"default")});function Uu(t){return function(){return this.matches(t)}}function Gu(e){return function(t){return t.matches(e)}}var qu=t(()=>{Ae(Uu,"default"),Ae(Gu,"childMatcher")});function ju(t){return function(){return Wu.call(this.children,t)}}function Yu(){return this.firstElementChild}function Hu(t){return this.select(null==t?Yu:ju("function"==typeof t?t:Gu(t)))}var Wu,Vu=t(()=>{qu(),Wu=Array.prototype.find,Ae(ju,"childFind"),Ae(Yu,"childFirst"),Ae(Hu,"default")});function Xu(){return Array.from(this.children)}function Ku(t){return function(){return Qu.call(this.children,t)}}function Zu(t){return this.selectAll(null==t?Xu:Ku("function"==typeof t?t:Gu(t)))}var Qu,Ju=t(()=>{qu(),Qu=Array.prototype.filter,Ae(Xu,"children"),Ae(Ku,"childrenFilter"),Ae(Zu,"default")});function td(t){"function"!=typeof t&&(t=Uu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{cp(),qu(),Ae(td,"default")});function rd(t){return new Array(t.length)}var nd=t(()=>{Ae(rd,"default")});function id(){return new ip(this._enter||this._groups.map(rd),this._parents)}function ad(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var sd=t(()=>{nd(),cp(),Ae(id,"default"),Ae(ad,"EnterNode"),ad.prototype={constructor:ad,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 od(t){return function(){return t}}var ld=t(()=>{Ae(od,"default")});function cd(t,e,r,n,i,a){for(var s,o=0,l=e.length,c=a.length;o{cp(),sd(),ld(),Ae(cd,"bindIndex"),Ae(hd,"bindKey"),Ae(ud,"datum"),Ae(dd,"default"),Ae(pd,"arraylike")});function fd(){return new ip(this._exit||this._groups.map(rd),this._parents)}var md=t(()=>{nd(),cp(),Ae(fd,"default")});function yd(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 vd=t(()=>{Ae(yd,"default")});function xd(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),s=0;s{cp(),Ae(xd,"default")});function wd(){for(var t=this._groups,e=-1,r=t.length;++e{Ae(wd,"default")});function Td(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{cp(),Ae(Td,"default"),Ae(_d,"ascending")});function Cd(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var Sd=t(()=>{Ae(Cd,"default")});function Ad(){return Array.from(this)}var Ld=t(()=>{Ae(Ad,"default")});function Nd(){for(var t=this._groups,e=0,r=t.length;e{Ae(Nd,"default")});function Md(){let t=0;for(var e of this)++t;return t}var Rd=t(()=>{Ae(Md,"default")});function Dd(){return!this.node()}var Od=t(()=>{Ae(Dd,"default")});function Pd(t){for(var e=this._groups,r=0,n=e.length;r{Ae(Pd,"default")});function Fd(t){return function(){this.removeAttribute(t)}}function $d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zd(t,e){return function(){this.setAttribute(t,e)}}function Ud(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Gd(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function qd(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=ku(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?$d:Fd:"function"==typeof e?t.local?qd:Gd:t.local?Ud:zd)(t,e))}var Yd=t(()=>{Tu(),Ae(Fd,"attrRemove"),Ae($d,"attrRemoveNS"),Ae(zd,"attrConstant"),Ae(Ud,"attrConstantNS"),Ae(Gd,"attrFunction"),Ae(qd,"attrFunctionNS"),Ae(jd,"default")});function Hd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var Wd=t(()=>{Ae(Hd,"default")});function Vd(t){return function(){this.style.removeProperty(t)}}function Xd(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Kd(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function Zd(t,e,r){return 1{Wd(),Ae(Vd,"styleRemove"),Ae(Xd,"styleConstant"),Ae(Kd,"styleFunction"),Ae(Zd,"default"),Ae(Qd,"styleValue")});function t0(t){return function(){delete this[t]}}function e0(t,e){return function(){this[t]=e}}function r0(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function n0(t,e){return 1{Ae(t0,"propertyRemove"),Ae(e0,"propertyConstant"),Ae(r0,"propertyFunction"),Ae(n0,"default")});function a0(t){return t.trim().split(/^|\s+/)}function s0(t){return t.classList||new o0(t)}function o0(t){this._node=t,this._names=a0(t.getAttribute("class")||"")}function l0(t,e){for(var r=s0(t),n=-1,i=e.length;++n{Ae(a0,"classArray"),Ae(s0,"classList"),Ae(o0,"ClassList"),o0.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(l0,"classedAdd"),Ae(c0,"classedRemove"),Ae(h0,"classedTrue"),Ae(u0,"classedFalse"),Ae(d0,"classedFunction"),Ae(p0,"default")});function f0(){this.textContent=""}function m0(t){return function(){this.textContent=t}}function y0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function v0(t){return arguments.length?this.each(null==t?f0:("function"==typeof t?y0:m0)(t)):this.node().textContent}var x0=t(()=>{Ae(f0,"textRemove"),Ae(m0,"textConstant"),Ae(y0,"textFunction"),Ae(v0,"default")});function b0(){this.innerHTML=""}function w0(t){return function(){this.innerHTML=t}}function k0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function T0(t){return arguments.length?this.each(null==t?b0:("function"==typeof t?k0:w0)(t)):this.node().innerHTML}var _0=t(()=>{Ae(b0,"htmlRemove"),Ae(w0,"htmlConstant"),Ae(k0,"htmlFunction"),Ae(T0,"default")});function E0(){this.nextSibling&&this.parentNode.appendChild(this)}function C0(){return this.each(E0)}var S0=t(()=>{Ae(E0,"raise"),Ae(C0,"default")});function A0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function L0(){return this.each(A0)}var N0=t(()=>{Ae(A0,"lower"),Ae(L0,"default")});function I0(t){var e="function"==typeof t?t:Cu(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var M0=t(()=>{Su(),Ae(I0,"default")});function R0(){return null}function D0(t,e){var r="function"==typeof t?t:Cu(t),n=null==e?R0:"function"==typeof e?e:Lu(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var O0=t(()=>{Su(),Nu(),Ae(R0,"constantNull"),Ae(D0,"default")});function P0(){var t=this.parentNode;t&&t.removeChild(this)}function B0(){return this.each(P0)}var F0=t(()=>{Ae(P0,"remove"),Ae(B0,"default")});function $0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function z0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function U0(t){return this.select(t?z0:$0)}var G0=t(()=>{Ae($0,"selection_cloneShallow"),Ae(z0,"selection_cloneDeep"),Ae(U0,"default")});function q0(t){return arguments.length?this.property("__data__",t):this.node().__data__}var j0=t(()=>{Ae(q0,"default")});function Y0(e){return function(t){e.call(this,t,this.__data__)}}function H0(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 W0(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r{Ae(Y0,"contextListener"),Ae(H0,"parseTypenames"),Ae(W0,"onRemove"),Ae(V0,"onAdd"),Ae(X0,"default")});function Z0(t,e,r){var n=Hd(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 Q0(t,e){return function(){return Z0(this,t,e)}}function J0(t,e){return function(){return Z0(this,t,e.apply(this,arguments))}}function tp(t,e){return this.each(("function"==typeof e?J0:Q0)(t,e))}var ep=t(()=>{Wd(),Ae(Z0,"dispatchEvent"),Ae(Q0,"dispatchConstant"),Ae(J0,"dispatchFunction"),Ae(tp,"default")});function*rp(){for(var t=this._groups,e=0,r=t.length;e{Ae(rp,"default")});function ip(t,e){this._groups=t,this._parents=e}function ap(){return new ip([[document.documentElement]],op)}function sp(){return this}var op,lp,cp=t(()=>{Mu(),zu(),Vu(),Ju(),ed(),gd(),sd(),md(),vd(),bd(),kd(),Ed(),Sd(),Ld(),Id(),Rd(),Od(),Bd(),Yd(),Jd(),i0(),g0(),x0(),_0(),S0(),N0(),M0(),O0(),F0(),G0(),j0(),K0(),ep(),np(),op=[null],Ae(ip,"Selection"),Ae(ap,"selection"),Ae(sp,"selection_selection"),ip.prototype=ap.prototype={constructor:ip,select:Iu,selectAll:$u,selectChild:Hu,selectChildren:Zu,filter:td,data:dd,enter:id,exit:fd,join:yd,merge:xd,selection:sp,order:wd,sort:Td,call:Cd,nodes:Ad,node:Nd,size:Md,empty:Dd,each:Pd,attr:jd,style:Zd,property:n0,classed:p0,text:v0,html:T0,raise:C0,lower:L0,append:I0,insert:D0,remove:B0,clone:U0,datum:q0,on:X0,dispatch:tp,[Symbol.iterator]:rp},lp=ap});function O(t){return"string"==typeof t?new ip([[document.querySelector(t)]],[document.documentElement]):new ip([[t]],op)}var hp=t(()=>{cp(),Ae(O,"default")}),up=t(()=>{qu(),Tu(),hp(),cp(),Nu(),Bu(),Jd()}),dp=t(()=>{});function pp(t,e,r){(t.prototype=e.prototype=r).constructor=t}function gp(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var fp=t(()=>{Ae(pp,"default"),Ae(gp,"extend")});function mp(){}function yp(){return this.rgb().formatHex()}function vp(){return this.rgb().formatHex8()}function xp(){return Dp(this).formatHsl()}function bp(){return this.rgb().formatRgb()}function wp(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=qp.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?kp(e):3===r?new Cp(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Tp(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Tp(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 Cp(e[1],e[2],e[3],1):(e=Yp.exec(t))?new Cp(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Hp.exec(t))?Tp(e[1],e[2],e[3],e[4]):(e=Wp.exec(t))?Tp(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Vp.exec(t))?Rp(e[1],e[2]/100,e[3]/100,1):(e=Xp.exec(t))?Rp(e[1],e[2]/100,e[3]/100,e[4]):Kp.hasOwnProperty(t)?kp(Kp[t]):"transparent"===t?new Cp(NaN,NaN,NaN,0):null}function kp(t){return new Cp(t>>16&255,t>>8&255,255&t,1)}function Tp(t,e,r,n){return new Cp(t=n<=0?e=r=NaN:t,e,r,n)}function _p(t){return(t=t instanceof mp?t:wp(t))?new Cp((t=t.rgb()).r,t.g,t.b,t.opacity):new Cp}function Ep(t,e,r,n){return 1===arguments.length?_p(t):new Cp(t,e,r,n??1)}function Cp(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Sp(){return"#"+Mp(this.r)+Mp(this.g)+Mp(this.b)}function Ap(){return"#"+Mp(this.r)+Mp(this.g)+Mp(this.b)+Mp(255*(isNaN(this.opacity)?1:this.opacity))}function Lp(){var t=Np(this.opacity);return(1===t?"rgb(":"rgba(")+Ip(this.r)+`, ${Ip(this.g)}, `+Ip(this.b)+(1===t?")":`, ${t})`)}function Np(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ip(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mp(t){return((t=Ip(t))<16?"0":"")+t.toString(16)}function Rp(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Pp(t,e,r,n)}function Dp(t){var e,r,n,i,a,s,o,l;return t instanceof Pp?new Pp(t.h,t.s,t.l,t.opacity):(t=t instanceof mp?t:wp(t))?t instanceof Pp?t:(e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),s=NaN,l=((a=Math.max(e,r,n))+i)/2,(o=a-i)?(s=e===a?(r-n)/o+6*(r{fp(),Ae(mp,"Color"),zp="\\s*([+-]?\\d+)\\s*",Up="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qp=/^#([0-9a-f]{3,8})$/,jp=new RegExp(`^rgb\\(${zp},${zp},${zp}\\)$`),Yp=new RegExp(`^rgb\\(${Gp},${Gp},${Gp}\\)$`),Hp=new RegExp(`^rgba\\(${zp},${zp},${zp},${Up}\\)$`),Wp=new RegExp(`^rgba\\(${Gp},${Gp},${Gp},${Up}\\)$`),Vp=new RegExp(`^hsl\\(${Up},${Gp},${Gp}\\)$`),Xp=new RegExp(`^hsla\\(${Up},${Gp},${Gp},${Up}\\)$`),Kp={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},pp(mp,wp,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yp,formatHex:yp,formatHex8:vp,formatHsl:xp,formatRgb:bp,toString:bp}),Ae(yp,"color_formatHex"),Ae(vp,"color_formatHex8"),Ae(xp,"color_formatHsl"),Ae(bp,"color_formatRgb"),Ae(wp,"color"),Ae(kp,"rgbn"),Ae(Tp,"rgba"),Ae(_p,"rgbConvert"),Ae(Ep,"rgb"),Ae(Cp,"Rgb"),pp(Cp,Ep,gp(mp,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Cp(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Cp(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Cp(Ip(this.r),Ip(this.g),Ip(this.b),Np(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:Sp,formatHex:Sp,formatHex8:Ap,formatRgb:Lp,toString:Lp})),Ae(Sp,"rgb_formatHex"),Ae(Ap,"rgb_formatHex8"),Ae(Lp,"rgb_formatRgb"),Ae(Np,"clampa"),Ae(Ip,"clampi"),Ae(Mp,"hex"),Ae(Rp,"hsla"),Ae(Dp,"hslConvert"),Ae(Op,"hsl"),Ae(Pp,"Hsl"),pp(Pp,Op,gp(mp,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pp(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Pp(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 Cp($p(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),$p(t,r,e),$p(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Pp(Bp(this.h),Fp(this.s),Fp(this.l),Np(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=Np(this.opacity);return(1===t?"hsl(":"hsla(")+Bp(this.h)+`, ${100*Fp(this.s)}%, ${100*Fp(this.l)}%`+(1===t?")":`, ${t})`)}})),Ae(Bp,"clamph"),Ae(Fp,"clampt"),Ae($p,"hsl2rgb")}),t1=t(()=>{Zp=Math.PI/180,Qp=180/Math.PI});function e1(t){var e,r,n,i,a,s;return t instanceof n1?new n1(t.l,t.a,t.b,t.opacity):t instanceof h1?u1(t):(i=i1(.2225045*(e=o1((t=t instanceof Cp?t:_p(t)).r))+.7168786*(r=o1(t.g))+.0606169*(n=o1(t.b))),e===r&&r===n?a=s=i:(a=i1((.4360747*e+.3850649*r+.1430804*n)/.96422),s=i1((.0139322*e+.0971045*r+.7141733*n)/.82521)),new n1(116*i-16,500*(a-i),200*(i-s),t.opacity))}function r1(t,e,r,n){return 1===arguments.length?e1(t):new n1(t,e,r,n??1)}function n1(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function i1(t){return f1{fp(),Jp(),t1(),d1=4/29,g1=3*(p1=6/29)*p1,f1=p1*p1*p1,Ae(e1,"labConvert"),Ae(r1,"lab"),Ae(n1,"Lab"),pp(n1,r1,gp(mp,{brighter(t){return new n1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new n1(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 Cp(s1(3.1338561*(e=.96422*a1(e))-1.6168667*(t=+a1(t))-.4906146*(r=.82521*a1(r))),s1(-.9787684*e+1.9161415*t+.033454*r),s1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Ae(i1,"xyz2lab"),Ae(a1,"lab2xyz"),Ae(s1,"lrgb2rgb"),Ae(o1,"rgb2lrgb"),Ae(l1,"hclConvert"),Ae(c1,"hcl"),Ae(h1,"Hcl"),Ae(u1,"hcl2lab"),pp(h1,c1,gp(mp,{brighter(t){return new h1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new h1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return u1(this).rgb()}}))}),y1=t(()=>{Jp(),m1()});function v1(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function x1(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],n=s[e+1],i=0{Ae(v1,"basis"),Ae(x1,"default")});function w1(n){var i=n.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*i),r=n[(e+i-1)%i];return v1((t-e/i)*i,r,n[e%i],n[(e+1)%i],n[(e+2)%i])}}var k1,T1=t(()=>{b1(),Ae(w1,"default")}),_1=t(()=>{k1=Ae(t=>()=>t,"default")});function E1(e,r){return function(t){return e+t*r}}function C1(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 S1(t,e){var r=e-t;return r?E1(t,180{_1(),Ae(E1,"linear"),Ae(C1,"exponential"),Ae(S1,"hue"),Ae(A1,"gamma"),Ae(L1,"nogamma")});function I1(o){return function(t){for(var e,r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s{y1(),b1(),T1(),N1(),M1=Ae(function t(e){var s=A1(e);function r(e,t){var r=s((e=Ep(e)).r,(t=Ep(t)).r),n=s(e.g,t.g),i=s(e.b,t.b),a=L1(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(I1,"rgbSpline"),I1(x1),I1(w1)});function D1(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{Ae(D1,"default"),Ae(O1,"isNumberArray")});function B1(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),s=0;s{Q1(),Ae(B1,"genericArray")});function $1(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var z1=t(()=>{Ae($1,"default")});function U1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var G1=t(()=>{Ae(U1,"default")});function q1(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]=Z1(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(()=>{Q1(),Ae(q1,"default")});function Y1(t){return function(){return t}}function H1(e){return function(t){return e(t)+""}}function W1(t,n){var e,r,i,a=V1.lastIndex=X1.lastIndex=0,s=-1,o=[],l=[];for(t+="",n+="";(e=V1.exec(t))&&(r=X1.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:U1(e,r)})),a=X1.lastIndex;return a{G1(),V1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,X1=new RegExp(V1.source,"g"),Ae(Y1,"zero"),Ae(H1,"one"),Ae(W1,"default")});function Z1(t,e){var r=typeof e;return null==e||"boolean"==r?k1(e):("number"==r?U1:"string"==r?(r=wp(e))?(e=r,M1):W1:e instanceof wp?M1:e instanceof Date?$1:O1(e)?D1:Array.isArray(e)?B1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?q1:U1)(t,e)}var Q1=t(()=>{y1(),R1(),F1(),z1(),G1(),j1(),K1(),_1(),P1(),Ae(Z1,"default")});function J1(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var tg=t(()=>{Ae(J1,"default")});function eg(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{rg=180/Math.PI,ng={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ae(eg,"default")});function ag(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?ng:eg(t.a,t.b,t.c,t.d,t.e,t.f)}function sg(t){return null!=t&&((og=og||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=og.transform.baseVal.consolidate())?eg((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ng}var og,lg=t(()=>{ig(),Ae(ag,"parseCss"),Ae(sg,"parseSvg")});function cg(r,o,l,i){function c(t){return t.length?t.pop()+" ":""}function n(t,e,r,n,i,a){var s;t!==r||e!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:U1(t,r)},{i:s-2,x:U1(e,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(t,e,r,n){t!==e?(180{G1(),lg(),Ae(cg,"interpolateTransform"),hg=cg(ag,"px, ","px)","deg)"),ug=cg(sg,", ",")",")")});function pg(s){return function(e,t){var r=s((e=c1(e)).h,(t=c1(t)).h),n=L1(e.c,t.c),i=L1(e.l,t.l),a=L1(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 gg,fg=t(()=>{y1(),N1(),Ae(pg,"hcl"),gg=pg(S1),pg(L1)}),mg=t(()=>{Q1(),G1(),tg(),K1(),dg(),R1(),fg()});function yg(){return Rg||(Pg(vg),Rg=Og.now()+Dg)}function vg(){Rg=0}function xg(){this._call=this._time=this._next=null}function bg(t,e,r){var n=new xg;return n.restart(t,e,r),n}function wg(){yg(),++Cg;for(var t,e=Ng;e;)0<=(t=Rg-e._time)&&e._call.call(void 0,t),e=e._next;--Cg}function kg(){Rg=(Mg=Og.now())+Dg,Cg=Sg=0;try{wg()}finally{Cg=0,_g(),Rg=0}}function Tg(){var t=Og.now(),e=t-Mg;Lgr._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Ng=e);Ig=t,Eg(n)}function Eg(t){Cg||(Sg=Sg&&clearTimeout(Sg),24{Lg=1e3,Dg=Rg=Mg=Ag=Sg=Cg=0,Og="object"==typeof performance&&performance.now?performance:Date,Pg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},Ae(yg,"now"),Ae(vg,"clearNow"),Ae(xg,"Timer"),xg.prototype=bg.prototype={constructor:xg,restart:Ae(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?yg():+r)+(null==e?0:+e),this._next||Ig===this||(Ig?Ig._next=this:Ng=this,Ig=this),this._call=t,this._time=r,Eg()},"restart"),stop:Ae(function(){this._call&&(this._call=null,this._time=1/0,Eg())},"stop")},Ae(bg,"timer"),Ae(wg,"timerFlush"),Ae(kg,"wake"),Ae(Tg,"poke"),Ae(_g,"nap"),Ae(Eg,"sleep")});function Fg(e,r,t){var n=new xg;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var $g=t(()=>{Bg(),Ae(Fg,"default")}),zg=t(()=>{Bg(),$g()});function Ug(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Yg(t,r,{name:e,index:n,group:i,on:Hg,tween:Wg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Vg})}function Gg(t,e){if((t=jg(t,e)).state>Vg)throw new Error("too late; already scheduled");return t}function qg(t,e){if((t=jg(t,e)).state>Zg)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 Yg(a,s,o){var l,c=a.__transition;function t(t){o.state=Xg,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,n,i;if(o.state!==Xg)return d();for(e in c)if(i=c[e],i.name===o.name){if(i.state===Zg)return Fg(h);i.state===Qg?(i.state=tf,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e{bu(),zg(),Hg=mu("start","end","cancel","interrupt"),Wg=[],Vg=0,Xg=1,Kg=2,Zg=3,Qg=4,Jg=5,tf=6,Ae(Ug,"default"),Ae(Gg,"init"),Ae(qg,"set"),Ae(jg,"get"),Ae(Yg,"create")});function rf(t,e){var r,n,i,a=t.__transition,s=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name!==e?s=!1:(n=Kg{ef(),Ae(rf,"default")});function af(t){return this.each(function(){rf(this,t)})}var sf=t(()=>{nf(),Ae(af,"default")});function of(i,a){var s,o;return function(){var t=qg(this,i),e=t.tween;if(e!==s)for(var r=0,n=(o=s=e).length;r{ef(),Ae(of,"tweenRemove"),Ae(lf,"tweenFunction"),Ae(cf,"default"),Ae(hf,"tweenValue")});function df(t,e){var r;return("number"==typeof e?U1:e instanceof wp?M1:(r=wp(e))?(e=r,M1):W1)(t,e)}var pf=t(()=>{y1(),mg(),Ae(df,"default")});function gf(t){return function(){this.removeAttribute(t)}}function ff(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mf(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttribute(e);return t===s?null:t===i?a:a=r(i=t,n)}}function yf(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===i?a:a=r(i=t,n)}}function vf(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(n):(t=this.getAttribute(n))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function xf(n,i,a){var s,o,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===s&&e===o?l:(o=e,l=i(s=t,r))}}function bf(t,e){var r=ku(t),n="transform"===r?ug:df;return this.attrTween(t,"function"==typeof e?(r.local?xf:vf)(r,n,hf(this,"attr."+t,e)):null==e?(r.local?ff:gf)(r):(r.local?yf:mf)(r,n,e))}var wf=t(()=>{mg(),up(),uf(),pf(),Ae(gf,"attrRemove"),Ae(ff,"attrRemoveNS"),Ae(mf,"attrConstant"),Ae(yf,"attrConstantNS"),Ae(vf,"attrFunction"),Ae(xf,"attrFunctionNS"),Ae(bf,"default")});function kf(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Tf(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)&&Tf(e,t):n}return Ae(t,"tween"),t._value=r,t}function Ef(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&kf(e,t):n}return Ae(t,"tween"),t._value=r,t}function Cf(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=ku(t),this.tween(r,(t.local?_f:Ef)(t,e))}var Sf=t(()=>{up(),Ae(kf,"attrInterpolate"),Ae(Tf,"attrInterpolateNS"),Ae(_f,"attrTweenNS"),Ae(Ef,"attrTween"),Ae(Cf,"default")});function Af(t,e){return function(){Gg(this,t).delay=+e.apply(this,arguments)}}function Lf(t,e){return e=+e,function(){Gg(this,t).delay=e}}function Nf(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Af:Lf)(e,t)):jg(this.node(),e).delay}var If=t(()=>{ef(),Ae(Af,"delayFunction"),Ae(Lf,"delayConstant"),Ae(Nf,"default")});function Mf(t,e){return function(){qg(this,t).duration=+e.apply(this,arguments)}}function Rf(t,e){return e=+e,function(){qg(this,t).duration=e}}function Df(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mf:Rf)(e,t)):jg(this.node(),e).duration}var Of=t(()=>{ef(),Ae(Mf,"durationFunction"),Ae(Rf,"durationConstant"),Ae(Df,"default")});function Pf(t,e){if("function"!=typeof e)throw new Error;return function(){qg(this,t).ease=e}}function Bf(t){var e=this._id;return arguments.length?this.each(Pf(e,t)):jg(this.node(),e).ease}var Ff=t(()=>{ef(),Ae(Pf,"easeConstant"),Ae(Bf,"default")});function $f(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;qg(this,e).ease=t}}function zf(t){if("function"!=typeof t)throw new Error;return this.each($f(this._id,t))}var Uf=t(()=>{ef(),Ae($f,"easeVarying"),Ae(zf,"default")});function Gf(t){"function"!=typeof t&&(t=Uu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{up(),Dm(),Ae(Gf,"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),s=0;s{Dm(),Ae(jf,"default")});function Hf(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 Wf(r,n,i){var a,s,o=Hf(n)?Gg:qg;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(n,i),t.on=s}}function Vf(t,e){var r=this._id;return arguments.length<2?jg(this.node(),r).on.on(t):this.each(Wf(r,t,e))}var Xf=t(()=>{ef(),Ae(Hf,"start"),Ae(Wf,"onFunction"),Ae(Vf,"default")});function Kf(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Zf(){return this.on("end.remove",Kf(this._id))}var Qf=t(()=>{Ae(Kf,"removeFunction"),Ae(Zf,"default")});function Jf(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Lu(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{up(),Dm(),ef(),Ae(Jf,"default")});function em(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Pu(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{up(),Dm(),ef(),Ae(em,"default")});function nm(){return new im(this._groups,this._parents)}var im,am=t(()=>{up(),im=lp.prototype.constructor,Ae(nm,"default")});function sm(r,n){var i,a,s;return function(){var t=Qd(this,r),e=(this.style.removeProperty(r),Qd(this,r));return t===e?null:t===i&&e===a?s:s=n(i=t,a=e)}}function om(t){return function(){this.style.removeProperty(t)}}function lm(e,r,n){var i,a,s=n+"";return function(){var t=Qd(this,e);return t===s?null:t===i?a:a=r(i=t,n)}}function cm(n,i,a){var s,o,l;return function(){var t=Qd(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=Qd(this,n)),t===r?null:t===s&&r===o?l:(o=r,l=i(s=t,e))}}function hm(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var t=qg(this,n),e=t.on,r=null==t.value[c]?l=l||om(i):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function um(t,e,r){var n="transform"==(t+="")?hg:df;return null==e?this.styleTween(t,sm(t,n)).on("end.style."+t,om(t)):"function"==typeof e?this.styleTween(t,cm(t,n,hf(this,"style."+t,e))).each(hm(this._id,t)):this.styleTween(t,lm(t,n,e),r).on("end.style."+t,null)}var dm=t(()=>{mg(),up(),ef(),uf(),pf(),Ae(sm,"styleNull"),Ae(om,"styleRemove"),Ae(lm,"styleConstant"),Ae(cm,"styleFunction"),Ae(hm,"styleMaybeRemove"),Ae(um,"default")});function pm(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function gm(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&pm(e,t,n):i}return Ae(t,"tween"),t._value=r,t}function fm(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,gm(t,e,r??""))}var mm=t(()=>{Ae(pm,"styleInterpolate"),Ae(gm,"styleTween"),Ae(fm,"default")});function ym(t){return function(){this.textContent=t}}function vm(e){return function(){var t=e(this);this.textContent=t??""}}function xm(t){return this.tween("text","function"==typeof t?vm(hf(this,"text",t)):ym(null==t?"":t+""))}var bm=t(()=>{uf(),Ae(ym,"textConstant"),Ae(vm,"textFunction"),Ae(xm,"default")});function wm(e){return function(t){this.textContent=e.call(this,t)}}function km(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&wm(t):r}return Ae(t,"tween"),t._value=e,t}function Tm(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,km(t))}var _m=t(()=>{Ae(wm,"textInterpolate"),Ae(km,"textTween"),Ae(Tm,"default")});function Em(){for(var t=this._name,e=this._id,r=++Mm,n=this._groups,i=n.length,a=0;a{Dm(),ef(),Ae(Em,"default")});function Sm(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},n={value:Ae(function(){0==--l&&t()},"value")};s.each(function(){var t=qg(this,o),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 Am=t(()=>{ef(),Ae(Sm,"default")});function Lm(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Nm(t){return lp().transition(t)}function Im(){return++Mm}var Mm,Rm,Dm=t(()=>{up(),wf(),Sf(),If(),Of(),Ff(),Uf(),qf(),Yf(),Xf(),Qf(),tm(),rm(),am(),dm(),mm(),bm(),_m(),Cm(),uf(),Am(),Mm=0,Ae(Lm,"Transition"),Ae(Nm,"transition"),Ae(Im,"newId"),Rm=lp.prototype,Lm.prototype=Nm.prototype={constructor:Lm,select:Jf,selectAll:em,selectChild:Rm.selectChild,selectChildren:Rm.selectChildren,filter:Gf,merge:jf,selection:nm,transition:Em,call:Rm.call,nodes:Rm.nodes,node:Rm.node,size:Rm.size,empty:Rm.empty,each:Rm.each,on:Vf,attr:bf,attrTween:Cf,style:um,styleTween:fm,text:xm,textTween:Tm,remove:Zf,tween:cf,delay:Nf,duration:Df,ease:Bf,easeVarying:zf,end:Sm,[Symbol.iterator]:Rm[Symbol.iterator]}});function Om(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Pm=t(()=>{Ae(Om,"cubicInOut")}),Bm=t(()=>{Pm()});function Fm(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 $m(t){var e,r;t=t instanceof Lm?(e=t._id,t._name):(e=++Mm,(r=zm).time=yg(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a{Dm(),ef(),Bm(),zg(),zm={time:null,delay:0,duration:250,ease:Om},Ae(Fm,"inherit"),Ae($m,"default")}),Gm=t(()=>{up(),sf(),Um(),lp.prototype.interrupt=af,lp.prototype.transition=$m}),qm=t(()=>{Gm()}),jm=t(()=>{}),Ym=t(()=>{}),Hm=t(()=>{});function Wm(t){return[+t[0],+t[1]]}function Vm(t){return[Wm(t[0]),Wm(t[1])]}function Xm(t){return{type:t}}var Km,Zm,Qm,Jm=t(()=>{qm(),jm(),Ym(),Hm(),{abs:Km,max:Zm,min:Qm}=Math,Ae(Wm,"number1"),Ae(Vm,"number2"),["w","e"].map(Xm),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(Xm),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(Xm),Ae(function(t){return null==t?null:Vm(t)},"input"),Ae(function(t){return t},"output"),Ae(Xm,"type")}),ty=t(()=>{Jm()});function ey(r){this._+=r[0];for(let t=1,e=r.length;t{iy=Math.PI,oy=(ay=2*iy)-(sy=1e-6),Ae(ey,"append"),Ae(ry,"appendRound"),ly=class{static{Ae(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ey:ry(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,s,o=this._x1,l=this._y1,c=r-t,h=n-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:sysy&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((iy-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>sy&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*osy||Math.abs(this._y1-c)>sy)&&this._append`L${l},${c}`,r&&((a=a<0?a%ay+ay:a)>oy?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:sy{cy()}),uy=t(()=>{}),dy=t(()=>{}),py=t(()=>{}),gy=t(()=>{}),fy=t(()=>{}),my=t(()=>{}),yy=t(()=>{});function vy(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function xy(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 by=t(()=>{Ae(vy,"default"),Ae(xy,"formatDecimalParts")});function wy(t){return(t=xy(Math.abs(t)))?t[1]:NaN}var ky=t(()=>{by(),Ae(wy,"default")});function Ty(o,l){return function(t,e){for(var r=t.length,n=[],i=0,a=o[0],s=0;0e));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var _y=t(()=>{Ae(Ty,"default")});function Ey(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Cy=t(()=>{Ae(Ey,"default")});function Sy(t){var e;if(e=Ly.exec(t))return new Ay({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 Ay(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 Ly,Ny=t(()=>{Ly=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,Ae(Sy,"formatSpecifier"),Sy.prototype=Ay.prototype,Ae(Ay,"FormatSpecifier"),Ay.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 Iy(t){t:for(var e,r=t.length,n=1,i=-1;n{Ae(Iy,"default")});function Ry(t,e){var r,n,i=xy(t,e);return i?(r=i[0],(i=(i=i[1])-(Dy=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n{by(),Ae(Ry,"default")});function Py(t,e){var r;return(e=xy(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 By,Fy=t(()=>{by(),Ae(Py,"default")}),$y=t(()=>{by(),Oy(),Fy(),By={"%":Ae((t,e)=>(100*t).toFixed(e),"%"),b:Ae(t=>Math.round(t).toString(2),"b"),c:Ae(t=>t+"","c"),d:vy,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)=>Py(100*t,e),"p"),r:Py,s:Ry,X:Ae(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:Ae(t=>Math.round(t).toString(16),"x")}});function zy(t){return t}var Uy=t(()=>{Ae(zy,"default")});function Gy(t){var k=void 0===t.grouping||void 0===t.thousands?zy:Ty(qy.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+"",_=void 0===t.numerals?zy:Ey(qy.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",E=void 0===t.minus?"−":t.minus+"",C=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=Sy(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"):By[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=By[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 s=(t=+t)<0||1/t<0;if(t=isNaN(t)?C:b(Math.abs(t),f),m&&(t=Iy(t)),i=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:E:"-"===u||"("===u?"":u)+i,a=("s"===y?jy[8+Dy/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e>1)+i+t+a+l.slice(o);break;default:t=l+i+t+a}return _(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=s(((t=Sy(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(wy(e)/3))),n=Math.pow(10,-t),i=jy[8+t/3];return function(t){return r(n*t)+i}}return Ae(s,"newFormat"),Ae(e,"formatPrefix"),{format:s,formatPrefix:e}}var qy,jy,Yy=t(()=>{ky(),_y(),Cy(),Ny(),My(),$y(),Oy(),Uy(),qy=Array.prototype.map,jy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ae(Gy,"default")});function Hy(t){return Wy=Gy(t),Vy=Wy.format,Xy=Wy.formatPrefix,Wy}var Wy,Vy,Xy,Ky=t(()=>{Yy(),Hy({thousands:",",grouping:[3],currency:["$",""]}),Ae(Hy,"defaultLocale")});function Zy(t){return Math.max(0,-wy(Math.abs(t)))}var Qy=t(()=>{ky(),Ae(Zy,"default")});function Jy(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wy(e)/3)))-wy(Math.abs(t)))}var t2=t(()=>{ky(),Ae(Jy,"default")});function e2(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wy(e)-wy(t))+1}var r2=t(()=>{ky(),Ae(e2,"default")}),n2=t(()=>{Ky(),Ny(),Qy(),t2(),r2()}),i2=t(()=>{}),a2=t(()=>{}),s2=t(()=>{}),o2=t(()=>{});function l2(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var c2=t(()=>{Ae(l2,"initRange")});function h2(){var r=new Rh,n=[],i=[],a=u2;function s(t){let e=r.get(t);if(void 0===e){if(a!==u2)return a;r.set(t,e=n.push(t)-1)}return i[e%i.length]}return Ae(s,"scale"),s.domain=function(t){if(!arguments.length)return n.slice();n=[],r=new Rh;for(var e of t)r.has(e)||r.set(e,n.push(e)-1);return s},s.range=function(t){return arguments.length?(i=Array.from(t),s):i.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return h2(n,i).unknown(a)},l2.apply(s,arguments),s}var u2,d2=t(()=>{Xh(),c2(),u2=Symbol("implicit"),Ae(h2,"ordinal")});function p2(){var i,a,t=h2().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c{Xh(),c2(),d2(),Ae(p2,"band")});function f2(t){return function(){return t}}var m2=t(()=>{Ae(f2,"constants")});function y2(t){return+t}var v2=t(()=>{Ae(y2,"number")});function x2(t){return t}function b2(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:f2(isNaN(r)?NaN:.5)}function w2(e,r){var t;return r{Xh(),mg(),m2(),v2(),S2=[0,1],Ae(x2,"identity"),Ae(b2,"normalize"),Ae(w2,"clamper"),Ae(k2,"bimap"),Ae(T2,"polymap"),Ae(_2,"copy"),Ae(E2,"transformer"),Ae(C2,"continuous")});function L2(t,e,r,n){var i,a=Fh(t,e,r);switch((n=Sy(n??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=Jy(a,s))||(n.precision=i),Xy(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=e2(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Zy(a))||(n.precision=i-2*("%"===n.type))}return Vy(n)}var N2=t(()=>{Xh(),n2(),Ae(L2,"tickFormat")});function I2(c){var h=c.domain;return c.ticks=function(t){var e=h();return Ph(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return L2(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,s=n[i],o=n[a],l=10;for(o{Xh(),A2(),c2(),N2(),Ae(I2,"linearish"),Ae(M2,"linear")});function D2(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],s=t[i];return s{Ae(D2,"nice")});function P2(a,s,r,n){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return Ae(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var n,i=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),tP2(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(B2.setTime(+t),F2.setTime(+e),a(B2),a(F2),Math.floor(r(B2,F2))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0n(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var B2,F2,$2,z2,U2,G2,q2,j2,Y2,H2,W2,V2=t(()=>{B2=new Date,F2=new Date,Ae(P2,"timeInterval")}),X2=t(()=>{V2(),($2=P2(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):$2:null)}),K2=t(()=>{V2(),(z2=P2(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Z2=t(()=>{V2(),(U2=P2(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,(G2=P2(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),Q2=t(()=>{V2(),(q2=P2(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=P2(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),J2=t(()=>{V2(),(Y2=P2(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,(H2=P2(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(W2=P2(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 tv(e){return P2(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 ev(e){return P2(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 rv,nv,iv,av,sv,ov,lv,cv,hv,uv,dv,pv,gv,fv,mv,yv,vv,xv,bv=t(()=>{V2(),Ae(tv,"timeWeekday"),rv=tv(0),nv=tv(1),iv=tv(2),av=tv(3),sv=tv(4),ov=tv(5),lv=tv(6),rv.range,nv.range,iv.range,av.range,sv.range,ov.range,lv.range,Ae(ev,"utcWeekday"),cv=ev(0),hv=ev(1),uv=ev(2),dv=ev(3),pv=ev(4),gv=ev(5),fv=ev(6),cv.range,hv.range,uv.range,dv.range,pv.range,gv.range,fv.range}),wv=t(()=>{V2(),(mv=P2(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,(yv=P2(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}),kv=t(()=>{V2(),(vv=P2(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{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=P2(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{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Tv(a,t,e,r,n,i){let s=[[z2,1,1e3],[z2,5,5e3],[z2,15,15e3],[z2,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 o(t,e,r){var n=et).right(s,n);return i===s.length?a.every(Fh(t/31536e6,e/31536e6,r)):0===i?$2.every(Math.max(Fh(t,e,r),1)):([t,e]=s[n/s[i-1][2]{Xh(),X2(),K2(),Z2(),Q2(),J2(),bv(),wv(),kv(),Ae(Tv,"ticker"),[_v,Ev]=Tv(xv,yv,cv,W2,j2,G2),[Cv,Sv]=Tv(vv,mv,rv,Y2,q2,U2)}),Lv=t(()=>{X2(),K2(),Z2(),Q2(),J2(),bv(),wv(),kv(),Av()});function Nv(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 Iv(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 Mv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Rv(t){var n=t.dateTime,i=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=Pv(e),h=Bv(e),P=Pv(r),B=Bv(r),F=Pv(s),$=Bv(s),z=Pv(o),U=Bv(o),G=Pv(l),q=Bv(l),u={a:_,A:E,b:C,B:S,c:null,d:ix,e:ix,f:cx,g:bx,G:kx,H:ax,I:sx,j:ox,L:lx,m:hx,M:ux,p:A,q:L,Q:Yx,s:Hx,S:dx,u:px,U:gx,V:mx,w:yx,W:vx,x:null,X:null,y:xx,Y:wx,Z:Tx,"%":jx},d={a:N,A:I,b:M,B:R,c:null,d:_x,e:_x,f:Lx,g:zx,G:Gx,H:Ex,I:Cx,j:Sx,L:Ax,m:Nx,M:Ix,p:D,q:O,Q:Yx,s:Hx,S:Mx,u:Rx,U:Dx,V:Px,w:Bx,W:Fx,x:null,X:null,y:$x,Y:Ux,Z:qx,"%":jx},j={a:y,A:v,b:x,B:b,c:w,d:Vv,e:Vv,f:tx,g:jv,G:qv,H:Kv,I:Kv,j:Xv,L:Jv,m:Wv,M:Zv,p:m,q:Hv,Q:rx,s:nx,S:Qv,u:$v,U:zv,V:Uv,w:Fv,W:Gv,x:k,X:T,y:jv,Y:qv,Z:Yv,"%":ex};function p(l,c){return function(t){var e,r,n,i=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a[t.toLowerCase(),e]))}function Fv(t,e,r){return(e=Vx.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function $v(t,e,r){return(e=Vx.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function zv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Uv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function Gv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function qv(t,e,r){return(e=Vx.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function jv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Yv(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 Hv(t,e,r){return(e=Vx.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Wv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Vv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Xv(t,e,r){return(e=Vx.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Kv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Zv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Qv(t,e,r){return(e=Vx.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function Jv(t,e,r){return(e=Vx.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function tx(t,e,r){return(e=Vx.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function ex(t,e,r){return(e=Xx.exec(e.slice(r,r+1)))?r+e[0].length:-1}function rx(t,e,r){return(e=Vx.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function nx(t,e,r){return(e=Vx.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function ix(t,e){return Dv(t.getDate(),e,2)}function ax(t,e){return Dv(t.getHours(),e,2)}function sx(t,e){return Dv(t.getHours()%12||12,e,2)}function ox(t,e){return Dv(1+Y2.count(vv(t),t),e,3)}function lx(t,e){return Dv(t.getMilliseconds(),e,3)}function cx(t,e){return lx(t,e)+"000"}function hx(t,e){return Dv(t.getMonth()+1,e,2)}function ux(t,e){return Dv(t.getMinutes(),e,2)}function dx(t,e){return Dv(t.getSeconds(),e,2)}function px(t){return 0===(t=t.getDay())?7:t}function gx(t,e){return Dv(rv.count(vv(t)-1,t),e,2)}function fx(t){var e=t.getDay();return 4<=e||0===e?sv(t):sv.ceil(t)}function mx(t,e){return t=fx(t),Dv(sv.count(vv(t),t)+(4===vv(t).getDay()),e,2)}function yx(t){return t.getDay()}function vx(t,e){return Dv(nv.count(vv(t)-1,t),e,2)}function xx(t,e){return Dv(t.getFullYear()%100,e,2)}function bx(t,e){return Dv((t=fx(t)).getFullYear()%100,e,2)}function wx(t,e){return Dv(t.getFullYear()%1e4,e,4)}function kx(t,e){var r=t.getDay();return Dv((t=4<=r||0===r?sv(t):sv.ceil(t)).getFullYear()%1e4,e,4)}function Tx(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Dv(t/60|0,"0",2)+Dv(t%60,"0",2)}function _x(t,e){return Dv(t.getUTCDate(),e,2)}function Ex(t,e){return Dv(t.getUTCHours(),e,2)}function Cx(t,e){return Dv(t.getUTCHours()%12||12,e,2)}function Sx(t,e){return Dv(1+H2.count(xv(t),t),e,3)}function Ax(t,e){return Dv(t.getUTCMilliseconds(),e,3)}function Lx(t,e){return Ax(t,e)+"000"}function Nx(t,e){return Dv(t.getUTCMonth()+1,e,2)}function Ix(t,e){return Dv(t.getUTCMinutes(),e,2)}function Mx(t,e){return Dv(t.getUTCSeconds(),e,2)}function Rx(t){return 0===(t=t.getUTCDay())?7:t}function Dx(t,e){return Dv(cv.count(xv(t)-1,t),e,2)}function Ox(t){var e=t.getUTCDay();return 4<=e||0===e?pv(t):pv.ceil(t)}function Px(t,e){return t=Ox(t),Dv(pv.count(xv(t),t)+(4===xv(t).getUTCDay()),e,2)}function Bx(t){return t.getUTCDay()}function Fx(t,e){return Dv(hv.count(xv(t)-1,t),e,2)}function $x(t,e){return Dv(t.getUTCFullYear()%100,e,2)}function zx(t,e){return Dv((t=Ox(t)).getUTCFullYear()%100,e,2)}function Ux(t,e){return Dv(t.getUTCFullYear()%1e4,e,4)}function Gx(t,e){var r=t.getUTCDay();return Dv((t=4<=r||0===r?pv(t):pv.ceil(t)).getUTCFullYear()%1e4,e,4)}function qx(){return"+0000"}function jx(){return"%"}function Yx(t){return+t}function Hx(t){return Math.floor(+t/1e3)}var Wx,Vx,Xx,Kx,Zx=t(()=>{Lv(),Ae(Nv,"localDate"),Ae(Iv,"utcDate"),Ae(Mv,"newDate"),Ae(Rv,"formatLocale"),Wx={"-":"",_:" ",0:"0"},Vx=/^\s*\d+/,Xx=/^%/,Kx=/[\\^$*+?|[\]().{}]/g,Ae(Dv,"pad"),Ae(Ov,"requote"),Ae(Pv,"formatRe"),Ae(Bv,"formatLookup"),Ae(Fv,"parseWeekdayNumberSunday"),Ae($v,"parseWeekdayNumberMonday"),Ae(zv,"parseWeekNumberSunday"),Ae(Uv,"parseWeekNumberISO"),Ae(Gv,"parseWeekNumberMonday"),Ae(qv,"parseFullYear"),Ae(jv,"parseYear"),Ae(Yv,"parseZone"),Ae(Hv,"parseQuarter"),Ae(Wv,"parseMonthNumber"),Ae(Vv,"parseDayOfMonth"),Ae(Xv,"parseDayOfYear"),Ae(Kv,"parseHour24"),Ae(Zv,"parseMinutes"),Ae(Qv,"parseSeconds"),Ae(Jv,"parseMilliseconds"),Ae(tx,"parseMicroseconds"),Ae(ex,"parseLiteralPercent"),Ae(rx,"parseUnixTimestamp"),Ae(nx,"parseUnixTimestampSeconds"),Ae(ix,"formatDayOfMonth"),Ae(ax,"formatHour24"),Ae(sx,"formatHour12"),Ae(ox,"formatDayOfYear"),Ae(lx,"formatMilliseconds"),Ae(cx,"formatMicroseconds"),Ae(hx,"formatMonthNumber"),Ae(ux,"formatMinutes"),Ae(dx,"formatSeconds"),Ae(px,"formatWeekdayNumberMonday"),Ae(gx,"formatWeekNumberSunday"),Ae(fx,"dISO"),Ae(mx,"formatWeekNumberISO"),Ae(yx,"formatWeekdayNumberSunday"),Ae(vx,"formatWeekNumberMonday"),Ae(xx,"formatYear"),Ae(bx,"formatYearISO"),Ae(wx,"formatFullYear"),Ae(kx,"formatFullYearISO"),Ae(Tx,"formatZone"),Ae(_x,"formatUTCDayOfMonth"),Ae(Ex,"formatUTCHour24"),Ae(Cx,"formatUTCHour12"),Ae(Sx,"formatUTCDayOfYear"),Ae(Ax,"formatUTCMilliseconds"),Ae(Lx,"formatUTCMicroseconds"),Ae(Nx,"formatUTCMonthNumber"),Ae(Ix,"formatUTCMinutes"),Ae(Mx,"formatUTCSeconds"),Ae(Rx,"formatUTCWeekdayNumberMonday"),Ae(Dx,"formatUTCWeekNumberSunday"),Ae(Ox,"UTCdISO"),Ae(Px,"formatUTCWeekNumberISO"),Ae(Bx,"formatUTCWeekdayNumberSunday"),Ae(Fx,"formatUTCWeekNumberMonday"),Ae($x,"formatUTCYear"),Ae(zx,"formatUTCYearISO"),Ae(Ux,"formatUTCFullYear"),Ae(Gx,"formatUTCFullYearISO"),Ae(qx,"formatUTCZone"),Ae(jx,"formatLiteralPercent"),Ae(Yx,"formatUnixTimestamp"),Ae(Hx,"formatUnixTimestampSeconds")});function Qx(t){return Jx=Rv(t),tb=Jx.format,Jx}var Jx,tb,eb=t(()=>{Zx(),Qx({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(Qx,"defaultLocale")}),rb=t(()=>{eb()});function nb(t){return new Date(t)}function ib(t){return t instanceof Date?+t:+new Date(+t)}function ab(r,n,e,i,a,s,o,l,c,h){var u=C2(),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){Lv(),rb(),A2(),c2(),O2(),Ae(nb,"date"),Ae(ib,"number"),Ae(ab,"calendar"),Ae(sb,"time")}),lb=t(()=>{g2(),R2(),d2(),ob()});function cb(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{Ae(cb,"default")}),db=t(()=>{ub(),hb=cb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),pb=t(()=>{db()});function gb(t){return Ae(function(){return t},"constant")}var fb=t(()=>{Ae(gb,"default")});function mb(t){return 1{vb=Math.abs,xb=Math.atan2,bb=Math.cos,wb=Math.max,kb=Math.min,Tb=Math.sin,_b=Math.sqrt,Eb=1e-12,Sb=(Cb=Math.PI)/2,Ab=2*Cb,Ae(mb,"acos"),Ae(yb,"asin")});function Nb(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 ly(n)}var Ib=t(()=>{hy(),Ae(Nb,"withPath")});function Mb(t){return t.innerRadius}function Rb(t){return t.outerRadius}function Db(t){return t.startAngle}function Ob(t){return t.endAngle}function Pb(t){return t&&t.padAngle}function Bb(t,e,r,n,i,a,s,o){var l=(o-=a)*(r-=t)-(s-=i)*(n-=e);if(!(l*lEb?(n+=u*=S?1:-1,i-=u):(a=0,n=i=(_+E)/2),(s-=2*d)>Eb?(e+=d*=S?1:-1,r-=d):(s=0,e=r=(_+E)/2)),h=T*bb(e),u=T*Tb(e),d=k*bb(i),_=k*Tb(i),Eb{fb(),Lb(),Ib(),Ae(Mb,"arcInnerRadius"),Ae(Rb,"arcOuterRadius"),Ae(Db,"arcStartAngle"),Ae(Ob,"arcEndAngle"),Ae(Pb,"arcPadAngle"),Ae(Bb,"intersect"),Ae(Fb,"cornerTangents"),Ae($b,"default")});function Ub(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var Gb=t(()=>{Array.prototype.slice,Ae(Ub,"default")});function qb(t){this._context=t}function jb(t){return new qb(t)}var Yb=t(()=>{Ae(qb,"Linear"),qb.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 Hb(t){return t[0]}function Wb(t){return t[1]}var Vb=t(()=>{Ae(Hb,"x"),Ae(Wb,"y")});function Xb(s,o){var l=gb(!0),c=null,h=jb,u=null,d=Nb(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{Gb(),fb(),Yb(),Ib(),Vb(),Ae(Xb,"default")});function Zb(t,e){return e{Ae(Zb,"default")});function Jb(t){return t}var t4=t(()=>{Ae(Jb,"default")});function e4(){var p=Jb,g=Zb,f=null,m=gb(0),y=gb(Ab),v=gb(0);function e(r){for(var t,e,n,i=(r=Ub(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(Ab,Math.max(-Ab,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{Gb(),fb(),Qb(),t4(),Lb(),Ae(e4,"default")});function n4(t){return new a4(t,!0)}function i4(t){return new a4(t,!1)}var a4,s4=t(()=>{a4=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(n4,"bumpX"),Ae(i4,"bumpY")});function o4(){}var l4=t(()=>{Ae(o4,"default")});function c4(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 h4(t){this._context=t}function u4(t){return new h4(t)}var d4=t(()=>{Ae(c4,"point"),Ae(h4,"Basis"),h4.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:c4(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:c4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(u4,"default")});function p4(t){this._context=t}function g4(t){return new p4(t)}var f4=t(()=>{l4(),d4(),Ae(p4,"BasisClosed"),p4.prototype={areaStart:o4,areaEnd:o4,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:c4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(g4,"default")});function m4(t){this._context=t}function y4(t){return new m4(t)}var v4=t(()=>{d4(),Ae(m4,"BasisOpen"),m4.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:c4(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(y4,"default")});function x4(t,e){this._basis=new h4(t),this._beta=e}var b4,w4=t(()=>{d4(),Ae(x4,"Bundle"),x4.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{Ae(k4,"point"),Ae(T4,"Cardinal"),T4.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:k4(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:k4(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 T4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function C4(t,e){this._context=t,this._k=(1-e)/6}var S4,A4=t(()=>{l4(),E4(),Ae(C4,"CardinalClosed"),C4.prototype={areaStart:o4,areaEnd:o4,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:k4(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")},S4=Ae(function e(r){function t(t){return new C4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function L4(t,e){this._context=t,this._k=(1-e)/6}var N4,I4=t(()=>{E4(),Ae(L4,"CardinalOpen"),L4.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:k4(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")},N4=Ae(function e(r){function t(t){return new L4(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function M4(t,e,r){var n,i,a=t._x1,s=t._y1,o=t._x2,l=t._y2;Eb{Lb(),E4(),Ae(M4,"point"),Ae(R4,"CatmullRom"),R4.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:M4(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")},D4=Ae(function e(r){function t(t){return r?new R4(t,r):new T4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function P4(t,e){this._context=t,this._alpha=e}var B4,F4=t(()=>{A4(),l4(),O4(),Ae(P4,"CatmullRomClosed"),P4.prototype={areaStart:o4,areaEnd:o4,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:M4(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")},B4=Ae(function e(r){function t(t){return r?new P4(t,r):new C4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function $4(t,e){this._context=t,this._alpha=e}var z4,U4=t(()=>{I4(),O4(),Ae($4,"CatmullRomOpen"),$4.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:M4(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")},z4=Ae(function e(r){function t(t){return r?new $4(t,r):new L4(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function G4(t){this._context=t}function q4(t){return new G4(t)}var j4=t(()=>{l4(),Ae(G4,"LinearClosed"),G4.prototype={areaStart:o4,areaEnd:o4,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(q4,"default")});function Y4(t){return t<0?-1:1}function H4(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(Y4(i)+Y4(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function W4(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function V4(t,e,r){var n=t._x0,i=t._x1,a=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,t._y0+s*e,i-s,a-s*r,i,a)}function X4(t){this._context=t}function K4(t){this._context=new Z4(t)}function Z4(t){this._context=t}function Q4(t){return new X4(t)}function J4(t){return new K4(t)}var t3=t(()=>{Ae(Y4,"sign"),Ae(H4,"slope3"),Ae(W4,"slope2"),Ae(V4,"point"),Ae(X4,"MonotoneX"),X4.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:V4(this,this._t0,W4(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,V4(this,W4(this,r=H4(this,t,e)),r);break;default:V4(this,this._t0,r=H4(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},Ae(K4,"MonotoneY"),(K4.prototype=Object.create(X4.prototype)).point=function(t,e){X4.prototype.point.call(this,e,t)},Ae(Z4,"ReflectContext"),Z4.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(Q4,"monotoneX"),Ae(J4,"monotoneY")});function e3(t){this._context=t}function r3(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e{Ae(e3,"Natural"),e3.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=r3(t),i=r3(e),a=0,s=1;s{Ae(a3,"Step"),a3.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{zb(),Kb(),r4(),f4(),v4(),d4(),s4(),w4(),A4(),I4(),E4(),F4(),U4(),O4(),j4(),Yb(),t3(),i3(),c3()}),u3=t(()=>{}),d3=t(()=>{});function p3(t,e,r){this.k=t,this.x=e,this.y=r}function g3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return f3;return t.__zoom}var f3,m3,y3,v3,x3,b3,w3,k3,T3,_3,E3,C3,S3,A3,L3,N3,I3,M3,R3,D3,O3,P3,B3,F3,$3,z3,U3,G3,q3,j3,Y3,H3,W3=t(()=>{Ae(p3,"Transform"),p3.prototype={constructor:p3,scale:Ae(function(t){return 1===t?this:new p3(this.k*t,this.x,this.y)},"scale"),translate:Ae(function(t,e){return 0===t&0===e?this:new p3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply: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")},f3=new p3(1,0,0),g3.prototype=p3.prototype,Ae(g3,"transform")}),V3=t(()=>{}),X3=t(()=>{qm(),u3(),d3(),W3(),V3()}),K3=t(()=>{X3(),W3()}),Z3=t(()=>{Xh(),cu(),ty(),uy(),y1(),dy(),py(),bu(),dp(),gy(),Bm(),fy(),yy(),n2(),i2(),a2(),mg(),hy(),s2(),my(),o2(),lb(),pb(),up(),h3(),Lv(),rb(),zg(),qm(),K3()}),Q3=kBt(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"}),J3=kBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=Q3();function s(t){return-1{m3=et(J3(),1),Jl(),y3=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"),v3=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"},y3(t,e).lower()},"drawBackgroundRect"),x3=Ae((t,e)=>{var r=e.text.replace(wl," "),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"),b3=Ae((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),w3=Ae((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,m3.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),k3=Ae(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T3=Ae(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),e5=t(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t{let n=t.append("g"),i=0;for(var a of e){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=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&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());$3(r)(a.label.text,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:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),$3(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:o,"font-style":"italic"},l))}},"drawRels"),A3=Ae(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(E3(n,t={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,$3(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,$3(r)(e.type.text,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=s,$3(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),L3=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",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var o=t.append("g"),l=(o.attr("class","person-man"),k3());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=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},E3(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",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)),o.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":o.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)),o.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=F3(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":C3(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,$3(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?$3(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&$3(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,$3(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),N3=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"),I3=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"),M3=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"),R3=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"),D3=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"),O3=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"),P3=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"),B3=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"),F3=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"),$3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},z3={drawRect:E3,drawBoundary:A3,drawC4Shape:L3,drawRels:S3,drawImage:C3,insertArrowHead:R3,insertArrowEnd:D3,insertArrowFilledHead:O3,insertDynamicNumber:P3,insertArrowCrossHead:B3,insertDatabaseIcon:N3,insertComputerIcon:I3,insertClockIcon:M3}}),r5=t(()=>{U3="object"==typeof global&&global&&global.Object===Object&&global,G3=U3}),n5=t(()=>{r5(),q3="object"==typeof self&&self&&self.Object===Object&&self,q3=G3||q3||Function("return this")(),j3=q3}),i5=t(()=>{n5(),Y3=j3.Symbol,H3=Y3});function a5(t){var e=o5.call(t,c5),r=t[c5];try{var n=!(t[c5]=void 0)}catch{}var i=l5.call(t);return n&&(e?t[c5]=r:delete t[c5]),i}var s5,o5,l5,c5,h5,u5=t(()=>{i5(),s5=Object.prototype,o5=s5.hasOwnProperty,l5=s5.toString,c5=H3?H3.toStringTag:void 0,Ae(a5,"getRawTag"),h5=a5});function d5(t){return g5.call(t)}var p5,g5,f5,m5=t(()=>{p5=Object.prototype,g5=p5.toString,Ae(d5,"objectToString"),f5=d5});function y5(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(v5&&v5 in Object(t)?h5:f5)(t)}var v5,x5,b5=t(()=>{i5(),u5(),m5(),v5=H3?H3.toStringTag:void 0,Ae(y5,"baseGetTag"),x5=y5});function w5(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var k5,T5=t(()=>{Ae(w5,"isObject"),k5=w5});function _5(t){return!!k5(t)&&("[object Function]"==(t=x5(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var E5,C5,S5,A5=t(()=>{b5(),T5(),Ae(_5,"isFunction"),E5=_5}),L5=t(()=>{n5(),C5=j3["__core-js_shared__"],S5=C5});function N5(t){return!!I5&&I5 in t}var I5,M5,R5=t(()=>{var t;L5(),t=/[^.]+$/.exec(S5&&S5.keys&&S5.keys.IE_PROTO||""),I5=t?"Symbol(src)_1."+t:"",Ae(N5,"isMasked"),M5=N5});function D5(t){if(null!=t){try{return P5.call(t)}catch{}try{return t+""}catch{}}return""}var O5,P5,B5,F5=t(()=>{O5=Function.prototype,P5=O5.toString,Ae(D5,"toSource"),B5=D5});function $5(t){return!(!k5(t)||M5(t))&&(E5(t)?j5:U5).test(B5(t))}var z5,U5,G5,q5,j5,Y5,H5=t(()=>{A5(),R5(),T5(),F5(),z5=/[\\^$.*+?()[\]{}|]/g,U5=/^\[object .+?Constructor\]$/,G5=Function.prototype,q5=Object.prototype,G5=G5.toString,q5=q5.hasOwnProperty,j5=RegExp("^"+G5.call(q5).replace(z5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae($5,"baseIsNative"),Y5=$5});function W5(t,e){return t?.[e]}var V5,X5=t(()=>{Ae(W5,"getValue"),V5=W5});function K5(t,e){return t=V5(t,e),Y5(t)?t:void 0}var Z5,Q5,J5,t6=t(()=>{H5(),X5(),Ae(K5,"getNative"),Z5=K5}),e6=t(()=>{t6(),Q5=Z5(Object,"create"),J5=Q5});function r6(){this.__data__=J5?J5(null):{},this.size=0}var n6,i6=t(()=>{e6(),Ae(r6,"hashClear"),n6=r6});function a6(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var s6,o6=t(()=>{Ae(a6,"hashDelete"),s6=a6});function l6(t){var e,r=this.__data__;return J5?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:h6.call(r,t)?r[t]:void 0}var c6,h6,u6,d6=t(()=>{e6(),c6=Object.prototype,h6=c6.hasOwnProperty,Ae(l6,"hashGet"),u6=l6});function p6(t){var e=this.__data__;return J5?void 0!==e[t]:f6.call(e,t)}var g6,f6,m6,y6=t(()=>{e6(),g6=Object.prototype,f6=g6.hasOwnProperty,Ae(p6,"hashHas"),m6=p6});function v6(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=J5&&void 0===e?"__lodash_hash_undefined__":e,this}var x6,b6=t(()=>{e6(),Ae(v6,"hashSet"),x6=v6});function w6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{i6(),o6(),d6(),y6(),b6(),Ae(w6,"Hash"),w6.prototype.clear=n6,w6.prototype.delete=s6,w6.prototype.get=u6,w6.prototype.has=m6,w6.prototype.set=x6,k6=w6});function _6(){this.__data__=[],this.size=0}var E6,C6=t(()=>{Ae(_6,"listCacheClear"),E6=_6});function S6(t,e){return t===e||t!=t&&e!=e}var A6,L6=t(()=>{Ae(S6,"eq"),A6=S6});function N6(t,e){for(var r=t.length;r--;)if(A6(t[r][0],e))return r;return-1}var I6,M6=t(()=>{L6(),Ae(N6,"assocIndexOf"),I6=N6});function R6(t){var e=this.__data__;return!((t=I6(e,t))<0||(t==e.length-1?e.pop():O6.call(e,t,1),--this.size,0))}var D6,O6,P6,B6=t(()=>{M6(),D6=Array.prototype,O6=D6.splice,Ae(R6,"listCacheDelete"),P6=R6});function F6(t){var e=this.__data__;return(t=I6(e,t))<0?void 0:e[t][1]}var $6,z6=t(()=>{M6(),Ae(F6,"listCacheGet"),$6=F6});function U6(t){return-1{M6(),Ae(U6,"listCacheHas"),G6=U6});function j6(t,e){var r=this.__data__,n=I6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Y6,H6=t(()=>{M6(),Ae(j6,"listCacheSet"),Y6=j6});function W6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{C6(),B6(),z6(),q6(),H6(),Ae(W6,"ListCache"),W6.prototype.clear=E6,W6.prototype.delete=P6,W6.prototype.get=$6,W6.prototype.has=G6,W6.prototype.set=Y6,V6=W6}),Q6=t(()=>{t6(),n5(),X6=Z5(j3,"Map"),K6=X6});function J6(){this.size=0,this.__data__={hash:new k6,map:new(K6||V6),string:new k6}}var tw,ew=t(()=>{T6(),Z6(),Q6(),Ae(J6,"mapCacheClear"),tw=J6});function rw(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var nw,iw=t(()=>{Ae(rw,"isKeyable"),nw=rw});function aw(t,e){return t=t.__data__,nw(e)?t["string"==typeof e?"string":"hash"]:t.map}var sw,ow=t(()=>{iw(),Ae(aw,"getMapData"),sw=aw});function lw(t){return t=sw(this,t).delete(t),this.size-=t?1:0,t}var cw,hw=t(()=>{ow(),Ae(lw,"mapCacheDelete"),cw=lw});function uw(t){return sw(this,t).get(t)}var dw,pw=t(()=>{ow(),Ae(uw,"mapCacheGet"),dw=uw});function gw(t){return sw(this,t).has(t)}var fw,mw=t(()=>{ow(),Ae(gw,"mapCacheHas"),fw=gw});function yw(t,e){var r=sw(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var vw,xw=t(()=>{ow(),Ae(yw,"mapCacheSet"),vw=yw});function bw(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{ew(),hw(),pw(),mw(),xw(),Ae(bw,"MapCache"),bw.prototype.clear=tw,bw.prototype.delete=cw,bw.prototype.get=dw,bw.prototype.has=fw,bw.prototype.set=vw,ww=bw});function Tw(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(Tw.Cache||ww),a}var _w,Ew,Cw=t(()=>{kw(),_w="Expected a function",Ae(Tw,"memoize"),Tw.Cache=ww,Ew=Tw});function Sw(){this.__data__=new V6,this.size=0}var Aw,Lw=t(()=>{Z6(),Ae(Sw,"stackClear"),Aw=Sw});function Nw(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Iw,Mw=t(()=>{Ae(Nw,"stackDelete"),Iw=Nw});function Rw(t){return this.__data__.get(t)}var Dw,Ow=t(()=>{Ae(Rw,"stackGet"),Dw=Rw});function Pw(t){return this.__data__.has(t)}var Bw,Fw=t(()=>{Ae(Pw,"stackHas"),Bw=Pw});function $w(t,e){var r=this.__data__;if(r instanceof V6){var n=r.__data__;if(!K6||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ww(n)}return r.set(t,e),this.size=r.size,this}var zw,Uw=t(()=>{Z6(),Q6(),kw(),Ae($w,"stackSet"),zw=$w});function Gw(t){t=this.__data__=new V6(t),this.size=t.size}var qw,jw,Yw,Hw=t(()=>{Z6(),Lw(),Mw(),Ow(),Fw(),Uw(),Ae(Gw,"Stack"),Gw.prototype.clear=Aw,Gw.prototype.delete=Iw,Gw.prototype.get=Dw,Gw.prototype.has=Bw,Gw.prototype.set=zw,qw=Gw}),Ww=t(()=>{t6(),jw=(()=>{try{var t=Z5(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Yw=jw});function Vw(t,e,r){"__proto__"==e&&Yw?Yw(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Xw,Kw=t(()=>{Ww(),Ae(Vw,"baseAssignValue"),Xw=Vw});function Zw(t,e,r){(void 0===r||A6(t[e],r))&&(void 0!==r||e in t)||Xw(t,e,r)}var Qw,Jw=t(()=>{Kw(),L6(),Ae(Zw,"assignMergeValue"),Qw=Zw});function tk(l){return function(t,e,r){for(var n=-1,i=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++n];if(!1===e(i[o],o,i))break}return t}}var ek,rk,nk,ik=t(()=>{Ae(tk,"createBaseFor"),ek=tk}),ak=t(()=>{ik(),rk=ek(),nk=rk});function sk(t,e){return e?t.slice():(e=t.length,e=ck?ck(e):new t.constructor(e),t.copy(e),e)}var ok,lk,ck,hk,uk,dk,pk=t(()=>{n5(),ok="object"==typeof exports&&exports&&!exports.nodeType&&exports,lk=(lk=ok&&"object"==typeof module&&module&&!module.nodeType&&module)&&lk.exports===ok?j3.Buffer:void 0,ck=lk?lk.allocUnsafe:void 0,Ae(sk,"cloneBuffer"),hk=sk}),gk=t(()=>{n5(),uk=j3.Uint8Array,dk=uk});function fk(t){var e=new t.constructor(t.byteLength);return new dk(e).set(new dk(t)),e}var mk,yk=t(()=>{gk(),Ae(fk,"cloneArrayBuffer"),mk=fk});function vk(t,e){return e=e?mk(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var xk,bk=t(()=>{yk(),Ae(vk,"cloneTypedArray"),xk=vk});function wk(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r{Ae(wk,"copyArray"),kk=wk}),Ck=t(()=>{function e(){}T5(),Tk=Object.create,Ae(e,"object"),_k=function(t){return k5(t)?Tk?Tk(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function Sk(e,r){return function(t){return e(r(t))}}var Ak,Lk,Nk,Ik=t(()=>{Ae(Sk,"overArg"),Ak=Sk}),Mk=t(()=>{Ik(),Lk=Ak(Object.getPrototypeOf,Object),Nk=Lk});function Rk(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Dk)}var Dk,Ok,Pk=t(()=>{Dk=Object.prototype,Ae(Rk,"isPrototype"),Ok=Rk});function Bk(t){return"function"!=typeof t.constructor||Ok(t)?{}:_k(Nk(t))}var Fk,$k=t(()=>{Ck(),Mk(),Pk(),Ae(Bk,"initCloneObject"),Fk=Bk});function zk(t){return null!=t&&"object"==typeof t}var Uk,Gk=t(()=>{Ae(zk,"isObjectLike"),Uk=zk});function qk(t){return Uk(t)&&"[object Arguments]"==x5(t)}var jk,Yk,Hk,Wk,Vk,Xk,Kk,Zk=t(()=>{b5(),Gk(),Ae(qk,"baseIsArguments"),jk=qk}),Qk=t(()=>{Zk(),Gk(),Wk=Object.prototype,Yk=Wk.hasOwnProperty,Hk=Wk.propertyIsEnumerable,Wk=jk(function(){return arguments}())?jk:function(t){return Uk(t)&&Yk.call(t,"callee")&&!Hk.call(t,"callee")},Vk=Wk}),Jk=t(()=>{Xk=Array.isArray,Kk=Xk});function t7(t){return"number"==typeof t&&-1{Ae(t7,"isLength"),e7=t7});function n7(t){return null!=t&&e7(t.length)&&!E5(t)}var i7,a7=t(()=>{A5(),r7(),Ae(n7,"isArrayLike"),i7=n7});function s7(t){return Uk(t)&&i7(t)}var o7,l7=t(()=>{a7(),Gk(),Ae(s7,"isArrayLikeObject"),o7=s7});function c7(){return!1}var h7,u7,d7,p7,g7=t(()=>{Ae(c7,"stubFalse"),h7=c7}),f7=t(()=>{n5(),g7(),d7="object"==typeof exports&&exports&&!exports.nodeType&&exports,u7=(u7=d7&&"object"==typeof module&&module&&!module.nodeType&&module)&&u7.exports===d7?j3.Buffer:void 0,d7=u7?u7.isBuffer:void 0,p7=d7||h7});function m7(t){return!(!Uk(t)||"[object Object]"!=x5(t))&&(null===(t=Nk(t))||"function"==typeof(t=b7.call(t,"constructor")&&t.constructor)&&t instanceof t&&x7.call(t)==w7)}var y7,v7,x7,b7,w7,k7,T7=t(()=>{b5(),Mk(),Gk(),y7=Function.prototype,v7=Object.prototype,x7=y7.toString,b7=v7.hasOwnProperty,w7=x7.call(Object),Ae(m7,"isPlainObject"),k7=m7});function _7(t){return Uk(t)&&e7(t.length)&&!!E7[x5(t)]}var E7,C7,S7=t(()=>{b5(),r7(),Gk(),(E7={})["[object Float32Array]"]=E7["[object Float64Array]"]=E7["[object Int8Array]"]=E7["[object Int16Array]"]=E7["[object Int32Array]"]=E7["[object Uint8Array]"]=E7["[object Uint8ClampedArray]"]=E7["[object Uint16Array]"]=E7["[object Uint32Array]"]=!0,E7["[object Arguments]"]=E7["[object Array]"]=E7["[object ArrayBuffer]"]=E7["[object Boolean]"]=E7["[object DataView]"]=E7["[object Date]"]=E7["[object Error]"]=E7["[object Function]"]=E7["[object Map]"]=E7["[object Number]"]=E7["[object Object]"]=E7["[object RegExp]"]=E7["[object Set]"]=E7["[object String]"]=E7["[object WeakMap]"]=!1,Ae(_7,"baseIsTypedArray"),C7=_7});function A7(e){return function(t){return e(t)}}var L7,N7,I7,M7,R7,D7,O7,P7=t(()=>{Ae(A7,"baseUnary"),L7=A7}),B7=t(()=>{r5(),M7="object"==typeof exports&&exports&&!exports.nodeType&&exports,N7=M7&&"object"==typeof module&&module&&!module.nodeType&&module,M7=N7&&N7.exports===M7,I7=M7&&G3.process,M7=(()=>{try{return N7&&N7.require&&N7.require("util").types||I7&&I7.binding&&I7.binding("util")}catch{}})(),R7=M7}),F7=t(()=>{S7(),P7(),B7(),D7=(D7=R7&&R7.isTypedArray)?L7(D7):C7,O7=D7});function $7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var z7,U7=t(()=>{Ae($7,"safeGet"),z7=$7});function G7(t,e,r){var n=t[e];j7.call(t,e)&&A6(n,r)&&(void 0!==r||e in t)||Xw(t,e,r)}var q7,j7,Y7,H7=t(()=>{Kw(),L6(),q7=Object.prototype,j7=q7.hasOwnProperty,Ae(G7,"assignValue"),Y7=G7});function W7(t,e,r,n){var i=!r;r=r||{};for(var a=-1,s=e.length;++a{H7(),Kw(),Ae(W7,"copyObject"),V7=W7});function K7(t,e){for(var r=-1,n=Array(t);++r{Ae(K7,"baseTimes"),Z7=K7});function J7(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&tT.test(t))&&-1{tT=/^(?:0|[1-9]\d*)$/,Ae(J7,"isIndex"),eT=J7});function nT(t,e){var r,n=Kk(t),i=!n&&Vk(t),a=!n&&!i&&p7(t),s=!n&&!i&&!a&&O7(t),o=n||i||a||s,l=o?Z7(t.length,String):[],c=l.length;for(r in t)!e&&!aT.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||eT(r,c))||l.push(r);return l}var iT,aT,sT,oT=t(()=>{Q7(),Qk(),Jk(),f7(),rT(),F7(),iT=Object.prototype,aT=iT.hasOwnProperty,Ae(nT,"arrayLikeKeys"),sT=nT});function lT(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var cT,hT=t(()=>{Ae(lT,"nativeKeysIn"),cT=lT});function uT(t){if(!k5(t))return cT(t);var e,r=Ok(t),n=[];for(e in t)("constructor"!=e||!r&&pT.call(t,e))&&n.push(e);return n}var dT,pT,gT,fT=t(()=>{T5(),Pk(),hT(),dT=Object.prototype,pT=dT.hasOwnProperty,Ae(uT,"baseKeysIn"),gT=uT});function mT(t){return i7(t)?sT(t,!0):gT(t)}var yT,vT=t(()=>{oT(),fT(),a7(),Ae(mT,"keysIn"),yT=mT});function xT(t){return V7(t,yT(t))}var bT,wT=t(()=>{X7(),vT(),Ae(xT,"toPlainObject"),bT=xT});function kT(t,e,r,n,i,a,s){var o,l,c,h=z7(t,r),u=z7(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=Kk(u))&&p7(u),c=!o&&!l&&O7(u),d=u,o||l||c?d=Kk(h)?h:o7(h)?kk(h):l?hk(u,!(e=!1)):c?xk(u,!(e=!1)):[]:k7(u)||Vk(u)?Vk(d=h)?d=bT(h):k5(h)&&!E5(h)||(d=Fk(u)):e=!1),e&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),Qw(t,r,d)}var TT,_T=t(()=>{Jw(),pk(),bk(),Ek(),$k(),Qk(),Jk(),l7(),f7(),A5(),T5(),T7(),F7(),U7(),wT(),Ae(kT,"baseMergeDeep"),TT=kT});function ET(n,i,a,s,o){n!==i&&nk(i,function(t,e){var r;o=o||new qw,k5(t)?TT(n,i,e,a,ET,s,o):(r=s?s(z7(n,e),t,e+"",n,i,o):void 0,Qw(n,e,void 0===r?t:r))},yT)}var CT,ST=t(()=>{Hw(),Jw(),ak(),_T(),T5(),vT(),U7(),Ae(ET,"baseMerge"),CT=ET});function AT(t){return t}var LT,NT=t(()=>{Ae(AT,"identity"),LT=AT});function IT(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 MT,RT=t(()=>{Ae(IT,"apply"),MT=IT});function DT(a,s,o){return s=OT(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=OT(t.length-s,0),n=Array(r);++e{RT(),OT=Math.max,Ae(DT,"overRest"),PT=DT});function FT(t){return function(){return t}}var $T,zT,UT=t(()=>{Ae(FT,"constant"),$T=FT}),GT=t(()=>{UT(),Ww(),NT(),zT=Yw?function(t,e){return Yw(t,"toString",{configurable:!0,enumerable:!1,value:$T(e),writable:!0})}:LT});function qT(r){var n=0,i=0;return function(){var t=jT(),e=16-(t-i);if(i=t,0{jT=Date.now,Ae(qT,"shortOut"),YT=qT}),XT=t(()=>{GT(),VT(),HT=YT(zT),WT=HT});function KT(t,e){return WT(PT(t,e,LT),t+"")}var ZT,QT=t(()=>{NT(),BT(),XT(),Ae(KT,"baseRest"),ZT=KT});function JT(t,e,r){var n;return!!k5(r)&&!!("number"==(n=typeof e)?i7(r)&&eT(e,r.length):"string"==n&&e in r)&&A6(r[e],t)}var t8,e8=t(()=>{L6(),a7(),rT(),T5(),Ae(JT,"isIterateeCall"),t8=JT});function r8(o){return ZT(function(t,e){var r=-1,n=e.length,i=1{QT(),e8(),Ae(r8,"createAssigner"),n8=r8}),o8=t(()=>{ST(),s8(),i8=n8(function(t,e,r){CT(t,e,r)}),a8=i8});function l8(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),T8[t]??e):e}function c8(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,w8.sanitizeUrl)(t):t}function h8(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function u8(t){let e,r=0;t.forEach(t=>{r+=h8(t,e),e=t});var n=r/2;return I8(t,n)}function d8(t){return 1===t.length?t[0]:u8(t)}function p8(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 g8(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 f8(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t{w8=et(J3(),1),Z3(),Jl(),Nn(),e(),qr(),Yr(),Cw(),o8(),Ur(),k8="​",T8={curveBasis:u4,curveBasisClosed:g4,curveBasisOpen:y4,curveBumpX:n4,curveBumpY:i4,curveBundle:b4,curveCardinalClosed:S4,curveCardinalOpen:N4,curveCardinal:_4,curveCatmullRomClosed:B4,curveCatmullRomOpen:z4,curveCatmullRom:D4,curveLinear:jb,curveLinearClosed:q4,curveMonotoneX:Q4,curveMonotoneY:J4,curveNatural:n3,curveStep:s3,curveStepAfter:l3,curveStepBefore:o3},_8=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E8=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),xr(r),ie(i,[...r])):n.args)return r=Zt(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}(?![{]${_8.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,s=[];null!==(n=Wt.exec(t));)n.index===Wt.lastIndex&&Wt.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,s.push({type:i,args:a}));return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}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(Wt,"")},"removeDirectives"),A8=Ae(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),Ae(l8,"interpolateToCurve"),Ae(c8,"formatUrl"),L8=Ae((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t(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=h8(i,r);if(a{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(p8,"calcTerminalLabelPosition"),Ae(g8,"getStylesFromArray"),R8=0,D8=Ae(()=>(R8++,"id-"+Math.random().toString(36).substr(2,12)+"-"+R8),"generateId"),Ae(f8,"makeRandomHex"),O8=Ae(t=>f8(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]=Y8(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=Ew((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=y8(t+" ",o),a=y8(h,o);h=s""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),$8=Ew((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=y8(t,a)>=n?(e+=1,e=s.length===e,r=t+i,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),Ae(m8,"calculateTextHeight"),Ae(y8,"calculateTextWidth"),z8=Ew((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=Y8(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),s=[];if(!(r=O("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=P8();if(u.text=c||k8,0===(u=((u=B8(l,u).style("font-size",i).style("font-weight",n).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),U8=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 G8=G8||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),G8.innerHTML=t,unescape(G8.textContent)},"entityDecode"),Ae(v8,"isDetailedError"),j8=Ae((t,e,r,n)=>{var i;n&&(i=t.node()?.getBBox())&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Y8=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(x8,"cleanAndMerge"),H8={assignWithDepth:ie,wrapLabel:F8,calculateTextHeight:m8,calculateTextWidth:y8,calculateTextDimensions:z8,cleanAndMerge:x8,detectInit:E8,detectDirective:C8,isSubstringInArray:A8,interpolateToCurve:l8,calcLabelPosition:d8,calcCardinalityPosition:M8,calcTerminalLabelPosition:p8,formatUrl:c8,getStylesFromArray:g8,generateId:D8,random:O8,runFunc:L8,entityDecode:q8,insertTitle:j8,parseFontSize:Y8,InitIDGenerator:U8},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"),Ae(b8,"handleUndefinedAttr")});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=m8(e[t].text,n);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(y8(s,n),e[t].width),a=m8(s,n),e[t].height=e[t].height+a}}function Q8(e,r,n,t,i){var a,s,o=new i_(i);o.data.widthLimit=n.data.widthLimit/Math.min(r_,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&n_.wrap,c=o_(n_),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",Z8("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",Z8("type",s,l,c=o_(n_),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=o_(n_)).fontSize=c.fontSize-2,Z8("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%r_==0?(l=n.data.startx+n_.diagramMarginX,n.data.stopy+n_.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+n_.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&h_(o,e,l,c),r=s.alias,0<(l=i.db.getBoundarys(r)).length&&Q8(e,0,o,l,i),"global"!==s.alias&&c_(e,s,o),n.data.stopy=Math.max(o.data.stopy+n_.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+n_.c4ShapeMargin,n.data.stopx),J8=Math.max(J8,n.data.stopx),t_=Math.max(t_,n.data.stopy)}}var J8,t_,e_,r_,n_,i_,a_,s_,o_,l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,x_=t(()=>{Z3(),e5(),e(),jr(),Jl(),mh(),fh(),Yr(),K8(),tc(),t_=J8=0,e_=4,r_=2,ee.yy=ph,n_={},i_=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,a_(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>e_)&&(e=this.nextData.startx+t.margin+n_.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},a_(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},a_=Ae(function(t){ie(n_,t),t.fontFamily&&(n_.personFontFamily=n_.systemFontFamily=n_.messageFontFamily=t.fontFamily),t.fontSize&&(n_.personFontSize=n_.systemFontSize=n_.messageFontSize=t.fontSize),t.fontWeight&&(n_.personFontWeight=n_.systemFontWeight=n_.messageFontWeight=t.fontWeight)},"setConf"),s_=Ae((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),o_=Ae(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),l_=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Ae(Z8,"calcC4ShapeTextWH"),c_=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=n_.c4ShapeMargin-35;var r=e.wrap&&n_.wrap,n=o_(n_),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",y8(e.label.text,n));Z8("label",e,r,n,i),z3.drawBoundary(t,e,n_)},"drawBoundary"),h_=Ae(function(r,n,i,t){let a=0;for(var s of t){a=0;var o=i[s];switch((s=s_(n_,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=y8("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=n_.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&n_.wrap,l=n_.width-2*n_.c4ShapePadding,c=s_(n_,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",Z8("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",Z8("type",o,s,s_(n_,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",Z8("techn",o,s,s_(n_,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(Z8("descr",o,s,s_(n_,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=n_.c4ShapePadding,o.width=Math.max(o.width||n_.width,e,n_.width),o.height=Math.max(o.height||n_.height,t,n_.height),o.margin=o.margin||n_.c4ShapeMargin,r.insert(o),z3.drawC4Shape(n,o,n_)}r.bumpLastMargin(n_.c4ShapeMargin)},"drawC4ShapeArray"),u_=class{static{Ae(this,"Point")}constructor(t,e){this.x=t,this.y=e}},d_=Ae(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=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{y_=Ae(t=>`.person { stroke: ${t.personBorder}; fill: ${t.personBkg}; } -`,"getStyles"),yE=mE}),bE={};_Bt(bE,{diagram:()=>wE});var wE,kE=t(()=>{Yr(),mh(),vE(),xE(),wE={parser:re,db:ph,renderer:fE,styles:yE,init:Ae(({c4:t,wrap:e})=>{fE.setConf(t),ph.setWrap(e)},"init")}});function TE(t){return"u">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 s_(t){for(var e,r="",n=0,i=t.length,a=GC,o=0;o>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 l_(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function c_(t){if(null!==t)for(var e,r,n,i=[],a=t,o=0,s=a.length;o>10),56320+(t-65536&1023))}function __(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||KC,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 C_(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=NC(t),new LC(e,t)}function S_(t,e){throw C_(t,e)}function A_(t,e){t.onWarning&&t.onWarning.call(null,C_(t,e))}function L_(t,e,r,n){var i,a,o,s;if(el&&(l=t.lineIndent),m_(u))c++;else{if(t.lineIndente)&&0!==n)S_(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(o=t.line,s=t.lineStart,l=t.position),H_(t,e,eS,!0,i)&&(y?f=t.result:m=t.result),y||(I_(t,d,p,g,f,m,o,s,l),g=f=m=null),R_(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)S_(t,"bad indentation of a mapping entry");else if(t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&S_(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)):S_(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 W_(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))&&(R_(t,!0,-1),i=t.input.charCodeAt(t.position),!(0{if(0===a.length)return i.quotingType===kS?'""':"''";if(!i.noCompatMode&&(-1!==bS.indexOf(a)||wS.test(a)))return i.quotingType===kS?'"'+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;function n(t){return rC(i,t)}switch(Ae(n,"testAmbiguity"),uC(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!s,l)){case TS:return a;case ES:return"'"+a.replace(/'/g,"''")+"'";case _S:return"|"+pC(a,i.indent)+gC(tC(a,t));case CS:return">"+pC(a,i.indent)+gC(tC(fC(a,e),t));case SS:return'"'+yC(a)+'"';default:throw new LC("impossible error: invalid scalar style")}})()}function pC(t,e){var e=hC(t)?String(e):"",r=t[t.length-1]===` -`;return e+(!r||t[t.length-2]!==` -`&&t!==` -`?r?"":"-":"+")+` -`}function gC(t){return t[t.length-1]===` -`?t.slice(0,-1):t}function fC(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(` -`))?r:t.length,n.lastIndex=r,mC(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?"":` -`)+mC(s,e),a=l}return i}function mC(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=ae&&a tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function TC(t,e,r,n,i,a,o){t.tag=null,t.dump=r,kC(t,r,!1)||kC(t,r,!0);var s,l,c=fS.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",t.dump=r+" "+t.dump)}return!0}function EC(t,e){var r,n,i=[],a=[];for(_C(t,i,a),r=0,n=a.length;r{for(Ae(TE,"isNothing"),Ae(EE,"isObject"),Ae(_E,"toArray"),Ae(CE,"extend"),Ae(SE,"repeat"),Ae(AE,"isNegativeZero"),AC={isNothing:TE,isObject:EE,toArray:_E,repeat:SE,isNegativeZero:AE,extend:CE},Ae(LE,"formatError"),Ae(NE,"YAMLException$1"),((NE.prototype=Object.create(Error.prototype)).constructor=NE).prototype.toString=Ae(function(t){return this.name+": "+LE(this,t)},"toString"),LC=NE,Ae(IE,"getLine"),Ae(ME,"padStart"),Ae(RE,"makeSnippet"),NC=RE,IC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],MC=["scalar","sequence","mapping"],Ae(DE,"compileStyleAliases"),Ae(OE,"Type$1"),RC=OE,Ae(PE,"compileList"),Ae(BE,"compileMap"),Ae(FE,"Schema$1"),FE.prototype.extend=Ae(function(t){var e=[],r=[];if(t instanceof RC)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 LC("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 RC))throw new LC("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new LC("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 LC("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 RC))throw new LC("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(FE.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=PE(t,"implicit"),t.compiledExplicit=PE(t,"explicit"),t.compiledTypeMap=BE(t.compiledImplicit,t.compiledExplicit),t},"extend"),PC=FE,gS=new RC("tag:yaml.org,2002:str",{kind:"scalar",construct:Ae(function(t){return null!==t?t:""},"construct")}),$C=new RC("tag:yaml.org,2002:seq",{kind:"sequence",construct:Ae(function(t){return null!==t?t:[]},"construct")}),zC=new RC("tag:yaml.org,2002:map",{kind:"mapping",construct:Ae(function(t){return null!==t?t:{}},"construct")}),PC=new PC({explicit:[gS,$C,zC]}),Ae($E,"resolveYamlNull"),Ae(zE,"constructYamlNull"),Ae(GE,"isNull"),gS=new RC("tag:yaml.org,2002:null",{kind:"scalar",resolve:$E,construct:zE,predicate:GE,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(UE,"resolveYamlBoolean"),Ae(qE,"constructYamlBoolean"),Ae(YE,"isBoolean"),$C=new RC("tag:yaml.org,2002:bool",{kind:"scalar",resolve:UE,construct:qE,predicate:YE,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"}),Ae(jE,"isHexCode"),Ae(HE,"isOctCode"),Ae(WE,"isDecCode"),Ae(VE,"resolveYamlInteger"),Ae(XE,"constructYamlInteger"),Ae(KE,"isInteger"),zC=new RC("tag:yaml.org,2002:int",{kind:"scalar",resolve:VE,construct:XE,predicate:KE,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"]}}),DC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ae(ZE,"resolveYamlFloat"),Ae(QE,"constructYamlFloat"),OC=/^[-+]?[0-9]+e/,Ae(JE,"representYamlFloat"),Ae(t_,"isFloat"),UC=new RC("tag:yaml.org,2002:float",{kind:"scalar",resolve:ZE,construct:QE,predicate:t_,represent:JE,defaultStyle:"lowercase"}),PC=PC.extend({implicit:[gS,$C,zC,UC]}),gS=PC,BC=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),FC=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]))?))?$"),Ae(e_,"resolveYamlTimestamp"),Ae(r_,"constructYamlTimestamp"),Ae(n_,"representYamlTimestamp"),$C=new RC("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:e_,construct:r_,instanceOf:Date,represent:n_}),Ae(i_,"resolveYamlMerge"),zC=new RC("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i_}),GC=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`,Ae(a_,"resolveYamlBinary"),Ae(o_,"constructYamlBinary"),Ae(s_,"representYamlBinary"),Ae(l_,"isBinary"),UC=new RC("tag:yaml.org,2002:binary",{kind:"scalar",resolve:a_,construct:o_,predicate:l_,represent:s_}),qC=Object.prototype.hasOwnProperty,YC=Object.prototype.toString,Ae(c_,"resolveYamlOmap"),Ae(h_,"constructYamlOmap"),jC=new RC("tag:yaml.org,2002:omap",{kind:"sequence",resolve:c_,construct:h_}),HC=Object.prototype.toString,Ae(u_,"resolveYamlPairs"),Ae(d_,"constructYamlPairs"),WC=new RC("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:u_,construct:d_}),VC=Object.prototype.hasOwnProperty,Ae(p_,"resolveYamlSet"),Ae(g_,"constructYamlSet"),XC=new RC("tag:yaml.org,2002:set",{kind:"mapping",resolve:p_,construct:g_}),KC=gS.extend({implicit:[$C,zC],explicit:[UC,jC,WC,XC]}),ZC=Object.prototype.hasOwnProperty,eS=4,rS=QC=1,nS=JC=2,iS=tS=3,aS=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oS=/[\x85\u2028\u2029]/,sS=/[,\[\]\{\}]/,lS=/^(?:!|!!|![a-z\-]+!)$/i,cS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,Ae(f_,"_class"),Ae(m_,"is_EOL"),Ae(y_,"is_WHITE_SPACE"),Ae(v_,"is_WS_OR_EOL"),Ae(x_,"is_FLOW_INDICATOR"),Ae(b_,"fromHexCode"),Ae(w_,"escapedHexLen"),Ae(k_,"fromDecimalCode"),Ae(T_,"simpleEscapeSequence"),Ae(E_,"charFromCodepoint"),hS=new Array(256),uS=new Array(256),dS=0;dS<256;dS++)hS[dS]=T_(dS)?1:0,uS[dS]=T_(dS);Ae(__,"State$1"),Ae(C_,"generateError"),Ae(S_,"throwError"),Ae(A_,"throwWarning"),pS={YAML:Ae(function(t,e,r){var n,i;null!==t.version&&S_(t,"duplication of %YAML directive"),1!==r.length&&S_(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&S_(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&S_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&A_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Ae(function(t,e,r){var n;2!==r.length&&S_(t,"TAG directive accepts exactly two arguments"),n=r[1],lS.test(r=r[0])||S_(t,"ill-formed tag handle (first argument) of the TAG directive"),ZC.call(t.tagMap,r)&&S_(t,'there is a previously declared suffix for "'+r+'" tag handle'),cS.test(n)||S_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{S_(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n},"handleTagDirective")},Ae(L_,"captureSegment"),Ae(N_,"mergeMappings"),Ae(I_,"storeMappingPair"),Ae(M_,"readLineBreak"),Ae(R_,"skipSeparationSpace"),Ae(D_,"testDocumentSeparator"),Ae(O_,"writeFoldedLines"),Ae(P_,"readPlainScalar"),Ae(B_,"readSingleQuotedScalar"),Ae(F_,"readDoubleQuotedScalar"),Ae($_,"readFlowCollection"),Ae(z_,"readBlockScalar"),Ae(G_,"readBlockSequence"),Ae(U_,"readBlockMapping"),Ae(q_,"readTagProperty"),Ae(Y_,"readAnchorProperty"),Ae(j_,"readAlias"),Ae(H_,"composeNode"),Ae(W_,"readDocument"),Ae(V_,"loadDocuments"),Ae(X_,"loadAll$1"),Ae(K_,"load$1"),gS={loadAll:X_,load:K_},fS=Object.prototype.toString,mS=Object.prototype.hasOwnProperty,yS=65279,vS=10,xS={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"},bS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],wS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,Ae(Z_,"compileStyleMap"),Ae(Q_,"encodeHex"),kS=2,Ae(J_,"State"),Ae(tC,"indentString"),Ae(eC,"generateNextLine"),Ae(rC,"testImplicitResolving"),Ae(nC,"isWhitespace"),Ae(iC,"isPrintable"),Ae(aC,"isNsCharOrWhitespace"),Ae(oC,"isPlainSafe"),Ae(sC,"isPlainSafeFirst"),Ae(lC,"isPlainSafeLast"),Ae(cC,"codePointAt"),Ae(hC,"needIndentIndicator"),TS=1,ES=2,_S=3,CS=4,SS=5,Ae(uC,"chooseScalarStyle"),Ae(dC,"writeScalar"),Ae(pC,"blockHeader"),Ae(gC,"dropEndingNewline"),Ae(fC,"foldString"),Ae(mC,"foldLine"),Ae(yC,"escapeString"),Ae(vC,"writeFlowSequence"),Ae(xC,"writeBlockSequence"),Ae(bC,"writeFlowMapping"),Ae(wC,"writeBlockMapping"),Ae(kC,"detectType"),Ae(TC,"writeNode"),Ae(EC,"getDuplicateReferences"),Ae(_C,"inspectNode"),Ae(CC,"dump$1"),Ae(SC,"renamed"),AS=PC,LS=gS.load,SC("safeLoad","load"),SC("safeLoadAll","loadAll"),SC("safeDump","dump")});function IS(t){let e=[];for(var r of t)(r=PS.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}var 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,uA,dA,pA,gA,fA,mA,yA,vA,xA,bA,wA,kA,TA,EA,_A,CA,SA,AA,LA,NA,IA,MA,RA,DA,OA,PA,BA,FA=t(()=>{Z3(),X8(),fh(),Jl(),e(),NS(),gh(),MS=0,RS=D(),DS=new Map,OS=[],PS=new Map,BS=[],FS=new Map,$S=new Map,GS=!(zS=0),YS=[],jS=Ae(t=>L.sanitizeText(t,RS),"sanitizeText"),HS=Ae(function(t){for(var e of DS.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),WS=Ae(function(r,n,i,a,o,s,l={},c){if(r&&0!==r.trim().length){let t,e=DS.get(r);if(void 0===e&&(e={id:r,labelType:"text",domId:"flowchart-"+r+"-"+MS,styles:[],classes:[]},DS.set(r,e)),MS++,void 0!==n?(RS=D(),t=jS(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),void 0!==c){if(i=c.includes(` -`)?c+` -`:`{ -`+c+` -}`,(n=LS(i,{schema:AS})).shape&&(n.shape!==n.shape.toLowerCase()||n.shape.includes("_")))throw new Error(`No such shape: ${n.shape}. Shape names should be lowercase.`);n?.shape&&(e.type=n?.shape),n?.label&&(e.text=n?.label),n?.icon&&(e.icon=n?.icon,!n.label?.trim())&&e.text===r&&(e.text=""),n?.form&&(e.form=n?.form),n?.pos&&(e.pos=n?.pos),n?.img&&(e.img=n?.img,!n.label?.trim())&&e.text===r&&(e.text=""),n?.constraint&&(e.constraint=n.constraint),n.w&&(e.assetWidth=Number(n.w)),n.h&&(e.assetHeight=Number(n.h))}}},"addVertex"),VS=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=jS(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=OS.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${OS.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?OS.defaultStyle=e:(OS[t].style=e,0<(OS[t]?.style?.length??0)&&!OS[t]?.style?.some(t=>t?.startsWith("fill"))&&OS[t]?.style?.push("fill:none"))})},"updateLink"),QS=Ae(function(t,e){t.split(",").forEach(function(t){let r=PS.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},PS.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"),JS=Ae(function(t){US=t,/.*/.exec(US)&&(US="LR"),"TD"===(US=/.*v/.exec(US)?"TB":US)&&(US="TB")},"setDirection"),tA=Ae(function(t,e){for(var r of t.split(",")){var n=DS.get(r);n&&n.classes.push(e),(n=FS.get(r))&&n.classes.push(e)}},"setClass"),eA=Ae(function(t,e){if(void 0!==e){e=jS(e);for(var r of t.split(","))$S.set("gen-1"===qS?HS(r):r,e)}},"setTooltip"),rA=Ae(function(t,e,n){let i=HS(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),YS.push(uA),dA=Ae(function(t="gen-1"){DS=new Map,PS=new Map,OS=[],YS=[uA],BS=[],FS=new Map,zS=0,$S=new Map,GS=!0,qS=t,RS=D(),sc()},"clear"),pA=Ae(t=>{qS=t||"gen-2"},"setGen"),gA=Ae(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),fA=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"===qS)for(let t=0;t!!GS&&!(GS=!1),"firstGraph"),TA=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"),EA=Ae((e,r)=>{let n=r.length,i=0;for(let t=0;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=EA(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}},"destructEndLink"),CA=Ae((t,e)=>{if(t=_A(t),e){if((e=TA(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"),SA=Ae((t,e)=>{for(var r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),AA=Ae((r,n)=>{let i=[];return r.nodes.forEach((t,e)=>{SA(n,t)||i.push(r.nodes[e])}),{nodes:i}},"makeUniq"),LA={firstGraph:LA},NA=Ae(t=>t.img?"imageSquare":t.icon?"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon":"square"===t.type?"squareRect":"round"===t.type?"roundedRect":t.type??"squareRect","getTypeFromVertex"),IA=Ae((t,e)=>t.find(t=>t.id===e),"findNode"),MA=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"),RA=Ae((t,e,r,n,i,a)=>{var r=r.get(t.id),n=n.get(t.id)??!1,o=IA(e,t.id);o?(o.cssStyles=t.styles,o.cssCompiledStyles=IS(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:IS(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:NA(t),dir:t.dir,domId:t.domId,isGroup:n,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:iA(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint})},"addNodeFromVertex"),Ae(IS,"getCompiledStyles"),DA=Ae(()=>{let a=D(),e=[],o=[],r=kA(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var s,l=r[t];0{RA(t,e,n,i,a,a.look||"classic")});let h=cA();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=MA(t.type),i=[...h.defaultStyle??[]],e=(t.style&&i.push(...t.style),{id:V8(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"),OA={defaultConfig:Ae(()=>yc.flowchart,"defaultConfig"),setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,getData:DA,setAccDescription:hc,addVertex:WS,lookUpDomId:HS,addLink:XS,updateLinkInterpolate:KS,updateLink:ZS,addClass:QS,setDirection:JS,setClass:tA,setTooltip:eA,getTooltip:iA,setClickEvent:aA,setLink:nA,bindFunctions:oA,getDirection:sA,getVertices:lA,getEdges:cA,getClasses:hA,clear:dA,setGen:pA,defaultStyle:gA,addSubGraph:fA,getDepthFirstPos:bA,indexNodes:wA,getSubGraphs:kA,destructLink:CA,lex:LA,exists:SA,makeUniq:AA,setDiagramTitle:dc,getDiagramTitle:pc}}),$A=t(()=>{Z3(),PA=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")}),zA=t(()=>{BA=Ae(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")});function GA(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 UA(t,e){return t[0]===e[0]&&t[1]===e[1]}function qA(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)GA(o,a,i);if(r=((e,i)=>{var t,r=[];for(t of p){var n=[...t];UA(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2t.ymine.ymin?1:t.xe.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;tn);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);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)GA(s,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),GA(e,t,n)}}return r}function YA(t,e){let r,n=e.hachureAngle+90,i=e.hachureGap,a=(i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=i),qA(t,i,n,a||1)}function jA(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 HA(t,e){return t.type===e}function WA(t){let n=[],i=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:P9,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:B9,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:F9,text:""},e})(t),a="BOD",o=0,s=i[o];for(;!HA(s,F9);){let e=0,r=[];if("BOD"===a){if("M"!==s.text&&"m"!==s.text)return WA("M0,0"+t);o++,e=$9[s.text],a=s.text}else HA(s,B9)?e=$9[a]:(o++,e=$9[s.text],a=s.text);if(!(o+ee%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 XA(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||(ZA(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 ZA(t,e,r,n,i,a,o,s,l,c){let h=Math.PI*o/180,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))),tp&&(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=ZA(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;t2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=y9(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=y9(a,t,e,r,n,c,h,1.5,l),i.push(...a)),o&&(s?i.push(...d9(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...d9(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 a9(t,e){let r=XA(VA(WA(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(...d9(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(...v9(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...d9(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function o9(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2{let e=r.fillStyle||"hachure";if(!D9[e])switch(e){case"zigzag":D9[e]||(D9[e]=new L9(t));break;case"cross-hatch":D9[e]||(D9[e]=new N9(t));break;case"dots":D9[e]||(D9[e]=new I9(t));break;case"dashed":D9[e]||(D9[e]=new M9(t));break;case"zigzag-line":D9[e]||(D9[e]=new R9(t));break;default:e="hachure",D9[e]||(D9[e]=new A9(t))}return D9[e]})(z9).fillPolygons(t,r)}function l9(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function c9(t){return t.randomizer||(t.randomizer=new O9(t.seed||0)),t.randomizer.next()}function h9(t,e,r,n=1){return r.roughness*n*(c9(r)*(e-t)+t)}function u9(t,e,r=1){return h9(-t,t,e,r)}function d9(t,e,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,o=p9(t,e,r,n,i,!0,!1);return a?o:(a=p9(t,e,r,n,i,!0,!0),o.concat(a))}function p9(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:500s?l/10:h)/2,d=.2+.2*c9(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=u9(p,i,c),g=u9(g,i,c);var f=[],m=Ae(()=>u9(u,i,c),"M"),y=Ae(()=>u9(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:u9(h,i,c)),e+(v?0:u9(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 g9(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+u9(r,n),e[0][1]+u9(r,n)]),i.push([e[0][0]+u9(r,n),e[0][1]+u9(r,n)]);for(let t=1;t{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,il&&(l=h,c=t)}return Math.sqrt(l)>t?(C9(e,r,c+1,t,a),C9(e,c,n,t,a)):(a.length||a.push(o),a.push(s)),a}function S9(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t{Ae(GA,"t"),Ae(UA,"e"),Ae(qA,"s"),Ae(YA,"n"),A9=class{static{Ae(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=YA(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(jA,"a"),L9=class extends A9{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=YA(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)jA([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)}}},N9=class extends A9{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}},I9=class{static{Ae(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=YA(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=jA(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{let e=jA(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{let e=jA(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{var i=d,a=p,o=Math.abs(g/2),s=Math.abs(t/2);o+=u9(.01*o,n),s+=u9(.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]),s9([u],n)})(t,e,r,i))),i.stroke!==G9&&a.push(o),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=e9(t,r);if(r.fill&&r.fill!==G9)if("solid"===r.fillStyle){var i=e9(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(...S9(b9([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):o.push(...S9(b9(a),10,(1+r.roughness)/2));o.length&&e.push(s9([o],r))}return r.stroke!==G9&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=JA(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(o9([t],e)):r.push(s9([t],e))),e.stroke!==G9&&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!==G9,i=r.stroke!==G9,o=((t,e)=>{let r=XA(VA(WA(t))),n=[],i=[],a=[0,0],o=[],s=Ae(()=>{4<=o.length&&i.push(...S9(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=_9(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=a9(t,r),e&&("solid"===r.fillStyle?1===o.length?(e=a9(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(o9(o,r)):n.push(s9(o,r))),i)&&(a?o.forEach(t=>{n.push(JA(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:G9};break;case"fillPath":t={d:this.opsToPath(e),stroke:G9,strokeWidth:0,fill:n.fill||G9};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||G9,strokeWidth:r,fill:G9}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},q9=class{static{Ae(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new U9(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}},Y9="http://www.w3.org/2000/svg",j9=class{static{Ae(this,"ot")}constructor(t,e){this.svg=t,this.gen=new U9(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(Y9,"g"),o=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(Y9,"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(Y9,"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(Y9,"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)}},H9={canvas:Ae((t,e)=>new q9(t,e),"canvas"),svg:Ae((t,e)=>new j9(t,e),"svg"),generator:Ae(t=>new U9(t),"generator"),newSeed:Ae(()=>U9.newSeed(),"newSeed")}});function V9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function X9(t){oL=t}function K9(t,e){if(e){if(sL.test(t))return t.replace(lL,dL)}else if(cL.test(t))return t.replace(hL,dL);return t}function Z9(t){return t.replace(pL,(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 Q9(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(gL,"$1"),n=n.replace(t,r),i},"replace"),getRegex:Ae(()=>new RegExp(n,e),"getRegex")});return i}function J9(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function tL(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(),0e)n.splice(e);else for(;n.lengthk_});var k_,T_=t(()=>{jr(),mh(),x_(),b_(),k_={parser:re,db:ph,renderer:m_,styles:v_,init:Ae(({c4:t,wrap:e})=>{m_.setConf(t),ph.setWrap(e)},"init")}});function __(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function E_(t){P_=t}function C_(t,e){if(e){if(B_.test(t))return t.replace(F_,G_)}else if($_.test(t))return t.replace(z_,G_);return t}function S_(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 A_(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 L_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function N_(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(),0e)n.splice(e);else for(;n.length{var e=t.match(/^\s+/);return null!==e&&([e]=e,e.length>=r.length)?t.slice(r.length):t}).join(` -`)}function aL(t,e){return YL.parse(t,e)}var oL,sL,lL,cL,hL,uL,dL,pL,gL,fL,mL,yL,vL,xL,bL,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=t(()=>{Ae(V9,"_getDefaults"),oL=V9(),Ae(X9,"changeDefaults"),sL=/[&<>"']/,lL=new RegExp(sL.source,"g"),cL=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,hL=new RegExp(cL.source,"g"),uL={"&":"&","<":"<",">":">",'"':""","'":"'"},dL=Ae(t=>uL[t],"getEscapeReplacement"),Ae(K9,"escape$1"),pL=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,Ae(Z9,"unescape"),gL=/(^|[^\[])\^/g,Ae(Q9,"edit"),Ae(J9,"cleanUrl"),fL={exec:Ae(()=>null,"exec")},Ae(tL,"splitCells"),Ae(eL,"rtrim"),Ae(rL,"findClosingBracket"),Ae(nL,"outputLink"),Ae(iL,"indentCodeCompensation"),mL=class{static{Ae(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||oL}space(t){if((t=this.rules.block.newline.exec(t))&&0{Ae(__,"_getDefaults"),P_=__(),Ae(E_,"changeDefaults"),B_=/[&<>"']/,F_=new RegExp(B_.source,"g"),$_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,z_=new RegExp($_.source,"g"),U_={"&":"&","<":"<",">":">",'"':""","'":"'"},G_=Ae(t=>U_[t],"getEscapeReplacement"),Ae(C_,"escape$1"),q_=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,Ae(S_,"unescape"),j_=/(^|[^\[])\^/g,Ae(A_,"edit"),Ae(L_,"cleanUrl"),Y_={exec:Ae(()=>null,"exec")},Ae(N_,"splitCells"),Ae(I_,"rtrim"),Ae(M_,"findClosingBracket"),Ae(R_,"outputLink"),Ae(D_,"indentCodeCompensation"),H_=class{static{Ae(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||P_}space(t){if((t=this.rules.block.newline.exec(t))&&0/.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(` +`),i="",a="",s=[];for(;0/.test(n[r]))e.push(n[r]),t=!0;else{if(t)break;e.push(n[r])}n=n.slice(r);var o,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+` +`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===n.length)break;if("code"===(l=s[s.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+` +`),h=this.blockquote(h);s[s.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" ".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+=` +`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(/[^ ]/))?1:s,r=n.slice(s),s+=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,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),m=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),y=new RegExp(`^ {0,${Math.min(3,s-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(/[^ ]/)>=s||!i.trim())r+=` +`+i.slice(s);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"space"===t.type)).length&&r.some(t=>/\n.*\n/.test(t.raw)),c.loose=r)}if(c.loose)for(let t=0;t$/,"$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=tL(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({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:K9(t[1])}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&/^/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))return;var a=eL(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=rL(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(),nL(r,{href:(t=/^$/.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()])?nL(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=K9(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=K9(r[1])):t=K9(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=K9(r[0]),e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=K9(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]:K9(t[0]),{type:"text",raw:t[0],text:e}}},kL=/^(?: *(?:\n|$))+/,DL=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,xL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wL=/(?:[*+-]|\d{1,9}[.)])/,ML=Q9(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,wL).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(),EL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TL=/^[^\n]+/,NL=/(?!\s*\])(?:\\.|[^\[\]\\])+/,vL=Q9(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",NL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wL=Q9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,wL).getRegex(),qL="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",CL=/|$))/,OL=Q9("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",CL).replace("tag",qL).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),RL=Q9(EL).replace("hr",_L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",qL).getRegex(),yL={blockquote:Q9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",RL).getRegex(),code:DL,def:vL,fences:xL,heading:bL,hr:_L,html:OL,lheading:ML,list:wL,newline:kL,paragraph:RL,table:fL,text:TL},DL=Q9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_L).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",qL).getRegex(),vL={...yL,table:DL,paragraph:Q9(EL).replace("hr",_L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",DL).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",qL).getRegex()},xL={...yL,html:Q9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",CL).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fL,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Q9(EL).replace("hr",_L).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",ML).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},bL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,wL=/^( {2,}|\\)\n(?!\s*$)/,kL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,qL=Q9(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,RL).getRegex(),EL=Q9("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,RL).getRegex(),_L=Q9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,RL).getRegex(),ML=Q9(/\\([punct])/,"gu").replace(/punct/g,RL).getRegex(),RL=Q9(/^<(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(),CL=Q9(CL).replace("(?:--\x3e|$)","--\x3e").getRegex(),CL=Q9("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",CL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),SL=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,AL=Q9(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",SL).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),LL=Q9(/^!?\[(label)\]\[(ref)\]/).replace("label",SL).replace("ref",NL).getRegex(),NL=Q9(/^!?\[(ref)\](?:\[\])?/).replace("ref",NL).getRegex(),IL=Q9("reflink|nolink(?!\\()","g").replace("reflink",LL).replace("nolink",NL).getRegex(),RL={...ML={_backpedal:fL,anyPunctuation:ML,autolink:RL,blockSkip:DL,br:wL,code:OL,del:fL,emStrongLDelim:qL,emStrongRDelimAst:EL,emStrongRDelimUnd:_L,escape:bL,link:AL,nolink:NL,punctuation:TL,reflink:LL,reflinkSearch:IL,tag:CL,text:kL,url:fL},link:Q9(/^!?\[(label)\]\((.*?)\)/).replace("label",SL).getRegex(),reflink:Q9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",SL).getRegex()},DL={...ML,escape:Q9(bL).replace("])","~|])").getRegex(),url:Q9(/^((?: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]*?(?:(?=[\\"space"===t.type)).length&&r.some(t=>/\n.*\n/.test(t.raw)),c.loose=r)}if(c.loose)for(let t=0;t$/,"$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=N_(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({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:C_(t[1])}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&/^/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))return;var a=I_(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=M_(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(),R_(r,{href:(t=/^$/.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()])?R_(r,t,r[0],this.lexer):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(/[\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,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])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=s.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(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=C_(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=C_(r[1])):t=C_(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=C_(r[0]),e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=C_(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]:C_(t[0]),{type:"text",raw:t[0],text:e}}},Q_=/^(?: *(?:\n|$))+/,hE=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,X_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,eE=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,K_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Z_=/(?:[*+-]|\d{1,9}[.)])/,lE=A_(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Z_).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(),tE=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,J_=/^[^\n]+/,sE=/(?!\s*\])(?:\\.|[^\[\]\\])+/,V_=A_(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",sE).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Z_=A_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Z_).getRegex(),xE="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",rE=/|$))/,uE=A_("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",rE).replace("tag",xE).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cE=A_(tE).replace("hr",eE).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xE).getRegex(),W_={blockquote:A_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cE).getRegex(),code:hE,def:V_,fences:X_,heading:K_,hr:eE,html:uE,lheading:lE,list:Z_,newline:Q_,paragraph:cE,table:Y_,text:J_},hE=A_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",eE).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",xE).getRegex(),V_={...W_,table:hE,paragraph:A_(tE).replace("hr",eE).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xE).getRegex()},X_={...W_,html:A_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rE).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Y_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A_(tE).replace("hr",eE).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",lE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},K_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uE=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Z_=/^( {2,}|\\)\n(?!\s*$)/,Q_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,xE=A_(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,cE).getRegex(),tE=A_("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,cE).getRegex(),eE=A_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,cE).getRegex(),lE=A_(/\\([punct])/,"gu").replace(/punct/g,cE).getRegex(),cE=A_(/^<(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(),rE=A_(rE).replace("(?:--\x3e|$)","--\x3e").getRegex(),rE=A_("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",rE).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nE=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,iE=A_(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",nE).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),aE=A_(/^!?\[(label)\]\[(ref)\]/).replace("label",nE).replace("ref",sE).getRegex(),sE=A_(/^!?\[(ref)\](?:\[\])?/).replace("ref",sE).getRegex(),oE=A_("reflink|nolink(?!\\()","g").replace("reflink",aE).replace("nolink",sE).getRegex(),cE={...lE={_backpedal:Y_,anyPunctuation:lE,autolink:cE,blockSkip:hE,br:Z_,code:uE,del:Y_,emStrongLDelim:xE,emStrongRDelimAst:tE,emStrongRDelimUnd:eE,escape:K_,link:iE,nolink:sE,punctuation:J_,reflink:aE,reflinkSearch:oE,tag:rE,text:Q_,url:Y_},link:A_(/^!?\[(label)\]\((.*?)\)/).replace("label",nE).getRegex(),reflink:A_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nE).getRegex()},hE={...lE,escape:A_(K_).replace("])","~|])").getRegex(),url:A_(/^((?: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]*?(?:(?=[\\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!!(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}},$L=class{static{Ae(this,"_Renderer")}options;parser;constructor(t){this.options=t||oL}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(/^\S*/)?.[0],t=t.replace(/\n$/,"")+` -`,e?'
'+(r?t:K9(t,!0))+`
-`:"
"+(r?t:K9(t,!0))+`
+`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(i){var s="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}}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,s,o,l;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0!!(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)),o=!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}},fE=class{static{Ae(this,"_Renderer")}options;parser;constructor(t){this.options=t||P_}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(/^\S*/)?.[0],t=t.replace(/\n$/,"")+` +`,e?'
'+(r?t:C_(t,!0))+`
+`:"
"+(r?t:C_(t,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} @@ -420,39 +381,78 @@ ${this.parser.parse(t)} `}tablerow({text:t}){return` ${t} `}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` -`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=J9(t);if(null===n)return r;let i='
"}image({href:t,title:e,text:r}){var n=J9(t);if(null===n)return r;let i=`${r}{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 $L(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.#e(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 mL(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 UL;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];UL.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}#e(a,c,e){switch(c){case"heading":return function(t){return t.type&&t.type===c?a.call(this,e.parser.parseInline(t.tokens),t.depth,Z9(e.parser.parseInline(t.tokens,e.parser.textRenderer))):a.apply(this,arguments)};case"code":return function(t){return t.type&&t.type===c?a.call(this,t.text,t.lang,!!t.escaped):a.apply(this,arguments)};case"table":return function(e){if(!e.type||e.type!==c)return a.apply(this,arguments);let t="",r="";for(let t=0;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"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="

An error occurred:

"+K9(t.message+"",!0)+"
",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},YL=new qL,Ae(aL,"marked"),aL.options=aL.setOptions=function(t){return YL.setOptions(t),X9(aL.defaults=YL.defaults),aL},aL.getDefaults=V9,aL.defaults=oL,aL.use=function(...t){return YL.use(...t),X9(aL.defaults=YL.defaults),aL},aL.walkTokens=function(t,e){return YL.walkTokens(t,e)},aL.parseInline=YL.parseInline,aL.Parser=GL,aL.parser=GL.parse,aL.Renderer=$L,aL.TextRenderer=zL,aL.Lexer=FL,aL.lexer=FL.lex,aL.Tokenizer=mL,aL.Hooks=UL,aL.parse=aL,FL.lex});function HL(t,{markdownAutoWrap:e}){return t=jt(t.replace(//g,` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=L_(t);if(null===n)return r;let i='
"}image({href:t,title:e,text:r}){var n=L_(t);if(null===n)return r;let i=`${r}{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 fE(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 H_(this.defaults);for(var s in e.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,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 vE;for(var o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if("options"!==o){let t=o,r=e.hooks[t],n=i[t];vE.passThroughHooks.has(o)?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(a,c,e){switch(c){case"heading":return function(t){return t.type&&t.type===c?a.call(this,e.parser.parseInline(t.tokens),t.depth,S_(e.parser.parseInline(t.tokens,e.parser.textRenderer))):a.apply(this,arguments)};case"code":return function(t){return t.type&&t.type===c?a.call(this,t.text,t.lang,!!t.escaped):a.apply(this,arguments)};case"table":return function(e){if(!e.type||e.type!==c)return a.apply(this,arguments);let t="",r="";for(let t=0;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"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="

An error occurred:

"+C_(t.message+"",!0)+"
",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},bE=new xE,Ae(O_,"marked"),O_.options=O_.setOptions=function(t){return bE.setOptions(t),E_(O_.defaults=bE.defaults),O_},O_.getDefaults=__,O_.defaults=P_,O_.use=function(...t){return bE.use(...t),E_(O_.defaults=bE.defaults),O_},O_.walkTokens=function(t,e){return bE.walkTokens(t,e)},O_.parseInline=bE.parseInline,O_.Parser=yE,O_.parser=yE.parse,O_.Renderer=fE,O_.TextRenderer=mE,O_.Lexer=gE,O_.lexer=gE.lex,O_.Tokenizer=H_,O_.Hooks=vE,O_.parse=O_,gE.lex});function kE(t,{markdownAutoWrap:e}){return t=Yt(t.replace(//g,` `).replace(/\n{2,}/g,` -`)),!1===e?t.replace(/ /g," "):t}function WL(t,e={}){let r=HL(t,e),n=aL.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 VL(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

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

`:"space"===t.type?"":"html"===t.type?""+t.text:"Unsupported markdown: "+t.type}return t=aL.lexer(t),Ae(r,"output"),t.map(r).join("")}var XL=t(()=>{jL(),zr(),Ae(HL,"preprocessMarkdown"),Ae(WL,"markdownToLines"),Ae(VL,"markdownToHTML")});function KL(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function ZL(t,e){return QL(t,[],KL(e.content),e.type)}function QL(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}])?QL(t,o,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function JL(t,e){if(t.some(({content:t})=>t.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return tN(t,e)}function tN(t,e,r=[],n=[]){if(0===t.length)return 0{Ae(KL,"splitTextToChars"),Ae(ZL,"splitWordToFitWidth"),Ae(QL,"splitWordToFitWidthRecursion"),Ae(JL,"splitLineToFitWidth"),Ae(tN,"splitLineToFitWidthRecursion")});function rN(t,e){e&&t.attr("style",e)}async function nN(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&&Ul(e.label)&&(o=await Yl(e.label.replace(L.lineBreakRegex,` -`),D()));var s=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(o),rN(l,e.labelStyle),l.attr("class",s+" "+n),rN(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 iN(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 aN(t,e,r){return lN(e=iN(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function oN(t,e,r){return lN(e=iN(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function sN(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=>aN(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:JL(l,h))lN(iN(o,s,1.1),c),s++}return(n?(t=o.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),i):o).node()}function lN(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 cN(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}var hN,uN,dN,pN=t(()=>{fh(),Jl(),Z3(),e(),XL(),X8(),eN(),Ae(rN,"applyStyle"),Ae(nN,"addHtmlSpan"),Ae(iN,"createTspan"),Ae(aN,"computeWidthOfText"),Ae(oN,"computeDimensionOfText"),Ae(sN,"createFormattedText"),Ae(lN,"updateTextContentAndStyles"),Ae(cN,"replaceIconSubstring"),hN=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=VL(e,c),a=cN(W8(n)),n=e.replace(/\\\\/g,"\\"),nN(t,{isNode:o,label:Ul(e)?n:a,labelStyle:r.replace("fill:","color:")},s,i,l)):(n=sN(s,t,WL(e.replace(//g,"
").replace("
","
"),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")}),gN=t(()=>{uN=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"),dN=uN});function fN(t,e){e&&t.attr("style",e)}async function mN(t){let e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;return t.label&&Ul(t.label)&&(n=await Yl(t.label.replace(L.lineBreakRegex,` -`),D())),r.html('"+n+""),fN(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 yN,vN,xN,bN,wN,kN,TN,EN,_N,CN,SN,AN,LN,NN,IN,MN,RN=t(()=>{Z3(),e(),fh(),Jl(),X8(),Ae(fN,"applyStyle"),Ae(mN,"addHtmlLabel"),yN=Ae(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Rl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),R.info("vertexText"+i),mN({isNode:n,label:W8(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),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|/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"),vN=yN}),DN=t(()=>{xN=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")}),ON=t(()=>{fh(),bN=Ae(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),wN=Ae(t=>({stylesMap:t=kN([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),kN=Ae(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),TN=Ae(t=>{let e=wN(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"),EN=Ae((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=wN(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:n,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides")}),PN=t(()=>{fh(),Jl(),e(),zA(),Z3(),W9(),pN(),gN(),RN(),DN(),ON(),_N=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}=TN(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Rl(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await hN(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Rl(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=H9.svg(u),e=EN(i,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:a}),r=t.path(xN(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=BA(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 dN(i,t)},{cluster:u,labelBBox:f}},"rect"),CN=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 dN(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),SN=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 vN(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Rl(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=H9.svg(u),r=a.rx||a.ry?e.path(xN(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-(Rl(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 dN(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),AN=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=H9.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 dN(r,t)},{cluster:e,labelBBox:{}}},"divider"),LN={rect:_N,squareRect:_N,roundedWithTitle:SN,noteGroup:CN,divider:AN},NN=new Map,IN=Ae(async(t,e)=>{var r=e.shape||"rect",r=await LN[r](t,e);return NN.set(e.id,r),r},"insertCluster"),MN=Ae(()=>{NN=new Map},"clear")});function BN(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=$N(t),e=$N(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 FN,$N,zN,GN,UN,qN,YN=t(()=>{FN={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},Ae(BN,"calculateDeltaAndAngle"),$N=Ae(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),zN=Ae(o=>({x:Ae(function(t,e,r){let n=0;var i,a;return 0===e&&Object.hasOwn(FN,o.arrowTypeStart)?({angle:i,deltaX:a}=BN(r[0],r[1]),n=FN[o.arrowTypeStart]*Math.cos(i)*(0<=a?1:-1)):e===r.length-1&&Object.hasOwn(FN,o.arrowTypeEnd)&&({angle:i,deltaX:a}=BN(r[r.length-1],r[r.length-2]),n=FN[o.arrowTypeEnd]*Math.cos(i)*(0<=a?1:-1)),$N(t).x+n},"x"),y:Ae(function(t,e,r){let n=0;var i,a;return 0===e&&Object.hasOwn(FN,o.arrowTypeStart)?({angle:i,deltaY:a}=BN(r[0],r[1]),n=FN[o.arrowTypeStart]*Math.abs(Math.sin(i))*(0<=a?1:-1)):e===r.length-1&&Object.hasOwn(FN,o.arrowTypeEnd)&&({angle:i,deltaY:a}=BN(r[r.length-1],r[r.length-2]),n=FN[o.arrowTypeEnd]*Math.abs(Math.sin(i))*(0<=a?1:-1)),$N(t).y+n},"y")}),"getLineFunctionsWithOffset")}),jN=t(()=>{e(),GN=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&qN(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&qN(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),UN={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},qN=Ae((t,e,r,n,i,a)=>{var o=UN[r];o?t.attr("marker-"+e,`url(${n}#${i}_${a}-${o}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function HN(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function WN(e){var r=[],n=[];for(let t=1;t{fh(),Jl(),e(),pN(),X8(),YN(),zA(),Z3(),W9(),RN(),jN(),VN=new Map,XN=new Map,KN=Ae(()=>{VN.clear(),XN.clear()},"clear"),ZN=Ae(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),QN=Ae(async(t,e)=>{var r,n=Rl(D().flowchart.htmlLabels),i=await hN(t,e.label,{style:ZN(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+")"),VN.set(e.id,a),e.width=s.width,e.height=s.height;let l;return e.startLabelLeft&&(n=await vN(e.startLabelLeft,ZN(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+")"),XN.get(e.id)||XN.set(e.id,{}),XN.get(e.id).startLeft=r,HN(l,e.startLabelLeft)),e.startLabelRight&&(n=await vN(e.startLabelRight,ZN(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+")"),XN.get(e.id)||XN.set(e.id,{}),XN.get(e.id).startRight=o,HN(l,e.startLabelRight)),e.endLabelLeft&&(n=await vN(e.endLabelLeft,ZN(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),XN.get(e.id)||XN.set(e.id,{}),XN.get(e.id).endLeft=a,HN(l,e.endLabelLeft)),e.endLabelRight&&(r=await vN(e.endLabelRight,ZN(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),XN.get(e.id)||XN.set(e.id,{}),XN.get(e.id).endRight=o,HN(l,e.endLabelRight)),i},"insertEdgeLabel"),Ae(HN,"setTerminalWidth"),JN=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,VN.get(n.id),i);var a,o=i.updatedPath||i.originalPath,s=D(),s=BA(s).subGraphTitleTotalMargin;if(n.label){let t=VN.get(n.id),e=n.x,r=n.y;o&&(a=j8.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=XN.get(n.id).startLeft,e=n.x,r=n.y;o&&(i=j8.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=XN.get(n.id).startRight,e=n.x,r=n.y;o&&(a=j8.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=XN.get(n.id).endLeft,e=n.x,r=n.y;o&&(s=j8.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=XN.get(n.id).endRight,e=n.x,r=n.y;o&&(i=j8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",o),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),tI=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),eI=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.xMath.abs(a-n.x)*l)return t=i.y{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),tI(n,t)||o)R.warn("abc88 outside",t,a),a=t,o||i.push(t);else{let e=eI(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(WN,"extractCornerPoints"),nI=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"),iI=Ae(function(n){var t=WN(n).cornerPointPositions,i=[];for(let r=0;r!Number.isNaN(t.y)),a=(i=iI(i))[i.length-1];1t+";"+e,""):"")).attr("d"),v.attr("d",r),t.node().appendChild(v.node())):v=t.append("path").attr("d",x).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",b?b.reduce((t,e)=>t+";"+e,""):""),"");return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(w=(w=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),GN(v,e,w,o,n),i={},c&&(i.updatedPath=l),i.originalPath=e.points,i},"insertEdge")}),xI=t(()=>{e(),oI=Ae((e,t,r,n)=>{t.forEach(t=>{mI[t](e,r,n)})},"insertMarkers"),sI=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"),lI=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"),cI=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"),hI=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"),uI=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"),dI=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"),pI=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"),gI=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"),fI=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"),mI={extension:sI,composition:lI,aggregation:cI,dependency:hI,lollipop:uI,point:dI,circle:pI,cross:gI,barb:fI},yI=oI});function bI(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function wI(e,t,r,n,i,a){var o=[],s=r-e,l=2*Math.PI/(s/a),c=t+(n-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*s,u=c+i*Math.sin(l*(h-e));o.push({x:h,y:u})}return o}function kI(e,r,n,i,t,a){var o=[],s=t*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let t=0;t{pN(),fh(),Z3(),Jl(),X8(),TI=Ae(async(t,e,r)=>{var n=e.useHtmlLabels||Rl(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 hN(a,Cl(W8(o),D()),{useHtmlLabels:n,width:e.width||D().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})).getBBox(),l=e.padding/2;if(Rl(D().flowchart.htmlLabels)){var t=r.children[0],r=O(r),c=t.getElementsByTagName("img");if(c){let n=""===o.replace(/]*>/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"),EI=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),_I=Ae((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),Ae(bI,"createPathFromPoints"),Ae(wI,"generateFullSineWavePoints"),Ae(kI,"generateCirclePoints")});function SI(t,e){return t.intersect(e)}var AI,LI=t(()=>{Ae(SI,"intersectNode"),AI=SI});function NI(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{Ae(NI,"intersectEllipse"),II=NI});function RI(t,e,r){return II(t,e,e,r)}var DI,OI=t(()=>{MI(),Ae(RI,"intersectCircle"),DI=RI});function PI(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{Ae(PI,"intersectLine"),Ae(BI,"sameSign"),FI=PI});function zI(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{$I(),Ae(zI,"intersectPolygon"),GI=zI}),eM=t(()=>{LI(),OI(),MI(),tM(),gN(),UI={node:AI,circle:DI,ellipse:II,polygon:GI,rect:dN}}),rM=t(()=>{CI(),eM(),DN(),ON(),W9(),qI=Ae(async(t,n,e)=>{var{labelStyles:r,nodeStyles:i}=TN(n);n.labelStyle=r;let{shapeSvg:a,bbox:o}=await TI(t,n,_I(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=H9.svg(a),e=EN(n,{}),r=d||p?t.path(xN(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("ry",p).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return EI(n,u),n.intersect=function(t){return UI.rect(n,t)},a},"drawRect")}),nM=t(()=>{rM(),YI=Ae(async(t,e)=>qI(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state")}),iM=t(()=>{rM(),jI=Ae(async(t,e)=>{var r={rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)};return qI(t,e,r)},"roundedRect")}),aM=t(()=>{rM(),HI=Ae(async(t,e)=>{var r={rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return qI(t,e,r)},"squareRect")}),oM=t(()=>{W9(),eM(),ON(),CI(),WI=Ae((t,e,{config:{themeVariables:r}})=>{let n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=H9.svg(i).circle(0,0,14,bN(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),EI(e,a),e.intersect=function(t){return UI.circle(e,7,t)},i},"stateStart")}),sM=t(()=>{W9(),eM(),ON(),CI(),VI=Ae((t,e,{config:{themeVariables:r}})=>{var{labelStyles:n,nodeStyles:i}=TN(e),n=(e.labelStyle=n,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:o}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=H9.svg(t),l=EN(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=s.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??o,u=s.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=t.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),EI(e,d),e.intersect=function(t){return UI.circle(e,7,t)},t},"stateEnd")}),lM=t(()=>{W9(),eM(),ON(),CI(),XI=Ae((t,e,{dir:r,config:{state:n,themeVariables:i}})=>{var a=TN(e).nodeStyles;e.label="";let o=t.insert("g").attr("class",_I(e)).attr("id",e.domId??e.id),s=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=H9.svg(o),i=EN(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(t,r,l,c,i),d=o.insert(()=>u,":first-child");return s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),EI(e,d),h=n?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return UI.rect(e,t)},o},"forkJoin")}),cM=t(()=>{eM(),W9(),ON(),CI(),KI=Ae((t,e)=>{var r=TN(e).nodeStyles;e.label="";let n=t.insert("g").attr("class",_I(e)).attr("id",e.domId??e.id),i=e.cssStyles,a=Math.max(28,e.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=H9.svg(n),l=EN(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),bI(o)),h=s.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return UI.polygon(e,o,t)},n},"choice")}),hM=t(()=>{W9(),eM(),ON(),CI(),ZI=Ae(async(t,e,{config:{themeVariables:r}})=>{var{labelStyles:n,nodeStyles:i}=TN(e),{shapeSvg:n,bbox:t}=(e.labelStyle=n,await TI(t,e,_I(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),o=-a/2,s=-(t=Math.max(t.height+2*(e.padding??0),e?.height??0))/2,l=e.cssStyles,c=(e.useHtmlLabels||(e.centerLabel=!0),H9.svg(n)),r=EN(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(o,s,a,t,r),u=n.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),EI(e,u),e.intersect=function(t){return UI.rect(e,t)},n},"note")}),uM=t(()=>{CI(),eM(),ON(),W9(),DN(),QI=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(i)),o=n.height+i.padding,s=n.width+o/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let t=H9.svg(a),e=EN(i,{}),r=xN(-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 EI(i,l),i.intersect=function(t){return UI.rect(i,t)},a},"stadium")}),dM=t(()=>{Z3(),Jl(),CI(),RN(),eM(),ON(),W9(),fh(),DN(),e(),JI=Ae(async(i,a)=>{var{labelStyles:t,nodeStyles:e}=TN(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 vN(c,a.labelStyle,!0,!0)),u={width:0,height:0};Rl(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 vN(t.join?t.join("
"):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(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 EI(a,v),a.intersect=function(t){return UI.rect(a,t)},o},"rectWithTitle")});function pM(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 gM,fM,mM,yM,vM,xM,bM,wM,kM,TM,EM,_M,CM=t(()=>{Ae(pM,"insertPolygonShape")}),SM=t(()=>{CI(),eM(),ON(),W9(),CM(),gM=Ae(async(a,o)=>{var{labelStyles:s,nodeStyles:t}=TN(o);o.labelStyle=s;let{shapeSvg:l,bbox:e}=await TI(a,o,_I(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=H9.svg(l),e=EN(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),EI(o,s)}else a=pM(l,c,h,n),t&&a.attr("style",t),EI(o,a);return o.intersect=function(t){return UI.polygon(o,n,t)},l},"subroutine")}),AM=t(()=>{CI(),eM(),ON(),W9(),fM=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"),mM=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"),yM=Ae((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),vM=Ae(async(t,a)=>{var{labelStyles:e,nodeStyles:r}=TN(a);a.labelStyle=e;let{shapeSvg:o,bbox:n,label:i}=await TI(t,a,_I(a)),s=Math.max(n.width+a.padding,a.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let t=H9.svg(o),e=mM(0,0,s,h,l,c),r=yM(0,c,s,h,l,c),n=t.path(e,EN(a,{})),i=t.path(r,EN(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=fM(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)})`),EI(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(e){var r=UI.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{e(),CI(),eM(),ON(),W9(),xM=Ae(async(t,n)=>{var{labelStyles:e,nodeStyles:r}=TN(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:o}=await TI(t,n,_I(n)),s=a.width/2+o,l,c=n.cssStyles;if("handDrawn"===n.look){let t=H9.svg(i),e=EN(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 EI(n,l),n.intersect=function(t){return R.info("Circle intersect",n,s,t),UI.circle(n,s,t)},i},"circle")}),NM=t(()=>{e(),CI(),eM(),ON(),W9(),bM=Ae(async(t,e)=>{var r,{labelStyles:n,nodeStyles:i}=TN(e);e.labelStyle=n;let{shapeSvg:a,bbox:o,halfPadding:s}=await TI(t,e,_I(e)),l=o.width/2+s+5,c=o.width/2+s,h,u=e.cssStyles;return"handDrawn"===e.look?(n=H9.svg(a),t=EN(e,{roughness:.2,strokeWidth:2.5}),r=EN(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)),EI(e,h),e.intersect=function(t){return R.info("DoubleCircle intersect",e,l,t),UI.circle(e,l,t)},a},"doublecircle")}),IM=t(()=>{CI(),eM(),ON(),W9(),wM=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),c=-s/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=e.cssStyles,g=H9.svg(i),f=EN(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),bI(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),EI(e,v),e.intersect=function(t){return UI.polygon(e,d,t)},i},"rect_left_inv_arrow")}),MM=t(()=>{e(),CI(),eM(),ON(),W9(),CM(),kM=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"),TM=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(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=H9.svg(a),e=EN(i,{}),r=kM(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=pM(a,l,l,c);return r&&h.attr("style",r),EI(i,h),i.intersect=function(t){return R.debug(`APA12 Intersect called SPLIT +`)),!1===e?t.replace(/ /g," "):t}function TE(t,e={}){let r=kE(t,e),n=O_.lexer(r),i=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(` +`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return Ae(s,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}),i}function _E(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

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

`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:"Unsupported markdown: "+t.type}return t=O_.lexer(t),Ae(r,"output"),t.map(r).join("")}var EE=t(()=>{wE(),zr(),Ae(kE,"preprocessMarkdown"),Ae(TE,"markdownToLines"),Ae(_E,"markdownToHTML")});function CE(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function SE(t,e){return AE(t,[],CE(e.content),e.type)}function AE(t,e,r,n){var i,a,s;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(s=[...e,i]).join(""),type:n}])?AE(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function LE(t,e){if(t.some(({content:t})=>t.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return NE(t,e)}function NE(t,e,r=[],n=[]){if(0===t.length)return 0{Ae(CE,"splitTextToChars"),Ae(SE,"splitWordToFitWidth"),Ae(AE,"splitWordToFitWidthRecursion"),Ae(LE,"splitLineToFitWidth"),Ae(NE,"splitLineToFitWidthRecursion")});function ME(t,e){e&&t.attr("style",e)}async function RE(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"),s=e.label;e.label&&Gl(e.label)&&(s=await jl(e.label.replace(L.lineBreakRegex,` +`),D()));var o=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),ME(l,e.labelStyle),l.attr("class",o+" "+n),ME(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 DE(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 OE(t,e,r){return FE(e=DE(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function PE(t,e,r){return FE(e=DE(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function BE(e,t,r,n=!1){let i=t.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=Ae(t=>OE(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:LE(l,h))FE(DE(s,o,1.1),c),o++}return(n?(t=s.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),i):s).node()}function FE(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 $E(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}var zE,UE=t(()=>{fh(),Jl(),Z3(),e(),EE(),K8(),IE(),Ae(ME,"applyStyle"),Ae(RE,"addHtmlSpan"),Ae(DE,"createTspan"),Ae(OE,"computeWidthOfText"),Ae(PE,"computeDimensionOfText"),Ae(BE,"createFormattedText"),Ae(FE,"updateTextContentAndStyles"),Ae($E,"replaceIconSubstring"),zE=Ae(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(R.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a?(n=_E(e,c),a=$E(V8(n)),n=e.replace(/\\\\/g,"\\"),RE(t,{isNode:s,label:Gl(e)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l)):(n=BE(o,t,TE(e.replace(//g,"
").replace("
","
"),c),!!e&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),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:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).select("text").attr("style",o)),n)),"createText")});function GE(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function qE(e,t,r,n,i,a){var s=[],o=r-e,l=2*Math.PI/(o/a),c=t+(n-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*o,u=c+i*Math.sin(l*(h-e));s.push({x:h,y:u})}return s}function jE(e,r,n,i,t,a){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t{UE(),fh(),Z3(),Ln(),Jl(),K8(),YE=Ae(async(t,e,r)=>{let n,i=e.useHtmlLabels||Rl(D()?.htmlLabels),a=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),s=a.insert("g").attr("class","label").attr("style",b8(e.labelStyle)),o,l=(o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],await zE(s,Cl(V8(o),D()),{useHtmlLabels:i,width:e.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})),c=l.getBBox(),h=(e?.padding??0)/2;if(i){var r=l.children[0],t=O(l),u=r.getElementsByTagName("img");if(u){let n=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].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=vr.fontSize]=Y8(t),r.style.minWidth=t=5*t+"px",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)})))}c=r.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),HE=Ae(async(t,e,r)=>{let n=r.useHtmlLabels||Rl(D()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await zE(i,Cl(V8(e),D()),{useHtmlLabels:n,width:r.width||D()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Rl(D()?.flowchart?.htmlLabels)&&(e=a.children[0],l=O(a),s=e.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),WE=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),VE=Ae((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),Ae(GE,"createPathFromPoints"),Ae(qE,"generateFullSineWavePoints"),Ae(jE,"generateCirclePoints")});function XE(t,e){return t.intersect(e)}var KE,ZE=t(()=>{Ae(XE,"intersectNode"),KE=XE});function QE(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{Ae(QE,"intersectEllipse"),JE=QE});function eC(t,e,r){return JE(t,e,e,r)}var rC,nC=t(()=>{tC(),Ae(eC,"intersectCircle"),rC=eC});function iC(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{Ae(iC,"intersectLine"),Ae(aC,"sameSign"),sC=iC});function lC(e,r,n){let t=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=i-e.height/2-o;for(let t=0;t{oC(),Ae(lC,"intersectPolygon"),cC=lC}),vC=t(()=>{hC=Ae((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),uC=hC}),xC=t(()=>{ZE(),nC(),tC(),yC(),vC(),S={node:KE,circle:rC,ellipse:JE,polygon:cC,rect:uC}}),bC=t(()=>{fh(),dC=Ae(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),pC=Ae(t=>({stylesMap:t=gC([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),gC=Ae(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),fC=Ae(t=>{let e=pC(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"),mC=Ae((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=pC(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:n,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides")});function wC(t,e,r){if(t&&t.length){var n,[i,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(n of t){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function kC(t,e){return t[0]===e[0]&&t[1]===e[1]}function TC(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 s of p)wC(s,a,i);if(r=((e,i)=>{var t,r=[];for(t of p){var n=[...t];kC(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2t.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],n=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;tn);t++)e=t;o.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);t+=2){var u=r[t].edge,d=r[d].edge;s.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 s})(n,e),i){for(var o of p)wC(o,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),wC(e,t,n)}}return r}function _C(t,e){let r,n=e.hachureAngle+90,i=e.hachureGap,a=(i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=i),TC(t,i,n,a||1)}function EC(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 CC(t,e){return t.type===e}function SC(t){let n=[],i=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:mS,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:yS,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:vS,text:""},e})(t),a="BOD",s=0,o=i[s];for(;!CC(o,vS);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return SC("M0,0"+t);s++,e=xS[o.text],a=o.text}else CC(o,yS)?e=xS[a]:(s++,e=xS[o.text],a=o.text);if(!(s+ee%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:[...o]}),r=o[2],n=o[3];break;case"q":l=o.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:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.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:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[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 LC(t){let i=[],a="",s=0,o=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]}),[s,o]=h,[e,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.push({key:"L",data:[s,o]});break;case"S":{let t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),i.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=h,r=0,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/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,s=t,o=e;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;i.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(IC(s,o,b,w,f,m,y,v,x).forEach(function(t){i.push({key:"C",data:t})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=e,o=r}a=n}return i}function NC(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function IC(t,e,r,n,i,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([t,e]=NC(t,e,-h),[r,n]=NC(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,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(t+r)/2,f=o*-a*y/i+(e+n)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),tp&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=IC(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],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;t2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=ZC(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=ZC(a,t,e,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...HC(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...HC(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 $C(t,e){let r=LC(AC(SC(t))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...HC(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;n.push(...QC(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...HC(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function zC(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2{let e=r.fillStyle||"hachure";if(!gS[e])switch(e){case"zigzag":gS[e]||(gS[e]=new cS(t));break;case"cross-hatch":gS[e]||(gS[e]=new hS(t));break;case"dots":gS[e]||(gS[e]=new uS(t));break;case"dashed":gS[e]||(gS[e]=new dS(t));break;case"zigzag-line":gS[e]||(gS[e]=new pS(t));break;default:e="hachure",gS[e]||(gS[e]=new lS(t))}return gS[e]})(bS).fillPolygons(t,r)}function GC(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function qC(t){return t.randomizer||(t.randomizer=new fS(t.seed||0)),t.randomizer.next()}function jC(t,e,r,n=1){return r.roughness*n*(qC(r)*(e-t)+t)}function YC(t,e,r=1){return jC(-t,t,e,r)}function HC(t,e,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=WC(t,e,r,n,i,!0,!1);return a?s:(a=WC(t,e,r,n,i,!0,!0),s.concat(a))}function WC(t,e,r,n,i,a,s){let o=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*qC(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=YC(p,i,c),g=YC(g,i,c);var f=[],m=Ae(()=>YC(u,i,c),"M"),y=Ae(()=>YC(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:YC(h,i,c)),e+(v?0:YC(h,i,c))]}),f.push(s?{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 VC(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+YC(r,n),e[0][1]+YC(r,n)]),i.push([e[0][0]+YC(r,n),e[0][1]+YC(r,n)]);for(let t=1;t{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 s=3*r[0]-2*n[0]-t[0],o=(s*=s,3*r[1]-2*n[1]-t[1]);return o*=o,il&&(l=h,c=t)}return Math.sqrt(l)>t?(sS(e,r,c+1,t,a),sS(e,c,n,t,a)):(a.length||a.push(s),a.push(o)),a}function oS(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t{Ae(wC,"t"),Ae(kC,"e"),Ae(TC,"s"),Ae(_C,"n"),lS=class{static{Ae(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=_C(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(EC,"a"),cS=class extends lS{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=_C(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of t)EC([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,e)}}},hS=class extends lS{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}},uS=class{static{Ae(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=_C(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,s=n/4;for(a of t){var o=EC(a),l=o/n,c=Math.ceil(l)-1,h=o-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{let e=EC(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 s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let t=0;t{let e=EC(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{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(t/2);s+=YC(.01*s,n),o+=YC(.01*o,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+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),UC([u],n)})(t,e,r,i))),i.stroke!==wS&&a.push(s),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=OC(t,r);if(r.fill&&r.fill!==wS)if("solid"===r.fillStyle){var i=OC(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,s=[];if((i=t).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...oS(tS([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...oS(tS(a),10,(1+r.roughness)/2));s.length&&e.push(UC([s],r))}return r.stroke!==wS&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=RC(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(zC([t],e)):r.push(UC([t],e))),e.stroke!==wS&&r.push(n),this._d("polygon",r,e)}path(t,e){let r=this._o(e),n=[];var i,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==wS,i=r.stroke!==wS,s=((t,e)=>{let r=LC(AC(SC(t))),n=[],i=[],a=[0,0],s=[],o=Ae(()=>{4<=s.length&&i.push(...oS(s,1)),s=[]},"i"),l=Ae(()=>{o(),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":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),i.push([a[0],a[1]])}if(l(),!e)return n;var d,p=[];for(d of n){var g=aS(d,e);g.length&&p.push(g)}return p})(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=$C(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=$C(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(zC(s,r)):n.push(UC(s,r))),i)&&(a?s.forEach(t=>{n.push(RC(t,!1,r))}):n.push(o)),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:wS};break;case"fillPath":t={d:this.opsToPath(e),stroke:wS,strokeWidth:0,fill:n.fill||wS};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||wS,strokeWidth:r,fill:wS}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},TS=class{static{Ae(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new kS(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 s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,e,a,s),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,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},_S="http://www.w3.org/2000/svg",ES=class{static{Ae(this,"ot")}constructor(t,e){this.svg=t,this.gen=new kS(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(_S,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(_S,"path")).setAttribute("d",this.opsToPath(r,s)),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(_S,"path")).setAttribute("d",this.opsToPath(r,s)),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(_S,"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,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},CS={canvas:Ae((t,e)=>new TS(t,e),"canvas"),svg:Ae((t,e)=>new ES(t,e),"svg"),generator:Ae(t=>new kS(t),"generator"),newSeed:Ae(()=>kS.newSeed(),"newSeed")}});function AS(t,e){var r=fC(e).labelStyles;e.labelStyle=r;let n=VE(e),i=n,a=(n||(i="anchor"),t.insert("g").attr("class",i).attr("id",e.domId||e.id)),s=e.cssStyles,o=CS.svg(a),l=mC(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",b8(s)),WE(e,h),e.intersect=function(t){return R.info("Circle intersect",e,1,t),S.circle(e,1,t)},a}var LS=t(()=>{e(),i(),xC(),bC(),SS(),K8(),Ae(AS,"anchor")});function NS(t,e,r,n,i,a,s){var o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=Math.sqrt(((r-t)/2/i)**2+((n-e)/2/a)**2);if(1f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),WE(e,m),e.intersect=function(t){return S.polygon(e,u,t)},i}var MS=t(()=>{i(),xC(),bC(),SS(),Ae(NS,"generateArcPoints"),Ae(IS,"bowTieRect")});function RS(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 DS=t(()=>{Ae(RS,"insertPolygonShape")});async function OS(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=n.height+i.padding,o=n.width+i.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=GE(h),n=t.path(r,e);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=RS(a,o,s,h);return r&&u.attr("style",r),WE(i,u),i.intersect=function(t){return S.polygon(i,h,t)},a}var PS=t(()=>{i(),xC(),bC(),SS(),DS(),i(),Ae(OS,"card")});function BS(t,e){var r=fC(e).nodeStyles;e.label="";let n=t.insert("g").attr("class",VE(e)).attr("id",e.domId??e.id),i=e.cssStyles,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=CS.svg(n),l=mC(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),GE(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return S.polygon(e,s,t)},n}var FS=t(()=>{xC(),SS(),bC(),i(),Ae(BS,"choice")});async function $S(t,n){var{labelStyles:e,nodeStyles:r}=fC(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:s}=await YE(t,n,VE(n)),o=a.width/2+s,l,c=n.cssStyles;if("handDrawn"===n.look){let t=CS.svg(i),e=mC(n,{}),r=t.circle(0,0,2*o,e);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",b8(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return WE(n,l),n.intersect=function(t){return R.info("Circle intersect",n,o,t),S.circle(n,o,t)},i}var zS=t(()=>{e(),i(),xC(),bC(),SS(),K8(),Ae($S,"circle")});function US(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r} + M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function GS(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",VE(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),s=e.cssStyles,o=CS.svg(i),l=mC(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=US(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),WE(e,d),e.intersect=function(t){return R.info("crossedCircle intersect",e,{radius:a,point:t}),S.circle(e,a,t)},i}var qS=t(()=>{e(),i(),bC(),SS(),xC(),Ae(US,"createLine"),Ae(GS,"crossedCircle")});function jS(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),WE(e,x),e.intersect=function(t){return S.polygon(e,d,t)},i}var HS=t(()=>{i(),xC(),bC(),SS(),Ae(jS,"generateCirclePoints"),Ae(YS,"curlyBraceLeft")});function WS(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),WE(e,x),e.intersect=function(t){return S.polygon(e,d,t)},i}var XS=t(()=>{i(),xC(),bC(),SS(),Ae(WS,"generateCirclePoints"),Ae(VS,"curlyBraceRight")});function KS(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tw,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),WE(e,k),e.intersect=function(t){return S.polygon(e,p,t)},i}var QS=t(()=>{i(),xC(),bC(),SS(),Ae(KS,"generateCirclePoints"),Ae(ZS,"curlyBraces")});async function JS(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await YE(t,e,VE(e))),i=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,s=e.cssStyles,o=CS.svg(r),l=mC(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=t,u=c-a,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...jE(-u,-h/2,a,50,270,90)],g=GE(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-t/2})`),WE(e,m),e.intersect=function(t){return S.polygon(e,p,t)},r}var tA=t(()=>{i(),xC(),bC(),SS(),Ae(JS,"curvedTrapezoid")});async function eA(t,a){var{labelStyles:e,nodeStyles:r}=fC(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i}=await YE(t,a,VE(a)),o=Math.max(n.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let t=CS.svg(s),e=nA(0,0,o,h,l,c),r=iA(0,c,o,h,l,c),n=t.path(e,mC(a,{})),i=t.path(r,mC(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else e=rA(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",b8(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),WE(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(e){var r=S.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{i(),xC(),bC(),SS(),K8(),rA=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"),nA=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"),iA=Ae((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ae(eA,"cylinder")});async function sA(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await YE(t,e,VE(e))),a=t.width+e.padding,s=.2*(o=t.height+e.padding),a=-a/2,o=-o/2-s/2,l=e.cssStyles,c=CS.svg(r),h=mC(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${o+s+(e.padding??0)/2-(t.y-(t.top??0))})`),WE(e,p),e.intersect=function(t){return S.rect(e,t)},r}var oA=t(()=>{i(),xC(),bC(),SS(),Ae(sA,"dividedRectangle")});async function lA(t,e){var r,{labelStyles:n,nodeStyles:i}=fC(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await YE(t,e,VE(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(n=CS.svg(a),t=mC(e,{roughness:.2,strokeWidth:2.5}),r=mC(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",b8(e.cssClasses)).attr("style",b8(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)),WE(e,h),e.intersect=function(t){return R.info("DoubleCircle intersect",e,l,t),S.circle(e,l,t)},a}var cA=t(()=>{e(),i(),xC(),bC(),SS(),K8(),Ae(lA,"doublecircle")});function hA(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=fC(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",VE(e)).attr("id",e.domId??e.id),s=e.cssStyles,o=CS.svg(a),l=r.nodeBorder,c=mC(e,{fillStyle:"solid"}),h=("handDrawn"!==e.look&&(c.roughness=0),o.circle(0,0,14,c)),u=a.insert(()=>h,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&0{SS(),e(),xC(),bC(),i(),Ae(hA,"filledCircle")});async function dA(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await YE(t,e,VE(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=e.cssStyles,d=CS.svg(i),p=mC(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),GE(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),e.width=o,e.height=l,WE(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return R.info("Triangle intersect",e,h,t),S.polygon(e,h,t)},i}var pA=t(()=>{e(),i(),xC(),bC(),SS(),i(),Ae(dA,"flippedTriangle")});function gA(t,e,{dir:r,config:{state:n,themeVariables:i}}){var a=fC(e).nodeStyles;e.label="";let s=t.insert("g").attr("class",VE(e)).attr("id",e.domId??e.id),o=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=CS.svg(s),i=mC(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(t,r,l,c,i),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),WE(e,d),h=n?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return S.rect(e,t)},s}var fA=t(()=>{SS(),xC(),bC(),i(),Ae(gA,"forkJoin")});async function mA(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await YE(t,e,VE(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,c=e.cssStyles,h=CS.svg(i),u=mC(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...jE(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=GE(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),WE(e,f),e.intersect=function(t){return R.info("Pill intersect",e,{radius:l,point:t}),S.polygon(e,d,t)},i}var yA=t(()=>{e(),i(),xC(),bC(),SS(),Ae(mA,"halfRoundedRectangle")});async function vA(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=n.height+i.padding,o=s/4,l=n.width+2*o+i.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=xA(0,0,l,s,o),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=RS(a,l,s,c);return r&&h.attr("style",r),i.width=l,i.height=s,WE(i,h),i.intersect=function(t){return S.polygon(i,c,t)},a}var xA,bA=t(()=>{i(),xC(),bC(),SS(),DS(),xA=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"),Ae(vA,"hexagon")});async function wA(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),r=(e.label="",e.labelStyle=r,(await YE(t,e,VE(e))).shapeSvg),t=Math.max(30,e?.width??0),i=Math.max(30,e?.height??0),a=e.cssStyles,s=CS.svg(r),o=mC(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:i},{x:t,y:i}],c=GE(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-t/2}, ${-i/2})`),WE(e,u),e.intersect=function(t){return R.info("Pill intersect",e,{points:l}),S.polygon(e,l,t)},r}var kA=t(()=>{e(),i(),xC(),bC(),SS(),Ae(wA,"hourglass")});async function TA(t,i,{config:{themeVariables:e,flowchart:r}}){var n,a=fC(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await YE(t,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=e.nodeBorder,p=pC(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=CS.svg(s),v=mC(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),_=s.insert(()=>k);return i.icon&&((r=s.append("g")).html(`${await Ft(i.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.x},${c?o.height/2+m/2-a/2-n:-o.height/2-m/2-a/2-n})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),WE(i,_),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2+o.height+m},{x:n+u/2,y:e-r/2+o.height+m},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+o.height+m},{x:n-o.width/2,y:e-r/2+o.height+m}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+o.width/2,y:e-r/2+h},{x:n+o.width/2/2,y:e+r/2},{x:n-o.width/2,y:e+r/2},{x:n-o.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],S.polygon(i,n,t)):S.rect(i,t)},s}var _A=t(()=>{SS(),e(),jt(),xC(),bC(),i(),Ae(TA,"icon")});async function EA(t,e,{config:{themeVariables:r,flowchart:n}}){var i=fC(e).labelStyles,i=(e.labelStyle=i,e.assetHeight??48),i=Math.max(i,e.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:t,label:a}=(e.width=Math.max(i,n??0),await YE(t,e,"icon-shape default")),s=e.label?8:0,o="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=pC(e).stylesMap,h=CS.svg(n),u=mC(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));e.icon&&d.html(`${await Ft(e.icon,{height:i,width:i,fallbackPrefix:""})}`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,x=h.circle(0,0,v,u),b=Math.max(v,t.width),w=v+t.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=n.insert(()=>x,":first-child"),_=n.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?t.height/2+s/2-f/2-y:-t.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${o?-w/2:w/2-t.height})`),T.attr("transform",`translate(0,${o?t.height/2+s/2:-t.height/2-s/2})`),WE(e,_),e.intersect=function(t){return R.info("iconSquare intersect",e,t),S.rect(e,t)},n}var CA,SA=t(()=>{SS(),e(),jt(),xC(),bC(),i(),Ae(EA,"iconCircle")}),AA=t(()=>{CA=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")});async function LA(t,i,{config:{themeVariables:e,flowchart:r}}){var n=fC(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await YE(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=pC(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=CS.svg(a),x=mC(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(CA(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,_=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),E=a.insert(()=>w,":first-child").attr("class","icon-shape2"),C=a.insert(()=>_);return i.icon&&((t=a.append("g")).html(`${await Ft(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),E.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),WE(i,C),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],S.polygon(i,n,t)):S.rect(i,t)},a}var NA=t(()=>{SS(),e(),jt(),xC(),bC(),AA(),i(),Ae(LA,"iconRounded")});async function IA(t,i,{config:{themeVariables:e,flowchart:r}}){var n=fC(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await YE(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=pC(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=CS.svg(a),x=mC(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(CA(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,_=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),E=a.insert(()=>w,":first-child"),C=a.insert(()=>_);return i.icon&&((t=a.append("g")).html(`${await Ft(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),E.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),WE(i,C),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],S.polygon(i,n,t)):S.rect(i,t)},a}var MA=t(()=>{SS(),e(),jt(),xC(),AA(),bC(),i(),Ae(IA,"iconSquare")});async function RA(t,i,{config:{flowchart:e}}){(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,fC(i).labelStyles),a=(i.labelStyle=a,e?.wrappingWidth);i.defaultWidth=e?.wrappingWidth;let s=Math.max(i.label?a??0:0,i?.assetWidth??r),o="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:s,l="on"===i.constraint?o/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(o,a??0),await YE(t,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=CS.svg(c),y=mC(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((e=c.append("image")).attr("href",i.img),e.attr("width",o),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-o/2},${d?b/2-l:-b/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),WE(i,T),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2+h.height+f},{x:n+o/2,y:e-r/2+h.height+f},{x:n+o/2,y:e+r/2},{x:n-o/2,y:e+r/2},{x:n-o/2,y:e-r/2+h.height+f},{x:n-h.width/2,y:e-r/2+h.height+f}]:[{x:n-o/2,y:e-r/2},{x:n+o/2,y:e-r/2},{x:n+o/2,y:e-r/2+l},{x:n+h.width/2,y:e-r/2+l},{x:n+h.width/2/2,y:e+r/2},{x:n-h.width/2,y:e+r/2},{x:n-h.width/2,y:e-r/2+l},{x:n-o/2,y:e-r/2+l}],S.polygon(i,n,t)):S.rect(i,t)},c}var DA=t(()=>{SS(),e(),xC(),bC(),i(),Ae(RA,"imageSquare")});async function OA(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=Math.max(n.width+2*(i.padding??0),i?.width??0),o=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=GE(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=RS(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,WE(i,c),i.intersect=function(t){return S.polygon(i,l,t)},a}var PA=t(()=>{i(),xC(),bC(),SS(),DS(),Ae(OA,"inv_trapezoid")});async function BA(t,n,e){var{labelStyles:r,nodeStyles:i}=fC(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await YE(t,n,VE(n)),o=Math.max(s.width+2*e.labelPaddingX,n?.width||0),l=Math.max(s.height+2*e.labelPaddingY,n?.height||0),c=-o/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=CS.svg(a),e=mC(n,{}),r=d||p?t.path(CA(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",b8(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",b8(d)).attr("ry",b8(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return WE(n,u),n.intersect=function(t){return S.rect(n,t)},a}var FA=t(()=>{i(),xC(),AA(),bC(),SS(),K8(),Ae(BA,"drawRect")});async function $A(t,e){var{shapeSvg:t,bbox:r,label:n}=await YE(t,e,"label"),i=t.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),WE(e,i),e.intersect=function(t){return S.rect(e,t)},t}var zA=t(()=>{FA(),i(),xC(),Ae($A,"labelRect")});async function UA(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=GE(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=RS(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,WE(i,c),i.intersect=function(t){return S.polygon(i,l,t)},a}var GA=t(()=>{i(),xC(),bC(),SS(),DS(),Ae(UA,"lean_left")});async function qA(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=GE(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=RS(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,WE(i,c),i.intersect=function(t){return S.polygon(i,l,t)},a}var jA=t(()=>{i(),xC(),bC(),SS(),DS(),Ae(qA,"lean_right")});function YA(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",VE(e)).attr("id",e.domId??e.id),a=e.cssStyles,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=CS.svg(i),h=mC(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),GE(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),WE(e,p),e.intersect=function(t){return R.info("lightningBolt intersect",e,t),S.polygon(e,l,t)},i}var HA=t(()=>{e(),i(),bC(),SS(),xC(),i(),Ae(YA,"lightningBolt")});async function WA(t,s){var{labelStyles:e,nodeStyles:r}=fC(s);s.labelStyle=e;let{shapeSvg:o,bbox:n,label:i}=await YE(t,s,VE(s)),l=Math.max(n.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let t=CS.svg(o),e=XA(0,0,l,u,c,h,d),r=KA(0,h,l,u,c,h),n=mC(s,{}),i=t.path(e,n),a=t.path(r,n);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else e=VA(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",b8(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),WE(s,p),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),s.intersect=function(e){var r=S.rect(s,e),n=r.x-(s.x??0);if(0!=c&&(Math.abs(n)<(s.width??0)/2||Math.abs(n)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let t=h*h*(1-n*n/(c*c));0{i(),xC(),bC(),SS(),K8(),VA=Ae((t,e,r,n,i,a,s)=>[`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,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),XA=Ae((t,e,r,n,i,a,s)=>[`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,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),KA=Ae((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ae(WA,"linedCylinder")});async function QA(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await YE(t,e,VE(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=s+o,c=e.cssStyles,h=CS.svg(r),u=mC(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...qE(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),WE(e,g),e.intersect=function(t){return S.polygon(e,d,t)},r}var JA=t(()=>{i(),xC(),SS(),bC(),Ae(QA,"linedWaveEdgedRect")});async function t9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await YE(t,e,VE(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=CS.svg(i),p=mC(e,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),GE(g)),y=d.path(m,p),v=GE(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),WE(e,b),e.intersect=function(t){return S.polygon(e,g,t)},i}var e9=t(()=>{i(),bC(),SS(),xC(),Ae(t9,"multiRect")});async function r9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await YE(t,e,VE(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=e.cssStyles,g=qE(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=CS.svg(i),x=mC(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),GE(m)),w=v.path(b,x),k=GE(y),T=v.path(k,x),_=i.insert(()=>w,":first-child");return _.insert(()=>T),_.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),WE(e,_),e.intersect=function(t){return S.polygon(e,m,t)},i}var n9=t(()=>{i(),xC(),SS(),bC(),Ae(r9,"multiWaveEdgedRectangle")});async function i9(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=fC(e),{shapeSvg:n,bbox:t}=(e.labelStyle=n,e.useHtmlLabels||!1!==Mr().flowchart?.htmlLabels||(e.centerLabel=!0),await YE(t,e,VE(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=-a/2,o=-(t=Math.max(t.height+2*(e.padding??0),e?.height??0))/2,l=e.cssStyles,c=CS.svg(n),r=mC(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(s,o,a,t,r),u=n.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),WE(e,u),e.intersect=function(t){return S.rect(e,t)},n}var a9=t(()=>{SS(),xC(),bC(),i(),In(),Ae(i9,"note")});async function s9(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=n.width+i.padding,o=n.height+i.padding,l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=o9(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=RS(a,l,l,c);return r&&h.attr("style",r),WE(i,h),i.intersect=function(t){return R.debug(`APA12 Intersect called SPLIT point:`,t,` node: `,i,` -res:`,UI.polygon(i,c,t)),UI.polygon(i,c,t)},a},"question")}),RM=t(()=>{CI(),eM(),ON(),W9(),CM(),EM=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"),_M=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(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=H9.svg(a),e=EN(i,{}),r=EM(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=pM(a,l,o,c);return r&&h.attr("style",r),i.width=l,i.height=o,EI(i,h),i.intersect=function(t){return UI.polygon(i,c,t)},a},"hexagon")});async function DM(t,e){var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await TI(t,e,_I(e))),i=Math.max(t.width+e.padding,e?.width||0),a=-i/2,o=-(t=Math.max(t.height+e.padding,e?.height||0))/2,s=r.insert("rect",":first-child");return s.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",o).attr("width",i).attr("height",t),EI(e,s),e.intersect=function(t){return UI.rect(e,t)},r}var OM=t(()=>{CI(),eM(),ON(),Ae(DM,"text")});async function PM(t,i){var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(i)),o=n.height+i.padding,s=n.width+i.padding+12,l=s,c=-o,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let t=H9.svg(a),e=EN(i,{}),r=bI(h),n=t.path(r,e);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),d&&u.attr("style",d)}else u=pM(a,s,o,h);return r&&u.attr("style",r),EI(i,u),i.intersect=function(t){return UI.polygon(i,h,t)},a}var BM,FM,$M,zM,GM,UM,qM,YM,jM,HM,WM,VM=t(()=>{CI(),eM(),ON(),W9(),CM(),CI(),Ae(PM,"card")}),XM=t(()=>{CI(),eM(),ON(),W9(),BM=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await TI(t,e,_I(e))),a=e?.padding??0,o=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=H9.svg(r),u=EN(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+o+8,y:a},{x:l+o+8,y:a+s},{x:l-8,y:a+s},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+s}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",c),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-o/2+4+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-(t.y-(t.top??0))})`),EI(e,g),e.intersect=function(t){return UI.rect(e,t)},r},"shadedProcess")}),KM=t(()=>{e(),CI(),eM(),ON(),W9(),FM=Ae((t,e)=>{var r=TN(e).labelStyles;e.labelStyle=r;let n=_I(e),i=n,a=(n||(i="anchor"),t.insert("g").attr("class",i).attr("id",e.domId||e.id)),o=e.cssStyles,s=H9.svg(a),l=EN(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),s.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",o),EI(e,h),e.intersect=function(t){return R.info("Circle intersect",e,1,t),UI.circle(e,1,t)},a},"anchor")}),ZM=t(()=>{CI(),eM(),ON(),W9(),CM(),$M=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(i)),o=Math.max(n.width+(i.padding??0),i?.width??0),s=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=H9.svg(a),e=EN(i,{}),r=bI(l),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=pM(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,EI(i,c),i.intersect=function(t){return UI.polygon(i,l,t)},a},"lean_right")}),QM=t(()=>{CI(),eM(),ON(),W9(),CM(),zM=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(i)),o=Math.max(n.width+(i.padding??0),i?.width??0),s=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=H9.svg(a),e=EN(i,{}),r=bI(l),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=pM(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,EI(i,c),i.intersect=function(t){return UI.polygon(i,l,t)},a},"lean_left")}),JM=t(()=>{CI(),eM(),ON(),W9(),CM(),GM=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=H9.svg(a),e=EN(i,{}),r=bI(l),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=pM(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,EI(i,c),i.intersect=function(t){return UI.polygon(i,l,t)},a},"trapezoid")}),tR=t(()=>{CI(),eM(),ON(),W9(),CM(),UM=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=TN(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await TI(t,i,_I(i)),o=Math.max(n.width+2*(i.padding??0),i?.width??0),s=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=H9.svg(a),e=EN(i,{}),r=bI(l),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=pM(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,EI(i,c),i.intersect=function(t){return UI.polygon(i,l,t)},a},"inv_trapezoid")}),eR=t(()=>{rM(),CI(),eM(),qM=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r,label:n}=await TI(t,e,"label"),i=t.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),EI(e,i),e.intersect=function(t){return UI.rect(e,t)},t},"labelRect")}),rR=t(()=>{e(),CI(),eM(),ON(),W9(),CI(),Jl(),fh(),YM=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=Rl(D().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=e.cssStyles,p=H9.svg(i),g=EN(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),bI(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),e.width=l,e.height=c,EI(e,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return R.info("Triangle intersect",e,u,t),UI.polygon(e,u,t)},i},"triangle")}),nR=t(()=>{e(),CI(),eM(),ON(),W9(),jM=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await TI(t,e,_I(e)),o=Math.max(80,a.width+2*(e.padding??0),e?.width??0),s=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=s/2,c=e.cssStyles,h=H9.svg(i),u=EN(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-o/2,y:-s/2},{x:o/2-l,y:-s/2},...kI(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},{x:-o/2,y:s/2}]),p=bI(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),EI(e,f),e.intersect=function(t){return R.info("Pill intersect",e,{radius:l,point:t}),UI.polygon(e,d,t)},i},"halfRoundedRectangle")}),iR=t(()=>{CI(),eM(),ON(),W9(),HM=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await TI(t,e,_I(e))),i=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,o=e.cssStyles,s=H9.svg(r),l=EN(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=t,u=c-a,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...kI(-u,-h/2,a,50,270,90)],g=bI(p),f=s.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",o),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-t/2})`),EI(e,m),e.intersect=function(t){return UI.polygon(e,p,t)},r},"curvedTrapezoid")}),aR=t(()=>{CI(),eM(),ON(),W9(),WM=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await TI(t,e,_I(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),s=-a/2,l=-o/2,c=e.cssStyles,h=H9.svg(r),u=EN(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:s,y:l},{x:s,y:l+o},{x:s+a,y:l+o},{x:s+a,y:l-o/2}],p=bI(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${o/4})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-o/4+(e.padding??0)-(t.y-(t.top??0))})`),EI(e,f),e.intersect=function(t){return UI.polygon(e,d,t)},r},"slopedRect")});function oR(t,e,r,n,i,a,o){var s=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=Math.sqrt(((r-t)/2/i)**2+((n-e)/2/a)**2);if(1{CI(),eM(),ON(),W9(),Ae(oR,"generateArcPoints"),sR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await TI(t,e,_I(e)),o=a.width+e.padding+20,s=a.height+e.padding,l=s/2,c=l/(2.5+s/50),h=e.cssStyles,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...oR(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...oR(o/2,s/2,o/2,-s/2,c,l,!0)],d=H9.svg(i),p=EN(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),bI(u)),f=d.path(g,p),m=i.insert(()=>f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),EI(e,m),e.intersect=function(t){return UI.polygon(e,u,t)},i},"bowTieRect")}),hR=t(()=>{CI(),eM(),ON(),W9(),lR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await TI(t,e,_I(e))),a=t.width+e.padding,o=.2*(s=t.height+e.padding),a=-a/2,s=-s/2-o/2,l=e.cssStyles,c=H9.svg(r),h=EN(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:s+o},{x:-a,y:s+o},{x:-a,y:-s},{x:a,y:-s},{x:a,y:s},{x:-a,y:s},{x:-a,y:s+o}],d=c.polygon(u.map(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${s+o+(e.padding??0)/2-(t.y-(t.top??0))})`),EI(e,p),e.intersect=function(t){return UI.rect(e,t)},r},"dividedRectangle")});function uR(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r} - M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}var dR,pR,gR,fR,mR,yR,vR,xR,bR,wR,kR,TR,ER,_R,CR,SR,AR,LR,NR,IR,MR,RR,DR=t(()=>{e(),CI(),ON(),W9(),eM(),Ae(uR,"createLine"),dR=Ae((t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",_I(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),o=e.cssStyles,s=H9.svg(i),l=EN(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),s.circle(0,0,2*a,l)),h=uR(a),u=s.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),EI(e,d),e.intersect=function(t){return R.info("crossedCircle intersect",e,{radius:a,point:t}),UI.circle(e,a,t)},i},"crossedCircle")}),OR=t(()=>{CI(),eM(),ON(),W9(),pR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await TI(t,e,_I(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=o/s,c=o,h=s;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),t=h+2*r,u=e.cssStyles,d=H9.svg(i),p=EN(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...wI(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...wI(c/2,-t/2,-c/2,-t/2,r,-1)],f=bI(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),EI(e,y),e.intersect=function(t){return UI.polygon(e,g,t)},i},"waveRectangle")}),PR=t(()=>{CI(),ON(),W9(),eM(),gR=Ae((t,e,r,n,i,a)=>`M${t},${e} +res:`,S.polygon(i,c,t)),S.polygon(i,c,t)},a}var o9,l9=t(()=>{e(),i(),xC(),bC(),SS(),DS(),o9=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"),Ae(s9,"question")});async function c9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await YE(t,e,VE(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=e.cssStyles,g=CS.svg(i),f=mC(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),GE(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),WE(e,v),e.intersect=function(t){return S.polygon(e,d,t)},i}var h9=t(()=>{i(),xC(),bC(),SS(),Ae(c9,"rect_left_inv_arrow")});function u9(t,e){e&&t.attr("style",e)}async function d9(t){let e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;return t.label&&Gl(t.label)&&(n=await jl(t.label.replace(L.lineBreakRegex,` +`),D())),r.html('"+n+""),u9(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 p9,g9,f9=t(()=>{Z3(),e(),fh(),Jl(),K8(),Ae(u9,"applyStyle"),Ae(d9,"addHtmlLabel"),p9=Ae(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Rl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),R.info("vertexText"+i),d9({isNode:n,label:V8(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),g9=p9});async function m9(i,a){var{labelStyles:t,nodeStyles:e}=fC(a);a.labelStyle=t;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",e),l=a.description,c=a.label,h=o.node().appendChild(await g9(c,a.labelStyle,!0,!0)),u={width:0,height:0};Rl(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=o.node().appendChild(await g9(t.join?t.join("
"):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(R.debug("Rough node insert CXC",r),n),":first-child"),v=s.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 WE(a,v),a.intersect=function(t){return S.rect(a,t)},s}var y9=t(()=>{Z3(),Jl(),i(),f9(),xC(),bC(),SS(),fh(),AA(),e(),Ae(m9,"rectWithTitle")});async function v9(t,e){return BA(t,e,{rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var x9=t(()=>{FA(),Ae(v9,"roundedRect")});async function b9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await YE(t,e,VE(e))),a=e?.padding??0,s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=CS.svg(r),u=mC(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",b8(c)),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-(t.y-(t.top??0))})`),WE(e,g),e.intersect=function(t){return S.rect(e,t)},r}var w9=t(()=>{i(),xC(),bC(),SS(),K8(),Ae(b9,"shadedProcess")});async function k9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await YE(t,e,VE(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=-a/2,l=-s/2,c=e.cssStyles,h=CS.svg(r),u=mC(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=GE(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-s/4+(e.padding??0)-(t.y-(t.top??0))})`),WE(e,f),e.intersect=function(t){return S.polygon(e,d,t)},r}var T9=t(()=>{i(),xC(),bC(),SS(),Ae(k9,"slopedRect")});async function _9(t,e){return BA(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var E9=t(()=>{FA(),Ae(_9,"squareRect")});async function C9(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=n.height+i.padding,o=n.width+s/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=CA(-o/2,-s/2,o,s,s/2),n=t.path(r,e);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",b8(c))}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return WE(i,l),i.intersect=function(t){return S.rect(i,t)},a}var S9=t(()=>{i(),xC(),bC(),SS(),AA(),K8(),Ae(C9,"stadium")});async function A9(t,e){return BA(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var L9=t(()=>{FA(),Ae(A9,"state")});function N9(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=fC(e),n=(e.labelStyle=n,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=CS.svg(t),l=mC(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=t.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),WE(e,d),e.intersect=function(t){return S.circle(e,7,t)},t}var I9=t(()=>{SS(),xC(),bC(),i(),Ae(N9,"stateEnd")});function M9(t,e,{config:{themeVariables:r}}){let n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=CS.svg(i).circle(0,0,14,dC(n));(a=i.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return WE(e,a),e.intersect=function(t){return S.circle(e,7,t)},i}var R9=t(()=>{SS(),xC(),bC(),i(),Ae(M9,"stateStart")});async function D9(a,s){var{labelStyles:o,nodeStyles:t}=fC(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await YE(a,s,VE(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.height/2-r,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"===s.look){let t=CS.svg(l),e=mC(s,{}),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"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",b8(a)),WE(s,o)}else a=RS(l,c,h,n),t&&a.attr("style",t),WE(s,a);return s.intersect=function(t){return S.polygon(s,n,t)},l}var O9=t(()=>{i(),xC(),bC(),SS(),DS(),K8(),Ae(D9,"subroutine")});async function P9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await YE(t,e,VE(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=e.cssStyles,p=CS.svg(i),g=mC(e,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),GE(f)),v=p.path(y,g),x=GE(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),WE(e,w),e.intersect=function(t){return S.polygon(e,f,t)},i}var B9=t(()=>{i(),bC(),SS(),xC(),Ae(P9,"taggedRect")});async function F9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await YE(t,e,VE(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=e.cssStyles,d=CS.svg(r),p=mC(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...qE(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,o,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...qE(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=GE(g),x=d.path(v,p),b=GE(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),WE(e,k),e.intersect=function(t){return S.polygon(e,g,t)},r}var $9=t(()=>{i(),xC(),SS(),bC(),Ae(F9,"taggedWaveEdgedRectangle")});async function z9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await YE(t,e,VE(e))),i=Math.max(t.width+e.padding,e?.width||0),a=-i/2,s=-(t=Math.max(t.height+e.padding,e?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",i).attr("height",t),WE(e,o),e.intersect=function(t){return S.rect(e,t)},r}var U9=t(()=>{i(),xC(),bC(),Ae(z9,"text")});async function G9(t,a){var{labelStyles:e,nodeStyles:r}=fC(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await YE(t,a,VE(a)),l="neo"===a.look?2*o:o,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let t=CS.svg(s),e=j9(0,0,d,c,u,h),r=Y9(0,0,d,c,u,h),n=t.path(e,mC(a,{})),i=t.path(r,mC(a,{fill:"none"}));g=s.insert(()=>i,":first-child"),(g=s.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else e=q9(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",b8(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),WE(a,g),a.intersect=function(e){var r=S.rect(a,e),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let t=u*u*(1-n*n/(h*h));0!=t&&(t=Math.sqrt(t)),t=u-t,0{i(),bC(),SS(),xC(),K8(),q9=Ae((t,e,r,n,i,a)=>`M${t},${e} a${i},${a} 0,0,1 0,${-n} l${r},0 a${i},${a} 0,0,1 0,${n} M${r},${-n} a${i},${a} 0,0,0 0,${n} - l${-r},0`,"createCylinderPathD"),fR=Ae((t,e,r,n,i,a)=>[`M${t},`+e,`M${t+r},`+e,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),mR=Ae((t,e,r,n,i,a)=>[`M${t+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),yR=Ae(async(t,a)=>{var{labelStyles:e,nodeStyles:r}=TN(a);a.labelStyle=e;let{shapeSvg:o,bbox:n,label:i,halfPadding:s}=await TI(t,a,_I(a)),l="neo"===a.look?2*s:s,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let t=H9.svg(o),e=fR(0,0,d,c,u,h),r=mR(0,0,d,c,u,h),n=t.path(e,EN(a,{})),i=t.path(r,EN(a,{fill:"none"}));g=o.insert(()=>i,":first-child"),(g=o.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else e=gR(0,0,d,c,u,h),g=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",p).attr("style",r);return g.attr("class","basic label-container"),p&&"handDrawn"!==a.look&&g.selectAll("path").attr("style",p),r&&"handDrawn"!==a.look&&g.selectAll("path").attr("style",r),g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),EI(a,g),a.intersect=function(e){var r=UI.rect(a,e),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let t=u*u*(1-n*n/(h*h));0!=t&&(t=Math.sqrt(t)),t=u-t,0{CI(),eM(),ON(),W9(),vR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await TI(t,e,_I(e))),i=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,o=H9.svg(r),s=EN(e,{});"handDrawn"!==e.look&&(s.roughness=0,s.fillStyle="solid");let l=[{x:-i/2*.8,y:-t/2},{x:i/2*.8,y:-t/2},{x:i/2,y:-t/2*.6},{x:i/2,y:t/2},{x:-i/2,y:t/2},{x:-i/2,y:-t/2*.6}],c=bI(l),h=o.path(c,s),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),EI(e,u),e.intersect=function(t){return UI.polygon(e,l,t)},r},"trapezoidalPentagon")}),FR=t(()=>{e(),CI(),eM(),ON(),W9(),CI(),xR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=a.width+(e.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=e.cssStyles,d=H9.svg(i),p=EN(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),bI(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),e.width=s,e.height=l,EI(e,m),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return R.info("Triangle intersect",e,h,t),UI.polygon(e,h,t)},i},"flippedTriangle")}),$R=t(()=>{e(),CI(),eM(),ON(),W9(),bR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),r=(e.label="",e.labelStyle=r,(await TI(t,e,_I(e))).shapeSvg),t=Math.max(30,e?.width??0),i=Math.max(30,e?.height??0),a=e.cssStyles,o=H9.svg(r),s=EN(e,{});"handDrawn"!==e.look&&(s.roughness=0,s.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:i},{x:t,y:i}],c=bI(l),h=o.path(c,s),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-t/2}, ${-i/2})`),EI(e,u),e.intersect=function(t){return R.info("Pill intersect",e,{points:l}),UI.polygon(e,l,t)},r},"hourglass")}),zR=t(()=>{CI(),ON(),W9(),eM(),wR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await TI(t,e,_I(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,d=e.cssStyles,p=H9.svg(i),g=EN(e,{}),f=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],m=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}],y=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),bI(f)),v=p.path(y,g),x=bI(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),EI(e,w),e.intersect=function(t){return UI.polygon(e,f,t)},i},"taggedRect")}),GR=t(()=>{CI(),ON(),W9(),eM(),kR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-s/2,h=-l/2,u=e.cssStyles,d=H9.svg(i),p=EN(e,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+s-5,y:h+l+5},{x:c+s-5,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h+l-5},{x:c+s+5,y:h+l-5},{x:c+s+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+s-5,y:5+h},{x:c+s-5,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h},{x:c,y:h}],m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),bI(g)),y=d.path(m,p),v=bI(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),o.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),EI(e,b),e.intersect=function(t){return UI.polygon(e,g,t)},i},"multiRect")}),UR=t(()=>{CI(),eM(),ON(),W9(),TR=Ae((t,e,r,n,i,a,o)=>[`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,`M${t},`+(e+a+o),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ER=Ae((t,e,r,n,i,a,o)=>[`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,`M${t},`+(e+a+o),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),_R=Ae((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),CR=Ae(async(t,o)=>{var{labelStyles:e,nodeStyles:r}=TN(o);o.labelStyle=e;let{shapeSvg:s,bbox:n,label:i}=await TI(t,o,_I(o)),l=Math.max(n.width+(o.padding??0),o.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(o.padding??0),o.height??0),d=.1*u,p,g=o.cssStyles;if("handDrawn"===o.look){let t=H9.svg(s),e=ER(0,0,l,u,c,h,d),r=_R(0,h,l,u,c,h),n=EN(o,{}),i=t.path(e,n),a=t.path(r,n);s.insert(()=>a,":first-child").attr("class","line"),(p=s.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else e=TR(0,0,l,u,c,h,d),p=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",g).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),EI(o,p),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),o.intersect=function(e){var r=UI.rect(o,e),n=r.x-(o.x??0);if(0!=c&&(Math.abs(n)<(o.width??0)/2||Math.abs(n)==(o.width??0)/2&&Math.abs(r.y-(o.y??0))>(o.height??0)/2-h)){let t=h*h*(1-n*n/(c*c));0{CI(),eM(),W9(),ON(),SR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await TI(t,e,_I(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),s=o/8,l=o+s,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=H9.svg(r),d=EN(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...wI(-a/2-h,l/2,a/2+h,l/2,s,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=bI(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-s/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-s-(t.y-(t.top??0))})`),EI(e,m),e.intersect=function(t){return UI.polygon(e,p,t)},r},"waveEdgedRectangle")}),YR=t(()=>{e(),CI(),ON(),W9(),eM(),CI(),AR=Ae((t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",_I(e)).attr("id",e.domId??e.id),a=e.cssStyles,o=Math.max(35,e?.width??0),s=Math.max(35,e?.height??0),l=[{x:o,y:0},{x:0,y:s+3.5},{x:o-14,y:s+3.5},{x:0,y:2*s},{x:o,y:s-3.5},{x:14,y:s-3.5}],c=H9.svg(i),h=EN(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),bI(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${o/2},${-s})`),EI(e,p),e.intersect=function(t){return R.info("lightningBolt intersect",e,t),UI.polygon(e,l,t)},i},"lightningBolt")}),jR=t(()=>{W9(),e(),eM(),ON(),CI(),LR=Ae((t,e,{config:{themeVariables:r}})=>{var{labelStyles:n,nodeStyles:i}=TN(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",_I(e)).attr("id",e.domId??e.id),o=e.cssStyles,s=H9.svg(a),l=r.nodeBorder,c=EN(e,{fillStyle:"solid"}),h=("handDrawn"!==e.look&&(c.roughness=0),s.circle(0,0,14,c)),u=a.insert(()=>h,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),o&&0{CI(),eM(),W9(),ON(),NR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-s/2,d=-h/2,p=e.cssStyles,g=wI(u-5,d+h+5,u+s-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+s-5,y:f.y-5},{x:u+s,y:f.y-5},{x:u+s,y:f.y-10},{x:u+s+5,y:f.y-10},{x:u+s+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+s-5,y:5+d},{x:u+s-5,y:f.y-5},{x:u+s,y:f.y-5},{x:u+s,y:d},{x:u,y:d}],v=H9.svg(i),x=EN(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),bI(m)),w=v.path(b,x),k=bI(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),EI(e,E),e.intersect=function(t){return UI.polygon(e,m,t)},i},"multiWaveEdgedRectangle")}),WR=t(()=>{CI(),ON(),W9(),eM(),IR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-s/2,h=-l/2,u=e.cssStyles,d=H9.svg(i),p=EN(e,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-5}],f=`M${c-5},${h-5} L${c+s},${h-5} L${c+s},${h+l} L${c-5},${h+l} L${c-5},${h-5} - M${c-5},${h} L${c+s},${h} - M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),o.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),EI(e,y),e.intersect=function(t){return UI.polygon(e,g,t)},i},"windowPane")}),VR=t(()=>{CI(),eM(),W9(),ON(),MR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await TI(t,e,_I(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),s=o/4,l=o+s,c=e.cssStyles,h=H9.svg(r),u=EN(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...wI(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,s,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-s/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-o/2+(e.padding??0)-s/2-(t.y-(t.top??0))})`),EI(e,g),e.intersect=function(t){return UI.polygon(e,d,t)},r},"linedWaveEdgedRect")}),XR=t(()=>{CI(),eM(),W9(),ON(),RR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await TI(t,e,_I(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),s=o/4,l=.2*a,c=.2*o,h=o+s,u=e.cssStyles,d=H9.svg(r),p=EN(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...wI(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,s,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.4*(m+o)},{x:f+a,y:m+o-c},{x:f+a,y:.9*(m+o)},...wI(f+a,1.3*(m+o),f+a-l,1.5*(m+o),.03*-o,.5)],v=bI(g),x=d.path(v,p),b=bI(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-s/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-s/2-(t.y-(t.top??0))})`),EI(e,k),e.intersect=function(t){return UI.polygon(e,g,t)},r},"taggedWaveEdgedRectangle")});function KR(e,r,n,i=100,t=0,a=180){var o=[],s=t*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let t=0;t{CI(),eM(),ON(),W9(),Ae(KR,"generateCirclePoints"),ZR=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...KR(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...KR(s/2+2*c,-c,c,20,-180,-270),...KR(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...KR(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...KR(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...KR(s/2+.1*s,-c,c,20,-180,-270),...KR(s/2+.1*s,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...KR(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=H9.svg(i),g=EN(e,{fill:"none"}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),bI(u).replace("Z","")),m=p.path(f,g),y=bI(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),EI(e,x),e.intersect=function(t){return UI.polygon(e,d,t)},i},"curlyBraceLeft")});function JR(e,r,n,i=100,t=0,a=180){var o=[],s=t*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let t=0;t{CI(),eM(),ON(),W9(),Ae(JR,"generateCirclePoints"),tD=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...JR(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...JR(s/2+2*c,-c,c,20,-180,-270),...JR(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...JR(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...JR(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...JR(s/2+2*c,-c,c,20,-180,-270),...JR(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...JR(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=H9.svg(i),g=EN(e,{fill:"none"}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),bI(u).replace("Z","")),m=p.path(f,g),y=bI(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),EI(e,x),e.intersect=function(t){return UI.polygon(e,d,t)},i},"curlyBraceRight")});function rD(e,r,n,i=100,t=0,a=180){var o=[],s=t*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let t=0;t{CI(),eM(),ON(),W9(),Ae(rD,"generateCirclePoints"),nD=Ae(async(t,e)=>{var{labelStyles:r,nodeStyles:n}=TN(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await TI(t,e,_I(e)),s=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,.1*l),h=e.cssStyles,u=[...rD(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...rD(s/2+2*c,-c,c,20,-180,-270),...rD(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...rD(s/2,l/2,c,20,0,90)],d=[...rD(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...rD(-s/2-c/2,-c,c,20,0,90),...rD(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...rD(-s/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...rD(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...rD(s/2+2*c,-c,c,20,-180,-270),...rD(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...rD(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...rD(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...rD(-s/2-c/2,-c,c,20,0,90),...rD(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...rD(-s/2+c+c/2,l/2,c,30,-180,-270)],g=H9.svg(i),f=EN(e,{fill:"none"}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),bI(u).replace("Z","")),y=g.path(m,f),v=bI(d).replace("Z",""),x=g.path(v,f),b=bI(p),w=g.path(b,{...f}),k=i.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),EI(e,k),e.intersect=function(t){return UI.polygon(e,p,t)},i},"curlyBraces")}),yD=t(()=>{W9(),e(),Yt(),eM(),ON(),CI(),iD=Ae(async(t,i,{config:{themeVariables:e,flowchart:r}})=>{var n,a=TN(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:o,bbox:s,halfPadding:l,label:c}=await TI(t,i,"icon-shape default"),h="t"===i.pos,u=a+2*l,d=a+2*l,{nodeBorder:p,mainBkg:g}=e,f=wN(i).stylesMap,m=-d/2,y=-u/2,v=i.label?8:0,x=H9.svg(o),b=EN(i,{stroke:f.get("fill")||g}),w=("handDrawn"!==i.look&&(b.roughness=0,b.fillStyle="solid"),x.rectangle(m,y,d,u,b)),k=Math.max(d,s.width),T=u+s.height+v,E=x.rectangle(-k/2,-T/2,k,T,{...b,fill:"transparent",stroke:"none"}),_=o.insert(()=>w,":first-child"),C=o.insert(()=>E);return i.icon&&((r=o.append("g")).html(`${await Ft(i.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.x},${h?s.height/2+v/2-a/2-n:-s.height/2-v/2-a/2-n})`),r.selectAll("path").attr("fill",f.get("stroke")??p)),c.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${h?-T/2:T/2-s.height})`),_.attr("transform",`translate(0,${h?s.height/2+v/2:-s.height/2-v/2})`),EI(i,C),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=h?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+v},{x:n+d/2,y:e-r/2+s.height+v},{x:n+d/2,y:e+r/2},{x:n-d/2,y:e+r/2},{x:n-d/2,y:e-r/2+s.height+v},{x:n-s.width/2,y:e-r/2+s.height+v}]:[{x:n-d/2,y:e-r/2},{x:n+d/2,y:e-r/2},{x:n+d/2,y:e-r/2+u},{x:n+s.width/2,y:e-r/2+u},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+u},{x:n-d/2,y:e-r/2+u}],UI.polygon(i,n,t)):UI.rect(i,t)},o},"iconSquare")}),vD=t(()=>{W9(),e(),Yt(),eM(),ON(),CI(),aD=Ae(async(t,e,{config:{themeVariables:r,flowchart:n}})=>{var i=TN(e).labelStyles,i=(e.labelStyle=i,e.assetHeight??48),i=Math.max(i,e.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:t,label:a}=(e.width=Math.max(i,n??0),await TI(t,e,"icon-shape default")),o=e.label?8:0,s="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=wN(e).stylesMap,h=H9.svg(n),l=EN(e,{stroke:c.get("fill")||l}),u=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),n.append("g"));e.icon&&u.html(`${await Ft(e.icon,{height:i,width:i,fallbackPrefix:""})}`);let d=u.node().getBBox(),p=d.width,g=d.height,f=d.x,m=d.y,y=Math.max(p,g)*Math.SQRT2+40,v=h.circle(0,0,y,l),x=Math.max(y,t.width),b=y+t.height+o,w=h.rectangle(-x/2,-b/2,x,b,{...l,fill:"transparent",stroke:"none"}),k=n.insert(()=>v,":first-child"),T=n.insert(()=>w);return u.attr("transform",`translate(${-p/2-f},${s?t.height/2+o/2-g/2-m:-t.height/2-o/2-g/2-m})`),u.selectAll("path").attr("fill",c.get("stroke")||r),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${s?-b/2:b/2-t.height})`),k.attr("transform",`translate(0,${s?t.height/2+o/2:-t.height/2-o/2})`),EI(e,T),e.intersect=function(t){return R.info("iconSquare intersect",e,t),UI.rect(e,t)},n},"iconCircle")}),xD=t(()=>{W9(),e(),Yt(),eM(),ON(),CI(),oD=Ae(async(t,i,{config:{themeVariables:e,flowchart:r}})=>{var n,a=TN(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:o,bbox:s,label:l}=await TI(t,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=e.nodeBorder,p=wN(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=H9.svg(o),v=EN(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,s.width),w=h+s.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=o.insert(()=>x,":first-child"),E=o.insert(()=>k);return i.icon&&((r=o.append("g")).html(`${await Ft(i.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.x},${c?s.height/2+m/2-a/2-n:-s.height/2-m/2-a/2-n})`),r.selectAll("path").attr("fill",p.get("stroke")||d)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-w/2:w/2-s.height})`),T.attr("transform",`translate(0,${c?s.height/2+m/2:-s.height/2-m/2})`),EI(i,E),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+m},{x:n+u/2,y:e-r/2+s.height+m},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+m},{x:n-s.width/2,y:e-r/2+s.height+m}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],UI.polygon(i,n,t)):UI.rect(i,t)},o},"icon")}),bD=t(()=>{W9(),e(),eM(),ON(),CI(),sD=Ae(async(t,i,{config:{flowchart:e}})=>{(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,TN(i).labelStyles),a=(i.labelStyle=a,e?.wrappingWidth);i.defaultWidth=e?.wrappingWidth;let o=Math.max(i.label?a??0:0,i?.assetWidth??r),s="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:o,l="on"===i.constraint?s/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(s,a??0),await TI(t,i,"image-shape default")),d="t"===i.pos,p=-s/2,g=-l/2,f=i.label?8:0,m=H9.svg(c),y=EN(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,s,l,y)),x=Math.max(s,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((e=c.append("image")).attr("href",i.img),e.attr("width",s),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-s/2},${d?b/2-l:-b/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),EI(i,T),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2+h.height+f},{x:n+s/2,y:e-r/2+h.height+f},{x:n+s/2,y:e+r/2},{x:n-s/2,y:e+r/2},{x:n-s/2,y:e-r/2+h.height+f},{x:n-h.width/2,y:e-r/2+h.height+f}]:[{x:n-s/2,y:e-r/2},{x:n+s/2,y:e-r/2},{x:n+s/2,y:e-r/2+l},{x:n+h.width/2,y:e-r/2+l},{x:n+h.width/2/2,y:e+r/2},{x:n-h.width/2,y:e+r/2},{x:n-h.width/2,y:e-r/2+l},{x:n-s/2,y:e-r/2+l}],UI.polygon(i,n,t)):UI.rect(i,t)},c},"imageSquare")}),wD=t(()=>{W9(),e(),Yt(),eM(),ON(),DN(),CI(),lD=Ae(async(t,i,{config:{themeVariables:e,flowchart:r}})=>{var n,a=TN(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:o,bbox:s,halfPadding:l,label:c}=await TI(t,i,"icon-shape default"),h="t"===i.pos,u=a+2*l,d=a+2*l,{nodeBorder:p,mainBkg:g}=e,f=wN(i).stylesMap,m=-d/2,y=-u/2,v=i.label?8:0,x=H9.svg(o),b=EN(i,{stroke:f.get("fill")||g}),w=("handDrawn"!==i.look&&(b.roughness=0,b.fillStyle="solid"),x.path(xN(m,y,d,u,5),b)),k=Math.max(d,s.width),T=u+s.height+v,E=x.rectangle(-k/2,-T/2,k,T,{...b,fill:"transparent",stroke:"none"}),_=o.insert(()=>w,":first-child"),C=o.insert(()=>E);return i.icon&&((r=o.append("g")).html(`${await Ft(i.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.x},${h?s.height/2+v/2-a/2-n:-s.height/2-v/2-a/2-n})`),r.selectAll("path").attr("fill",f.get("stroke")??p)),c.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${h?-T/2:T/2-s.height})`),_.attr("transform",`translate(0,${h?s.height/2+v/2:-s.height/2-v/2})`),EI(i,C),i.intersect=function(t){var e,r,n;return R.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=h?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+v},{x:n+d/2,y:e-r/2+s.height+v},{x:n+d/2,y:e+r/2},{x:n-d/2,y:e+r/2},{x:n-d/2,y:e-r/2+s.height+v},{x:n-s.width/2,y:e-r/2+s.height+v}]:[{x:n-d/2,y:e-r/2},{x:n+d/2,y:e-r/2},{x:n+d/2,y:e-r/2+u},{x:n+s.width/2,y:e-r/2+u},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+u},{x:n-d/2,y:e-r/2+u}],UI.polygon(i,n,t)):UI.rect(i,t)},o},"iconRounded")}),kD=t(()=>{e(),nM(),iM(),aM(),oM(),sM(),lM(),cM(),hM(),uM(),dM(),SM(),AM(),LM(),NM(),IM(),MM(),RM(),OM(),VM(),XM(),KM(),ZM(),QM(),JM(),tR(),eR(),rR(),nR(),iR(),aR(),cR(),hR(),DR(),OR(),PR(),BR(),FR(),$R(),zR(),GR(),UR(),qR(),YR(),jR(),HR(),WR(),VR(),XR(),QR(),eD(),mD(),yD(),vD(),xD(),bD(),wD(),cD={state:YI,stateStart:WI,stateEnd:VI,forkJoin:XI,choice:KI,note:ZI,rectWithTitle:JI,roundedRect:jI,squareRect:HI,rectangle:HI,rect:HI,process:HI,proc:HI,rounded:jI,event:jI,stadium:QI,pill:QI,terminal:QI,subroutine:gM,"framed-rectangle":gM,"fr-rect":gM,subprocess:gM,subproc:gM,cylinder:vM,db:vM,cyl:vM,database:vM,question:TM,diam:TM,diamond:TM,decision:TM,hexagon:_M,hex:_M,prepare:_M,lean_right:$M,"lean-r":$M,"lean-right":$M,"in-out":$M,lean_left:zM,"lean-l":zM,"lean-left":zM,"out-in":zM,trapezoid:GM,"trap-b":GM,"trapezoid-bottom":GM,priority:GM,inv_trapezoid:UM,"inv-trapezoid":UM,"trapezoid-top":UM,"trap-t":UM,manual:UM,doublecircle:bM,"dbl-circ":bM,"double-circle":bM,circle:xM,circ:xM,rect_left_inv_arrow:wM,odd:wM,card:PM,"notched-rectangle":PM,"notch-rect":PM,"lined-rectangle":BM,"lin-rect":BM,"lin-proc":BM,"lined-process":BM,"shaded-process":BM,"small-circle":WI,"sm-circ":WI,start:WI,stop:VI,"framed-circle":VI,"fr-circ":VI,join:XI,fork:XI,comment:ZR,"brace-l":ZR,bolt:AR,"com-link":AR,"lightning-bolt":AR,doc:SR,document:SR,delay:jM,"half-rounded-rectangle":jM,"horizontal-cylinder":yR,"h-cyl":yR,das:yR,"lined-cylinder":CR,"lin-cyl":CR,disk:CR,"curved-trapezoid":HM,"curv-trap":HM,display:HM,"divided-rectangle":lR,"div-rect":lR,"div-proc":lR,"divided-process":lR,triangle:YM,tri:YM,extract:YM,"window-pane":IR,"win-pane":IR,"internal-storage":IR,"f-circ":LR,junction:LR,"filled-circle":LR,"lin-doc":MR,"lined-document":MR,"notched-pentagon":vR,"notch-pent":vR,"loop-limit":vR,"flipped-triangle":xR,"flip-tri":xR,"manual-file":xR,"sloped-rectangle":WM,"sl-rect":WM,"manual-input":WM,docs:NR,documents:NR,"st-doc":NR,"stacked-document":NR,processes:kR,procs:kR,"stacked-rectangle":kR,"st-rect":kR,flag:pR,"paper-tape":pR,"bow-tie-rectangle":sR,"bow-rect":sR,"stored-data":sR,"crossed-circle":dR,"cross-circ":dR,summary:dR,"tag-doc":RR,"tagged-document":RR,"tag-rect":wR,"tagged-rectangle":wR,"tag-proc":wR,"tagged-process":wR,hourglass:bR,collate:bR,text:DM,anchor:FM,brace:ZR,labelRect:qM,"brace-r":tD,braces:nD,iconSquare:iD,iconCircle:aD,icon:oD,iconRounded:lD,imageSquare:sD},hD=new Map,uD=Ae(async(e,r,n)=>{let i,a;if("rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect"),!cD[r.shape])throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===n.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await cD[r.shape](i,r,n)}else a=await cD[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),hD.set(r.id,i),r.haveCallback&&hD.get(r.id).attr("class",hD.get(r.id).attr("class")+" clickable"),i},"insertNode"),dD=Ae((t,e)=>{hD.set(e.id,t)},"setNodeElem"),pD=Ae(()=>{hD.clear()},"clear"),gD=Ae(t=>{var e=hD.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")}),TD=t(()=>{In(),Jl(),e(),PN(),vI(),xI(),kD(),CI(),X8(),fD={common:L,getConfig:Mr,insertCluster:IN,insertEdge:aI,insertEdgeLabel:QN,insertMarkers:yI,insertNode:uD,interpolateToCurve:l8,labelHelper:TI,log:R,positionEdgeLabel:JN}});function ED(t){return"symbol"==typeof t||Gk(t)&&"[object Symbol]"==x5(t)}var _D,CD=t(()=>{b5(),Uk(),Ae(ED,"isSymbol"),_D=ED});function SD(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r{Ae(SD,"arrayMap"),AD=SD});function ND(t){var e;return"string"==typeof t?t:Kk(t)?AD(t,ND)+"":_D(t)?RD?RD.call(t):"":"0"==(e=t+"")&&1/t==-ID?"-0":e}var ID,MD,RD,DD,OD=t(()=>{i5(),LD(),Jk(),CD(),ID=1/0,MD=H3?H3.prototype:void 0,RD=MD?MD.toString:void 0,Ae(ND,"baseToString"),DD=ND});function PD(t){for(var e=t.length;e--&&BD.test(t.charAt(e)););return e}var BD,FD,$D=t(()=>{BD=/\s/,Ae(PD,"trimmedEndIndex"),FD=PD});function zD(t){return t&&t.slice(0,FD(t)+1).replace(GD,"")}var GD,UD,qD=t(()=>{$D(),GD=/^\s+/,Ae(zD,"baseTrim"),UD=zD});function YD(t){if("number"==typeof t)return t;if(_D(t))return jD;if(k5(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=k5(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=UD(t);var e=WD.test(t);return e||VD.test(t)?XD(t.slice(2),e?2:8):HD.test(t)?jD:+t}var jD,HD,WD,VD,XD,KD,ZD=t(()=>{qD(),T5(),CD(),jD=NaN,HD=/^[-+]0x[0-9a-f]+$/i,WD=/^0b[01]+$/i,VD=/^0o[0-7]+$/i,XD=parseInt,Ae(YD,"toNumber"),KD=YD});function QD(t){return t?(t=KD(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var JD,tO=t(()=>{ZD(),Ae(QD,"toFinite"),JD=QD});function eO(t){var e=(t=JD(t))%1;return t==t?e?t-e:t:0}var rO,nO,iO,aO=t(()=>{tO(),Ae(eO,"toInteger"),rO=eO}),oO=t(()=>{t6(),n5(),nO=Z5(Y3,"WeakMap"),iO=nO});function sO(){}var lO,cO=t(()=>{Ae(sO,"noop"),lO=sO});function hO(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(hO,"arrayEach"),uO=hO});function pO(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{Ae(pO,"baseFindIndex"),gO=pO});function mO(t){return t!=t}var yO,vO=t(()=>{Ae(mO,"baseIsNaN"),yO=mO});function xO(t,e,r){for(var n=r-1,i=t.length;++n{Ae(xO,"strictIndexOf"),bO=xO});function kO(t,e,r){return e==e?bO(t,e,r):gO(t,yO,r)}var TO,EO=t(()=>{fO(),vO(),wO(),Ae(kO,"baseIndexOf"),TO=kO});function _O(t,e){return!(null==t||!t.length)&&-1{EO(),Ae(_O,"arrayIncludes"),CO=_O}),NO=t(()=>{Ik(),SO=Ak(Object.keys,Object),AO=SO});function IO(t){if(!Ok(t))return AO(t);var e,r=[];for(e in Object(t))RO.call(t,e)&&"constructor"!=e&&r.push(e);return r}var MO,RO,DO,OO=t(()=>{Pk(),NO(),MO=Object.prototype,RO=MO.hasOwnProperty,Ae(IO,"baseKeys"),DO=IO});function PO(t){return(i7(t)?oT:DO)(t)}var BO,FO,$O,zO,GO=t(()=>{sT(),OO(),a7(),Ae(PO,"keys"),BO=PO}),UO=t(()=>{H7(),X7(),o8(),a7(),Pk(),GO(),$O=Object.prototype,FO=$O.hasOwnProperty,$O=n8(function(t,e){if(Ok(e)||i7(e))V7(e,BO(e),t);else for(var r in e)FO.call(e,r)&&j7(t,r,e[r])}),zO=$O});function qO(t,e){var r;return!Kk(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!_D(t))||jO.test(t)||!YO.test(t)||null!=e&&t in Object(e))}var YO,jO,HO,WO=t(()=>{Jk(),CD(),YO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jO=/^\w*$/,Ae(qO,"isKey"),HO=qO});function VO(t){var e=(t=_w(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var XO,KO,ZO,QO,JO,tP=t(()=>{Cw(),Ae(VO,"memoizeCapped"),XO=VO}),eP=t(()=>{tP(),KO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZO=/\\(\\)?/g,QO=XO(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(KO,function(t,e,r,n){i.push(r?n.replace(ZO,"$1"):e||t)}),i}),JO=QO});function rP(t){return null==t?"":DD(t)}var nP,iP=t(()=>{OD(),Ae(rP,"toString"),nP=rP});function aP(t,e){return Kk(t)?t:HO(t,e)?[t]:JO(nP(t))}var oP,sP=t(()=>{Jk(),WO(),eP(),iP(),Ae(aP,"castPath"),oP=aP});function lP(t){var e;return"string"==typeof t||_D(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var cP,hP=t(()=>{CD(),Ae(lP,"toKey"),cP=lP});function uP(t,e){for(var r=0,n=(e=oP(e,t)).length;null!=t&&r{sP(),hP(),Ae(uP,"baseGet"),dP=uP});function gP(t,e,r){return void 0===(t=null==t?void 0:dP(t,e))?r:t}var fP,mP=t(()=>{pP(),Ae(gP,"get"),fP=gP});function yP(t,e){for(var r=-1,n=e.length,i=t.length;++r{Ae(yP,"arrayPush"),vP=yP});function bP(t){return Kk(t)||Vk(t)||!!(wP&&t&&t[wP])}var wP,kP,TP=t(()=>{i5(),Qk(),Jk(),wP=H3?H3.isConcatSpreadable:void 0,Ae(bP,"isFlattenable"),kP=bP});function EP(t,e,r,n,i){var a=-1,o=t.length;for(r=r||kP,i=i||[];++a{xP(),TP(),Ae(EP,"baseFlatten"),_P=EP});function SP(t){return null!=t&&t.length?_P(t,1):[]}var AP,LP=t(()=>{CP(),Ae(SP,"flatten"),AP=SP});function NP(t){return WT(PT(t,void 0,AP),t+"")}var IP,MP=t(()=>{LP(),BT(),XT(),Ae(NP,"flatRest"),IP=NP});function RP(t,e,r){var n=-1,i=t.length;(r=i>>0,e>>>=0;for(var a=Array(i);++n{Ae(RP,"baseSlice"),DP=RP});function PP(t){return BP.test(t)}var BP,FP,$P=t(()=>{BP=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ae(PP,"hasUnicode"),FP=PP});function zP(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i{Ae(zP,"arrayReduce"),GP=zP});function qP(t,e){return t&&V7(e,BO(e),t)}var YP,jP=t(()=>{X7(),GO(),Ae(qP,"baseAssign"),YP=qP});function HP(t,e){return t&&V7(e,yT(e),t)}var WP,VP=t(()=>{X7(),vT(),Ae(HP,"baseAssignIn"),WP=HP});function XP(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r{Ae(XP,"arrayFilter"),KP=XP});function QP(){return[]}var JP,tB,eB,rB,nB,iB=t(()=>{Ae(QP,"stubArray"),JP=QP}),aB=t(()=>{ZP(),iB(),tB=Object.prototype,eB=tB.propertyIsEnumerable,nB=(rB=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),KP(rB(e),function(t){return eB.call(e,t)}))}:JP});function oB(t,e){return V7(t,nB(t),e)}var sB,lB,cB,hB=t(()=>{X7(),aB(),Ae(oB,"copySymbols"),sB=oB}),uB=t(()=>{xP(),Mk(),aB(),iB(),lB=Object.getOwnPropertySymbols,cB=lB?function(t){for(var e=[];t;)vP(e,nB(t)),t=Nk(t);return e}:JP});function dB(t,e){return V7(t,cB(t),e)}var pB,gB=t(()=>{X7(),uB(),Ae(dB,"copySymbolsIn"),pB=dB});function fB(t,e,r){return e=e(t),Kk(t)?e:vP(e,r(t))}var mB,yB=t(()=>{xP(),Jk(),Ae(fB,"baseGetAllKeys"),mB=fB});function vB(t){return mB(t,BO,nB)}var xB,bB=t(()=>{yB(),aB(),GO(),Ae(vB,"getAllKeys"),xB=vB});function wB(t){return mB(t,yT,cB)}var kB,TB,EB,_B,CB,SB,AB,LB,NB,IB,MB,RB,DB,OB,PB,BB,FB,$B,zB,GB=t(()=>{yB(),uB(),vT(),Ae(wB,"getAllKeysIn"),kB=wB}),UB=t(()=>{t6(),n5(),TB=Z5(Y3,"DataView"),EB=TB}),qB=t(()=>{t6(),n5(),_B=Z5(Y3,"Promise"),CB=_B}),YB=t(()=>{t6(),n5(),SB=Z5(Y3,"Set"),AB=SB}),jB=t(()=>{UB(),Q6(),qB(),YB(),oO(),b5(),F5(),LB="[object Map]",NB="[object Promise]",IB="[object Set]",MB="[object WeakMap]",RB="[object DataView]",DB=B5(EB),OB=B5(K6),PB=B5(CB),BB=B5(AB),FB=B5(iO),$B=x5,(EB&&$B(new EB(new ArrayBuffer(1)))!=RB||K6&&$B(new K6)!=LB||CB&&$B(CB.resolve())!=NB||AB&&$B(new AB)!=IB||iO&&$B(new iO)!=MB)&&($B=Ae(function(t){var e=x5(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?B5(t):"")switch(t){case DB:return RB;case OB:return LB;case PB:return NB;case BB:return IB;case FB:return MB}return e},"getTag")),zB=$B});function HB(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&VB.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var WB,VB,XB,KB=t(()=>{WB=Object.prototype,VB=WB.hasOwnProperty,Ae(HB,"initCloneArray"),XB=HB});function ZB(t,e){return e=e?mk(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var QB,JB=t(()=>{yk(),Ae(ZB,"cloneDataView"),QB=ZB});function tF(t){var e=new t.constructor(t.source,eF.exec(t));return e.lastIndex=t.lastIndex,e}var eF,rF,nF=t(()=>{eF=/\w*$/,Ae(tF,"cloneRegExp"),rF=tF});function iF(t){return oF?Object(oF.call(t)):{}}var aF,oF,sF,lF=t(()=>{i5(),aF=H3?H3.prototype:void 0,oF=aF?aF.valueOf:void 0,Ae(iF,"cloneSymbol"),sF=iF});function cF(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return mk(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return QB(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 xk(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return rF(t);case"[object Set]":return new n;case"[object Symbol]":return sF(t)}}var hF,uF=t(()=>{yk(),JB(),nF(),lF(),bk(),Ae(cF,"initCloneByTag"),hF=cF});function dF(t){return Gk(t)&&"[object Map]"==zB(t)}var pF,gF,fF,mF=t(()=>{jB(),Uk(),Ae(dF,"baseIsMap"),pF=dF}),yF=t(()=>{mF(),P7(),B7(),gF=(gF=R7&&R7.isMap)?L7(gF):pF,fF=gF});function vF(t){return Gk(t)&&"[object Set]"==zB(t)}var xF,bF,wF,kF=t(()=>{jB(),Uk(),Ae(vF,"baseIsSet"),xF=vF}),TF=t(()=>{kF(),P7(),B7(),bF=(bF=R7&&R7.isSet)?L7(bF):xF,wF=bF});function EF(r,n,i,t,e,a){var o,s=n&_F,l=n&CF,c=n&SF;if(void 0===(o=i?e?i(r,t,e,a):i(r):o)){if(!k5(r))return r;if(t=Kk(r)){if(o=XB(r),!s)return kk(r,o)}else{var h=zB(r),u=h==LF||h==NF;if(p7(r))return hk(r,s);if(h==IF||h==AF||u&&!e){if(o=l||u?{}:Fk(r),!s)return l?pB(r,WP(o,r)):sB(r,YP(o,r))}else{if(!MF[h])return e?r:{};o=hF(r,h,s)}}if(u=(a=a||new qw).get(r))return u;a.set(r,o),wF(r)?r.forEach(function(t){o.add(EF(t,n,i,t,r,a))}):fF(r)&&r.forEach(function(t,e){o.set(e,EF(t,n,i,e,r,a))});var d=t?void 0:(c?l?kB:xB:l?yT:BO)(r);uO(d||r,function(t,e){d&&(t=r[e=t]),j7(o,e,EF(t,n,i,e,r,a))})}return o}var _F,CF,SF,AF,LF,NF,IF,MF,RF,DF=t(()=>{Hw(),dO(),H7(),jP(),VP(),pk(),_k(),hB(),gB(),bB(),GB(),jB(),KB(),uF(),$k(),Jk(),f7(),yF(),T5(),TF(),GO(),vT(),_F=1,CF=2,SF=4,LF="[object Function]",NF="[object GeneratorFunction]",IF="[object Object]",(MF={})[AF="[object Arguments]"]=MF["[object Array]"]=MF["[object ArrayBuffer]"]=MF["[object DataView]"]=MF["[object Boolean]"]=MF["[object Date]"]=MF["[object Float32Array]"]=MF["[object Float64Array]"]=MF["[object Int8Array]"]=MF["[object Int16Array]"]=MF["[object Int32Array]"]=MF["[object Map]"]=MF["[object Number]"]=MF[IF]=MF["[object RegExp]"]=MF["[object Set]"]=MF["[object String]"]=MF["[object Symbol]"]=MF["[object Uint8Array]"]=MF["[object Uint8ClampedArray]"]=MF["[object Uint16Array]"]=MF["[object Uint32Array]"]=!0,MF["[object Error]"]=MF[LF]=MF["[object WeakMap]"]=!1,Ae(EF,"baseClone"),RF=EF});function OF(t){return RF(t,4)}var PF,BF=t(()=>{DF(),Ae(OF,"clone"),PF=OF});function FF(t){return RF(t,5)}var $F,zF=t(()=>{DF(),Ae(FF,"cloneDeep"),$F=FF});function GF(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e{Ae(GF,"compact"),UF=GF});function YF(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var jF,HF=t(()=>{Ae(YF,"setCacheAdd"),jF=YF});function WF(t){return this.__data__.has(t)}var VF,XF=t(()=>{Ae(WF,"setCacheHas"),VF=WF});function KF(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ww;++e{kw(),HF(),XF(),Ae(KF,"SetCache"),KF.prototype.add=KF.prototype.push=jF,KF.prototype.has=VF,ZF=KF});function JF(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(JF,"arraySome"),t$=JF});function r$(t,e){return t.has(e)}var n$,i$=t(()=>{Ae(r$,"cacheHas"),n$=r$});function a$(t,e,r,n,i,a){var o=1&r,s=t.length;if(s!=(l=e.length)&&!(o&&s{QF(),e$(),i$(),Ae(a$,"equalArrays"),o$=a$});function l$(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var c$,h$=t(()=>{Ae(l$,"mapToArray"),c$=l$});function u$(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var d$,p$=t(()=>{Ae(u$,"setToArray"),d$=u$});function g$(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 dk(t),new dk(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return A6(+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=c$;case"[object Set]":var l,s=s||d$;return!!(t.size==e.size||1&n)&&((l=o.get(t))?l==e:(n|=2,o.set(t,e),l=o$(s(t),s(e),n,i,a,o),o.delete(t),l));case"[object Symbol]":if(m$)return m$.call(t)==m$.call(e)}return!1}var f$,m$,y$,v$=t(()=>{i5(),gk(),L6(),s$(),h$(),p$(),f$=H3?H3.prototype:void 0,m$=f$?f$.valueOf:void 0,Ae(g$,"equalByTag"),y$=g$});function x$(t,e,r,n,i,a){var o=1&r,s=xB(t),l=s.length;if(l!=xB(e).length&&!o)return!1;for(var c=l;c--;){var h=s[c];if(!(o?h in e:w$.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{bB(),b$=Object.prototype,w$=b$.hasOwnProperty,Ae(x$,"equalObjects"),k$=x$});function E$(t,e,r,n,i,a){var o=Kk(t),s=Kk(e),l=o?C$:zB(t),s=s?C$:zB(e),c=(l=l==_$?S$:l)==S$,h=(s=s==_$?S$:s)==S$;if((s=l==s)&&p7(t)){if(!p7(e))return!1;c=!(o=!0)}return s&&!c?(a=a||new qw,o||O7(t)?o$(t,e,r,n,i,a):y$(t,e,l,r,n,i,a)):1&r||(o=c&&L$.call(t,"__wrapped__"),l=h&&L$.call(e,"__wrapped__"),!o&&!l)?s&&(a=a||new qw,k$(t,e,r,n,i,a)):i(o?t.value():t,l?e.value():e,r,n,a=a||new qw)}var _$,C$,S$,A$,L$,N$,I$=t(()=>{Hw(),s$(),v$(),T$(),jB(),Jk(),f7(),F7(),_$="[object Arguments]",C$="[object Array]",S$="[object Object]",A$=Object.prototype,L$=A$.hasOwnProperty,Ae(E$,"baseIsEqualDeep"),N$=E$});function M$(t,e,r,n,i){return t===e||(null==t||null==e||!Gk(t)&&!Gk(e)?t!=t&&e!=e:N$(t,e,r,n,M$,i))}var R$,D$=t(()=>{I$(),Uk(),Ae(M$,"baseIsEqual"),R$=M$});function O$(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{Hw(),D$(),Ae(O$,"baseIsMatch"),P$=O$});function F$(t){return t==t&&!k5(t)}var $$,z$=t(()=>{T5(),Ae(F$,"isStrictComparable"),$$=F$});function G$(t){for(var e=BO(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,$$(i)]}return e}var U$,q$=t(()=>{z$(),GO(),Ae(G$,"getMatchData"),U$=G$});function Y$(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var j$,H$=t(()=>{Ae(Y$,"matchesStrictComparable"),j$=Y$});function W$(e){var r=U$(e);return 1==r.length&&r[0][2]?j$(r[0][0],r[0][1]):function(t){return t===e||P$(t,e,r)}}var V$,X$=t(()=>{B$(),q$(),H$(),Ae(W$,"baseMatches"),V$=W$});function K$(t,e){return null!=t&&e in Object(t)}var Z$,Q$=t(()=>{Ae(K$,"baseHasIn"),Z$=K$});function J$(t,e,r){for(var n=-1,i=(e=oP(e,t)).length,a=!1;++n{sP(),Qk(),Jk(),rT(),r7(),hP(),Ae(J$,"hasPath"),tz=J$});function rz(t,e){return null!=t&&tz(t,e,Z$)}var nz,iz=t(()=>{Q$(),ez(),Ae(rz,"hasIn"),nz=rz});function az(r,n){return HO(r)&&$$(n)?j$(cP(r),n):function(t){var e=fP(t,r);return void 0===e&&e===n?nz(t,r):R$(n,e,3)}}var oz,sz=t(()=>{D$(),mP(),iz(),WO(),z$(),H$(),hP(),Ae(az,"baseMatchesProperty"),oz=az});function lz(e){return function(t){return t?.[e]}}var cz,hz=t(()=>{Ae(lz,"baseProperty"),cz=lz});function uz(e){return function(t){return dP(t,e)}}var dz,pz=t(()=>{pP(),Ae(uz,"basePropertyDeep"),dz=uz});function gz(t){return HO(t)?cz(cP(t)):dz(t)}var fz,mz=t(()=>{hz(),pz(),WO(),hP(),Ae(gz,"property"),fz=gz});function yz(t){return"function"==typeof t?t:null==t?LT:"object"==typeof t?Kk(t)?oz(t[0],t[1]):V$(t):fz(t)}var vz,xz=t(()=>{X$(),sz(),NT(),Jk(),mz(),Ae(yz,"baseIteratee"),vz=yz});function bz(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i{Ae(bz,"arrayAggregator"),wz=bz});function Tz(t,e){return t&&nk(t,e,BO)}var Ez,_z=t(()=>{ak(),GO(),Ae(Tz,"baseForOwn"),Ez=Tz});function Cz(a,o){return function(t,e){if(null!=t){if(!i7(t))return a(t,e);for(var r=t.length,n=o?r:-1,i=Object(t);(o?n--:++n{a7(),Ae(Cz,"createBaseEach"),Sz=Cz}),Iz=t(()=>{_z(),Nz(),Az=Sz(Ez),Lz=Az});function Mz(t,n,i,a){return Lz(t,function(t,e,r){n(a,t,i(t),r)}),a}var Rz,Dz=t(()=>{Iz(),Ae(Mz,"baseAggregator"),Rz=Mz});function Oz(i,a){return function(t,e){var r=Kk(t)?wz:Rz,n=a?a():{};return r(t,i,vz(e,2),n)}}var Pz,Bz,Fz,$z,zz,Gz,Uz,qz=t(()=>{kz(),Dz(),xz(),Jk(),Ae(Oz,"createAggregator"),Pz=Oz}),Yz=t(()=>{n5(),Bz=Ae(function(){return Y3.Date.now()},"now"),Fz=Bz}),jz=t(()=>{QT(),L6(),e8(),vT(),$z=Object.prototype,zz=$z.hasOwnProperty,Gz=ZT(function(t,e){t=Object(t);var r=-1,n=e.length,i=2{Ae(Hz,"arrayIncludesWith"),Wz=Hz});function Xz(t,e,r,n){var i=-1,a=CO,o=!0,s=t.length,l=[],c=e.length;if(s){r&&(e=AD(e,L7(r))),n?(a=Wz,o=!1):200<=e.length&&(a=n$,o=!1,e=new ZF(e));t:for(;++i{QF(),LO(),Vz(),LD(),P7(),i$(),Ae(Xz,"baseDifference"),Kz=Xz}),tG=t(()=>{Jz(),CP(),QT(),l7(),Zz=ZT(function(t,e){return s7(t)?Kz(t,_P(e,1,s7,!0)):[]}),Qz=Zz});function eG(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var rG,nG=t(()=>{Ae(eG,"last"),rG=eG});function iG(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:rO(e),DP(t,e<0?0:e,n)):[]}var aG,oG=t(()=>{OP(),aO(),Ae(iG,"drop"),aG=iG});function sG(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:rO(e),DP(t,0,(e=n-e)<0?0:e)):[]}var lG,cG=t(()=>{OP(),aO(),Ae(sG,"dropRight"),lG=sG});function hG(t){return"function"==typeof t?t:LT}var uG,dG=t(()=>{NT(),Ae(hG,"castFunction"),uG=hG});function pG(t,e){return(Kk(t)?uO:Lz)(t,uG(e))}var v,gG=t(()=>{dO(),Iz(),dG(),Jk(),Ae(pG,"forEach"),v=pG}),fG=t(()=>{gG()});function mG(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(mG,"arrayEvery"),yG=mG});function xG(t,n){var i=!0;return Lz(t,function(t,e,r){return i=!!n(t,e,r)}),i}var bG,wG=t(()=>{Iz(),Ae(xG,"baseEvery"),bG=xG});function kG(t,e,r){var n=Kk(t)?yG:bG;return r&&t8(t,e,r)&&(e=void 0),n(t,vz(e,3))}var TG,EG=t(()=>{vG(),wG(),xz(),Jk(),e8(),Ae(kG,"every"),TG=kG});function _G(t,n){var i=[];return Lz(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var CG,SG=t(()=>{Iz(),Ae(_G,"baseFilter"),CG=_G});function AG(t,e){return(Kk(t)?KP:CG)(t,vz(e,3))}var LG,NG=t(()=>{ZP(),SG(),xz(),Jk(),Ae(AG,"filter"),LG=AG});function IG(a){return function(t,e,r){var n,i=Object(t);return i7(t)||(n=vz(e,3),t=BO(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 MG,RG=t(()=>{xz(),a7(),GO(),Ae(IG,"createFind"),MG=IG});function DG(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:rO(r))<0&&(r=OG(n+r,0)),gO(t,vz(e,3),r)):-1}var OG,PG,BG,FG,$G=t(()=>{fO(),xz(),aO(),OG=Math.max,Ae(DG,"findIndex"),PG=DG}),zG=t(()=>{RG(),$G(),BG=MG(PG),FG=BG});function GG(t){return t&&t.length?t[0]:void 0}var UG,qG=t(()=>{Ae(GG,"head"),UG=GG}),YG=t(()=>{qG()});function jG(t,n){var i=-1,a=i7(t)?Array(t.length):[];return Lz(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var HG,WG=t(()=>{Iz(),a7(),Ae(jG,"baseMap"),HG=jG});function VG(t,e){return(Kk(t)?AD:HG)(t,vz(e,3))}var x,XG=t(()=>{LD(),xz(),WG(),Jk(),Ae(VG,"map"),x=VG});function KG(t,e){return _P(x(t,e),1)}var ZG,QG=t(()=>{CP(),XG(),Ae(KG,"flatMap"),ZG=KG});function JG(t,e){return null==t?t:nk(t,uG(e),yT)}var tU,eU=t(()=>{ak(),dG(),vT(),Ae(JG,"forIn"),tU=JG});function rU(t,e){return t&&Ez(t,uG(e))}var nU,iU,aU,oU,sU=t(()=>{_z(),dG(),Ae(rU,"forOwn"),nU=rU}),lU=t(()=>{Kw(),qz(),aU=Object.prototype,iU=aU.hasOwnProperty,aU=Pz(function(t,e,r){iU.call(t,r)?t[r].push(e):Xw(t,r,[e])}),oU=aU});function cU(t,e){return e{Ae(cU,"baseGt"),hU=cU});function dU(t,e){return null!=t&&gU.call(t,e)}var pU,gU,fU,mU=t(()=>{pU=Object.prototype,gU=pU.hasOwnProperty,Ae(dU,"baseHas"),fU=dU});function yU(t,e){return null!=t&&tz(t,e,fU)}var b,vU=t(()=>{mU(),ez(),Ae(yU,"has"),b=yU});function xU(t){return"string"==typeof t||!Kk(t)&&Gk(t)&&"[object String]"==x5(t)}var bU,wU=t(()=>{b5(),Jk(),Uk(),Ae(xU,"isString"),bU=xU});function kU(e,t){return AD(t,function(t){return e[t]})}var TU,EU=t(()=>{LD(),Ae(kU,"baseValues"),TU=kU});function _U(t){return null==t?[]:TU(t,BO(t))}var CU,SU=t(()=>{EU(),GO(),Ae(_U,"values"),CU=_U});function AU(t,e,r,n){return t=i7(t)?t:CU(t),r=r&&!n?rO(r):0,n=t.length,r<0&&(r=LU(n+r,0)),bU(t)?r<=n&&-1{EO(),a7(),wU(),aO(),SU(),LU=Math.max,Ae(AU,"includes"),NU=AU});function MU(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:rO(r))<0&&(r=RU(n+r,0)),TO(t,e,r)):-1}var RU,DU,OU=t(()=>{EO(),aO(),RU=Math.max,Ae(MU,"indexOf"),DU=MU});function PU(t){if(null!=t){if(i7(t)&&(Kk(t)||"string"==typeof t||"function"==typeof t.splice||p7(t)||O7(t)||Vk(t)))return!t.length;var e,r=zB(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(Ok(t))return!DO(t).length;for(e in t)if(FU.call(t,e))return!1}return!0}var BU,FU,$U,zU=t(()=>{OO(),jB(),Qk(),Jk(),a7(),f7(),Pk(),F7(),BU=Object.prototype,FU=BU.hasOwnProperty,Ae(PU,"isEmpty"),$U=PU});function GU(t){return Gk(t)&&"[object RegExp]"==x5(t)}var UU,qU,YU,jU=t(()=>{b5(),Uk(),Ae(GU,"baseIsRegExp"),UU=GU}),HU=t(()=>{jU(),P7(),B7(),qU=(qU=R7&&R7.isRegExp)?L7(qU):UU,YU=qU});function WU(t){return void 0===t}var VU,XU=t(()=>{Ae(WU,"isUndefined"),VU=WU});function KU(t,e){return t{Ae(KU,"baseLt"),ZU=KU});function JU(t,n){var i={};return n=vz(n,3),Ez(t,function(t,e,r){Xw(i,e,n(t,e,r))}),i}var tq,eq=t(()=>{Kw(),_z(),xz(),Ae(JU,"mapValues"),tq=JU});function rq(t,e,r){for(var n=-1,i=t.length;++n{CD(),Ae(rq,"baseExtremum"),nq=rq});function aq(t){return t&&t.length?nq(t,LT,hU):void 0}var oq,sq=t(()=>{iq(),uU(),NT(),Ae(aq,"max"),oq=aq});function lq(t){return t&&t.length?nq(t,LT,ZU):void 0}var cq,hq=t(()=>{iq(),QU(),NT(),Ae(lq,"min"),cq=lq});function uq(t,e){return t&&t.length?nq(t,vz(e,2),ZU):void 0}var dq,pq=t(()=>{iq(),xz(),QU(),Ae(uq,"minBy"),dq=uq});function gq(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 fq,mq=t(()=>{Ae(gq,"negate"),fq=gq});function yq(t,e,r,n){if(k5(t))for(var i=-1,a=(e=oP(e,t)).length,o=a-1,s=t;null!=s&&++i{H7(),sP(),rT(),T5(),hP(),Ae(yq,"baseSet"),vq=yq});function bq(t,e,r){for(var n=-1,i=e.length,a={};++n{pP(),xq(),sP(),Ae(bq,"basePickBy"),wq=bq});function Tq(t,r){var e;return null==t?{}:(e=AD(kB(t),function(t){return[t]}),r=vz(r),wq(t,e,function(t,e){return r(t,e[0])}))}var Eq,_q=t(()=>{LD(),xz(),kq(),GB(),Ae(Tq,"pickBy"),Eq=Tq});function Cq(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Sq,Aq=t(()=>{Ae(Cq,"baseSortBy"),Sq=Cq});function Lq(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=_D(t),o=void 0!==e,s=null===e,l=e==e,c=_D(e);if(!s&&!c&&!a&&e{CD(),Ae(Lq,"compareAscending"),Nq=Lq});function Mq(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,s=r.length;++n{Iq(),Ae(Mq,"compareMultiple"),Rq=Mq});function Oq(t,n,r){n=n.length?AD(n,function(e){return Kk(e)?function(t){return dP(t,1===e.length?e[0]:e)}:e}):[LT];var i=-1,t=(n=AD(n,L7(vz)),HG(t,function(e,t,r){return{criteria:AD(n,function(t){return t(e)}),index:++i,value:e}}));return Sq(t,function(t,e){return Rq(t,e,r)})}var Pq,Bq,Fq,$q=t(()=>{LD(),pP(),xz(),WG(),Aq(),P7(),Dq(),NT(),Jk(),Ae(Oq,"baseOrderBy"),Pq=Oq}),zq=t(()=>{hz(),Bq=cz("length"),Fq=Bq});function Gq(t){for(var e=Xq.lastIndex=0;Xq.test(t);)++e;return e}var Uq,qq,Yq,jq,Hq,Wq,Vq,Xq,Kq,Zq=t(()=>{Uq="["+(jq="\\ud800-\\udfff")+"]",qq="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Yq="\\ud83c[\\udffb-\\udfff]",Vq="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Wq="[\\ufe0e\\ufe0f]?",Hq="(?:\\u200d(?:"+[jq="[^"+jq+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+Wq+Vq+")*",Wq=Wq+Vq+Hq,Vq="(?:"+[jq+qq+"?",qq,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",Uq].join("|")+")",Xq=RegExp(Yq+"(?="+Yq+")|"+Vq+Wq,"g"),Ae(Gq,"unicodeSize"),Kq=Gq});function Qq(t){return(FP(t)?Kq:Fq)(t)}var Jq,tY=t(()=>{zq(),$P(),Zq(),Ae(Qq,"stringSize"),Jq=Qq});function eY(r,t){return wq(r,t,function(t,e){return nz(r,e)})}var rY,nY,iY,aY=t(()=>{kq(),iz(),Ae(eY,"basePick"),rY=eY}),oY=t(()=>{aY(),MP(),nY=IP(function(t,e){return null==t?{}:rY(t,e)}),iY=nY});function sY(t,e,r,n){for(var i=-1,a=cY(lY((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}var lY,cY,hY,uY=t(()=>{lY=Math.ceil,cY=Math.max,Ae(sY,"baseRange"),hY=sY});function dY(n){return function(t,e,r){return r&&"number"!=typeof r&&t8(t,e,r)&&(e=r=void 0),t=JD(t),void 0===e?(e=t,t=0):e=JD(e),r=void 0===r?t{uY(),e8(),tO(),Ae(dY,"createRange"),pY=dY}),yY=t(()=>{mY(),gY=pY(),fY=gY});function vY(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var xY,bY=t(()=>{Ae(vY,"baseReduce"),xY=vY});function wY(t,e,r){var n=Kk(t)?GP:xY,i=arguments.length<3;return n(t,vz(e,4),r,i,Lz)}var kY,TY=t(()=>{UP(),Iz(),xz(),bY(),Jk(),Ae(wY,"reduce"),kY=wY});function EY(t,e){return(Kk(t)?KP:CG)(t,fq(vz(e,3)))}var _Y,CY=t(()=>{ZP(),SG(),xz(),Jk(),mq(),Ae(EY,"reject"),_Y=EY});function SY(t){var e;return null==t?0:i7(t)?bU(t)?Jq(t):t.length:"[object Map]"==(e=zB(t))||"[object Set]"==e?t.size:DO(t).length}var AY,LY=t(()=>{OO(),jB(),a7(),wU(),tY(),Ae(SY,"size"),AY=SY});function NY(t,n){var i;return Lz(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var IY,MY=t(()=>{Iz(),Ae(NY,"baseSome"),IY=NY});function RY(t,e,r){var n=Kk(t)?t$:IY;return r&&t8(t,e,r)&&(e=void 0),n(t,vz(e,3))}var DY,OY,PY,BY,FY,$Y=t(()=>{e$(),xz(),MY(),Jk(),e8(),Ae(RY,"some"),DY=RY}),zY=t(()=>{CP(),$q(),QT(),e8(),OY=ZT(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&t8(t,e[0],e[1])?e=[]:2{YB(),cO(),p$(),BY=AB&&1/d$(new AB([,-0]))[1]==1/0?function(t){return new AB(t)}:lO,FY=BY});function UY(t,e,r){var n=-1,i=CO,a=t.length,o=!0,s=[],l=s;if(r)o=!1,i=Wz;else if(200<=a){var c=e?null:FY(t);if(c)return d$(c);o=!1,i=n$,l=new ZF}else l=e?[]:s;t:for(;++n{QF(),LO(),Vz(),i$(),GY(),p$(),Ae(UY,"baseUniq"),qY=UY}),WY=t(()=>{CP(),QT(),HY(),l7(),YY=ZT(function(t){return qY(_P(t,1,s7,!0))}),jY=YY});function VY(t){return t&&t.length?qY(t):[]}var XY,KY=t(()=>{HY(),Ae(VY,"uniq"),XY=VY});function ZY(t,e){return t&&t.length?qY(t,vz(e,2)):[]}var QY,JY=t(()=>{xz(),HY(),Ae(ZY,"uniqBy"),QY=ZY});function tj(t){var e=++ej;return nP(t)+e}var ej,rj,nj=t(()=>{iP(),ej=0,Ae(tj,"uniqueId"),rj=tj});function ij(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n{Ae(ij,"baseZipObject"),aj=ij});function sj(t,e){return aj(t||[],e||[],j7)}var lj,cj=t(()=>{H7(),oj(),Ae(sj,"zipObject"),lj=sj}),hj=t(()=>{UO(),BF(),zF(),qF(),GT(),jz(),tG(),oG(),cG(),fG(),EG(),NG(),zG(),YG(),QG(),LP(),gG(),eU(),sU(),lU(),vU(),NT(),IU(),OU(),Jk(),zU(),A5(),T5(),HU(),wU(),XU(),GO(),nG(),XG(),eq(),sq(),s8(),hq(),pq(),cO(),Yz(),oY(),_q(),yY(),TY(),CY(),LY(),$Y(),zY(),WY(),KY(),nj(),SU(),cj()});function uj(t,e){t[e]?t[e]++:t[e]=1}function dj(t,e){--t[e]||delete t[e]}function pj(t,e,r,n){return e=""+e,r=""+r,!t&&r{hj(),mj="\0",(yj=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=$T(void 0),this._defaultEdgeLabelFn=$T(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[mj]={}),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 _5(t)||(t=$T(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return BO(this._nodes)}sources(){var e=this;return LG(this.nodes(),function(t){return $U(e._in[t])})}sinks(){var e=this;return LG(this.nodes(),function(t){return $U(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1{vj()});function bj(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function wj(t,e){if("_next"!==t&&"_prev"!==t)return e}var kj,Tj=t(()=>{kj=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 bj(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&bj(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,wj)),r=r._prev;return"["+t.join(", ")+"]"}},Ae(bj,"unlink"),Ae(wj,"filterOutLinks")});function Ej(e,t){return e.nodeCount()<=1?[]:(t=_j((t=Sj(e,t||Lj)).graph,t.buckets,t.zeroIdx),AP(x(t,function(t){return e.outEdges(t.v,t.w)})))}function _j(t,e,r){for(var n,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;n=o.dequeue();)Cj(t,e,r,n);for(;n=a.dequeue();)Cj(t,e,r,n);if(t.nodeCount())for(var s=e.length-2;0{hj(),xj(),Tj(),Lj=$T(1),Ae(Ej,"greedyFAS"),Ae(_j,"doGreedyFAS"),Ae(Cj,"removeNode"),Ae(Sj,"buildState"),Ae(Aj,"assignBucket")});function Ij(r){var t="greedy"===r.graph().acyclicer?Ej(r,e(r)):Mj(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,rj("rev"))}),Ae(e,"weightFn")}function Mj(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 Rj(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 Dj=t(()=>{hj(),Nj(),Ae(Ij,"run"),Ae(Mj,"dfsFAS"),Ae(Rj,"undo")});function Oj(t,e,r,n){for(var i;i=rj(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function Pj(n){var i=(new yj).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 Bj(e){var r=new yj({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 Fj(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 $j(n){var i=x(fY(qj(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;VU(r)||(i[r][e.order]=t)}),i}function zj(e){var r=cq(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 Gj(r){var n=cq(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){VU(t)&&e%o!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function Uj(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),Oj(t,"border",i,e)}function qj(e){return oq(x(e.nodes(),function(t){if(t=e.node(t).rank,!VU(t))return t}))}function Yj(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function jj(t,e){var r=Fz();try{return e()}finally{console.log(t+" time: "+(Fz()-r)+"ms")}}function Hj(t,e){return e()}var Wj=t(()=>{hj(),xj(),Ae(Oj,"addDummyNode"),Ae(Pj,"simplify"),Ae(Bj,"asNonCompoundGraph"),Ae(Fj,"intersectRect"),Ae($j,"buildLayerMatrix"),Ae(zj,"normalizeRanks"),Ae(Gj,"removeEmptyRanks"),Ae(Uj,"addBorderNode"),Ae(qj,"maxRank"),Ae(Yj,"partition"),Ae(jj,"time"),Ae(Hj,"notime")});function Vj(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{hj(),Wj(),Ae(Vj,"addBorderSegments"),Ae(Xj,"addBorderNode")});function Zj(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Jj(t)}function Qj(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||eH(t),"lr"!==e&&"rl"!==e||(nH(t),Jj(t))}function Jj(e){v(e.nodes(),function(t){tH(e.node(t))}),v(e.edges(),function(t){tH(e.edge(t))})}function tH(t){var e=t.width;t.width=t.height,t.height=e}function eH(e){v(e.nodes(),function(t){rH(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,rH),b(t,"y")&&rH(t)})}function rH(t){t.y=-t.y}function nH(e){v(e.nodes(),function(t){iH(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,iH),b(t,"x")&&iH(t)})}function iH(t){var e=t.x;t.x=t.y,t.y=e}var aH=t(()=>{hj(),Ae(Zj,"adjust"),Ae(Qj,"undo"),Ae(Jj,"swapWidthHeight"),Ae(tH,"swapWidthHeightOne"),Ae(eH,"reverseY"),Ae(rH,"reverseYOne"),Ae(nH,"swapXY"),Ae(iH,"swapXYOne")});function oH(e){e.graph().dummyChains=[],v(e.edges(),function(t){sH(e,t)})}function sH(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{hj(),Wj(),Ae(oH,"run"),Ae(sH,"normalizeEdge"),Ae(lH,"undo")});function hH(r){var n={};function i(t){var e=r.node(t);return b(n,t)?e.rank:(n[t]=!0,(t=cq(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 uH(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var dH=t(()=>{hj(),Ae(hH,"longestPath"),Ae(uH,"slack")});function pH(t){var e,r=new yj({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});gH(r,t){hj(),xj(),dH(),Ae(pH,"feasibleTree"),Ae(gH,"tightTree"),Ae(fH,"findMinSlackEdge"),Ae(mH,"shiftRanks")}),vH=t(()=>{}),xH=t(()=>{}),bH=t(()=>{hj(),xH(),$T(1)}),wH=t(()=>{bH()}),kH=t(()=>{}),TH=t(()=>{kH()}),EH=t(()=>{hj(),$T(1)});function _H(e){var r={},n={},i=[];function a(t){if(b(n,t))throw new CH;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),AY(r)!==e.nodeCount())throw new CH;return i}function CH(){}var SH=t(()=>{hj(),_H.CycleException=CH,Ae(_H,"topsort"),Ae(CH,"CycleException"),CH.prototype=new Error}),AH=t(()=>{SH()});function LH(e,t,r){Kk(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);NH(e,t,"post"===r,a,n,i)}),i}function NH(e,t,r,n,i,a){b(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){NH(e,t,r,n,i,a)}),r&&a.push(t))}var IH=t(()=>{hj(),Ae(LH,"dfs"),Ae(NH,"doDfs")});function MH(t,e){return LH(t,e,"post")}var RH=t(()=>{IH(),Ae(MH,"postorder")});function DH(t,e){return LH(t,e,"pre")}var OH=t(()=>{IH(),Ae(DH,"preorder")}),PH=t(()=>{xH(),vj()}),BH=t(()=>{vH(),bH(),wH(),TH(),EH(),AH(),RH(),OH(),PH(),kH(),SH()});function FH(t){hH(t=Pj(t));var e,r=pH(t);for(UH(r),$H(r,t);e=YH(r);)HH(r,t,e,jH(r,t,e))}function $H(e,r){var t=(t=MH(e,e.nodes())).slice(0,t.length-1);v(t,function(t){zH(e,r,t)})}function zH(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=GH(t,e,r)}function GH(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,VH(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function UH(t,e){arguments.length<2&&(e=t.nodes()[0]),qH(t,{},1,e)}function qH(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=qH(e,r,n,t,i))}),o.low=a,o.lim=n++,t?o.parent=t:delete o.parent,n}function YH(e){return FG(e.edges(),function(t){return e.edge(t).cutvalue<0})}function jH(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),LG(r.edges(),function(t){return o===XH(0,e.node(t.v),a)&&o!==XH(0,e.node(t.w),a)}));return dq(i,function(t){return uH(r,t)})}function HH(t,e,r,n){var i=r.v;t.removeEdge(i,r.w),t.setEdge(n.v,n.w,{}),UH(t),$H(t,e),WH(t,e)}function WH(i,a){var t=FG(i.nodes(),function(t){return!a.node(t).parent}),t=(t=DH(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 VH(t,e,r){return t.hasEdge(e,r)}function XH(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var KH=t(()=>{hj(),BH(),Wj(),yH(),dH(),FH.initLowLimValues=UH,FH.initCutValues=$H,FH.calcCutValue=GH,FH.leaveEdge=YH,FH.enterEdge=jH,FH.exchangeEdges=HH,Ae(FH,"networkSimplex"),Ae($H,"initCutValues"),Ae(zH,"assignCutValue"),Ae(GH,"calcCutValue"),Ae(UH,"initLowLimValues"),Ae(qH,"dfsAssignLowLim"),Ae(YH,"leaveEdge"),Ae(jH,"enterEdge"),Ae(HH,"exchangeEdges"),Ae(WH,"updateRanks"),Ae(VH,"isTreeEdge"),Ae(XH,"isDescendant")});function ZH(t){switch(t.graph().ranker){case"network-simplex":JH(t);break;case"tight-tree":QH(t);break;case"longest-path":tW(t);break;default:JH(t)}}function QH(t){hH(t),pH(t)}function JH(t){FH(t)}var tW,eW=t(()=>{yH(),KH(),dH(),Ae(ZH,"rank"),tW=hH,Ae(QH,"tightTreeRanker"),Ae(JH,"networkSimplexRanker")});function rW(e){var r=Oj(e,"root",{},"_root"),n=iW(e),i=oq(CU(n))-1,a=2*i+1,o=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),aW(e)+1);v(e.children(),function(t){nW(e,r,a,o,i,n,t)}),e.graph().nodeRankFactor=a}function nW(i,a,o,s,l,c,h){var u,d,t,e=i.children(h);e.length?(u=Uj(i,"_bt"),d=Uj(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){nW(i,a,o,s,l,c,t);var e=i.node(t),r=e.borderTop||t,n=r!==(t=e.borderBottom||t)?1:l-c[h]+1;i.setEdge(u,r,{weight:e=e.borderTop?s:2*s,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:e,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 iW(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 aW(r){return kY(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function oW(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 sW=t(()=>{hj(),Wj(),Ae(rW,"run"),Ae(nW,"dfs"),Ae(iW,"treeDepths"),Ae(aW,"sumWeights"),Ae(oW,"cleanup")});function lW(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 cW=t(()=>{hj(),Ae(lW,"addSubgraphConstraints")});function hW(i,r,a){var o=uW(i),s=new yj({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=VU(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 uW(t){for(var e;t.hasNode(e=rj("_root")););return e}var dW=t(()=>{hj(),xj(),Ae(hW,"buildLayerGraph"),Ae(uW,"createRootNode")});function pW(t,e){for(var r=0,n=1;n>1]+=t.weight;s+=t.weight*r})),s}var fW=t(()=>{hj(),Ae(pW,"crossCount"),Ae(gW,"twoLayerCrossCount")});function mW(r){var n={},t=LG(r.nodes(),function(t){return!r.children(t).length}),e=oq(x(t,function(t){return r.node(t).rank})),i=x(fY(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=PY(t,function(t){return r.node(t).rank}),v(e,a),i}var yW=t(()=>{hj(),Ae(mW,"initOrder")});function vW(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=kY(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 xW=t(()=>{hj(),Ae(vW,"barycenter")});function bW(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},VU(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];VU(e)||VU(r)||(r.indegree++,e.out.push(n[t.w]))}),wW(LG(n,function(t){return!t.indegree}))}function wW(r){var t=[];function e(e){return function(t){t.merged||(VU(t.barycenter)||VU(e.barycenter)||t.barycenter>=e.barycenter)&&kW(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(LG(t,function(t){return!t.merged}),function(t){return iY(t,["vs","i","barycenter","weight"])})}function kW(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 TW=t(()=>{hj(),Ae(bW,"resolveConflicts"),Ae(wW,"doResolveConflicts"),Ae(kW,"mergeEntries")});function EW(t,e){var r=(t=Yj(t,function(t){return b(t,"barycenter")})).lhs,n=PY(t.rhs,function(t){return-t.i}),i=[],a=0,o=0,s=0,t=(r.sort(CW(!!e)),s=_W(i,n,s),v(r,function(t){s+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,o+=t.weight,s=_W(i,n,s)}),{vs:AP(i)});return o&&(t.barycenter=a/o,t.weight=o),t}function _W(t,e,r){for(var n;e.length&&(n=rG(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function CW(r){return function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i}}var SW=t(()=>{hj(),Wj(),Ae(EW,"sort"),Ae(_W,"consumeUnsortable"),Ae(CW,"compareWithBias")});function AW(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=LG(a,function(t){return t!==o&&t!==s})),vW(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=AW(r,t.v,n,i),b(l[t.v]=e,"barycenter"))&&NW(t,e)}),LW(a=bW(t,n),l),t=EW(a,i),o&&(t.vs=AP([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 LW(t,e){v(t,function(t){t.vs=AP(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function NW(t,e){VU(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 IW=t(()=>{hj(),xW(),TW(),SW(),Ae(AW,"sortSubgraph"),Ae(LW,"expandSubgraphs"),Ae(NW,"mergeBarycenters")});function MW(t){var e=qj(t),r=RW(t,fY(1,e+1),"inEdges"),n=RW(t,fY(e-1,-1,-1),"outEdges");OW(t,mW(t));for(var i,a=Number.POSITIVE_INFINITY,o=0,s=0;s<4;++o,++s){DW(o%2?r:n,2<=o%4);var l,c=pW(t,l=$j(t));c{hj(),xj(),Wj(),cW(),dW(),fW(),yW(),IW(),Ae(MW,"order"),Ae(RW,"buildLayerGraphs"),Ae(DW,"sweepLayerGraphs"),Ae(OW,"assignOrder")});function BW(c){var h=$W(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=FW(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).maxRanks||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 $W(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 zW=t(()=>{hj(),Ae(BW,"parentDummyChains"),Ae(FW,"findPath"),Ae($W,"postorder")});function GW(c,t){var h={};function e(t,n){var a=0,o=0,s=t.length,l=rG(n);return v(n,function(t,e){var r=qW(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;!(ri)&&YW(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"),kY(t,e),o}function qW(e,t){if(e.node(t).dummy)return FG(e.predecessors(t),function(t){return e.node(t).dummy})}function YW(t,e,r){r{hj(),xj(),Wj(),Ae(GW,"findType1Conflicts"),Ae(UW,"findType2Conflicts"),Ae(qW,"findOtherInnerSegmentNode"),Ae(YW,"addConflict"),Ae(jW,"hasConflict"),Ae(HW,"verticalAlignment"),Ae(WW,"horizontalCompaction"),Ae(VW,"buildBlockGraph"),Ae(XW,"findSmallestWidthAlignment"),Ae(KW,"alignCoordinates"),Ae(ZW,"balance"),Ae(QW,"positionX"),Ae(JW,"sep"),Ae(tV,"width")});function rV(r){nV(r=Bj(r)),nU(QW(r),function(t,e){r.node(e).x=t})}function nV(r){var t=$j(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=oq(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var iV=t(()=>{hj(),Wj(),eV(),Ae(rV,"position"),Ae(nV,"positionY")});function aV(e,t){var r=t&&t.debugTiming?jj:Hj;r("layout",function(){var t=r(" buildLayoutGraph",function(){return lV(e)});r(" runLayout",function(){oV(t,r)}),r(" updateInputGraph",function(){sV(e,t)})})}function oV(t,e){e(" makeSpaceForEdgeLabels",function(){cV(t)}),e(" removeSelfEdges",function(){vV(t)}),e(" acyclic",function(){Ij(t)}),e(" nestingGraph.run",function(){rW(t)}),e(" rank",function(){ZH(Bj(t))}),e(" injectEdgeLabelProxies",function(){hV(t)}),e(" removeEmptyRanks",function(){Gj(t)}),e(" nestingGraph.cleanup",function(){oW(t)}),e(" normalizeRanks",function(){zj(t)}),e(" assignRankMinMax",function(){uV(t)}),e(" removeEdgeLabelProxies",function(){dV(t)}),e(" normalize.run",function(){oH(t)}),e(" parentDummyChains",function(){BW(t)}),e(" addBorderSegments",function(){Vj(t)}),e(" order",function(){MW(t)}),e(" insertSelfEdges",function(){xV(t)}),e(" adjustCoordinateSystem",function(){Zj(t)}),e(" position",function(){rV(t)}),e(" positionSelfEdges",function(){bV(t)}),e(" removeBorderNodes",function(){yV(t)}),e(" normalize.undo",function(){lH(t)}),e(" fixupEdgeLabelCoords",function(){fV(t)}),e(" undoCoordinateSystem",function(){Qj(t)}),e(" translateGraph",function(){pV(t)}),e(" assignNodeIntersects",function(){gV(t)}),e(" reversePoints",function(){mV(t)}),e(" acyclic.undo",function(){Rj(t)})}function sV(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 lV(r){var n=new yj({multigraph:!0,compound:!0}),t=kV(r.graph());return n.setGraph(a8({},EV,wV(t,TV),iY(t,_V))),v(r.nodes(),function(t){var e=kV(r.node(t));n.setNode(t,Uz(wV(e,CV),SV)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=kV(r.edge(t));n.setEdge(t,a8({},LV,wV(e,AV),iY(e,NV)))}),n}function cV(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 hV(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},Oj(r,"edge-proxy",e,"_ep"))})}function uV(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=oq(r,t.maxRank))}),e.graph().maxRank=r}function dV(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 pV(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 gV(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(Fj(n,e)),r.points.push(Fj(t,i))})}function fV(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 mV(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function yV(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(rG(t.borderLeft)),i=a.node(rG(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 vV(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 xV(i){var t=$j(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){Oj(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 bV(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 wV(t,e){return tq(iY(t,e),Number)}function kV(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var TV,EV,_V,CV,SV,AV,LV,NV,IV=t(()=>{hj(),xj(),Kj(),aH(),Dj(),cH(),eW(),sW(),PW(),zW(),iV(),Wj(),Ae(aV,"layout"),Ae(oV,"runLayout"),Ae(sV,"updateInputGraph"),TV=["nodesep","edgesep","ranksep","marginx","marginy"],EV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_V=["acyclicer","ranker","rankdir","align"],CV=["width","height"],SV={width:0,height:0},AV=["minlen","weight","width","height","labeloffset"],LV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},NV=["labelpos"],Ae(lV,"buildLayoutGraph"),Ae(cV,"makeSpaceForEdgeLabels"),Ae(hV,"injectEdgeLabelProxies"),Ae(uV,"assignRankMinMax"),Ae(dV,"removeEdgeLabelProxies"),Ae(pV,"translateGraph"),Ae(gV,"assignNodeIntersects"),Ae(fV,"fixupEdgeLabelCoords"),Ae(mV,"reversePointsForReversedEdges"),Ae(yV,"removeBorderNodes"),Ae(vV,"removeSelfEdges"),Ae(xV,"insertSelfEdges"),Ae(bV,"positionSelfEdges"),Ae(wV,"selectNumberAttrs"),Ae(kV,"canonicalize")}),MV=t(()=>{Dj(),IV(),cH(),eW()});function RV(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:DV(t),edges:OV(t)};return VU(t.graph())||(e.value=PF(t.graph())),e}function DV(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return VU(e)||(t.value=e),VU(r)||(t.parent=r),t})}function OV(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return VU(t.name)||(r.name=t.name),VU(e)||(r.value=e),r})}var PV,BV,FV,$V,zV,GV,UV,qV,YV,jV,HV,WV,VV,XV,KV,ZV=t(()=>{hj(),vj(),Ae(RV,"write"),Ae(DV,"writeNodes"),Ae(OV,"writeEdges")}),QV=t(()=>{e(),xj(),ZV(),PV=new Map,BV=new Map,FV=new Map,$V=Ae(()=>{BV.clear(),FV.clear(),PV.clear()},"clear"),zV=Ae((t,e)=>{var r=BV.get(e)||[];return R.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),GV=Ae((t,e)=>{var r=BV.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)||zV(t.v,e)||zV(t.w,e)||r.includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),UV=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{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{GV(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"),qV=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)FV.set(i,t),n=[...n,...qV(i,e)];return n},"extractDescendants"),YV=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"),jV=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=jV(n,e,r),s=YV(e,r,o);if(o){if(!(0PV.has(t)&&PV.get(t).externalConnections&&PV.has(t)?PV.get(t).id:t,"getAnchorId"),WV=Ae((a,t)=>{if(!a||10{zV(t.v,e)^zV(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",BV.get(e)),PV.get(e).externalConnections=!0)})):R.debug("Not a cluster ",e,BV)});for(var e of PV.keys()){var r=PV.get(e).id;(r=a.parent(r))!==e&&PV.has(r)&&!PV.get(r).externalConnections&&(PV.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,R.warn("Fix XXX",PV,"ids:",t.v,t.w,"Translating: ",PV.get(t.v)," --- ",PV.get(t.w)),(PV.get(t.v)||PV.get(t.w))&&(R.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=HV(t.v),r=HV(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(n=a.parent(e),PV.get(n).externalConnections=!0,i.fromCluster=t.v),r!==t.w&&(n=a.parent(r),PV.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",RV(a)),VV(a,0),R.trace(PV)}},"adjustClustersAndEdges"),VV=Ae((r,n)=>{if(R.warn("extractor - ",n,RV(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=XV(e,t),r=[...r,...t]}),r},"sorter"),KV=Ae(t=>XV(t,t.children()),"sortNodesByHierarchy")}),JV={};_Bt(JV,{render:()=>eX});var tX,eX,rX,nX,iX,aX,oX,sX,lX,cX,hX,uX,dX,pX,gX,fX,mX,yX=t(()=>{MV(),ZV(),xj(),xI(),CI(),QV(),kD(),PN(),vI(),e(),zA(),fh(),tX=Ae(async(t,i,a,o,s,l)=>{R.warn("Graph in recursive render:XAX",RV(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[`M${t},`+e,`M${t+r},`+e,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),Y9=Ae((t,e,r,n,i,a)=>[`M${t+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),Ae(G9,"tiltedCylinder")});async function W9(t,i){var{labelStyles:e,nodeStyles:r}=fC(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await YE(t,i,VE(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=CS.svg(a),e=mC(i,{}),r=GE(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=RS(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,WE(i,c),i.intersect=function(t){return S.polygon(i,l,t)},a}var V9=t(()=>{i(),xC(),bC(),SS(),DS(),Ae(W9,"trapezoid")});async function X9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await YE(t,e,VE(e))),i=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,s=CS.svg(r),o=mC(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-t/2},{x:i/2*.8,y:-t/2},{x:i/2,y:-t/2*.6},{x:i/2,y:t/2},{x:-i/2,y:t/2},{x:-i/2,y:-t/2*.6}],c=GE(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),WE(e,u),e.intersect=function(t){return S.polygon(e,l,t)},r}var K9=t(()=>{i(),xC(),bC(),SS(),Ae(X9,"trapezoidalPentagon")});async function Z9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await YE(t,e,VE(e)),o=Rl(D().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=e.cssStyles,p=CS.svg(i),g=mC(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),GE(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),e.width=l,e.height=c,WE(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return R.info("Triangle intersect",e,u,t),S.polygon(e,u,t)},i}var Q9=t(()=>{e(),i(),xC(),bC(),SS(),i(),Jl(),fh(),Ae(Z9,"triangle")});async function J9(t,e){var{labelStyles:r,nodeStyles:n}=fC(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await YE(t,e,VE(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/8,l=s+o,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=CS.svg(r),d=mC(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...qE(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=GE(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o-(t.y-(t.top??0))})`),WE(e,m),e.intersect=function(t){return S.polygon(e,p,t)},r}var tL=t(()=>{i(),xC(),SS(),bC(),Ae(J9,"waveEdgedRectangle")});async function eL(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await YE(t,e,VE(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),t=h+2*r,u=e.cssStyles,d=CS.svg(i),p=mC(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...qE(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...qE(c/2,-t/2,-c/2,-t/2,r,-1)],f=GE(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),WE(e,y),e.intersect=function(t){return S.polygon(e,g,t)},i}var rL=t(()=>{i(),xC(),bC(),SS(),Ae(eL,"waveRectangle")});async function nL(t,e){var{labelStyles:r,nodeStyles:n}=fC(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await YE(t,e,VE(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=CS.svg(i),p=mC(e,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5} + M${c-5},${h} L${c+o},${h} + M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),WE(e,y),e.intersect=function(t){return S.polygon(e,g,t)},i}var iL=t(()=>{i(),bC(),SS(),xC(),Ae(nL,"windowPane")});async function aL(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",VE(e)).attr("id",e.domId||e.id),o=null,l=null,c=null,h=null,u=0,d,p=0;var g,f;o=s.insert("g").attr("class","annotation-group text"),0").length,t.innerHTML.includes("")&&(h+=t.innerHTML.split("").length-1),t.getElementsByTagName("img"));if(u){let n=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}Ae(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}else n.includes("font-weight: bolder")&&O(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var oL=t(()=>{Z3(),In(),i(),K8(),fh(),UE(),Jl(),Ae(aL,"textHelper"),Ae(sL,"addText")});async function lL(e,r){let t=D(),s=t.class.padding??12,n=s,o=r.useHtmlLabels??Rl(t.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await aL(e,r,t,o,n)),{labelStyles:a,nodeStyles:h}=fC(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",e=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=e.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!t.class?.hideEmptyMembersBox),d=CS.svg(c),p=mC(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),i.width),f=i.height,m=(0===l.members.length&&0===l.methods.length?f+=n:0v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((t,e,r)=>{let n=(e=O(r[e])).attr("transform"),i=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(i-=4),m);(e.attr("class").includes("label-group")||e.attr("class").includes("annotation-group"))&&(a=-e.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(a=0)})),e.attr("transform",`translate(${a}, ${i})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0t).attr("class","divider").attr("style",e)}if(u||0t).attr("class","divider").attr("style",e)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",e),x.select(":nth-child(2)").attr("style",e),c.selectAll(".divider").select("path").attr("style",e),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",e),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(e))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(e=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",e))),WE(r,x),r.intersect=function(t){return S.rect(r,t)},c}var cL=t(()=>{i(),fh(),Z3(),SS(),bC(),xC(),oL(),Jl(),Ae(lL,"classBox")});async function hL(t,n,{config:e}){var{labelStyles:i,nodeStyles:r}=fC(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await YE(t,n,VE(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&e?.kanban?.ticketBaseUrl&&(c=e?.kanban?.ticketBaseUrl.replace("#TICKET#",n.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:n.useHtmlLabels,labelStyle:n.labelStyle||"",width:n.width,img:n.img,padding:n.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await HE(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await HE(a,"ticket"in n&&n.ticket||"",u);var{label:t,bbox:e}=await HE(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,e.height)/2,f=Math.max(s.height+20,n?.height||0)+g,m=-i/2,y=-f/2;o.attr("transform","translate("+(l-i/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-i/2)+", "+(-g+s.height/2)+")"),t.attr("transform","translate("+(l+i/2-e.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let t=CS.svg(a),e=mC(n,{}),r=x||b?t.path(CA(m,y,i,f,x||0),e):t.rectangle(m,y,i,f,e);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",w||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",i).attr("height",f),(t="priority"in n&&n.priority)&&(e=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),e.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",uL(t)));return WE(n,v),n.height=f,n.intersect=function(t){return S.rect(n,t)},a}var uL,dL=t(()=>{i(),xC(),AA(),bC(),SS(),uL=Ae(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),Ae(hL,"kanbanItem")});function pL(t){return t in mL}var gL,fL,mL,yL=t(()=>{LS(),MS(),PS(),FS(),zS(),qS(),HS(),XS(),QS(),tA(),aA(),oA(),cA(),uA(),pA(),fA(),yA(),bA(),kA(),_A(),SA(),NA(),MA(),DA(),PA(),zA(),GA(),jA(),HA(),ZA(),JA(),e9(),n9(),a9(),l9(),h9(),y9(),x9(),w9(),T9(),E9(),S9(),L9(),I9(),R9(),O9(),B9(),$9(),U9(),H9(),V9(),K9(),Q9(),tL(),rL(),iL(),cL(),dL(),gL=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_9},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:v9},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:C9},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:D9},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:eA},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:$S},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:s9},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:vA},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:qA},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:UA},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:W9},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:OA},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:lA},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:z9},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:OS},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:b9},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:M9},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:N9},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:gA},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:wA},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:YS},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:VS},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ZS},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:YA},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:J9},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:mA},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:G9},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:WA},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:JS},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sA},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Z9},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:nL},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:hA},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:X9},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:dA},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:k9},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:r9},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:t9},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:IS},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:GS},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:F9},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:P9},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:eL},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:c9},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:QA}],fL=Ae(()=>{var t=[...Object.entries({state:A9,choice:BS,note:i9,rectWithTitle:m9,labelRect:$A,iconSquare:IA,iconCircle:EA,icon:TA,iconRounded:LA,imageSquare:RA,anchor:AS,kanbanItem:hL,classBox:lL}),...gL.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),mL=fL(),Ae(pL,"isValidShape")});function vL(t){return"u">16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(s));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 rN(t){for(var e,r="",n=0,i=t.length,a=PI,s=0;s>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[s];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 nN(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function iN(t){if(null!==t)for(var e,r,n,i=[],a=t,s=0,o=a.length;s>10),56320+(t-65536&1023))}function bN(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||YI,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 wN(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=EI(t),new _I(e,t)}function kN(t,e){throw wN(t,e)}function TN(t,e){t.onWarning&&t.onWarning.call(null,wN(t,e))}function _N(t,e,r,n){var i,a,s,o;if(el&&(l=t.lineIndent),uN(u))c++;else{if(t.lineIndente)&&0!==n)kN(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),UN(t,e,KI,!0,i)&&(y?f=t.result:m=t.result),y||(CN(t,d,p,g,f,m,s,o,l),g=f=m=null),AN(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)kN(t,"bad indentation of a mapping entry");else if(t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&kN(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)):kN(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 GN(t){var e,r,n,i,a=t.position,s=!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))&&(AN(t,!0,-1),i=t.input.charCodeAt(t.position),!(0{if(0===a.length)return i.quotingType===yM?'""':"''";if(!i.noCompatMode&&(-1!==fM.indexOf(a)||mM.test(a)))return i.quotingType===yM?'"'+a+'"':"'"+a+"'";var t=i.indent*Math.max(1,s),e=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-t),r=o||-1=i.flowLevel;function n(t){return ZN(i,t)}switch(Ae(n,"testAmbiguity"),sI(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!o,l)){case vM:return a;case xM:return"'"+a.replace(/'/g,"''")+"'";case bM:return"|"+lI(a,i.indent)+cI(XN(a,t));case wM:return">"+lI(a,i.indent)+cI(XN(hI(a,e),t));case kM:return'"'+dI(a)+'"';default:throw new _I("impossible error: invalid scalar style")}})()}function lI(t,e){var e=aI(t)?String(e):"",r=t[t.length-1]===` +`;return e+(!r||t[t.length-2]!==` +`&&t!==` +`?r?"":"-":"+")+` +`}function cI(t){return t[t.length-1]===` +`?t.slice(0,-1):t}function hI(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(` +`))?r:t.length,n.lastIndex=r,uI(t.slice(0,r),e)),a=t[0]===` +`||" "===t[0];o=n.exec(t);){var s=o[1],o=o[2],l=" "===o[0];i+=s+(a||l||""===o?"":` +`)+uI(o,e),a=l}return i}function uI(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o="";n=i.exec(t);)e<(n=n.index)-a&&(o+=` +`+t.slice(a,r=ae&&a tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function vI(t,e,r,n,i,a,s){t.tag=null,t.dump=r,yI(t,r,!1)||yI(t,r,!0);var o,l,c=hM.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0",t.dump=r+" "+t.dump)}return!0}function xI(t,e){var r,n,i=[],a=[];for(bI(t,i,a),r=0,n=a.length;r{for(Ae(vL,"isNothing"),Ae(xL,"isObject"),Ae(bL,"toArray"),Ae(wL,"extend"),Ae(kL,"repeat"),Ae(TL,"isNegativeZero"),TI={isNothing:vL,isObject:xL,toArray:bL,repeat:kL,isNegativeZero:TL,extend:wL},Ae(_L,"formatError"),Ae(EL,"YAMLException$1"),((EL.prototype=Object.create(Error.prototype)).constructor=EL).prototype.toString=Ae(function(t){return this.name+": "+_L(this,t)},"toString"),_I=EL,Ae(CL,"getLine"),Ae(SL,"padStart"),Ae(AL,"makeSnippet"),EI=AL,CI=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],SI=["scalar","sequence","mapping"],Ae(LL,"compileStyleAliases"),Ae(NL,"Type$1"),AI=NL,Ae(IL,"compileList"),Ae(ML,"compileMap"),Ae(RL,"Schema$1"),RL.prototype.extend=Ae(function(t){var e=[],r=[];if(t instanceof AI)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 _I("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 AI))throw new _I("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new _I("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 _I("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 AI))throw new _I("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(RL.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=IL(t,"implicit"),t.compiledExplicit=IL(t,"explicit"),t.compiledTypeMap=ML(t.compiledImplicit,t.compiledExplicit),t},"extend"),II=RL,cM=new AI("tag:yaml.org,2002:str",{kind:"scalar",construct:Ae(function(t){return null!==t?t:""},"construct")}),DI=new AI("tag:yaml.org,2002:seq",{kind:"sequence",construct:Ae(function(t){return null!==t?t:[]},"construct")}),OI=new AI("tag:yaml.org,2002:map",{kind:"mapping",construct:Ae(function(t){return null!==t?t:{}},"construct")}),II=new II({explicit:[cM,DI,OI]}),Ae(DL,"resolveYamlNull"),Ae(OL,"constructYamlNull"),Ae(PL,"isNull"),cM=new AI("tag:yaml.org,2002:null",{kind:"scalar",resolve:DL,construct:OL,predicate:PL,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(BL,"resolveYamlBoolean"),Ae(FL,"constructYamlBoolean"),Ae($L,"isBoolean"),DI=new AI("tag:yaml.org,2002:bool",{kind:"scalar",resolve:BL,construct:FL,predicate:$L,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"}),Ae(zL,"isHexCode"),Ae(UL,"isOctCode"),Ae(GL,"isDecCode"),Ae(qL,"resolveYamlInteger"),Ae(jL,"constructYamlInteger"),Ae(YL,"isInteger"),OI=new AI("tag:yaml.org,2002:int",{kind:"scalar",resolve:qL,construct:jL,predicate:YL,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"]}}),LI=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ae(HL,"resolveYamlFloat"),Ae(WL,"constructYamlFloat"),NI=/^[-+]?[0-9]+e/,Ae(VL,"representYamlFloat"),Ae(XL,"isFloat"),BI=new AI("tag:yaml.org,2002:float",{kind:"scalar",resolve:HL,construct:WL,predicate:XL,represent:VL,defaultStyle:"lowercase"}),II=II.extend({implicit:[cM,DI,OI,BI]}),cM=II,MI=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),RI=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]))?))?$"),Ae(KL,"resolveYamlTimestamp"),Ae(ZL,"constructYamlTimestamp"),Ae(QL,"representYamlTimestamp"),DI=new AI("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:KL,construct:ZL,instanceOf:Date,represent:QL}),Ae(JL,"resolveYamlMerge"),OI=new AI("tag:yaml.org,2002:merge",{kind:"scalar",resolve:JL}),PI=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`,Ae(tN,"resolveYamlBinary"),Ae(eN,"constructYamlBinary"),Ae(rN,"representYamlBinary"),Ae(nN,"isBinary"),BI=new AI("tag:yaml.org,2002:binary",{kind:"scalar",resolve:tN,construct:eN,predicate:nN,represent:rN}),FI=Object.prototype.hasOwnProperty,$I=Object.prototype.toString,Ae(iN,"resolveYamlOmap"),Ae(aN,"constructYamlOmap"),zI=new AI("tag:yaml.org,2002:omap",{kind:"sequence",resolve:iN,construct:aN}),UI=Object.prototype.toString,Ae(sN,"resolveYamlPairs"),Ae(oN,"constructYamlPairs"),GI=new AI("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sN,construct:oN}),qI=Object.prototype.hasOwnProperty,Ae(lN,"resolveYamlSet"),Ae(cN,"constructYamlSet"),jI=new AI("tag:yaml.org,2002:set",{kind:"mapping",resolve:lN,construct:cN}),YI=cM.extend({implicit:[DI,OI],explicit:[BI,zI,GI,jI]}),HI=Object.prototype.hasOwnProperty,KI=4,ZI=WI=1,QI=VI=2,JI=XI=3,tM=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,eM=/[\x85\u2028\u2029]/,rM=/[,\[\]\{\}]/,nM=/^(?:!|!!|![a-z\-]+!)$/i,iM=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,Ae(hN,"_class"),Ae(uN,"is_EOL"),Ae(dN,"is_WHITE_SPACE"),Ae(pN,"is_WS_OR_EOL"),Ae(gN,"is_FLOW_INDICATOR"),Ae(fN,"fromHexCode"),Ae(mN,"escapedHexLen"),Ae(yN,"fromDecimalCode"),Ae(vN,"simpleEscapeSequence"),Ae(xN,"charFromCodepoint"),aM=new Array(256),sM=new Array(256),oM=0;oM<256;oM++)aM[oM]=vN(oM)?1:0,sM[oM]=vN(oM);Ae(bN,"State$1"),Ae(wN,"generateError"),Ae(kN,"throwError"),Ae(TN,"throwWarning"),lM={YAML:Ae(function(t,e,r){var n,i;null!==t.version&&kN(t,"duplication of %YAML directive"),1!==r.length&&kN(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&kN(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&kN(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&TN(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Ae(function(t,e,r){var n;2!==r.length&&kN(t,"TAG directive accepts exactly two arguments"),n=r[1],nM.test(r=r[0])||kN(t,"ill-formed tag handle (first argument) of the TAG directive"),HI.call(t.tagMap,r)&&kN(t,'there is a previously declared suffix for "'+r+'" tag handle'),iM.test(n)||kN(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{kN(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n},"handleTagDirective")},Ae(_N,"captureSegment"),Ae(EN,"mergeMappings"),Ae(CN,"storeMappingPair"),Ae(SN,"readLineBreak"),Ae(AN,"skipSeparationSpace"),Ae(LN,"testDocumentSeparator"),Ae(NN,"writeFoldedLines"),Ae(IN,"readPlainScalar"),Ae(MN,"readSingleQuotedScalar"),Ae(RN,"readDoubleQuotedScalar"),Ae(DN,"readFlowCollection"),Ae(ON,"readBlockScalar"),Ae(PN,"readBlockSequence"),Ae(BN,"readBlockMapping"),Ae(FN,"readTagProperty"),Ae($N,"readAnchorProperty"),Ae(zN,"readAlias"),Ae(UN,"composeNode"),Ae(GN,"readDocument"),Ae(qN,"loadDocuments"),Ae(jN,"loadAll$1"),Ae(YN,"load$1"),cM={loadAll:jN,load:YN},hM=Object.prototype.toString,uM=Object.prototype.hasOwnProperty,dM=65279,pM=10,gM={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"},fM=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mM=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,Ae(HN,"compileStyleMap"),Ae(WN,"encodeHex"),yM=2,Ae(VN,"State"),Ae(XN,"indentString"),Ae(KN,"generateNextLine"),Ae(ZN,"testImplicitResolving"),Ae(QN,"isWhitespace"),Ae(JN,"isPrintable"),Ae(tI,"isNsCharOrWhitespace"),Ae(eI,"isPlainSafe"),Ae(rI,"isPlainSafeFirst"),Ae(nI,"isPlainSafeLast"),Ae(iI,"codePointAt"),Ae(aI,"needIndentIndicator"),vM=1,xM=2,bM=3,wM=4,kM=5,Ae(sI,"chooseScalarStyle"),Ae(oI,"writeScalar"),Ae(lI,"blockHeader"),Ae(cI,"dropEndingNewline"),Ae(hI,"foldString"),Ae(uI,"foldLine"),Ae(dI,"escapeString"),Ae(pI,"writeFlowSequence"),Ae(gI,"writeBlockSequence"),Ae(fI,"writeFlowMapping"),Ae(mI,"writeBlockMapping"),Ae(yI,"detectType"),Ae(vI,"writeNode"),Ae(xI,"getDuplicateReferences"),Ae(bI,"inspectNode"),Ae(wI,"dump$1"),Ae(kI,"renamed"),TM=II,_M=cM.load,kI("safeLoad","load"),kI("safeLoadAll","loadAll"),kI("safeDump","dump")});function CM(t){let e=[];for(var r of t)(r=IM.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}var SM,AM,LM,NM,IM,MM,RM,DM,OM,PM,BM,FM,$M,zM,UM,GM,qM,jM,YM,HM,WM,VM,XM,KM,ZM,QM,JM,tR,eR,rR,nR,iR,aR,sR,oR,lR,cR,hR,uR,dR,pR,gR,fR,mR,yR,vR,xR,bR,wR,kR,TR,_R,ER,CR,SR,AR,LR,NR,IR,MR,RR,DR,OR,PR,BR,FR,$R,zR,UR,GR=t(()=>{Z3(),K8(),fh(),Jl(),yL(),e(),EM(),gh(),SM=0,AM=D(),LM=new Map,NM=[],IM=new Map,MM=[],RM=new Map,DM=new Map,PM=!(OM=0),$M=[],zM=Ae(t=>L.sanitizeText(t,AM),"sanitizeText"),UM=Ae(function(t){for(var e of LM.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),GM=Ae(function(r,n,i,a,s,o,l={},c){if(r&&0!==r.trim().length){let t,e=LM.get(r);if(void 0===e&&(e={id:r,labelType:"text",domId:"flowchart-"+r+"-"+SM,styles:[],classes:[]},LM.set(r,e)),SM++,void 0!==n?(AM=D(),t=zM(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)}),s?.forEach(function(t){e.classes.push(t)}),void 0!==o&&(e.dir=o),void 0===e.props?e.props=l:void 0!==l&&Object.assign(e.props,l),void 0!==c){if(i=c.includes(` +`)?c+` +`:`{ +`+c+` +}`,(n=_M(i,{schema:TM})).shape){if(n.shape!==n.shape.toLowerCase()||n.shape.includes("_"))throw new Error(`No such shape: ${n.shape}. Shape names should be lowercase.`);if(!pL(n.shape))throw new Error(`No such shape: ${n.shape}.`);e.type=n?.shape}n?.label&&(e.text=n?.label),n?.icon&&(e.icon=n?.icon,!n.label?.trim())&&e.text===r&&(e.text=""),n?.form&&(e.form=n?.form),n?.pos&&(e.pos=n?.pos),n?.img&&(e.img=n?.img,!n.label?.trim())&&e.text===r&&(e.text=""),n?.constraint&&(e.constraint=n.constraint),n.w&&(e.assetWidth=Number(n.w)),n.h&&(e.assetHeight=Number(n.h))}}},"addVertex"),qM=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=zM(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=NM.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${NM.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?NM.defaultStyle=e:(NM[t].style=e,0<(NM[t]?.style?.length??0)&&!NM[t]?.style?.some(t=>t?.startsWith("fill"))&&NM[t]?.style?.push("fill:none"))})},"updateLink"),WM=Ae(function(t,e){t.split(",").forEach(function(t){let r=IM.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},IM.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"),VM=Ae(function(t){BM=t,/.*/.exec(BM)&&(BM="LR"),"TD"===(BM=/.*v/.exec(BM)?"TB":BM)&&(BM="TB")},"setDirection"),XM=Ae(function(t,e){for(var r of t.split(",")){var n=LM.get(r);n&&n.classes.push(e),(n=RM.get(r))&&n.classes.push(e)}},"setClass"),KM=Ae(function(t,e){if(void 0!==e){e=zM(e);for(var r of t.split(","))DM.set("gen-1"===FM?UM(r):r,e)}},"setTooltip"),ZM=Ae(function(t,e,n){let i=UM(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),$M.push(sR),oR=Ae(function(t="gen-1"){LM=new Map,IM=new Map,NM=[],$M=[sR],MM=[],RM=new Map,OM=0,DM=new Map,PM=!0,FM=t,AM=D(),oc()},"clear"),lR=Ae(t=>{FM=t||"gen-2"},"setGen"),cR=Ae(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),hR=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:s,dir:t}=a(e.flat());if("gen-1"===FM)for(let t=0;t!!PM&&!(PM=!1),"firstGraph"),vR=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"),xR=Ae((e,r)=>{let n=r.length,i=0;for(let t=0;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=xR(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}},"destructEndLink"),wR=Ae((t,e)=>{if(t=bR(t),e){if((e=vR(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"),kR=Ae((t,e)=>{for(var r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),TR=Ae((r,n)=>{let i=[];return r.nodes.forEach((t,e)=>{kR(n,t)||i.push(r.nodes[e])}),{nodes:i}},"makeUniq"),_R={firstGraph:_R},ER=Ae(t=>{if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}},"getTypeFromVertex"),CR=Ae((t,e)=>t.find(t=>t.id===e),"findNode"),SR=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"),AR=Ae((t,e,r,n,i,a)=>{var r=r.get(t.id),n=n.get(t.id)??!1,s=CR(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=CM(t.classes),s.cssClasses=t.classes.join(" ")):(s={id:t.id,label:t.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:CM(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:JM(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},n?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:ER(t)}))},"addNodeFromVertex"),Ae(CM,"getCompiledStyles"),LR=Ae(()=>{let a=D(),e=[],s=[],r=yR(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0{AR(t,e,n,i,a,a.look||"classic")});let h=iR();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=SR(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});s.push(e)}),{nodes:e,edges:s,other:{},config:a}},"getData"),NR={defaultConfig:Ae(()=>yc.flowchart,"defaultConfig"),setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,getData:LR,setAccDescription:hc,addVertex:GM,lookUpDomId:UM,addLink:jM,updateLinkInterpolate:YM,updateLink:HM,addClass:WM,setDirection:VM,setClass:XM,setTooltip:KM,getTooltip:JM,setClickEvent:tR,setLink:QM,bindFunctions:eR,getDirection:rR,getVertices:nR,getEdges:iR,getClasses:aR,clear:oR,setGen:lR,defaultStyle:cR,addSubGraph:hR,getDepthFirstPos:fR,indexNodes:mR,getSubGraphs:yR,destructLink:wR,lex:_R,exists:kR,makeUniq:TR,setDiagramTitle:dc,getDiagramTitle:pc}}),qR=t(()=>{Z3(),IR=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")}),jR=t(()=>{MR=Ae(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")}),YR=t(()=>{fh(),Jl(),e(),jR(),Z3(),SS(),UE(),vC(),f9(),AA(),bC(),RR=Ae(async(n,i)=>{R.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=fC(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Rl(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await zE(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Rl(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=CS.svg(u),e=mC(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path(CA(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=MR(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 uC(i,t)},{cluster:u,labelBBox:f}},"rect"),DR=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 uC(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),OR=Ae(async(i,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,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 g9(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Rl(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=CS.svg(u),r=a.rx||a.ry?e.path(CA(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,i,{fill:t?o:l,fillStyle:t?"hachure":"solid",stroke:h,seed:s}));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-(Rl(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 uC(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),PR=Ae(async(n,i)=>{R.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=fC(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Rl(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await zE(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();Rl(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=CS.svg(u),e=mC(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=t.path(CA(y,v,n,m,i.rx),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=MR(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 uC(i,t)},{cluster:u,labelBBox:f}},"kanbanSection"),BR=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,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let c;if("handDrawn"===r.look){let t=CS.svg(e).rectangle(o,l,s,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",o).attr("y",l).attr("width",s).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 uC(r,t)},{cluster:e,labelBBox:{}}},"divider"),FR={rect:RR,squareRect:RR,roundedWithTitle:OR,noteGroup:DR,divider:BR,kanbanSection:PR},$R=new Map,zR=Ae(async(t,e)=>{var r=e.shape||"rect",r=await FR[r](t,e);return $R.set(e.id,r),r},"insertCluster"),UR=Ae(()=>{$R=new Map},"clear")});function HR(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=VR(t),e=VR(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 WR,VR,XR,KR,ZR,QR,JR=t(()=>{WR={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},Ae(HR,"calculateDeltaAndAngle"),VR=Ae(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),XR=Ae(c=>({x:Ae(function(t,e,r){let n=0,i=VR(r[0]).x{e(),KR=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&QR(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&QR(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),ZR={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},QR=Ae((t,e,r,n,i,a)=>{var s=ZR[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function eD(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function rD(e){var r=[],n=[];for(let t=1;t{fh(),Jl(),e(),UE(),K8(),JR(),jR(),Z3(),SS(),f9(),tD(),nD=new Map,iD=new Map,aD=Ae(()=>{nD.clear(),iD.clear()},"clear"),sD=Ae(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),oD=Ae(async(t,e)=>{var r,n=Rl(D().flowchart.htmlLabels),i=await zE(t,e.label,{style:sD(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(R.info("abc82",e,e.labelType),t.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=O(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),nD.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=await g9(e.startLabelLeft,sD(e.labelStyle)),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),iD.get(e.id)||iD.set(e.id,{}),iD.get(e.id).startLeft=r,eD(l,e.startLabelLeft)),e.startLabelRight&&(n=await g9(e.startLabelRight,sD(e.labelStyle)),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),iD.get(e.id)||iD.set(e.id,{}),iD.get(e.id).startRight=s,eD(l,e.startLabelRight)),e.endLabelLeft&&(n=await g9(e.endLabelLeft,sD(e.labelStyle)),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),iD.get(e.id)||iD.set(e.id,{}),iD.get(e.id).endLeft=a,eD(l,e.endLabelLeft)),e.endLabelRight&&(r=await g9(e.endLabelRight,sD(e.labelStyle)),n=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),iD.get(e.id)||iD.set(e.id,{}),iD.get(e.id).endRight=s,eD(l,e.endLabelRight)),i},"insertEdgeLabel"),Ae(eD,"setTerminalWidth"),lD=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,nD.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=D(),o=MR(o).subGraphTitleTotalMargin;if(n.label){let t=nD.get(n.id),e=n.x,r=n.y;s&&(a=H8.calcLabelPosition(s),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+o/2})`)}if(n.startLabelLeft){let t=iD.get(n.id).startLeft,e=n.x,r=n.y;s&&(i=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=iD.get(n.id).startRight,e=n.x,r=n.y;s&&(a=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=iD.get(n.id).endLeft,e=n.x,r=n.y;s&&(o=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=iD.get(n.id).endRight,e=n.x,r=n.y;s&&(i=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),cD=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),hD=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),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{R.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(R.info("abc88 checking point",t,n),cD(n,t)||s)R.warn("abc88 outside",t,a),a=t,s||i.push(t);else{let e=hD(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),s=!0}}),R.debug("returning points",i),i},"cutPathAtIntersect"),Ae(rD,"extractCornerPoints"),dD=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"),pD=Ae(function(n){var t=rD(n).cornerPointPositions,i=[];for(let r=0;r!Number.isNaN(t.y)),i=pD(i),u4),{x:p,y:g}=(e.curve&&(d=e.curve),XR(e)),f=Xb().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(i),x=Array.isArray(e.style)?e.style:[e.style],b=("handDrawn"===e.look?(a=CS.svg(t),Object.assign([],i),r=a.path(v,{roughness:.3,seed:o}),m+=" transition",i=(y=O(r).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",i),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),KR(y,e,b,s,n),a={},c&&(a.updatedPath=l),a.originalPath=e.points,a},"insertEdge")}),AD=t(()=>{e(),fD=Ae((e,t,r,n)=>{t.forEach(t=>{ED[t](e,r,n)})},"insertMarkers"),mD=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"),yD=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"),vD=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"),xD=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"),bD=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"),wD=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"),kD=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"),TD=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"),_D=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"),ED={extension:mD,composition:yD,aggregation:vD,dependency:xD,lollipop:bD,point:wD,circle:kD,cross:TD,barb:_D},CD=fD});async function LD(e,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?mL[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===n.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),a=await s(i,r,n)}else a=await s(e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),ND.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var ND,ID,MD,RD,DD,OD=t(()=>{e(),yL(),ND=new Map,Ae(LD,"insertNode"),ID=Ae((t,e)=>{ND.set(e.id,t)},"setNodeElem"),MD=Ae(()=>{ND.clear()},"clear"),RD=Ae(t=>{var e=ND.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")}),PD=t(()=>{In(),Jl(),e(),YR(),SD(),AD(),OD(),i(),K8(),DD={common:L,getConfig:Mr,insertCluster:zR,insertEdge:gD,insertEdgeLabel:oD,insertMarkers:CD,insertNode:LD,interpolateToCurve:l8,labelHelper:YE,log:R,positionEdgeLabel:lD}});function BD(t){return"symbol"==typeof t||Uk(t)&&"[object Symbol]"==x5(t)}var FD,$D=t(()=>{b5(),Gk(),Ae(BD,"isSymbol"),FD=BD});function zD(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r{Ae(zD,"arrayMap"),UD=zD});function qD(t){var e;return"string"==typeof t?t:Kk(t)?UD(t,qD)+"":FD(t)?HD?HD.call(t):"":"0"==(e=t+"")&&1/t==-jD?"-0":e}var jD,YD,HD,WD,VD=t(()=>{i5(),GD(),Jk(),$D(),jD=1/0,YD=H3?H3.prototype:void 0,HD=YD?YD.toString:void 0,Ae(qD,"baseToString"),WD=qD});function XD(t){for(var e=t.length;e--&&KD.test(t.charAt(e)););return e}var KD,ZD,QD=t(()=>{KD=/\s/,Ae(XD,"trimmedEndIndex"),ZD=XD});function JD(t){return t&&t.slice(0,ZD(t)+1).replace(tO,"")}var tO,eO,rO=t(()=>{QD(),tO=/^\s+/,Ae(JD,"baseTrim"),eO=JD});function nO(t){if("number"==typeof t)return t;if(FD(t))return iO;if(k5(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=k5(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=eO(t);var e=sO.test(t);return e||oO.test(t)?lO(t.slice(2),e?2:8):aO.test(t)?iO:+t}var iO,aO,sO,oO,lO,cO,hO=t(()=>{rO(),T5(),$D(),iO=NaN,aO=/^[-+]0x[0-9a-f]+$/i,sO=/^0b[01]+$/i,oO=/^0o[0-7]+$/i,lO=parseInt,Ae(nO,"toNumber"),cO=nO});function uO(t){return t?(t=cO(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var dO,pO=t(()=>{hO(),Ae(uO,"toFinite"),dO=uO});function gO(t){var e=(t=dO(t))%1;return t==t?e?t-e:t:0}var fO,mO,yO,vO=t(()=>{pO(),Ae(gO,"toInteger"),fO=gO}),xO=t(()=>{t6(),n5(),mO=Z5(j3,"WeakMap"),yO=mO});function bO(){}var wO,kO=t(()=>{Ae(bO,"noop"),wO=bO});function TO(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(TO,"arrayEach"),_O=TO});function CO(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{Ae(CO,"baseFindIndex"),SO=CO});function LO(t){return t!=t}var NO,IO=t(()=>{Ae(LO,"baseIsNaN"),NO=LO});function MO(t,e,r){for(var n=r-1,i=t.length;++n{Ae(MO,"strictIndexOf"),RO=MO});function OO(t,e,r){return e==e?RO(t,e,r):SO(t,NO,r)}var PO,BO=t(()=>{AO(),IO(),DO(),Ae(OO,"baseIndexOf"),PO=OO});function FO(t,e){return!(null==t||!t.length)&&-1{BO(),Ae(FO,"arrayIncludes"),$O=FO}),qO=t(()=>{Ik(),zO=Ak(Object.keys,Object),UO=zO});function jO(t){if(!Ok(t))return UO(t);var e,r=[];for(e in Object(t))HO.call(t,e)&&"constructor"!=e&&r.push(e);return r}var YO,HO,WO,VO=t(()=>{Pk(),qO(),YO=Object.prototype,HO=YO.hasOwnProperty,Ae(jO,"baseKeys"),WO=jO});function XO(t){return(i7(t)?sT:WO)(t)}var KO,ZO,QO,JO,tP=t(()=>{oT(),VO(),a7(),Ae(XO,"keys"),KO=XO}),eP=t(()=>{H7(),X7(),s8(),a7(),Pk(),tP(),QO=Object.prototype,ZO=QO.hasOwnProperty,QO=n8(function(t,e){if(Ok(e)||i7(e))V7(e,KO(e),t);else for(var r in e)ZO.call(e,r)&&Y7(t,r,e[r])}),JO=QO});function rP(t,e){var r;return!Kk(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!FD(t))||iP.test(t)||!nP.test(t)||null!=e&&t in Object(e))}var nP,iP,aP,sP=t(()=>{Jk(),$D(),nP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iP=/^\w*$/,Ae(rP,"isKey"),aP=rP});function oP(t){var e=(t=Ew(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var lP,cP,hP,uP,dP,pP=t(()=>{Cw(),Ae(oP,"memoizeCapped"),lP=oP}),gP=t(()=>{pP(),cP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hP=/\\(\\)?/g,uP=lP(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(cP,function(t,e,r,n){i.push(r?n.replace(hP,"$1"):e||t)}),i}),dP=uP});function fP(t){return null==t?"":WD(t)}var mP,yP=t(()=>{VD(),Ae(fP,"toString"),mP=fP});function vP(t,e){return Kk(t)?t:aP(t,e)?[t]:dP(mP(t))}var xP,bP=t(()=>{Jk(),sP(),gP(),yP(),Ae(vP,"castPath"),xP=vP});function wP(t){var e;return"string"==typeof t||FD(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var kP,TP=t(()=>{$D(),Ae(wP,"toKey"),kP=wP});function _P(t,e){for(var r=0,n=(e=xP(e,t)).length;null!=t&&r{bP(),TP(),Ae(_P,"baseGet"),EP=_P});function SP(t,e,r){return void 0===(t=null==t?void 0:EP(t,e))?r:t}var AP,LP=t(()=>{CP(),Ae(SP,"get"),AP=SP});function NP(t,e){for(var r=-1,n=e.length,i=t.length;++r{Ae(NP,"arrayPush"),IP=NP});function RP(t){return Kk(t)||Vk(t)||!!(DP&&t&&t[DP])}var DP,OP,PP=t(()=>{i5(),Qk(),Jk(),DP=H3?H3.isConcatSpreadable:void 0,Ae(RP,"isFlattenable"),OP=RP});function BP(t,e,r,n,i){var a=-1,s=t.length;for(r=r||OP,i=i||[];++a{MP(),PP(),Ae(BP,"baseFlatten"),FP=BP});function zP(t){return null!=t&&t.length?FP(t,1):[]}var UP,GP=t(()=>{$P(),Ae(zP,"flatten"),UP=zP});function qP(t){return WT(PT(t,void 0,UP),t+"")}var jP,YP=t(()=>{GP(),BT(),XT(),Ae(qP,"flatRest"),jP=qP});function HP(t,e,r){var n=-1,i=t.length;(r=i>>0,e>>>=0;for(var a=Array(i);++n{Ae(HP,"baseSlice"),WP=HP});function XP(t){return KP.test(t)}var KP,ZP,QP=t(()=>{KP=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ae(XP,"hasUnicode"),ZP=XP});function JP(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i{Ae(JP,"arrayReduce"),tB=JP});function rB(t,e){return t&&V7(e,KO(e),t)}var nB,iB=t(()=>{X7(),tP(),Ae(rB,"baseAssign"),nB=rB});function aB(t,e){return t&&V7(e,yT(e),t)}var sB,oB=t(()=>{X7(),vT(),Ae(aB,"baseAssignIn"),sB=aB});function lB(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r{Ae(lB,"arrayFilter"),cB=lB});function uB(){return[]}var dB,pB,gB,fB,mB,yB=t(()=>{Ae(uB,"stubArray"),dB=uB}),vB=t(()=>{hB(),yB(),pB=Object.prototype,gB=pB.propertyIsEnumerable,mB=(fB=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),cB(fB(e),function(t){return gB.call(e,t)}))}:dB});function xB(t,e){return V7(t,mB(t),e)}var bB,wB,kB,TB=t(()=>{X7(),vB(),Ae(xB,"copySymbols"),bB=xB}),_B=t(()=>{MP(),Mk(),vB(),yB(),wB=Object.getOwnPropertySymbols,kB=wB?function(t){for(var e=[];t;)IP(e,mB(t)),t=Nk(t);return e}:dB});function EB(t,e){return V7(t,kB(t),e)}var CB,SB=t(()=>{X7(),_B(),Ae(EB,"copySymbolsIn"),CB=EB});function AB(t,e,r){return e=e(t),Kk(t)?e:IP(e,r(t))}var LB,NB=t(()=>{MP(),Jk(),Ae(AB,"baseGetAllKeys"),LB=AB});function IB(t){return LB(t,KO,mB)}var MB,RB=t(()=>{NB(),vB(),tP(),Ae(IB,"getAllKeys"),MB=IB});function DB(t){return LB(t,yT,kB)}var OB,PB,BB,FB,$B,zB,UB,GB,qB,jB,YB,HB,WB,VB,XB,KB,ZB,QB,JB,tF=t(()=>{NB(),_B(),vT(),Ae(DB,"getAllKeysIn"),OB=DB}),eF=t(()=>{t6(),n5(),PB=Z5(j3,"DataView"),BB=PB}),rF=t(()=>{t6(),n5(),FB=Z5(j3,"Promise"),$B=FB}),nF=t(()=>{t6(),n5(),zB=Z5(j3,"Set"),UB=zB}),iF=t(()=>{eF(),Q6(),rF(),nF(),xO(),b5(),F5(),GB="[object Map]",qB="[object Promise]",jB="[object Set]",YB="[object WeakMap]",HB="[object DataView]",WB=B5(BB),VB=B5(K6),XB=B5($B),KB=B5(UB),ZB=B5(yO),QB=x5,(BB&&QB(new BB(new ArrayBuffer(1)))!=HB||K6&&QB(new K6)!=GB||$B&&QB($B.resolve())!=qB||UB&&QB(new UB)!=jB||yO&&QB(new yO)!=YB)&&(QB=Ae(function(t){var e=x5(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?B5(t):"")switch(t){case WB:return HB;case VB:return GB;case XB:return qB;case KB:return jB;case ZB:return YB}return e},"getTag")),JB=QB});function aF(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&oF.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var sF,oF,lF,cF=t(()=>{sF=Object.prototype,oF=sF.hasOwnProperty,Ae(aF,"initCloneArray"),lF=aF});function hF(t,e){return e=e?mk(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var uF,dF=t(()=>{yk(),Ae(hF,"cloneDataView"),uF=hF});function pF(t){var e=new t.constructor(t.source,gF.exec(t));return e.lastIndex=t.lastIndex,e}var gF,fF,mF=t(()=>{gF=/\w*$/,Ae(pF,"cloneRegExp"),fF=pF});function yF(t){return xF?Object(xF.call(t)):{}}var vF,xF,bF,wF=t(()=>{i5(),vF=H3?H3.prototype:void 0,xF=vF?vF.valueOf:void 0,Ae(yF,"cloneSymbol"),bF=yF});function kF(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return mk(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return uF(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 xk(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return fF(t);case"[object Set]":return new n;case"[object Symbol]":return bF(t)}}var TF,_F=t(()=>{yk(),dF(),mF(),wF(),bk(),Ae(kF,"initCloneByTag"),TF=kF});function EF(t){return Uk(t)&&"[object Map]"==JB(t)}var CF,SF,AF,LF=t(()=>{iF(),Gk(),Ae(EF,"baseIsMap"),CF=EF}),NF=t(()=>{LF(),P7(),B7(),SF=(SF=R7&&R7.isMap)?L7(SF):CF,AF=SF});function IF(t){return Uk(t)&&"[object Set]"==JB(t)}var MF,RF,DF,OF=t(()=>{iF(),Gk(),Ae(IF,"baseIsSet"),MF=IF}),PF=t(()=>{OF(),P7(),B7(),RF=(RF=R7&&R7.isSet)?L7(RF):MF,DF=RF});function BF(r,n,i,t,e,a){var s,o=n&FF,l=n&$F,c=n&zF;if(void 0===(s=i?e?i(r,t,e,a):i(r):s)){if(!k5(r))return r;if(t=Kk(r)){if(s=lF(r),!o)return kk(r,s)}else{var h=JB(r),u=h==GF||h==qF;if(p7(r))return hk(r,o);if(h==jF||h==UF||u&&!e){if(s=l||u?{}:Fk(r),!o)return l?CB(r,sB(s,r)):bB(r,nB(s,r))}else{if(!YF[h])return e?r:{};s=TF(r,h,o)}}if(u=(a=a||new qw).get(r))return u;a.set(r,s),DF(r)?r.forEach(function(t){s.add(BF(t,n,i,t,r,a))}):AF(r)&&r.forEach(function(t,e){s.set(e,BF(t,n,i,e,r,a))});var d=t?void 0:(c?l?OB:MB:l?yT:KO)(r);_O(d||r,function(t,e){d&&(t=r[e=t]),Y7(s,e,BF(t,n,i,e,r,a))})}return s}var FF,$F,zF,UF,GF,qF,jF,YF,HF,WF=t(()=>{Hw(),EO(),H7(),iB(),oB(),pk(),Ek(),TB(),SB(),RB(),tF(),iF(),cF(),_F(),$k(),Jk(),f7(),NF(),T5(),PF(),tP(),vT(),FF=1,$F=2,zF=4,GF="[object Function]",qF="[object GeneratorFunction]",jF="[object Object]",(YF={})[UF="[object Arguments]"]=YF["[object Array]"]=YF["[object ArrayBuffer]"]=YF["[object DataView]"]=YF["[object Boolean]"]=YF["[object Date]"]=YF["[object Float32Array]"]=YF["[object Float64Array]"]=YF["[object Int8Array]"]=YF["[object Int16Array]"]=YF["[object Int32Array]"]=YF["[object Map]"]=YF["[object Number]"]=YF[jF]=YF["[object RegExp]"]=YF["[object Set]"]=YF["[object String]"]=YF["[object Symbol]"]=YF["[object Uint8Array]"]=YF["[object Uint8ClampedArray]"]=YF["[object Uint16Array]"]=YF["[object Uint32Array]"]=!0,YF["[object Error]"]=YF[GF]=YF["[object WeakMap]"]=!1,Ae(BF,"baseClone"),HF=BF});function VF(t){return HF(t,4)}var XF,KF=t(()=>{WF(),Ae(VF,"clone"),XF=VF});function ZF(t){return HF(t,5)}var QF,JF=t(()=>{WF(),Ae(ZF,"cloneDeep"),QF=ZF});function t$(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e{Ae(t$,"compact"),e$=t$});function n$(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var i$,a$=t(()=>{Ae(n$,"setCacheAdd"),i$=n$});function s$(t){return this.__data__.has(t)}var o$,l$=t(()=>{Ae(s$,"setCacheHas"),o$=s$});function c$(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ww;++e{kw(),a$(),l$(),Ae(c$,"SetCache"),c$.prototype.add=c$.prototype.push=i$,c$.prototype.has=o$,h$=c$});function d$(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(d$,"arraySome"),p$=d$});function f$(t,e){return t.has(e)}var m$,y$=t(()=>{Ae(f$,"cacheHas"),m$=f$});function v$(t,e,r,n,i,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o{u$(),g$(),y$(),Ae(v$,"equalArrays"),x$=v$});function w$(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var k$,T$=t(()=>{Ae(w$,"mapToArray"),k$=w$});function _$(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var E$,C$=t(()=>{Ae(_$,"setToArray"),E$=_$});function S$(t,e,r,n,i,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new dk(t),new dk(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return A6(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=k$;case"[object Set]":var l,o=o||E$;return!!(t.size==e.size||1&n)&&((l=s.get(t))?l==e:(n|=2,s.set(t,e),l=x$(o(t),o(e),n,i,a,s),s.delete(t),l));case"[object Symbol]":if(L$)return L$.call(t)==L$.call(e)}return!1}var A$,L$,N$,I$=t(()=>{i5(),gk(),L6(),b$(),T$(),C$(),A$=H3?H3.prototype:void 0,L$=A$?A$.valueOf:void 0,Ae(S$,"equalByTag"),N$=S$});function M$(t,e,r,n,i,a){var s=1&r,o=MB(t),l=o.length;if(l!=MB(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:D$.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c{RB(),R$=Object.prototype,D$=R$.hasOwnProperty,Ae(M$,"equalObjects"),O$=M$});function B$(t,e,r,n,i,a){var s=Kk(t),o=Kk(e),l=s?$$:JB(t),o=o?$$:JB(e),c=(l=l==F$?z$:l)==z$,h=(o=o==F$?z$:o)==z$;if((o=l==o)&&p7(t)){if(!p7(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new qw,s||O7(t)?x$(t,e,r,n,i,a):N$(t,e,l,r,n,i,a)):1&r||(s=c&&G$.call(t,"__wrapped__"),l=h&&G$.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new qw,O$(t,e,r,n,i,a)):i(s?t.value():t,l?e.value():e,r,n,a=a||new qw)}var F$,$$,z$,U$,G$,q$,j$=t(()=>{Hw(),b$(),I$(),P$(),iF(),Jk(),f7(),F7(),F$="[object Arguments]",$$="[object Array]",z$="[object Object]",U$=Object.prototype,G$=U$.hasOwnProperty,Ae(B$,"baseIsEqualDeep"),q$=B$});function Y$(t,e,r,n,i){return t===e||(null==t||null==e||!Uk(t)&&!Uk(e)?t!=t&&e!=e:q$(t,e,r,n,Y$,i))}var H$,W$=t(()=>{j$(),Gk(),Ae(Y$,"baseIsEqual"),H$=Y$});function V$(t,e,r,n){var i=r.length,a=i,s=!n;if(null==t)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{Hw(),W$(),Ae(V$,"baseIsMatch"),X$=V$});function Z$(t){return t==t&&!k5(t)}var Q$,J$=t(()=>{T5(),Ae(Z$,"isStrictComparable"),Q$=Z$});function tz(t){for(var e=KO(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Q$(i)]}return e}var ez,rz=t(()=>{J$(),tP(),Ae(tz,"getMatchData"),ez=tz});function nz(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var iz,az=t(()=>{Ae(nz,"matchesStrictComparable"),iz=nz});function sz(e){var r=ez(e);return 1==r.length&&r[0][2]?iz(r[0][0],r[0][1]):function(t){return t===e||X$(t,e,r)}}var oz,lz=t(()=>{K$(),rz(),az(),Ae(sz,"baseMatches"),oz=sz});function cz(t,e){return null!=t&&e in Object(t)}var hz,uz=t(()=>{Ae(cz,"baseHasIn"),hz=cz});function dz(t,e,r){for(var n=-1,i=(e=xP(e,t)).length,a=!1;++n{bP(),Qk(),Jk(),rT(),r7(),TP(),Ae(dz,"hasPath"),pz=dz});function fz(t,e){return null!=t&&pz(t,e,hz)}var mz,yz=t(()=>{uz(),gz(),Ae(fz,"hasIn"),mz=fz});function vz(r,n){return aP(r)&&Q$(n)?iz(kP(r),n):function(t){var e=AP(t,r);return void 0===e&&e===n?mz(t,r):H$(n,e,3)}}var xz,bz=t(()=>{W$(),LP(),yz(),sP(),J$(),az(),TP(),Ae(vz,"baseMatchesProperty"),xz=vz});function wz(e){return function(t){return t?.[e]}}var kz,Tz=t(()=>{Ae(wz,"baseProperty"),kz=wz});function _z(e){return function(t){return EP(t,e)}}var Ez,Cz=t(()=>{CP(),Ae(_z,"basePropertyDeep"),Ez=_z});function Sz(t){return aP(t)?kz(kP(t)):Ez(t)}var Az,Lz=t(()=>{Tz(),Cz(),sP(),TP(),Ae(Sz,"property"),Az=Sz});function Nz(t){return"function"==typeof t?t:null==t?LT:"object"==typeof t?Kk(t)?xz(t[0],t[1]):oz(t):Az(t)}var Iz,Mz=t(()=>{lz(),bz(),NT(),Jk(),Lz(),Ae(Nz,"baseIteratee"),Iz=Nz});function Rz(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i{Ae(Rz,"arrayAggregator"),Dz=Rz});function Pz(t,e){return t&&nk(t,e,KO)}var Bz,Fz=t(()=>{ak(),tP(),Ae(Pz,"baseForOwn"),Bz=Pz});function $z(a,s){return function(t,e){if(null!=t){if(!i7(t))return a(t,e);for(var r=t.length,n=s?r:-1,i=Object(t);(s?n--:++n{a7(),Ae($z,"createBaseEach"),zz=$z}),jz=t(()=>{Fz(),qz(),Uz=zz(Bz),Gz=Uz});function Yz(t,n,i,a){return Gz(t,function(t,e,r){n(a,t,i(t),r)}),a}var Hz,Wz=t(()=>{jz(),Ae(Yz,"baseAggregator"),Hz=Yz});function Vz(i,a){return function(t,e){var r=Kk(t)?Dz:Hz,n=a?a():{};return r(t,i,Iz(e,2),n)}}var Xz,Kz,Zz,Qz,Jz,tU,eU,rU=t(()=>{Oz(),Wz(),Mz(),Jk(),Ae(Vz,"createAggregator"),Xz=Vz}),nU=t(()=>{n5(),Kz=Ae(function(){return j3.Date.now()},"now"),Zz=Kz}),iU=t(()=>{QT(),L6(),e8(),vT(),Qz=Object.prototype,Jz=Qz.hasOwnProperty,tU=ZT(function(t,e){t=Object(t);var r=-1,n=e.length,i=2{Ae(aU,"arrayIncludesWith"),sU=aU});function lU(t,e,r,n){var i=-1,a=$O,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=UD(e,L7(r))),n?(a=sU,s=!1):200<=e.length&&(a=m$,s=!1,e=new h$(e));t:for(;++i{u$(),GO(),oU(),GD(),P7(),y$(),Ae(lU,"baseDifference"),cU=lU}),pU=t(()=>{dU(),$P(),QT(),l7(),hU=ZT(function(t,e){return o7(t)?cU(t,FP(e,1,o7,!0)):[]}),uU=hU});function gU(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var fU,mU=t(()=>{Ae(gU,"last"),fU=gU});function yU(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:fO(e),WP(t,e<0?0:e,n)):[]}var vU,xU=t(()=>{VP(),vO(),Ae(yU,"drop"),vU=yU});function bU(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:fO(e),WP(t,0,(e=n-e)<0?0:e)):[]}var wU,kU=t(()=>{VP(),vO(),Ae(bU,"dropRight"),wU=bU});function TU(t){return"function"==typeof t?t:LT}var _U,EU=t(()=>{NT(),Ae(TU,"castFunction"),_U=TU});function CU(t,e){return(Kk(t)?_O:Gz)(t,_U(e))}var v,SU=t(()=>{EO(),jz(),EU(),Jk(),Ae(CU,"forEach"),v=CU}),AU=t(()=>{SU()});function LU(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(LU,"arrayEvery"),NU=LU});function MU(t,n){var i=!0;return Gz(t,function(t,e,r){return i=!!n(t,e,r)}),i}var RU,DU=t(()=>{jz(),Ae(MU,"baseEvery"),RU=MU});function OU(t,e,r){var n=Kk(t)?NU:RU;return r&&t8(t,e,r)&&(e=void 0),n(t,Iz(e,3))}var PU,BU=t(()=>{IU(),DU(),Mz(),Jk(),e8(),Ae(OU,"every"),PU=OU});function FU(t,n){var i=[];return Gz(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var $U,zU=t(()=>{jz(),Ae(FU,"baseFilter"),$U=FU});function UU(t,e){return(Kk(t)?cB:$U)(t,Iz(e,3))}var GU,qU=t(()=>{hB(),zU(),Mz(),Jk(),Ae(UU,"filter"),GU=UU});function jU(a){return function(t,e,r){var n,i=Object(t);return i7(t)||(n=Iz(e,3),t=KO(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 YU,HU=t(()=>{Mz(),a7(),tP(),Ae(jU,"createFind"),YU=jU});function WU(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:fO(r))<0&&(r=VU(n+r,0)),SO(t,Iz(e,3),r)):-1}var VU,XU,KU,ZU,QU=t(()=>{AO(),Mz(),vO(),VU=Math.max,Ae(WU,"findIndex"),XU=WU}),JU=t(()=>{HU(),QU(),KU=YU(XU),ZU=KU});function tG(t){return t&&t.length?t[0]:void 0}var eG,rG=t(()=>{Ae(tG,"head"),eG=tG}),nG=t(()=>{rG()});function iG(t,n){var i=-1,a=i7(t)?Array(t.length):[];return Gz(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var aG,sG=t(()=>{jz(),a7(),Ae(iG,"baseMap"),aG=iG});function oG(t,e){return(Kk(t)?UD:aG)(t,Iz(e,3))}var x,lG=t(()=>{GD(),Mz(),sG(),Jk(),Ae(oG,"map"),x=oG});function cG(t,e){return FP(x(t,e),1)}var hG,uG=t(()=>{$P(),lG(),Ae(cG,"flatMap"),hG=cG});function dG(t,e){return null==t?t:nk(t,_U(e),yT)}var pG,gG=t(()=>{ak(),EU(),vT(),Ae(dG,"forIn"),pG=dG});function fG(t,e){return t&&Bz(t,_U(e))}var mG,yG,vG,xG,bG=t(()=>{Fz(),EU(),Ae(fG,"forOwn"),mG=fG}),wG=t(()=>{Kw(),rU(),vG=Object.prototype,yG=vG.hasOwnProperty,vG=Xz(function(t,e,r){yG.call(t,r)?t[r].push(e):Xw(t,r,[e])}),xG=vG});function kG(t,e){return e{Ae(kG,"baseGt"),TG=kG});function EG(t,e){return null!=t&&SG.call(t,e)}var CG,SG,AG,LG=t(()=>{CG=Object.prototype,SG=CG.hasOwnProperty,Ae(EG,"baseHas"),AG=EG});function NG(t,e){return null!=t&&pz(t,e,AG)}var IG,MG=t(()=>{LG(),gz(),Ae(NG,"has"),IG=NG});function RG(t){return"string"==typeof t||!Kk(t)&&Uk(t)&&"[object String]"==x5(t)}var DG,OG=t(()=>{b5(),Jk(),Gk(),Ae(RG,"isString"),DG=RG});function PG(e,t){return UD(t,function(t){return e[t]})}var BG,FG=t(()=>{GD(),Ae(PG,"baseValues"),BG=PG});function $G(t){return null==t?[]:BG(t,KO(t))}var zG,UG=t(()=>{FG(),tP(),Ae($G,"values"),zG=$G});function GG(t,e,r,n){return t=i7(t)?t:zG(t),r=r&&!n?fO(r):0,n=t.length,r<0&&(r=qG(n+r,0)),DG(t)?r<=n&&-1{BO(),a7(),OG(),vO(),UG(),qG=Math.max,Ae(GG,"includes"),jG=GG});function HG(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:fO(r))<0&&(r=WG(n+r,0)),PO(t,e,r)):-1}var WG,VG,XG=t(()=>{BO(),vO(),WG=Math.max,Ae(HG,"indexOf"),VG=HG});function KG(t){if(null!=t){if(i7(t)&&(Kk(t)||"string"==typeof t||"function"==typeof t.splice||p7(t)||O7(t)||Vk(t)))return!t.length;var e,r=JB(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(Ok(t))return!WO(t).length;for(e in t)if(QG.call(t,e))return!1}return!0}var ZG,QG,JG,tq=t(()=>{VO(),iF(),Qk(),Jk(),a7(),f7(),Pk(),F7(),ZG=Object.prototype,QG=ZG.hasOwnProperty,Ae(KG,"isEmpty"),JG=KG});function eq(t){return Uk(t)&&"[object RegExp]"==x5(t)}var rq,nq,iq,aq=t(()=>{b5(),Gk(),Ae(eq,"baseIsRegExp"),rq=eq}),sq=t(()=>{aq(),P7(),B7(),nq=(nq=R7&&R7.isRegExp)?L7(nq):rq,iq=nq});function oq(t){return void 0===t}var lq,cq=t(()=>{Ae(oq,"isUndefined"),lq=oq});function hq(t,e){return t{Ae(hq,"baseLt"),uq=hq});function pq(t,n){var i={};return n=Iz(n,3),Bz(t,function(t,e,r){Xw(i,e,n(t,e,r))}),i}var gq,fq=t(()=>{Kw(),Fz(),Mz(),Ae(pq,"mapValues"),gq=pq});function mq(t,e,r){for(var n=-1,i=t.length;++n{$D(),Ae(mq,"baseExtremum"),yq=mq});function xq(t){return t&&t.length?yq(t,LT,TG):void 0}var bq,wq=t(()=>{vq(),_G(),NT(),Ae(xq,"max"),bq=xq});function kq(t){return t&&t.length?yq(t,LT,uq):void 0}var Tq,_q=t(()=>{vq(),dq(),NT(),Ae(kq,"min"),Tq=kq});function Eq(t,e){return t&&t.length?yq(t,Iz(e,2),uq):void 0}var Cq,Sq=t(()=>{vq(),Mz(),dq(),Ae(Eq,"minBy"),Cq=Eq});function Aq(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 Lq,Nq=t(()=>{Ae(Aq,"negate"),Lq=Aq});function Iq(t,e,r,n){if(k5(t))for(var i=-1,a=(e=xP(e,t)).length,s=a-1,o=t;null!=o&&++i{H7(),bP(),rT(),T5(),TP(),Ae(Iq,"baseSet"),Mq=Iq});function Dq(t,e,r){for(var n=-1,i=e.length,a={};++n{CP(),Rq(),bP(),Ae(Dq,"basePickBy"),Oq=Dq});function Bq(t,r){var e;return null==t?{}:(e=UD(OB(t),function(t){return[t]}),r=Iz(r),Oq(t,e,function(t,e){return r(t,e[0])}))}var Fq,$q=t(()=>{GD(),Mz(),Pq(),tF(),Ae(Bq,"pickBy"),Fq=Bq});function zq(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Uq,Gq=t(()=>{Ae(zq,"baseSortBy"),Uq=zq});function qq(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=FD(t),s=void 0!==e,o=null===e,l=e==e,c=FD(e);if(!o&&!c&&!a&&e{$D(),Ae(qq,"compareAscending"),jq=qq});function Hq(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n{Yq(),Ae(Hq,"compareMultiple"),Wq=Hq});function Xq(t,n,r){n=n.length?UD(n,function(e){return Kk(e)?function(t){return EP(t,1===e.length?e[0]:e)}:e}):[LT];var i=-1,t=(n=UD(n,L7(Iz)),aG(t,function(e,t,r){return{criteria:UD(n,function(t){return t(e)}),index:++i,value:e}}));return Uq(t,function(t,e){return Wq(t,e,r)})}var Kq,Zq,Qq,Jq=t(()=>{GD(),CP(),Mz(),sG(),Gq(),P7(),Vq(),NT(),Jk(),Ae(Xq,"baseOrderBy"),Kq=Xq}),tj=t(()=>{Tz(),Zq=kz("length"),Qq=Zq});function ej(t){for(var e=cj.lastIndex=0;cj.test(t);)++e;return e}var rj,nj,ij,aj,sj,oj,lj,cj,hj,uj=t(()=>{rj="["+(aj="\\ud800-\\udfff")+"]",nj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ij="\\ud83c[\\udffb-\\udfff]",lj="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",oj="[\\ufe0e\\ufe0f]?",sj="(?:\\u200d(?:"+[aj="[^"+aj+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+oj+lj+")*",oj=oj+lj+sj,lj="(?:"+[aj+nj+"?",nj,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",rj].join("|")+")",cj=RegExp(ij+"(?="+ij+")|"+lj+oj,"g"),Ae(ej,"unicodeSize"),hj=ej});function dj(t){return(ZP(t)?hj:Qq)(t)}var pj,gj=t(()=>{tj(),QP(),uj(),Ae(dj,"stringSize"),pj=dj});function fj(r,t){return Oq(r,t,function(t,e){return mz(r,e)})}var mj,yj,vj,xj=t(()=>{Pq(),yz(),Ae(fj,"basePick"),mj=fj}),bj=t(()=>{xj(),YP(),yj=jP(function(t,e){return null==t?{}:mj(t,e)}),vj=yj});function wj(t,e,r,n){for(var i=-1,a=Tj(kj((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var kj,Tj,_j,Ej=t(()=>{kj=Math.ceil,Tj=Math.max,Ae(wj,"baseRange"),_j=wj});function Cj(n){return function(t,e,r){return r&&"number"!=typeof r&&t8(t,e,r)&&(e=r=void 0),t=dO(t),void 0===e?(e=t,t=0):e=dO(e),r=void 0===r?t{Ej(),e8(),pO(),Ae(Cj,"createRange"),Sj=Cj}),Ij=t(()=>{Nj(),Aj=Sj(),Lj=Aj});function Mj(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var Rj,Dj=t(()=>{Ae(Mj,"baseReduce"),Rj=Mj});function Oj(t,e,r){var n=Kk(t)?tB:Rj,i=arguments.length<3;return n(t,Iz(e,4),r,i,Gz)}var Pj,Bj=t(()=>{eB(),jz(),Mz(),Dj(),Jk(),Ae(Oj,"reduce"),Pj=Oj});function Fj(t,e){return(Kk(t)?cB:$U)(t,Lq(Iz(e,3)))}var $j,zj=t(()=>{hB(),zU(),Mz(),Jk(),Nq(),Ae(Fj,"reject"),$j=Fj});function Uj(t){var e;return null==t?0:i7(t)?DG(t)?pj(t):t.length:"[object Map]"==(e=JB(t))||"[object Set]"==e?t.size:WO(t).length}var Gj,qj=t(()=>{VO(),iF(),a7(),OG(),gj(),Ae(Uj,"size"),Gj=Uj});function jj(t,n){var i;return Gz(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var Yj,Hj=t(()=>{jz(),Ae(jj,"baseSome"),Yj=jj});function Wj(t,e,r){var n=Kk(t)?p$:Yj;return r&&t8(t,e,r)&&(e=void 0),n(t,Iz(e,3))}var Vj,Xj,Kj,Zj,Qj,Jj=t(()=>{g$(),Mz(),Hj(),Jk(),e8(),Ae(Wj,"some"),Vj=Wj}),tY=t(()=>{$P(),Jq(),QT(),e8(),Xj=ZT(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&t8(t,e[0],e[1])?e=[]:2{nF(),kO(),C$(),Zj=UB&&1/E$(new UB([,-0]))[1]==1/0?function(t){return new UB(t)}:wO,Qj=Zj});function rY(t,e,r){var n=-1,i=$O,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=sU;else if(200<=a){var c=e?null:Qj(t);if(c)return E$(c);s=!1,i=m$,l=new h$}else l=e?[]:o;t:for(;++n{u$(),GO(),oU(),y$(),eY(),C$(),Ae(rY,"baseUniq"),nY=rY}),oY=t(()=>{$P(),QT(),sY(),l7(),iY=ZT(function(t){return nY(FP(t,1,o7,!0))}),aY=iY});function lY(t){return t&&t.length?nY(t):[]}var cY,hY=t(()=>{sY(),Ae(lY,"uniq"),cY=lY});function uY(t,e){return t&&t.length?nY(t,Iz(e,2)):[]}var dY,pY=t(()=>{Mz(),sY(),Ae(uY,"uniqBy"),dY=uY});function gY(t){var e=++fY;return mP(t)+e}var fY,mY,yY=t(()=>{yP(),fY=0,Ae(gY,"uniqueId"),mY=gY});function vY(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{Ae(vY,"baseZipObject"),xY=vY});function wY(t,e){return xY(t||[],e||[],Y7)}var kY,TY=t(()=>{H7(),bY(),Ae(wY,"zipObject"),kY=wY}),_Y=t(()=>{eP(),KF(),JF(),r$(),UT(),iU(),pU(),xU(),kU(),AU(),BU(),qU(),JU(),nG(),uG(),GP(),SU(),gG(),bG(),wG(),MG(),NT(),YG(),XG(),Jk(),tq(),A5(),T5(),sq(),OG(),cq(),tP(),mU(),lG(),fq(),wq(),o8(),_q(),Sq(),kO(),nU(),bj(),$q(),Ij(),Bj(),zj(),qj(),Jj(),tY(),oY(),hY(),yY(),UG(),TY()});function EY(t,e){t[e]?t[e]++:t[e]=1}function CY(t,e){--t[e]||delete t[e]}function SY(t,e,r,n){return e=""+e,r=""+r,!t&&r{_Y(),NY="\0",(IY=class{static{Ae(this,"Graph")}constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=$T(void 0),this._defaultEdgeLabelFn=$T(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[NY]={}),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 E5(t)||(t=$T(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return KO(this._nodes)}sources(){var e=this;return GU(this.nodes(),function(t){return JG(e._in[t])})}sinks(){var e=this;return GU(this.nodes(),function(t){return JG(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1this.removeEdge(this._edgeObjs[t]),"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),v(KO(this._in[t]),e),delete this._in[t],delete this._preds[t],v(KO(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(lq(e))e=NY;else{for(var r=e+="";!lq(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])!==NY)return t}children(t){var e;return lq(t)&&(t=NY),this._isCompound?(e=this._children[t])?KO(e):void 0:t===NY?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return KO(t)}successors(t){if(t=this._sucs[t])return KO(t)}neighbors(t){var e=this.predecessors(t);if(e)return aY(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 s(t){var e=i.parent(t);return void 0===e||n.hasNode(e)?a[t]=e:e in a?a[e]:s(e)}return Ae(s,"findParent"),this._isCompound&&v(n.nodes(),function(t){n.setParent(t,s(t))}),n}setDefaultEdgeLabel(t){return E5(t)||(t=$T(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return zG(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Pj(t,function(t,e){return 1{MY()});function DY(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function OY(t,e){if("_next"!==t&&"_prev"!==t)return e}var PY,BY=t(()=>{PY=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 DY(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&DY(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,OY)),r=r._prev;return"["+t.join(", ")+"]"}},Ae(DY,"unlink"),Ae(OY,"filterOutLinks")});function FY(e,t){return e.nodeCount()<=1?[]:(t=$Y((t=UY(e,t||qY)).graph,t.buckets,t.zeroIdx),UP(x(t,function(t){return e.outEdges(t.v,t.w)})))}function $Y(t,e,r){for(var n,i=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)zY(t,e,r,n);for(;n=a.dequeue();)zY(t,e,r,n);if(t.nodeCount())for(var o=e.length-2;0{_Y(),RY(),BY(),qY=$T(1),Ae(FY,"greedyFAS"),Ae($Y,"doGreedyFAS"),Ae(zY,"removeNode"),Ae(UY,"buildState"),Ae(GY,"assignBucket")});function YY(r){var t="greedy"===r.graph().acyclicer?FY(r,e(r)):HY(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,mY("rev"))}),Ae(e,"weightFn")}function HY(e){var r=[],n={},i={};function a(t){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,n[t]=!0,v(e.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(n,t.w)?r.push(t):a(t.w)}),delete n[t])}return Ae(a,"dfs"),v(e.nodes(),a),r}function WY(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 VY=t(()=>{_Y(),jY(),Ae(YY,"run"),Ae(HY,"dfsFAS"),Ae(WY,"undo")});function XY(t,e,r,n){for(var i;i=mY(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function KY(n){var i=(new IY).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 ZY(e){var r=new IY({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 QY(t,e){var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:n+r,y:i+t};throw new Error("Not possible to find intersection inside of the rectangle")}function JY(n){var i=x(Lj(nH(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;lq(r)||(i[r][e.order]=t)}),i}function tH(e){var r=Tq(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),IG(t,"rank")&&(t.rank-=r)})}function eH(r){var n=Tq(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),s=r.graph().nodeRankFactor;v(i,function(t,e){lq(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function rH(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),XY(t,"border",i,e)}function nH(e){return bq(x(e.nodes(),function(t){if(t=e.node(t).rank,!lq(t))return t}))}function iH(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function aH(t,e){var r=Zz();try{return e()}finally{console.log(t+" time: "+(Zz()-r)+"ms")}}function sH(t,e){return e()}var oH=t(()=>{_Y(),RY(),Ae(XY,"addDummyNode"),Ae(KY,"simplify"),Ae(ZY,"asNonCompoundGraph"),Ae(QY,"intersectRect"),Ae(JY,"buildLayerMatrix"),Ae(tH,"normalizeRanks"),Ae(eH,"removeEmptyRanks"),Ae(rH,"addBorderNode"),Ae(nH,"maxRank"),Ae(iH,"partition"),Ae(aH,"time"),Ae(sH,"notime")});function lH(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n{_Y(),oH(),Ae(lH,"addBorderSegments"),Ae(cH,"addBorderNode")});function uH(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||pH(t)}function dH(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||fH(t),"lr"!==e&&"rl"!==e||(yH(t),pH(t))}function pH(e){v(e.nodes(),function(t){gH(e.node(t))}),v(e.edges(),function(t){gH(e.edge(t))})}function gH(t){var e=t.width;t.width=t.height,t.height=e}function fH(e){v(e.nodes(),function(t){mH(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,mH),Object.prototype.hasOwnProperty.call(t,"y")&&mH(t)})}function mH(t){t.y=-t.y}function yH(e){v(e.nodes(),function(t){vH(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,vH),Object.prototype.hasOwnProperty.call(t,"x")&&vH(t)})}function vH(t){var e=t.x;t.x=t.y,t.y=e}var xH=t(()=>{_Y(),Ae(uH,"adjust"),Ae(dH,"undo"),Ae(pH,"swapWidthHeight"),Ae(gH,"swapWidthHeightOne"),Ae(fH,"reverseY"),Ae(mH,"reverseYOne"),Ae(yH,"swapXY"),Ae(vH,"swapXYOne")});function bH(e){e.graph().dummyChains=[],v(e.edges(),function(t){wH(e,t)})}function wH(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var c,h=void 0,u=0;for(++n;n{_Y(),oH(),Ae(bH,"run"),Ae(wH,"normalizeEdge"),Ae(kH,"undo")});function _H(r){var n={};function i(t){var e=r.node(t);return Object.prototype.hasOwnProperty.call(n,t)?e.rank:(n[t]=!0,(t=Tq(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 EH(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var CH=t(()=>{_Y(),Ae(_H,"longestPath"),Ae(EH,"slack")});function SH(t){var e,r=new IY({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});AH(r,t){_Y(),RY(),CH(),Ae(SH,"feasibleTree"),Ae(AH,"tightTree"),Ae(LH,"findMinSlackEdge"),Ae(NH,"shiftRanks")}),MH=t(()=>{}),RH=t(()=>{}),DH=t(()=>{_Y(),RH(),$T(1)}),OH=t(()=>{DH()}),PH=t(()=>{}),BH=t(()=>{PH()}),FH=t(()=>{_Y(),$T(1)});function $H(e){var r={},n={},i=[];function a(t){if(Object.prototype.hasOwnProperty.call(n,t))throw new zH;Object.prototype.hasOwnProperty.call(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),Gj(r)!==e.nodeCount())throw new zH;return i}function zH(){}var UH=t(()=>{_Y(),$H.CycleException=zH,Ae($H,"topsort"),Ae(zH,"CycleException"),zH.prototype=new Error}),GH=t(()=>{UH()});function qH(e,t,r){Kk(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);jH(e,t,"post"===r,a,n,i)}),i}function jH(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){jH(e,t,r,n,i,a)}),r&&a.push(t))}var YH=t(()=>{_Y(),Ae(qH,"dfs"),Ae(jH,"doDfs")});function HH(t,e){return qH(t,e,"post")}var WH=t(()=>{YH(),Ae(HH,"postorder")});function VH(t,e){return qH(t,e,"pre")}var XH=t(()=>{YH(),Ae(VH,"preorder")}),KH=t(()=>{RH(),MY()}),ZH=t(()=>{MH(),DH(),OH(),BH(),FH(),GH(),WH(),XH(),KH(),PH(),UH()});function QH(t){_H(t=KY(t));var e,r=SH(t);for(rW(r),JH(r,t);e=iW(r);)sW(r,t,e,aW(r,t,e))}function JH(e,r){var t=(t=HH(e,e.nodes())).slice(0,t.length-1);v(t,function(t){tW(e,r,t)})}function tW(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=eW(t,e,r)}function eW(n,i,a){var s=n.node(a).parent,o=!0,t=i.edge(a,s),l=0;return t||(o=!1,t=i.edge(s,a)),l=t.weight,v(i.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=i.edge(t).weight,l+=e?t:-t,lW(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function rW(t,e){arguments.length<2&&(e=t.nodes()[0]),nW(t,{},1,e)}function nW(e,r,n,i,t){var a=n,s=e.node(i);return r[i]=!0,v(e.neighbors(i),function(t){Object.prototype.hasOwnProperty.call(r,t)||(n=nW(e,r,n,t,i))}),s.low=a,s.lim=n++,t?s.parent=t:delete s.parent,n}function iW(e){return ZU(e.edges(),function(t){return e.edge(t).cutvalue<0})}function aW(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,s=!1,i=(t.lim>n.lim&&(a=n,s=!0),GU(r.edges(),function(t){return s===cW(0,e.node(t.v),a)&&s!==cW(0,e.node(t.w),a)}));return Cq(i,function(t){return EH(r,t)})}function sW(t,e,r,n){var i=r.v;t.removeEdge(i,r.w),t.setEdge(n.v,n.w,{}),rW(t),JH(t,e),oW(t,e)}function oW(i,a){var t=ZU(i.nodes(),function(t){return!a.node(t).parent}),t=(t=VH(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 lW(t,e,r){return t.hasEdge(e,r)}function cW(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var hW=t(()=>{_Y(),ZH(),oH(),IH(),CH(),QH.initLowLimValues=rW,QH.initCutValues=JH,QH.calcCutValue=eW,QH.leaveEdge=iW,QH.enterEdge=aW,QH.exchangeEdges=sW,Ae(QH,"networkSimplex"),Ae(JH,"initCutValues"),Ae(tW,"assignCutValue"),Ae(eW,"calcCutValue"),Ae(rW,"initLowLimValues"),Ae(nW,"dfsAssignLowLim"),Ae(iW,"leaveEdge"),Ae(aW,"enterEdge"),Ae(sW,"exchangeEdges"),Ae(oW,"updateRanks"),Ae(lW,"isTreeEdge"),Ae(cW,"isDescendant")});function uW(t){switch(t.graph().ranker){case"network-simplex":pW(t);break;case"tight-tree":dW(t);break;case"longest-path":gW(t);break;default:pW(t)}}function dW(t){_H(t),SH(t)}function pW(t){QH(t)}var gW,fW=t(()=>{IH(),hW(),CH(),Ae(uW,"rank"),gW=_H,Ae(dW,"tightTreeRanker"),Ae(pW,"networkSimplexRanker")});function mW(e){var r=XY(e,"root",{},"_root"),n=vW(e),i=bq(zG(n))-1,a=2*i+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),xW(e)+1);v(e.children(),function(t){yW(e,r,a,s,i,n,t)}),e.graph().nodeRankFactor=a}function yW(i,a,s,o,l,c,h){var u,d,t,e=i.children(h);e.length?(u=rH(i,"_bt"),d=rH(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){yW(i,a,s,o,l,c,t);var e=i.node(t),r=e.borderTop||t,n=r!==(t=e.borderBottom||t)?1:l-c[h]+1;i.setEdge(u,r,{weight:e=e.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:e,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:s})}function vW(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 xW(r){return Pj(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function bW(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 wW=t(()=>{_Y(),oH(),Ae(mW,"run"),Ae(yW,"dfs"),Ae(vW,"treeDepths"),Ae(xW,"sumWeights"),Ae(bW,"cleanup")});function kW(i,a,t){var s,o={};v(t,function(t){for(var e,r,n=i.parent(t);n;){if((e=i.parent(n))?(r=o[e],o[e]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=e}})}var TW=t(()=>{_Y(),Ae(kW,"addSubgraphConstraints")});function _W(i,r,a){var s=EW(i),o=new IY({compound:!0}).setGraph({root:s}).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)&&(o.setNode(n),o.setParent(n,e||s),v(i[a](n),function(t){var e=t.v===n?t.w:t.v,r=o.edge(e,n),r=lq(r)?0:r.weight;o.setEdge(e,n,{weight:i.edge(t).weight+r})}),Object.prototype.hasOwnProperty.call(t,"minRank"))&&o.setNode(n,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function EW(t){for(var e;t.hasNode(e=mY("_root")););return e}var CW=t(()=>{_Y(),RY(),Ae(_W,"buildLayerGraph"),Ae(EW,"createRootNode")});function SW(t,e){for(var r=0,n=1;n>1]+=t.weight;o+=t.weight*r})),o}var LW=t(()=>{_Y(),Ae(SW,"crossCount"),Ae(AW,"twoLayerCrossCount")});function NW(r){var n={},t=GU(r.nodes(),function(t){return!r.children(t).length}),e=bq(x(t,function(t){return r.node(t).rank})),i=x(Lj(e+1),function(){return[]});function a(t){var e;IG(n,t)||(n[t]=!0,e=r.node(t),i[e.rank].push(t),v(r.successors(t),a))}return Ae(a,"dfs"),e=Kj(t,function(t){return r.node(t).rank}),v(e,a),i}var IW=t(()=>{_Y(),Ae(NW,"initOrder")});function MW(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=Pj(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 RW=t(()=>{_Y(),Ae(MW,"barycenter")});function DW(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},lq(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];lq(e)||lq(r)||(r.indegree++,e.out.push(n[t.w]))}),OW(GU(n,function(t){return!t.indegree}))}function OW(r){var t=[];function e(e){return function(t){t.merged||(lq(t.barycenter)||lq(e.barycenter)||t.barycenter>=e.barycenter)&&PW(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(GU(t,function(t){return!t.merged}),function(t){return vj(t,["vs","i","barycenter","weight"])})}function PW(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 BW=t(()=>{_Y(),Ae(DW,"resolveConflicts"),Ae(OW,"doResolveConflicts"),Ae(PW,"mergeEntries")});function FW(t,e){var r=(t=iH(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})).lhs,n=Kj(t.rhs,function(t){return-t.i}),i=[],a=0,s=0,o=0,t=(r.sort(zW(!!e)),o=$W(i,n,o),v(r,function(t){o+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=$W(i,n,o)}),{vs:UP(i)});return s&&(t.barycenter=a/s,t.weight=s),t}function $W(t,e,r){for(var n;e.length&&(n=fU(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function zW(r){return function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i}}var UW=t(()=>{_Y(),oH(),Ae(FW,"sort"),Ae($W,"consumeUnsortable"),Ae(zW,"compareWithBias")});function GW(r,t,n,i){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=GU(a,function(t){return t!==s&&t!==o})),MW(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=GW(r,t.v,n,i),l[t.v]=e,Object.prototype.hasOwnProperty.call(e,"barycenter"))&&jW(t,e)}),qW(a=DW(t,n),l),t=FW(a,i),s&&(t.vs=UP([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function qW(t,e){v(t,function(t){t.vs=UP(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function jW(t,e){lq(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 YW=t(()=>{_Y(),RW(),BW(),UW(),Ae(GW,"sortSubgraph"),Ae(qW,"expandSubgraphs"),Ae(jW,"mergeBarycenters")});function HW(t){var e=nH(t),r=WW(t,Lj(1,e+1),"inEdges"),n=WW(t,Lj(e-1,-1,-1),"outEdges");XW(t,NW(t));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){VW(s%2?r:n,2<=s%4);var l,c=SW(t,l=JY(t));c{_Y(),RY(),oH(),TW(),CW(),LW(),IW(),YW(),Ae(HW,"order"),Ae(WW,"buildLayerGraphs"),Ae(VW,"sweepLayerGraphs"),Ae(XW,"assignOrder")});function ZW(c){var h=JW(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=QW(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=i[s])!==a&&c.node(o).maxRanko||l>e[c].lim););for(i=c,c=n;(c=t.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function JW(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 tV=t(()=>{_Y(),Ae(ZW,"parentDummyChains"),Ae(QW,"findPath"),Ae(JW,"postorder")});function eV(c,t){var h={};function e(t,n){var a=0,s=0,o=t.length,l=fU(n);return v(n,function(t,e){var r=nV(c,t),i=r?c.node(r).order:o;!r&&t!==l||(v(n.slice(s,e+1),function(n){v(c.predecessors(n),function(t){var e=c.node(t),r=e.order;!(ri)&&iV(s,t,a)})})}function e(r,n){var i,a=-1,s=0;return v(n,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(i=o.node(t[0]).order,l(n,s,e,a,i),s=e,a=i),l(n,s,n.length,i,r.length)}),n}return Ae(l,"scan"),Ae(e,"visitLayer"),Pj(t,e),s}function nV(e,t){if(e.node(t).dummy)return ZU(e.predecessors(t),function(t){return e.node(t).dummy})}function iV(t,e,r){r{_Y(),RY(),oH(),Ae(eV,"findType1Conflicts"),Ae(rV,"findType2Conflicts"),Ae(nV,"findOtherInnerSegmentNode"),Ae(iV,"addConflict"),Ae(aV,"hasConflict"),Ae(sV,"verticalAlignment"),Ae(oV,"horizontalCompaction"),Ae(lV,"buildBlockGraph"),Ae(cV,"findSmallestWidthAlignment"),Ae(hV,"alignCoordinates"),Ae(uV,"balance"),Ae(dV,"positionX"),Ae(pV,"sep"),Ae(gV,"width")});function mV(r){yV(r=ZY(r)),mG(dV(r),function(t,e){r.node(e).x=t})}function yV(r){var t=JY(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=bq(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var vV=t(()=>{_Y(),oH(),fV(),Ae(mV,"position"),Ae(yV,"positionY")});function xV(e,t){var r=t&&t.debugTiming?aH:sH;r("layout",()=>{var t=r(" buildLayoutGraph",()=>kV(e));r(" runLayout",()=>bV(t,r)),r(" updateInputGraph",()=>wV(e,t))})}function bV(t,e){e(" makeSpaceForEdgeLabels",()=>TV(t)),e(" removeSelfEdges",()=>MV(t)),e(" acyclic",()=>YY(t)),e(" nestingGraph.run",()=>mW(t)),e(" rank",()=>uW(ZY(t))),e(" injectEdgeLabelProxies",()=>_V(t)),e(" removeEmptyRanks",()=>eH(t)),e(" nestingGraph.cleanup",()=>bW(t)),e(" normalizeRanks",()=>tH(t)),e(" assignRankMinMax",()=>EV(t)),e(" removeEdgeLabelProxies",()=>CV(t)),e(" normalize.run",()=>bH(t)),e(" parentDummyChains",()=>ZW(t)),e(" addBorderSegments",()=>lH(t)),e(" order",()=>HW(t)),e(" insertSelfEdges",()=>RV(t)),e(" adjustCoordinateSystem",()=>uH(t)),e(" position",()=>mV(t)),e(" positionSelfEdges",()=>DV(t)),e(" removeBorderNodes",()=>IV(t)),e(" normalize.undo",()=>kH(t)),e(" fixupEdgeLabelCoords",()=>LV(t)),e(" undoCoordinateSystem",()=>dH(t)),e(" translateGraph",()=>SV(t)),e(" assignNodeIntersects",()=>AV(t)),e(" reversePoints",()=>NV(t)),e(" acyclic.undo",()=>WY(t))}function wV(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,Object.prototype.hasOwnProperty.call(t,"x")&&(e.x=t.x,e.y=t.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function kV(r){var n=new IY({multigraph:!0,compound:!0}),t=PV(r.graph());return n.setGraph(a8({},FV,OV(t,BV),vj(t,$V))),v(r.nodes(),function(t){var e=PV(r.node(t));n.setNode(t,eU(OV(e,zV),UV)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=PV(r.edge(t));n.setEdge(t,a8({},qV,OV(e,GV),vj(e,jV)))}),n}function TV(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 _V(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},XY(r,"edge-proxy",e,"_ep"))})}function EV(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=bq(r,t.maxRank))}),e.graph().maxRank=r}function CV(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 SV(e){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=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),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}Ae(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),Object.prototype.hasOwnProperty.call(t,"x")&&l(t)}),i-=r,s-=n,v(e.nodes(),function(t){(t=e.node(t)).x-=i,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=i,t.y-=s}),Object.prototype.hasOwnProperty.call(t,"x")&&(t.x-=i),Object.prototype.hasOwnProperty.call(t,"y")&&(t.y-=s)}),t.width=a-i+r,t.height=o-s+n}function AV(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(QY(n,e)),r.points.push(QY(t,i))})}function LV(r){v(r.edges(),function(t){var e=r.edge(t);if(Object.prototype.hasOwnProperty.call(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function NV(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function IV(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(fU(t.borderLeft)),i=a.node(fU(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 MV(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 RV(i){var t=JY(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){XY(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 DV(s){v(s.nodes(),function(t){var e,r,n,i,a=s.node(t);"selfedge"===a.dummy&&(e=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-e,i=i.height/2,s.setEdge(a.e,a.label),s.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 OV(t,e){return gq(vj(t,e),Number)}function PV(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var BV,FV,$V,zV,UV,GV,qV,jV,YV=t(()=>{_Y(),RY(),hH(),xH(),VY(),TH(),fW(),wW(),KW(),tV(),vV(),oH(),Ae(xV,"layout"),Ae(bV,"runLayout"),Ae(wV,"updateInputGraph"),BV=["nodesep","edgesep","ranksep","marginx","marginy"],FV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$V=["acyclicer","ranker","rankdir","align"],zV=["width","height"],UV={width:0,height:0},GV=["minlen","weight","width","height","labeloffset"],qV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},jV=["labelpos"],Ae(kV,"buildLayoutGraph"),Ae(TV,"makeSpaceForEdgeLabels"),Ae(_V,"injectEdgeLabelProxies"),Ae(EV,"assignRankMinMax"),Ae(CV,"removeEdgeLabelProxies"),Ae(SV,"translateGraph"),Ae(AV,"assignNodeIntersects"),Ae(LV,"fixupEdgeLabelCoords"),Ae(NV,"reversePointsForReversedEdges"),Ae(IV,"removeBorderNodes"),Ae(MV,"removeSelfEdges"),Ae(RV,"insertSelfEdges"),Ae(DV,"positionSelfEdges"),Ae(OV,"selectNumberAttrs"),Ae(PV,"canonicalize")}),HV=t(()=>{VY(),YV(),TH(),fW()});function WV(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:VV(t),edges:XV(t)};return lq(t.graph())||(e.value=XF(t.graph())),e}function VV(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return lq(e)||(t.value=e),lq(r)||(t.parent=r),t})}function XV(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return lq(t.name)||(r.name=t.name),lq(e)||(r.value=e),r})}var KV,ZV,QV,JV,tX,eX,rX,nX,iX,aX,sX,oX,lX,cX,hX,uX=t(()=>{_Y(),MY(),Ae(WV,"write"),Ae(VV,"writeNodes"),Ae(XV,"writeEdges")}),dX=t(()=>{e(),RY(),uX(),KV=new Map,ZV=new Map,QV=new Map,JV=Ae(()=>{ZV.clear(),QV.clear(),KV.clear()},"clear"),tX=Ae((t,e)=>{var r=ZV.get(e)||[];return R.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),eX=Ae((t,e)=>{var r=ZV.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)||tX(t.v,e)||tX(t.w,e)||r.includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),rX=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{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{eX(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"),nX=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)QV.set(i,t),n=[...n,...nX(i,e)];return n},"extractDescendants"),iX=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})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),aX=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 s=aX(n,e,r),o=iX(e,r,s);if(s){if(!(0KV.has(t)&&KV.get(t).externalConnections&&KV.has(t)?KV.get(t).id:t,"getAnchorId"),oX=Ae((a,t)=>{if(!a||10{tX(t.v,e)^tX(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",ZV.get(e)),KV.get(e).externalConnections=!0)})):R.debug("Not a cluster ",e,ZV)});for(var e of KV.keys()){var r=KV.get(e).id;(r=a.parent(r))!==e&&KV.has(r)&&!KV.get(r).externalConnections&&(KV.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,R.warn("Fix XXX",KV,"ids:",t.v,t.w,"Translating: ",KV.get(t.v)," --- ",KV.get(t.w)),(KV.get(t.v)||KV.get(t.w))&&(R.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=sX(t.v),r=sX(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(n=a.parent(e),KV.get(n).externalConnections=!0,i.fromCluster=t.v),r!==t.w&&(n=a.parent(r),KV.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",WV(a)),lX(a,0),R.trace(KV)}},"adjustClustersAndEdges"),lX=Ae((r,n)=>{if(R.warn("extractor - ",n,WV(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=cX(e,t),r=[...r,...t]}),r},"sorter"),hX=Ae(t=>cX(t,t.children()),"sortNodesByHierarchy")}),pX={};SBt(pX,{render:()=>fX});var gX,fX,mX,yX,vX,xX,bX,wX,kX,TX,_X,EX,CX,SX,AX,LX,NX,IX=t(()=>{HV(),uX(),RY(),AD(),i(),dX(),OD(),YR(),SD(),e(),jR(),fh(),gX=Ae(async(t,i,a,s,o,l)=>{R.warn("Graph in recursive render:XAX",WV(i),o);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{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",PV,"ids:",t.v,t.w,"Translating: ",PV.get(t.v),PV.get(t.w)),await QN(r,e)});await Promise.all(t)},"processEdges")(),R.info("Graph before layout:",JSON.stringify(RV(i))),R.info("############################################# XXX"),R.info("### Layout ### XXX"),R.info("############################################# XXX"),aV(i),R.info("Graph after layout:",JSON.stringify(RV(i))),0),p=BA(l).subGraphTitleTotalMargin;return await Promise.all(KV(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)),PV.get(r.id).node=r,gD(r)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=aI(h,e,PV,a,r,t,o);JN(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"),eX=Ae(async(t,e)=>{let l=new yj({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");yI(r,t.markers,t.type,t.diagramId),pD(),KN(),MN(),$V(),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{TD(),e(),rX={},nX=Ae(t=>{for(var e of t)rX[e.name]=e},"registerLayoutLoaders"),Ae(()=>{nX([{name:"dagre",loader:Ae(async()=>Promise.resolve().then(()=>(yX(),JV)),"loader")}])},"registerDefaultLayoutLoaders")(),iX=Ae(async(t,e)=>{var r;if(t.layoutAlgorithm in rX)return(await(r=rX[t.layoutAlgorithm]).loader()).render(t,e,fD,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),aX=Ae((t="",{fallback:e="dagre"}={})=>{if(t in rX)return t;if(e in rX)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")}),xX=t(()=>{tc(),e(),oX=Ae((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:o}=sX(t,e),n=(Wl(t,i,r,n),lX(a,o,r,i,e));t.attr("viewBox",n),R.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),sX=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"),lX=Ae((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),bX=t(()=>{Z3(),fh(),e(),$A(),vX(),xX(),X8(),FA(),cX=Ae(function(t,e){return e.db.getClasses()},"getClasses"),hX=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),PA(e,i)),d=sA(),d=(h.type=n.type,h.layoutAlgorithm=aX(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 iX(h,u),h.config.flowchart?.diagramPadding??8);j8.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),oX(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"),uX={getClasses:cX,draw:hX}}),wX=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,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],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,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],p=[1,61],g=[1,60],f=[1,62],ot=[8,9,11,75,77],st=[1,77],lt=[1,90],ct=[1,95],ht=[1,94],ut=[1,91],dt=[1,87],pt=[1,93],gt=[1,89],ft=[1,96],mt=[1,92],yt=[1,97],vt=[1,88],xt=[8,9,10,11,40,75,77],m=[8,9,10,11,40,46,75,77],y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],bt=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],wt=[44,60,88,101,104,105,108,110,113,114,115],kt=[1,123],Tt=[1,122],Et=[1,130],_t=[1,144],Ct=[1,145],St=[1,146],At=[1,147],Lt=[1,132],Nt=[1,134],It=[1,138],Mt=[1,139],Rt=[1,140],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,148],Ft=[1,149],$t=[1,128],zt=[1,129],Gt=[1,136],Ut=[1,131],qt=[1,135],Yt=[1,133],jt=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],Ht=[1,151],Wt=[1,153],v=[8,9,11],x=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],b=[1,173],w=[1,169],k=[1,170],T=[1,174],E=[1,171],_=[1,172],Vt=[77,115,118],C=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Xt=[10,105],Kt=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],S=[1,242],A=[1,240],L=[1,244],N=[1,238],I=[1,239],M=[1,241],R=[1,243],D=[1,245],Zt=[1,263],Qt=[8,9,11,105],O=[8,9,10,11,60,83,104,105,108,109,110,111],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,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,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],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,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{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",KV,"ids:",t.v,t.w,"Translating: ",KV.get(t.v),KV.get(t.w)),await oD(r,e)});await Promise.all(t)},"processEdges")(),R.info("Graph before layout:",JSON.stringify(WV(i))),R.info("############################################# XXX"),R.info("### Layout ### XXX"),R.info("############################################# XXX"),xV(i),R.info("Graph after layout:",JSON.stringify(WV(i))),0),p=MR(l).subGraphTitleTotalMargin;return await Promise.all(hX(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)),KV.get(r.id).node=r,RD(r)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=gD(h,e,KV,a,r,t,s);lD(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"),fX=Ae(async(t,e)=>{let l=new IY({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");CD(r,t.markers,t.type,t.diagramId),MD(),aD(),UR(),JV(),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,s,o;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),s=structuredClone(t),o=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",o.label="",i.isGroup&&(a.fromCluster=e,o.toCluster=e),o.id=e+"-cyclic-special-2",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,n,s,e+"-cyclic-special-1"),l.setEdge(n,e,o,e+"-cyc{PD(),e(),mX={},yX=Ae(t=>{for(var e of t)mX[e.name]=e},"registerLayoutLoaders"),Ae(()=>{yX([{name:"dagre",loader:Ae(async()=>Promise.resolve().then(()=>(IX(),pX)),"loader")}])},"registerDefaultLayoutLoaders")(),vX=Ae(async(t,e)=>{var r;if(t.layoutAlgorithm in mX)return(await(r=mX[t.layoutAlgorithm]).loader()).render(t,e,DD,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),xX=Ae((t="",{fallback:e="dagre"}={})=>{if(t in mX)return t;if(e in mX)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")}),RX=t(()=>{tc(),e(),bX=Ae((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:s}=wX(t,e),n=(Wl(t,i,r,n),kX(a,s,r,i,e));t.attr("viewBox",n),R.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),wX=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"),kX=Ae((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),DX=t(()=>{Z3(),fh(),e(),qR(),MX(),RX(),K8(),GR(),TX=Ae(function(t,e){return e.db.getClasses()},"getClasses"),_X=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=D(),o;"sandbox"===i&&(o=O("#i"+e));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(R.debug("Before getData: "),n.db.getData()),u=(R.debug("Data: ",h),IR(e,i)),d=rR(),d=(h.type=n.type,h.layoutAlgorithm=xX(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&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 vX(h,u),h.config.flowchart?.diagramPadding??8);H8.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),bX(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"),EX={getClasses:TX,draw:_X}}),OX=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,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],U=[2,2],G=[1,13],q=[1,14],j=[1,15],Y=[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],s=[1,47],o=[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,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],p=[1,61],g=[1,60],f=[1,62],st=[8,9,11,75,77],ot=[1,77],lt=[1,90],ct=[1,95],ht=[1,94],ut=[1,91],dt=[1,87],pt=[1,93],gt=[1,89],ft=[1,96],mt=[1,92],yt=[1,97],vt=[1,88],xt=[8,9,10,11,40,75,77],m=[8,9,10,11,40,46,75,77],y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],bt=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],wt=[44,60,88,101,104,105,108,110,113,114,115],kt=[1,123],Tt=[1,122],_t=[1,130],Et=[1,144],Ct=[1,145],St=[1,146],At=[1,147],Lt=[1,132],Nt=[1,134],It=[1,138],Mt=[1,139],Rt=[1,140],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,148],Ft=[1,149],$t=[1,128],zt=[1,129],Ut=[1,136],Gt=[1,131],qt=[1,135],jt=[1,133],Yt=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],Ht=[1,151],Wt=[1,153],v=[8,9,11],x=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],b=[1,173],w=[1,169],k=[1,170],T=[1,174],_=[1,171],E=[1,172],Vt=[77,115,118],C=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Xt=[10,105],Kt=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],S=[1,242],A=[1,240],L=[1,244],N=[1,238],I=[1,239],M=[1,241],R=[1,243],D=[1,245],Zt=[1,263],Qt=[8,9,11,105],O=[8,9,10,11,60,83,104,105,108,109,110,111],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,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,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],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0e[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"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 97;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118: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:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};B.lexer=F,Ae(P,"Parser"),(dX=new((P.prototype=B).Parser=P)).parser=dX,pX=dX}),kX=t(()=>{xn(),gX=Ae((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),fX=Ae(t=>`.label { +`+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"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 97;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118: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:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};B.lexer=F,Ae(P,"Parser"),(CX=new((P.prototype=B).Parser=P)).parser=CX,SX=CX}),PX=t(()=>{xn(),AX=Ae((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),LX=Ae(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } @@ -539,7 +539,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l /* For html labels only */ .labelBkg { - background-color: ${gX(t.edgeLabelBackground,.5)}; + background-color: ${AX(t.edgeLabelBackground,.5)}; // background-color: } @@ -598,12 +598,12 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } text-align: center; } -`,"getStyles"),mX=fX}),TX={};_Bt(TX,{diagram:()=>EX});var EX,_X,CX,SX,AX,LX,NX,IX,MX,RX,DX,OX,PX,BX,FX,$X,zX,GX,UX=t(()=>{fh(),FA(),bX(),wX(),kX(),EX={parser:pX,db:OA,renderer:uX,styles:mX,init:Ae(t=>{t.flowchart||(t.flowchart={}),t.layout&&mc({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mc({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),OA.clear(),OA.setGen("gen-2")},"init")}}),qX=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"FX});var FX,$X,zX,UX,GX,qX,jX,YX,HX,WX,VX,XX,KX,ZX,QX,JX,tK,eK,rK=t(()=>{fh(),GR(),DX(),OX(),PX(),FX={parser:SX,db:NR,renderer:EX,styles:NX,init:Ae(t=>{t.flowchart||(t.flowchart={}),t.layout&&mc({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mc({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),NR.clear(),NR.setGen("gen-2")},"init")}}),nK=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],s=[1,13],o=[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,s){var o=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 10:n.addEntity(a[o-2]);break;case 11:n.addEntity(a[o]);break;case 12:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 13:n.addEntity(a[o-5],a[o-3]);break;case 14:n.addEntity(a[o-3],a[o-1]);break;case 15:case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:case 43:this.$=a[o];break;case 20:case 41:case 42:this.$=a[o].replace(/"/g,"");break;case 21:case 29:this.$=[a[o]];break;case 22:a[o].push(a[o-1]),this.$=a[o];break;case 23:this.$={attributeType:a[o-1],attributeName:a[o]};break;case 24:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeKeyTypeList:a[o]};break;case 25:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeComment:a[o]};break;case 26:this.$={attributeType:a[o-3],attributeName:a[o-2],attributeKeyTypeList:a[o-1],attributeComment:a[o]};break;case 27:case 28:case 31:this.$=a[o];break;case 30:a[o-2].push(a[o]),this.$=a[o-2];break;case 32:this.$=a[o].replace(/"/g,"");break;case 33:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-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:s,27:o,28:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:16,11:9,20:n,22:i,24:a,26:s,27:o,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:o,28:l},{16:30,17:[1,31],29:32,30:33,34:f},{11:35,27:o,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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{e(),fh(),gh(),SX=new Map,AX=[],LX={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"},NX={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},IX=Ae(function(t,e=void 0){return SX.has(t)?!SX.get(t).alias&&e&&(SX.get(t).alias=e,R.info(`Add alias '${e}' to entity '${t}'`)):(SX.set(t,{attributes:[],alias:e}),R.info("Added new entity :",t)),SX.get(t)},"addEntity"),MX=Ae(()=>SX,"getEntities"),RX=Ae(function(t,e){let r=IX(t),n;for(n=e.length-1;0<=n;n--)r.attributes.push(e[n]),R.debug("Added attribute ",e[n].attributeName)},"addAttributes"),DX=Ae(function(t,e,r,n){AX.push(t={entityA:t,roleA:e,entityB:r,relSpec:n}),R.debug("Added new relationship :",t)},"addRelationship"),OX=Ae(()=>AX,"getRelationships"),PX=Ae(function(){SX=new Map,AX=[],sc()},"clear"),BX={Cardinality:LX,Identification:NX,getConfig:Ae(()=>D().er,"getConfig"),addEntity:IX,addAttributes:RX,getEntities:MX,addRelationship:DX,getRelationships:OX,clear:PX,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,setDiagramTitle:dc,getDiagramTitle:pc}}),jX=t(()=>{FX={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"},$X=Ae(function(t,e){let r;t.append("defs").append("marker").attr("id",FX.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",FX.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",FX.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",FX.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",FX.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",FX.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",FX.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",FX.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",FX.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",FX.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"),zX={ERMarkers:FX,insertMarkers:$X}}),HX=t(()=>{GX=/^(?:[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 WX(t){return"string"==typeof t&&GX.test(t)}var VX,XX=t(()=>{HX(),Ae(WX,"validate"),VX=WX});function KX(t,e=0){return ZX[t[e+0]]+ZX[t[e+1]]+ZX[t[e+2]]+ZX[t[e+3]]+"-"+ZX[t[e+4]]+ZX[t[e+5]]+"-"+ZX[t[e+6]]+ZX[t[e+7]]+"-"+ZX[t[e+8]]+ZX[t[e+9]]+"-"+ZX[t[e+10]]+ZX[t[e+11]]+ZX[t[e+12]]+ZX[t[e+13]]+ZX[t[e+14]]+ZX[t[e+15]]}var ZX,QX=t(()=>{ZX=[];for(let t=0;t<256;++t)ZX.push((t+256).toString(16).slice(1));Ae(KX,"unsafeStringify")});function JX(t){var e,r;if(VX(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 tK,eK=t(()=>{XX(),Ae(JX,"parse"),tK=JX});function rK(e){e=unescape(encodeURIComponent(e));var r=[];for(let t=0;t{QX(),eK(),Ae(rK,"stringToBytes"),iK="6ba7b810-9dad-11d1-80b4-00c04fd430c8",aK="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Ae(nK,"v35")});function sK(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 lK(t,e){return t<>>32-e}function cK(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>>0;a=i,i=n,n=lK(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 hK,uK,dK,pK=t(()=>{Ae(sK,"f"),Ae(lK,"ROTL"),Ae(cK,"sha1"),hK=cK}),gK=t(()=>{oK(),pK(),uK=nK("v5",80,hK),dK=uK}),fK=t(()=>{gK()});function mK(t="",e=""){var r=t.replace(vK,"");return""+yK(e)+yK(r)+dK(t,NK)}function yK(t=""){return 0{xj(),Z3(),MV(),fh(),e(),X8(),jX(),tc(),Jl(),fK(),vK=/[^\dA-Za-z](\W)*/g,xK={},bK=new Map,wK=Ae(function(t){var e;for(e of Object.keys(t))xK[e]=t[e]},"setConf"),kK=Ae((c,h,t)=>{let u=xK.entityPadding/3,l=xK.entityPadding/3,d=.85*xK.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{let e=h.node().id+"-attr-"+w,r=0,n=Pl(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(xK.minEntityWidth,Math.max(e.width+2*xK.entityPadding,n+l*r)),height:0{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(xK.minEntityHeight,b),h.attr("transform","translate("+i.width/2+","+i.height/2+")");return i},"drawAttributes"),TK=Ae(function(a,o,s){let t=[...o.keys()],l;return t.forEach(function(t){var e=mK(t,"entity"),r=(bK.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",xK.fontSize+"px").text(o.get(t).alias??t),{width:i,height:t}=kK(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"),EK=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"),_K=Ae(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),CK=Ae(function(t,e){return t.forEach(function(t){e.setEdge(bK.get(t.entityA),bK.get(t.entityB),{relationship:t},_K(t))}),t},"addRelationships"),SK=0,AK=Ae(function(t,e,r,n,i){SK++;var r=r.edge(bK.get(e.entityA),bK.get(e.entityB),_K(e)),a=Xb().x(function(t){return t.x}).y(function(t){return t.y}).curve(u4),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",a(r.points)).style("stroke",xK.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let s="";switch(xK.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+"#"+zX.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+zX.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+zX.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+zX.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+s+"#"+zX.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+zX.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+zX.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+zX.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+zX.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+s+"#"+zX.ERMarkers.MD_PARENT_START+")")}let l=o.node().getTotalLength(),c=o.node().getPointAtLength(.5*l),h="rel"+SK,u=e.roleA.split(/
/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",xK.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"),LK=Ae(function(t,e,r,n){xK=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}']`));zX.insertMarkers(o,xK);let s,l=(s=new yj({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:xK.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),TK(o,n.db.getEntities(),s)),c=CK(n.db.getRelationships(),s);aV(s),EK(o,s),c.forEach(function(t){AK(o,t,s,l,n)});var e=xK.diagramPadding,h=(j8.insertTitle(o,"entityTitleText",xK.titleTopMargin,n.db.getDiagramTitle()),o.node().getBBox()),u=h.width+2*e,d=h.height+2*e;Wl(o,d,u,xK.useMaxWidth),o.attr("viewBox",`${h.x-e} ${h.y-e} ${u} `+d)},"draw"),NK="28e9f9db-3c8d-5aa5-9faf-44286ae5937c",Ae(mK,"generateId"),Ae(yK,"strWithHyphen"),IK={setConf:wK,draw:LK}}),OK=t(()=>{MK=Ae(t=>` +`+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{e(),fh(),gh(),UX=new Map,GX=[],qX={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"},jX={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},YX=Ae(function(t,e=void 0){return UX.has(t)?!UX.get(t).alias&&e&&(UX.get(t).alias=e,R.info(`Add alias '${e}' to entity '${t}'`)):(UX.set(t,{attributes:[],alias:e}),R.info("Added new entity :",t)),UX.get(t)},"addEntity"),HX=Ae(()=>UX,"getEntities"),WX=Ae(function(t,e){let r=YX(t),n;for(n=e.length-1;0<=n;n--)r.attributes.push(e[n]),R.debug("Added attribute ",e[n].attributeName)},"addAttributes"),VX=Ae(function(t,e,r,n){GX.push(t={entityA:t,roleA:e,entityB:r,relSpec:n}),R.debug("Added new relationship :",t)},"addRelationship"),XX=Ae(()=>GX,"getRelationships"),KX=Ae(function(){UX=new Map,GX=[],oc()},"clear"),ZX={Cardinality:qX,Identification:jX,getConfig:Ae(()=>D().er,"getConfig"),addEntity:YX,addAttributes:WX,getEntities:HX,addRelationship:VX,getRelationships:XX,clear:KX,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,setDiagramTitle:dc,getDiagramTitle:pc}}),aK=t(()=>{QX={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"},JX=Ae(function(t,e){let r;t.append("defs").append("marker").attr("id",QX.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",QX.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",QX.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",QX.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",QX.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",QX.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",QX.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",QX.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",QX.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",QX.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"),tK={ERMarkers:QX,insertMarkers:JX}}),sK=t(()=>{eK=/^(?:[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 oK(t){return"string"==typeof t&&eK.test(t)}var lK,cK=t(()=>{sK(),Ae(oK,"validate"),lK=oK});function hK(t,e=0){return uK[t[e+0]]+uK[t[e+1]]+uK[t[e+2]]+uK[t[e+3]]+"-"+uK[t[e+4]]+uK[t[e+5]]+"-"+uK[t[e+6]]+uK[t[e+7]]+"-"+uK[t[e+8]]+uK[t[e+9]]+"-"+uK[t[e+10]]+uK[t[e+11]]+uK[t[e+12]]+uK[t[e+13]]+uK[t[e+14]]+uK[t[e+15]]}var uK,dK=t(()=>{uK=[];for(let t=0;t<256;++t)uK.push((t+256).toString(16).slice(1));Ae(hK,"unsafeStringify")});function pK(t){var e,r;if(lK(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 gK,fK=t(()=>{cK(),Ae(pK,"parse"),gK=pK});function mK(e){e=unescape(encodeURIComponent(e));var r=[];for(let t=0;t{dK(),fK(),Ae(mK,"stringToBytes"),vK="6ba7b810-9dad-11d1-80b4-00c04fd430c8",xK="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Ae(yK,"v35")});function wK(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 kK(t,e){return t<>>32-e}function TK(r){var o=[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>>0;a=i,i=n,n=kK(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 _K,EK,CK,SK=t(()=>{Ae(wK,"f"),Ae(kK,"ROTL"),Ae(TK,"sha1"),_K=TK}),AK=t(()=>{bK(),SK(),EK=yK("v5",80,_K),CK=EK}),LK=t(()=>{AK()});function NK(t="",e=""){var r=t.replace(MK,"");return""+IK(e)+IK(r)+CK(t,jK)}function IK(t=""){return 0{RY(),Z3(),HV(),fh(),e(),K8(),aK(),tc(),Jl(),LK(),MK=/[^\dA-Za-z](\W)*/g,RK={},DK=new Map,OK=Ae(function(t){var e;for(e of Object.keys(t))RK[e]=t[e]},"setConf"),PK=Ae((c,h,t)=>{let u=RK.entityPadding/3,l=RK.entityPadding/3,d=.85*RK.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{let e=h.node().id+"-attr-"+w,r=0,n=Pl(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),s={};s.tn=i,s.nn=a;var o=i.node().getBBox(),l=a.node().getBBox();m=Math.max(m,o.width),y=Math.max(y,l.width),r=Math.max(o.height,l.height),g&&(o=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(o),o=(s.kn=l).node().getBBox(),v=Math.max(v,o.width),r=Math.max(r,o.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||""),o=(s.cn=l).node().getBBox(),x=Math.max(x,o.width),r=Math.max(r,o.height)),s.height=r,p.push(s),b+=r+2*u,w+=1}),4);g&&(r+=2),f&&(r+=2);var n=m+y+v+x,i={width:Math.max(RK.minEntityWidth,Math.max(e.width+2*RK.entityPadding,n+l*r)),height:0{var e=s+u+t.height/2,r=(t.tn.attr("transform","translate("+l+","+e+")"),c.insert("rect","#"+t.tn.node().id).classed("er "+o,!0).attr("x",0).attr("y",s).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 "+o,!0).attr("x",r).attr("y",s).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 "+o,!0).attr("x",i).attr("y",s).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 "+o,"true").attr("x",i).attr("y",s).attr("width",x+2*l+a).attr("height",t.height+2*u)),s+=t.height+2*u,o="attributeBoxOdd"===o?"attributeBoxEven":"attributeBoxOdd"})}else i.height=Math.max(RK.minEntityHeight,b),h.attr("transform","translate("+i.width/2+","+i.height/2+")");return i},"drawAttributes"),BK=Ae(function(a,s,o){let t=[...s.keys()],l;return t.forEach(function(t){var e=NK(t,"entity"),r=(DK.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",RK.fontSize+"px").text(s.get(t).alias??t),{width:i,height:t}=PK(r,i,s.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();o.setNode(e,{width:r.width,height:r.height,shape:"rect",id:e})}),l},"drawEntities"),FK=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"),$K=Ae(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),zK=Ae(function(t,e){return t.forEach(function(t){e.setEdge(DK.get(t.entityA),DK.get(t.entityB),{relationship:t},$K(t))}),t},"addRelationships"),UK=0,GK=Ae(function(t,e,r,n,i){UK++;var r=r.edge(DK.get(e.entityA),DK.get(e.entityB),$K(e)),a=Xb().x(function(t){return t.x}).y(function(t){return t.y}).curve(u4),s=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",a(r.points)).style("stroke",RK.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&s.attr("stroke-dasharray","8,8");let o="";switch(RK.arrowMarkerAbsolute&&(o=(o=(o=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:s.attr("marker-end","url("+o+"#"+tK.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr("marker-end","url("+o+"#"+tK.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:s.attr("marker-end","url("+o+"#"+tK.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:s.attr("marker-end","url("+o+"#"+tK.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:s.attr("marker-end","url("+o+"#"+tK.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:s.attr("marker-start","url("+o+"#"+tK.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr("marker-start","url("+o+"#"+tK.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:s.attr("marker-start","url("+o+"#"+tK.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:s.attr("marker-start","url("+o+"#"+tK.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:s.attr("marker-start","url("+o+"#"+tK.ERMarkers.MD_PARENT_START+")")}let l=s.node().getTotalLength(),c=s.node().getPointAtLength(.5*l),h="rel"+UK,u=e.roleA.split(/
/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",RK.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"),qK=Ae(function(t,e,r,n){RK=D().er,R.info("Drawing ER diagram");let i=D().securityLevel,a,s=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`));tK.insertMarkers(s,RK);let o,l=(o=new IY({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:RK.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),BK(s,n.db.getEntities(),o)),c=zK(n.db.getRelationships(),o);xV(o),FK(s,o),c.forEach(function(t){GK(s,t,o,l,n)});var e=RK.diagramPadding,h=(H8.insertTitle(s,"entityTitleText",RK.titleTopMargin,n.db.getDiagramTitle()),s.node().getBBox()),u=h.width+2*e,d=h.height+2*e;Wl(s,d,u,RK.useMaxWidth),s.attr("viewBox",`${h.x-e} ${h.y-e} ${u} `+d)},"draw"),jK="28e9f9db-3c8d-5aa5-9faf-44286ae5937c",Ae(NK,"generateId"),Ae(IK,"strWithHyphen"),YK={setConf:OK,draw:qK}}),XK=t(()=>{HK=Ae(t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; @@ -648,68 +648,68 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l stroke-width: 1; } -`,"getStyles"),RK=MK}),PK={};_Bt(PK,{diagram:()=>BK});var BK,FK=t(()=>{qX(),YX(),DK(),OK(),BK={parser:CX,db:BX,renderer:IK,styles:RK}});function $K(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function zK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function GK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function UK(t){return"object"==typeof t&&null!==t&&$K(t.container)&&zK(t.reference)&&"string"==typeof t.message}function qK(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function YK(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function jK(t){return qK(t)&&"string"==typeof t.fullText}var HK,WK=t(()=>{Ae($K,"isAstNode"),Ae(zK,"isReference"),Ae(GK,"isAstNodeDescription"),Ae(UK,"isLinkingError"),HK=class{static{Ae(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return $K(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(qK,"isCompositeCstNode"),Ae(YK,"isLeafCstNode"),Ae(jK,"isRootCstNode")});function VK(t){return"string"==typeof t?t:"u"e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new ZK(()=>({index:0}),t=>t.index({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{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;ZK=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 JK})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=VK(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?JK:{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 JK})}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(!XK(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return JK})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1({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(!XK(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return JK})}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({size:0,state:this.startFn()}),t=>(t.size++,e(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(VK,"toString"),Ae(XK,"isIterable"),QK=new ZK(()=>{},()=>JK),JK=Object.freeze({done:!0,value:void 0}),Ae(KK,"stream"),tZ=class extends ZK{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);0this.nextFn(t.state),"next"),prune:Ae(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=eZ=eZ||{},Ae(t,"sum"),i.sum=t,Ae(e,"product"),i.product=e,Ae(r,"min"),i.min=r,Ae(n,"max"),i.max=n}),nZ={};function iZ(t){return new tZ(t,t=>qK(t)?t.content:[],{includeRoot:!0})}function aZ(t){return iZ(t).filter(YK)}function oZ(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function sZ(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function lZ(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function cZ(t,e){var r;return t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>e.end.character?TZ.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.lineTZ.After}function uZ(t,e,r=EZ){var n;if(t)return 0!t.hidden)-1;0<=t;t--){var n=e.content[t];if(pZ(n,r))return n}}}function pZ(t,e){return YK(t)&&e.includes(t.tokenType.name)}function gZ(t,e){return YK(t)?t:qK(t)&&(t=mZ(t,e,!1))?gZ(t,e):void 0}function fZ(t,e){return YK(t)?t:qK(t)&&(t=mZ(t,e,!0))?fZ(t,e):void 0}function mZ(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 yZ(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0EZ,RangeComparison:()=>TZ,compareRange:()=>cZ,findCommentNode:()=>dZ,findDeclarationNodeAtOffset:()=>uZ,findLeafNodeAtOffset:()=>gZ,findLeafNodeBeforeOffset:()=>fZ,flattenCst:()=>aZ,getInteriorNodes:()=>bZ,getNextNode:()=>vZ,getPreviousNode:()=>yZ,getStartlineNode:()=>xZ,inRange:()=>hZ,isChildNode:()=>oZ,isCommentNode:()=>pZ,streamCst:()=>iZ,toDocumentSegment:()=>lZ,tokenToRange:()=>sZ});var TZ,EZ,_Z=t(()=>{var t;WK(),rZ(),Ae(iZ,"streamCst"),Ae(aZ,"flattenCst"),Ae(oZ,"isChildNode"),Ae(sZ,"tokenToRange"),Ae(lZ,"toDocumentSegment"),(t=TZ=TZ||{})[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(cZ,"compareRange"),Ae(hZ,"inRange"),EZ=/^[\w\p{L}]$/u,Ae(uZ,"findDeclarationNodeAtOffset"),Ae(dZ,"findCommentNode"),Ae(pZ,"isCommentNode"),Ae(gZ,"findLeafNodeAtOffset"),Ae(fZ,"findLeafNodeBeforeOffset"),Ae(mZ,"binarySearch"),Ae(yZ,"getPreviousNode"),Ae(vZ,"getNextNode"),Ae(xZ,"getStartlineNode"),Ae(bZ,"getInteriorNodes"),Ae(wZ,"getCommonParent"),Ae(kZ,"getParentChain")});function CZ(t){throw new Error("Error! The input value was not handled.")}var SZ,AZ=t(()=>{SZ=class extends Error{static{Ae(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},Ae(CZ,"assertUnreachable")}),LZ={};function NZ(t){return vJ.isInstance(t,_Q)}function IZ(t){return vJ.isInstance(t,CQ)}function MZ(t){return vJ.isInstance(t,SQ)}function RZ(t){return DZ(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 DZ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function OZ(t){return vJ.isInstance(t,AQ)}function PZ(t){return vJ.isInstance(t,LQ)}function BZ(t){return vJ.isInstance(t,NQ)}function FZ(t){return vJ.isInstance(t,IQ)}function $Z(t){return vJ.isInstance(t,MQ)}function zZ(t){return vJ.isInstance(t,RQ)}function GZ(t){return vJ.isInstance(t,DQ)}function UZ(t){return vJ.isInstance(t,OQ)}function qZ(t){return vJ.isInstance(t,PQ)}function YZ(t){return vJ.isInstance(t,BQ)}function jZ(t){return vJ.isInstance(t,FQ)}function HZ(t){return vJ.isInstance(t,$Q)}function WZ(t){return vJ.isInstance(t,zQ)}function VZ(t){return vJ.isInstance(t,GQ)}function XZ(t){return vJ.isInstance(t,UQ)}function KZ(t){return vJ.isInstance(t,qQ)}function ZZ(t){return vJ.isInstance(t,YQ)}function QZ(t){return vJ.isInstance(t,jQ)}function JZ(t){return vJ.isInstance(t,HQ)}function tQ(t){return vJ.isInstance(t,WQ)}function eQ(t){return vJ.isInstance(t,VQ)}function rQ(t){return vJ.isInstance(t,XQ)}function nQ(t){return vJ.isInstance(t,KQ)}function iQ(t){return vJ.isInstance(t,ZQ)}function aQ(t){return vJ.isInstance(t,QQ)}function oQ(t){return vJ.isInstance(t,JQ)}function sQ(t){return vJ.isInstance(t,tJ)}function lQ(t){return vJ.isInstance(t,eJ)}function cQ(t){return vJ.isInstance(t,rJ)}function hQ(t){return vJ.isInstance(t,nJ)}function uQ(t){return vJ.isInstance(t,iJ)}function dQ(t){return vJ.isInstance(t,aJ)}function pQ(t){return vJ.isInstance(t,oJ)}function gQ(t){return vJ.isInstance(t,sJ)}function fQ(t){return vJ.isInstance(t,lJ)}function mQ(t){return vJ.isInstance(t,cJ)}function yQ(t){return vJ.isInstance(t,hJ)}function vQ(t){return vJ.isInstance(t,uJ)}function xQ(t){return vJ.isInstance(t,dJ)}function bQ(t){return vJ.isInstance(t,pJ)}function wQ(t){return vJ.isInstance(t,gJ)}function kQ(t){return vJ.isInstance(t,fJ)}function TQ(t){return vJ.isInstance(t,mJ)}_Bt(LZ,{AbstractElement:()=>NQ,AbstractRule:()=>_Q,AbstractType:()=>CQ,Action:()=>tJ,Alternatives:()=>eJ,ArrayLiteral:()=>IQ,ArrayType:()=>MQ,Assignment:()=>rJ,BooleanLiteral:()=>RQ,CharacterRange:()=>nJ,Condition:()=>SQ,Conjunction:()=>DQ,CrossReference:()=>iJ,Disjunction:()=>OQ,EndOfFile:()=>aJ,Grammar:()=>PQ,GrammarImport:()=>BQ,Group:()=>oJ,InferredType:()=>FQ,Interface:()=>$Q,Keyword:()=>sJ,LangiumGrammarAstReflection:()=>yJ,LangiumGrammarTerminals:()=>EQ,NamedArgument:()=>zQ,NegatedToken:()=>lJ,Negation:()=>GQ,NumberLiteral:()=>UQ,Parameter:()=>qQ,ParameterReference:()=>YQ,ParserRule:()=>jQ,ReferenceType:()=>HQ,RegexToken:()=>cJ,ReturnType:()=>WQ,RuleCall:()=>hJ,SimpleType:()=>VQ,StringLiteral:()=>XQ,TerminalAlternatives:()=>uJ,TerminalGroup:()=>dJ,TerminalRule:()=>KQ,TerminalRuleCall:()=>pJ,Type:()=>ZQ,TypeAttribute:()=>QQ,TypeDefinition:()=>AQ,UnionType:()=>JQ,UnorderedGroup:()=>gJ,UntilToken:()=>fJ,ValueLiteral:()=>LQ,Wildcard:()=>mJ,isAbstractElement:()=>BZ,isAbstractRule:()=>NZ,isAbstractType:()=>IZ,isAction:()=>sQ,isAlternatives:()=>lQ,isArrayLiteral:()=>FZ,isArrayType:()=>$Z,isAssignment:()=>cQ,isBooleanLiteral:()=>zZ,isCharacterRange:()=>hQ,isCondition:()=>MZ,isConjunction:()=>GZ,isCrossReference:()=>uQ,isDisjunction:()=>UZ,isEndOfFile:()=>dQ,isFeatureName:()=>RZ,isGrammar:()=>qZ,isGrammarImport:()=>YZ,isGroup:()=>pQ,isInferredType:()=>jZ,isInterface:()=>HZ,isKeyword:()=>gQ,isNamedArgument:()=>WZ,isNegatedToken:()=>fQ,isNegation:()=>VZ,isNumberLiteral:()=>XZ,isParameter:()=>KZ,isParameterReference:()=>ZZ,isParserRule:()=>QZ,isPrimitiveType:()=>DZ,isReferenceType:()=>JZ,isRegexToken:()=>mQ,isReturnType:()=>tQ,isRuleCall:()=>yQ,isSimpleType:()=>eQ,isStringLiteral:()=>rQ,isTerminalAlternatives:()=>vQ,isTerminalGroup:()=>xQ,isTerminalRule:()=>nQ,isTerminalRuleCall:()=>bQ,isType:()=>iQ,isTypeAttribute:()=>aQ,isTypeDefinition:()=>OZ,isUnionType:()=>oQ,isUnorderedGroup:()=>wQ,isUntilToken:()=>kQ,isValueLiteral:()=>PZ,isWildcard:()=>TQ,reflection:()=>vJ});var EQ,_Q,CQ,SQ,AQ,LQ,NQ,IQ,MQ,RQ,DQ,OQ,PQ,BQ,FQ,$Q,zQ,GQ,UQ,qQ,YQ,jQ,HQ,WQ,VQ,XQ,KQ,ZQ,QQ,JQ,tJ,eJ,rJ,nJ,iJ,aJ,oJ,sJ,lJ,cJ,hJ,uJ,dJ,pJ,gJ,fJ,mJ,yJ,vJ,xJ=t(()=>{WK(),EQ={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]*/},_Q="AbstractRule",Ae(NZ,"isAbstractRule"),CQ="AbstractType",Ae(IZ,"isAbstractType"),SQ="Condition",Ae(MZ,"isCondition"),Ae(RZ,"isFeatureName"),Ae(DZ,"isPrimitiveType"),AQ="TypeDefinition",Ae(OZ,"isTypeDefinition"),LQ="ValueLiteral",Ae(PZ,"isValueLiteral"),NQ="AbstractElement",Ae(BZ,"isAbstractElement"),IQ="ArrayLiteral",Ae(FZ,"isArrayLiteral"),MQ="ArrayType",Ae($Z,"isArrayType"),RQ="BooleanLiteral",Ae(zZ,"isBooleanLiteral"),DQ="Conjunction",Ae(GZ,"isConjunction"),OQ="Disjunction",Ae(UZ,"isDisjunction"),PQ="Grammar",Ae(qZ,"isGrammar"),BQ="GrammarImport",Ae(YZ,"isGrammarImport"),FQ="InferredType",Ae(jZ,"isInferredType"),$Q="Interface",Ae(HZ,"isInterface"),zQ="NamedArgument",Ae(WZ,"isNamedArgument"),GQ="Negation",Ae(VZ,"isNegation"),UQ="NumberLiteral",Ae(XZ,"isNumberLiteral"),qQ="Parameter",Ae(KZ,"isParameter"),YQ="ParameterReference",Ae(ZZ,"isParameterReference"),jQ="ParserRule",Ae(QZ,"isParserRule"),HQ="ReferenceType",Ae(JZ,"isReferenceType"),WQ="ReturnType",Ae(tQ,"isReturnType"),VQ="SimpleType",Ae(eQ,"isSimpleType"),XQ="StringLiteral",Ae(rQ,"isStringLiteral"),KQ="TerminalRule",Ae(nQ,"isTerminalRule"),ZQ="Type",Ae(iQ,"isType"),QQ="TypeAttribute",Ae(aQ,"isTypeAttribute"),JQ="UnionType",Ae(oQ,"isUnionType"),tJ="Action",Ae(sQ,"isAction"),eJ="Alternatives",Ae(lQ,"isAlternatives"),rJ="Assignment",Ae(cQ,"isAssignment"),nJ="CharacterRange",Ae(hQ,"isCharacterRange"),iJ="CrossReference",Ae(uQ,"isCrossReference"),aJ="EndOfFile",Ae(dQ,"isEndOfFile"),oJ="Group",Ae(pQ,"isGroup"),sJ="Keyword",Ae(gQ,"isKeyword"),lJ="NegatedToken",Ae(fQ,"isNegatedToken"),cJ="RegexToken",Ae(mQ,"isRegexToken"),hJ="RuleCall",Ae(yQ,"isRuleCall"),uJ="TerminalAlternatives",Ae(vQ,"isTerminalAlternatives"),dJ="TerminalGroup",Ae(xQ,"isTerminalGroup"),pJ="TerminalRuleCall",Ae(bQ,"isTerminalRuleCall"),gJ="UnorderedGroup",Ae(wQ,"isUnorderedGroup"),fJ="UntilToken",Ae(kQ,"isUntilToken"),mJ="Wildcard",Ae(TQ,"isWildcard"),yJ=class extends HK{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 tJ:case eJ:case rJ:case nJ:case iJ:case aJ:case oJ:case sJ:case lJ:case cJ:case hJ:case uJ:case dJ:case pJ:case gJ:case fJ:case mJ:return this.isSubtype(NQ,e);case IQ:case UQ:case XQ:return this.isSubtype(LQ,e);case MQ:case HQ:case VQ:case JQ:return this.isSubtype(AQ,e);case RQ:return this.isSubtype(SQ,e)||this.isSubtype(LQ,e);case DQ:case OQ:case GQ:case YQ:return this.isSubtype(SQ,e);case FQ:case $Q:case ZQ:return this.isSubtype(CQ,e);case jQ:return this.isSubtype(_Q,e)||this.isSubtype(CQ,e);case KQ:return this.isSubtype(_Q,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 CQ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return _Q;case"Grammar:usedGrammars":return PQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return qQ;case"TerminalRuleCall:rule":return KQ;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:[]}}}},vJ=new yJ}),bJ={};function wJ(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{$K(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):$K(t)&&(t.$container=n,t.$containerProperty=r))}function kJ(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function TJ(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function EJ(t){if(t=_J(t).$document)return t;throw new Error("AST node has no document.")}function _J(t){for(;t.$container;)t=t.$container;return t}function CJ(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new ZK(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexCJ(t,e));throw new Error("Root node must be an AstNode.")}function AJ(t,e){if(t)return e?.range&&!LJ(t,e.range)?new tZ(t,()=>[]):new tZ(t,t=>CJ(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function LJ(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&hZ(t,e)}function NJ(a){return new ZK(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{NJ(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),KK(r)}function MJ(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]=RJ(r.defaultValue))}function RJ(t){return Array.isArray(t)?[...t.map(RJ)]:t}function DJ(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if($K(n))i[r]=DJ(n,e);else if(zK(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,o=[];for(a of n)$K(a)?o.push(DJ(a,e)):zK(a)?o.push(e(i,r,a.$refNode,a.$refText)):o.push(a);i[r]=o}else i[r]=n;return wJ(i),i}_Bt(bJ,{assignMandatoryProperties:()=>MJ,copyAstNode:()=>DJ,findLocalReferences:()=>IJ,findRootNode:()=>_J,getContainerOfType:()=>kJ,getDocument:()=>EJ,hasContainerOfType:()=>TJ,linkContentToContainer:()=>wJ,streamAllContents:()=>SJ,streamAst:()=>AJ,streamContents:()=>CJ,streamReferences:()=>NJ});var OJ=t(()=>{WK(),rZ(),_Z(),Ae(wJ,"linkContentToContainer"),Ae(kJ,"getContainerOfType"),Ae(TJ,"hasContainerOfType"),Ae(EJ,"getDocument"),Ae(_J,"findRootNode"),Ae(CJ,"streamContents"),Ae(SJ,"streamAllContents"),Ae(AJ,"streamAst"),Ae(LJ,"isAstNodeInRange"),Ae(NJ,"streamReferences"),Ae(IJ,"findLocalReferences"),Ae(MJ,"assignMandatoryProperties"),Ae(RJ,"copyDefaultValue"),Ae(DJ,"copyAstNode")});function PJ(t){return t.charCodeAt(0)}function BJ(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function FJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function $J(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function zJ(){throw Error("Internal Error - Should never get here!")}function GJ(t){return"Character"===t.type}var UJ,qJ,YJ,jJ,HJ,WJ,VJ,XJ,KJ=t(()=>{Ae(PJ,"cc"),Ae(BJ,"insertToSet"),Ae(FJ,"addFlag"),Ae($J,"ASSERT_EXISTS"),Ae(zJ,"ASSERT_NEVER_REACH_HERE"),Ae(GJ,"isCharacter")}),ZJ=t(()=>{KJ(),UJ=[];for(let t=PJ("0");t<=PJ("9");t++)UJ.push(t);qJ=[PJ("_")].concat(UJ);for(let t=PJ("a");t<=PJ("z");t++)qJ.push(t);for(let t=PJ("A");t<=PJ("Z");t++)qJ.push(t);YJ=[PJ(" "),PJ("\f"),PJ(` -`),PJ("\r"),PJ("\t"),PJ("\v"),PJ("\t"),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ(" "),PJ("\u2028"),PJ("\u2029"),PJ(" "),PJ(" "),PJ(" "),PJ("\ufeff")]}),QJ=t(()=>{KJ(),ZJ(),jJ=/[0-9a-fA-F]/,HJ=/[0-9]/,WJ=/[1-9]/,VJ=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":FJ(r,"global");break;case"i":FJ(r,"ignoreCase");break;case"m":FJ(r,"multiLine");break;case"u":FJ(r,"unicode");break;case"y":FJ(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"}$J(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return zJ()}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;$J(e)}if((!0!==t||void 0!==e)&&$J(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 $J(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):zJ()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[PJ(` -`),PJ("\r"),PJ("\u2028"),PJ("\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=UJ;break;case"D":t=UJ,e=!0;break;case"s":t=YJ;break;case"S":t=YJ,e=!0;break;case"w":t=qJ;break;case"W":t=qJ,e=!0}return $J(t)?{type:"Set",value:t,complement:e}:zJ()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=PJ("\f");break;case"n":t=PJ(` -`);break;case"r":t=PJ("\r");break;case"t":t=PJ("\t");break;case"v":t=PJ("\v")}return $J(t)?{type:"Character",value:t}:zJ()}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:PJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:PJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:PJ(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,GJ(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,GJ(n)){if(n.valueZK});var ZK,QK=t(()=>{nK(),iK(),VK(),XK(),ZK={parser:zX,db:ZX,renderer:YK,styles:WK}});function JK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function tZ(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function eZ(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function rZ(t){return"object"==typeof t&&null!==t&&JK(t.container)&&tZ(t.reference)&&"string"==typeof t.message}function nZ(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function iZ(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function aZ(t){return nZ(t)&&"string"==typeof t.fullText}var sZ,oZ=t(()=>{Ae(JK,"isAstNode"),Ae(tZ,"isReference"),Ae(eZ,"isAstNodeDescription"),Ae(rZ,"isLinkingError"),sZ=class{static{Ae(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return JK(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(nZ,"isCompositeCstNode"),Ae(iZ,"isLeafCstNode"),Ae(aZ,"isRootCstNode")});function lZ(t){return"string"==typeof t?t:"u"e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new uZ(()=>({index:0}),t=>t.index({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{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;uZ=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 pZ})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=lZ(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?pZ:{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 pZ})}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(!cZ(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return pZ})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1({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(!cZ(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return pZ})}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({size:0,state:this.startFn()}),t=>(t.size++,e(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(lZ,"toString"),Ae(cZ,"isIterable"),dZ=new uZ(()=>{},()=>pZ),pZ=Object.freeze({done:!0,value:void 0}),Ae(hZ,"stream"),gZ=class extends uZ{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);0this.nextFn(t.state),"next"),prune:Ae(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=fZ=fZ||{},Ae(t,"sum"),i.sum=t,Ae(e,"product"),i.product=e,Ae(r,"min"),i.min=r,Ae(n,"max"),i.max=n}),yZ={};function vZ(t){return new gZ(t,t=>nZ(t)?t.content:[],{includeRoot:!0})}function xZ(t){return vZ(t).filter(iZ)}function bZ(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function wZ(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function kZ(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function TZ(t,e){var r;return t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>e.end.character?BZ.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.lineBZ.After}function EZ(t,e,r=FZ){var n;if(t)return 0!t.hidden)-1;0<=t;t--){var n=e.content[t];if(SZ(n,r))return n}}}function SZ(t,e){return iZ(t)&&e.includes(t.tokenType.name)}function AZ(t,e){return iZ(t)?t:nZ(t)&&(t=NZ(t,e,!1))?AZ(t,e):void 0}function LZ(t,e){return iZ(t)?t:nZ(t)&&(t=NZ(t,e,!0))?LZ(t,e):void 0}function NZ(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function IZ(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0FZ,RangeComparison:()=>BZ,compareRange:()=>TZ,findCommentNode:()=>CZ,findDeclarationNodeAtOffset:()=>EZ,findLeafNodeAtOffset:()=>AZ,findLeafNodeBeforeOffset:()=>LZ,flattenCst:()=>xZ,getInteriorNodes:()=>DZ,getNextNode:()=>MZ,getPreviousNode:()=>IZ,getStartlineNode:()=>RZ,inRange:()=>_Z,isChildNode:()=>bZ,isCommentNode:()=>SZ,streamCst:()=>vZ,toDocumentSegment:()=>kZ,tokenToRange:()=>wZ});var BZ,FZ,$Z=t(()=>{var t;oZ(),mZ(),Ae(vZ,"streamCst"),Ae(xZ,"flattenCst"),Ae(bZ,"isChildNode"),Ae(wZ,"tokenToRange"),Ae(kZ,"toDocumentSegment"),(t=BZ=BZ||{})[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(TZ,"compareRange"),Ae(_Z,"inRange"),FZ=/^[\w\p{L}]$/u,Ae(EZ,"findDeclarationNodeAtOffset"),Ae(CZ,"findCommentNode"),Ae(SZ,"isCommentNode"),Ae(AZ,"findLeafNodeAtOffset"),Ae(LZ,"findLeafNodeBeforeOffset"),Ae(NZ,"binarySearch"),Ae(IZ,"getPreviousNode"),Ae(MZ,"getNextNode"),Ae(RZ,"getStartlineNode"),Ae(DZ,"getInteriorNodes"),Ae(OZ,"getCommonParent"),Ae(PZ,"getParentChain")});function zZ(t){throw new Error("Error! The input value was not handled.")}var UZ,GZ=t(()=>{UZ=class extends Error{static{Ae(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},Ae(zZ,"assertUnreachable")}),qZ={};function jZ(t){return MJ.isInstance(t,$Q)}function YZ(t){return MJ.isInstance(t,zQ)}function HZ(t){return MJ.isInstance(t,UQ)}function WZ(t){return VZ(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 VZ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function XZ(t){return MJ.isInstance(t,GQ)}function KZ(t){return MJ.isInstance(t,qQ)}function ZZ(t){return MJ.isInstance(t,jQ)}function QZ(t){return MJ.isInstance(t,YQ)}function JZ(t){return MJ.isInstance(t,HQ)}function tQ(t){return MJ.isInstance(t,WQ)}function eQ(t){return MJ.isInstance(t,VQ)}function rQ(t){return MJ.isInstance(t,XQ)}function nQ(t){return MJ.isInstance(t,KQ)}function iQ(t){return MJ.isInstance(t,ZQ)}function aQ(t){return MJ.isInstance(t,QQ)}function sQ(t){return MJ.isInstance(t,JQ)}function oQ(t){return MJ.isInstance(t,tJ)}function lQ(t){return MJ.isInstance(t,eJ)}function cQ(t){return MJ.isInstance(t,rJ)}function hQ(t){return MJ.isInstance(t,nJ)}function uQ(t){return MJ.isInstance(t,iJ)}function dQ(t){return MJ.isInstance(t,aJ)}function pQ(t){return MJ.isInstance(t,sJ)}function gQ(t){return MJ.isInstance(t,oJ)}function fQ(t){return MJ.isInstance(t,lJ)}function mQ(t){return MJ.isInstance(t,cJ)}function yQ(t){return MJ.isInstance(t,hJ)}function vQ(t){return MJ.isInstance(t,uJ)}function xQ(t){return MJ.isInstance(t,dJ)}function bQ(t){return MJ.isInstance(t,pJ)}function wQ(t){return MJ.isInstance(t,gJ)}function kQ(t){return MJ.isInstance(t,fJ)}function TQ(t){return MJ.isInstance(t,mJ)}function _Q(t){return MJ.isInstance(t,yJ)}function EQ(t){return MJ.isInstance(t,vJ)}function CQ(t){return MJ.isInstance(t,xJ)}function SQ(t){return MJ.isInstance(t,bJ)}function AQ(t){return MJ.isInstance(t,wJ)}function LQ(t){return MJ.isInstance(t,kJ)}function NQ(t){return MJ.isInstance(t,TJ)}function IQ(t){return MJ.isInstance(t,_J)}function MQ(t){return MJ.isInstance(t,EJ)}function RQ(t){return MJ.isInstance(t,CJ)}function DQ(t){return MJ.isInstance(t,SJ)}function OQ(t){return MJ.isInstance(t,AJ)}function PQ(t){return MJ.isInstance(t,LJ)}function BQ(t){return MJ.isInstance(t,NJ)}SBt(qZ,{AbstractElement:()=>jQ,AbstractRule:()=>$Q,AbstractType:()=>zQ,Action:()=>gJ,Alternatives:()=>fJ,ArrayLiteral:()=>YQ,ArrayType:()=>HQ,Assignment:()=>mJ,BooleanLiteral:()=>WQ,CharacterRange:()=>yJ,Condition:()=>UQ,Conjunction:()=>VQ,CrossReference:()=>vJ,Disjunction:()=>XQ,EndOfFile:()=>xJ,Grammar:()=>KQ,GrammarImport:()=>ZQ,Group:()=>bJ,InferredType:()=>QQ,Interface:()=>JQ,Keyword:()=>wJ,LangiumGrammarAstReflection:()=>IJ,LangiumGrammarTerminals:()=>FQ,NamedArgument:()=>tJ,NegatedToken:()=>kJ,Negation:()=>eJ,NumberLiteral:()=>rJ,Parameter:()=>nJ,ParameterReference:()=>iJ,ParserRule:()=>aJ,ReferenceType:()=>sJ,RegexToken:()=>TJ,ReturnType:()=>oJ,RuleCall:()=>_J,SimpleType:()=>lJ,StringLiteral:()=>cJ,TerminalAlternatives:()=>EJ,TerminalGroup:()=>CJ,TerminalRule:()=>hJ,TerminalRuleCall:()=>SJ,Type:()=>uJ,TypeAttribute:()=>dJ,TypeDefinition:()=>GQ,UnionType:()=>pJ,UnorderedGroup:()=>AJ,UntilToken:()=>LJ,ValueLiteral:()=>qQ,Wildcard:()=>NJ,isAbstractElement:()=>ZZ,isAbstractRule:()=>jZ,isAbstractType:()=>YZ,isAction:()=>wQ,isAlternatives:()=>kQ,isArrayLiteral:()=>QZ,isArrayType:()=>JZ,isAssignment:()=>TQ,isBooleanLiteral:()=>tQ,isCharacterRange:()=>_Q,isCondition:()=>HZ,isConjunction:()=>eQ,isCrossReference:()=>EQ,isDisjunction:()=>rQ,isEndOfFile:()=>CQ,isFeatureName:()=>WZ,isGrammar:()=>nQ,isGrammarImport:()=>iQ,isGroup:()=>SQ,isInferredType:()=>aQ,isInterface:()=>sQ,isKeyword:()=>AQ,isNamedArgument:()=>oQ,isNegatedToken:()=>LQ,isNegation:()=>lQ,isNumberLiteral:()=>cQ,isParameter:()=>hQ,isParameterReference:()=>uQ,isParserRule:()=>dQ,isPrimitiveType:()=>VZ,isReferenceType:()=>pQ,isRegexToken:()=>NQ,isReturnType:()=>gQ,isRuleCall:()=>IQ,isSimpleType:()=>fQ,isStringLiteral:()=>mQ,isTerminalAlternatives:()=>MQ,isTerminalGroup:()=>RQ,isTerminalRule:()=>yQ,isTerminalRuleCall:()=>DQ,isType:()=>vQ,isTypeAttribute:()=>xQ,isTypeDefinition:()=>XZ,isUnionType:()=>bQ,isUnorderedGroup:()=>OQ,isUntilToken:()=>PQ,isValueLiteral:()=>KZ,isWildcard:()=>BQ,reflection:()=>MJ});var FQ,$Q,zQ,UQ,GQ,qQ,jQ,YQ,HQ,WQ,VQ,XQ,KQ,ZQ,QQ,JQ,tJ,eJ,rJ,nJ,iJ,aJ,sJ,oJ,lJ,cJ,hJ,uJ,dJ,pJ,gJ,fJ,mJ,yJ,vJ,xJ,bJ,wJ,kJ,TJ,_J,EJ,CJ,SJ,AJ,LJ,NJ,IJ,MJ,RJ=t(()=>{oZ(),FQ={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]*/},$Q="AbstractRule",Ae(jZ,"isAbstractRule"),zQ="AbstractType",Ae(YZ,"isAbstractType"),UQ="Condition",Ae(HZ,"isCondition"),Ae(WZ,"isFeatureName"),Ae(VZ,"isPrimitiveType"),GQ="TypeDefinition",Ae(XZ,"isTypeDefinition"),qQ="ValueLiteral",Ae(KZ,"isValueLiteral"),jQ="AbstractElement",Ae(ZZ,"isAbstractElement"),YQ="ArrayLiteral",Ae(QZ,"isArrayLiteral"),HQ="ArrayType",Ae(JZ,"isArrayType"),WQ="BooleanLiteral",Ae(tQ,"isBooleanLiteral"),VQ="Conjunction",Ae(eQ,"isConjunction"),XQ="Disjunction",Ae(rQ,"isDisjunction"),KQ="Grammar",Ae(nQ,"isGrammar"),ZQ="GrammarImport",Ae(iQ,"isGrammarImport"),QQ="InferredType",Ae(aQ,"isInferredType"),JQ="Interface",Ae(sQ,"isInterface"),tJ="NamedArgument",Ae(oQ,"isNamedArgument"),eJ="Negation",Ae(lQ,"isNegation"),rJ="NumberLiteral",Ae(cQ,"isNumberLiteral"),nJ="Parameter",Ae(hQ,"isParameter"),iJ="ParameterReference",Ae(uQ,"isParameterReference"),aJ="ParserRule",Ae(dQ,"isParserRule"),sJ="ReferenceType",Ae(pQ,"isReferenceType"),oJ="ReturnType",Ae(gQ,"isReturnType"),lJ="SimpleType",Ae(fQ,"isSimpleType"),cJ="StringLiteral",Ae(mQ,"isStringLiteral"),hJ="TerminalRule",Ae(yQ,"isTerminalRule"),uJ="Type",Ae(vQ,"isType"),dJ="TypeAttribute",Ae(xQ,"isTypeAttribute"),pJ="UnionType",Ae(bQ,"isUnionType"),gJ="Action",Ae(wQ,"isAction"),fJ="Alternatives",Ae(kQ,"isAlternatives"),mJ="Assignment",Ae(TQ,"isAssignment"),yJ="CharacterRange",Ae(_Q,"isCharacterRange"),vJ="CrossReference",Ae(EQ,"isCrossReference"),xJ="EndOfFile",Ae(CQ,"isEndOfFile"),bJ="Group",Ae(SQ,"isGroup"),wJ="Keyword",Ae(AQ,"isKeyword"),kJ="NegatedToken",Ae(LQ,"isNegatedToken"),TJ="RegexToken",Ae(NQ,"isRegexToken"),_J="RuleCall",Ae(IQ,"isRuleCall"),EJ="TerminalAlternatives",Ae(MQ,"isTerminalAlternatives"),CJ="TerminalGroup",Ae(RQ,"isTerminalGroup"),SJ="TerminalRuleCall",Ae(DQ,"isTerminalRuleCall"),AJ="UnorderedGroup",Ae(OQ,"isUnorderedGroup"),LJ="UntilToken",Ae(PQ,"isUntilToken"),NJ="Wildcard",Ae(BQ,"isWildcard"),IJ=class extends sZ{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 gJ:case fJ:case mJ:case yJ:case vJ:case xJ:case bJ:case wJ:case kJ:case TJ:case _J:case EJ:case CJ:case SJ:case AJ:case LJ:case NJ:return this.isSubtype(jQ,e);case YQ:case rJ:case cJ:return this.isSubtype(qQ,e);case HQ:case sJ:case lJ:case pJ:return this.isSubtype(GQ,e);case WQ:return this.isSubtype(UQ,e)||this.isSubtype(qQ,e);case VQ:case XQ:case eJ:case iJ:return this.isSubtype(UQ,e);case QQ:case JQ:case uJ:return this.isSubtype(zQ,e);case aJ:return this.isSubtype($Q,e)||this.isSubtype(zQ,e);case hJ:return this.isSubtype($Q,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 zQ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return $Q;case"Grammar:usedGrammars":return KQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return nJ;case"TerminalRuleCall:rule":return hJ;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:[]}}}},MJ=new IJ}),DJ={};function OJ(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{JK(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):JK(t)&&(t.$container=n,t.$containerProperty=r))}function PJ(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function BJ(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function FJ(t){if(t=$J(t).$document)return t;throw new Error("AST node has no document.")}function $J(t){for(;t.$container;)t=t.$container;return t}function zJ(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new uZ(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexzJ(t,e));throw new Error("Root node must be an AstNode.")}function GJ(t,e){if(t)return e?.range&&!qJ(t,e.range)?new gZ(t,()=>[]):new gZ(t,t=>zJ(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function qJ(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&_Z(t,e)}function jJ(a){return new uZ(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{jJ(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),hZ(r)}function HJ(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]=WJ(r.defaultValue))}function WJ(t){return Array.isArray(t)?[...t.map(WJ)]:t}function VJ(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(JK(n))i[r]=VJ(n,e);else if(tZ(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)JK(a)?s.push(VJ(a,e)):tZ(a)?s.push(e(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return OJ(i),i}SBt(DJ,{assignMandatoryProperties:()=>HJ,copyAstNode:()=>VJ,findLocalReferences:()=>YJ,findRootNode:()=>$J,getContainerOfType:()=>PJ,getDocument:()=>FJ,hasContainerOfType:()=>BJ,linkContentToContainer:()=>OJ,streamAllContents:()=>UJ,streamAst:()=>GJ,streamContents:()=>zJ,streamReferences:()=>jJ});var XJ=t(()=>{oZ(),mZ(),$Z(),Ae(OJ,"linkContentToContainer"),Ae(PJ,"getContainerOfType"),Ae(BJ,"hasContainerOfType"),Ae(FJ,"getDocument"),Ae($J,"findRootNode"),Ae(zJ,"streamContents"),Ae(UJ,"streamAllContents"),Ae(GJ,"streamAst"),Ae(qJ,"isAstNodeInRange"),Ae(jJ,"streamReferences"),Ae(YJ,"findLocalReferences"),Ae(HJ,"assignMandatoryProperties"),Ae(WJ,"copyDefaultValue"),Ae(VJ,"copyAstNode")});function KJ(t){return t.charCodeAt(0)}function ZJ(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function QJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function JJ(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function ttt(){throw Error("Internal Error - Should never get here!")}function ett(t){return"Character"===t.type}var rtt,ntt,itt,att,stt,ott,ltt,ctt,htt=t(()=>{Ae(KJ,"cc"),Ae(ZJ,"insertToSet"),Ae(QJ,"addFlag"),Ae(JJ,"ASSERT_EXISTS"),Ae(ttt,"ASSERT_NEVER_REACH_HERE"),Ae(ett,"isCharacter")}),utt=t(()=>{htt(),rtt=[];for(let t=KJ("0");t<=KJ("9");t++)rtt.push(t);ntt=[KJ("_")].concat(rtt);for(let t=KJ("a");t<=KJ("z");t++)ntt.push(t);for(let t=KJ("A");t<=KJ("Z");t++)ntt.push(t);itt=[KJ(" "),KJ("\f"),KJ(` +`),KJ("\r"),KJ("\t"),KJ("\v"),KJ("\t"),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ(" "),KJ("\u2028"),KJ("\u2029"),KJ(" "),KJ(" "),KJ(" "),KJ("\ufeff")]}),dtt=t(()=>{htt(),utt(),att=/[0-9a-fA-F]/,stt=/[0-9]/,ott=/[1-9]/,ltt=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":QJ(r,"global");break;case"i":QJ(r,"ignoreCase");break;case"m":QJ(r,"multiLine");break;case"u":QJ(r,"unicode");break;case"y":QJ(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"}JJ(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return ttt()}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;JJ(e)}if((!0!==t||void 0!==e)&&JJ(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 JJ(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):ttt()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[KJ(` +`),KJ("\r"),KJ("\u2028"),KJ("\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=rtt;break;case"D":t=rtt,e=!0;break;case"s":t=itt;break;case"S":t=itt,e=!0;break;case"w":t=ntt;break;case"W":t=ntt,e=!0}return JJ(t)?{type:"Set",value:t,complement:e}:ttt()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=KJ("\f");break;case"n":t=KJ(` +`);break;case"r":t=KJ("\r");break;case"t":t=KJ("\t");break;case"v":t=KJ("\v")}return JJ(t)?{type:"Character",value:t}:ttt()}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:KJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:KJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:KJ(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,ett(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,ett(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),JJ=t(()=>{XJ=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){}}}),ttt=t(()=>{QJ(),JJ()}),ett={};function rtt(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=htt.pattern(t),n=[];for(e of r.value.value)dtt.reset(t),dtt.visit(e),n.push({start:dtt.startRegexp,end:dtt.endRegex});return n}catch{return[]}}function ntt(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),dtt.reset(t),dtt.visit(htt.pattern(t)),dtt.multiline}catch{return!1}}function itt(t){return("string"==typeof t?new RegExp(t):t).test(" ")}function att(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ott(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:att(t)).join("")}function stt(t,e){return t=ltt(t),!!(e=e.match(t))&&0",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)}_Bt(ett,{NEWLINE_REGEXP:()=>ctt,escapeRegExp:()=>att,getCaseInsensitivePattern:()=>ott,getTerminalParts:()=>rtt,isMultilineComment:()=>ntt,isWhitespace:()=>itt,partialMatches:()=>stt,partialRegExp:()=>ltt});var ctt,htt,utt,dtt,ptt=t(()=>{ttt(),ctt=/\r?\n/gm,htt=new VJ,utt=class extends XJ{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=att(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)}},dtt=new utt,Ae(rtt,"getTerminalParts"),Ae(ntt,"isMultilineComment"),Ae(itt,"isWhitespace"),Ae(att,"escapeRegExp"),Ae(ott,"getCaseInsensitivePattern"),Ae(stt,"partialMatches"),Ae(ltt,"partialRegExp")}),gtt={};function ftt(t){return t.rules.find(t=>QZ(t)&&t.entry)}function mtt(t){return t.rules.filter(t=>nQ(t)&&t.hidden)}function ytt(t,e){var r,n=new Set,i=ftt(t);if(!i)return new Set(t.rules);for(r of[i].concat(mtt(t)))vtt(r,n,e);var a,o=new Set;for(a of t.rules)(n.has(a.name)||nQ(a)&&a.hidden)&&o.add(a);return o}function vtt(t,e,r){e.add(t.name),SJ(t).forEach(t=>{(yQ(t)||r&&bQ(t))&&(t=t.rule.ref)&&!e.has(t.name)&&vtt(t,e,r)})}function xtt(t){return t.terminal||(t.type.ref?Att(t.type.ref)?.terminal:void 0)}function btt(t){return t.hidden&&!Utt(t).test(" ")}function wtt(t,e){return t&&e?Ttt(t,e,t.astNode,!0):[]}function ktt(t,e,r){return t&&e&&0!==(e=Ttt(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function Ttt(t,e,r,n){return!n&&(n=kJ(t.grammarSource,cQ))&&n.feature===e?[t]:qK(t)&&t.astNode===r?t.content.flatMap(t=>Ttt(t,e,r,!1)):[]}function Ett(t,e){return t?Ctt(t,e,t?.astNode):[]}function _tt(t,e,r){return t&&0!==(e=Ctt(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function Ctt(t,e,r){if(t.astNode!==r)return[];if(gQ(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=iZ(t).iterator(),o=[];(i=a.next()).done||((n=i.value).astNode===r?gQ(n.grammarSource)&&n.grammarSource.value===e&&o.push(n):a.prune()),!i.done;);return o}function Stt(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=kJ(t.grammarSource,cQ);if(r)return r;t=t.container}}function Att(t){let e=t;return jZ(e)&&(sQ(e.$container)?e=e.$container.$container:QZ(e.$container)?e=e.$container:CZ(e.$container)),Ltt(t,e,new Map)}function Ltt(n,t,i){var e,r;function a(t,e){let r;return kJ(t,cQ)||(r=Ltt(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 SJ(t)){if(cQ(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(yQ(r)&&QZ(r.rule.ref))return a(r,r.rule.ref);if(eQ(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function Ntt(e){var t=e.$container;if(pQ(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(sQ(n))return n;if(n=SJ(r[t]).find(sQ))return n}}if(BZ(t))return Ntt(t)}function Itt(t,e){return"?"===t||"*"===t||pQ(e)&&!!e.guardCondition}function Mtt(t){return"*"===t||"+"===t}function Rtt(t){return"+="===t}function Dtt(t){return Ott(t,new Set)}function Ott(t,e){if(e.has(t))return!0;e.add(t);for(var r of SJ(t))if(yQ(r)){if(!r.rule.ref||QZ(r.rule.ref)&&!Ott(r.rule.ref,e))return!1}else{if(cQ(r))return!1;if(sQ(r))return!1}return!!t.definition}function Ptt(t){return Btt(t.type,new Set)}function Btt(t,e){return!!e.has(t)||(e.add(t),!$Z(t)&&!JZ(t)&&(oQ(t)?t.types.every(t=>Btt(t,e)):!!eQ(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!iQ(t=t.typeRef.ref)&&Btt(t.type,e))))}function Ftt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(QZ(t)||HZ(t)||iQ(t))?t.name:void 0)}function $tt(t){if(QZ(t))return Dtt(t)||null==(e=Ftt(t))?t.name:e;if(HZ(t)||iQ(t)||tQ(t))return t.name;if(sQ(t)){var e=ztt(t);if(e)return e}else if(jZ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function ztt(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?$tt(t.type.ref):void 0}function Gtt(t){var e;return nQ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":Dtt(t)||null==(e=Ftt(t))?t.name:e}function Utt(t){var t=qtt(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 qtt(t,e){if(vQ(t))return Ytt(t);if(xQ(t))return jtt(t);if(hQ(t))return Vtt(t);if(bQ(t)){var r=t.rule.ref;if(r)return Ktt(qtt(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(fQ(t))return Wtt(t);if(kQ(t))return Htt(t);var n;if(mQ(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")),Ktt(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(TQ(t))return Ktt(Ztt,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function Ytt(t){return Ktt(t.elements.map(t=>qtt(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function jtt(t){return Ktt(t.elements.map(t=>qtt(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function Htt(t){return Ktt(Ztt+"*?"+qtt(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function Wtt(t){return Ktt(`(?!${qtt(t.terminal)})${Ztt}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Vtt(t){return t.right?Ktt(`[${Xtt(t.left)}-${Xtt(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Ktt(Xtt(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function Xtt(t){return att(t.value)}function Ktt(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}_Bt(gtt,{findAssignment:()=>Stt,findNameAssignment:()=>Att,findNodeForKeyword:()=>_tt,findNodeForProperty:()=>ktt,findNodesForKeyword:()=>Ett,findNodesForKeywordInternal:()=>Ctt,findNodesForProperty:()=>wtt,getActionAtElement:()=>Ntt,getActionType:()=>ztt,getAllReachableRules:()=>ytt,getCrossReferenceTerminal:()=>xtt,getEntryRule:()=>ftt,getExplicitRuleType:()=>Ftt,getHiddenRules:()=>mtt,getRuleType:()=>Gtt,getTypeName:()=>$tt,isArrayCardinality:()=>Mtt,isArrayOperator:()=>Rtt,isCommentTerminal:()=>btt,isDataType:()=>Ptt,isDataTypeRule:()=>Dtt,isOptionalCardinality:()=>Itt,terminalRegex:()=>Utt});var Ztt,Qtt=t(()=>{AZ(),xJ(),WK(),OJ(),_Z(),ptt(),Ae(ftt,"getEntryRule"),Ae(mtt,"getHiddenRules"),Ae(ytt,"getAllReachableRules"),Ae(vtt,"ruleDfs"),Ae(xtt,"getCrossReferenceTerminal"),Ae(btt,"isCommentTerminal"),Ae(wtt,"findNodesForProperty"),Ae(ktt,"findNodeForProperty"),Ae(Ttt,"findNodesForPropertyInternal"),Ae(Ett,"findNodesForKeyword"),Ae(_tt,"findNodeForKeyword"),Ae(Ctt,"findNodesForKeywordInternal"),Ae(Stt,"findAssignment"),Ae(Att,"findNameAssignment"),Ae(Ltt,"findNameAssignmentInternal"),Ae(Ntt,"getActionAtElement"),Ae(Itt,"isOptionalCardinality"),Ae(Mtt,"isArrayCardinality"),Ae(Rtt,"isArrayOperator"),Ae(Dtt,"isDataTypeRule"),Ae(Ott,"isDataTypeRuleInternal"),Ae(Ptt,"isDataType"),Ae(Btt,"isDataTypeInternal"),Ae(Ftt,"getExplicitRuleType"),Ae($tt,"getTypeName"),Ae(ztt,"getActionType"),Ae(Gtt,"getRuleType"),Ae(Utt,"terminalRegex"),Ztt=/[\s\S]/.source,Ae(qtt,"abstractElementToRegex"),Ae(Ytt,"terminalAlternativesToRegex"),Ae(jtt,"terminalGroupToRegex"),Ae(Htt,"untilTokenToRegex"),Ae(Wtt,"negateTokenToRegex"),Ae(Vtt,"characterRangeToRegex"),Ae(Xtt,"keywordToRegex"),Ae(Ktt,"withCardinality")});function Jtt(t){var e,r=[];for(e of t.Grammar.rules)nQ(e)&&btt(e)&&ntt(Utt(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:EZ}}var tet=t(()=>{_Z(),Qtt(),ptt(),xJ(),Ae(Jtt,"createGrammarConfig")}),eet=t(()=>{});function ret(t){console&&console.error&&console.error("Error: "+t)}function net(t){console&&console.warn&&console.warn("Warning: "+t)}var iet=t(()=>{Ae(ret,"PRINT_ERROR"),Ae(net,"PRINT_WARNING")});function aet(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var oet=t(()=>{Ae(aet,"timer")});function set(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 cet=t(()=>{Ae(set,"toFastProperties")}),het=t(()=>{iet(),oet(),cet()});function uet(t){return det(t)?t.LABEL:t.name}function det(t){return bU(t.LABEL)&&""!==t.LABEL}function pet(t){return x(t,get)}function get(t){function e(t){return x(t,get)}var r,n;if(Ae(e,"convertDefinition"),t instanceof met)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},bU(t.label)&&(r.label=t.label),r;if(t instanceof vet)return{type:"Alternative",definition:e(t.definition)};if(t instanceof xet)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof bet)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof wet)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:get(new _et({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Tet)return{type:"RepetitionWithSeparator",idx:t.idx,separator:get(new _et({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ket)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Eet)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof _et)return r={type:"Terminal",name:t.terminalType.name,label:uet(t.terminalType),idx:t.idx},bU(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=YU(n)?n.source:n),r;if(t instanceof yet)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var fet,met,yet,vet,xet,bet,wet,ket,Tet,Eet,_et,Cet,Aet=t(()=>{hj(),Ae(uet,"tokenLabel"),Ae(det,"hasTokenLabel"),fet=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)})}},met=class extends fet{static{Ae(this,"NonTerminal")}constructor(t){super([]),this.idx=1,zO(this,Eq(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},yet=class extends fet{static{Ae(this,"Rule")}constructor(t){super(t.definition),this.orgText="",zO(this,Eq(t,t=>void 0!==t))}},vet=class extends fet{static{Ae(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,zO(this,Eq(t,t=>void 0!==t))}},xet=class extends fet{static{Ae(this,"Option")}constructor(t){super(t.definition),this.idx=1,zO(this,Eq(t,t=>void 0!==t))}},bet=class extends fet{static{Ae(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,zO(this,Eq(t,t=>void 0!==t))}},wet=class extends fet{static{Ae(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,zO(this,Eq(t,t=>void 0!==t))}},ket=class extends fet{static{Ae(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,zO(this,Eq(t,t=>void 0!==t))}},Tet=class extends fet{static{Ae(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,zO(this,Eq(t,t=>void 0!==t))}},Eet=class extends fet{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,zO(this,Eq(t,t=>void 0!==t))}},_et=class{static{Ae(this,"Terminal")}constructor(t){this.idx=1,zO(this,Eq(t,t=>void 0!==t))}accept(t){t.visit(this)}},Ae(pet,"serializeGrammar"),Ae(get,"serializeProduction")}),Let=t(()=>{Aet(),Cet=class{static{Ae(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case met:return this.visitNonTerminal(e);case vet:return this.visitAlternative(e);case xet:return this.visitOption(e);case bet:return this.visitRepetitionMandatory(e);case wet:return this.visitRepetitionMandatoryWithSeparator(e);case Tet:return this.visitRepetitionWithSeparator(e);case ket:return this.visitRepetition(e);case Eet:return this.visitAlternation(e);case _et:return this.visitTerminal(e);case yet: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 Net(t){return t instanceof vet||t instanceof xet||t instanceof ket||t instanceof bet||t instanceof wet||t instanceof Tet||t instanceof _et||t instanceof yet}function Iet(t,e=[]){return t instanceof xet||t instanceof ket||t instanceof Tet||(t instanceof Eet?DY(t.definition,t=>Iet(t,e)):!(t instanceof met&&NU(e,t))&&t instanceof fet&&(t instanceof met&&e.push(t),TG(t.definition,t=>Iet(t,e))))}function Met(t){return t instanceof Eet}function Ret(t){if(t instanceof met)return"SUBRULE";if(t instanceof xet)return"OPTION";if(t instanceof Eet)return"OR";if(t instanceof bet)return"AT_LEAST_ONE";if(t instanceof wet)return"AT_LEAST_ONE_SEP";if(t instanceof Tet)return"MANY_SEP";if(t instanceof ket)return"MANY";if(t instanceof _et)return"CONSUME";throw Error("non exhaustive match")}var Det=t(()=>{hj(),Aet(),Ae(Net,"isSequenceProd"),Ae(Iet,"isOptionalProd"),Ae(Met,"isBranchingProd"),Ae(Ret,"getProductionDslName")}),Oet=t(()=>{Aet(),Let(),Det()});function Pet(t,e,r){return[new xet({definition:[new _et({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var Bet,Fet=t(()=>{hj(),Oet(),Bet=class{static{Ae(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=aG(r.definition,e+1),t instanceof met)this.walkProdRef(t,e,n);else if(t instanceof _et)this.walkTerminal(t,e,n);else if(t instanceof vet)this.walkFlat(t,e,n);else if(t instanceof xet)this.walkOption(t,e,n);else if(t instanceof bet)this.walkAtLeastOne(t,e,n);else if(t instanceof wet)this.walkAtLeastOneSep(t,e,n);else if(t instanceof Tet)this.walkManySep(t,e,n);else if(t instanceof ket)this.walkMany(t,e,n);else{if(!(t instanceof Eet))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 xet({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=Pet(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new xet({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=Pet(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new vet({definition:[t]}),this.walk(t,n)})}},Ae(Pet,"restForRepetitionWithSeparator")});function $et(t){if(t instanceof met)return $et(t.referencedRule);if(t instanceof _et)return Uet(t);if(Net(t))return zet(t);if(Met(t))return Get(t);throw Error("non exhaustive match")}function zet(t){let e=[],r=t.definition,n=0,i=r.length>n,a,o=!0;for(;i&&o;)a=r[n],o=Iet(a),e=e.concat($et(a)),n+=1,i=r.length>n;return XY(e)}function Get(t){return t=x(t.definition,t=>$et(t)),XY(AP(t))}function Uet(t){return[t.terminalType]}var qet,Yet=t(()=>{hj(),Oet(),Ae($et,"first"),Ae(zet,"firstForSequence"),Ae(Get,"firstForBranching"),Ae(Uet,"firstForTerminal")}),jet=t(()=>{qet="_~IN~_"});function Het(t){let e={};return v(t,t=>{t=new Vet(t).startWalking(),zO(e,t)}),e}function Wet(t,e){return t.name+e+qet}var Vet,Xet=t(()=>{Fet(),Yet(),hj(),jet(),Oet(),Vet=class extends Bet{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=Wet(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=$et(new vet({definition:e})),this.follows[t]=r}},Ae(Het,"computeAllProdsFollows"),Ae(Wet,"buildBetweenProdsFollowPrefix")});function Ket(t){var e,t=t.toString();return Qet.hasOwnProperty(t)?Qet[t]:(e=Jet.pattern(t),Qet[t]=e)}function Zet(){Qet={}}var Qet,Jet,trt=t(()=>{ttt(),Qet={},Jet=new VJ,Ae(Ket,"getRegExpAst"),Ae(Zet,"clearRegExpParserCache")});function ert(t,e=!1){try{var r=Ket(t);return rrt(r.value,{},r.flags.ignoreCase)}catch(r){r.message===lrt?e&&net(`${crt} Unable to optimize: < ${t.toString()} > +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let t=0;t=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),ptt=t(()=>{ctt=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){}}}),gtt=t(()=>{dtt(),ptt()}),ftt={};function mtt(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=_tt.pattern(t),n=[];for(e of r.value.value)Ctt.reset(t),Ctt.visit(e),n.push({start:Ctt.startRegexp,end:Ctt.endRegex});return n}catch{return[]}}function ytt(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),Ctt.reset(t),Ctt.visit(_tt.pattern(t)),Ctt.multiline}catch{return!1}}function vtt(t){return("string"==typeof t?new RegExp(t):t).test(" ")}function xtt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function btt(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:xtt(t)).join("")}function wtt(t,e){return t=ktt(t),!!(e=e.match(t))&&0",s)-s+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:n(1)}return e}return Ae(o,"process"),new RegExp(o(),t.flags)}SBt(ftt,{NEWLINE_REGEXP:()=>Ttt,escapeRegExp:()=>xtt,getCaseInsensitivePattern:()=>btt,getTerminalParts:()=>mtt,isMultilineComment:()=>ytt,isWhitespace:()=>vtt,partialMatches:()=>wtt,partialRegExp:()=>ktt});var Ttt,_tt,Ett,Ctt,Stt=t(()=>{gtt(),Ttt=/\r?\n/gm,_tt=new ltt,Ett=class extends ctt{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=xtt(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)}},Ctt=new Ett,Ae(mtt,"getTerminalParts"),Ae(ytt,"isMultilineComment"),Ae(vtt,"isWhitespace"),Ae(xtt,"escapeRegExp"),Ae(btt,"getCaseInsensitivePattern"),Ae(wtt,"partialMatches"),Ae(ktt,"partialRegExp")}),Att={};function Ltt(t){return t.rules.find(t=>dQ(t)&&t.entry)}function Ntt(t){return t.rules.filter(t=>yQ(t)&&t.hidden)}function Itt(t,e){var r,n=new Set,i=Ltt(t);if(!i)return new Set(t.rules);for(r of[i].concat(Ntt(t)))Mtt(r,n,e);var a,s=new Set;for(a of t.rules)(n.has(a.name)||yQ(a)&&a.hidden)&&s.add(a);return s}function Mtt(t,e,r){e.add(t.name),UJ(t).forEach(t=>{(IQ(t)||r&&DQ(t))&&(t=t.rule.ref)&&!e.has(t.name)&&Mtt(t,e,r)})}function Rtt(t){return t.terminal||(t.type.ref?Gtt(t.type.ref)?.terminal:void 0)}function Dtt(t){return t.hidden&&!ret(t).test(" ")}function Ott(t,e){return t&&e?Btt(t,e,t.astNode,!0):[]}function Ptt(t,e,r){return t&&e&&0!==(e=Btt(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function Btt(t,e,r,n){return!n&&(n=PJ(t.grammarSource,TQ))&&n.feature===e?[t]:nZ(t)&&t.astNode===r?t.content.flatMap(t=>Btt(t,e,r,!1)):[]}function Ftt(t,e){return t?ztt(t,e,t?.astNode):[]}function $tt(t,e,r){return t&&0!==(e=ztt(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function ztt(t,e,r){if(t.astNode!==r)return[];if(AQ(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=vZ(t).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?AQ(n.grammarSource)&&n.grammarSource.value===e&&s.push(n):a.prune()),!i.done;);return s}function Utt(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=PJ(t.grammarSource,TQ);if(r)return r;t=t.container}}function Gtt(t){let e=t;return aQ(e)&&(wQ(e.$container)?e=e.$container.$container:dQ(e.$container)?e=e.$container:zZ(e.$container)),qtt(t,e,new Map)}function qtt(n,t,i){var e,r;function a(t,e){let r;return PJ(t,TQ)||(r=qtt(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 UJ(t)){if(TQ(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(IQ(r)&&dQ(r.rule.ref))return a(r,r.rule.ref);if(fQ(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function jtt(e){var t=e.$container;if(SQ(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(wQ(n))return n;if(n=UJ(r[t]).find(wQ))return n}}if(ZZ(t))return jtt(t)}function Ytt(t,e){return"?"===t||"*"===t||SQ(e)&&!!e.guardCondition}function Htt(t){return"*"===t||"+"===t}function Wtt(t){return"+="===t}function Vtt(t){return Xtt(t,new Set)}function Xtt(t,e){if(e.has(t))return!0;e.add(t);for(var r of UJ(t))if(IQ(r)){if(!r.rule.ref||dQ(r.rule.ref)&&!Xtt(r.rule.ref,e))return!1}else{if(TQ(r))return!1;if(wQ(r))return!1}return!!t.definition}function Ktt(t){return Ztt(t.type,new Set)}function Ztt(t,e){return!!e.has(t)||(e.add(t),!JZ(t)&&!pQ(t)&&(bQ(t)?t.types.every(t=>Ztt(t,e)):!!fQ(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!vQ(t=t.typeRef.ref)&&Ztt(t.type,e))))}function Qtt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(dQ(t)||sQ(t)||vQ(t))?t.name:void 0)}function Jtt(t){if(dQ(t))return Vtt(t)||null==(e=Qtt(t))?t.name:e;if(sQ(t)||vQ(t)||gQ(t))return t.name;if(wQ(t)){var e=tet(t);if(e)return e}else if(aQ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function tet(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?Jtt(t.type.ref):void 0}function eet(t){var e;return yQ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":Vtt(t)||null==(e=Qtt(t))?t.name:e}function ret(t){var t=net(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 net(t,e){if(MQ(t))return iet(t);if(RQ(t))return aet(t);if(_Q(t))return cet(t);if(DQ(t)){var r=t.rule.ref;if(r)return uet(net(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(LQ(t))return oet(t);if(PQ(t))return set(t);var n;if(NQ(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")),uet(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(BQ(t))return uet(det,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function iet(t){return uet(t.elements.map(t=>net(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function aet(t){return uet(t.elements.map(t=>net(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function set(t){return uet(det+"*?"+net(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function oet(t){return uet(`(?!${net(t.terminal)})${det}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function cet(t){return t.right?uet(`[${het(t.left)}-${het(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):uet(het(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function het(t){return xtt(t.value)}function uet(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}SBt(Att,{findAssignment:()=>Utt,findNameAssignment:()=>Gtt,findNodeForKeyword:()=>$tt,findNodeForProperty:()=>Ptt,findNodesForKeyword:()=>Ftt,findNodesForKeywordInternal:()=>ztt,findNodesForProperty:()=>Ott,getActionAtElement:()=>jtt,getActionType:()=>tet,getAllReachableRules:()=>Itt,getCrossReferenceTerminal:()=>Rtt,getEntryRule:()=>Ltt,getExplicitRuleType:()=>Qtt,getHiddenRules:()=>Ntt,getRuleType:()=>eet,getTypeName:()=>Jtt,isArrayCardinality:()=>Htt,isArrayOperator:()=>Wtt,isCommentTerminal:()=>Dtt,isDataType:()=>Ktt,isDataTypeRule:()=>Vtt,isOptionalCardinality:()=>Ytt,terminalRegex:()=>ret});var det,pet=t(()=>{GZ(),RJ(),oZ(),XJ(),$Z(),Stt(),Ae(Ltt,"getEntryRule"),Ae(Ntt,"getHiddenRules"),Ae(Itt,"getAllReachableRules"),Ae(Mtt,"ruleDfs"),Ae(Rtt,"getCrossReferenceTerminal"),Ae(Dtt,"isCommentTerminal"),Ae(Ott,"findNodesForProperty"),Ae(Ptt,"findNodeForProperty"),Ae(Btt,"findNodesForPropertyInternal"),Ae(Ftt,"findNodesForKeyword"),Ae($tt,"findNodeForKeyword"),Ae(ztt,"findNodesForKeywordInternal"),Ae(Utt,"findAssignment"),Ae(Gtt,"findNameAssignment"),Ae(qtt,"findNameAssignmentInternal"),Ae(jtt,"getActionAtElement"),Ae(Ytt,"isOptionalCardinality"),Ae(Htt,"isArrayCardinality"),Ae(Wtt,"isArrayOperator"),Ae(Vtt,"isDataTypeRule"),Ae(Xtt,"isDataTypeRuleInternal"),Ae(Ktt,"isDataType"),Ae(Ztt,"isDataTypeInternal"),Ae(Qtt,"getExplicitRuleType"),Ae(Jtt,"getTypeName"),Ae(tet,"getActionType"),Ae(eet,"getRuleType"),Ae(ret,"terminalRegex"),det=/[\s\S]/.source,Ae(net,"abstractElementToRegex"),Ae(iet,"terminalAlternativesToRegex"),Ae(aet,"terminalGroupToRegex"),Ae(set,"untilTokenToRegex"),Ae(oet,"negateTokenToRegex"),Ae(cet,"characterRangeToRegex"),Ae(het,"keywordToRegex"),Ae(uet,"withCardinality")});function get(t){var e,r=[];for(e of t.Grammar.rules)yQ(e)&&Dtt(e)&&ytt(ret(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:FZ}}var fet=t(()=>{$Z(),pet(),Stt(),RJ(),Ae(get,"createGrammarConfig")}),met=t(()=>{});function yet(t){console&&console.error&&console.error("Error: "+t)}function vet(t){console&&console.warn&&console.warn("Warning: "+t)}var xet=t(()=>{Ae(yet,"PRINT_ERROR"),Ae(vet,"PRINT_WARNING")});function bet(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var wet=t(()=>{Ae(bet,"timer")});function ket(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 Tet=t(()=>{Ae(ket,"toFastProperties")}),_et=t(()=>{xet(),wet(),Tet()});function Eet(t){return Cet(t)?t.LABEL:t.name}function Cet(t){return DG(t.LABEL)&&""!==t.LABEL}function Aet(t){return x(t,Let)}function Let(t){function e(t){return x(t,Let)}var r,n;if(Ae(e,"convertDefinition"),t instanceof Iet)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},DG(t.label)&&(r.label=t.label),r;if(t instanceof Ret)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Det)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Oet)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Pet)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Let(new zet({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Fet)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Let(new zet({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Bet)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof $et)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof zet)return r={type:"Terminal",name:t.terminalType.name,label:Eet(t.terminalType),idx:t.idx},DG(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=iq(n)?n.source:n),r;if(t instanceof Met)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var Net,Iet,Met,Ret,Det,Oet,Pet,Bet,Fet,$et,zet,Uet,Get=t(()=>{_Y(),Ae(Eet,"tokenLabel"),Ae(Cet,"hasTokenLabel"),Net=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)})}},Iet=class extends Net{static{Ae(this,"NonTerminal")}constructor(t){super([]),this.idx=1,JO(this,Fq(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Met=class extends Net{static{Ae(this,"Rule")}constructor(t){super(t.definition),this.orgText="",JO(this,Fq(t,t=>void 0!==t))}},Ret=class extends Net{static{Ae(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,JO(this,Fq(t,t=>void 0!==t))}},Det=class extends Net{static{Ae(this,"Option")}constructor(t){super(t.definition),this.idx=1,JO(this,Fq(t,t=>void 0!==t))}},Oet=class extends Net{static{Ae(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,JO(this,Fq(t,t=>void 0!==t))}},Pet=class extends Net{static{Ae(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,JO(this,Fq(t,t=>void 0!==t))}},Bet=class extends Net{static{Ae(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,JO(this,Fq(t,t=>void 0!==t))}},Fet=class extends Net{static{Ae(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,JO(this,Fq(t,t=>void 0!==t))}},$et=class extends Net{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,JO(this,Fq(t,t=>void 0!==t))}},zet=class{static{Ae(this,"Terminal")}constructor(t){this.idx=1,JO(this,Fq(t,t=>void 0!==t))}accept(t){t.visit(this)}},Ae(Aet,"serializeGrammar"),Ae(Let,"serializeProduction")}),qet=t(()=>{Get(),Uet=class{static{Ae(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case Iet:return this.visitNonTerminal(e);case Ret:return this.visitAlternative(e);case Det:return this.visitOption(e);case Oet:return this.visitRepetitionMandatory(e);case Pet:return this.visitRepetitionMandatoryWithSeparator(e);case Fet:return this.visitRepetitionWithSeparator(e);case Bet:return this.visitRepetition(e);case $et:return this.visitAlternation(e);case zet:return this.visitTerminal(e);case Met: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 jet(t){return t instanceof Ret||t instanceof Det||t instanceof Bet||t instanceof Oet||t instanceof Pet||t instanceof Fet||t instanceof zet||t instanceof Met}function Yet(t,e=[]){return t instanceof Det||t instanceof Bet||t instanceof Fet||(t instanceof $et?Vj(t.definition,t=>Yet(t,e)):!(t instanceof Iet&&jG(e,t))&&t instanceof Net&&(t instanceof Iet&&e.push(t),PU(t.definition,t=>Yet(t,e))))}function Het(t){return t instanceof $et}function Wet(t){if(t instanceof Iet)return"SUBRULE";if(t instanceof Det)return"OPTION";if(t instanceof $et)return"OR";if(t instanceof Oet)return"AT_LEAST_ONE";if(t instanceof Pet)return"AT_LEAST_ONE_SEP";if(t instanceof Fet)return"MANY_SEP";if(t instanceof Bet)return"MANY";if(t instanceof zet)return"CONSUME";throw Error("non exhaustive match")}var Vet=t(()=>{_Y(),Get(),Ae(jet,"isSequenceProd"),Ae(Yet,"isOptionalProd"),Ae(Het,"isBranchingProd"),Ae(Wet,"getProductionDslName")}),Xet=t(()=>{Get(),qet(),Vet()});function Ket(t,e,r){return[new Det({definition:[new zet({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var Zet,Qet=t(()=>{_Y(),Xet(),Zet=class{static{Ae(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=vU(r.definition,e+1),t instanceof Iet)this.walkProdRef(t,e,n);else if(t instanceof zet)this.walkTerminal(t,e,n);else if(t instanceof Ret)this.walkFlat(t,e,n);else if(t instanceof Det)this.walkOption(t,e,n);else if(t instanceof Oet)this.walkAtLeastOne(t,e,n);else if(t instanceof Pet)this.walkAtLeastOneSep(t,e,n);else if(t instanceof Fet)this.walkManySep(t,e,n);else if(t instanceof Bet)this.walkMany(t,e,n);else{if(!(t instanceof $et))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 Det({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=Ket(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new Det({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=Ket(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new Ret({definition:[t]}),this.walk(t,n)})}},Ae(Ket,"restForRepetitionWithSeparator")});function Jet(t){if(t instanceof Iet)return Jet(t.referencedRule);if(t instanceof zet)return rrt(t);if(jet(t))return trt(t);if(Het(t))return ert(t);throw Error("non exhaustive match")}function trt(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=Yet(a),e=e.concat(Jet(a)),n+=1,i=r.length>n;return cY(e)}function ert(t){return t=x(t.definition,t=>Jet(t)),cY(UP(t))}function rrt(t){return[t.terminalType]}var nrt,irt=t(()=>{_Y(),Xet(),Ae(Jet,"first"),Ae(trt,"firstForSequence"),Ae(ert,"firstForBranching"),Ae(rrt,"firstForTerminal")}),art=t(()=>{nrt="_~IN~_"});function srt(t){let e={};return v(t,t=>{t=new lrt(t).startWalking(),JO(e,t)}),e}function ort(t,e){return t.name+e+nrt}var lrt,crt=t(()=>{Qet(),irt(),_Y(),art(),Xet(),lrt=class extends Zet{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=ort(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=Jet(new Ret({definition:e})),this.follows[t]=r}},Ae(srt,"computeAllProdsFollows"),Ae(ort,"buildBetweenProdsFollowPrefix")});function hrt(t){var e,t=t.toString();return drt.hasOwnProperty(t)?drt[t]:(e=prt.pattern(t),drt[t]=e)}function urt(){drt={}}var drt,prt,grt=t(()=>{gtt(),drt={},prt=new ltt,Ae(hrt,"getRegExpAst"),Ae(urt,"clearRegExpParserCache")});function frt(t,e=!1){try{var r=hrt(t);return mrt(r.value,{},r.flags.ignoreCase)}catch(r){r.message===krt?e&&vet(`${Trt} 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.`:"",ret(`${crt} + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",yet(`${Trt} 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 rrt(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t{if("number"==typeof e)nrt(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)nrt(t,i,a);else{for(let t=r.from;t<=r.to&&t=Wrt){var e=r.from>=Wrt?r.from:Wrt,t=r.to,e=Frt(e),n=Frt(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":rrt(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===ort(o)||"Group"!==o.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return CU(i)}function nrt(t,e,r){var n=Frt(t);e[n]=n,!0===r&&irt(t,e)}function irt(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=Frt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=Frt(r.charCodeAt(0))]=t)}function art(t,r){return FG(t.value,t=>{if("number"==typeof t)return NU(r,t);{let e=t;return void 0!==FG(r,t=>e.from<=t&&t<=e.to)}})}function ort(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(Kk(t.value)?TG(t.value,ort):ort(t.value))}function srt(e,t){var r,n;return t instanceof RegExp?(r=Ket(t),(n=new hrt(e)).visit(r),n.found):void 0!==FG(t,t=>NU(e,t.charCodeAt(0)))}var lrt,crt,hrt,urt=t(()=>{ttt(),hj(),het(),trt(),Xrt(),lrt="Complement Sets are not supported for first char optimization",crt=`Unable to use "first char" lexer optimizations: -`,Ae(ert,"getOptimizedStartCodesIndices"),Ae(rrt,"firstCharOptimizedIndices"),Ae(nrt,"addOptimizedIdxToResult"),Ae(irt,"handleIgnoreCase"),Ae(art,"findCode"),Ae(ort,"isWholeOptional"),hrt=class extends XJ{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){NU(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===art(t,this.targetCharCodes)&&(this.found=!0):void 0!==art(t,this.targetCharCodes)&&(this.found=!0)}},Ae(srt,"canMatchCharCode")});function drt(t,i){var e=(i=Uz(i,{useSticky:qrt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:Ae((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{$rt()});let r,n=(e("Reject Lexer.NA",()=>{r=_Y(t,t=>t[zrt]===fnt.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[zrt];if(YU(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||NU(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?Art:Srt)(t):e[1]:e;if(_5(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?Art:Srt)(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)!==fnt.SKIPPED){if(bU(t))return t;if(VU(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return Kk(t)?x(t,t=>DU(r,t)):[DU(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=Prt(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>b(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Drt(t,e)&&srt(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,Mrt),p=x(a,Rrt),g=kY(r,(t,e)=>(e=e.GROUP,bU(e)&&e!==fnt.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=kY(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=Frt(t.PATTERN.charCodeAt(0));Brt(r,e,f[n])}else if(Kk(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=Frt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,Brt(r,t,f[n]))})}else YU(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&ret(`${crt} Unable to analyze < ${t.PATTERN.toString()} > pattern. + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function mrt(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t{if("number"==typeof e)yrt(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)yrt(t,i,a);else{for(let t=r.from;t<=r.to&&t=lnt){var e=r.from>=lnt?r.from:lnt,t=r.to,e=Qrt(e),n=Qrt(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":mrt(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===brt(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return zG(i)}function yrt(t,e,r){var n=Qrt(t);e[n]=n,!0===r&&vrt(t,e)}function vrt(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=Qrt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=Qrt(r.charCodeAt(0))]=t)}function xrt(t,r){return ZU(t.value,t=>{if("number"==typeof t)return jG(r,t);{let e=t;return void 0!==ZU(r,t=>e.from<=t&&t<=e.to)}})}function brt(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(Kk(t.value)?PU(t.value,brt):brt(t.value))}function wrt(e,t){var r,n;return t instanceof RegExp?(r=hrt(t),(n=new _rt(e)).visit(r),n.found):void 0!==ZU(t,t=>jG(e,t.charCodeAt(0)))}var krt,Trt,_rt,Ert=t(()=>{gtt(),_Y(),_et(),grt(),hnt(),krt="Complement Sets are not supported for first char optimization",Trt=`Unable to use "first char" lexer optimizations: +`,Ae(frt,"getOptimizedStartCodesIndices"),Ae(mrt,"firstCharOptimizedIndices"),Ae(yrt,"addOptimizedIdxToResult"),Ae(vrt,"handleIgnoreCase"),Ae(xrt,"findCode"),Ae(brt,"isWholeOptional"),_rt=class extends ctt{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){jG(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===xrt(t,this.targetCharCodes)&&(this.found=!0):void 0!==xrt(t,this.targetCharCodes)&&(this.found=!0)}},Ae(wrt,"canMatchCharCode")});function Crt(t,i){var e=(i=eU(i,{useSticky:nnt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:Ae((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{Jrt()});let r,n=(e("Reject Lexer.NA",()=>{r=$j(t,t=>t[tnt]===Lnt.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[tnt];if(iq(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||jG(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?Grt:Urt)(t):e[1]:e;if(E5(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?Grt:Urt)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==Lnt.SKIPPED){if(DG(t))return t;if(lq(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return Kk(t)?x(t,t=>VG(r,t)):[VG(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>IG(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=Krt(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>IG(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Vrt(t,e)&&wrt(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,Hrt),p=x(a,Wrt),g=Pj(r,(t,e)=>(e=e.GROUP,DG(e)&&e!==Lnt.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=Pj(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=Qrt(t.PATTERN.charCodeAt(0));Zrt(r,e,f[n])}else if(Kk(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=Qrt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,Zrt(r,t,f[n]))})}else iq(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&yet(`${Trt} 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=ert(t.PATTERN,i.ensureOptimizations),$U(e)&&(m=!1),v(e,t=>{Brt(r,t,f[n])})):(i.ensureOptimizations&&ret(`${crt} TokenType: <${t.name}> is using a custom token pattern without providing parameter. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=frt(t.PATTERN,i.ensureOptimizations),JG(e)&&(m=!1),v(e,t=>{Zrt(r,t,f[n])})):(i.ensureOptimizations&&yet(`${Trt} TokenType: <${t.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:n,canBeOptimized:m}}function prt(t,e){let r=[],n=frt(t);r=r.concat(n.errors);var i=(t=mrt(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(grt(i))).concat(krt(i))).concat(Trt(i,e))).concat(Ert(i))}function grt(t){let e=[],r=LG(t,t=>YU(t[zrt]));return e=(e=(e=(e=(e=e.concat(yrt(r))).concat(xrt(r))).concat(brt(r))).concat(wrt(r))).concat(vrt(r))}function frt(t){var e=LG(t,t=>!b(t,zrt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:pnt.MISSING_PATTERN,tokenTypes:[t]})),valid:Qz(t,e)}}function mrt(t){var e=LG(t,t=>(t=t[zrt],!(YU(t)||_5(t)||b(t,"exec")||bU(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:pnt.INVALID_PATTERN,tokenTypes:[t]})),valid:Qz(t,e)}}function yrt(t){class n extends XJ{static{Ae(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=LG(t,t=>{t=t.PATTERN;try{var e=Ket(t),r=new n;return r.visit(e),r.found}catch{return Yrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + 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 Srt(t,e){let r=[],n=Lrt(t);r=r.concat(n.errors);var i=(t=Nrt(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(Art(i))).concat(Prt(i))).concat(Brt(i,e))).concat(Frt(i))}function Art(t){let e=[],r=GU(t,t=>iq(t[tnt]));return e=(e=(e=(e=(e=e.concat(Irt(r))).concat(Rrt(r))).concat(Drt(r))).concat(Ort(r))).concat(Mrt(r))}function Lrt(t){var e=GU(t,t=>!IG(t,tnt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Snt.MISSING_PATTERN,tokenTypes:[t]})),valid:uU(t,e)}}function Nrt(t){var e=GU(t,t=>(t=t[tnt],!(iq(t)||E5(t)||IG(t,"exec")||DG(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:Snt.INVALID_PATTERN,tokenTypes:[t]})),valid:uU(t,e)}}function Irt(t){class n extends ctt{static{Ae(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=GU(t,t=>{t=t.PATTERN;try{var e=hrt(t),r=new n;return r.visit(e),r.found}catch{return ant.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:pnt.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function vrt(t){return t=LG(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:pnt.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function xrt(t){class n extends XJ{static{Ae(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=LG(t,t=>{t=t.PATTERN;try{var e=Ket(t),r=new n;return r.visit(e),r.found}catch{return jrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Snt.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Mrt(t){return t=GU(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Snt.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function Rrt(t){class n extends ctt{static{Ae(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=GU(t,t=>{t=t.PATTERN;try{var e=hrt(t),r=new n;return r.visit(e),r.found}catch{return snt.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:pnt.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function brt(t){return t=LG(t,t=>(t=t[zrt])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:pnt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function wrt(t){let n=[],e=x(t,r=>kY(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||NU(n,e)||e.PATTERN===fnt.NA||(n.push(e),t.push(e)),t),[]));e=UF(e);var r=LG(e,t=>1{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${UG(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:pnt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function krt(t){return t=LG(t,t=>!!b(t,"GROUP")&&(t=t.GROUP)!==fnt.SKIPPED&&t!==fnt.NA&&!bU(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:pnt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function Trt(t,e){return t=LG(t,t=>void 0!==t.PUSH_MODE&&!NU(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:pnt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function Ert(t){let a=[],e=kY(t,(t,e,r)=>{var n=e.PATTERN;return n!==fnt.NA&&(bU(n)?t.push({str:n,idx:r,tokenType:e}):YU(n)&&Crt(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${r.name}<- can never be matched. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Snt.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Drt(t){return t=GU(t,t=>(t=t[tnt])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:Snt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function Ort(t){let n=[],e=x(t,r=>Pj(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||jG(n,e)||e.PATTERN===Lnt.NA||(n.push(e),t.push(e)),t),[]));e=e$(e);var r=GU(e,t=>1{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${eG(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Snt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function Prt(t){return t=GU(t,t=>!!IG(t,"GROUP")&&(t=t.GROUP)!==Lnt.SKIPPED&&t!==Lnt.NA&&!DG(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Snt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function Brt(t,e){return t=GU(t,t=>void 0!==t.PUSH_MODE&&!jG(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:Snt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function Frt(t){let a=[],e=Pj(t,(t,e,r)=>{var n=e.PATTERN;return n!==Lnt.NA&&(DG(n)?t.push({str:n,idx:r,tokenType:e}):iq(n)&&zrt(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${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:pnt.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function _rt(t,e){var r;if(YU(e))return null!==(r=e.exec(t))&&0===r.index;if(_5(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 Crt(e){return void 0===FG([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function Srt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Art(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function Lrt(t,e,r){let i=[];return b(t,Grt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Grt+`> property in its definition -`,type:pnt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),b(t,Urt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Urt+`> property in its definition -`,type:pnt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),b(t,Urt)&&b(t,Grt)&&!b(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${Grt}: <${t.defaultMode}>which does not exist -`,type:pnt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),b(t,Urt)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{VU(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}> -`,type:pnt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):b(e,"LONGER_ALT")&&(t=Kk(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{VU(t)||NU(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:pnt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function Nrt(t,e,r){let n=[],i=!1,a=UF(AP(CU(t.modes))),o=_Y(a,t=>t[zrt]===fnt.NA),s=Prt(r);return e&&v(o,t=>{var e=Drt(t,s);!1!==e?(e={message:Ort(t,e),type:e.issue,tokenType:t},n.push(e)):b(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):srt(s,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:Snt.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function $rt(t,e){var r;if(iq(e))return null!==(r=e.exec(t))&&0===r.index;if(E5(e))return e(t,0,[],{});if(IG(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function zrt(e){return void 0===ZU([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function Urt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Grt(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function qrt(t,e,r){let i=[];return IG(t,ent)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+ent+`> property in its definition +`,type:Snt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),IG(t,rnt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+rnt+`> property in its definition +`,type:Snt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),IG(t,rnt)&&IG(t,ent)&&!IG(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${ent}: <${t.defaultMode}>which does not exist +`,type:Snt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),IG(t,rnt)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{lq(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}> +`,type:Snt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):IG(e,"LONGER_ALT")&&(t=Kk(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{lq(t)||jG(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:Snt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function jrt(t,e,r){let n=[],i=!1,a=e$(UP(zG(t.modes))),s=$j(a,t=>t[tnt]===Lnt.NA),o=Krt(r);return e&&v(s,t=>{var e=Vrt(t,o);!1!==e?(e={message:Xrt(t,e),type:e.issue,tokenType:t},n.push(e)):IG(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):wrt(o,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:pnt.NO_LINE_BREAKS_FLAGS}),n}function Irt(r){let n={},t=BO(r);return v(t,t=>{var e=r[t];if(!Kk(e))throw Error("non exhaustive match");n[t]=[]}),n}function Mrt(t){if(t=t.PATTERN,YU(t))return!1;if(_5(t))return!0;if(b(t,"exec"))return!0;if(bU(t))return!1;throw Error("non exhaustive match")}function Rrt(t){return!(!bU(t)||1!==t.length)&&t.charCodeAt(0)}function Drt(t,e){if(b(t,"LINE_BREAKS"))return!1;if(YU(t.PATTERN)){try{srt(e,t.PATTERN)}catch(t){return{issue:pnt.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(bU(t.PATTERN))return!1;if(Mrt(t))return{issue:pnt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Ort(t,e){if(e.issue===pnt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + for details.`,type:Snt.NO_LINE_BREAKS_FLAGS}),n}function Yrt(r){let n={},t=KO(r);return v(t,t=>{var e=r[t];if(!Kk(e))throw Error("non exhaustive match");n[t]=[]}),n}function Hrt(t){if(t=t.PATTERN,iq(t))return!1;if(E5(t))return!0;if(IG(t,"exec"))return!0;if(DG(t))return!1;throw Error("non exhaustive match")}function Wrt(t){return!(!DG(t)||1!==t.length)&&t.charCodeAt(0)}function Vrt(t,e){if(IG(t,"LINE_BREAKS"))return!1;if(iq(t.PATTERN)){try{wrt(e,t.PATTERN)}catch(t){return{issue:Snt.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(DG(t.PATTERN))return!1;if(Hrt(t))return{issue:Snt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Xrt(t,e){if(e.issue===Snt.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===pnt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Snt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the 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 Prt(t){return x(t,t=>bU(t)?t.charCodeAt(0):t)}function Brt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function Frt(t){return t{ttt(),vnt(),hj(),het(),urt(),trt(),zrt="PATTERN",Grt="defaultMode",Urt="modes",qrt="boolean"==typeof new RegExp("(?:)").sticky,Ae(drt,"analyzeTokenTypes"),Ae(prt,"validatePatterns"),Ae(grt,"validateRegExpPattern"),Ae(frt,"findMissingPatterns"),Ae(mrt,"findInvalidPatterns"),Yrt=/[^\\][$]/,Ae(yrt,"findEndOfInputAnchor"),Ae(vrt,"findEmptyMatchRegExps"),jrt=/[^\\[][\^]|^\^/,Ae(xrt,"findStartOfInputAnchor"),Ae(brt,"findUnsupportedFlags"),Ae(wrt,"findDuplicatePatterns"),Ae(krt,"findInvalidGroupType"),Ae(Trt,"findModesThatDoNotExist"),Ae(Ert,"findUnreachablePatterns"),Ae(_rt,"testTokenType"),Ae(Crt,"noMetaChar"),Ae(Srt,"addStartOfInput"),Ae(Art,"addStickyFlag"),Ae(Lrt,"performRuntimeChecks"),Ae(Nrt,"performWarningRuntimeChecks"),Ae(Irt,"cloneEmptyGroups"),Ae(Mrt,"isCustomPattern"),Ae(Rrt,"isShortPattern"),Hrt={test:Ae(function(e){var r=e.length;for(let t=this.lastIndex;t{t.isParent=0t.CATEGORIES)));var i=Qz(r,e);e=e.concat(i),$U(i)?n=!1:r=i}return e}function tnt(t){v(t,t=>{ant(t)||((unt[hnt]=t).tokenTypeIdx=hnt++),ont(t)&&!Kk(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),ont(t)||(t.CATEGORIES=[]),snt(t)||(t.categoryMatches=[]),lnt(t)||(t.categoryMatchesMap={})})}function ent(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(unt[e].tokenTypeIdx)})})}function rnt(t){v(t,t=>{nnt([],t)})}function nnt(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);NU(e,t)||nnt(e,t)})}function ant(t){return b(t,"tokenTypeIdx")}function ont(t){return b(t,"CATEGORIES")}function snt(t){return b(t,"categoryMatches")}function lnt(t){return b(t,"categoryMatchesMap")}function cnt(t){return b(t,"tokenTypeIdx")}var hnt,unt,dnt,pnt,gnt,fnt,mnt=t(()=>{hj(),Ae(Krt,"tokenStructuredMatcher"),Ae(Zrt,"tokenStructuredMatcherNoCategories"),hnt=1,unt={},Ae(Qrt,"augmentTokenTypes"),Ae(Jrt,"expandCategories"),Ae(tnt,"assignTokenDefaultProps"),Ae(ent,"assignCategoriesTokensProp"),Ae(rnt,"assignCategoriesMapProp"),Ae(nnt,"singleAssignCategoriesToksMap"),Ae(ant,"hasShortKeyProperty"),Ae(ont,"hasCategoriesProperty"),Ae(snt,"hasExtendingTokensTypesProperty"),Ae(lnt,"hasExtendingTokensTypesMapProperty"),Ae(cnt,"isTokenType")}),ynt=t(()=>{dnt={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.`}}}),vnt=t(()=>{var t;Xrt(),hj(),het(),mnt(),ynt(),trt(),(t=pnt=pnt||{})[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",gnt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:dnt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(gnt),(fnt=class{static{Ae(this,"Lexer")}constructor(i,a=gnt){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 <${t}>`),aet(e)),a=10 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=zO({},gnt,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===gnt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Hrt;else if(this.config.lineTerminatorCharacters===gnt.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=Kk(i)?{modes:{defaultMode:PF(i)},defaultMode:Grt}:(t=!1,PF(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Lrt(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Nrt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=_Y(t,t=>VU(t))}),BO(r.modes)),e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(prt(e,n))}),$U(this.lexerDefinitionErrors)){Qrt(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=drt(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=zO({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!$U(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Krt(t){return x(t,t=>DG(t)?t.charCodeAt(0):t)}function Zrt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function Qrt(t){return t{gtt(),Mnt(),_Y(),_et(),Ert(),grt(),tnt="PATTERN",ent="defaultMode",rnt="modes",nnt="boolean"==typeof new RegExp("(?:)").sticky,Ae(Crt,"analyzeTokenTypes"),Ae(Srt,"validatePatterns"),Ae(Art,"validateRegExpPattern"),Ae(Lrt,"findMissingPatterns"),Ae(Nrt,"findInvalidPatterns"),ant=/[^\\][$]/,Ae(Irt,"findEndOfInputAnchor"),Ae(Mrt,"findEmptyMatchRegExps"),snt=/[^\\[][\^]|^\^/,Ae(Rrt,"findStartOfInputAnchor"),Ae(Drt,"findUnsupportedFlags"),Ae(Ort,"findDuplicatePatterns"),Ae(Prt,"findInvalidGroupType"),Ae(Brt,"findModesThatDoNotExist"),Ae(Frt,"findUnreachablePatterns"),Ae($rt,"testTokenType"),Ae(zrt,"noMetaChar"),Ae(Urt,"addStartOfInput"),Ae(Grt,"addStickyFlag"),Ae(qrt,"performRuntimeChecks"),Ae(jrt,"performWarningRuntimeChecks"),Ae(Yrt,"cloneEmptyGroups"),Ae(Hrt,"isCustomPattern"),Ae(Wrt,"isShortPattern"),ont={test:Ae(function(e){var r=e.length;for(let t=this.lastIndex;t{t.isParent=0t.CATEGORIES)));var i=uU(r,e);e=e.concat(i),JG(i)?n=!1:r=i}return e}function fnt(t){v(t,t=>{xnt(t)||((Ent[_nt]=t).tokenTypeIdx=_nt++),bnt(t)&&!Kk(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),bnt(t)||(t.CATEGORIES=[]),wnt(t)||(t.categoryMatches=[]),knt(t)||(t.categoryMatchesMap={})})}function mnt(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(Ent[e].tokenTypeIdx)})})}function ynt(t){v(t,t=>{vnt([],t)})}function vnt(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);jG(e,t)||vnt(e,t)})}function xnt(t){return IG(t,"tokenTypeIdx")}function bnt(t){return IG(t,"CATEGORIES")}function wnt(t){return IG(t,"categoryMatches")}function knt(t){return IG(t,"categoryMatchesMap")}function Tnt(t){return IG(t,"tokenTypeIdx")}var _nt,Ent,Cnt,Snt,Ant,Lnt,Nnt=t(()=>{_Y(),Ae(unt,"tokenStructuredMatcher"),Ae(dnt,"tokenStructuredMatcherNoCategories"),_nt=1,Ent={},Ae(pnt,"augmentTokenTypes"),Ae(gnt,"expandCategories"),Ae(fnt,"assignTokenDefaultProps"),Ae(mnt,"assignCategoriesTokensProp"),Ae(ynt,"assignCategoriesMapProp"),Ae(vnt,"singleAssignCategoriesToksMap"),Ae(xnt,"hasShortKeyProperty"),Ae(bnt,"hasCategoriesProperty"),Ae(wnt,"hasExtendingTokensTypesProperty"),Ae(knt,"hasExtendingTokensTypesMapProperty"),Ae(Tnt,"isTokenType")}),Int=t(()=>{Cnt={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.`}}}),Mnt=t(()=>{var t;hnt(),_Y(),_et(),Nnt(),Int(),grt(),(t=Snt=Snt||{})[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",Ant={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Cnt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(Ant),(Lnt=class{static{Ae(this,"Lexer")}constructor(i,a=Ant){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 <${t}>`),bet(e)),a=10 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=JO({},Ant,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===Ant.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ont;else if(this.config.lineTerminatorCharacters===Ant.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=Kk(i)?{modes:{defaultMode:XF(i)},defaultMode:ent}:(t=!1,XF(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(qrt(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(jrt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=$j(t,t=>lq(t))}),KO(r.modes)),e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Srt(e,n))}),JG(this.lexerDefinitionErrors)){pnt(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=Crt(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=JO({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!JG(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=>{net(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(qrt?(this.chopInput=LT,this.match=this.matchWithTest):(this.updateLastIndex=lO,this.match=this.matchWithExec),t&&(this.handleModes=lO),!1===this.trackStartLines&&(this.computeNewColumn=LT),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=lO),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=kY(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!$U(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized. +`+e);v(this.lexerDefinitionWarning,t=>{vet(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(nnt?(this.chopInput=LT,this.match=this.matchWithTest):(this.updateLastIndex=wO,this.match=this.matchWithExec),t&&(this.handleModes=wO),!1===this.trackStartLines&&(this.computeNewColumn=LT),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=wO),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=Pj(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!JG(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",()=>{Zet()}),this.TRACE_INIT("toFastProperties",()=>{set(this)})})}tokenize(t,e=this.defaultMode){if($U(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{urt()}),this.TRACE_INIT("toFastProperties",()=>{ket(this)})})}tokenize(t,e=this.defaultMode){if(JG(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=Irt(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=Frt(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=rG(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;to.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{hj(),vnt(),mnt(),Ae(xnt,"tokenLabel"),Ae(bnt,"hasTokenLabel"),_nt="parent",Cnt="categories",Snt="label",Ant="group",Lnt="push_mode",Nnt="pop_mode",Int="longer_alt",Mnt="line_breaks",Rnt="start_chars_hint",Ae(wnt,"createToken"),Ae(knt,"createTokenInternal"),Qrt([Dnt=wnt({name:"EOF",pattern:fnt.NA})]),Ae(Tnt,"createTokenInstance"),Ae(Ent,"tokenMatcher")}),$nt=t(()=>{Fnt(),hj(),Oet(),Ont={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${bnt(t)?`--> ${xnt(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: '`+UG(e).image+"'";return r?n+r+e:(r=kY(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>xnt(t)).join(", ")}]`),n+`one of these possible Token sequences: +`+t)}tokenizeInternal(i,P){let t,a,e,r,n,s,o,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=Yrt(this.emptyGroups),U=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,_=[],E=[],C=[],G=[];Object.freeze(G);let S;function A(){return _}function L(t){return t=Qrt(t),void 0===(t=E[t])?G: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=fU(C),_=this.patternIdxToConfig[t],E=this.charCodeToPatternIdxToConfig[t],T=_.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=E&&e?L:A)},"pop_mode");function N(t){C.push(t),E=this.charCodeToPatternIdxToConfig[t],_=this.patternIdxToConfig[t],T=_.length,T=_.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=E&&t?L:A}Ae(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<$;){s=null;var Y=g.charCodeAt(f),H=S(Y),W=H.length;for(t=0;ts.length){s=r,o=l,I=R;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===U&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,n=!1===j;for(;!1===n&&f<$;)for(i=this.chopInput(i,1),f++,a=0;a{_Y(),Mnt(),Nnt(),Ae(Rnt,"tokenLabel"),Ae(Dnt,"hasTokenLabel"),$nt="parent",znt="categories",Unt="label",Gnt="group",qnt="push_mode",jnt="pop_mode",Ynt="longer_alt",Hnt="line_breaks",Wnt="start_chars_hint",Ae(Ont,"createToken"),Ae(Pnt,"createTokenInternal"),pnt([Vnt=Ont({name:"EOF",pattern:Lnt.NA})]),Ae(Bnt,"createTokenInstance"),Ae(Fnt,"tokenMatcher")}),Jnt=t(()=>{Qnt(),_Y(),Xet(),Xnt={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${Dnt(t)?`--> ${Rnt(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: '`+eG(e).image+"'";return r?n+r+e:(r=Pj(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>Rnt(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: '`+UG(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=>xnt(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(Ont),Pnt={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+t.name+"<-"}},Bnt={buildDuplicateFoundError(t,e){function r(t){return t instanceof _et?t.terminalType.name:t instanceof met?t.nonTerminalName:""}Ae(r,"getExtraProductionArgument");let n=t.name,i=UG(e),a=i.idx,o=Ret(i),s=r(i),l=0${o}${l?a:""}<- ${s?`with argument: ->${s}<-`:""} +but found: '`+eG(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=>Rnt(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(Xnt),Knt={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},Znt={buildDuplicateFoundError(t,e){function r(t){return t instanceof zet?t.terminalType.name:t instanceof Iet?t.nonTerminalName:""}Ae(r,"getExtraProductionArgument");let n=t.name,i=eG(e),a=i.idx,s=Wet(i),o=r(i),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} 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,` @@ -717,14 +717,14 @@ inside top level rule: ->`+t.name+"<-"}},Bnt={buildDuplicateFoundError(t,e){func 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=>xnt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>Rnt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix in 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=>xnt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>Rnt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in 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=Ret(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +For Further details.`},buildEmptyRepetitionError(t){let e=Wet(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 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: inside <${t.topLevelRule.name}> Rule. @@ -733,61 +733,61 @@ 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 yet?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function znt(t,e){return(t=new Gnt(t,e)).resolveRefs(),t.errors}var Gnt,Unt=t(()=>{aot(),hj(),Oet(),Ae(znt,"resolveGrammar"),Gnt=class extends Cet{static{Ae(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(CU(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:rot.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function qnt(e,r,n=[]){n=PF(n);let i=[],a=0;function o(t){return t.concat(aG(e,a+1))}function s(t){return t=qnt(o(t),r,n),i.concat(t)}for(Ae(o,"remainingPathWith"),Ae(s,"getAlternativesForProd");n.length{!1===$U(t.definition)&&(i=s(t.definition))}),i;if(!(t instanceof _et))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:aG(e,a)}),i}function Ynt(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:[]});!$U(u);)if((v=u.pop())===o)s&&rG(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!$U(d)){var m=d[0];if(m===i)v={idx:p,def:aG(d),ruleStack:lG(g),occurrenceStack:lG(f)},u.push(v);else if(m instanceof _et)if(p{hj(),Yet(),Fet(),Oet(),Wnt=class extends Bet{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=PF(this.path.ruleStack).reverse(),this.occurrenceStack=PF(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(){$U(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Hnt=class extends Wnt{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 vet({definition:t}),this.possibleTokTypes=$et(e),this.found=!0)}},Wnt=class extends Bet{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}},Vnt=class extends Wnt{static{Ae(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=UG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof _et&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},Xnt=class extends Wnt{static{Ae(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=UG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof _et&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},Knt=class extends Wnt{static{Ae(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=UG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof _et&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},Znt=class extends Wnt{static{Ae(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=UG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof _et&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},Ae(qnt,"possiblePathsFrom"),Ae(Ynt,"nextPossibleTokensAfter"),Ae(jnt,"expandTopLevelRule")});function Jnt(t){if(t instanceof xet||"Option"===t)return git.OPTION;if(t instanceof ket||"Repetition"===t)return git.REPETITION;if(t instanceof bet||"RepetitionMandatory"===t)return git.REPETITION_MANDATORY;if(t instanceof wet||"RepetitionMandatoryWithSeparator"===t)return git.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Tet||"RepetitionWithSeparator"===t)return git.REPETITION_WITH_SEPARATOR;if(t instanceof Eet||"Alternation"===t)return git.ALTERNATION;throw Error("non exhaustive match")}function tit(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=Jnt(r))===git.ALTERNATION?cit(t,e,n):hit(t,e,r,n)}function eit(t,e,r,n,i,a){return a(t=cit(t,e,r),n,pit(t)?Zrt:Krt,i)}function rit(t,e,r,n,i,a){return e=pit(t=hit(t,e,i,r))?Zrt:Krt,a(t[0],e,n)}function nit(c,t,h,e){let u=c.length,r=TG(c,t=>TG(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;eAP(t)),e=kY(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 iit(i,a,r){let t=TG(i,t=>1===t.length),o=i.length;if(!t||r)return function(){t:for(let t=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]}}}function ait(e){var r=new Array(e);for(let t=0;tqnt([t],1)),i=ait(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=oit(t.partialPath),v(t,t=>{e[t]=!0})}),e}),o=e;for(let r=1;r<=n;r++){var s=o;o=ait(s.length);for(let e=0;e{t=oit(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function cit(t,e,r,n){return t=new mit(t,git.ALTERNATION,n),e.accept(t),lit(t.result,r)}function hit(t,e,r,n){var i=new mit(t,r),i=(e.accept(i),i.result),e=new fit(e,t,r).startWalking();return lit([new vet({definition:i}),new vet({definition:e})],n)}function uit(e,r){t:for(let t=0;tt===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function pit(t){return TG(t,t=>TG(t,t=>TG(t,t=>$U(t.categoryMatches))))}var git,fit,mit,yit=t(()=>{var t;hj(),Qnt(),Fet(),mnt(),Oet(),(t=git=git||{})[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(Jnt,"getProdType"),Ae(tit,"getLookaheadPaths"),Ae(eit,"buildLookaheadFuncForOr"),Ae(rit,"buildLookaheadFuncForOptionalProd"),Ae(nit,"buildAlternativesLookAheadFunc"),Ae(iit,"buildSingleAlternativeLookaheadFunction"),fit=class extends Bet{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,git.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,git.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,git.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,git.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,git.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},mit=class extends Cet{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,git.OPTION)}visitRepetition(t){this.checkIsTarget(t,git.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,git.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,git.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,git.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,git.ALTERNATION)}},Ae(ait,"initializeArrayOfArrays"),Ae(oit,"pathToHashKeys"),Ae(sit,"isUniquePrefixHash"),Ae(lit,"lookAheadSequenceFromAlternatives"),Ae(cit,"getLookaheadPathsForOr"),Ae(hit,"getLookaheadPathsForOptionalProd"),Ae(uit,"containsPath"),Ae(dit,"isStrictPrefixOfPath"),Ae(pit,"areTokenCategoriesNotUsed")});function vit(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:rot.CUSTOM_LOOKAHEAD_VALIDATION},t))}function xit(e,t,r,n){var i=ZG(e,t=>bit(t,r)),t=Rit(e,t,r),a=ZG(e,t=>Lit(t,r)),o=ZG(e,t=>Tit(t,e,n,r));return i.concat(t,a,o)}function bit(n,i){var t=new Dit,t=(n.accept(t),t.allProductions),t=oU(t,wit),t=Eq(t,t=>1{var e=UG(t),t=i.buildDuplicateFoundError(n,t),r=Ret(e),t={message:t,type:rot.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=kit(e))&&(t.parameter=r),t})}function wit(t){return`${Ret(t)}_#_${t.idx}_#_`+kit(t)}function kit(t){return t instanceof _et?t.terminalType.name:t instanceof met?t.nonTerminalName:""}function Tit(r,t,e,n){var i=[];return 1e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:rot.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function Eit(t,e,r){var n=[];return NU(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:rot.INVALID_RULE_OVERRIDE,ruleName:t}),n}function _it(r,t,n,i=[]){var e,a=[],t=Cit(t.definition);return $U(t)?[]:(e=r.name,NU(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:rot.LEFT_RECURSION,ruleName:e}),e=Qz(t,i.concat([r])),t=ZG(e,t=>{var e=PF(i);return e.push(t),_it(r,t,n,e)}),a.concat(t))}function Cit(t){let e=[];if($U(t))return e;if((r=UG(t))instanceof met)e.push(r.referencedRule);else if(r instanceof vet||r instanceof xet||r instanceof bet||r instanceof wet||r instanceof Tet||r instanceof ket)e=e.concat(Cit(r.definition));else if(r instanceof Eet)e=AP(x(r.definition,t=>Cit(t.definition)));else if(!(r instanceof _et))throw Error("non exhaustive match");var r=Iet(r),n=1{var t=lG(r.definition);return ZG(t,(t,e)=>(t=Ynt([t],[],Krt,1),$U(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:rot.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function Ait(n,i,a){var t=new Oit,t=(n.accept(t),t.alternations),t=_Y(t,t=>!0===t.ignoreAmbiguities);return ZG(t,t=>{var e=Iit(r=cit(t.idx,n,t.maxLookahead||i,t),t,n,a),r=Mit(r,t,n,a);return e.concat(r)})}function Lit(e,r){var t=new Oit,t=(e.accept(t),t.alternations);return ZG(t,t=>255{var t=new Pit,t=(n.accept(t),t.allProductions);v(t,t=>{var e=Jnt(t),r=t.maxLookahead||i,e=hit(t.idx,n,e,r)[0];$U(AP(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),o.push({message:r,type:rot.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),o}function Iit(a,o,r,n){let s=[],t=kY(a,(t,e,i)=>(!0!==o.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&uit(t,r)&&!0!==o.definition[e].ignoreAmbiguities&&n.push(e)}),1{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:o,ambiguityIndices:e,prefixPath:t.path}),type:rot.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:o.idx,alternatives:t.alts}})}function Mit(t,i,a,o){let s=kY(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return UF(ZG(s,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=LG(s,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx{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:rot.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function Rit(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;NU(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:rot.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var Dit,Oit,Pit,Bit=t(()=>{hj(),aot(),Oet(),yit(),Qnt(),mnt(),Ae(vit,"validateLookahead"),Ae(xit,"validateGrammar"),Ae(bit,"validateDuplicateProductions"),Ae(wit,"identifyProductionForDuplicates"),Ae(kit,"getExtraProductionArgument"),Dit=class extends Cet{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(Tit,"validateRuleDoesNotAlreadyExist"),Ae(Eit,"validateRuleIsOverridden"),Ae(_it,"validateNoLeftRecursion"),Ae(Cit,"getFirstNoneTerminal"),Oit=class extends Cet{static{Ae(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},Ae(Sit,"validateEmptyOrAlternative"),Ae(Ait,"validateAmbiguousAlternationAlternatives"),Pit=class extends Cet{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(Lit,"validateTooManyAlts"),Ae(Nit,"validateSomeNonEmptyLookaheadPath"),Ae(Iit,"checkAlternativesAmbiguities"),Ae(Mit,"checkPrefixAlternativesAmbiguities"),Ae(Rit,"checkTerminalAndNoneTerminalsNameSpace")});function Fit(t){let e=Uz(t,{errMsgProvider:Pnt}),r={};return v(t.rules,t=>{r[t.name]=t}),znt(r,e.errMsgProvider)}function $it(t){return xit((t=Uz(t,{errMsgProvider:Bnt})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var zit=t(()=>{hj(),Unt(),Bit(),$nt(),Ae(Fit,"resolveGrammar"),Ae($it,"validateGrammar")});function Git(t){return NU(Uit,t.name)}var Uit,qit,Yit,jit,Hit,Wit,Vit=t(()=>{hj(),Uit=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(Uit),Ae(Git,"isRecognitionException"),qit=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)}},Yit=class extends qit{static{Ae(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},jit=class extends qit{static{Ae(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},Hit=class extends qit{static{Ae(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},Wit=class extends qit{static{Ae(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function Xit(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=Dnt,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,o)&&this.tryInRepetitionRecovery(t,e,r,c)}var Kit,Zit,Qit,Jit,tat=t(()=>{Fnt(),hj(),Vit(),jet(),aot(),Kit={},Zit="InRuleRecoveryException",Qit=class extends Error{static{Ae(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Zit}},Jit=class{static{Ae(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(b(t,"recoveryEnabled")?t:tot).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Xit)}getTokenToInsert(t){return(t=Tnt(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 Yit(t,l,this.LA(0))).resyncedTokens=lG(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 Qit("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||$U(e))return!1;let r=this.LA(1);return void 0!==FG(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 NU(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=FG(t,t=>Ent(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?Kit:(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?Kit:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return AP(t)}getFollowSetFromFollowKey(t){return t===Kit?[Dnt]:(t=t.ruleName+t.idxInCallingRule+qet+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,Dnt)||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 lG(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,o){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:PF(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},Ae(Xit,"attemptInRepetitionRecovery")});function eat(t,e,r){return r|e|t}var rat,nat=t(()=>{Ae(eat,"getKeyForAutomaticLookahead")}),iat=t(()=>{hj(),$nt(),aot(),Bit(),yit(),rat=class{static{Ae(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:tot.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return $U(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 ZG(t,t=>_it(t,t,Bnt))}validateEmptyOrAlternatives(t){return ZG(t,t=>Sit(t,Bnt))}validateAmbiguousAlternationAlternatives(t,e){return ZG(t,t=>Ait(t,e,Bnt))}validateSomeNonEmptyLookaheadPath(t,e){return Nit(t,e,Bnt)}buildLookaheadForAlternation(t){return eit(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,nit)}buildLookaheadForOptional(t){return rit(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Jnt(t.prodType),iit)}}});function aat(t){return lat.reset(),t.accept(lat),t=lat.dslMethods,lat.reset(),t}var oat,sat,lat,cat=t(()=>{hj(),aot(),nat(),Oet(),iat(),oat=class{static{Ae(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(b(t,"dynamicTokensEnabled")?t:tot).dynamicTokensEnabled,this.maxLookahead=(b(t,"maxLookahead")?t:tot).maxLookahead,this.lookaheadStrategy=b(t,"lookaheadStrategy")?t.lookaheadStrategy:new rat({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}=aat(o);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+Ret(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:o,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=eat(this.fullRuleNameToShort[o.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(o,t.idx,768,"Repetition",t.maxLookahead,Ret(t))}),v(r,t=>{this.computeLookaheadFunc(o,t.idx,512,"Option",t.maxLookahead,Ret(t))}),v(n,t=>{this.computeLookaheadFunc(o,t.idx,1024,"RepetitionMandatory",t.maxLookahead,Ret(t))}),v(i,t=>{this.computeLookaheadFunc(o,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,Ret(t))}),v(a,t=>{this.computeLookaheadFunc(o,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,Ret(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=eat(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)}},sat=class extends Cet{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)}},lat=new sat,Ae(aat,"collectMethods")});function hat(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{Ae(hat,"setNodeLocationOnlyOffset"),Ae(uat,"setNodeLocationFull"),Ae(dat,"addTerminalToCst"),Ae(pat,"addNoneTerminalToCst")});function fat(t,e){Object.defineProperty(t,mat,{enumerable:!1,configurable:!0,writable:!1,value:e})}var mat,yat=t(()=>{mat="name",Ae(fat,"defineNameProp")});function vat(e,r){var n=BO(e),i=n.length;for(let t=0;tt.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof Met?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function tit(t,e){return(t=new eit(t,e)).resolveRefs(),t.errors}var eit,rit=t(()=>{xst(),_Y(),Xet(),Ae(tit,"resolveGrammar"),eit=class extends Uet{static{Ae(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(zG(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:mst.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function nit(e,r,n=[]){n=XF(n);let i=[],a=0;function s(t){return t.concat(vU(e,a+1))}function o(t){return t=nit(s(t),r,n),i.concat(t)}for(Ae(s,"remainingPathWith"),Ae(o,"getAlternativesForProd");n.length{!1===JG(t.definition)&&(i=o(t.definition))}),i;if(!(t instanceof zet))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:vU(e,a)}),i}function iit(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!JG(u);)if((v=u.pop())===s)o&&fU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!JG(d)){var m=d[0];if(m===i)v={idx:p,def:vU(d),ruleStack:wU(g),occurrenceStack:wU(f)},u.push(v);else if(m instanceof zet)if(p{_Y(),irt(),Qet(),Xet(),oit=class extends Zet{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=XF(this.path.ruleStack).reverse(),this.occurrenceStack=XF(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(){JG(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},sit=class extends oit{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 Ret({definition:t}),this.possibleTokTypes=Jet(e),this.found=!0)}},oit=class extends Zet{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}},lit=class extends oit{static{Ae(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=eG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof zet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},cit=class extends oit{static{Ae(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=eG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof zet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},hit=class extends oit{static{Ae(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=eG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof zet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},uit=class extends oit{static{Ae(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=eG(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof zet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},Ae(nit,"possiblePathsFrom"),Ae(iit,"nextPossibleTokensAfter"),Ae(ait,"expandTopLevelRule")});function pit(t){if(t instanceof Det||"Option"===t)return Ait.OPTION;if(t instanceof Bet||"Repetition"===t)return Ait.REPETITION;if(t instanceof Oet||"RepetitionMandatory"===t)return Ait.REPETITION_MANDATORY;if(t instanceof Pet||"RepetitionMandatoryWithSeparator"===t)return Ait.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Fet||"RepetitionWithSeparator"===t)return Ait.REPETITION_WITH_SEPARATOR;if(t instanceof $et||"Alternation"===t)return Ait.ALTERNATION;throw Error("non exhaustive match")}function git(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=pit(r))===Ait.ALTERNATION?Tit(t,e,n):_it(t,e,r,n)}function fit(t,e,r,n,i,a){return a(t=Tit(t,e,r),n,Sit(t)?dnt:unt,i)}function mit(t,e,r,n,i,a){return e=Sit(t=_it(t,e,i,r))?dnt:unt,a(t[0],e,n)}function yit(c,t,h,e){let u=c.length,r=PU(c,t=>PU(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;eUP(t)),e=Pj(t,(e,t,r)=>(v(t,t=>{IG(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{IG(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function vit(i,a,r){let t=PU(i,t=>1===t.length),s=i.length;if(!t||r)return function(){t:for(let t=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]}}}function xit(e){var r=new Array(e);for(let t=0;tnit([t],1)),i=xit(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=bit(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=n;r++){var o=s;s=xit(o.length);for(let e=0;e{t=bit(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function Tit(t,e,r,n){return t=new Nit(t,Ait.ALTERNATION,n),e.accept(t),kit(t.result,r)}function _it(t,e,r,n){var i=new Nit(t,r),i=(e.accept(i),i.result),e=new Lit(e,t,r).startWalking();return kit([new Ret({definition:i}),new Ret({definition:e})],n)}function Eit(e,r){t:for(let t=0;tt===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function Sit(t){return PU(t,t=>PU(t,t=>PU(t,t=>JG(t.categoryMatches))))}var Ait,Lit,Nit,Iit=t(()=>{var t;_Y(),dit(),Qet(),Nnt(),Xet(),(t=Ait=Ait||{})[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(pit,"getProdType"),Ae(git,"getLookaheadPaths"),Ae(fit,"buildLookaheadFuncForOr"),Ae(mit,"buildLookaheadFuncForOptionalProd"),Ae(yit,"buildAlternativesLookAheadFunc"),Ae(vit,"buildSingleAlternativeLookaheadFunction"),Lit=class extends Zet{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,Ait.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,Ait.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,Ait.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,Ait.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,Ait.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},Nit=class extends Uet{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,Ait.OPTION)}visitRepetition(t){this.checkIsTarget(t,Ait.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Ait.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Ait.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Ait.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Ait.ALTERNATION)}},Ae(xit,"initializeArrayOfArrays"),Ae(bit,"pathToHashKeys"),Ae(wit,"isUniquePrefixHash"),Ae(kit,"lookAheadSequenceFromAlternatives"),Ae(Tit,"getLookaheadPathsForOr"),Ae(_it,"getLookaheadPathsForOptionalProd"),Ae(Eit,"containsPath"),Ae(Cit,"isStrictPrefixOfPath"),Ae(Sit,"areTokenCategoriesNotUsed")});function Mit(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:mst.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Rit(e,t,r,n){var i=hG(e,t=>Dit(t,r)),t=Wit(e,t,r),a=hG(e,t=>qit(t,r)),s=hG(e,t=>Bit(t,e,n,r));return i.concat(t,a,s)}function Dit(n,i){var t=new Vit,t=(n.accept(t),t.allProductions),t=xG(t,Oit),t=Fq(t,t=>1{var e=eG(t),t=i.buildDuplicateFoundError(n,t),r=Wet(e),t={message:t,type:mst.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=Pit(e))&&(t.parameter=r),t})}function Oit(t){return`${Wet(t)}_#_${t.idx}_#_`+Pit(t)}function Pit(t){return t instanceof zet?t.terminalType.name:t instanceof Iet?t.nonTerminalName:""}function Bit(r,t,e,n){var i=[];return 1e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:mst.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function Fit(t,e,r){var n=[];return jG(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:mst.INVALID_RULE_OVERRIDE,ruleName:t}),n}function $it(r,t,n,i=[]){var e,a=[],t=zit(t.definition);return JG(t)?[]:(e=r.name,jG(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:mst.LEFT_RECURSION,ruleName:e}),e=uU(t,i.concat([r])),t=hG(e,t=>{var e=XF(i);return e.push(t),$it(r,t,n,e)}),a.concat(t))}function zit(t){let e=[];if(JG(t))return e;if((r=eG(t))instanceof Iet)e.push(r.referencedRule);else if(r instanceof Ret||r instanceof Det||r instanceof Oet||r instanceof Pet||r instanceof Fet||r instanceof Bet)e=e.concat(zit(r.definition));else if(r instanceof $et)e=UP(x(r.definition,t=>zit(t.definition)));else if(!(r instanceof zet))throw Error("non exhaustive match");var r=Yet(r),n=1{var t=wU(r.definition);return hG(t,(t,e)=>(t=iit([t],[],unt,1),JG(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:mst.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function Git(n,i,a){var t=new Xit,t=(n.accept(t),t.alternations),t=$j(t,t=>!0===t.ignoreAmbiguities);return hG(t,t=>{var e=Yit(r=Tit(t.idx,n,t.maxLookahead||i,t),t,n,a),r=Hit(r,t,n,a);return e.concat(r)})}function qit(e,r){var t=new Xit,t=(e.accept(t),t.alternations);return hG(t,t=>255{var t=new Kit,t=(n.accept(t),t.allProductions);v(t,t=>{var e=pit(t),r=t.maxLookahead||i,e=_it(t.idx,n,e,r)[0];JG(UP(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),s.push({message:r,type:mst.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function Yit(a,s,r,n){let o=[],t=Pj(a,(t,e,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&Eit(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&n.push(e)}),1{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:mst.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function Hit(t,i,a,s){let o=Pj(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return e$(hG(o,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=GU(o,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx{var e=[t.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:e,prefixPath:t.path}),type:mst.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function Wit(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;jG(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:mst.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var Vit,Xit,Kit,Zit=t(()=>{_Y(),xst(),Xet(),Iit(),dit(),Nnt(),Ae(Mit,"validateLookahead"),Ae(Rit,"validateGrammar"),Ae(Dit,"validateDuplicateProductions"),Ae(Oit,"identifyProductionForDuplicates"),Ae(Pit,"getExtraProductionArgument"),Vit=class extends Uet{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(Bit,"validateRuleDoesNotAlreadyExist"),Ae(Fit,"validateRuleIsOverridden"),Ae($it,"validateNoLeftRecursion"),Ae(zit,"getFirstNoneTerminal"),Xit=class extends Uet{static{Ae(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},Ae(Uit,"validateEmptyOrAlternative"),Ae(Git,"validateAmbiguousAlternationAlternatives"),Kit=class extends Uet{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(qit,"validateTooManyAlts"),Ae(jit,"validateSomeNonEmptyLookaheadPath"),Ae(Yit,"checkAlternativesAmbiguities"),Ae(Hit,"checkPrefixAlternativesAmbiguities"),Ae(Wit,"checkTerminalAndNoneTerminalsNameSpace")});function Qit(t){let e=eU(t,{errMsgProvider:Knt}),r={};return v(t.rules,t=>{r[t.name]=t}),tit(r,e.errMsgProvider)}function Jit(t){return Rit((t=eU(t,{errMsgProvider:Znt})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var tat=t(()=>{_Y(),rit(),Zit(),Jnt(),Ae(Qit,"resolveGrammar"),Ae(Jit,"validateGrammar")});function eat(t){return jG(rat,t.name)}var rat,nat,iat,aat,sat,oat,lat=t(()=>{_Y(),rat=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(rat),Ae(eat,"isRecognitionException"),nat=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)}},iat=class extends nat{static{Ae(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},aat=class extends nat{static{Ae(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},sat=class extends nat{static{Ae(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},oat=class extends nat{static{Ae(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function cat(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=Vnt,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var hat,uat,dat,pat,gat=t(()=>{Qnt(),_Y(),lat(),art(),xst(),hat={},uat="InRuleRecoveryException",dat=class extends Error{static{Ae(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=uat}},pat=class{static{Ae(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(IG(t,"recoveryEnabled")?t:gst).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=cat)}getTokenToInsert(t){return(t=Bnt(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(),s=[],o=!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 iat(t,l,this.LA(0))).resyncedTokens=wU(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new dat("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||JG(e))return!1;let r=this.LA(1);return void 0!==ZU(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 jG(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=ZU(t,t=>Fnt(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?hat:(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?hat:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return UP(t)}getFollowSetFromFollowKey(t){return t===hat?[Vnt]:(t=t.ruleName+t.idxInCallingRule+nrt+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,Vnt)||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 wU(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:XF(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},Ae(cat,"attemptInRepetitionRecovery")});function fat(t,e,r){return r|e|t}var mat,yat=t(()=>{Ae(fat,"getKeyForAutomaticLookahead")}),vat=t(()=>{_Y(),Jnt(),xst(),Zit(),Iit(),mat=class{static{Ae(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:gst.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return JG(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 hG(t,t=>$it(t,t,Znt))}validateEmptyOrAlternatives(t){return hG(t,t=>Uit(t,Znt))}validateAmbiguousAlternationAlternatives(t,e){return hG(t,t=>Git(t,e,Znt))}validateSomeNonEmptyLookaheadPath(t,e){return jit(t,e,Znt)}buildLookaheadForAlternation(t){return fit(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,yit)}buildLookaheadForOptional(t){return mit(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,pit(t.prodType),vit)}}});function xat(t){return kat.reset(),t.accept(kat),t=kat.dslMethods,kat.reset(),t}var bat,wat,kat,Tat=t(()=>{_Y(),xst(),yat(),Xet(),vat(),bat=class{static{Ae(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(IG(t,"dynamicTokensEnabled")?t:gst).dynamicTokensEnabled,this.maxLookahead=(IG(t,"maxLookahead")?t:gst).maxLookahead,this.lookaheadStrategy=IG(t,"lookaheadStrategy")?t.lookaheadStrategy:new mat({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=xat(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+Wet(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=fat(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,Wet(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,Wet(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,Wet(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,Wet(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,Wet(t))})})})}computeLookaheadFunc(r,n,i,a,s,t){this.TRACE_INIT(""+t+(0===n?"":n),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=fat(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)}},wat=class extends Uet{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)}},kat=new wat,Ae(xat,"collectMethods")});function _at(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{Ae(_at,"setNodeLocationOnlyOffset"),Ae(Eat,"setNodeLocationFull"),Ae(Cat,"addTerminalToCst"),Ae(Sat,"addNoneTerminalToCst")});function Lat(t,e){Object.defineProperty(t,Nat,{enumerable:!1,configurable:!0,writable:!1,value:e})}var Nat,Iat=t(()=>{Nat="name",Ae(Lat,"defineNameProp")});function Mat(e,r){var n=KO(e),i=n.length;for(let t=0;tt.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 bat(t,e,r){var n=Ae(function(){},"derivedConstructor");fat(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=vat}),n.prototype=i,n.prototype.constructor=n}function wat(t,e){return kat(t,e)}function kat(e,t){return t=LG(t,t=>!1===_5(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Tat.MISSING_METHOD,methodName:t})),UF(t)}var Tat,Eat,_at,Cat,Sat,Aat,Lat,Nat=t(()=>{var t;hj(),yat(),Ae(vat,"defaultVisit"),Ae(xat,"createBaseSemanticVisitorConstructor"),Ae(bat,"createBaseVisitorConstructorWithDefaults"),(t=Tat=Tat||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",Ae(wat,"validateVisitor"),Ae(kat,"validateMissingCstMethods")}),Iat=t(()=>{gat(),hj(),Nat(),aot(),Eat=class{static{Ae(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(b(t,"nodeLocationTracking")?t:tot).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=uat,this.setNodeLocationFromNode=uat,this.cstPostRule=lO,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=lO,this.setNodeLocationFromNode=lO,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=hat,this.setNodeLocationFromNode=hat,this.cstPostRule=lO,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=lO,this.setNodeLocationFromNode=lO,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=lO,this.setNodeLocationFromNode=lO,this.cstPostRule=lO,this.setInitialNodeLocation=lO}else this.cstInvocationStateUpdate=lO,this.cstFinallyStateUpdate=lO,this.cstPostTerminal=lO,this.cstPostNonTerminal=lO,this.cstPostRule=lO}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];dat(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];pat(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return VU(this.baseCstVisitorConstructor)?(t=xat(this.className,BO(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return VU(this.baseCstVisitorWithDefaultsConstructor)?(t=bat(this.className,BO(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]}}}),Mat=t(()=>{aot(),_at=class{static{Ae(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing 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)):Jat}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?Jat: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()}}}),Rat=t(()=>{hj(),Vit(),aot(),$nt(),Bit(),Oet(),Cat=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=eot){NU(this.definedRulesNames,t)&&(n={message:Bnt.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:rot.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=eot){var n=Eit(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(Git(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return pet(CU(this.gastProductionsCache))}}}),Dat=t(()=>{hj(),nat(),Vit(),yit(),Qnt(),aot(),tat(),Fnt(),mnt(),Sat=class{static{Ae(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Zrt,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 property. + `))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function Dat(t,e,r){var n=Ae(function(){},"derivedConstructor");Lat(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=Mat}),n.prototype=i,n.prototype.constructor=n}function Oat(t,e){return Pat(t,e)}function Pat(e,t){return t=GU(t,t=>!1===E5(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Bat.MISSING_METHOD,methodName:t})),e$(t)}var Bat,Fat,$at,zat,Uat,Gat,qat,jat=t(()=>{var t;_Y(),Iat(),Ae(Mat,"defaultVisit"),Ae(Rat,"createBaseSemanticVisitorConstructor"),Ae(Dat,"createBaseVisitorConstructorWithDefaults"),(t=Bat=Bat||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",Ae(Oat,"validateVisitor"),Ae(Pat,"validateMissingCstMethods")}),Yat=t(()=>{Aat(),_Y(),jat(),xst(),Fat=class{static{Ae(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(IG(t,"nodeLocationTracking")?t:gst).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Eat,this.setNodeLocationFromNode=Eat,this.cstPostRule=wO,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=wO,this.setNodeLocationFromNode=wO,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=_at,this.setNodeLocationFromNode=_at,this.cstPostRule=wO,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=wO,this.setNodeLocationFromNode=wO,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=wO,this.setNodeLocationFromNode=wO,this.cstPostRule=wO,this.setInitialNodeLocation=wO}else this.cstInvocationStateUpdate=wO,this.cstFinallyStateUpdate=wO,this.cstPostTerminal=wO,this.cstPostNonTerminal=wO,this.cstPostRule=wO}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];Cat(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Sat(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return lq(this.baseCstVisitorConstructor)?(t=Rat(this.className,KO(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return lq(this.baseCstVisitorWithDefaultsConstructor)?(t=Dat(this.className,KO(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]}}}),Hat=t(()=>{xst(),$at=class{static{Ae(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing 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)):pst}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?pst: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()}}}),Wat=t(()=>{_Y(),lat(),xst(),Jnt(),Zit(),Xet(),zat=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=fst){jG(this.definedRulesNames,t)&&(n={message:Znt.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:mst.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=fst){var n=Fit(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(eat(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Aet(zG(this.gastProductionsCache))}}}),Vat=t(()=>{_Y(),yat(),lat(),Iit(),dit(),xst(),gat(),Qnt(),Nnt(),Uat=class{static{Ae(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=dnt,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},IG(e,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if(Kk(t)){if($U(t))throw Error(`A Token Vocabulary cannot be empty. + For Further details.`);if(Kk(t)){if(JG(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(Kk(t))this.tokensMap=kY(t,(t,e)=>(t[e.name]=e,t),{});else if(b(t,"modes")&&TG(AP(CU(t.modes)),cnt))e=AP(CU(t.modes)),e=XY(e),this.tokensMap=kY(e,(t,e)=>(t[e.name]=e,t),{});else{if(!k5(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=PF(t)}this.tokensMap.EOF=Dnt,e=b(t,"modes")?AP(CU(t.modes)):CU(t),t=TG(e,t=>$U(t.categoryMatches)),this.tokenMatcher=t?Zrt:Krt,Qrt(CU(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:eot).resyncEnabled,a=(b(t,"recoveryValueFunc")?t:eot).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(Git(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,git.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,Knt)}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,git.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,Znt],r,1536,t,Znt)}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,Vnt,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,Xnt],e,1280,t,Xnt)}}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=Kk(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 Hit(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 Git(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 Yit(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===Zit?r:t}}saveRecogState(){var t=this.errors,e=PF(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),Dnt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),Oat=t(()=>{Vit(),hj(),yit(),aot(),Aat=class{static{Ae(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(b(t,"errorMessageProvider")?t:tot).errorMessageProvider}SAVE_ERROR(t){if(Git(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:PF(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return PF(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=hit(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 Wit(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=cit(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 jit(t,this.LA(1),r))}}}),Pat=t(()=>{Qnt(),hj(),Lat=class{static{Ae(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(VU(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return Ynt([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=UG(t.ruleStack),e=this.getGAstProductions()[e];return new Hnt(e,t).startWalking()}}});function Bat(t,e,r,n=!1){zat(r);var i=rG(this.recordingProdStack),a=_5(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(),Gat}function Fat(t,e){zat(e);let r=rG(this.recordingProdStack),n=!1===Kk(t),i=0==n?t:t.DEF,a=new Eet({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return b(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=DY(i,t=>_5(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new vet({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()}),Gat}function $at(t){return 0===t?"":""+t}function zat(t){if(t<0||Uat - Idx value must be a none negative value smaller than `+(Uat+1))).KNOWN_RECORDER_ERROR=!0,t}var Gat,Uat,qat,Yat,jat,Hat,Wat,Vat=t(()=>{hj(),Oet(),vnt(),mnt(),Fnt(),aot(),nat(),Gat={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(Gat),Uat=Math.pow(2,8)-1,Qrt([qat=wnt({name:"RECORDING_PHASE_TOKEN",pattern:fnt.NA})]),Yat=Tnt(qat,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze(Yat),jat={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Hat=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{var e=this;for(let t=0;t<10;t++){var r=0!0}LA_RECORD(t){return Jat}topLevelRuleRecord(t,e){try{var r=new yet({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+` + For Further details.`)}if(Kk(t))this.tokensMap=Pj(t,(t,e)=>(t[e.name]=e,t),{});else if(IG(t,"modes")&&PU(UP(zG(t.modes)),Tnt))e=UP(zG(t.modes)),e=cY(e),this.tokensMap=Pj(e,(t,e)=>(t[e.name]=e,t),{});else{if(!k5(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=XF(t)}this.tokensMap.EOF=Vnt,e=IG(t,"modes")?UP(zG(t.modes)):zG(t),t=PU(e,t=>JG(t.categoryMatches)),this.tokenMatcher=t?dnt:unt,pnt(zG(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=(IG(t,"resyncEnabled")?t:fst).resyncEnabled,a=(IG(t,"recoveryValueFunc")?t:fst).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?Ae(function(...t){try{this.ruleInvocationStateUpdate(s,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(s,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(eat(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,Ait.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,hit)}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,Ait.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,uit],r,1536,t,uit)}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,lit,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,cit],e,1280,t,cit)}}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=Kk(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 sat(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 eat(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 iat(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===uat?r:t}}saveRecogState(){var t=this.errors,e=XF(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),Vnt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),Xat=t(()=>{lat(),_Y(),Iit(),xst(),Gat=class{static{Ae(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(IG(t,"errorMessageProvider")?t:gst).errorMessageProvider}SAVE_ERROR(t){if(eat(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:XF(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return XF(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=_it(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 oat(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=Tit(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 aat(t,this.LA(1),r))}}}),Kat=t(()=>{dit(),_Y(),qat=class{static{Ae(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(lq(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return iit([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=eG(t.ruleStack),e=this.getGAstProductions()[e];return new sit(e,t).startWalking()}}});function Zat(t,e,r,n=!1){tst(r);var i=fU(this.recordingProdStack),a=E5(e)?e:e.DEF,t=new t({definition:[],idx:r});return n&&(t.separator=e.SEP),IG(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),i.definition.push(t),this.recordingProdStack.pop(),est}function Qat(t,e){tst(e);let r=fU(this.recordingProdStack),n=!1===Kk(t),i=0==n?t:t.DEF,a=new $et({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return IG(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=Vj(i,t=>E5(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new Ret({definition:[]});a.definition.push(e),IG(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:IG(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),est}function Jat(t){return 0===t?"":""+t}function tst(t){if(t<0||rst + Idx value must be a none negative value smaller than `+(rst+1))).KNOWN_RECORDER_ERROR=!0,t}var est,rst,nst,ist,ast,sst,ost,lst=t(()=>{_Y(),Xet(),Mnt(),Nnt(),Qnt(),xst(),yat(),est={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(est),rst=Math.pow(2,8)-1,pnt([nst=Ont({name:"RECORDING_PHASE_TOKEN",pattern:Lnt.NA})]),ist=Bnt(nst,`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(ist),ast={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},sst=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{var e=this;for(let t=0;t<10;t++){var r=0!0}LA_RECORD(t){return pst}topLevelRuleRecord(t,e){try{var r=new Met({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 Bat.call(this,xet,t,e)}atLeastOneInternalRecord(t,e){Bat.call(this,bet,e,t)}atLeastOneSepFirstInternalRecord(t,e){Bat.call(this,wet,e,t,!0)}manyInternalRecord(t,e){Bat.call(this,ket,e,t)}manySepFirstInternalRecord(t,e){Bat.call(this,Tet,e,t,!0)}orInternalRecord(t,e){return Fat.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(zat(e),t&&!1!==b(t,"ruleName"))return n=rG(this.recordingProdStack),i=t.ruleName,i=new met({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?jat:Gat;throw(r=new Error(` 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(zat(e),ant(t))return n=rG(this.recordingProdStack),r=new _et({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),Yat;throw(n=new Error(` 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(Bat,"recordProd"),Ae(Fat,"recordOrProd"),Ae($at,"getIdxSuffix"),Ae(zat,"assertMethodIdxIsValid")}),Xat=t(()=>{hj(),het(),aot(),Wat=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}>`),aet(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()}}});function Kat(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 Zat=t(()=>{Ae(Kat,"applyMixins")});function Qat(t=void 0){return function(){return t}}var Jat,tot,eot,rot,not,iot,aot=t(()=>{var t;hj(),het(),Xet(),Fnt(),$nt(),zit(),tat(),cat(),Iat(),Mat(),Rat(),Dat(),Oat(),Pat(),Vat(),Xat(),Zat(),Bit(),Jat=Tnt(Dnt,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Jat),tot=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ont,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),eot=Object.freeze({recoveryValueFunc:Ae(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=rot=rot||{})[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(Qat,"EMPTY_ALT"),(not=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",()=>{set(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=Fit({rules:CU(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;$U(n)&&!1===this.skipValidations&&(t=$it({rules:CU(this.gastProductionsCache),tokenTypes:CU(this.tokensMap),errMsgProvider:Bnt,grammarName:r}),e=vit({lookaheadStrategy:this.lookaheadStrategy,rules:CU(this.gastProductionsCache),tokenTypes:CU(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),$U(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=Het(CU(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:CU(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(CU(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!$U(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return Zat.call(this,Det,t,e)}atLeastOneInternalRecord(t,e){Zat.call(this,Oet,e,t)}atLeastOneSepFirstInternalRecord(t,e){Zat.call(this,Pet,e,t,!0)}manyInternalRecord(t,e){Zat.call(this,Bet,e,t)}manySepFirstInternalRecord(t,e){Zat.call(this,Fet,e,t,!0)}orInternalRecord(t,e){return Qat.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(tst(e),t&&!1!==IG(t,"ruleName"))return n=fU(this.recordingProdStack),i=t.ruleName,i=new Iet({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?ast:est;throw(r=new Error(` 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(tst(e),xnt(t))return n=fU(this.recordingProdStack),r=new zet({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),ist;throw(n=new Error(` 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(Zat,"recordProd"),Ae(Qat,"recordOrProd"),Ae(Jat,"getIdxSuffix"),Ae(tst,"assertMethodIdxIsValid")}),cst=t(()=>{_Y(),_et(),xst(),ost=class{static{Ae(this,"PerformanceTracer")}initPerformanceTracer(t){var e;IG(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0 <${t}>`),bet(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()}}});function hst(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 ust=t(()=>{Ae(hst,"applyMixins")});function dst(t=void 0){return function(){return t}}var pst,gst,fst,mst,yst,vst,xst=t(()=>{var t;_Y(),_et(),crt(),Qnt(),Jnt(),tat(),gat(),Tat(),Yat(),Hat(),Wat(),Vat(),Xat(),Kat(),lst(),cst(),ust(),Zit(),pst=Bnt(Vnt,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(pst),gst=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Xnt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),fst=Object.freeze({recoveryValueFunc:Ae(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=mst=mst||{})[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(dst,"EMPTY_ALT"),(yst=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",()=>{ket(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=Qit({rules:zG(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;JG(n)&&!1===this.skipValidations&&(t=Jit({rules:zG(this.gastProductionsCache),tokenTypes:zG(this.tokensMap),errMsgProvider:Znt,grammarName:r}),e=Mit({lookaheadStrategy:this.lookaheadStrategy,rules:zG(this.gastProductionsCache),tokenTypes:zG(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),JG(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=srt(zG(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:zG(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(zG(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!JG(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 IParserConfig property has been deprecated. +`))})}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),IG(e,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(b(e,"skipValidations")?e:tot).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Kat(not,[Jit,oat,Eat,_at,Sat,Cat,Aat,Lat,Hat,Wat]),iot=class extends not{static{Ae(this,"EmbeddedActionsParser")}constructor(t,e=tot){(e=PF(e)).outputCst=!1,super(t,e)}}}),oot=t(()=>{Oet()}),sot=t(()=>{}),lot=t(()=>{oot(),sot()}),cot=t(()=>{eet()}),hot=t(()=>{eet(),aot(),vnt(),Fnt(),yit(),iat(),$nt(),Vit(),ynt(),Oet(),Oet(),lot(),cot()});function uot(t,e,r){return t.name+`_${e}_`+r}function dot(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(pot(r,e),e.length);for(let t=0;tgot(e,r,t)));return Cot(e,r,n,t,...i)}function bot(t,e,r){var n=Rot(t,e,r,{type:Pot});return _ot(t,n),Eot(t,e,r,Cot(t,e,n,r,wot(t,e,r)))}function wot(e,r,t){return 1===(t=LG(x(t.definition,t=>got(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:Aot(e,t)}function kot(t,e,r,n,i){var a=n.left,n=n.right,o=Rot(t,e,r,{type:Yot}),s=(_ot(t,o),Rot(t,e,r,{type:jot}));return a.loopback=o,s.loopback=o,Mot(n,t.decisionMap[uot(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o),void 0===i?(Mot(o,a),Mot(o,s)):(Mot(o,s),Mot(o,i.left),Mot(i.right,a)),{left:a,right:s}}function Tot(t,e,r,n,i){var a=n.left,n=n.right,o=Rot(t,e,r,{type:qot}),s=(_ot(t,o),Rot(t,e,r,{type:jot})),l=Rot(t,e,r,{type:Uot});return o.loopback=l,s.loopback=l,Mot(o,a),Mot(o,s),Mot(n,l),void 0!==i?(Mot(l,s),Mot(l,i.left),Mot(i.right,a)):Mot(l,o),{left:t.decisionMap[uot(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,right:s}}function Eot(t,e,r,n){var i=n.left;return Mot(i,n.right),t.decisionMap[uot(e,"Option",r.idx)]=i,n}function _ot(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Cot(t,e,r,n,...i){var a,o=Rot(t,e,n,{type:Got,start:r});r.end=o;for(a of i)void 0!==a?(Mot(r,a.left),Mot(a.right,o)):Mot(r,o);return i={left:r,right:o},t.decisionMap[uot(e,Sot(n),n.idx)]=r,i}function Sot(t){if(t instanceof Eet)return"Alternation";if(t instanceof xet)return"Option";if(t instanceof ket)return"Repetition";if(t instanceof Tet)return"RepetitionWithSeparator";if(t instanceof bet)return"RepetitionMandatory";if(t instanceof wet)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Aot(e,r){var n=r.length;for(let t=0;t{XG(),NG(),hot(),Ae(uot,"buildATNKey"),Pot=1,Bot=2,Fot=4,$ot=5,zot=7,Got=8,Uot=9,qot=10,Yot=11,jot=12,Hot=class{static{Ae(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Wot=class extends Hot{static{Ae(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},Vot=class extends Hot{static{Ae(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Xot=class extends Hot{static{Ae(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},Ae(dot,"createATN"),Ae(pot,"createRuleStartAndStopATNStates"),Ae(got,"atom"),Ae(fot,"repetition"),Ae(mot,"repetitionSep"),Ae(yot,"repetitionMandatory"),Ae(vot,"repetitionMandatorySep"),Ae(xot,"alternation"),Ae(bot,"option"),Ae(wot,"block"),Ae(kot,"plus"),Ae(Tot,"star"),Ae(Eot,"optional"),Ae(_ot,"defineDecisionState"),Ae(Cot,"makeAlts"),Ae(Sot,"getProdType"),Ae(Aot,"makeBlock"),Ae(Lot,"tokenRef"),Ae(Not,"ruleRef"),Ae(Iot,"buildRuleHandle"),Ae(Mot,"epsilon"),Ae(Rot,"newState"),Ae(Dot,"addTransition"),Ae(Oot,"removeState")});function Zot(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Qot,Jot,tst=t(()=>{XG(),Qot={},Jot=class{static{Ae(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Zot(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(Zot,"getATNConfigKey")});function est(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 rst(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 nst(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;txnt(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${cst(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, + For further details.`);this.skipValidations=(IG(e,"skipValidations")?e:gst).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,hst(yst,[pat,bat,Fat,$at,Uat,zat,Gat,qat,sst,ost]),vst=class extends yst{static{Ae(this,"EmbeddedActionsParser")}constructor(t,e=gst){(e=XF(e)).outputCst=!1,super(t,e)}}}),bst=t(()=>{Xet()}),wst=t(()=>{}),kst=t(()=>{bst(),wst()}),Tst=t(()=>{met()}),_st=t(()=>{met(),xst(),Mnt(),Qnt(),Iit(),vat(),Jnt(),lat(),Int(),Xet(),Xet(),kst(),Tst()});function Est(t,e,r){return t.name+`_${e}_`+r}function Cst(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(Sst(r,e),e.length);for(let t=0;tAst(e,r,t)));return zst(e,r,n,t,...i)}function Dst(t,e,r){var n=Wst(t,e,r,{type:Kst});return $st(t,n),Fst(t,e,r,zst(t,e,n,r,Ost(t,e,r)))}function Ost(e,r,t){return 1===(t=GU(x(t.definition,t=>Ast(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:Gst(e,t)}function Pst(t,e,r,n,i){var a=n.left,n=n.right,s=Wst(t,e,r,{type:iot}),o=($st(t,s),Wst(t,e,r,{type:aot}));return a.loopback=s,o.loopback=s,Hst(n,t.decisionMap[Est(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(Hst(s,a),Hst(s,o)):(Hst(s,o),Hst(s,i.left),Hst(i.right,a)),{left:a,right:o}}function Bst(t,e,r,n,i){var a=n.left,n=n.right,s=Wst(t,e,r,{type:not}),o=($st(t,s),Wst(t,e,r,{type:aot})),l=Wst(t,e,r,{type:rot});return s.loopback=l,o.loopback=l,Hst(s,a),Hst(s,o),Hst(n,l),void 0!==i?(Hst(l,o),Hst(l,i.left),Hst(i.right,a)):Hst(l,s),{left:t.decisionMap[Est(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function Fst(t,e,r,n){var i=n.left;return Hst(i,n.right),t.decisionMap[Est(e,"Option",r.idx)]=i,n}function $st(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function zst(t,e,r,n,...i){var a,s=Wst(t,e,n,{type:eot,start:r});r.end=s;for(a of i)void 0!==a?(Hst(r,a.left),Hst(a.right,s)):Hst(r,s);return i={left:r,right:s},t.decisionMap[Est(e,Ust(n),n.idx)]=r,i}function Ust(t){if(t instanceof $et)return"Alternation";if(t instanceof Det)return"Option";if(t instanceof Bet)return"Repetition";if(t instanceof Fet)return"RepetitionWithSeparator";if(t instanceof Oet)return"RepetitionMandatory";if(t instanceof Pet)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Gst(e,r){var n=r.length;for(let t=0;t{lG(),qU(),_st(),Ae(Est,"buildATNKey"),Kst=1,Zst=2,Qst=4,Jst=5,tot=7,eot=8,rot=9,not=10,iot=11,aot=12,sot=class{static{Ae(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},oot=class extends sot{static{Ae(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},lot=class extends sot{static{Ae(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},cot=class extends sot{static{Ae(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},Ae(Cst,"createATN"),Ae(Sst,"createRuleStartAndStopATNStates"),Ae(Ast,"atom"),Ae(Lst,"repetition"),Ae(Nst,"repetitionSep"),Ae(Ist,"repetitionMandatory"),Ae(Mst,"repetitionMandatorySep"),Ae(Rst,"alternation"),Ae(Dst,"option"),Ae(Ost,"block"),Ae(Pst,"plus"),Ae(Bst,"star"),Ae(Fst,"optional"),Ae($st,"defineDecisionState"),Ae(zst,"makeAlts"),Ae(Ust,"getProdType"),Ae(Gst,"makeBlock"),Ae(qst,"tokenRef"),Ae(jst,"ruleRef"),Ae(Yst,"buildRuleHandle"),Ae(Hst,"epsilon"),Ae(Wst,"newState"),Ae(Vst,"addTransition"),Ae(Xst,"removeState")});function uot(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var dot,pot,got=t(()=>{lG(),dot={},pot=class{static{Ae(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=uot(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(uot,"getATNConfigKey")});function fot(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 mot(t,e=!0){var r,n=new Set;for(r of t){var i,a,s=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(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function yot(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;tRnt(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Tot(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 cst(t){if(t instanceof met)return"SUBRULE";if(t instanceof xet)return"OPTION";if(t instanceof Eet)return"OR";if(t instanceof bet)return"AT_LEAST_ONE";if(t instanceof wet)return"AT_LEAST_ONE_SEP";if(t instanceof Tet)return"MANY_SEP";if(t instanceof ket)return"MANY";if(t instanceof _et)return"CONSUME";throw Error("non exhaustive match")}function hst(t,e,r){return e=ZG(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:QY(e.filter(t=>t instanceof Wot).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function ust(t,e){return t.edges[e.tokenTypeIdx]}function dst(t,e,r){var n,i=new Jot,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===zot)a.push(n);else{var o=n.state.transitions.length;for(let t=0;t{hot(),Kot(),tst(),hq(),QG(),JY(),XG(),LP(),gG(),zU(),TY(),Ae(est,"createDFACache"),Sst=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;tconsole.log(t)}initialize(t){this.atn=dot(t.rules),this.dfas=nst(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=uot(r,"Alternation",e),l=this.atn.decisionMap[s].decision,c=x(tit({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!rst(c,!1)||i)return n?function(e){var r=new Sst,n=void 0===e?0:e.length;for(let t=0;t(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=uot(e,n,t),l=this.atn.decisionMap[s].decision,c=x(tit({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(rst(c)&&c[0][0]&&!i){if(r=c[0],1===(r=AP(r)).length&&$U(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=kY(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=ist.call(this,a,l,Ast,o);return"object"!=typeof t&&0===t}}},Ae(rst,"isLL1Sequence"),Ae(nst,"initATNSimulator"),Ae(ist,"adaptivePredict"),Ae(ast,"performLookahead"),Ae(ost,"computeLookaheadTarget"),Ae(sst,"reportLookaheadAmbiguity"),Ae(lst,"buildAmbiguityError"),Ae(cst,"getProductionDslName"),Ae(hst,"buildAdaptivePredictError"),Ae(ust,"getExistingTargetState"),Ae(dst,"computeReachSet"),Ae(pst,"getReachableTarget"),Ae(gst,"getUniqueAlt"),Ae(fst,"newDFAState"),Ae(mst,"addDFAEdge"),Ae(yst,"addDFAState"),Ae(vst,"computeStartState"),Ae(xst,"closure"),Ae(bst,"getEpsilonTarget"),Ae(wst,"hasConfigInRuleStopState"),Ae(kst,"allConfigsInRuleStopStates"),Ae(Tst,"hasConflictTerminatingPrediction"),Ae(Est,"getConflictingAltSets"),Ae(_st,"hasConflictingAltSet"),Ae(Cst,"hasStateAssociatedWithOneAlt")}),sct=t(()=>{oct()}),lct=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?Rst.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?Rst.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:Dst.create(t,e),end:Dst.create(r,n)};if(Dst.is(t)&&Dst.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)&&Dst.is(t.start)&&Dst.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return me.objectLiteral(t)&&Ost.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)&&Ost.is(t.targetRange)&&me.string(t.targetUri)&&Ost.is(t.targetSelectionRange)&&(Ost.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)&&Ost.is(t.range)&&Fst.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)||Xst.is(t))&&(me.undefined(t.additionalTextEdits)||me.typedArray(t.additionalTextEdits,Xst.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)&&Pst.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)&&Ost.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,qst.is))}function L(t,e,...r){return t={title:t,command:e},me.defined(r)&&0me.string(t.kind)?tlt.is(t)||elt.is(t)||rlt.is(t):Jst.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)&&llt.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)&&Ost.is(t.insert)&&Ost.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)&&(clt.is(e.contents)||ylt.is(e.contents)||me.typedArray(e.contents,ylt.is))&&(void 0===t.range||Ost.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)&&Ost.is(t.range)&&Ost.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,Wst.is)&&(void 0===t.only||me.typedArray(t.only,me.string))&&(void 0===t.triggerKind||t.triggerKind===Alt.Invoked||t.triggerKind===Alt.Automatic)}function Ct(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):Vst.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,Wst.is))&&(void 0===t.kind||me.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Vst.is(t.command))&&(void 0===t.isPreferred||me.boolean(t.isPreferred))&&(void 0===t.edit||nlt.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)&&Ost.is(t.range)&&(me.undefined(t.command)||Vst.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)&&Ost.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)&&Ost.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&&Ost.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&&Ost.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&&Ost.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)&&Ost.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)||clt.is(t.tooltip))&&(void 0===t.location||Pst.is(t.location))&&(void 0===t.command||Vst.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)&&Dst.is(t.position)&&(me.string(t.label)||me.typedArray(t.label,qlt.is))&&(void 0===t.kind||Ult.is(t.kind))&&void 0===t.textEdits||me.typedArray(t.textEdits,Xst.is)&&(void 0===t.tooltip||me.string(t.tooltip)||clt.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)&&Ist.is(t.uri)&&me.string(t.name)}function re(t,e,r,n){return new Jlt(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(;tt.state.transitions),{actualToken:r,possibleTokenTypes:dY(e.filter(t=>t instanceof oot).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Eot(t,e){return t.edges[e.tokenTypeIdx]}function Cot(t,e,r){var n,i=new pot,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===tot)a.push(n);else{var s=n.state.transitions.length;for(let t=0;t{_st(),hot(),got(),_q(),uG(),pY(),lG(),GP(),SU(),tq(),Bj(),Ae(fot,"createDFACache"),Uot=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;tconsole.log(t)}initialize(t){this.atn=Cst(t.rules),this.dfas=yot(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,o=Est(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(git({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!mot(c,!1)||i)return n?function(e){var r=new Uot,n=void 0===e?0:e.length;for(let t=0;t(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,s=this.logging,o=Est(e,n,t),l=this.atn.decisionMap[o].decision,c=x(git({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(mot(c)&&c[0][0]&&!i){if(r=c[0],1===(r=UP(r)).length&&JG(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=Pj(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=vot.call(this,a,l,Got,s);return"object"!=typeof t&&0===t}}},Ae(mot,"isLL1Sequence"),Ae(yot,"initATNSimulator"),Ae(vot,"adaptivePredict"),Ae(xot,"performLookahead"),Ae(bot,"computeLookaheadTarget"),Ae(wot,"reportLookaheadAmbiguity"),Ae(kot,"buildAmbiguityError"),Ae(Tot,"getProductionDslName"),Ae(_ot,"buildAdaptivePredictError"),Ae(Eot,"getExistingTargetState"),Ae(Cot,"computeReachSet"),Ae(Sot,"getReachableTarget"),Ae(Aot,"getUniqueAlt"),Ae(Lot,"newDFAState"),Ae(Not,"addDFAEdge"),Ae(Iot,"addDFAState"),Ae(Mot,"computeStartState"),Ae(Rot,"closure"),Ae(Dot,"getEpsilonTarget"),Ae(Oot,"hasConfigInRuleStopState"),Ae(Pot,"allConfigsInRuleStopStates"),Ae(Bot,"hasConflictTerminatingPrediction"),Ae(Fot,"getConflictingAltSets"),Ae($ot,"hasConflictingAltSet"),Ae(zot,"hasStateAssociatedWithOneAlt")}),wct=t(()=>{bct()}),kct=t(()=>{function t(t){return"string"==typeof t}var e,r,n,i;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?Wot.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?Wot.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:Vot.create(t,e),end:Vot.create(r,n)};if(Vot.is(t)&&Vot.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)&&Vot.is(t.start)&&Vot.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return me.objectLiteral(t)&&Xot.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)&&Xot.is(t.targetRange)&&me.string(t.targetUri)&&Xot.is(t.targetSelectionRange)&&(Xot.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)&&Xot.is(t.range)&&Qot.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)||clt.is(t))&&(me.undefined(t.additionalTextEdits)||me.typedArray(t.additionalTextEdits,clt.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 _(t,e){return{location:t,message:e}}function E(t){return me.defined(t)&&Kot.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)&&Xot.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,nlt.is))}function L(t,e,...r){return t={title:t,command:e},me.defined(r)&&0me.string(t.kind)?glt.is(t)||flt.is(t)||mlt.is(t):plt.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 st(t){return me.defined(t)&&me.string(t.uri)&&me.string(t.languageId)&&me.integer(t.version)&&me.string(t.text)}function ot(t){return t===n.PlainText||t===n.Markdown}function lt(t){var e=t;return me.objectLiteral(t)&&klt.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)&&Xot.is(t.insert)&&Xot.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)&&(Tlt.is(e.contents)||Ilt.is(e.contents)||me.typedArray(e.contents,Ilt.is))&&(void 0===t.range||Xot.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)&&Xot.is(t.range)&&Xot.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 _t(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Et(t){return me.defined(t)&&me.typedArray(t.diagnostics,olt.is)&&(void 0===t.only||me.typedArray(t.only,me.string))&&(void 0===t.triggerKind||t.triggerKind===Glt.Invoked||t.triggerKind===Glt.Automatic)}function Ct(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):llt.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,olt.is))&&(void 0===t.kind||me.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||llt.is(t.command))&&(void 0===t.isPreferred||me.boolean(t.isPreferred))&&(void 0===t.edit||ylt.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)&&Xot.is(t.range)&&(me.undefined(t.command)||llt.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)&&Xot.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)&&Xot.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&&Xot.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&&Xot.is(t.range)&&me.boolean(t.caseSensitiveLookup)&&(me.string(t.variableName)||void 0===t.variableName)}function Ut(t,e){return{range:t,expression:e}}function Gt(t){return null!=t&&Xot.is(t.range)&&(me.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function jt(t){return me.defined(t)&&Xot.is(t.stoppedLocation)}function Yt(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)||Tlt.is(t.tooltip))&&(void 0===t.location||Kot.is(t.location))&&(void 0===t.command||llt.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)&&Vot.is(t.position)&&(me.string(t.label)||me.typedArray(t.label,nct.is))&&(void 0===t.kind||rct.is(t.kind))&&void 0===t.textEdits||me.typedArray(t.textEdits,clt.is)&&(void 0===t.tooltip||me.string(t.tooltip)||Tlt.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)&&Yot.is(t.uri)&&me.string(t.name)}function re(t,e,r,n){return new pct(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],s=e.offsetAt(a.range.start),o=e.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let t=0,e=0,r=0;for(;tt?n=i:r=i+1}var a=r-1;return Dst.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{lct(),WK(),_Z(),tct=class{static{Ae(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(t){return this.rootNode=new act(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new nct;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new rct(t.startOffset,t.image.length,sZ(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 rct(e.startOffset,e.image.length,sZ(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{hot(),sct(),xJ(),Qtt(),OJ(),cct(),uct=Symbol("Datatype"),Ae(hct,"isDataTypeNode"),dct=Ae(t=>t.endsWith("​")?t:t+"​","withRuleSuffix"),pct=class{static{Ae(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition;this.wrapper=new xct(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()}},gct=class extends pct{static{Ae(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new tct,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:Dtt(t)?uct:$tt(t),r=this.wrapper.DEFINE_RULE(dct(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===uct&&(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=gQ(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,o,r,i)}else if(hct(a)){let t=e.image;gQ(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{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}},vct={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new mct},xct=class extends iot{static{Ae(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},vct),{lookaheadStrategy:r?new rat({maxLookahead:e.maxLookahead}):new Lst}),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 wct(t,e,r){return kct({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function kct(t,e){let r=ytt(e,!1),n=KK(e.rules).filter(QZ).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,Tct(a,i.definition)))}}function Tct(e,r,t=!1){let n;if(gQ(r))n=Rct(e,r);else if(sQ(r))n=Ect(e,r);else if(cQ(r))n=Tct(e,r.terminal);else if(uQ(r))n=Mct(e,r);else if(yQ(r))n=_ct(e,r);else if(lQ(r))n=Act(e,r);else if(wQ(r))n=Lct(e,r);else if(pQ(r))n=Nct(e,r);else{if(!dQ(r))throw new SZ(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=Ae(()=>e.parser.consume(t,Dnt,r),"method")}}return Dct(e,t?void 0:Ict(r),n,r.cardinality)}function Ect(t,e){let r=$tt(e);return()=>t.parser.action(r,e)}function _ct(n,i){let a=i.rule.ref;if(QZ(a)){let e=n.subrule++,r=0({});return t=>n.parser.subrule(e,Oct(n,a),i,r(t))}if(nQ(a)){let t=n.consume++,e=Bct(n,a.name);return()=>n.parser.consume(t,e,i)}if(!a)throw new SZ(i.$cstNode,"Undefined rule type: "+i.$type);CZ(a)}function Cct(a,t){let o=t.map(t=>Sct(t.value));return e=>{var r={};for(let t=0;te(t)||r(t)}if(GZ(n)){let e=Sct(n.left),r=Sct(n.right);return t=>e(t)&&r(t)}if(VZ(n)){let e=Sct(n.value);return t=>!e(t)}if(ZZ(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(zZ(n)){let t=!!n.true;return()=>t}CZ()}function Act(r,n){if(1===n.elements.length)return Tct(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:Tct(r,i,!0)};(i=Ict(i))&&(a.GATE=Sct(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 Lct(o,t){if(1===t.elements.length)return Tct(o,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:Tct(o,r,!0)};(r=Ict(r))&&(n.GATE=Sct(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"i(a):t.GATE=()=>!n.unorderedGroups.get(l(s,n))?.[r],t})),"alternatives"),a=Dct(o,Ict(t),i,"*");return t=>{a(t),o.parser.isRecording()||o.parser.unorderedGroups.delete(l(s,o.parser))}}function Nct(e,t){let r=t.elements.map(t=>Tct(e,t));return e=>r.forEach(t=>t(e))}function Ict(t){if(pQ(t))return t.guardCondition}function Mct(r,n,i=n.terminal){if(i){if(yQ(i)&&QZ(i.rule.ref)){let e=r.subrule++;return t=>r.parser.subrule(e,Oct(r,i.rule.ref),n,t)}if(yQ(i)&&nQ(i.rule.ref)){let t=r.consume++,e=Bct(r,i.rule.ref.name);return()=>r.parser.consume(t,e,n)}if(gQ(i)){let t=r.consume++,e=Bct(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=Att(n.type.ref)?.terminal;if(t)return Mct(r,n,t);throw new Error("Could not find name assignment for type: "+$tt(n.type.ref))}function Rct(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 Dct(n,t,i,e){let a=t&&Sct(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:Qat(),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:Qat(),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})}CZ()}function Oct(t,e){if(e=Pct(t,e),t=t.rules.get(e))return t;throw new Error(`Rule "${e}" not found."`)}function Pct(n,i){if(QZ(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!QZ(e);)(pQ(e)||lQ(e)||wQ(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function Bct(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var Fct=t(()=>{hot(),xJ(),AZ(),rZ(),Qtt(),Ae(wct,"createParser"),Ae(kct,"buildRules"),Ae(Tct,"buildElement"),Ae(Ect,"buildAction"),Ae(_ct,"buildRuleCall"),Ae(Cct,"buildRuleCallPredicate"),Ae(Sct,"buildPredicate"),Ae(Act,"buildAlternatives"),Ae(Lct,"buildUnorderedGroup"),Ae(Nct,"buildGroup"),Ae(Ict,"getGuardCondition"),Ae(Mct,"buildCrossReference"),Ae(Rct,"buildKeyword"),Ae(Dct,"wrap"),Ae(Oct,"getRule"),Ae(Pct,"getRuleName"),Ae(Bct,"getToken")});function $ct(t){var e=t.Grammar,r=t.parser.Lexer;return wct(e,t=new yct(t),r.definition),t.finalize(),t}var zct=t(()=>{bct(),Fct(),Ae($ct,"createCompletionParser")});function Gct(t){return(t=Uct(t)).finalize(),t}function Uct(t){var e=t.Grammar,r=t.parser.Lexer;return wct(e,new gct(t),r.definition)}var qct,Yct,jct,Hct=t(()=>{bct(),Fct(),Ae(Gct,"createLangiumParser"),Ae(Uct,"prepareLangiumParser")}),Wct=t(()=>{hot(),xJ(),OJ(),Qtt(),ptt(),rZ(),qct=class{static{Ae(this,"DefaultTokenBuilder")}buildTokens(t,e){let r=KK(ytt(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&&itt(e)?i.unshift(t):i.push(t)}),i}buildTerminalTokens(t){return t.filter(nQ).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=Utt(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,r={name:t.name,PATTERN:r,LINE_BREAKS:!0};return t.hidden&&(r.GROUP=itt(e)?fnt.SKIPPED:"hidden"),r}requiresCustomPattern(t){return!!t.flags.includes("u")||!(!t.source.includes("?<=")&&!t.source.includes("?(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(QZ).flatMap(t=>SJ(t).filter(gQ)).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(ott(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&stt("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),Vct=t(()=>{function t(e){let r="";for(let t=1;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}),Kct=bBt(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}),Zct=bBt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var o=Xct();{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{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(){}}),Qct=bBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=Xct(),i=Kct(),a=Zct();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}),Jct={},tht=t(()=>{tt(Jct,et(Qct(),1))});function eht(){return new Promise(t=>{"u"{tht(),Ae(eht,"delayNextTick"),oht=0,sht=10,Ae(rht,"startCancelableOperation"),Ae(nht,"setInterruptionPeriod"),lht=Symbol("OperationCancelled"),Ae(iht,"isOperationCancelled"),Ae(aht,"interruptAndCheck"),cht=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 uht(n,i){if(!(n.length<=1)){var a=n.length/2|0,o=n.slice(0,a),s=n.slice(a);uht(o,i),uht(s,i);let t=0,e=0,r=0;for(;tr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function fht(t){var e=ght(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var mht,yht,vht,xht,bht,wht,kht,Tht,Eht,_ht=t(()=>{function t(t,e,r,n){return new mht(t,e,r,n)}function e(t,e,r){if(t instanceof mht)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=uht(e.map(fht),(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(si&&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;mht=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=ght(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=dht(a.text,!1,s);if(t-r===i.length)for(let t=0,e=i.length;tt?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{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{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:Ae(()=>w,"URI"),Utils:Ae(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!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(g,"s");let o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{Ae(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,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=((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||"",g(this,a))}get fsPath(){return y(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 k(e,r,n,i,a)}static parse(t,e=!1){return(t=o.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=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 k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===s?t.fsPath:null,e))}}let s=n?1:void 0;class k extends w{static{Ae(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=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 f(e,r,n){let i,a=-1;for(let t=0;tx(t)):t}Ae(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,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})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:vht,Utils:xht}=p)}),Sht=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=>00{var t;_ht(),Aht(),tht(),rZ(),Sht(),(t=wht=wht||{})[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",kht=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=Jct.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??vht.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:wht.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:wht.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=wht.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??yht.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},Tht=class{static{Ae(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory}get all(){return KK(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=wht.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=wht.Changed,this.documentMap.delete(t)),e}}}),Lht=t(()=>{tht(),WK(),OJ(),hht(),Aht(),Eht=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=Jct.CancellationToken.None){for(var r of AJ(e.parseResult.value))await aht(t),NJ(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);UK(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($K(this._ref))return this._ref;if(GK(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&&EJ(r).state{Qtt(),Ae(Nht,"isNamed"),Iht=class{static{Ae(this,"DefaultNameProvider")}getName(t){if(Nht(t))return t.name}getNameNode(t){return ktt(t.$cstNode,"name")}}}),Hht=t(()=>{Qtt(),WK(),OJ(),_Z(),rZ(),Sht(),Mht=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=Stt(t),r=t.astNode;if(e&&r){if(zK(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(zK(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||oZ(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=>bht.equals(t.sourceUri,e.documentUri))),n.push(...i),KK(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=EJ(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:lZ(r),local:!0}}}}),Wht=t(()=>{rZ(),Rht=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 eZ.sum(KK(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 KK(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return KK(this.map.keys())}values(){return KK(this.map.values()).flat()}entriesGroupedByKey(){return KK(this.map.entries())}},Dht=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)}}}),Vht=t(()=>{tht(),OJ(),Wht(),hht(),Oht=class{static{Ae(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=Jct.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=CJ,n=Jct.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await aht(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=Jct.CancellationToken.None){var r,n=t.parseResult.value,i=new Rht;for(r of SJ(n))await aht(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))}}}),Xht=t(()=>{rZ(),Pht=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)}},Bht=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=KK(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},Fht={getElement(){},getAllElements(){return QK}}}),Kht=t(()=>{$ht=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")}},zht=class extends $ht{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()}},Ght=class extends $ht{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}},Uht=class extends Ght{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)}))}},qht=class extends zht{static{Ae(this,"WorkspaceCache")}constructor(t){super(),this.onDispose(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),Zht=t(()=>{Xht(),OJ(),rZ(),Kht(),Yht=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 qht(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=EJ(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0this.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 Pht(KK(t),e,r)}createScopeForNodes(t,e,r){return t=KK(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new Pht(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new Bht(this.indexManager.allElements(t)))}}});function Qht(t){return"string"==typeof t.$comment}function Jht(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var tut,eut,rut=t(()=>{Cht(),WK(),OJ(),Qtt(),Ae(Qht,"isAstNodeWithComment"),Ae(Jht,"isIntermediateReference"),tut=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=EJ(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(zK(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=EJ(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($K(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=wtt(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{Sht(),eut=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=bht.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 iut(t){return{code:t}}var aut,out,sut=t(()=>{Wht(),hht(),rZ(),Ae(iut,"diagnosticData"),(aut=aut||{}).all=["fast","slow","built-in"],out=class{static{Ae(this,"ValidationRegistry")}constructor(t){this.entries=new Rht,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(iht(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=KK(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 lut(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=ktt(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=_tt(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 cut(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 hut,uut,dut,put,gut,fut,mut,yut,vut,xut,but=t(()=>{var t;tht(),Qtt(),OJ(),_Z(),hht(),sut(),hut=class{static{Ae(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=Jct.CancellationToken.None){var n=t.parseResult,i=[];if(await aht(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)===uut.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===uut.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===uut.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(iht(t))throw t;console.error("An error occurred during validation:",t)}await aht(r)}return i}processLexingErrors(t,e,r){for(var n of t.lexerErrors)n={severity:cut("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:iut(uut.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=sZ(n.token),t&&(a={severity:cut("error"),range:t,message:n.message,data:iut(uut.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:uut.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=Jct.CancellationToken.None){let i=[],a=Ae((t,e,r)=>{i.push(this.toDiagnostic(t,e,r))},"acceptor");return await Promise.all(AJ(t).map(async t=>{var e;await aht(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:lut(r),severity:cut(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(lut,"getDiagnosticRange"),Ae(cut,"toDiagnosticSeverity"),(t=uut=uut||{}).LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),wut=t(()=>{tht(),WK(),OJ(),_Z(),hht(),Sht(),dut=class{static{Ae(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r=EJ(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??lZ(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:lZ(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},put=class{static{Ae(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=Jct.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of AJ(n))await aht(e),NJ(i).filter(t=>!UK(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=EJ(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:lZ(n),local:bht.equals(r.documentUri,e)}}}}),kut=t(()=>{gut=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)}}}),Tut=t(()=>{hht(),fut=class{static{Ae(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new cht,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}}}),Eut=t(()=>{function t(t){return{dispose:Ae(async()=>t(),"dispose")}}var e=mut=mut||{};Ae(t,"create"),e.create=t}),_ut=t(()=>{tht(),Eut(),Wht(),hht(),rZ(),sut(),Aht(),yut=class{static{Ae(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Rht,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=wht.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=Jct.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===wht.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=wht.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:aut.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=wht.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=wht.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=Jct.CancellationToken.None){this.currentState=wht.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=wht.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let o=KK(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,wht.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await aht(r),t=this.langiumDocuments.all.filter(t=>t.statet(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),mut.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,wht.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,wht.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,wht.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,wht.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,wht.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,wht.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{this.buildPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let o;return t&&"path"in t?o=t:a=t,a=a??Jct.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(lht):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(lht)})})}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e))await aht(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:aut.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:{}}}}),Cut=t(()=>{OJ(),Kht(),tht(),rZ(),Sht(),vut=class{static{Ae(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new Ght,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=EJ(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{bht.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),KK(n)}allElements(e,r){let t=KK(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=Jct.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=Jct.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()))}}}),Sut=t(()=>{tht(),hht(),Sht(),xut=class{static{Ae(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new cht,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=Jct.CancellationToken.None){t=await this.performStartup(t),await aht(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 vht.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=bht.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=bht.extname(e.uri),r.includes(n)))}}});function Aut(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function Lut(t){return t&&"modes"in t&&"defaultMode"in t}function Nut(t){return!Aut(t)&&!Lut(t)}var Iut,Mut=t(()=>{hot(),Iut=class{static{Ae(this,"DefaultLexer")}constructor(t){t=t.parser.TokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),this.tokenTypes=this.toTokenTypeDictionary(t),t=Nut(t)?Object.values(t):t,this.chevrotainLexer=new fnt(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(Nut(t))return t;let e=Lut(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},Ae(Aut,"isTokenTypeArray"),Ae(Lut,"isIMultiModeLexerDefinition"),Ae(Nut,"isTokenTypeDictionary")});function Rut(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||Dst.create(0,0),r=Out(t),e=Wut(n),zut({index:0,tokens:Put({lines:r,position:i,options:e}),position:i})}function Dut(t,e){var r,n,e=Wut(e);return 0!==(t=Out(t)).length&&(r=t[t.length-1],n=e.start,e=e.end,!!n?.exec(t[0]))&&!!e?.exec(r)}function Out(t){return("string"==typeof t?t:t.text).split(ctt)}function Put(a){let o,s,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i=r.length?0t?n=i:r=i+1}var a=r-1;return Vot.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{kct(),oZ(),$Z(),gct=class{static{Ae(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(t){return this.rootNode=new xct(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new yct;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new mct(t.startOffset,t.image.length,wZ(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 mct(e.startOffset,e.image.length,wZ(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{_st(),wct(),RJ(),pet(),XJ(),Tct(),Ect=Symbol("Datatype"),Ae(_ct,"isDataTypeNode"),Cct=Ae(t=>t.endsWith("​")?t:t+"​","withRuleSuffix"),Sct=class{static{Ae(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition;this.wrapper=new Rct(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()}},Act=class extends Sct{static{Ae(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new gct,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:Vtt(t)?Ect:Jtt(t),r=this.wrapper.DEFINE_RULE(Cct(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===Ect&&(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 s=AQ(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,i)}else if(_ct(a)){let t=e.image;AQ(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{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}},Mct={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Nct},Rct=class extends vst{static{Ae(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},Mct),{lookaheadStrategy:r?new mat({maxLookahead:e.maxLookahead}):new qot}),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 Oct(t,e,r){return Pct({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function Pct(t,e){let r=Itt(e,!1),n=hZ(e.rules).filter(dQ).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,Bct(a,i.definition)))}}function Bct(e,r,t=!1){let n;if(AQ(r))n=Wct(e,r);else if(wQ(r))n=Fct(e,r);else if(TQ(r))n=Bct(e,r.terminal);else if(EQ(r))n=Hct(e,r);else if(IQ(r))n=$ct(e,r);else if(kQ(r))n=Gct(e,r);else if(OQ(r))n=qct(e,r);else if(SQ(r))n=jct(e,r);else{if(!CQ(r))throw new UZ(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=Ae(()=>e.parser.consume(t,Vnt,r),"method")}}return Vct(e,t?void 0:Yct(r),n,r.cardinality)}function Fct(t,e){let r=Jtt(e);return()=>t.parser.action(r,e)}function $ct(n,i){let a=i.rule.ref;if(dQ(a)){let e=n.subrule++,r=0({});return t=>n.parser.subrule(e,Xct(n,a),i,r(t))}if(yQ(a)){let t=n.consume++,e=Zct(n,a.name);return()=>n.parser.consume(t,e,i)}if(!a)throw new UZ(i.$cstNode,"Undefined rule type: "+i.$type);zZ(a)}function zct(a,t){let s=t.map(t=>Uct(t.value));return e=>{var r={};for(let t=0;te(t)||r(t)}if(eQ(n)){let e=Uct(n.left),r=Uct(n.right);return t=>e(t)&&r(t)}if(lQ(n)){let e=Uct(n.value);return t=>!e(t)}if(uQ(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(tQ(n)){let t=!!n.true;return()=>t}zZ()}function Gct(r,n){if(1===n.elements.length)return Bct(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:Bct(r,i,!0)};(i=Yct(i))&&(a.GATE=Uct(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 qct(s,t){if(1===t.elements.length)return Bct(s,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:Bct(s,r,!0)};(r=Yct(r))&&(n.GATE=Uct(r)),e.push(n)}let o=s.or++,l=Ae((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),i=Ae(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:Ae(()=>!0,"ALT")},n=s.parser,i=(t.ALT=()=>{var t;e.ALT(a),n.isRecording()||(t=l(o,n),n.unorderedGroups.get(t)||n.unorderedGroups.set(t,[]),"u"i(a):t.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],t})),"alternatives"),a=Vct(s,Yct(t),i,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function jct(e,t){let r=t.elements.map(t=>Bct(e,t));return e=>r.forEach(t=>t(e))}function Yct(t){if(SQ(t))return t.guardCondition}function Hct(r,n,i=n.terminal){if(i){if(IQ(i)&&dQ(i.rule.ref)){let e=r.subrule++;return t=>r.parser.subrule(e,Xct(r,i.rule.ref),n,t)}if(IQ(i)&&yQ(i.rule.ref)){let t=r.consume++,e=Zct(r,i.rule.ref.name);return()=>r.parser.consume(t,e,n)}if(AQ(i)){let t=r.consume++,e=Zct(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=Gtt(n.type.ref)?.terminal;if(t)return Hct(r,n,t);throw new Error("Could not find name assignment for type: "+Jtt(n.type.ref))}function Wct(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 Vct(n,t,i,e){let a=t&&Uct(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:dst(),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:dst(),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})}zZ()}function Xct(t,e){if(e=Kct(t,e),t=t.rules.get(e))return t;throw new Error(`Rule "${e}" not found."`)}function Kct(n,i){if(dQ(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!dQ(e);)(SQ(e)||kQ(e)||OQ(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function Zct(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var Qct=t(()=>{_st(),RJ(),GZ(),mZ(),pet(),Ae(Oct,"createParser"),Ae(Pct,"buildRules"),Ae(Bct,"buildElement"),Ae(Fct,"buildAction"),Ae($ct,"buildRuleCall"),Ae(zct,"buildRuleCallPredicate"),Ae(Uct,"buildPredicate"),Ae(Gct,"buildAlternatives"),Ae(qct,"buildUnorderedGroup"),Ae(jct,"buildGroup"),Ae(Yct,"getGuardCondition"),Ae(Hct,"buildCrossReference"),Ae(Wct,"buildKeyword"),Ae(Vct,"wrap"),Ae(Xct,"getRule"),Ae(Kct,"getRuleName"),Ae(Zct,"getToken")});function Jct(t){var e=t.Grammar,r=t.parser.Lexer;return Oct(e,t=new Ict(t),r.definition),t.finalize(),t}var tht=t(()=>{Dct(),Qct(),Ae(Jct,"createCompletionParser")});function eht(t){return(t=rht(t)).finalize(),t}function rht(t){var e=t.Grammar,r=t.parser.Lexer;return Oct(e,new Act(t),r.definition)}var nht,iht,aht,sht=t(()=>{Dct(),Qct(),Ae(eht,"createLangiumParser"),Ae(rht,"prepareLangiumParser")}),oht=t(()=>{_st(),RJ(),XJ(),pet(),Stt(),mZ(),nht=class{static{Ae(this,"DefaultTokenBuilder")}buildTokens(t,e){let r=hZ(Itt(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&&vtt(e)?i.unshift(t):i.push(t)}),i}buildTerminalTokens(t){return t.filter(yQ).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=ret(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,r={name:t.name,PATTERN:r,LINE_BREAKS:!0};return t.hidden&&(r.GROUP=vtt(e)?Lnt.SKIPPED:"hidden"),r}requiresCustomPattern(t){return!!t.flags.includes("u")||!(!t.source.includes("?<=")&&!t.source.includes("?(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(dQ).flatMap(t=>UJ(t).filter(AQ)).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(btt(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&wtt("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),lht=t(()=>{function t(e){let r="";for(let t=1;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}),hht=kBt(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 s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,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(s,"array"),t.array=s,Ae(o,"stringArray"),t.stringArray=o}),uht=kBt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=cht();{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{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(){}}),dht=kBt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=cht(),i=hht(),a=uht();function s(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(s,"is"),r.is=s;var o=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?o:(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}),pht={},ght=t(()=>{tt(pht,et(dht(),1))});function fht(){return new Promise(t=>{"u"{ght(),Ae(fht,"delayNextTick"),bht=0,wht=10,Ae(mht,"startCancelableOperation"),Ae(yht,"setInterruptionPeriod"),kht=Symbol("OperationCancelled"),Ae(vht,"isOperationCancelled"),Ae(xht,"interruptAndCheck"),Tht=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 Eht(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);Eht(s,i),Eht(o,i);let t=0,e=0,r=0;for(;tr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Lht(t){var e=Aht(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Nht,Iht,Mht,Rht,Dht,Oht,Pht,Bht,Fht,$ht=t(()=>{function t(t,e,r,n){return new Nht(t,e,r,n)}function e(t,e,r){if(t instanceof Nht)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=Eht(e.map(Lht),(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 s of n){var o=t.offsetAt(s.range.start);if(oi&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;Nht=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 s=Aht(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),t=Math.max(s.end.line,0),n=this._lineOffsets,i=Cht(a.text,!1,o);if(t-r===i.length)for(let t=0,e=i.length;tt?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{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,s=0,o=0;o<=t.length;++o){if(o{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:Ae(()=>w,"URI"),Utils:Ae(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!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(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{Ae(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,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=((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||"",g(this,a))}get fsPath(){return y(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 k(e,r,n,i,a)}static parse(t,e=!1){return(t=s.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=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 k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=n?1:void 0;class k extends w{static{Ae(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}let l={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,r,n){let i,a=-1;for(let t=0;tx(t)):t}Ae(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,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})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:Mht,Utils:Rht}=p)}),Uht=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=>00{var t;$ht(),Ght(),ght(),mZ(),Uht(),(t=Oht=Oht||{})[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",Pht=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=pht.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??Mht.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:Oht.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:Oht.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=Oht.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??Iht.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},Bht=class{static{Ae(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory}get all(){return hZ(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=Oht.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=Oht.Changed,this.documentMap.delete(t)),e}}}),qht=t(()=>{ght(),oZ(),XJ(),_ht(),Ght(),Fht=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=pht.CancellationToken.None){for(var r of GJ(e.parseResult.value))await xht(t),jJ(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);rZ(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(JK(this._ref))return this._ref;if(eZ(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&&FJ(r).state{pet(),Ae(jht,"isNamed"),Yht=class{static{Ae(this,"DefaultNameProvider")}getName(t){if(jht(t))return t.name}getNameNode(t){return Ptt(t.$cstNode,"name")}}}),sut=t(()=>{pet(),oZ(),XJ(),$Z(),mZ(),Uht(),Hht=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=Utt(t),r=t.astNode;if(e&&r){if(tZ(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(tZ(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||bZ(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=>Dht.equals(t.sourceUri,e.documentUri))),n.push(...i),hZ(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=FJ(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:kZ(r),local:!0}}}}),out=t(()=>{mZ(),Wht=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 fZ.sum(hZ(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 hZ(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return hZ(this.map.keys())}values(){return hZ(this.map.values()).flat()}entriesGroupedByKey(){return hZ(this.map.entries())}},Vht=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)}}}),lut=t(()=>{ght(),XJ(),out(),_ht(),Xht=class{static{Ae(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=pht.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=zJ,n=pht.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await xht(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=pht.CancellationToken.None){var r,n=t.parseResult.value,i=new Wht;for(r of UJ(n))await xht(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))}}}),cut=t(()=>{mZ(),Kht=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)}},Zht=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=hZ(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},Qht={getElement(){},getAllElements(){return dZ}}}),hut=t(()=>{Jht=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")}},tut=class extends Jht{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()}},eut=class extends Jht{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}},rut=class extends eut{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)}))}},nut=class extends tut{static{Ae(this,"WorkspaceCache")}constructor(t){super(),this.onDispose(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),uut=t(()=>{cut(),XJ(),mZ(),hut(),iut=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 nut(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=FJ(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0this.reflection.isSubtype(t.type,n))),t=t.$container}while(t)}let s=this.getGlobalScope(n,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new Kht(hZ(t),e,r)}createScopeForNodes(t,e,r){return t=hZ(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new Kht(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new Zht(this.indexManager.allElements(t)))}}});function dut(t){return"string"==typeof t.$comment}function put(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var gut,fut,mut=t(()=>{zht(),oZ(),XJ(),pet(),Ae(dut,"isAstNodeWithComment"),Ae(put,"isIntermediateReference"),gut=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=FJ(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:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(tZ(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=FJ(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(JK(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==(o=r.$cstNode)?void 0:o.text),s&&(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=Ott(n.$cstNode,t).map(i);0!==e.length&&(r[t]=e)}),n}}linkNode(e,r,n,t,i,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t{Uht(),fut=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=Dht.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 vut(t){return{code:t}}var xut,but,wut=t(()=>{out(),_ht(),mZ(),Ae(vut,"diagnosticData"),(xut=xut||{}).all=["fast","slow","built-in"],but=class{static{Ae(this,"ValidationRegistry")}constructor(t){this.entries=new Wht,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(vht(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=hZ(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 kut(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=Ptt(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=$tt(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 Tut(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 _ut,Eut,Cut,Sut,Aut,Lut,Nut,Iut,Mut,Rut,Dut=t(()=>{var t;ght(),pet(),XJ(),$Z(),_ht(),wut(),_ut=class{static{Ae(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=pht.CancellationToken.None){var n=t.parseResult,i=[];if(await xht(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)===Eut.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===Eut.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===Eut.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(vht(t))throw t;console.error("An error occurred during validation:",t)}await xht(r)}return i}processLexingErrors(t,e,r){for(var n of t.lexerErrors)n={severity:Tut("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:vut(Eut.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=wZ(n.token),t&&(a={severity:Tut("error"),range:t,message:n.message,data:vut(Eut.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:Eut.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=pht.CancellationToken.None){let i=[],a=Ae((t,e,r)=>{i.push(this.toDiagnostic(t,e,r))},"acceptor");return await Promise.all(GJ(t).map(async t=>{var e;await xht(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:kut(r),severity:Tut(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(kut,"getDiagnosticRange"),Ae(Tut,"toDiagnosticSeverity"),(t=Eut=Eut||{}).LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),Out=t(()=>{ght(),oZ(),XJ(),$Z(),_ht(),Uht(),Cut=class{static{Ae(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r=FJ(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??kZ(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:kZ(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},Sut=class{static{Ae(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=pht.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of GJ(n))await xht(e),jJ(i).filter(t=>!rZ(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=FJ(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:kZ(n),local:Dht.equals(r.documentUri,e)}}}}),Put=t(()=>{Aut=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)}}}),But=t(()=>{_ht(),Lut=class{static{Ae(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Tht,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}}}),Fut=t(()=>{function t(t){return{dispose:Ae(async()=>t(),"dispose")}}var e=Nut=Nut||{};Ae(t,"create"),e.create=t}),$ut=t(()=>{ght(),Fut(),out(),_ht(),mZ(),wut(),Ght(),Iut=class{static{Ae(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Wht,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Oht.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=pht.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===Oht.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=Oht.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:xut.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=Oht.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Oht.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=pht.CancellationToken.None){this.currentState=Oht.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=Oht.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=hZ(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,Oht.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await xht(r),t=this.langiumDocuments.all.filter(t=>t.statet(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),Nut.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,Oht.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,Oht.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,Oht.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,Oht.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,Oht.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,Oht.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{this.buildPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??pht.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(kht):new Promise((e,t)=>{let r=this.onBuildPhase(i,()=>{var t;r.dispose(),n.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),t(kht)})})}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e))await xht(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:xut.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:{}}}}),zut=t(()=>{XJ(),hut(),ght(),mZ(),Uht(),Mut=class{static{Ae(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new eut,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=FJ(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Dht.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),hZ(n)}allElements(e,r){let t=hZ(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=pht.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=pht.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()))}}}),Uut=t(()=>{ght(),_ht(),Uht(),Rut=class{static{Ae(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Tht,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=pht.CancellationToken.None){t=await this.performStartup(t),await xht(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 Mht.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=Dht.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=Dht.extname(e.uri),r.includes(n)))}}});function Gut(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function qut(t){return t&&"modes"in t&&"defaultMode"in t}function jut(t){return!Gut(t)&&!qut(t)}var Yut,Hut=t(()=>{_st(),Yut=class{static{Ae(this,"DefaultLexer")}constructor(t){t=t.parser.TokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),this.tokenTypes=this.toTokenTypeDictionary(t),t=jut(t)?Object.values(t):t,this.chevrotainLexer=new Lnt(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(jut(t))return t;let e=qut(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},Ae(Gut,"isTokenTypeArray"),Ae(qut,"isIMultiModeLexerDefinition"),Ae(jut,"isTokenTypeDictionary")});function Wut(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||Vot.create(0,0),r=Xut(t),e=odt(n),tdt({index:0,tokens:Kut({lines:r,position:i,options:e}),position:i})}function Vut(t,e){var r,n,e=odt(e);return 0!==(t=Xut(t)).length&&(r=t[t.length-1],n=e.start,e=e.end,!!n?.exec(t[0]))&&!!e?.exec(r)}function Xut(t){return("string"==typeof t?t:t.text).split(Ttt)}function Kut(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i=r.length?0{lct(),ptt(),Sht(),Ae(Rut,"parseJSDoc"),Ae(Dut,"isJSDoc"),Ae(Out,"getLines"),Qut=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Jut=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,Ae(Put,"tokenize"),Ae(But,"buildInlineTokens"),tdt=/\S/,edt=/\s*$/,Ae(Fut,"skipWhitespace"),Ae($ut,"lastCharacter"),Ae(zut,"parseJSDocComment"),Ae(Gut,"parseJSDocElement"),Ae(Uut,"appendEmptyLine"),Ae(qut,"parseJSDocText"),Ae(Yut,"parseJSDocInline"),Ae(jut,"parseJSDocTag"),Ae(Hut,"parseJSDocLine"),Ae(Wut,"normalizeOptions"),Ae(Vut,"normalizeOption"),rdt=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+=Zut(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+=Zut(e)+r);return e.trim()}},ndt=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:1r.range.start.line&&(e+=` +`}var ddt,pdt,gdt,fdt,mdt,ydt,vdt,xdt,bdt,wdt,kdt,Tdt,_dt,Edt,Cdt,Sdt=t(()=>{kct(),Stt(),Uht(),Ae(Wut,"parseJSDoc"),Ae(Vut,"isJSDoc"),Ae(Xut,"getLines"),ddt=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,pdt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,Ae(Kut,"tokenize"),Ae(Zut,"buildInlineTokens"),gdt=/\S/,fdt=/\s*$/,Ae(Qut,"skipWhitespace"),Ae(Jut,"lastCharacter"),Ae(tdt,"parseJSDocComment"),Ae(edt,"parseJSDocElement"),Ae(rdt,"appendEmptyLine"),Ae(ndt,"parseJSDocText"),Ae(idt,"parseJSDocInline"),Ae(adt,"parseJSDocTag"),Ae(sdt,"parseJSDocLine"),Ae(odt,"normalizeOptions"),Ae(ldt,"normalizeOption"),mdt=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+=udt(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+=udt(e)+r);return e.trim()}},ydt=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:1r.range.start.line&&(e+=` `)}return e}toMarkdown(e){let r="";for(let t=0;tn.range.start.line&&(r+=` -`)}return r}},adt=class{static{Ae(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},Ae(Zut,"fillNewlines")}),gdt=t(()=>{OJ(),pdt(),odt=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&&Dut(t))return Rut(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=EJ(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)}}}),fdt=t(()=>{rut(),_Z(),sdt=class{static{Ae(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Qht(t)?t.$comment:null==(t=dZ(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),mdt={},ydt=t(()=>{tt(mdt,et(Zct(),1))}),vdt=t(()=>{hht(),ydt(),ldt=class{static{Ae(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t){return Promise.resolve(this.syncParser.parse(t))}},cdt=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{var t;0{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 cht;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(lht)}),this.queue.push(r),r.promise}},hdt=class{static{Ae(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new mdt.Emitter,this.deferred=new cht,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(lht),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 cht,this.sendMessage(t),this.deferred.promise}}}),xdt=t(()=>{tht(),hht(),udt=class{static{Ae(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Jct.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=new Jct.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 cht,e={action:e,deferred:n,cancellationToken:r??Jct.CancellationToken.None};return t.push(e),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0{try{var n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){iht(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),bdt=t(()=>{cct(),xJ(),WK(),OJ(),Wht(),_Z(),ddt=class{static{Ae(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new Dht,this.tokenTypeIdMap=new Dht,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 AJ(t))r.set(e,{});if(t.$cstNode)for(var i of iZ(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)$K(a)?o.push(this.dehydrateAstNode(a,e)):zK(a)?o.push(this.dehydrateReference(a,e)):o.push(a)}else $K(n)?i[r]=this.dehydrateAstNode(n,e):zK(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 jK(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),qK(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):YK(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 AJ(t))r.set(e,{});let i;if(t.$cstNode)for(var a of iZ(t.$cstNode)){let t;"fullText"in a?(t=new act(a.fullText),i=t):"content"in a?t=new nct:"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)$K(a)?o.push(this.setParent(this.hydrateAstNode(a,e),i)):zK(a)?o.push(this.hydrateReference(a,i,r,e)):o.push(a)}else $K(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):zK(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),qK(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;return new rct(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){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 AJ(this.grammar))BZ(e)&&this.grammarElementIdMap.set(e,t++)}}});function wdt(t){return{documentation:{CommentProvider:Ae(t=>new sdt(t),"CommentProvider"),DocumentationProvider:Ae(t=>new odt(t),"DocumentationProvider")},parser:{AsyncParser:Ae(t=>new ldt(t),"AsyncParser"),GrammarConfig:Ae(t=>Jtt(t),"GrammarConfig"),LangiumParser:Ae(t=>Gct(t),"LangiumParser"),CompletionParser:Ae(t=>$ct(t),"CompletionParser"),ValueConverter:Ae(()=>new Yct,"ValueConverter"),TokenBuilder:Ae(()=>new qct,"TokenBuilder"),Lexer:Ae(t=>new Iut(t),"Lexer"),ParserErrorMessageProvider:Ae(()=>new mct,"ParserErrorMessageProvider")},workspace:{AstNodeLocator:Ae(()=>new gut,"AstNodeLocator"),AstNodeDescriptionProvider:Ae(t=>new dut(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Ae(t=>new put(t),"ReferenceDescriptionProvider")},references:{Linker:Ae(t=>new Eht(t),"Linker"),NameProvider:Ae(()=>new Iht,"NameProvider"),ScopeProvider:Ae(t=>new Yht(t),"ScopeProvider"),ScopeComputation:Ae(t=>new Oht(t),"ScopeComputation"),References:Ae(t=>new Mht(t),"References")},serializer:{Hydrator:Ae(t=>new ddt(t),"Hydrator"),JsonSerializer:Ae(t=>new tut(t),"JsonSerializer")},validation:{DocumentValidator:Ae(t=>new hut(t),"DocumentValidator"),ValidationRegistry:Ae(t=>new out(t),"ValidationRegistry")},shared:Ae(()=>t.shared,"shared")}}function kdt(e){return{ServiceRegistry:Ae(()=>new eut,"ServiceRegistry"),workspace:{LangiumDocuments:Ae(t=>new Tht(t),"LangiumDocuments"),LangiumDocumentFactory:Ae(t=>new kht(t),"LangiumDocumentFactory"),DocumentBuilder:Ae(t=>new yut(t),"DocumentBuilder"),IndexManager:Ae(t=>new vut(t),"IndexManager"),WorkspaceManager:Ae(t=>new xut(t),"WorkspaceManager"),FileSystemProvider:Ae(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Ae(()=>new udt,"WorkspaceLock"),ConfigurationProvider:Ae(t=>new fut(t),"ConfigurationProvider")}}}var Tdt=t(()=>{tet(),zct(),Hct(),Wct(),Vct(),Lht(),jht(),Hht(),Vht(),Zht(),rut(),nut(),but(),sut(),wut(),kut(),Tut(),_ut(),Aht(),Cut(),Sut(),Mut(),gdt(),fdt(),bct(),vdt(),xdt(),bdt(),Ae(wdt,"createDefaultCoreModule"),Ae(kdt,"createDefaultSharedCoreModule")});function Edt(t,e,r,n,i,a,o,s,l){return Cdt([t,e,r,n,i,a,o,s,l].reduce(Adt,{}))}function _dt(t){if(t&&t[Ndt])for(var e of Object.values(t))_dt(e);return t}function Cdt(r,n){let i=new Proxy({},{deleteProperty:Ae(()=>!1,"deleteProperty"),get:Ae((t,e)=>Sdt(t,e,r,n||i),"get"),getOwnPropertyDescriptor:Ae((t,e)=>(Sdt(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:Ae((t,e)=>e in r,"has"),ownKeys:Ae(()=>[...Reflect.ownKeys(r),Ndt],"ownKeys")});return i[Ndt]=!0,i}function Sdt(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]===Idt)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]=Idt;try{t[e]="function"==typeof r?r(n):Cdt(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function Adt(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]=Adt(i,n):t[r]=n)}return t}var Ldt,Ndt,Idt,Mdt,Rdt,Ddt=t(()=>{(Ldt=Ldt||{}).merge=(t,e)=>Adt(Adt({},t),e),Ae(Edt,"inject"),Ndt=Symbol("isProxy"),Ae(_dt,"eagerLoad"),Ae(Cdt,"_inject"),Idt=Symbol(),Ae(Sdt,"_resolve"),Ae(Adt,"_merge")}),Odt=t(()=>{}),Pdt=t(()=>{fdt(),gdt(),pdt()}),Bdt=t(()=>{}),Fdt=t(()=>{tet(),Bdt()}),$dt=t(()=>{}),zdt=t(()=>{vdt(),zct(),cct(),Hct(),bct(),Mut(),$dt(),Wct(),Vct()}),Gdt=t(()=>{Lht(),jht(),Hht(),Xht(),Vht(),Zht()}),Udt=t(()=>{bdt(),rut()}),qdt=t(()=>{Mdt=class{static{Ae(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Rdt={fileSystemProvider:Ae(()=>new Mdt,"fileSystemProvider")}});function Ydt(){var t=Edt(kdt(Rdt),Wdt),e=Edt(wdt({shared:t}),Hdt);return t.ServiceRegistry.register(e),e}function jdt(t){var e=Ydt(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,vht.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Hdt,Wdt,Vdt=t(()=>{Tdt(),Ddt(),xJ(),qdt(),Sht(),Hdt={Grammar:Ae(()=>{},"Grammar"),LanguageMetaData:Ae(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Wdt={AstReflection:Ae(()=>new yJ,"AstReflection")},Ae(Ydt,"createMinimalGrammarServices"),Ae(jdt,"loadGrammarFromJson")}),Xdt={},Kdt=(_Bt(Xdt,{AstUtils:()=>bJ,BiMap:()=>Dht,Cancellation:()=>Jct,ContextCache:()=>Ght,CstUtils:()=>nZ,DONE_RESULT:()=>JK,Deferred:()=>cht,Disposable:()=>mut,DisposableCache:()=>$ht,DocumentCache:()=>Uht,EMPTY_STREAM:()=>QK,ErrorWithLocation:()=>SZ,GrammarUtils:()=>gtt,MultiMap:()=>Rht,OperationCancelled:()=>lht,Reduction:()=>eZ,RegExpUtils:()=>ett,SimpleCache:()=>zht,StreamImpl:()=>ZK,TreeStreamImpl:()=>tZ,URI:()=>vht,UriUtils:()=>bht,WorkspaceCache:()=>qht,assertUnreachable:()=>CZ,delayNextTick:()=>eht,interruptAndCheck:()=>aht,isOperationCancelled:()=>iht,loadGrammarFromJson:()=>jdt,setInterruptionPeriod:()=>nht,startCancelableOperation:()=>rht,stream:()=>KK}),t(()=>{Kht(),ydt(),tt(Xdt,mdt),Wht(),Eut(),AZ(),Vdt(),hht(),rZ(),Sht(),OJ(),tht(),_Z(),Qtt(),ptt()})),Zdt=t(()=>{but(),sut()}),Qdt=t(()=>{wut(),kut(),Tut(),_ut(),Aht(),qdt(),Cut(),xdt(),Sut()}),Jdt={},t0t=(_Bt(Jdt,{AbstractAstReflection:()=>HK,AbstractCstNode:()=>ect,AbstractLangiumParser:()=>pct,AbstractParserErrorMessageProvider:()=>fct,AbstractThreadedAsyncParser:()=>cdt,AstUtils:()=>bJ,BiMap:()=>Dht,Cancellation:()=>Jct,CompositeCstNodeImpl:()=>nct,ContextCache:()=>Ght,CstNodeBuilder:()=>tct,CstUtils:()=>nZ,DONE_RESULT:()=>JK,DatatypeSymbol:()=>uct,DefaultAstNodeDescriptionProvider:()=>dut,DefaultAstNodeLocator:()=>gut,DefaultAsyncParser:()=>ldt,DefaultCommentProvider:()=>sdt,DefaultConfigurationProvider:()=>fut,DefaultDocumentBuilder:()=>yut,DefaultDocumentValidator:()=>hut,DefaultHydrator:()=>ddt,DefaultIndexManager:()=>vut,DefaultJsonSerializer:()=>tut,DefaultLangiumDocumentFactory:()=>kht,DefaultLangiumDocuments:()=>Tht,DefaultLexer:()=>Iut,DefaultLinker:()=>Eht,DefaultNameProvider:()=>Iht,DefaultReferenceDescriptionProvider:()=>put,DefaultReferences:()=>Mht,DefaultScopeComputation:()=>Oht,DefaultScopeProvider:()=>Yht,DefaultServiceRegistry:()=>eut,DefaultTokenBuilder:()=>qct,DefaultValueConverter:()=>Yct,DefaultWorkspaceLock:()=>udt,DefaultWorkspaceManager:()=>xut,Deferred:()=>cht,Disposable:()=>mut,DisposableCache:()=>$ht,DocumentCache:()=>Uht,DocumentState:()=>wht,DocumentValidator:()=>uut,EMPTY_SCOPE:()=>Fht,EMPTY_STREAM:()=>QK,EmptyFileSystem:()=>Rdt,EmptyFileSystemProvider:()=>Mdt,ErrorWithLocation:()=>SZ,GrammarAST:()=>LZ,GrammarUtils:()=>gtt,JSDocDocumentationProvider:()=>odt,LangiumCompletionParser:()=>yct,LangiumParser:()=>gct,LangiumParserErrorMessageProvider:()=>mct,LeafCstNodeImpl:()=>rct,MapScope:()=>Bht,Module:()=>Ldt,MultiMap:()=>Rht,OperationCancelled:()=>lht,ParserWorker:()=>hdt,Reduction:()=>eZ,RegExpUtils:()=>ett,RootCstNodeImpl:()=>act,SimpleCache:()=>zht,StreamImpl:()=>ZK,StreamScope:()=>Pht,TextDocument:()=>yht,TreeStreamImpl:()=>tZ,URI:()=>vht,UriUtils:()=>bht,ValidationCategory:()=>aut,ValidationRegistry:()=>out,ValueConverter:()=>jct,WorkspaceCache:()=>qht,assertUnreachable:()=>CZ,createCompletionParser:()=>$ct,createDefaultCoreModule:()=>wdt,createDefaultSharedCoreModule:()=>kdt,createGrammarConfig:()=>Jtt,createLangiumParser:()=>Gct,delayNextTick:()=>eht,diagnosticData:()=>iut,eagerLoad:()=>_dt,getDiagnosticRange:()=>lut,inject:()=>Edt,interruptAndCheck:()=>aht,isAstNode:()=>$K,isAstNodeDescription:()=>GK,isAstNodeWithComment:()=>Qht,isCompositeCstNode:()=>qK,isIMultiModeLexerDefinition:()=>Lut,isJSDoc:()=>Dut,isLeafCstNode:()=>YK,isLinkingError:()=>UK,isNamed:()=>Nht,isOperationCancelled:()=>iht,isReference:()=>zK,isRootCstNode:()=>jK,isTokenTypeArray:()=>Aut,isTokenTypeDictionary:()=>Nut,loadGrammarFromJson:()=>jdt,parseJSDoc:()=>Rut,prepareLangiumParser:()=>Uct,setInterruptionPeriod:()=>nht,startCancelableOperation:()=>rht,stream:()=>KK,toDiagnosticSeverity:()=>cut}),t(()=>{Tdt(),Ddt(),nut(),Odt(),WK(),Pdt(),Fdt(),zdt(),Gdt(),Udt(),Kdt(),tt(Jdt,Xdt),Zdt(),Qdt(),xJ()}));function e0t(t){return g0t.isInstance(t,"Architecture")}function r0t(t){return g0t.isInstance(t,"Branch")}function n0t(t){return g0t.isInstance(t,"Commit")}function i0t(t){return g0t.isInstance(t,"Common")}function a0t(t){return g0t.isInstance(t,"GitGraph")}function o0t(t){return g0t.isInstance(t,"Info")}function s0t(t){return g0t.isInstance(t,"Merge")}function l0t(t){return g0t.isInstance(t,"Packet")}function c0t(t){return g0t.isInstance(t,"PacketBlock")}function h0t(t){return g0t.isInstance(t,"Pie")}function u0t(t){return g0t.isInstance(t,"PieSection")}var d0t,i,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=t(()=>{t0t(),t0t(),t0t(),t0t(),d0t=Object.defineProperty,i=Ae((t,e)=>d0t(t,"name",{value:e,configurable:!0}),"__name"),Ae(e0t,"isArchitecture"),i(e0t,"isArchitecture"),Ae(r0t,"isBranch"),i(r0t,"isBranch"),Ae(n0t,"isCommit"),i(n0t,"isCommit"),Ae(i0t,"isCommon"),i(i0t,"isCommon"),Ae(a0t,"isGitGraph"),i(a0t,"isGitGraph"),Ae(o0t,"isInfo"),i(o0t,"isInfo"),Ae(s0t,"isMerge"),i(s0t,"isMerge"),Ae(l0t,"isPacket"),i(l0t,"isPacket"),Ae(c0t,"isPacketBlock"),i(c0t,"isPacketBlock"),Ae(h0t,"isPie"),i(h0t,"isPie"),Ae(u0t,"isPieSection"),i(u0t,"isPieSection"),p0t=class extends HK{static{Ae(this,"MermaidAstReflection")}static{i(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:[]}}}},g0t=new p0t,m0t=i(()=>f0t=f0t??jdt('{"$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"),v0t=i(()=>y0t=y0t??jdt(`{"$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"),b0t=i(()=>x0t=x0t??jdt('{"$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"),k0t=i(()=>w0t=w0t??jdt('{"$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"),E0t=i(()=>T0t=T0t??jdt(`{"$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"),L0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(A0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(S0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(C0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(_0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1})})})})},N0t={AstReflection:i(()=>new p0t,"AstReflection")},I0t={Grammar:i(()=>m0t(),"Grammar"),LanguageMetaData:i(()=>_0t,"LanguageMetaData"),parser:{}},M0t={Grammar:i(()=>v0t(),"Grammar"),LanguageMetaData:i(()=>C0t,"LanguageMetaData"),parser:{}},R0t={Grammar:i(()=>b0t(),"Grammar"),LanguageMetaData:i(()=>S0t,"LanguageMetaData"),parser:{}},D0t={Grammar:i(()=>k0t(),"Grammar"),LanguageMetaData:i(()=>A0t,"LanguageMetaData"),parser:{}},O0t={Grammar:i(()=>E0t(),"Grammar"),LanguageMetaData:i(()=>L0t,"LanguageMetaData"),parser:{}},P0t={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},B0t=class extends Yct{static{Ae(this,"AbstractMermaidValueConverter")}static{i(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=P0t[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}},F0t=class extends B0t{static{Ae(this,"CommonValueConverter")}static{i(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},$0t=class extends qct{static{Ae(this,"AbstractMermaidTokenBuilder")}static{i(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends $0t{static{Ae(this,"CommonTokenBuilder")}static{i(this,"CommonTokenBuilder")}}});function G0t(t=Rdt){var t=Edt(kdt(t),N0t),e=Edt(wdt({shared:t}),O0t,q0t);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var U0t,q0t,Y0t=t(()=>{z0t(),t0t(),U0t=class extends $0t{static{Ae(this,"GitGraphTokenBuilder")}static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},q0t={parser:{TokenBuilder:i(()=>new U0t,"TokenBuilder"),ValueConverter:i(()=>new F0t,"ValueConverter")}},Ae(G0t,"createGitGraphServices"),i(G0t,"createGitGraphServices")});function j0t(t=Rdt){var t=Edt(kdt(t),N0t),e=Edt(wdt({shared:t}),I0t,W0t);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var H0t,W0t,V0t=t(()=>{z0t(),t0t(),H0t=class extends $0t{static{Ae(this,"InfoTokenBuilder")}static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},W0t={parser:{TokenBuilder:i(()=>new H0t,"TokenBuilder"),ValueConverter:i(()=>new F0t,"ValueConverter")}},Ae(j0t,"createInfoServices"),i(j0t,"createInfoServices")});function X0t(t=Rdt){var t=Edt(kdt(t),N0t),e=Edt(wdt({shared:t}),M0t,Z0t);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var K0t,Z0t,Q0t=t(()=>{z0t(),t0t(),K0t=class extends $0t{static{Ae(this,"PacketTokenBuilder")}static{i(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},Z0t={parser:{TokenBuilder:i(()=>new K0t,"TokenBuilder"),ValueConverter:i(()=>new F0t,"ValueConverter")}},Ae(X0t,"createPacketServices"),i(X0t,"createPacketServices")});function J0t(t=Rdt){var t=Edt(kdt(t),N0t),e=Edt(wdt({shared:t}),R0t,rpt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var tpt,ept,rpt,npt=t(()=>{z0t(),t0t(),tpt=class extends $0t{static{Ae(this,"PieTokenBuilder")}static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},ept=class extends B0t{static{Ae(this,"PieValueConverter")}static{i(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},rpt={parser:{TokenBuilder:i(()=>new tpt,"TokenBuilder"),ValueConverter:i(()=>new ept,"ValueConverter")}},Ae(J0t,"createPieServices"),i(J0t,"createPieServices")});function ipt(t=Rdt){var t=Edt(kdt(t),N0t),e=Edt(wdt({shared:t}),D0t,spt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var apt,opt,spt,lpt=t(()=>{z0t(),t0t(),apt=class extends $0t{static{Ae(this,"ArchitectureTokenBuilder")}static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},opt=class extends B0t{static{Ae(this,"ArchitectureValueConverter")}static{i(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}},spt={parser:{TokenBuilder:i(()=>new apt,"TokenBuilder"),ValueConverter:i(()=>new opt,"ValueConverter")}},Ae(ipt,"createArchitectureServices"),i(ipt,"createArchitectureServices")}),cpt={},hpt=(_Bt(cpt,{InfoModule:()=>W0t,createInfoServices:()=>j0t}),t(()=>{V0t(),z0t()})),upt={},dpt=(_Bt(upt,{PacketModule:()=>Z0t,createPacketServices:()=>X0t}),t(()=>{Q0t(),z0t()})),ppt={},gpt=(_Bt(ppt,{PieModule:()=>rpt,createPieServices:()=>J0t}),t(()=>{npt(),z0t()})),fpt={},mpt=(_Bt(fpt,{ArchitectureModule:()=>spt,createArchitectureServices:()=>ipt}),t(()=>{lpt(),z0t()})),ypt={},vpt=(_Bt(ypt,{GitGraphModule:()=>q0t,createGitGraphServices:()=>G0t}),t(()=>{Y0t(),z0t()}));async function xpt(t,e){var r=wpt[t];if(!r)throw new Error("Unknown diagram type: "+t);if(bpt[t]||await r(),0<(r=bpt[t].parse(e)).lexerErrors.length||0{Y0t(),V0t(),Q0t(),npt(),lpt(),z0t(),bpt={},wpt={info:i(async()=>{var t=(t=(await Promise.resolve().then(()=>(hpt(),cpt))).createInfoServices)().Info.parser.LangiumParser;bpt.info=t},"info"),packet:i(async()=>{var t=(t=(await Promise.resolve().then(()=>(dpt(),upt))).createPacketServices)().Packet.parser.LangiumParser;bpt.packet=t},"packet"),pie:i(async()=>{var t=(t=(await Promise.resolve().then(()=>(gpt(),ppt))).createPieServices)().Pie.parser.LangiumParser;bpt.pie=t},"pie"),architecture:i(async()=>{var t=(t=(await Promise.resolve().then(()=>(mpt(),fpt))).createArchitectureServices)().Architecture.parser.LangiumParser;bpt.architecture=t},"architecture"),gitGraph:i(async()=>{var t=(t=(await Promise.resolve().then(()=>(vpt(),ypt))).createGitGraphServices)().GitGraph.parser.LangiumParser;bpt.gitGraph=t},"gitGraph")},Ae(xpt,"parse"),i(xpt,"parse"),kpt=class extends Error{static{Ae(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(` +`)}return r}},xdt=class{static{Ae(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},Ae(udt,"fillNewlines")}),Adt=t(()=>{XJ(),Sdt(),bdt=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&&Vut(t))return Wut(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=FJ(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)}}}),Ldt=t(()=>{mut(),$Z(),wdt=class{static{Ae(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return dut(t)?t.$comment:null==(t=CZ(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),Ndt={},Idt=t(()=>{tt(Ndt,et(uht(),1))}),Mdt=t(()=>{_ht(),Idt(),kdt=class{static{Ae(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t){return Promise.resolve(this.syncParser.parse(t))}},Tdt=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{var t;0{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 Tht;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(kht)}),this.queue.push(r),r.promise}},_dt=class{static{Ae(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new Ndt.Emitter,this.deferred=new Tht,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(kht),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 Tht,this.sendMessage(t),this.deferred.promise}}}),Rdt=t(()=>{ght(),_ht(),Edt=class{static{Ae(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new pht.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=new pht.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 Tht,e={action:e,deferred:n,cancellationToken:r??pht.CancellationToken.None};return t.push(e),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0{try{var n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){vht(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),Ddt=t(()=>{Tct(),RJ(),oZ(),XJ(),out(),$Z(),Cdt=class{static{Ae(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new Vht,this.tokenTypeIdMap=new Vht,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 GJ(t))r.set(e,{});if(t.$cstNode)for(var i of vZ(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,s=[];i[r]=s;for(a of n)JK(a)?s.push(this.dehydrateAstNode(a,e)):tZ(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else JK(n)?i[r]=this.dehydrateAstNode(n,e):tZ(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 aZ(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),nZ(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):iZ(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 GJ(t))r.set(e,{});let i;if(t.$cstNode)for(var a of vZ(t.$cstNode)){let t;"fullText"in a?(t=new xct(a.fullText),i=t):"content"in a?t=new yct:"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,s=[];i[r]=s;for(a of n)JK(a)?s.push(this.setParent(this.hydrateAstNode(a,e),i)):tZ(a)?s.push(this.hydrateReference(a,i,r,e)):s.push(a)}else JK(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):tZ(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),nZ(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;return new mct(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){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 GJ(this.grammar))ZZ(e)&&this.grammarElementIdMap.set(e,t++)}}});function Odt(t){return{documentation:{CommentProvider:Ae(t=>new wdt(t),"CommentProvider"),DocumentationProvider:Ae(t=>new bdt(t),"DocumentationProvider")},parser:{AsyncParser:Ae(t=>new kdt(t),"AsyncParser"),GrammarConfig:Ae(t=>get(t),"GrammarConfig"),LangiumParser:Ae(t=>eht(t),"LangiumParser"),CompletionParser:Ae(t=>Jct(t),"CompletionParser"),ValueConverter:Ae(()=>new iht,"ValueConverter"),TokenBuilder:Ae(()=>new nht,"TokenBuilder"),Lexer:Ae(t=>new Yut(t),"Lexer"),ParserErrorMessageProvider:Ae(()=>new Nct,"ParserErrorMessageProvider")},workspace:{AstNodeLocator:Ae(()=>new Aut,"AstNodeLocator"),AstNodeDescriptionProvider:Ae(t=>new Cut(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Ae(t=>new Sut(t),"ReferenceDescriptionProvider")},references:{Linker:Ae(t=>new Fht(t),"Linker"),NameProvider:Ae(()=>new Yht,"NameProvider"),ScopeProvider:Ae(t=>new iut(t),"ScopeProvider"),ScopeComputation:Ae(t=>new Xht(t),"ScopeComputation"),References:Ae(t=>new Hht(t),"References")},serializer:{Hydrator:Ae(t=>new Cdt(t),"Hydrator"),JsonSerializer:Ae(t=>new gut(t),"JsonSerializer")},validation:{DocumentValidator:Ae(t=>new _ut(t),"DocumentValidator"),ValidationRegistry:Ae(t=>new but(t),"ValidationRegistry")},shared:Ae(()=>t.shared,"shared")}}function Pdt(e){return{ServiceRegistry:Ae(()=>new fut,"ServiceRegistry"),workspace:{LangiumDocuments:Ae(t=>new Bht(t),"LangiumDocuments"),LangiumDocumentFactory:Ae(t=>new Pht(t),"LangiumDocumentFactory"),DocumentBuilder:Ae(t=>new Iut(t),"DocumentBuilder"),IndexManager:Ae(t=>new Mut(t),"IndexManager"),WorkspaceManager:Ae(t=>new Rut(t),"WorkspaceManager"),FileSystemProvider:Ae(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Ae(()=>new Edt,"WorkspaceLock"),ConfigurationProvider:Ae(t=>new Lut(t),"ConfigurationProvider")}}}var Bdt=t(()=>{fet(),tht(),sht(),oht(),lht(),qht(),aut(),sut(),lut(),uut(),mut(),yut(),Dut(),wut(),Out(),Put(),But(),$ut(),Ght(),zut(),Uut(),Hut(),Adt(),Ldt(),Dct(),Mdt(),Rdt(),Ddt(),Ae(Odt,"createDefaultCoreModule"),Ae(Pdt,"createDefaultSharedCoreModule")});function Fdt(t,e,r,n,i,a,s,o,l){return zdt([t,e,r,n,i,a,s,o,l].reduce(Gdt,{}))}function $dt(t){if(t&&t[jdt])for(var e of Object.values(t))$dt(e);return t}function zdt(r,n){let i=new Proxy({},{deleteProperty:Ae(()=>!1,"deleteProperty"),get:Ae((t,e)=>Udt(t,e,r,n||i),"get"),getOwnPropertyDescriptor:Ae((t,e)=>(Udt(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:Ae((t,e)=>e in r,"has"),ownKeys:Ae(()=>[...Reflect.ownKeys(r),jdt],"ownKeys")});return i[jdt]=!0,i}function Udt(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]===Ydt)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]=Ydt;try{t[e]="function"==typeof r?r(n):zdt(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function Gdt(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]=Gdt(i,n):t[r]=n)}return t}var qdt,jdt,Ydt,Hdt,Wdt,Vdt=t(()=>{(qdt=qdt||{}).merge=(t,e)=>Gdt(Gdt({},t),e),Ae(Fdt,"inject"),jdt=Symbol("isProxy"),Ae($dt,"eagerLoad"),Ae(zdt,"_inject"),Ydt=Symbol(),Ae(Udt,"_resolve"),Ae(Gdt,"_merge")}),Xdt=t(()=>{}),Kdt=t(()=>{Ldt(),Adt(),Sdt()}),Zdt=t(()=>{}),Qdt=t(()=>{fet(),Zdt()}),Jdt=t(()=>{}),t0t=t(()=>{Mdt(),tht(),Tct(),sht(),Dct(),Hut(),Jdt(),oht(),lht()}),e0t=t(()=>{qht(),aut(),sut(),cut(),lut(),uut()}),r0t=t(()=>{Ddt(),mut()}),n0t=t(()=>{Hdt=class{static{Ae(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Wdt={fileSystemProvider:Ae(()=>new Hdt,"fileSystemProvider")}});function i0t(){var t=Fdt(Pdt(Wdt),o0t),e=Fdt(Odt({shared:t}),s0t);return t.ServiceRegistry.register(e),e}function a0t(t){var e=i0t(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,Mht.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var s0t,o0t,l0t=t(()=>{Bdt(),Vdt(),RJ(),n0t(),Uht(),s0t={Grammar:Ae(()=>{},"Grammar"),LanguageMetaData:Ae(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},o0t={AstReflection:Ae(()=>new IJ,"AstReflection")},Ae(i0t,"createMinimalGrammarServices"),Ae(a0t,"loadGrammarFromJson")}),c0t={},h0t=(SBt(c0t,{AstUtils:()=>DJ,BiMap:()=>Vht,Cancellation:()=>pht,ContextCache:()=>eut,CstUtils:()=>yZ,DONE_RESULT:()=>pZ,Deferred:()=>Tht,Disposable:()=>Nut,DisposableCache:()=>Jht,DocumentCache:()=>rut,EMPTY_STREAM:()=>dZ,ErrorWithLocation:()=>UZ,GrammarUtils:()=>Att,MultiMap:()=>Wht,OperationCancelled:()=>kht,Reduction:()=>fZ,RegExpUtils:()=>ftt,SimpleCache:()=>tut,StreamImpl:()=>uZ,TreeStreamImpl:()=>gZ,URI:()=>Mht,UriUtils:()=>Dht,WorkspaceCache:()=>nut,assertUnreachable:()=>zZ,delayNextTick:()=>fht,interruptAndCheck:()=>xht,isOperationCancelled:()=>vht,loadGrammarFromJson:()=>a0t,setInterruptionPeriod:()=>yht,startCancelableOperation:()=>mht,stream:()=>hZ}),t(()=>{hut(),Idt(),tt(c0t,Ndt),out(),Fut(),GZ(),l0t(),_ht(),mZ(),Uht(),XJ(),ght(),$Z(),pet(),Stt()})),u0t=t(()=>{Dut(),wut()}),d0t=t(()=>{Out(),Put(),But(),$ut(),Ght(),n0t(),zut(),Rdt(),Uut()}),p0t={},g0t=(SBt(p0t,{AbstractAstReflection:()=>sZ,AbstractCstNode:()=>fct,AbstractLangiumParser:()=>Sct,AbstractParserErrorMessageProvider:()=>Lct,AbstractThreadedAsyncParser:()=>Tdt,AstUtils:()=>DJ,BiMap:()=>Vht,Cancellation:()=>pht,CompositeCstNodeImpl:()=>yct,ContextCache:()=>eut,CstNodeBuilder:()=>gct,CstUtils:()=>yZ,DONE_RESULT:()=>pZ,DatatypeSymbol:()=>Ect,DefaultAstNodeDescriptionProvider:()=>Cut,DefaultAstNodeLocator:()=>Aut,DefaultAsyncParser:()=>kdt,DefaultCommentProvider:()=>wdt,DefaultConfigurationProvider:()=>Lut,DefaultDocumentBuilder:()=>Iut,DefaultDocumentValidator:()=>_ut,DefaultHydrator:()=>Cdt,DefaultIndexManager:()=>Mut,DefaultJsonSerializer:()=>gut,DefaultLangiumDocumentFactory:()=>Pht,DefaultLangiumDocuments:()=>Bht,DefaultLexer:()=>Yut,DefaultLinker:()=>Fht,DefaultNameProvider:()=>Yht,DefaultReferenceDescriptionProvider:()=>Sut,DefaultReferences:()=>Hht,DefaultScopeComputation:()=>Xht,DefaultScopeProvider:()=>iut,DefaultServiceRegistry:()=>fut,DefaultTokenBuilder:()=>nht,DefaultValueConverter:()=>iht,DefaultWorkspaceLock:()=>Edt,DefaultWorkspaceManager:()=>Rut,Deferred:()=>Tht,Disposable:()=>Nut,DisposableCache:()=>Jht,DocumentCache:()=>rut,DocumentState:()=>Oht,DocumentValidator:()=>Eut,EMPTY_SCOPE:()=>Qht,EMPTY_STREAM:()=>dZ,EmptyFileSystem:()=>Wdt,EmptyFileSystemProvider:()=>Hdt,ErrorWithLocation:()=>UZ,GrammarAST:()=>qZ,GrammarUtils:()=>Att,JSDocDocumentationProvider:()=>bdt,LangiumCompletionParser:()=>Ict,LangiumParser:()=>Act,LangiumParserErrorMessageProvider:()=>Nct,LeafCstNodeImpl:()=>mct,MapScope:()=>Zht,Module:()=>qdt,MultiMap:()=>Wht,OperationCancelled:()=>kht,ParserWorker:()=>_dt,Reduction:()=>fZ,RegExpUtils:()=>ftt,RootCstNodeImpl:()=>xct,SimpleCache:()=>tut,StreamImpl:()=>uZ,StreamScope:()=>Kht,TextDocument:()=>Iht,TreeStreamImpl:()=>gZ,URI:()=>Mht,UriUtils:()=>Dht,ValidationCategory:()=>xut,ValidationRegistry:()=>but,ValueConverter:()=>aht,WorkspaceCache:()=>nut,assertUnreachable:()=>zZ,createCompletionParser:()=>Jct,createDefaultCoreModule:()=>Odt,createDefaultSharedCoreModule:()=>Pdt,createGrammarConfig:()=>get,createLangiumParser:()=>eht,delayNextTick:()=>fht,diagnosticData:()=>vut,eagerLoad:()=>$dt,getDiagnosticRange:()=>kut,inject:()=>Fdt,interruptAndCheck:()=>xht,isAstNode:()=>JK,isAstNodeDescription:()=>eZ,isAstNodeWithComment:()=>dut,isCompositeCstNode:()=>nZ,isIMultiModeLexerDefinition:()=>qut,isJSDoc:()=>Vut,isLeafCstNode:()=>iZ,isLinkingError:()=>rZ,isNamed:()=>jht,isOperationCancelled:()=>vht,isReference:()=>tZ,isRootCstNode:()=>aZ,isTokenTypeArray:()=>Gut,isTokenTypeDictionary:()=>jut,loadGrammarFromJson:()=>a0t,parseJSDoc:()=>Wut,prepareLangiumParser:()=>rht,setInterruptionPeriod:()=>yht,startCancelableOperation:()=>mht,stream:()=>hZ,toDiagnosticSeverity:()=>Tut}),t(()=>{Bdt(),Vdt(),yut(),Xdt(),oZ(),Kdt(),Qdt(),t0t(),e0t(),r0t(),h0t(),tt(p0t,c0t),u0t(),d0t(),RJ()}));function f0t(t){return L0t.isInstance(t,"Architecture")}function m0t(t){return L0t.isInstance(t,"Branch")}function y0t(t){return L0t.isInstance(t,"Commit")}function v0t(t){return L0t.isInstance(t,"Common")}function x0t(t){return L0t.isInstance(t,"GitGraph")}function b0t(t){return L0t.isInstance(t,"Info")}function w0t(t){return L0t.isInstance(t,"Merge")}function k0t(t){return L0t.isInstance(t,"Packet")}function T0t(t){return L0t.isInstance(t,"PacketBlock")}function _0t(t){return L0t.isInstance(t,"Pie")}function E0t(t){return L0t.isInstance(t,"PieSection")}var C0t,S0t,A0t,L0t,N0t,I0t,M0t,R0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,U0t,G0t,q0t,j0t,Y0t,H0t,W0t,V0t,X0t,K0t,Z0t,Q0t,J0t,tpt,ept=t(()=>{g0t(),g0t(),g0t(),g0t(),C0t=Object.defineProperty,S0t=Ae((t,e)=>C0t(t,"name",{value:e,configurable:!0}),"__name"),Ae(f0t,"isArchitecture"),S0t(f0t,"isArchitecture"),Ae(m0t,"isBranch"),S0t(m0t,"isBranch"),Ae(y0t,"isCommit"),S0t(y0t,"isCommit"),Ae(v0t,"isCommon"),S0t(v0t,"isCommon"),Ae(x0t,"isGitGraph"),S0t(x0t,"isGitGraph"),Ae(b0t,"isInfo"),S0t(b0t,"isInfo"),Ae(w0t,"isMerge"),S0t(w0t,"isMerge"),Ae(k0t,"isPacket"),S0t(k0t,"isPacket"),Ae(T0t,"isPacketBlock"),S0t(T0t,"isPacketBlock"),Ae(_0t,"isPie"),S0t(_0t,"isPie"),Ae(E0t,"isPieSection"),S0t(E0t,"isPieSection"),A0t=class extends sZ{static{Ae(this,"MermaidAstReflection")}static{S0t(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:[]}}}},L0t=new A0t,I0t=S0t(()=>N0t=N0t??a0t('{"$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"),R0t=S0t(()=>M0t=M0t??a0t(`{"$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"),O0t=S0t(()=>D0t=D0t??a0t('{"$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"),B0t=S0t(()=>P0t=P0t??a0t('{"$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"),$0t=S0t(()=>F0t=F0t??a0t(`{"$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"),j0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(q0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(G0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(U0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(z0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1})})})})},Y0t={AstReflection:S0t(()=>new A0t,"AstReflection")},H0t={Grammar:S0t(()=>I0t(),"Grammar"),LanguageMetaData:S0t(()=>z0t,"LanguageMetaData"),parser:{}},W0t={Grammar:S0t(()=>R0t(),"Grammar"),LanguageMetaData:S0t(()=>U0t,"LanguageMetaData"),parser:{}},V0t={Grammar:S0t(()=>O0t(),"Grammar"),LanguageMetaData:S0t(()=>G0t,"LanguageMetaData"),parser:{}},X0t={Grammar:S0t(()=>B0t(),"Grammar"),LanguageMetaData:S0t(()=>q0t,"LanguageMetaData"),parser:{}},K0t={Grammar:S0t(()=>$0t(),"Grammar"),LanguageMetaData:S0t(()=>j0t,"LanguageMetaData"),parser:{}},Z0t={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Q0t=class extends iht{static{Ae(this,"AbstractMermaidValueConverter")}static{S0t(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=Z0t[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}},J0t=class extends Q0t{static{Ae(this,"CommonValueConverter")}static{S0t(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},tpt=class extends nht{static{Ae(this,"AbstractMermaidTokenBuilder")}static{S0t(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends tpt{static{Ae(this,"CommonTokenBuilder")}static{S0t(this,"CommonTokenBuilder")}}});function rpt(t=Wdt){var t=Fdt(Pdt(t),Y0t),e=Fdt(Odt({shared:t}),K0t,ipt);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var npt,ipt,apt=t(()=>{ept(),g0t(),npt=class extends tpt{static{Ae(this,"GitGraphTokenBuilder")}static{S0t(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},ipt={parser:{TokenBuilder:S0t(()=>new npt,"TokenBuilder"),ValueConverter:S0t(()=>new J0t,"ValueConverter")}},Ae(rpt,"createGitGraphServices"),S0t(rpt,"createGitGraphServices")});function spt(t=Wdt){var t=Fdt(Pdt(t),Y0t),e=Fdt(Odt({shared:t}),H0t,lpt);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var opt,lpt,cpt=t(()=>{ept(),g0t(),opt=class extends tpt{static{Ae(this,"InfoTokenBuilder")}static{S0t(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},lpt={parser:{TokenBuilder:S0t(()=>new opt,"TokenBuilder"),ValueConverter:S0t(()=>new J0t,"ValueConverter")}},Ae(spt,"createInfoServices"),S0t(spt,"createInfoServices")});function hpt(t=Wdt){var t=Fdt(Pdt(t),Y0t),e=Fdt(Odt({shared:t}),W0t,dpt);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var upt,dpt,ppt=t(()=>{ept(),g0t(),upt=class extends tpt{static{Ae(this,"PacketTokenBuilder")}static{S0t(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},dpt={parser:{TokenBuilder:S0t(()=>new upt,"TokenBuilder"),ValueConverter:S0t(()=>new J0t,"ValueConverter")}},Ae(hpt,"createPacketServices"),S0t(hpt,"createPacketServices")});function gpt(t=Wdt){var t=Fdt(Pdt(t),Y0t),e=Fdt(Odt({shared:t}),V0t,ypt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var fpt,mpt,ypt,vpt=t(()=>{ept(),g0t(),fpt=class extends tpt{static{Ae(this,"PieTokenBuilder")}static{S0t(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},mpt=class extends Q0t{static{Ae(this,"PieValueConverter")}static{S0t(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},ypt={parser:{TokenBuilder:S0t(()=>new fpt,"TokenBuilder"),ValueConverter:S0t(()=>new mpt,"ValueConverter")}},Ae(gpt,"createPieServices"),S0t(gpt,"createPieServices")});function xpt(t=Wdt){var t=Fdt(Pdt(t),Y0t),e=Fdt(Odt({shared:t}),X0t,kpt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var bpt,wpt,kpt,Tpt=t(()=>{ept(),g0t(),bpt=class extends tpt{static{Ae(this,"ArchitectureTokenBuilder")}static{S0t(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},wpt=class extends Q0t{static{Ae(this,"ArchitectureValueConverter")}static{S0t(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}},kpt={parser:{TokenBuilder:S0t(()=>new bpt,"TokenBuilder"),ValueConverter:S0t(()=>new wpt,"ValueConverter")}},Ae(xpt,"createArchitectureServices"),S0t(xpt,"createArchitectureServices")}),_pt={},Ept=(SBt(_pt,{InfoModule:()=>lpt,createInfoServices:()=>spt}),t(()=>{cpt(),ept()})),Cpt={},Spt=(SBt(Cpt,{PacketModule:()=>dpt,createPacketServices:()=>hpt}),t(()=>{ppt(),ept()})),Apt={},Lpt=(SBt(Apt,{PieModule:()=>ypt,createPieServices:()=>gpt}),t(()=>{vpt(),ept()})),Npt={},Ipt=(SBt(Npt,{ArchitectureModule:()=>kpt,createArchitectureServices:()=>xpt}),t(()=>{Tpt(),ept()})),Mpt={},Rpt=(SBt(Mpt,{GitGraphModule:()=>ipt,createGitGraphServices:()=>rpt}),t(()=>{apt(),ept()}));async function Dpt(t,e){var r=Ppt[t];if(!r)throw new Error("Unknown diagram type: "+t);if(Opt[t]||await r(),0<(r=Opt[t].parse(e)).lexerErrors.length||0{apt(),cpt(),ppt(),vpt(),Tpt(),ept(),Opt={},Ppt={info:S0t(async()=>{var t=(t=(await Promise.resolve().then(()=>(Ept(),_pt))).createInfoServices)().Info.parser.LangiumParser;Opt.info=t},"info"),packet:S0t(async()=>{var t=(t=(await Promise.resolve().then(()=>(Spt(),Cpt))).createPacketServices)().Packet.parser.LangiumParser;Opt.packet=t},"packet"),pie:S0t(async()=>{var t=(t=(await Promise.resolve().then(()=>(Lpt(),Apt))).createPieServices)().Pie.parser.LangiumParser;Opt.pie=t},"pie"),architecture:S0t(async()=>{var t=(t=(await Promise.resolve().then(()=>(Ipt(),Npt))).createArchitectureServices)().Architecture.parser.LangiumParser;Opt.architecture=t},"architecture"),gitGraph:S0t(async()=>{var t=(t=(await Promise.resolve().then(()=>(Rpt(),Mpt))).createGitGraphServices)().GitGraph.parser.LangiumParser;Opt.gitGraph=t},"gitGraph")},Ae(Dpt,"parse"),S0t(Dpt,"parse"),Bpt=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{i(this,"MermaidParseError")}}});function Ept(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var _pt,Cpt,Spt=t(()=>{Ae(Ept,"populateCommonDb")}),Apt=t(()=>{_pt={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),Lpt=t(()=>{Cpt=class{constructor(t){this.init=t,this.records=this.init()}static{Ae(this,"ImperativeState")}reset(){this.records=this.init()}}});function Npt(){return D8({length:7})}function Ipt(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 Mpt(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function Rpt(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]);Mpt(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]),Mpt(t,e,a))}Rpt(t=Ipt(t,t=>t.id))}var Dpt,Opt,w,Ppt,Bpt,Fpt,$pt,zpt,Gpt,Upt,qpt,Ypt,jpt,Hpt,Wpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt,t1t,e1t,r1t,n1t,i1t,a1t,o1t,s1t,l1t,c1t,h1t,u1t,d1t,p1t,g1t,f1t,m1t,y1t,v1t,x1t,b1t,w1t,k1t,T1t,E1t,_1t,C1t,S1t,A1t,L1t,N1t,I1t,M1t,R1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,G1t=t(()=>{e(),X8(),In(),Jl(),gh(),Apt(),Lpt(),Ln(),Dpt=vr.gitGraph,Opt=Ae(()=>x8({...Dpt,...Mr().gitGraph}),"getConfig"),w=new Cpt(()=>{var t=(e=Opt()).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(Npt,"getID"),Ae(Ipt,"uniqBy"),Ppt=Ae(function(t){w.records.direction=t},"setDirection"),Bpt=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"),Fpt=Ae(function(){return w.records.options},"getOptions"),$pt=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),Opt());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||w.records.seq+"-"+Npt(),message:e,seq:w.records.seq++,type:n??_pt.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"),zpt=Ae(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,Opt());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}),qpt(e),R.debug("in createBranch")},"branch"),Gpt=Ae(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=Opt(),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+"-"+Npt(),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:_pt.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"),Upt=Ae(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(R.debug("Entering cherryPick:",e,r,n),Opt());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===_pt.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+"-"+Npt(),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:_pt.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===_pt.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"),qpt=Ae(function(t){var e;if(t=L.sanitizeText(t,Opt()),!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(Mpt,"upsert"),Ae(Rpt,"prettyPrintCommitHistory"),Ypt=Ae(function(){R.debug(w.records.commits),Rpt([Xpt()[0]])},"prettyPrint"),jpt=Ae(function(){w.reset(),sc()},"clear"),Hpt=Ae(function(){return[...w.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),Wpt=Ae(function(){return w.records.branches},"getBranches"),Vpt=Ae(function(){return w.records.commits},"getCommits"),Xpt=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"),Kpt=Ae(function(){return w.records.currBranch},"getCurrentBranch"),Zpt=Ae(function(){return w.records.direction},"getDirection"),Qpt=Ae(function(){return w.records.head},"getHead"),Jpt={commitType:_pt,getConfig:Opt,setDirection:Ppt,setOptions:Bpt,getOptions:Fpt,commit:$pt,branch:zpt,merge:Gpt,cherryPick:Upt,checkout:qpt,prettyPrint:Ypt,clear:jpt,getBranchesAsObjArray:Hpt,getBranches:Wpt,getCommits:Vpt,getCommitsArray:Xpt,getCurrentBranch:Kpt,getDirection:Zpt,getHead:Qpt,setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,setAccDescription:hc,setDiagramTitle:dc,getDiagramTitle:pc}}),U1t=t(()=>{Tpt(),e(),Spt(),G1t(),Apt(),t1t=Ae((t,e)=>{Ept(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)e1t(r,e)},"populate"),e1t=Ae((t,e)=>{var r={Commit:Ae(t=>e.commit(r1t(t)),"Commit"),Branch:Ae(t=>e.branch(n1t(t)),"Branch"),Merge:Ae(t=>e.merge(i1t(t)),"Merge"),Checkout:Ae(t=>e.checkout(a1t(t)),"Checkout"),CherryPicking:Ae(t=>e.cherryPick(o1t(t)),"CherryPicking")}[t.$type];r?r(t):R.error("Unknown statement type: "+t.$type)},"parseStatement"),r1t=Ae(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?_pt[t.type]:_pt.NORMAL,tags:t.tags??void 0}),"parseCommit"),n1t=Ae(t=>({name:t.name,order:t.order??0}),"parseBranch"),i1t=Ae(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?_pt[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),a1t=Ae(t=>t.branch,"parseCheckout"),o1t=Ae(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),s1t={parse:Ae(async t=>{t=await xpt("gitGraph",t),R.debug(t),t1t(t,Jpt)},"parse")}}),q1t=t(()=>{Z3(),fh(),e(),X8(),Apt(),B1t=D(),l1t=B1t?.gitGraph,c1t=new Map,h1t=new Map,u1t=new Map,d1t=[],p1t=0,g1t="LR",f1t=Ae(()=>{c1t.clear(),h1t.clear(),u1t.clear(),p1t=0,d1t=[],g1t="LR"},"clear"),m1t=Ae(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/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"),y1t=Ae(t=>{let r,n,i;return i="BT"===g1t?(n=Ae((t,e)=>t<=e,"comparisonFunc"),1/0):(n=Ae((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===g1t||"BT"==g1t?h1t.get(t)?.y:h1t.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),v1t=Ae(t=>{let r="",n=1/0;return t.forEach(t=>{var e=h1t.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),x1t=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=w1t(e),a=Math.max(i,a)):r.push(e),k1t(e,i)}),i=a,r.forEach(t=>{T1t(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=v1t(t.parents),(i=h1t.get(e).y-40)<=a&&(a=i),e=c1t.get(t.branch).pos,r=i-10,h1t.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),b1t=Ae(t=>{var e=y1t(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=h1t.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),w1t=Ae(t=>b1t(t)+40,"calculateCommitPosition"),k1t=Ae((t,e)=>{var r=c1t.get(t.branch);if(r)return r=r.pos,h1t.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),T1t=Ae((t,e,r)=>{var n=c1t.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,h1t.set(t.id,{x:n,y:e+r})},"setRootPosition"),E1t=Ae((t,e,r,n,i,a)=>{var o;a===_pt.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===_pt.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===_pt.MERGE?9:10),o.attr("class",`commit ${e.id} commit`+i%8),a===_pt.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===_pt.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"),_1t=Ae((t,e,r,n)=>{var i,a;e.type!==_pt.CHERRY_PICK&&(e.customId&&e.type===_pt.MERGE||e.type!==_pt.MERGE)&&l1t?.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"===g1t||"BT"===g1t?(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),l1t.rotateCommitLabel)&&("TB"===g1t||"BT"===g1t?(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"),C1t=Ae((i,a,o,s)=>{if(0{switch(t.customType??t.type){case _pt.NORMAL:return"commit-normal";case _pt.REVERSE:return"commit-reverse";case _pt.HIGHLIGHT:return"commit-highlight";case _pt.MERGE:return"commit-merge";case _pt.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),A1t=Ae((t,e,r,n)=>{var i,a={x:0,y:0};return 0{var r="BT"===g1t&&r?e:e+10,e="TB"===g1t||"BT"===g1t?r:c1t.get(t.branch)?.pos,n="TB"===g1t||"BT"===g1t?c1t.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"),N1t=Ae((t,a,o)=>{if(!l1t)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"===g1t||"BT"===g1t?30:0,e=[...a.keys()],h=l1t?.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"===g1t&&(h&&x1t(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=A1t(e,g1t,c,h1t));var r,n,i,t=L1t(e,c,h);o&&(r=S1t(e),n=e.customType??e.type,i=c1t.get(e.branch)?.index??0,E1t(s,e,t,r,i,n),_1t(l,e,t,c),C1t(l,e,t,c)),"TB"===g1t||"BT"===g1t?h1t.set(e.id,{x:t.x,y:t.posWithOffset}):h1t.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===g1t&&h?c+40:c+40+10)>p1t&&(p1t=c)})},"drawCommits"),I1t=Ae((e,r,t,n,i)=>{let a=(("TB"===g1t||"BT"===g1t?t.xt.branch===a,"isOnBranchToGetCurve"),s=Ae(t=>t.seq>e.seq&&t.seqs(t)&&o(t))},"shouldRerouteArrow"),M1t=Ae((t,e,r=0)=>{let n=t+Math.abs(t-e)/2,i;return 510<=Math.abs(t-n))?(d1t.push(n),n):(i=Math.abs(t-e),M1t(t,e-i/5,r+1))},"findLane"),R1t=Ae((t,e,r,n)=>{var i,a=h1t.get(e.id),o=h1t.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=I1t(e,r,a,o,n),l="",c="",h=0,u=0,d=c1t.get(r.branch)?.index;r.type===_pt.MERGE&&e.id!==r.parents[0]&&(d=c1t.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.yo.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===_pt.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"===g1t?(a.xo.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===_pt.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.yo.y&&(p=r.type===_pt.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"),D1t=Ae((t,r)=>{let n=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0{R1t(n,r.get(t),e,r)})})},"drawArrows"),O1t=Ae((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=c1t.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",p1t),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===g1t?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",p1t),n.attr("x2",r)):"BT"===g1t&&(n.attr("y1",p1t),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),d1t.push(r);var n=t.name,t=m1t(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===l1t?.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===l1t?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===g1t?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===g1t?(n.attr("x",r-t.width/2-10).attr("y",p1t),i.attr("transform","translate("+(r-t.width/2-5)+", "+p1t+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),P1t=Ae(function(t,e,r,n,i){return c1t.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===g1t||"BT"===g1t?n.width/2:0))},"setBranchPosition"),B1t=Ae(function(t,e,r,n){if(f1t(),R.debug("in gitgraph renderer",t+` -`,"id:",e,r),!l1t)throw new Error("GitGraph config not found");let o=l1t.rotateCommitLabel??!1,i=n.db,s=(u1t=i.getCommits(),t=i.getBranchesAsObjArray(),g1t=i.getDirection(),O(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=m1t(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=P1t(t.name,l,e,r,o),a.remove(),i.remove(),n.remove()}),N1t(s,u1t,!1),l1t.showBranches&&O1t(s,t),D1t(s,u1t),N1t(s,u1t,!0),j8.insertTitle(s,"gitTitleText",l1t.titleTopMargin??0,i.getDiagramTitle()),xc(void 0,s,l1t.diagramPadding,l1t.useMaxWidth)},"draw"),F1t={draw:B1t}}),Y1t=t(()=>{$1t=Ae(e=>` +`)),this.result=t}static{S0t(this,"MermaidParseError")}}});function $pt(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var zpt,Upt,Gpt=t(()=>{Ae($pt,"populateCommonDb")}),qpt=t(()=>{zpt={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),jpt=t(()=>{Upt=class{constructor(t){this.init=t,this.records=this.init()}static{Ae(this,"ImperativeState")}reset(){this.records=this.init()}}});function Ypt(){return O8({length:7})}function Hpt(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 Wpt(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function Vpt(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 b.records.branches)b.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=b.records.commits.get(e.parents[0]);Wpt(t,e,a),e.parents[1]&&t.push(b.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=b.records.commits.get(e.parents[0]),Wpt(t,e,a))}Vpt(t=Hpt(t,t=>t.id))}var Xpt,Kpt,b,Zpt,Qpt,Jpt,t1t,e1t,r1t,n1t,i1t,a1t,s1t,o1t,l1t,c1t,h1t,u1t,d1t,p1t,g1t,f1t,m1t,y1t,v1t,x1t,b1t,w1t,k1t,T1t,_1t,E1t,C1t,S1t,A1t,L1t,N1t,I1t,M1t,R1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,U1t,G1t,q1t,j1t,Y1t,H1t,W1t,V1t,X1t,K1t,Z1t,Q1t,J1t,tgt,egt,rgt=t(()=>{e(),K8(),In(),Jl(),gh(),qpt(),jpt(),Ln(),Xpt=vr.gitGraph,Kpt=Ae(()=>x8({...Xpt,...Mr().gitGraph}),"getConfig"),b=new Upt(()=>{var t=(e=Kpt()).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(Ypt,"getID"),Ae(Hpt,"uniqBy"),Zpt=Ae(function(t){b.records.direction=t},"setDirection"),Qpt=Ae(function(t){R.debug("options str",t),t=t?.trim()||"{}";try{b.records.options=JSON.parse(t)}catch(t){R.error("error while parsing gitGraph options",t.message)}},"setOptions"),Jpt=Ae(function(){return b.records.options},"getOptions"),t1t=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),Kpt());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||b.records.seq+"-"+Ypt(),message:e,seq:b.records.seq++,type:n??zpt.NORMAL,tags:i??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=t,R.info("main branch",a.mainBranchName),b.records.commits.set(t.id,t),b.records.branches.set(b.records.currBranch,t.id),R.debug("in pushCommit "+t.id)},"commit"),e1t=Ae(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,Kpt());if(b.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);b.records.branches.set(e,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(e,{name:e,order:t}),i1t(e),R.debug("in createBranch")},"branch"),r1t=Ae(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=Kpt(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(e),t=t?b.records.commits.get(t):void 0,s=a?b.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(b.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!b.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&b.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id")).hash={text:`merge ${e} ${r} ${n} `+i?.join(" "),token:`merge ${e} ${r} ${n} `+i?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${n} `+i?.join(" ")]},t;var s=a||"",o={id:r||b.records.seq+"-"+Ypt(),message:`merged branch ${e} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:zpt.MERGE,customType:n,customId:!!r,tags:i??[]};b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),R.debug(b.records.branches),R.debug("in mergeBranch")},"merge"),n1t=Ae(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(R.debug("Entering cherryPick:",e,r,n),Kpt());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||!b.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=b.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(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 s=t.branch;if(t.type===zpt.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||!b.records.commits.has(r)){if(s===b.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=b.records.branches.get(b.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},o;var o=b.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+Ypt(),message:`cherry-picked ${t?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,t.id],branch:b.records.currBranch,type:zpt.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===zpt.MERGE?"|parent:"+i:"")]},b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),R.debug(b.records.branches),R.debug("in cherryPick")}},"cherryPick"),i1t=Ae(function(t){var e;if(t=L.sanitizeText(t,Kpt()),!b.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;b.records.currBranch=t,e=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==e&&e?b.records.commits.get(e)??null:null},"checkout"),Ae(Wpt,"upsert"),Ae(Vpt,"prettyPrintCommitHistory"),a1t=Ae(function(){R.debug(b.records.commits),Vpt([h1t()[0]])},"prettyPrint"),s1t=Ae(function(){b.reset(),oc()},"clear"),o1t=Ae(function(){return[...b.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),l1t=Ae(function(){return b.records.branches},"getBranches"),c1t=Ae(function(){return b.records.commits},"getCommits"),h1t=Ae(function(){var t=[...b.records.commits.values()];return t.forEach(function(t){R.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),u1t=Ae(function(){return b.records.currBranch},"getCurrentBranch"),d1t=Ae(function(){return b.records.direction},"getDirection"),p1t=Ae(function(){return b.records.head},"getHead"),g1t={commitType:zpt,getConfig:Kpt,setDirection:Zpt,setOptions:Qpt,getOptions:Jpt,commit:t1t,branch:e1t,merge:r1t,cherryPick:n1t,checkout:i1t,prettyPrint:a1t,clear:s1t,getBranchesAsObjArray:o1t,getBranches:l1t,getCommits:c1t,getCommitsArray:h1t,getCurrentBranch:u1t,getDirection:d1t,getHead:p1t,setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,setAccDescription:hc,setDiagramTitle:dc,getDiagramTitle:pc}}),ngt=t(()=>{Fpt(),e(),Gpt(),rgt(),qpt(),f1t=Ae((t,e)=>{$pt(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)m1t(r,e)},"populate"),m1t=Ae((t,e)=>{var r={Commit:Ae(t=>e.commit(y1t(t)),"Commit"),Branch:Ae(t=>e.branch(v1t(t)),"Branch"),Merge:Ae(t=>e.merge(x1t(t)),"Merge"),Checkout:Ae(t=>e.checkout(b1t(t)),"Checkout"),CherryPicking:Ae(t=>e.cherryPick(w1t(t)),"CherryPicking")}[t.$type];r?r(t):R.error("Unknown statement type: "+t.$type)},"parseStatement"),y1t=Ae(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?zpt[t.type]:zpt.NORMAL,tags:t.tags??void 0}),"parseCommit"),v1t=Ae(t=>({name:t.name,order:t.order??0}),"parseBranch"),x1t=Ae(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?zpt[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),b1t=Ae(t=>t.branch,"parseCheckout"),w1t=Ae(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),k1t={parse:Ae(async t=>{t=await Dpt("gitGraph",t),R.debug(t),f1t(t,g1t)},"parse")}}),igt=t(()=>{Z3(),fh(),e(),K8(),qpt(),Q1t=D(),T1t=Q1t?.gitGraph,_1t=new Map,E1t=new Map,C1t=new Map,S1t=[],A1t=0,L1t="LR",N1t=Ae(()=>{_1t.clear(),E1t.clear(),C1t.clear(),A1t=0,S1t=[],L1t="LR"},"clear"),I1t=Ae(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/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"),M1t=Ae(t=>{let r,n,i;return i="BT"===L1t?(n=Ae((t,e)=>t<=e,"comparisonFunc"),1/0):(n=Ae((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===L1t||"BT"==L1t?E1t.get(t)?.y:E1t.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),R1t=Ae(t=>{let r="",n=1/0;return t.forEach(t=>{var e=E1t.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),D1t=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=P1t(e),a=Math.max(i,a)):r.push(e),B1t(e,i)}),i=a,r.forEach(t=>{F1t(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=R1t(t.parents),(i=E1t.get(e).y-40)<=a&&(a=i),e=_1t.get(t.branch).pos,r=i-10,E1t.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),O1t=Ae(t=>{var e=M1t(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=E1t.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),P1t=Ae(t=>O1t(t)+40,"calculateCommitPosition"),B1t=Ae((t,e)=>{var r=_1t.get(t.branch);if(r)return r=r.pos,E1t.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),F1t=Ae((t,e,r)=>{var n=_1t.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,E1t.set(t.id,{x:n,y:e+r})},"setRootPosition"),$1t=Ae((t,e,r,n,i,a)=>{var s;a===zpt.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===zpt.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)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===zpt.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+i%8),a===zpt.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${e.id} commit`+i%8)),a===zpt.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"),z1t=Ae((t,e,r,n)=>{var i,a;e.type!==zpt.CHERRY_PICK&&(e.customId&&e.type===zpt.MERGE||e.type!==zpt.MERGE)&&T1t?.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"===L1t||"BT"===L1t?(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),T1t.rotateCommitLabel)&&("TB"===L1t||"BT"===L1t?(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"),U1t=Ae((i,a,s,o)=>{if(0{switch(t.customType??t.type){case zpt.NORMAL:return"commit-normal";case zpt.REVERSE:return"commit-reverse";case zpt.HIGHLIGHT:return"commit-highlight";case zpt.MERGE:return"commit-merge";case zpt.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),q1t=Ae((t,e,r,n)=>{var i,a={x:0,y:0};return 0{var r="BT"===L1t&&r?e:e+10,e="TB"===L1t||"BT"===L1t?r:_1t.get(t.branch)?.pos,n="TB"===L1t||"BT"===L1t?_1t.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"),Y1t=Ae((t,a,s)=>{if(!T1t)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===L1t||"BT"===L1t?30:0,e=[...a.keys()],h=T1t?.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"===L1t&&(h&&D1t(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=q1t(e,L1t,c,E1t));var r,n,i,t=j1t(e,c,h);s&&(r=G1t(e),n=e.customType??e.type,i=_1t.get(e.branch)?.index??0,$1t(o,e,t,r,i,n),z1t(l,e,t,c),U1t(l,e,t,c)),"TB"===L1t||"BT"===L1t?E1t.set(e.id,{x:t.x,y:t.posWithOffset}):E1t.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===L1t&&h?c+40:c+40+10)>A1t&&(A1t=c)})},"drawCommits"),H1t=Ae((e,r,t,n,i)=>{let a=(("TB"===L1t||"BT"===L1t?t.xt.branch===a,"isOnBranchToGetCurve"),o=Ae(t=>t.seq>e.seq&&t.seqo(t)&&s(t))},"shouldRerouteArrow"),W1t=Ae((t,e,r=0)=>{let n=t+Math.abs(t-e)/2,i;return 510<=Math.abs(t-n))?(S1t.push(n),n):(i=Math.abs(t-e),W1t(t,e-i/5,r+1))},"findLane"),V1t=Ae((t,e,r,n)=>{var i,a=E1t.get(e.id),s=E1t.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=H1t(e,r,a,s,n),l="",c="",h=0,u=0,d=_1t.get(r.branch)?.index;r.type===zpt.MERGE&&e.id!==r.parents[0]&&(d=_1t.get(e.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===zpt.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===L1t?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===zpt.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.ys.y&&(p=r.type===zpt.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),X1t=Ae((t,r)=>{let n=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0{V1t(n,r.get(t),e,r)})})},"drawArrows"),K1t=Ae((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=_1t.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",A1t),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===L1t?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",A1t),n.attr("x2",r)):"BT"===L1t&&(n.attr("y1",A1t),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),S1t.push(r);var n=t.name,t=I1t(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===T1t?.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===T1t?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===L1t?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===L1t?(n.attr("x",r-t.width/2-10).attr("y",A1t),i.attr("transform","translate("+(r-t.width/2-5)+", "+A1t+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),Z1t=Ae(function(t,e,r,n,i){return _1t.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===L1t||"BT"===L1t?n.width/2:0))},"setBranchPosition"),Q1t=Ae(function(t,e,r,n){if(N1t(),R.debug("in gitgraph renderer",t+` +`,"id:",e,r),!T1t)throw new Error("GitGraph config not found");let s=T1t.rotateCommitLabel??!1,i=n.db,o=(C1t=i.getCommits(),t=i.getBranchesAsObjArray(),L1t=i.getDirection(),O(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=I1t(t.name),n=o.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=Z1t(t.name,l,e,r,s),a.remove(),i.remove(),n.remove()}),Y1t(o,C1t,!1),T1t.showBranches&&K1t(o,t),X1t(o,C1t),Y1t(o,C1t,!0),H8.insertTitle(o,"gitTitleText",T1t.titleTopMargin??0,i.getDiagramTitle()),xc(void 0,o,T1t.diagramPadding,T1t.useMaxWidth)},"draw"),J1t={draw:Q1t}}),agt=t(()=>{tgt=Ae(e=>` .commit-id, .commit-msg, .branch-label { @@ -838,12 +838,12 @@ For Further details.`}function cst(t){if(t instanceof met)return"SUBRULE";if(t i font-size: 18px; fill: ${e.textColor}; } -`,"getStyles"),z1t=$1t}),j1t={};_Bt(j1t,{diagram:()=>H1t});var H1t,W1t,V1t,X1t=t(()=>{U1t(),G1t(),q1t(),Y1t(),H1t={parser:s1t,db:Jpt,renderer:F1t,styles:z1t}}),K1t=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"ogt});var ogt,lgt,cgt,hgt=t(()=>{ngt(),rgt(),igt(),agt(),ogt={parser:k1t,db:g1t,renderer:J1t,styles:egt}}),ugt=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],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],_=[1,23],E=[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,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8: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[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:_,37:24,38:E,40:C},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:_,37:24,38:E,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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{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{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{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{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 tgt(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 egt,rgt,ngt,igt,agt,ogt,sgt,lgt,cgt,hgt,ugt,dgt,pgt,ggt,fgt,mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,Egt,_gt,Cgt,Sgt,Agt,Lgt,Ngt,Igt,Mgt,Rgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt,zgt,Ggt,Ugt,qgt,Ygt,jgt,Hgt,Wgt,Vgt,Xgt,Kgt,Zgt,Qgt,Jgt,tft,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=t(()=>{egt=et(J3(),1),rgt=et(rt(),1),kgt=et(Z1t(),1),Tgt=et(Q1t(),1),Egt=et(J1t(),1),e(),fh(),X8(),gh(),rgt.default.extend(kgt.default),rgt.default.extend(Tgt.default),rgt.default.extend(Egt.default),ngt={friday:5,saturday:6},sgt=agt=igt="",lgt=[],cgt=[],hgt=new Map,ugt=[],dgt=[],ggt=pgt="",fgt=["active","done","crit","milestone"],vgt=ygt=!(mgt=[]),xgt="sunday",bgt="saturday",wgt=0,kgt=Ae(function(){ugt=[],dgt=[],mgt=[],oft=[],ogt=aft=ift=void(tft=0),sgt=ggt=agt=igt=pgt="",lgt=[],vgt=ygt=!(cgt=[]),wgt=0,hgt=new Map,sc(),xgt="sunday",bgt="saturday"},"clear"),Tgt=Ae(function(t){agt=t},"setAxisFormat"),Egt=Ae(function(){return agt},"getAxisFormat"),_gt=Ae(function(t){ogt=t},"setTickInterval"),Cgt=Ae(function(){return ogt},"getTickInterval"),Sgt=Ae(function(t){sgt=t},"setTodayMarker"),Agt=Ae(function(){return sgt},"getTodayMarker"),Lgt=Ae(function(t){igt=t},"setDateFormat"),Ngt=Ae(function(){ygt=!0},"enableInclusiveEndDates"),Igt=Ae(function(){return ygt},"endDatesAreInclusive"),Mgt=Ae(function(){vgt=!0},"enableTopAxis"),Rgt=Ae(function(){return vgt},"topAxisEnabled"),Dgt=Ae(function(t){ggt=t},"setDisplayMode"),Ogt=Ae(function(){return ggt},"getDisplayMode"),Pgt=Ae(function(){return igt},"getDateFormat"),Bgt=Ae(function(t){lgt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Fgt=Ae(function(){return lgt},"getIncludes"),$gt=Ae(function(t){cgt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),zgt=Ae(function(){return cgt},"getExcludes"),Ggt=Ae(function(){return hgt},"getLinks"),Ugt=Ae(function(t){pgt=t,ugt.push(t)},"addSection"),qgt=Ae(function(){return ugt},"getSections"),Ygt=Ae(function(){let t=uft(),e=0;for(;!t&&e<10;)t=uft(),e++;return dgt=oft},"getTasks"),jgt=Ae(function(t,e,r,n){return!n.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==ngt[bgt]&&t.isoWeekday()!==ngt[bgt]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),Hgt=Ae(function(t){xgt=t},"setWeekday"),Wgt=Ae(function(){return xgt},"getWeekday"),Vgt=Ae(function(t){bgt=t},"setWeekend"),Xgt=Ae(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,rgt.default)(e.startTime):(0,rgt.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,rgt.default)(e.endTime):(0,rgt.default)(e.endTime,r,!0),[r,n]=Kgt(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),Kgt=Ae(function(t,e,r,n,i){let a=!1,o=null;for(;t<=e;)a||(o=e.toDate()),(a=jgt(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,o]},"fixTaskDates"),Zgt=Ae(function(t,e,r){r=r.trim();var n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=cft(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,rgt.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[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=cft(a))&&(!t||a.startTime{window.open(r,"_self")}),hgt.set(t,r))}),pft(t,"clickable")},"setLink"),pft=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==(t=cft(t))&&t.classes.push(e)})},"setClass"),gft=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{j8.runFunc(e,...r)})}},"setClickFun"),fft=Ae(function(e,r){mgt.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"),mft=Ae(function(t,e,r){t.split(",").forEach(function(t){gft(t,e,r)}),pft(t,"clickable")},"setClickEvent"),yft=Ae(function(e){mgt.forEach(function(t){t(e)})},"bindFunctions"),vft={getConfig:Ae(()=>D().gantt,"getConfig"),clear:kgt,setDateFormat:Lgt,getDateFormat:Pgt,enableInclusiveEndDates:Ngt,endDatesAreInclusive:Igt,enableTopAxis:Mgt,topAxisEnabled:Rgt,setAxisFormat:Tgt,getAxisFormat:Egt,setTickInterval:_gt,getTickInterval:Cgt,setTodayMarker:Sgt,getTodayMarker:Agt,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,setDisplayMode:Dgt,getDisplayMode:Ogt,setAccDescription:hc,getAccDescription:uc,addSection:Ugt,getSections:qgt,getTasks:Ygt,addTask:lft,findTaskById:cft,addTaskOrg:hft,setIncludes:Bgt,getIncludes:Fgt,setExcludes:$gt,getExcludes:zgt,setClickEvent:mft,setLink:dft,getLinks:Ggt,bindFunctions:yft,parseDuration:Qgt,isInvalidDate:jgt,setWeekday:Hgt,getWeekday:Wgt,setWeekend:Vgt},Ae(tgt,"getTaskTags")}),Lft=t(()=>{xft=et(rt(),1),e(),Z3(),Jl(),fh(),tc(),bft=Ae(function(){R.debug("Something is calling, setConf, remove the call")},"setConf"),wft={monday:nv,tuesday:iv,wednesday:av,thursday:ov,friday:sv,saturday:lv,sunday:rv},kft=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[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),Eft=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===(Tft=a.parentElement.offsetWidth)&&(Tft=1200),void 0!==p.useWidth&&(Tft=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=kft(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 "+Tft+" "+g);let x=i.select(`[id="${l}"]`),b=ob().domain([jh(s,function(t){return t.startTime}),qh(s,function(t){return t.endTime})]).rangeRound([0,Tft-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return nt.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=(0r-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=(0r-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||ra)&&(a=n);if(i&&a)if(5<(0,xft.default)(a).diff((0,xft.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,xft.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=au(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(tb(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($2.every(o));break;case"second":i.ticks(z2.every(o));break;case"minute":i.ticks(G2.every(o));break;case"hour":i.ticks(q2.every(o));break;case"day":i.ticks(j2.every(o));break;case"week":i.ticks(wft[l].every(o));break;case"month":i.ticks(mv.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=iu(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(tb(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($2.every(h));break;case"second":c.ticks(z2.every(h));break;case"minute":c.ticks(G2.every(h));break;case"hour":c.ticks(q2.every(h));break;case"day":c.ticks(j2.every(h));break;case"week":c.ticks(wft[u].every(h));break;case"month":c.ticks(mv.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{Cft=Ae(t=>` +`+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{function r(){return function(t,e,i){var a=Ae(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,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{function r(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t=/\d/,e=/\d\d/,r=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=Ae(function(t){return(t=+t)+(68{try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var i=T(e)(t),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0{function r(){return function(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 fgt(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 mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,_gt,Egt,Cgt,Sgt,Agt,Lgt,Ngt,Igt,Mgt,Rgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt,zgt,Ugt,Ggt,qgt,jgt,Ygt,Hgt,Wgt,Vgt,Xgt,Kgt,Zgt,Qgt,Jgt,tft,eft,rft,nft,ift,aft,sft,oft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,_ft,Eft,Cft,Sft,Aft,Lft,Nft,Ift,Mft,Rft,Dft,Oft,Pft,Bft,Fft,$ft,zft,Uft,Gft,qft=t(()=>{mgt=et(J3(),1),ygt=et(rt(),1),Bgt=et(dgt(),1),Fgt=et(pgt(),1),$gt=et(ggt(),1),e(),fh(),K8(),gh(),ygt.default.extend(Bgt.default),ygt.default.extend(Fgt.default),ygt.default.extend($gt.default),vgt={friday:5,saturday:6},kgt=bgt=xgt="",Tgt=[],_gt=[],Egt=new Map,Cgt=[],Sgt=[],Lgt=Agt="",Ngt=["active","done","crit","milestone"],Rgt=Mgt=!(Igt=[]),Dgt="sunday",Ogt="saturday",Pgt=0,Bgt=Ae(function(){Cgt=[],Sgt=[],Igt=[],wft=[],wgt=bft=xft=void(fft=0),kgt=Lgt=bgt=xgt=Agt="",Tgt=[],Rgt=Mgt=!(_gt=[]),Pgt=0,Egt=new Map,oc(),Dgt="sunday",Ogt="saturday"},"clear"),Fgt=Ae(function(t){bgt=t},"setAxisFormat"),$gt=Ae(function(){return bgt},"getAxisFormat"),zgt=Ae(function(t){wgt=t},"setTickInterval"),Ugt=Ae(function(){return wgt},"getTickInterval"),Ggt=Ae(function(t){kgt=t},"setTodayMarker"),qgt=Ae(function(){return kgt},"getTodayMarker"),jgt=Ae(function(t){xgt=t},"setDateFormat"),Ygt=Ae(function(){Mgt=!0},"enableInclusiveEndDates"),Hgt=Ae(function(){return Mgt},"endDatesAreInclusive"),Wgt=Ae(function(){Rgt=!0},"enableTopAxis"),Vgt=Ae(function(){return Rgt},"topAxisEnabled"),Xgt=Ae(function(t){Lgt=t},"setDisplayMode"),Kgt=Ae(function(){return Lgt},"getDisplayMode"),Zgt=Ae(function(){return xgt},"getDateFormat"),Qgt=Ae(function(t){Tgt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Jgt=Ae(function(){return Tgt},"getIncludes"),tft=Ae(function(t){_gt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),eft=Ae(function(){return _gt},"getExcludes"),rft=Ae(function(){return Egt},"getLinks"),nft=Ae(function(t){Agt=t,Cgt.push(t)},"addSection"),ift=Ae(function(){return Cgt},"getSections"),aft=Ae(function(){let t=Cft(),e=0;for(;!t&&e<10;)t=Cft(),e++;return Sgt=wft},"getTasks"),sft=Ae(function(t,e,r,n){return!n.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==vgt[Ogt]&&t.isoWeekday()!==vgt[Ogt]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),oft=Ae(function(t){Dgt=t},"setWeekday"),lft=Ae(function(){return Dgt},"getWeekday"),cft=Ae(function(t){Ogt=t},"setWeekend"),hft=Ae(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,ygt.default)(e.startTime):(0,ygt.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,ygt.default)(e.endTime):(0,ygt.default)(e.endTime,r,!0),[r,n]=uft(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),uft=Ae(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=sft(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),dft=Ae(function(t,e,r){r=r.trim();var n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=_ft(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,ygt.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[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=_ft(a))&&(!t||a.startTime{window.open(r,"_self")}),Egt.set(t,r))}),Aft(t,"clickable")},"setLink"),Aft=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==(t=_ft(t))&&t.classes.push(e)})},"setClass"),Lft=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{H8.runFunc(e,...r)})}},"setClickFun"),Nft=Ae(function(e,r){Igt.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"),Ift=Ae(function(t,e,r){t.split(",").forEach(function(t){Lft(t,e,r)}),Aft(t,"clickable")},"setClickEvent"),Mft=Ae(function(e){Igt.forEach(function(t){t(e)})},"bindFunctions"),Rft={getConfig:Ae(()=>D().gantt,"getConfig"),clear:Bgt,setDateFormat:jgt,getDateFormat:Zgt,enableInclusiveEndDates:Ygt,endDatesAreInclusive:Hgt,enableTopAxis:Wgt,topAxisEnabled:Vgt,setAxisFormat:Fgt,getAxisFormat:$gt,setTickInterval:zgt,getTickInterval:Ugt,setTodayMarker:Ggt,getTodayMarker:qgt,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,setDisplayMode:Xgt,getDisplayMode:Kgt,setAccDescription:hc,getAccDescription:uc,addSection:nft,getSections:ift,getTasks:aft,addTask:Tft,findTaskById:_ft,addTaskOrg:Eft,setIncludes:Qgt,getIncludes:Jgt,setExcludes:tft,getExcludes:eft,setClickEvent:Ift,setLink:Sft,getLinks:rft,bindFunctions:Mft,parseDuration:pft,isInvalidDate:sft,setWeekday:oft,getWeekday:lft,setWeekend:cft},Ae(fgt,"getTaskTags")}),jft=t(()=>{Dft=et(rt(),1),e(),Z3(),Jl(),fh(),tc(),Oft=Ae(function(){R.debug("Something is calling, setConf, remove the call")},"setConf"),Pft={monday:nv,tuesday:iv,wednesday:av,thursday:sv,friday:ov,saturday:lv,sunday:rv},Bft=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[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),$ft=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")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),o=(void 0===(Fft=a.parentElement.offsetWidth)&&(Fft=1200),void 0!==p.useWidth&&(Fft=p.useWidth),d.db.getTasks()),u=[];for(var c of o)u.push(c.type);u=A(u);let h={},g=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of o)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let t=0;for(m of Object.keys(y)){var v=Bft(y[m],t)+1;t+=v,g+=v*(p.barHeight+p.barGap),h[m]=v}}else{g+=o.length*(p.barHeight+p.barGap);for(let e of u)h[e]=o.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+Fft+" "+g);let x=i.select(`[id="${l}"]`),b=sb().domain([Yh(o,function(t){return t.startTime}),qh(o,function(t){return t.endTime})]).rangeRound([0,Fft-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return nt.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 s=x.append("g").selectAll("rect").data(t).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+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=(0r-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=(0r-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;s.filter(function(t){return o.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",o.get(t.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(e),i.appendChild(r)})}}function _(s,o,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||ra)&&(a=n);if(i&&a)if(5<(0,Dft.default)(a).diff((0,Dft.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,Dft.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-o-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function E(t,e,r,n){var i=au(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(tb(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d")),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||p.tickInterval);if(null!==a){var s=a[1],o=a[2],l=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":i.ticks($2.every(s));break;case"second":i.ticks(z2.every(s));break;case"minute":i.ticks(U2.every(s));break;case"hour":i.ticks(q2.every(s));break;case"day":i.ticks(Y2.every(s));break;case"week":i.ticks(Pft[l].every(s));break;case"month":i.ticks(mv.every(s))}}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=iu(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(tb(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],o=a[2],u=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":c.ticks($2.every(h));break;case"second":c.ticks(z2.every(h));break;case"minute":c.ticks(U2.every(h));break;case"hour":c.ticks(q2.every(h));break;case"day":c.ticks(Y2.every(h));break;case"week":c.ticks(Pft[u].every(h));break;case"month":c.ticks(mv.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=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{Uft=Ae(t=>` .mermaid-main-font { font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } @@ -1094,8 +1094,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.titleColor||t.textColor}; font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } -`,"getStyles"),Sft=Cft}),Ift={};_Bt(Ift,{diagram:()=>Mft});var Mft,Rft,Dft,Oft,Pft,Bft,Fft,$ft,zft,Gft=t(()=>{K1t(),Aft(),Lft(),Nft(),Mft={parser:V1t,db:vft,renderer:_ft,styles:Sft}}),Uft=t(()=>{Tpt(),e(),Rft={parse:Ae(async t=>{t=await xpt("info",t),R.debug(t)},"parse")}}),qft=t(()=>{Dft="11.3.0"}),Yft=t(()=>{qft(),Oft={version:Dft},Pft=Ae(()=>Oft.version,"getVersion"),Bft={getVersion:Pft}}),jft=t(()=>{Z3(),fh(),Fft=Ae(t=>{let e=D().securityLevel,r=O("body"),n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),Hft=t(()=>{e(),jft(),tc(),$ft=Ae((t,e,r)=>{R.debug(`rendering info diagram -`+t),t=Fft(e),Wl(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"),zft={draw:$ft}}),Wft={};_Bt(Wft,{diagram:()=>Vft});var Vft,Xft,Kft,Zft,Qft,Jft,tmt,emt,rmt,nmt,imt,amt,omt,smt,lmt,cmt,hmt,umt,dmt,pmt=t(()=>{Uft(),Yft(),Hft(),Vft={parser:Rft,db:Bft,renderer:zft}}),gmt=t(()=>{e(),gh(),Ln(),Jft=vr.pie,Xft={sections:new Map,showData:!1,config:Jft},Kft=Xft.sections,Zft=Xft.showData,Qft=structuredClone(Jft),Jft=Ae(()=>structuredClone(Qft),"getConfig"),tmt=Ae(()=>{Kft=new Map,Zft=Xft.showData,sc()},"clear"),emt=Ae(({label:t,value:e})=>{Kft.has(t)||(Kft.set(t,e),R.debug(`added new section: ${t}, with value: `+e))},"addSection"),rmt=Ae(()=>Kft,"getSections"),nmt=Ae(t=>{Zft=t},"setShowData"),imt=Ae(()=>Zft,"getShowData"),amt={getConfig:Jft,clear:tmt,setDiagramTitle:dc,getDiagramTitle:pc,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addSection:emt,getSections:rmt,setShowData:nmt,getShowData:imt}}),fmt=t(()=>{Tpt(),e(),Spt(),gmt(),omt=Ae((t,e)=>{Ept(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),smt={parse:Ae(async t=>{t=await xpt("pie",t),R.debug(t),omt(t,amt)},"parse")}}),mmt=t(()=>{lmt=Ae(t=>` +`,"getStyles"),Gft=Uft}),Hft={};SBt(Hft,{diagram:()=>Wft});var Wft,Vft,Xft,Kft,Zft,Qft,Jft,tmt,emt,rmt=t(()=>{ugt(),qft(),jft(),Yft(),Wft={parser:cgt,db:Rft,renderer:zft,styles:Gft}}),nmt=t(()=>{Fpt(),e(),Vft={parse:Ae(async t=>{t=await Dpt("info",t),R.debug(t)},"parse")}}),imt=t(()=>{Xft="11.4.0"}),amt=t(()=>{imt(),Kft={version:Xft},Zft=Ae(()=>Kft.version,"getVersion"),Qft={getVersion:Zft}}),smt=t(()=>{Z3(),fh(),Jft=Ae(t=>{let e=D().securityLevel,r=O("body"),n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),omt=t(()=>{e(),smt(),tc(),tmt=Ae((t,e,r)=>{R.debug(`rendering info diagram +`+t),t=Jft(e),Wl(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"),emt={draw:tmt}}),lmt={};SBt(lmt,{diagram:()=>cmt});var cmt,hmt,umt,dmt,pmt,gmt,fmt,mmt,ymt,vmt,xmt,bmt,wmt,kmt,Tmt,_mt,Emt,Cmt,Smt,Amt=t(()=>{nmt(),amt(),omt(),cmt={parser:Vft,db:Qft,renderer:emt}}),Lmt=t(()=>{e(),gh(),Ln(),gmt=vr.pie,hmt={sections:new Map,showData:!1,config:gmt},umt=hmt.sections,dmt=hmt.showData,pmt=structuredClone(gmt),gmt=Ae(()=>structuredClone(pmt),"getConfig"),fmt=Ae(()=>{umt=new Map,dmt=hmt.showData,oc()},"clear"),mmt=Ae(({label:t,value:e})=>{umt.has(t)||(umt.set(t,e),R.debug(`added new section: ${t}, with value: `+e))},"addSection"),ymt=Ae(()=>umt,"getSections"),vmt=Ae(t=>{dmt=t},"setShowData"),xmt=Ae(()=>dmt,"getShowData"),bmt={getConfig:gmt,clear:fmt,setDiagramTitle:dc,getDiagramTitle:pc,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addSection:mmt,getSections:ymt,setShowData:vmt,getShowData:xmt}}),Nmt=t(()=>{Fpt(),e(),Gpt(),Lmt(),wmt=Ae((t,e)=>{$pt(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),kmt={parse:Ae(async t=>{t=await Dpt("pie",t),R.debug(t),wmt(t,bmt)},"parse")}}),Imt=t(()=>{Tmt=Ae(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; @@ -1123,25 +1123,25 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l font-family: ${t.fontFamily}; font-size: ${t.pieLegendTextSize}; } -`,"getStyles"),cmt=lmt}),ymt=t(()=>{Z3(),fh(),e(),jft(),tc(),X8(),hmt=Ae(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),e4().value(t=>t.value)(t)),"createPieArcs"),umt=Ae((t,e,r,n)=>{R.debug(`rendering pie chart -`+t);let i=n.db,a=D(),o=x8(i.getConfig(),a.pie),s=Fft(e),l=s.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=Y8(t.pieOuterStrokeWidth);n??=2;let c=o.textPosition,h=Math.min(450,450)/2-40,u=$b().innerRadius(0).outerRadius(h),d=$b().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=hmt(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=h2(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`),Wl(s,450,t,o.useMaxWidth)},"draw"),dmt={draw:umt}}),vmt={};_Bt(vmt,{diagram:()=>xmt});var xmt,bmt,wmt,kmt,Tmt,Emt=t(()=>{fmt(),gmt(),mmt(),ymt(),xmt={parser:smt,db:amt,renderer:dmt,styles:cmt}}),_mt=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"{Z3(),fh(),e(),smt(),tc(),K8(),Emt=Ae(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),e4().value(t=>t.value)(t)),"createPieArcs"),Cmt=Ae((t,e,r,n)=>{R.debug(`rendering pie chart +`+t);let i=n.db,a=D(),s=x8(i.getConfig(),a.pie),o=Jft(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=Y8(t.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=$b().innerRadius(0).outerRadius(h),d=$b().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=Emt(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=h2(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))),o.attr("viewBox",`0 0 ${t} 450`),Wl(o,450,t,s.useMaxWidth)},"draw"),Smt={draw:Cmt}}),Rmt={};SBt(Rmt,{diagram:()=>Dmt});var Dmt,Omt,Pmt,Bmt,Fmt,$mt=t(()=>{Nmt(),Lmt(),Imt(),Mmt(),Dmt={parser:kmt,db:bmt,renderer:Smt,styles:_mt}}),zmt=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],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[1,14],z=[1,23],U=[1,18],G=[1,19],q=[1,20],j=[1,21],Y=[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],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],_=[4,5,6,7,8,9,10,11,12,13,14,15,18],E=[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,s){var o=a.length-1;switch(i){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,F,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:$,25:z,35:U,37:G,39:q,41:j,42:Y,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:s},e(o,[2,37]),e(o,F,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:$,25:z,35:U,37:G,39:q,41:j,42:Y,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(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),e(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),e(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(_,[2,23]),e(_,[2,1]),e(_,[2,2]),e(_,[2,3]),e(_,[2,4]),e(_,[2,5]),e(_,[2,6]),e(_,[2,7]),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(_,[2,11]),e(_,[2,12]),e(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:E,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(_,[2,24]),e(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,47],{22:88,16:89,23:100,4:E,5:C,6:S,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:E,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(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:E,5:C,6:S,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),{4:E,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(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:E,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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 *)/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"),(bmt=new((t.prototype=r).Parser=t)).parser=bmt,wmt=bmt}),Cmt=t(()=>{Z3(),Ln(),e(),En(),kmt=lr(),Tmt=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:vr.quadrantChart?.chartWidth||500,chartWidth:vr.quadrantChart?.chartHeight||500,titlePadding:vr.quadrantChart?.titlePadding||10,titleFontSize:vr.quadrantChart?.titleFontSize||20,quadrantPadding:vr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:vr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:vr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:vr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:vr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:vr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:vr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:vr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:vr.quadrantChart?.pointLabelFontSize||12,pointRadius:vr.quadrantChart?.pointRadius||5,xAxisPosition:vr.quadrantChart?.xAxisPosition||"top",yAxisPosition:vr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:vr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:vr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:kmt.quadrant1Fill,quadrant2Fill:kmt.quadrant2Fill,quadrant3Fill:kmt.quadrant3Fill,quadrant4Fill:kmt.quadrant4Fill,quadrant1TextFill:kmt.quadrant1TextFill,quadrant2TextFill:kmt.quadrant2TextFill,quadrant3TextFill:kmt.quadrant3TextFill,quadrant4TextFill:kmt.quadrant4TextFill,quadrantPointFill:kmt.quadrantPointFill,quadrantPointTextFill:kmt.quadrantPointTextFill,quadrantXAxisTextFill:kmt.quadrantXAxisTextFill,quadrantYAxisTextFill:kmt.quadrantYAxisTextFill,quadrantTitleFill:kmt.quadrantTitleFill,quadrantInternalBorderStrokeFill:kmt.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:kmt.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=M2().domain([0,1]).range([n,a+n]),s=M2().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{Nmt=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(Smt,"validateHexCode"),Ae(Amt,"validateNumber"),Ae(Lmt,"validateSizeInPixels")});function Mmt(t){return Cl(t.trim(),Wmt)}function Rmt(t){Vmt.setData({quadrant1Text:Mmt(t.text)})}function Dmt(t){Vmt.setData({quadrant2Text:Mmt(t.text)})}function Omt(t){Vmt.setData({quadrant3Text:Mmt(t.text)})}function Pmt(t){Vmt.setData({quadrant4Text:Mmt(t.text)})}function Bmt(t){Vmt.setData({xAxisLeftText:Mmt(t.text)})}function Fmt(t){Vmt.setData({xAxisRightText:Mmt(t.text)})}function $mt(t){Vmt.setData({yAxisTopText:Mmt(t.text)})}function zmt(t){Vmt.setData({yAxisBottomText:Mmt(t.text)})}function Gmt(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(Amt(i))throw new Nmt(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(Smt(i))throw new Nmt(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(Smt(i))throw new Nmt(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(Lmt(i))throw new Nmt(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function Umt(t,e,r,n,i){i=Gmt(i),Vmt.addPoints([{x:r,y:n,text:Mmt(t.text),className:e,...i}])}function qmt(t,e){Vmt.addClass(t,Gmt(e))}function Ymt(t){Vmt.setConfig({chartWidth:t})}function jmt(t){Vmt.setConfig({chartHeight:t})}function Hmt(){var{themeVariables:t,quadrantChart:e}=D();return e&&Vmt.setConfig(e),Vmt.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}),Vmt.setData({titleText:pc()}),Vmt.build()}var Wmt,Vmt,Xmt,Kmt,Zmt,Qmt,Jmt=t(()=>{fh(),Jl(),gh(),Cmt(),Imt(),Wmt=D(),Ae(Mmt,"textSanitizer"),Vmt=new Tmt,Ae(Rmt,"setQuadrant1Text"),Ae(Dmt,"setQuadrant2Text"),Ae(Omt,"setQuadrant3Text"),Ae(Pmt,"setQuadrant4Text"),Ae(Bmt,"setXAxisLeftText"),Ae(Fmt,"setXAxisRightText"),Ae($mt,"setYAxisTopText"),Ae(zmt,"setYAxisBottomText"),Ae(Gmt,"parseStyles"),Ae(Umt,"addPoint"),Ae(qmt,"addClass"),Ae(Ymt,"setWidth"),Ae(jmt,"setHeight"),Ae(Hmt,"getQuadrantData"),Xmt=Ae(function(){Vmt.clear(),sc()},"clear"),Kmt={setWidth:Ymt,setHeight:jmt,setQuadrant1Text:Rmt,setQuadrant2Text:Dmt,setQuadrant3Text:Omt,setQuadrant4Text:Pmt,setXAxisLeftText:Bmt,setXAxisRightText:Fmt,setYAxisTopText:$mt,setYAxisBottomText:zmt,parseStyles:Gmt,addPoint:Umt,addClass:qmt,getQuadrantData:Hmt,clear:Xmt,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,getAccDescription:uc,setAccDescription:hc}}),tyt=t(()=>{Z3(),fh(),e(),tc(),Zmt=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=(Wl(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"),Qmt={draw:Zmt}}),eyt={};_Bt(eyt,{diagram:()=>ryt});var ryt,nyt,iyt,ayt=t(()=>{_mt(),Jmt(),tyt(),ryt={parser:wmt,db:Kmt,renderer:Qmt,styles:Ae(()=>"","styles")}}),oyt=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" *)/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"),(Omt=new((t.prototype=r).Parser=t)).parser=Omt,Pmt=Omt}),Umt=t(()=>{Z3(),Ln(),e(),_n(),Bmt=lr(),Fmt=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:vr.quadrantChart?.chartWidth||500,chartWidth:vr.quadrantChart?.chartHeight||500,titlePadding:vr.quadrantChart?.titlePadding||10,titleFontSize:vr.quadrantChart?.titleFontSize||20,quadrantPadding:vr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:vr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:vr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:vr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:vr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:vr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:vr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:vr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:vr.quadrantChart?.pointLabelFontSize||12,pointRadius:vr.quadrantChart?.pointRadius||5,xAxisPosition:vr.quadrantChart?.xAxisPosition||"top",yAxisPosition:vr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:vr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:vr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Bmt.quadrant1Fill,quadrant2Fill:Bmt.quadrant2Fill,quadrant3Fill:Bmt.quadrant3Fill,quadrant4Fill:Bmt.quadrant4Fill,quadrant1TextFill:Bmt.quadrant1TextFill,quadrant2TextFill:Bmt.quadrant2TextFill,quadrant3TextFill:Bmt.quadrant3TextFill,quadrant4TextFill:Bmt.quadrant4TextFill,quadrantPointFill:Bmt.quadrantPointFill,quadrantPointTextFill:Bmt.quadrantPointTextFill,quadrantXAxisTextFill:Bmt.quadrantXAxisTextFill,quadrantYAxisTextFill:Bmt.quadrantYAxisTextFill,quadrantTitleFill:Bmt.quadrantTitleFill,quadrantInternalBorderStrokeFill:Bmt.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Bmt.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,s=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:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,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:s+(h?o/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:s+o+(h?o/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+s+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+s+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,s=M2().domain([0,1]).range([n,a+n]),o=M2().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:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a,x2:n+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+e,x2:n+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a+r,x2:n+s+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+s-e,y2:a+t}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){var t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=0{Ymt=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(Gmt,"validateHexCode"),Ae(qmt,"validateNumber"),Ae(jmt,"validateSizeInPixels")});function Wmt(t){return Cl(t.trim(),lyt)}function Vmt(t){cyt.setData({quadrant1Text:Wmt(t.text)})}function Xmt(t){cyt.setData({quadrant2Text:Wmt(t.text)})}function Kmt(t){cyt.setData({quadrant3Text:Wmt(t.text)})}function Zmt(t){cyt.setData({quadrant4Text:Wmt(t.text)})}function Qmt(t){cyt.setData({xAxisLeftText:Wmt(t.text)})}function Jmt(t){cyt.setData({xAxisRightText:Wmt(t.text)})}function tyt(t){cyt.setData({yAxisTopText:Wmt(t.text)})}function eyt(t){cyt.setData({yAxisBottomText:Wmt(t.text)})}function ryt(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(qmt(i))throw new Ymt(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(Gmt(i))throw new Ymt(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(Gmt(i))throw new Ymt(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(jmt(i))throw new Ymt(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function nyt(t,e,r,n,i){i=ryt(i),cyt.addPoints([{x:r,y:n,text:Wmt(t.text),className:e,...i}])}function iyt(t,e){cyt.addClass(t,ryt(e))}function ayt(t){cyt.setConfig({chartWidth:t})}function syt(t){cyt.setConfig({chartHeight:t})}function oyt(){var{themeVariables:t,quadrantChart:e}=D();return e&&cyt.setConfig(e),cyt.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}),cyt.setData({titleText:pc()}),cyt.build()}var lyt,cyt,hyt,uyt,dyt,pyt,gyt=t(()=>{fh(),Jl(),gh(),Umt(),Hmt(),lyt=D(),Ae(Wmt,"textSanitizer"),cyt=new Fmt,Ae(Vmt,"setQuadrant1Text"),Ae(Xmt,"setQuadrant2Text"),Ae(Kmt,"setQuadrant3Text"),Ae(Zmt,"setQuadrant4Text"),Ae(Qmt,"setXAxisLeftText"),Ae(Jmt,"setXAxisRightText"),Ae(tyt,"setYAxisTopText"),Ae(eyt,"setYAxisBottomText"),Ae(ryt,"parseStyles"),Ae(nyt,"addPoint"),Ae(iyt,"addClass"),Ae(ayt,"setWidth"),Ae(syt,"setHeight"),Ae(oyt,"getQuadrantData"),hyt=Ae(function(){cyt.clear(),oc()},"clear"),uyt={setWidth:ayt,setHeight:syt,setQuadrant1Text:Vmt,setQuadrant2Text:Xmt,setQuadrant3Text:Kmt,setQuadrant4Text:Zmt,setXAxisLeftText:Qmt,setXAxisRightText:Jmt,setYAxisTopText:tyt,setYAxisBottomText:eyt,parseStyles:ryt,addPoint:nyt,addClass:iyt,getQuadrantData:oyt,clear:hyt,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,getAccDescription:uc,setAccDescription:hc}}),fyt=t(()=>{Z3(),fh(),e(),tc(),dyt=Ae((t,e,r,n)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}Ae(i,"getDominantBaseLine"),Ae(a,"getTextAnchor"),Ae(s,"getTransformation");var o=D();R.debug(`Rendering quadrant chart +`+t);let l=o.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=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Wl(t,u,h,o.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");o.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",i(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),pyt={draw:dyt}}),myt={};SBt(myt,{diagram:()=>yyt});var yyt,vyt,xyt,byt=t(()=>{zmt(),gyt(),fyt(),yyt={parser:Pmt,db:uyt,renderer:pyt,styles:Ae(()=>"","styles")}}),wyt=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],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],_=[1,50],E=[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,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[e(r,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},e(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),e(r,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,n,{4:2,7:4,3:21,5:i,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:w,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:T,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:_,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:_,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(E,[2,18]),{1:[2,2]},e(E,[2,8]),e(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(E,[2,10]),e(E,[2,22],{30:41,29:56,24:w,27:k}),e(E,[2,24]),e(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(E,[2,11]),e(E,[2,30],{33:60,27:T}),e(E,[2,32]),{31:[1,61]},e(E,[2,12]),{17:62,24:_},{25:63,27:A},e(E,[2,14]),{17:65,24:_},e(E,[2,16]),e(E,[2,17]),e(S,[2,41]),e(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(E,[2,31]),{27:[1,69]},e(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(E,[2,15]),e(E,[2,26]),e(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(E,[2,33]),e(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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,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"),(nyt=new((t.prototype=n).Parser=t)).parser=nyt,iyt=nyt});function syt(t){return"bar"===t.type}function lyt(t){return"band"===t.type}function cyt(t){return"linear"===t.type}var hyt,uyt,dyt,pyt,gyt=t(()=>{Ae(syt,"isBarPlot"),Ae(lyt,"isBandAxisData"),Ae(cyt,"isLinearAxisData")}),fyt=t(()=>{pN(),hyt=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=oN(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}}}),myt=t(()=>{uyt=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():[]}}}),yyt=t(()=>{Z3(),e(),myt(),dyt=class extends uyt{static{Ae(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=p2().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=p2().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]}}}),vyt=t(()=>{Z3(),myt(),pyt=class extends uyt{static{Ae(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=M2().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=M2().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function xyt(t,e,r,n){return n=new hyt(n),lyt(t)?new dyt(e,r,t.categories,t.title,n):new pyt(e,r,[t.min,t.max],t.title,n)}var byt=t(()=>{gyt(),fyt(),yyt(),vyt(),Ae(xyt,"getAxis")});function wyt(t,e,r,n){return n=new hyt(n),new kyt(n,t,e,r)}var kyt,Tyt,Eyt,_yt=t(()=>{fyt(),kyt=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(wyt,"getChartTitleComponent")}),Cyt=t(()=>{Z3(),Tyt=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?Xb().y(t=>t[0]).x(t=>t[1]):Xb().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}]}]:[]}}}),Syt=t(()=>{Eyt=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 Ayt(t,e,r){return new Lyt(t,e,r)}var Lyt,Nyt,Iyt,Myt=t(()=>{Cyt(),Syt(),Lyt=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 Tyt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new Eyt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},Ae(Ayt,"getPlotComponent")}),Ryt=t(()=>{byt(),_yt(),Myt(),gyt(),Nyt=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:wyt(t,e,r,n),plot:Ayt(t,e,r),xAxis:xyt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:xyt(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,n=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).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),0syt(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,r=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).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,0syt(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}}}),Dyt=t(()=>{Ryt(),Iyt=class{static{Ae(this,"XYChartBuilder")}static build(t,e,r,n){return new Nyt(t,e,r,n).getDrawableElement()}}});function Oyt(){var t=lr(),e=Mr();return x8(t.xyChart,e.themeVariables.xyChart)}function Pyt(){var t=Mr();return x8(vr.xyChart,t.xyChart)}function Byt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Fyt(t){var e=Mr();return Cl(t.trim(),e)}function $yt(t){e2t=t}function zyt(t){r2t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Gyt(t){i2t.xAxis.title=Fyt(t.text)}function Uyt(t,e){i2t.xAxis={type:"linear",title:i2t.xAxis.title,min:t,max:e},o2t=!0}function qyt(t){i2t.xAxis={type:"band",title:i2t.xAxis.title,categories:t.map(t=>Fyt(t.text))},o2t=!0}function Yyt(t){i2t.yAxis.title=Fyt(t.text)}function jyt(t,e){i2t.yAxis={type:"linear",title:i2t.yAxis.title,min:t,max:e},s2t=!0}function Hyt(t){var e=Math.min(...t),t=Math.max(...t),r=cyt(i2t.yAxis)?i2t.yAxis.min:1/0,n=cyt(i2t.yAxis)?i2t.yAxis.max:-1/0;i2t.yAxis={type:"linear",title:i2t.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function Wyt(r){let t=[],e;if(0!==r.length&&(o2t||(n=cyt(i2t.xAxis)?i2t.xAxis.min:1/0,e=cyt(i2t.xAxis)?i2t.xAxis.max:-1/0,Uyt(Math.min(n,1),Math.max(e,r.length))),s2t||Hyt(r),lyt(i2t.xAxis)&&(t=i2t.xAxis.categories.map((t,e)=>[t,r[e]])),cyt(i2t.xAxis))){var n=i2t.xAxis.min,i=i2t.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 Vyt(t){return a2t[0===t?0:t%a2t.length]}function Xyt(t,e){e=Wyt(e),i2t.plots.push({type:"line",strokeFill:Vyt(t2t),strokeWidth:2,data:e}),t2t++}function Kyt(t,e){e=Wyt(e),i2t.plots.push({type:"bar",fill:Vyt(t2t),data:e}),t2t++}function Zyt(){if(0===i2t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return i2t.title=pc(),Iyt.build(r2t,i2t,n2t,e2t)}function Qyt(){return n2t}function Jyt(){return r2t}var t2t,e2t,r2t,n2t,i2t,a2t,o2t,s2t,l2t,c2t,h2t,u2t,d2t=t(()=>{In(),Ln(),En(),X8(),Jl(),gh(),Dyt(),gyt(),t2t=0,r2t=Pyt(),n2t=Oyt(),i2t=Byt(),a2t=n2t.plotColorPalette.split(",").map(t=>t.trim()),s2t=o2t=!1,Ae(Oyt,"getChartDefaultThemeConfig"),Ae(Pyt,"getChartDefaultConfig"),Ae(Byt,"getChartDefaultData"),Ae(Fyt,"textSanitizer"),Ae($yt,"setTmpSVGG"),Ae(zyt,"setOrientation"),Ae(Gyt,"setXAxisTitle"),Ae(Uyt,"setXAxisRangeData"),Ae(qyt,"setXAxisBand"),Ae(Yyt,"setYAxisTitle"),Ae(jyt,"setYAxisRangeData"),Ae(Hyt,"setYAxisRangeFromPlotData"),Ae(Wyt,"transformDataWithoutCategory"),Ae(Vyt,"getPlotColorFromPalette"),Ae(Xyt,"setLineData"),Ae(Kyt,"setBarData"),Ae(Zyt,"getDrawableElem"),Ae(Qyt,"getChartThemeConfig"),Ae(Jyt,"getChartConfig"),l2t=Ae(function(){sc(),t2t=0,r2t=Pyt(),i2t=Byt(),n2t=Oyt(),a2t=n2t.plotColorPalette.split(",").map(t=>t.trim()),s2t=o2t=!1},"clear"),c2t={getDrawableElem:Zyt,clear:l2t,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,getAccDescription:uc,setAccDescription:hc,setOrientation:zyt,setXAxisTitle:Gyt,setXAxisRangeData:Uyt,setXAxisBand:qyt,setYAxisTitle:Yyt,setYAxisRangeData:jyt,setLineData:Xyt,setBarData:Kyt,setTmpSVGG:$yt,getChartThemeConfig:Qyt,getChartConfig:Jyt}}),p2t=t(()=>{e(),jft(),tc(),h2t=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=Fft(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background"),p=(Wl(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;0t.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"),u2t={draw:h2t}}),g2t={};_Bt(g2t,{diagram:()=>f2t});var 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,nvt,ivt,avt,ovt=t(()=>{oyt(),d2t(),p2t(),f2t={parser:iyt,db:c2t,renderer:u2t}}),svt=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")/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,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"),(vyt=new((t.prototype=n).Parser=t)).parser=vyt,xyt=vyt});function kyt(t){return"bar"===t.type}function Tyt(t){return"band"===t.type}function _yt(t){return"linear"===t.type}var Eyt,Cyt,Syt,Ayt,Lyt=t(()=>{Ae(kyt,"isBarPlot"),Ae(Tyt,"isBandAxisData"),Ae(_yt,"isLinearAxisData")}),Nyt=t(()=>{UE(),Eyt=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=(s=PE(i,1,r))?s.width:r.length*e,s=s?s.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),Iyt=t(()=>{Cyt=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():[]}}}),Myt=t(()=>{Z3(),e(),Iyt(),Syt=class extends Cyt{static{Ae(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=p2().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=p2().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]}}}),Ryt=t(()=>{Z3(),Iyt(),Ayt=class extends Cyt{static{Ae(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=M2().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=M2().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function Dyt(t,e,r,n){return n=new Eyt(n),Tyt(t)?new Syt(e,r,t.categories,t.title,n):new Ayt(e,r,[t.min,t.max],t.title,n)}var Oyt=t(()=>{Lyt(),Nyt(),Myt(),Ryt(),Ae(Dyt,"getAxis")});function Pyt(t,e,r,n){return n=new Eyt(n),new Byt(n,t,e,r)}var Byt,Fyt,$yt,zyt=t(()=>{Nyt(),Byt=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(Pyt,"getChartTitleComponent")}),Uyt=t(()=>{Z3(),Fyt=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?Xb().y(t=>t[0]).x(t=>t[1]):Xb().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}]}]:[]}}}),Gyt=t(()=>{$yt=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 qyt(t,e,r){return new jyt(t,e,r)}var jyt,Yyt,Hyt,Wyt=t(()=>{Uyt(),Gyt(),jyt=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 Fyt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new $yt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},Ae(qyt,"getPlotComponent")}),Vyt=t(()=>{Oyt(),zyt(),Wyt(),Lyt(),Yyt=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:Pyt(t,e,r,n),plot:qyt(t,e,r),xAxis:Dyt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:Dyt(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),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,n=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(i+=t),0kyt(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),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,i=r+o.height,0kyt(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}}}),Xyt=t(()=>{Vyt(),Hyt=class{static{Ae(this,"XYChartBuilder")}static build(t,e,r,n){return new Yyt(t,e,r,n).getDrawableElement()}}});function Kyt(){var t=lr(),e=Mr();return x8(t.xyChart,e.themeVariables.xyChart)}function Zyt(){var t=Mr();return x8(vr.xyChart,t.xyChart)}function Qyt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Jyt(t){var e=Mr();return Cl(t.trim(),e)}function t2t(t){m2t=t}function e2t(t){y2t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function r2t(t){x2t.xAxis.title=Jyt(t.text)}function n2t(t,e){x2t.xAxis={type:"linear",title:x2t.xAxis.title,min:t,max:e},w2t=!0}function i2t(t){x2t.xAxis={type:"band",title:x2t.xAxis.title,categories:t.map(t=>Jyt(t.text))},w2t=!0}function a2t(t){x2t.yAxis.title=Jyt(t.text)}function s2t(t,e){x2t.yAxis={type:"linear",title:x2t.yAxis.title,min:t,max:e},k2t=!0}function o2t(t){var e=Math.min(...t),t=Math.max(...t),r=_yt(x2t.yAxis)?x2t.yAxis.min:1/0,n=_yt(x2t.yAxis)?x2t.yAxis.max:-1/0;x2t.yAxis={type:"linear",title:x2t.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function l2t(r){let t=[],e;if(0!==r.length&&(w2t||(n=_yt(x2t.xAxis)?x2t.xAxis.min:1/0,e=_yt(x2t.xAxis)?x2t.xAxis.max:-1/0,n2t(Math.min(n,1),Math.max(e,r.length))),k2t||o2t(r),Tyt(x2t.xAxis)&&(t=x2t.xAxis.categories.map((t,e)=>[t,r[e]])),_yt(x2t.xAxis))){var n=x2t.xAxis.min,i=x2t.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let t=n;t<=i;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function c2t(t){return b2t[0===t?0:t%b2t.length]}function h2t(t,e){e=l2t(e),x2t.plots.push({type:"line",strokeFill:c2t(f2t),strokeWidth:2,data:e}),f2t++}function u2t(t,e){e=l2t(e),x2t.plots.push({type:"bar",fill:c2t(f2t),data:e}),f2t++}function d2t(){if(0===x2t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return x2t.title=pc(),Hyt.build(y2t,x2t,v2t,m2t)}function p2t(){return v2t}function g2t(){return y2t}var f2t,m2t,y2t,v2t,x2t,b2t,w2t,k2t,T2t,_2t,E2t,C2t,S2t=t(()=>{In(),Ln(),_n(),K8(),Jl(),gh(),Xyt(),Lyt(),f2t=0,y2t=Zyt(),v2t=Kyt(),x2t=Qyt(),b2t=v2t.plotColorPalette.split(",").map(t=>t.trim()),k2t=w2t=!1,Ae(Kyt,"getChartDefaultThemeConfig"),Ae(Zyt,"getChartDefaultConfig"),Ae(Qyt,"getChartDefaultData"),Ae(Jyt,"textSanitizer"),Ae(t2t,"setTmpSVGG"),Ae(e2t,"setOrientation"),Ae(r2t,"setXAxisTitle"),Ae(n2t,"setXAxisRangeData"),Ae(i2t,"setXAxisBand"),Ae(a2t,"setYAxisTitle"),Ae(s2t,"setYAxisRangeData"),Ae(o2t,"setYAxisRangeFromPlotData"),Ae(l2t,"transformDataWithoutCategory"),Ae(c2t,"getPlotColorFromPalette"),Ae(h2t,"setLineData"),Ae(u2t,"setBarData"),Ae(d2t,"getDrawableElem"),Ae(p2t,"getChartThemeConfig"),Ae(g2t,"getChartConfig"),T2t=Ae(function(){oc(),f2t=0,y2t=Zyt(),x2t=Qyt(),v2t=Kyt(),b2t=v2t.plotColorPalette.split(",").map(t=>t.trim()),k2t=w2t=!1},"clear"),_2t={getDrawableElem:d2t,clear:T2t,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,getAccDescription:uc,setAccDescription:hc,setOrientation:e2t,setXAxisTitle:r2t,setXAxisRangeData:n2t,setXAxisBand:i2t,setYAxisTitle:a2t,setYAxisRangeData:s2t,setLineData:h2t,setBarData:u2t,setTmpSVGG:t2t,getChartThemeConfig:p2t,getChartConfig:g2t}}),A2t=t(()=>{e(),smt(),tc(),E2t=Ae((t,e,r,n)=>{var i,a=(n=n.db).getChartThemeConfig(),s=n.getChartConfig();function o(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}Ae(o,"getDominantBaseLine"),Ae(l,"getTextAnchor"),Ae(c,"getTextTransformation"),R.debug(`Rendering xychart chart +`+t);let h=Jft(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),p=(Wl(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} `+s.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;0t.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=>o(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":m.selectAll("path").data(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"),C2t={draw:E2t}}),L2t={};SBt(L2t,{diagram:()=>N2t});var N2t,I2t,M2t,R2t,D2t,O2t,P2t,B2t,F2t,$2t,z2t,U2t,G2t,q2t,j2t,Y2t,H2t,W2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,nvt,ivt,avt,svt,ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt=t(()=>{wyt(),S2t(),A2t(),N2t={parser:xyt,db:_2t,renderer:C2t}}),kvt=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],s=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],o=[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],_=[53,54],E=[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,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(a[o-3],a[o-4]);break;case 14:n.setNewReqId(a[o-2]);break;case 15:n.setNewReqText(a[o-2]);break;case 16:n.setNewReqRisk(a[o-2]);break;case 17:n.setNewReqVerifyMethod(a[o-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[o-3]);break;case 34:n.setNewElementType(a[o-2]);break;case 35:n.setNewElementDocRef(a[o-2]);break;case 38:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 39:n.addRelationship(a[o-2],a[o-4],a[o]);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(s,[2,6]),{3:12,4:2,6:r,9:n,11:i,13:a},{1:[2,2]},{4:17,5:o,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(s,[2,4]),e(s,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:o,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:o,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:o,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:o,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:o,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(_,[2,40]),e(_,[2,41]),e(_,[2,42]),e(_,[2,43]),e(_,[2,44]),e(_,[2,45]),e(_,[2,46]),{54:[1,58]},{5:E,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:E,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:E,20:106,21:C,24:S,26:A,28:L,30:N},{5:E,20:107,21:C,24:S,26:A,28:L,30:N},{5:E,20:108,21:C,24:S,26:A,28:L,30:N},{5:E,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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)/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"),(m2t=new((t.prototype=r).Parser=t)).parser=m2t,y2t=m2t}),lvt=t(()=>{fh(),e(),gh(),v2t=[],x2t={},b2t=new Map,w2t={},k2t=new Map,T2t={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},E2t={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},_2t={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},C2t={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},S2t=Ae((t,e)=>(b2t.has(t)||b2t.set(t,{name:t,type:e,id:x2t.id,text:x2t.text,risk:x2t.risk,verifyMethod:x2t.verifyMethod}),x2t={},b2t.get(t)),"addRequirement"),A2t=Ae(()=>b2t,"getRequirements"),L2t=Ae(t=>{void 0!==x2t&&(x2t.id=t)},"setNewReqId"),N2t=Ae(t=>{void 0!==x2t&&(x2t.text=t)},"setNewReqText"),I2t=Ae(t=>{void 0!==x2t&&(x2t.risk=t)},"setNewReqRisk"),M2t=Ae(t=>{void 0!==x2t&&(x2t.verifyMethod=t)},"setNewReqVerifyMethod"),R2t=Ae(t=>(k2t.has(t)||(k2t.set(t,{name:t,type:w2t.type,docRef:w2t.docRef}),R.info("Added new requirement: ",t)),w2t={},k2t.get(t)),"addElement"),D2t=Ae(()=>k2t,"getElements"),O2t=Ae(t=>{void 0!==w2t&&(w2t.type=t)},"setNewElementType"),P2t=Ae(t=>{void 0!==w2t&&(w2t.docRef=t)},"setNewElementDocRef"),B2t=Ae((t,e,r)=>{v2t.push({type:t,src:e,dst:r})},"addRelationship"),F2t=Ae(()=>v2t,"getRelationships"),$2t=Ae(()=>{v2t=[],x2t={},b2t=new Map,w2t={},k2t=new Map,sc()},"clear"),z2t={RequirementType:T2t,RiskLevel:E2t,VerifyType:_2t,Relationships:C2t,getConfig:Ae(()=>D().req,"getConfig"),addRequirement:S2t,getRequirements:A2t,setNewReqId:L2t,setNewReqText:N2t,setNewReqRisk:I2t,setNewReqVerifyMethod:M2t,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addElement:R2t,getElements:D2t,setNewElementType:O2t,setNewElementDocRef:P2t,addRelationship:B2t,getRelationships:F2t,clear:$2t}}),cvt=t(()=>{G2t=Ae(t=>` +`+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)/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=s,Ae(t,"Parser"),(I2t=new((t.prototype=r).Parser=t)).parser=I2t,M2t=I2t}),Tvt=t(()=>{fh(),e(),gh(),R2t=[],D2t={},O2t=new Map,P2t={},B2t=new Map,F2t={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},$2t={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},z2t={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},U2t={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},G2t=Ae((t,e)=>(O2t.has(t)||O2t.set(t,{name:t,type:e,id:D2t.id,text:D2t.text,risk:D2t.risk,verifyMethod:D2t.verifyMethod}),D2t={},O2t.get(t)),"addRequirement"),q2t=Ae(()=>O2t,"getRequirements"),j2t=Ae(t=>{void 0!==D2t&&(D2t.id=t)},"setNewReqId"),Y2t=Ae(t=>{void 0!==D2t&&(D2t.text=t)},"setNewReqText"),H2t=Ae(t=>{void 0!==D2t&&(D2t.risk=t)},"setNewReqRisk"),W2t=Ae(t=>{void 0!==D2t&&(D2t.verifyMethod=t)},"setNewReqVerifyMethod"),V2t=Ae(t=>(B2t.has(t)||(B2t.set(t,{name:t,type:P2t.type,docRef:P2t.docRef}),R.info("Added new requirement: ",t)),P2t={},B2t.get(t)),"addElement"),X2t=Ae(()=>B2t,"getElements"),K2t=Ae(t=>{void 0!==P2t&&(P2t.type=t)},"setNewElementType"),Z2t=Ae(t=>{void 0!==P2t&&(P2t.docRef=t)},"setNewElementDocRef"),Q2t=Ae((t,e,r)=>{R2t.push({type:t,src:e,dst:r})},"addRelationship"),J2t=Ae(()=>R2t,"getRelationships"),tvt=Ae(()=>{R2t=[],D2t={},O2t=new Map,P2t={},B2t=new Map,oc()},"clear"),evt={RequirementType:F2t,RiskLevel:$2t,VerifyType:z2t,Relationships:U2t,getConfig:Ae(()=>D().req,"getConfig"),addRequirement:G2t,getRequirements:q2t,setNewReqId:j2t,setNewReqText:Y2t,setNewReqRisk:H2t,setNewReqVerifyMethod:W2t,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addElement:V2t,getElements:X2t,setNewElementType:K2t,setNewElementDocRef:Z2t,addRelationship:Q2t,getRelationships:J2t,clear:tvt}}),_vt=t(()=>{rvt=Ae(t=>` marker { fill: ${t.relationColor}; @@ -1184,15 +1184,15 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.relationLabelColor}; } -`,"getStyles"),U2t=G2t}),hvt=t(()=>{q2t={CONTAINS:"contains",ARROW:"arrow"},Y2t=Ae((t,e)=>{var r=t.append("defs").append("marker").attr("id",q2t.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",q2t.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 +`,"getStyles"),nvt=rvt}),Evt=t(()=>{ivt={CONTAINS:"contains",ARROW:"arrow"},avt=Ae((t,e)=>{var r=t.append("defs").append("marker").attr("id",ivt.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",ivt.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"),j2t={ReqMarkers:q2t,insertLineEndings:Y2t}}),uvt=t(()=>{Z3(),MV(),xj(),fh(),e(),tc(),Jl(),hvt(),H2t={},W2t=0,V2t=Ae((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",H2t.rect_min_width+"px").attr("height",H2t.rect_min_height+"px"),"newRectNode"),X2t=Ae((t,e,r)=>{let n=H2t.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",H2t.rect_padding).attr("dominant-baseline","hanging"),a=0;return r.forEach(t=>{(0==a?i.append("tspan").attr("text-anchor","middle").attr("x",H2t.rect_min_width/2).attr("dy",0):i.append("tspan").attr("text-anchor","middle").attr("x",H2t.rect_min_width/2).attr("dy",.75*H2t.line_height)).text(t),a++}),e=1.5*H2t.rect_padding+a*H2t.line_height*.75,t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",H2t.rect_min_width).attr("y1",e).attr("y2",e),{titleNode:i,y:e}},"newTitleNode"),K2t=Ae((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",H2t.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,o=[];return r.forEach(t=>{let e=t.length;for(;30{i.append("tspan").attr("x",H2t.rect_padding).attr("dy",H2t.line_height).text(t)}),i},"newBodyNode"),Z2t=Ae((t,e,r,n)=>{var i=e.node().getTotalLength(),e=e.node().getPointAtLength(.5*i),i="rel"+W2t,n=(W2t++,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"),Q2t=Ae(function(t,e,r,n,i){var r=r.edge(nvt(e.src),nvt(e.dst)),a=Xb().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(H2t.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(n.attr("stroke-dasharray","10,7"),n.attr("marker-end","url("+L.getUrl(H2t.arrowMarkerAbsolute)+"#"+j2t.ReqMarkers.ARROW+"_line_ending)")),Z2t(t,n,H2t,`<<${e.type}>>`)},"drawRelationshipFromLayout"),J2t=Ae((t,o,s)=>{t.forEach((t,e)=>{e=nvt(e),R.info("Added new requirement: ",e);var r=s.append("g").attr("id",e),n=V2t(r,"req-"+e),i=[],a=X2t(r,e+"_title",[`<<${t.type}>>`,""+t.name]),r=(i.push(a.titleNode),K2t(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"),tvt=Ae((t,s,l)=>{t.forEach((t,e)=>{var r=nvt(e),n=l.append("g").attr("id",r),i=V2t(n,o="element-"+r),a=[],e=X2t(n,o+"_title",["<>",""+e]),n=(a.push(e.titleNode),K2t(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"),evt=Ae((t,n)=>(t.forEach(function(t){var e=nvt(t.src),r=nvt(t.dst);n.setEdge(e,r,{relationship:t})}),t),"addRelationships"),rvt=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"),nvt=Ae(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),ivt=Ae((t,e,r,n)=>{let i=(H2t=D().requirement).securityLevel,a,o=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`)),s=(j2t.insertLineEndings(o,H2t),new yj({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:H2t.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();J2t(l,s,o),tvt(c,s,o),evt(h,s),aV(s),rvt(o,s),h.forEach(function(t){Q2t(o,t,s,e,n)});var u=H2t.rect_padding,d=o.node().getBBox(),p=d.width+2*u,g=d.height+2*u;Wl(o,g,p,H2t.useMaxWidth),o.attr("viewBox",`${d.x-u} ${d.y-u} ${p} `+g)},"draw"),avt={draw:ivt}}),dvt={};_Bt(dvt,{diagram:()=>pvt});var pvt,gvt,fvt,mvt=t(()=>{svt(),lvt(),cvt(),uvt(),pvt={parser:y2t,db:z2t,renderer:avt,styles:U2t}}),yvt=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"{Z3(),HV(),RY(),fh(),e(),tc(),Jl(),Evt(),ovt={},lvt=0,cvt=Ae((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",ovt.rect_min_width+"px").attr("height",ovt.rect_min_height+"px"),"newRectNode"),hvt=Ae((t,e,r)=>{let n=ovt.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",ovt.rect_padding).attr("dominant-baseline","hanging"),a=0;return r.forEach(t=>{(0==a?i.append("tspan").attr("text-anchor","middle").attr("x",ovt.rect_min_width/2).attr("dy",0):i.append("tspan").attr("text-anchor","middle").attr("x",ovt.rect_min_width/2).attr("dy",.75*ovt.line_height)).text(t),a++}),e=1.5*ovt.rect_padding+a*ovt.line_height*.75,t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",ovt.rect_min_width).attr("y1",e).attr("y2",e),{titleNode:i,y:e}},"newTitleNode"),uvt=Ae((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",ovt.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,s=[];return r.forEach(t=>{let e=t.length;for(;30{i.append("tspan").attr("x",ovt.rect_padding).attr("dy",ovt.line_height).text(t)}),i},"newBodyNode"),dvt=Ae((t,e,r,n)=>{var i=e.node().getTotalLength(),e=e.node().getPointAtLength(.5*i),i="rel"+lvt,n=(lvt++,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"),pvt=Ae(function(t,e,r,n,i){var r=r.edge(vvt(e.src),vvt(e.dst)),a=Xb().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(ovt.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(n.attr("stroke-dasharray","10,7"),n.attr("marker-end","url("+L.getUrl(ovt.arrowMarkerAbsolute)+"#"+svt.ReqMarkers.ARROW+"_line_ending)")),dvt(t,n,ovt,`<<${e.type}>>`)},"drawRelationshipFromLayout"),gvt=Ae((t,s,o)=>{t.forEach((t,e)=>{e=vvt(e),R.info("Added new requirement: ",e);var r=o.append("g").attr("id",e),n=cvt(r,"req-"+e),i=[],a=hvt(r,e+"_title",[`<<${t.type}>>`,""+t.name]),r=(i.push(a.titleNode),uvt(r,e+"_body",["Id: "+t.id,"Text: "+t.text,"Risk: "+t.risk,"Verification: "+t.verifyMethod],a.y)),t=(i.push(r),n.node().getBBox());s.setNode(e,{width:t.width,height:t.height,shape:"rect",id:e})})},"drawReqs"),fvt=Ae((t,o,l)=>{t.forEach((t,e)=>{var r=vvt(e),n=l.append("g").attr("id",r),i=cvt(n,s="element-"+r),a=[],e=hvt(n,s+"_title",["<>",""+e]),n=(a.push(e.titleNode),uvt(n,s+"_body",["Type: "+(t.type||"Not Specified"),"Doc Ref: "+(t.docRef||"None")],e.y)),s=(a.push(n),i.node().getBBox());o.setNode(r,{width:s.width,height:s.height,shape:"rect",id:r})})},"drawElements"),mvt=Ae((t,n)=>(t.forEach(function(t){var e=vvt(t.src),r=vvt(t.dst);n.setEdge(e,r,{relationship:t})}),t),"addRelationships"),yvt=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"),vvt=Ae(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),xvt=Ae((t,e,r,n)=>{let i=(ovt=D().requirement).securityLevel,a,s=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`)),o=(svt.insertLineEndings(s,ovt),new IY({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:ovt.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();gvt(l,o,s),fvt(c,o,s),mvt(h,o),xV(o),yvt(s,o),h.forEach(function(t){pvt(s,t,o,e,n)});var u=ovt.rect_padding,d=s.node().getBBox(),p=d.width+2*u,g=d.height+2*u;Wl(s,g,p,ovt.useMaxWidth),s.attr("viewBox",`${d.x-u} ${d.y-u} ${p} `+g)},"draw"),bvt={draw:xvt}}),Svt={};SBt(Svt,{diagram:()=>Avt});var Avt,Lvt,Nvt,Ivt=t(()=>{kvt(),Tvt(),_vt(),Cvt(),Avt={parser:M2t,db:evt,renderer:bvt,styles:nvt}}),Mvt=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],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],_=[1,38],E=[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],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,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,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,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-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[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 62:this.$=a[o];break;case 63:this.$=n.PLACEMENT.LEFTOF;break;case 64:this.$=n.PLACEMENT.RIGHTOF;break;case 65:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=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[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:B,6:F},{1:[3]},{3:5,4:e,5:B,6:F},{3:6,4:e,5:B,6:F},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:C,59:S,60:A,61:L,62:N,70:I},t(M,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,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:_,53:E},{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(U,r,{42:104,7:105}),t(U,r,{7:105,42:106}),t(G,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:_,53:E},{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:s,16:[1,132],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,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:s,16:[1,133],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,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:s,16:[1,134],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,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:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,136],50:T,52:_,53:E,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:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,138],50:T,52:_,53:E,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:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,141],50:T,52:_,53:E,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:s,16:[1,142],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,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:_,53:E},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(U,r,{7:105,42:161}),t(G,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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\->:\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"),(gvt=new((P.prototype=e).Parser=P)).parser=gvt,fvt=gvt});function vvt(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}function xvt(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}function bvt(){wvt.records.currentBox=void 0}var 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,Xvt,Kvt,Zvt,Qvt,Jvt,txt,ext,rxt,nxt,ixt,axt,oxt,sxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt,fxt,mxt,yxt,vxt,xxt,bxt,wxt,kxt,Txt,Ext,_xt,Cxt,Sxt,Axt,Lxt,Nxt,Ixt,Mxt,Rxt,Dxt,Oxt=t(()=>{fh(),e(),Lpt(),Jl(),gh(),wvt=new Cpt(()=>({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})),kvt=Ae(function(t){wvt.records.boxes.push({name:t.text,wrap:t.wrap??Gvt(),fill:t.color,actorKeys:[]}),wvt.records.currentBox=wvt.records.boxes.slice(-1)[0]},"addBox"),Tvt=Ae(function(t,e,r,n){let i=wvt.records.currentBox,a=wvt.records.actors.get(t);if(a){if(wvt.records.currentBox&&a.box&&wvt.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 '${wvt.records.currentBox.name}' at the same time.`);if(i=a.box||wvt.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}),wvt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??Gvt(),prevActor:wvt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),wvt.records.prevActor&&(e=wvt.records.actors.get(wvt.records.prevActor))&&(e.nextActor=t),wvt.records.currentBox&&wvt.records.currentBox.actorKeys.push(t),wvt.records.prevActor=t},"addActor"),Evt=Ae(t=>{let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;return wvt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??Gvt(),type:n,activate:i}),!0},"addSignal"),Svt=Ae(function(){return 0t.name)},"hasAtLeastOneBoxWithTitle"),Lvt=Ae(function(){return wvt.records.messages},"getMessages"),Nvt=Ae(function(){return wvt.records.boxes},"getBoxes"),Ivt=Ae(function(){return wvt.records.actors},"getActors"),Mvt=Ae(function(){return wvt.records.createdActors},"getCreatedActors"),Rvt=Ae(function(){return wvt.records.destroyedActors},"getDestroyedActors"),Dvt=Ae(function(t){return wvt.records.actors.get(t)},"getActor"),Ovt=Ae(function(){return[...wvt.records.actors.keys()]},"getActorKeys"),Pvt=Ae(function(){wvt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),Bvt=Ae(function(){wvt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),Fvt=Ae(()=>wvt.records.sequenceNumbersEnabled,"showSequenceNumbers"),$vt=Ae(function(t){wvt.records.wrapEnabled=t},"setWrap"),zvt=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"),Gvt=Ae(()=>void 0!==wvt.records.wrapEnabled?wvt.records.wrapEnabled:D().sequence?.wrap??!1,"autoWrap"),Uvt=Ae(function(){wvt.reset(),sc()},"clear"),qvt=Ae(function(t){var t=t.trim(),{wrap:t,cleanedText:e}=zvt(t),e={text:e,wrap:t};return R.debug("parseMessage: "+JSON.stringify(e)),e},"parseMessage"),Yvt=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}=zvt(n);return{text:t?Cl(t,D()):void 0,color:r,wrap:i}},"parseBoxData"),jvt={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},Hvt={FILLED:0,OPEN:1},Wvt={LEFTOF:0,RIGHTOF:1,OVER:2},Vvt=Ae(function(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??Gvt()},t=[].concat(t,t);wvt.records.notes.push(n),wvt.records.messages.push({from:t[0],to:t[1],message:r.text,wrap:r.wrap??Gvt(),type:jvt.NOTE,placement:e})},"addNote"),Xvt=Ae(function(e,r){e=Dvt(e);try{let t=Cl(r.text,D());t=(t=t.replace(/&/g,"&")).replace(/=/g,"="),vvt(e,JSON.parse(t))}catch(t){R.error("error while parsing actor link text",t)}},"addLinks"),Kvt=Ae(function(a,o){a=Dvt(a);try{let t={},e=Cl(o.text,D()),r=e.indexOf("@"),n=(e=(e=e.replace(/&/g,"&")).replace(/=/g,"=")).slice(0,r-1).trim(),i=e.slice(r+1).trim();t[n]=i,vvt(a,t)}catch(t){R.error("error while parsing actor link text",t)}},"addALink"),Ae(vvt,"insertLinks"),Zvt=Ae(function(t,e){t=Dvt(t);try{var r=Cl(e.text,D());xvt(t,JSON.parse(r))}catch(t){R.error("error while parsing actor properties text",t)}},"addProperties"),Ae(xvt,"insertProperties"),Ae(bvt,"boxEnd"),Qvt=Ae(function(t,e){t=Dvt(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&xvt(t,n.properties),n.links&&vvt(t,n.links)}catch(t){R.error("error while parsing actor details text",t)}},"addDetails"),Jvt=Ae(function(t,e){if(void 0!==t?.properties)return t.properties[e]},"getActorProperty"),txt=Ae(function(t){if(Array.isArray(t))t.forEach(function(t){txt(t)});else switch(t.type){case"sequenceIndex":wvt.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":Tvt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(wvt.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");wvt.records.lastCreated=t.actor,Tvt(t.actor,t.actor,t.description,t.draw),wvt.records.createdActors.set(t.actor,wvt.records.messages.length);break;case"destroyParticipant":wvt.records.lastDestroyed=t.actor,wvt.records.destroyedActors.set(t.actor,wvt.records.messages.length);break;case"activeStart":case"activeEnd":Cvt(t.actor,void 0,void 0,t.signalType);break;case"addNote":Vvt(t.actor,t.placement,t.text);break;case"addLinks":Xvt(t.actor,t.text);break;case"addALink":Kvt(t.actor,t.text);break;case"addProperties":Zvt(t.actor,t.text);break;case"addDetails":Qvt(t.actor,t.text);break;case"addMessage":if(wvt.records.lastCreated){if(t.to!==wvt.records.lastCreated)throw new Error("The created participant "+wvt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");wvt.records.lastCreated=void 0}else if(wvt.records.lastDestroyed){if(t.to!==wvt.records.lastDestroyed&&t.from!==wvt.records.lastDestroyed)throw new Error("The destroyed participant "+wvt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");wvt.records.lastDestroyed=void 0}Cvt(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":kvt(t.boxData);break;case"boxEnd":bvt();break;case"loopStart":Cvt(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Cvt(void 0,void 0,void 0,t.signalType);break;case"rectStart":Cvt(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Cvt(void 0,void 0,void 0,t.signalType);break;case"optStart":Cvt(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Cvt(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":Cvt(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Cvt(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":lc(t.text);break;case"parStart":case"and":Cvt(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Cvt(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Cvt(void 0,void 0,t.criticalText,t.signalType);break;case"option":Cvt(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Cvt(void 0,void 0,void 0,t.signalType);break;case"breakStart":Cvt(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Cvt(void 0,void 0,void 0,t.signalType)}},"apply"),ext={addActor:Tvt,addMessage:_vt,addSignal:Cvt,addLinks:Xvt,addDetails:Qvt,addProperties:Zvt,autoWrap:Gvt,setWrap:$vt,enableSequenceNumbers:Pvt,disableSequenceNumbers:Bvt,showSequenceNumbers:Fvt,getMessages:Lvt,getActors:Ivt,getCreatedActors:Mvt,getDestroyedActors:Rvt,getActor:Dvt,getActorKeys:Ovt,getActorProperty:Jvt,getAccTitle:cc,getBoxes:Nvt,getDiagramTitle:pc,setDiagramTitle:dc,getConfig:Ae(()=>D().sequence,"getConfig"),clear:Uvt,parseMessage:qvt,parseBoxData:Yvt,LINETYPE:jvt,ARROWTYPE:Hvt,PLACEMENT:Wvt,addNote:Vvt,setAccTitle:lc,apply:txt,setAccDescription:hc,getAccDescription:uc,hasAtLeastOneBox:Svt,hasAtLeastOneBoxWithTitle:Avt}}),Pxt=t(()=>{rxt=Ae(t=>`.actor { +`+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\->:\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"),(Lvt=new((P.prototype=e).Parser=P)).parser=Lvt,Nvt=Lvt});function Rvt(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}function Dvt(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}function Ovt(){Pvt.records.currentBox=void 0}var Pvt,Bvt,Fvt,$vt,zvt,Uvt,Gvt,qvt,jvt,Yvt,Hvt,Wvt,Vvt,Xvt,Kvt,Zvt,Qvt,Jvt,txt,ext,rxt,nxt,ixt,axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt,fxt,mxt,yxt,vxt,xxt,bxt,wxt,kxt,Txt,_xt,Ext,Cxt,Sxt,Axt,Lxt,Nxt,Ixt,Mxt,Rxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Uxt,Gxt,qxt,jxt,Yxt,Hxt,Wxt,Vxt,Xxt,Kxt=t(()=>{fh(),e(),jpt(),Jl(),gh(),Pvt=new Upt(()=>({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})),Bvt=Ae(function(t){Pvt.records.boxes.push({name:t.text,wrap:t.wrap??rxt(),fill:t.color,actorKeys:[]}),Pvt.records.currentBox=Pvt.records.boxes.slice(-1)[0]},"addBox"),Fvt=Ae(function(t,e,r,n){let i=Pvt.records.currentBox,a=Pvt.records.actors.get(t);if(a){if(Pvt.records.currentBox&&a.box&&Pvt.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 '${Pvt.records.currentBox.name}' at the same time.`);if(i=a.box||Pvt.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}),Pvt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??rxt(),prevActor:Pvt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),Pvt.records.prevActor&&(e=Pvt.records.actors.get(Pvt.records.prevActor))&&(e.nextActor=t),Pvt.records.currentBox&&Pvt.records.currentBox.actorKeys.push(t),Pvt.records.prevActor=t},"addActor"),$vt=Ae(t=>{let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;return Pvt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??rxt(),type:n,activate:i}),!0},"addSignal"),Gvt=Ae(function(){return 0t.name)},"hasAtLeastOneBoxWithTitle"),jvt=Ae(function(){return Pvt.records.messages},"getMessages"),Yvt=Ae(function(){return Pvt.records.boxes},"getBoxes"),Hvt=Ae(function(){return Pvt.records.actors},"getActors"),Wvt=Ae(function(){return Pvt.records.createdActors},"getCreatedActors"),Vvt=Ae(function(){return Pvt.records.destroyedActors},"getDestroyedActors"),Xvt=Ae(function(t){return Pvt.records.actors.get(t)},"getActor"),Kvt=Ae(function(){return[...Pvt.records.actors.keys()]},"getActorKeys"),Zvt=Ae(function(){Pvt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),Qvt=Ae(function(){Pvt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),Jvt=Ae(()=>Pvt.records.sequenceNumbersEnabled,"showSequenceNumbers"),txt=Ae(function(t){Pvt.records.wrapEnabled=t},"setWrap"),ext=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"),rxt=Ae(()=>void 0!==Pvt.records.wrapEnabled?Pvt.records.wrapEnabled:D().sequence?.wrap??!1,"autoWrap"),nxt=Ae(function(){Pvt.reset(),oc()},"clear"),ixt=Ae(function(t){var t=t.trim(),{wrap:t,cleanedText:e}=ext(t),e={text:e,wrap:t};return R.debug("parseMessage: "+JSON.stringify(e)),e},"parseMessage"),axt=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}=ext(n);return{text:t?Cl(t,D()):void 0,color:r,wrap:i}},"parseBoxData"),sxt={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},oxt={FILLED:0,OPEN:1},lxt={LEFTOF:0,RIGHTOF:1,OVER:2},cxt=Ae(function(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??rxt()},t=[].concat(t,t);Pvt.records.notes.push(n),Pvt.records.messages.push({from:t[0],to:t[1],message:r.text,wrap:r.wrap??rxt(),type:sxt.NOTE,placement:e})},"addNote"),hxt=Ae(function(e,r){e=Xvt(e);try{let t=Cl(r.text,D());t=(t=t.replace(/&/g,"&")).replace(/=/g,"="),Rvt(e,JSON.parse(t))}catch(t){R.error("error while parsing actor link text",t)}},"addLinks"),uxt=Ae(function(a,s){a=Xvt(a);try{let t={},e=Cl(s.text,D()),r=e.indexOf("@"),n=(e=(e=e.replace(/&/g,"&")).replace(/=/g,"=")).slice(0,r-1).trim(),i=e.slice(r+1).trim();t[n]=i,Rvt(a,t)}catch(t){R.error("error while parsing actor link text",t)}},"addALink"),Ae(Rvt,"insertLinks"),dxt=Ae(function(t,e){t=Xvt(t);try{var r=Cl(e.text,D());Dvt(t,JSON.parse(r))}catch(t){R.error("error while parsing actor properties text",t)}},"addProperties"),Ae(Dvt,"insertProperties"),Ae(Ovt,"boxEnd"),pxt=Ae(function(t,e){t=Xvt(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&Dvt(t,n.properties),n.links&&Rvt(t,n.links)}catch(t){R.error("error while parsing actor details text",t)}},"addDetails"),gxt=Ae(function(t,e){if(void 0!==t?.properties)return t.properties[e]},"getActorProperty"),fxt=Ae(function(t){if(Array.isArray(t))t.forEach(function(t){fxt(t)});else switch(t.type){case"sequenceIndex":Pvt.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":Fvt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(Pvt.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");Pvt.records.lastCreated=t.actor,Fvt(t.actor,t.actor,t.description,t.draw),Pvt.records.createdActors.set(t.actor,Pvt.records.messages.length);break;case"destroyParticipant":Pvt.records.lastDestroyed=t.actor,Pvt.records.destroyedActors.set(t.actor,Pvt.records.messages.length);break;case"activeStart":case"activeEnd":Uvt(t.actor,void 0,void 0,t.signalType);break;case"addNote":cxt(t.actor,t.placement,t.text);break;case"addLinks":hxt(t.actor,t.text);break;case"addALink":uxt(t.actor,t.text);break;case"addProperties":dxt(t.actor,t.text);break;case"addDetails":pxt(t.actor,t.text);break;case"addMessage":if(Pvt.records.lastCreated){if(t.to!==Pvt.records.lastCreated)throw new Error("The created participant "+Pvt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");Pvt.records.lastCreated=void 0}else if(Pvt.records.lastDestroyed){if(t.to!==Pvt.records.lastDestroyed&&t.from!==Pvt.records.lastDestroyed)throw new Error("The destroyed participant "+Pvt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");Pvt.records.lastDestroyed=void 0}Uvt(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":Bvt(t.boxData);break;case"boxEnd":Ovt();break;case"loopStart":Uvt(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Uvt(void 0,void 0,void 0,t.signalType);break;case"rectStart":Uvt(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Uvt(void 0,void 0,void 0,t.signalType);break;case"optStart":Uvt(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Uvt(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":Uvt(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Uvt(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":lc(t.text);break;case"parStart":case"and":Uvt(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Uvt(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Uvt(void 0,void 0,t.criticalText,t.signalType);break;case"option":Uvt(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Uvt(void 0,void 0,void 0,t.signalType);break;case"breakStart":Uvt(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Uvt(void 0,void 0,void 0,t.signalType)}},"apply"),mxt={addActor:Fvt,addMessage:zvt,addSignal:Uvt,addLinks:hxt,addDetails:pxt,addProperties:dxt,autoWrap:rxt,setWrap:txt,enableSequenceNumbers:Zvt,disableSequenceNumbers:Qvt,showSequenceNumbers:Jvt,getMessages:jvt,getActors:Hvt,getCreatedActors:Wvt,getDestroyedActors:Vvt,getActor:Xvt,getActorKeys:Kvt,getActorProperty:gxt,getAccTitle:cc,getBoxes:Yvt,getDiagramTitle:pc,setDiagramTitle:dc,getConfig:Ae(()=>D().sequence,"getConfig"),clear:nxt,parseMessage:ixt,parseBoxData:axt,LINETYPE:sxt,ARROWTYPE:oxt,PLACEMENT:lxt,addNote:cxt,setAccTitle:lc,apply:fxt,setAccDescription:hc,getAccDescription:uc,hasAtLeastOneBox:Gvt,hasAtLeastOneBoxWithTitle:qvt}}),Zxt=t(()=>{yxt=Ae(t=>`.actor { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } @@ -1308,12 +1308,12 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.actorBkg}; stroke-width: 2px; } -`,"getStyles"),nxt=rxt}),Bxt=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;tr?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,ixt.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),Rxt(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"),cxt=Ae(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),hxt=Ae(async function(n,i,a=null){var o=n.append("foreignObject"),s=await Yl(i.text,Mr()),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"),uxt=Ae(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,o]=Y8(e.fontSize),s=[],l=0,c=Ae(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0Math.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||w8;(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{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"),fxt=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||(pxt++,Object.keys(e.links||{}).length&&!r.forceMenus&&s.attr("onclick",cxt(`actor${pxt}_popup`)).attr("cursor","pointer"),s.append("line").attr("id","actor"+pxt).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=pxt,null!=e.links&&s.attr("id","root-"+pxt)),k3()),a="actor",t=(e.properties?.class?a=e.properties.class:o.fill="#eaeaea",a+=n?" "+oxt:" 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,sxt(s,o));e.rectData=o,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?w3(s,o.x+o.width-20,o.y+10,n.substr(1)):b3(s,o.x+o.width-20,o.y+10,n)),Mxt(r,Ul(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"),mxt=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||(pxt++,s.append("line").attr("id","actor"+pxt).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=pxt),t.append("g")),c="actor-man";return l.attr("class",c+=n?" "+oxt:" actor-top"),l.attr("name",e.name),(s=k3()).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"+pxt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+pxt).attr("x1",a-axt/2).attr("y1",i+33).attr("x2",a+axt/2).attr("y2",i+33),l.append("line").attr("x1",a-axt/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+axt/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,Mxt(r,Ul(e.description))(e.description,l,s.x,s.y+35,s.width,s.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),yxt=Ae(async function(t,e,r,n){switch(e.type){case"actor":return mxt(t,e,r,n);case"participant":return fxt(t,e,r,n)}},"drawActor"),vxt=Ae(function(t,e,r){t=t.append("g"),kxt(t,e),e.name&&Mxt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),xxt=Ae(function(t){return t.append("g")},"anchorElement"),bxt=Ae(function(t,e,r,n,i){var a=k3(),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,sxt(o,a)},"drawActivation"),wxt=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")}),T3());p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=s||50,p.height=o||20,p.textMargin=a,p.class="labelText",dxt(u,p),(p=Nxt()).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=Ul(p.text)?await hxt(u,p,e):uxt(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,Ul(p.text)?(e.starty=e.sections[f].y,await hxt(u,p,e)):uxt(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"),kxt=Ae(function(t,e){v3(t,e)},"drawBackgroundRect"),Txt=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"),Ext=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"),_xt=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"),Cxt=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"),Sxt=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"),Axt=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"),Lxt=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"),Nxt=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"),Ixt=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"),Mxt=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"),Rxt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Dxt={drawRect:sxt,drawText:uxt,drawLabel:dxt,drawActor:yxt,drawBox:vxt,drawPopup:lxt,anchorElement:xxt,drawActivation:bxt,drawLoop:wxt,drawBackgroundRect:kxt,insertArrowHead:Cxt,insertArrowFilledHead:Sxt,insertSequenceNumber:Axt,insertArrowCrossHead:Lxt,insertDatabaseIcon:Txt,insertComputerIcon:Ext,insertClockIcon:_xt,getTextObj:Nxt,getNoteRect:Ixt,fixLifeLineHeights:gxt,sanitizeUrl:ixt.sanitizeUrl}});async function Fxt(t,e){B.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,o=Ul(i),i=o?await ql(i,D()):j8.calculateTextDimensions(i,Yxt(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 $xt(t,e,r,n,i){B.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Yxt(P),e.message=j8.wrapLabel(`[${e.message}]`,r-2*P.wrapPadding,t),e.width=r,e.wrap=!0,r=j8.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 zxt(r,n,t,e,i,a,o){function s(t,e){t.x{var e=Yxt(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=j8.wrapLabel(t.name,r-2*P.wrapPadding,e)),j8.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*P.wrapPadding));t.margin=P.boxTextMargin,rt.textMaxHeight=c),L.getMax(r,P.height)}var P,B,qxt,Yxt,jxt,Hxt,Wxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,nbt,ibt,abt,obt=t(()=>{Z3(),Bxt(),e(),Jl(),t5(),fh(),jr(),X8(),tc(),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,Zxt(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=Qxt(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:Dxt.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")},qxt=Ae(async function(t,e){B.bumpVerticalPos(P.boxMargin),e.height=P.boxMargin,e.starty=B.getVerticalPos();var r=k3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||P.width,r.class="note",t.append("g")),n=Dxt.drawRect(t,r),t=((i=T3()).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",Ul(i.text)?await hxt(t,i):uxt(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"),Yxt=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),jxt=Ae(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Hxt=Ae(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),Ae(Fxt,"boundMessage"),Wxt=Ae(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:o,type:s,sequenceIndex:l,sequenceVisible:c}=e,h=j8.calculateTextDimensions(o,Yxt(P)),u=T3();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,Ul(u.text)?await hxt(t,u,{startx:e,stopx:i,starty:r}):uxt(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"),Vxt=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"),Xxt=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 Dxt.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 Dxt.drawActor(e,a,P,!1)},"drawActors"),Kxt=Ae(function(t,e,r,n){let i=0,a=0;for(var o of r){var o=e.get(o),s=ebt(o);(s=Dxt.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"),Zxt=Ae(function(t){ie(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"),Qxt=Ae(function(e){return B.activations.filter(function(t){return t.actor===e})},"actorActivations"),Jxt=Ae(function(t,e){return e=e.get(t),[(t=Qxt(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($xt,"adjustLoopHeightForWrap"),Ae(zxt,"adjustCreatedDestroyedData"),tbt=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 Gxt(c,g,i);if(P.height=await Uxt(c,v,d),Dxt.insertComputerIcon(l),Dxt.insertDatabaseIcon(l),Dxt.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))}Vxt(l,c,h,p,0,g,!1);var x,b,w,k=await ibt(g,c,v,i);function T(t,e){var r=B.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Dxt.drawActivation(l,r,e,P,Qxt(t.from).length),B.insert(r.startx,e-10,r.stopx,e)}Dxt.insertArrowHead(l),Dxt.insertArrowCrossHead(l),Dxt.insertArrowFilledHead(l),Dxt.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 qxt(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:$xt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=B.endLoop(),await Dxt.drawLoop(l,t,"loop",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:$xt(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:$xt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=B.endLoop(),await Dxt.drawLoop(l,t,"opt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:$xt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:$xt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=B.endLoop(),await Dxt.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:$xt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t)),B.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:$xt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=B.endLoop(),await Dxt.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:$xt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:$xt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=B.endLoop(),await Dxt.drawLoop(l,t,"critical",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:$xt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=B.endLoop(),await Dxt.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 Fxt(l,r);zxt(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 Xxt(l,c,p,!1);for(b of C)await Wxt(l,b.messageModel,b.lineStartY,i);P.mirrorActors&&await Xxt(l,c,p,!0),S.forEach(t=>Dxt.drawBackgroundRect(l,t)),gxt(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)",Dxt.drawBox(l,w,P);m&&B.bumpVerticalPos(P.boxMargin),r=Kxt(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=(Ns?-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=j8.wrapLabel(t.message,L.getMax(r+2*P.wrapPadding,P.width),Yxt(P))),j8.calculateTextDimensions(t.message,Yxt(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"),ibt=Ae(async function(t,n,e,i){let a={},o=[],s,l,c;for(let r of t){switch(r.id=j8.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=Qxt(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 rbt(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=nbt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0{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"),abt={bounds:B,drawActors:Xxt,drawActorsPopup:Kxt,setConf:Zxt,draw:tbt}}),sbt={};_Bt(sbt,{diagram:()=>lbt});var lbt,cbt,hbt,ubt,dbt,pbt,gbt,fbt,mbt,ybt,vbt,xbt,bbt,wbt,kbt,Tbt,Ebt,_bt,Cbt,Sbt,Abt,Lbt,Nbt,Ibt,Mbt,Rbt,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=t(()=>{yvt(),Oxt(),Pxt(),obt(),lbt={parser:fvt,db:ext,renderer:abt,styles:nxt,init:Ae(({wrap:t})=>{ext.setWrap(t)},"init")}}),y4t=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,40],Z=[1,74],w=[1,8,9,12,13,22,38,40,43,60,61,62,63,64,65,66,71,73],k=[1,8,9,12,13,17,20,22,38,40,43,47,60,61,62,63,64,65,66,71,73,75,81,96,98,99],T=[13,75,81,96,98,99],E=[13,65,66,75,81,96,98,99],Q=[13,60,61,62,63,64,75,81,96,98,99],J=[1,94],_=[1,111],C=[1,109],S=[1,103],A=[1,104],L=[1,105],N=[1,106],I=[1,107],M=[1,108],R=[1,110],tt=[1,8,9,38,40,43],D=[1,8,9,22],et=[1,8,9,79],O=[1,8,9,22,74,75,79,81,82,83,84,85,86],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,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,namespaceIdentifier:37,STRUCT_START:38,classStatements:39,STRUCT_STOP:40,NAMESPACE:41,classIdentifier:42,STYLE_SEPARATOR:43,members:44,CLASS:45,ANNOTATION_START:46,ANNOTATION_END:47,MEMBER:48,SEPARATOR:49,relation:50,NOTE_FOR:51,noteText:52,NOTE:53,direction_tb:54,direction_bt:55,direction_rl:56,direction_lr:57,relationType:58,lineType: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:75,stylesOpt:76,CSSCLASS:77,style:78,COMMA:79,styleComponent:80,NUM:81,COLON:82,UNIT:83,SPACE:84,BRKT:85,PCT:86,commentToken:87,textToken:88,graphCodeTokens:89,textNoTagsToken:90,TAGSTART:91,TAGEND:92,"==":93,"--":94,DEFAULT:95,MINUS:96,keywords:97,UNICODE_TEXT:98,BQUOTE_STR:99,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",38:"STRUCT_START",40:"STRUCT_STOP",41:"NAMESPACE",43:"STYLE_SEPARATOR",45:"CLASS",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"MEMBER",49:"SEPARATOR",51:"NOTE_FOR",53:"NOTE",54:"direction_tb",55:"direction_bt",56:"direction_rl",57:"direction_lr",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"STYLE",75:"ALPHA",77:"CSSCLASS",79:"COMMA",81:"NUM",82:"COLON",83:"UNIT",84:"SPACE",85:"BRKT",86:"PCT",89:"graphCodeTokens",91:"TAGSTART",92:"TAGEND",93:"==",94:"--",95:"DEFAULT",96:"MINUS",97:"keywords",98:"UNICODE_TEXT",99:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[37,2],[39,1],[39,2],[39,3],[24,1],[24,3],[24,4],[24,6],[42,2],[42,3],[26,4],[44,1],[44,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,1],[31,1],[31,1],[31,1],[50,3],[50,2],[50,2],[50,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[76,1],[76,3],[78,1],[78,2],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[87,1],[87,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[90,1],[90,1],[90,1],[90,1],[16,1],[16,1],[16,1],[16,1],[19,1],[52,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 12:case 14:this.$=a[s];break;case 10:case 13:this.$=a[s-2]+"."+a[s];break;case 11:case 15:this.$=a[s-1]+a[s];break;case 16:case 17:this.$=a[s-1]+"~"+a[s]+"~";break;case 18:n.addRelation(a[s]);break;case 19:a[s-1].title=n.cleanupLabel(a[s]),n.addRelation(a[s-1]);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:n.addClassesToNamespace(a[s-3],a[s-1]);break;case 33:n.addClassesToNamespace(a[s-4],a[s-1]);break;case 34:this.$=a[s],n.addNamespace(a[s]);break;case 35:this.$=[a[s]];break;case 36:this.$=[a[s-1]];break;case 37:a[s].unshift(a[s-2]),this.$=a[s];break;case 39:n.setCssClass(a[s-2],a[s]);break;case 40:n.addMembers(a[s-3],a[s-1]);break;case 41:n.setCssClass(a[s-5],a[s-3]),n.addMembers(a[s-5],a[s-1]);break;case 42:this.$=a[s],n.addClass(a[s]);break;case 43:this.$=a[s-1],n.addClass(a[s-1]),n.setClassLabel(a[s-1],a[s]);break;case 44:n.addAnnotation(a[s],a[s-2]);break;case 45:this.$=[a[s]];break;case 46:a[s].push(a[s-1]),this.$=a[s];break;case 47:break;case 48:n.addMember(a[s-1],n.cleanupLabel(a[s]));break;case 49:case 50:break;case 51:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 52:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 53:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 54:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 55:n.addNote(a[s],a[s-1]);break;case 56:n.addNote(a[s]);break;case 57:n.setDirection("TB");break;case 58:n.setDirection("BT");break;case 59:n.setDirection("RL");break;case 60:n.setDirection("LR");break;case 61:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 62:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 63:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 64:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 65:this.$=n.relationType.AGGREGATION;break;case 66:this.$=n.relationType.EXTENSION;break;case 67:this.$=n.relationType.COMPOSITION;break;case 68:this.$=n.relationType.DEPENDENCY;break;case 69:this.$=n.relationType.LOLLIPOP;break;case 70:this.$=n.lineType.LINE;break;case 71:this.$=n.lineType.DOTTED_LINE;break;case 72:case 78:this.$=a[s-2],n.setClickEvent(a[s-1],a[s]);break;case 73:case 79:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1]),n.setTooltip(a[s-2],a[s]);break;case 74:this.$=a[s-2],n.setLink(a[s-1],a[s]);break;case 75:this.$=a[s-3],n.setLink(a[s-2],a[s-1],a[s]);break;case 76:this.$=a[s-3],n.setLink(a[s-2],a[s-1]),n.setTooltip(a[s-2],a[s]);break;case 77:this.$=a[s-4],n.setLink(a[s-3],a[s-2],a[s]),n.setTooltip(a[s-3],a[s-1]);break;case 80:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 81:this.$=a[s-4],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setTooltip(a[s-3],a[s]);break;case 82:this.$=a[s-3],n.setLink(a[s-2],a[s]);break;case 83:this.$=a[s-4],n.setLink(a[s-3],a[s-1],a[s]);break;case 84:this.$=a[s-4],n.setLink(a[s-3],a[s-1]),n.setTooltip(a[s-3],a[s]);break;case 85:this.$=a[s-5],n.setLink(a[s-4],a[s-2],a[s]),n.setTooltip(a[s-4],a[s-1]);break;case 86:this.$=a[s-2],n.setCssStyle(a[s-1],a[s]);break;case 87:n.setCssClass(a[s-1],a[s]);break;case 88:this.$=[a[s]];break;case 89:a[s-2].push(a[s]),this.$=a[s-2];break;case 91:this.$=a[s-1]+a[s]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,18:20,19:38,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:r,34:n,36:i,37:21,41:a,42:22,45:o,46:s,48:l,49:P,51:B,53:F,54:$,55:z,56:G,57:U,67:q,68:Y,70:j,74:H,75:c,77:W,81:h,96:u,98:d,99: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,18],{22:[1,48]}),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),{33:[1,49]},{35:[1,50]},e(g,[2,31]),e(g,[2,47],{50:51,58:54,59:55,13:[1,52],22:[1,53],60:f,61:m,62:y,63:v,64:x,65:X,66:K}),{38:[1,63]},e(b,[2,38],{38:[1,65],43:[1,64]}),e(g,[2,49]),e(g,[2,50]),{16:66,75:c,81:h,96:u,98:d},{16:37,18:67,19:38,75:c,81:h,96:u,98:d,99:p},{16:37,18:68,19:38,75:c,81:h,96:u,98:d,99:p},{16:37,18:69,19:38,75:c,81:h,96:u,98:d,99:p},{75:[1,70]},{13:[1,71]},{16:37,18:72,19:38,75:c,81:h,96:u,98:d,99:p},{13:Z,52:73},e(g,[2,57]),e(g,[2,58]),e(g,[2,59]),e(g,[2,60]),e(w,[2,12],{16:37,19:38,18:76,17:[1,75],20:[1,77],75:c,81:h,96:u,98:d,99:p}),e(w,[2,14],{20:[1,78]}),{15:79,16:80,75:c,81:h,96:u,98:d},{16:37,18:81,19:38,75:c,81:h,96:u,98:d,99:p},e(k,[2,114]),e(k,[2,115]),e(k,[2,116]),e(k,[2,117]),e([1,8,9,12,13,20,22,38,40,43,60,61,62,63,64,65,66,71,73],[2,118]),e(V,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,18:20,37:21,42:22,16:37,19:38,5:82,32:r,34:n,36:i,41:a,45:o,46:s,48:l,49:P,51:B,53:F,54:$,55:z,56:G,57:U,67:q,68:Y,70:j,74:H,75:c,77:W,81:h,96:u,98:d,99:p}),{5:83,10:5,16:37,18:20,19:38,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:r,34:n,36:i,37:21,41:a,42:22,45:o,46:s,48:l,49:P,51:B,53:F,54:$,55:z,56:G,57:U,67:q,68:Y,70:j,74:H,75:c,77:W,81:h,96:u,98:d,99:p},e(g,[2,19]),e(g,[2,29]),e(g,[2,30]),{13:[1,85],16:37,18:84,19:38,75:c,81:h,96:u,98:d,99:p},{50:86,58:54,59:55,60:f,61:m,62:y,63:v,64:x,65:X,66:K},e(g,[2,48]),{59:87,65:X,66:K},e(T,[2,64],{58:88,60:f,61:m,62:y,63:v,64:x}),e(E,[2,65]),e(E,[2,66]),e(E,[2,67]),e(E,[2,68]),e(E,[2,69]),e(Q,[2,70]),e(Q,[2,71]),{8:[1,90],24:91,39:89,42:22,45:o},{16:92,75:c,81:h,96:u,98:d},{44:93,48:J},{47:[1,95]},{13:[1,96]},{13:[1,97]},{71:[1,98],73:[1,99]},{22:_,74:C,75:S,76:100,78:101,80:102,81:A,82:L,83:N,84:I,85:M,86:R},{75:[1,112]},{13:Z,52:113},e(g,[2,56]),e(g,[2,119]),{16:37,18:114,19:38,75:c,81:h,96:u,98:d,99:p},e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),{38:[2,34]},{15:116,16:80,17:[1,115],38:[2,9],75:c,81:h,96:u,98:d},e(tt,[2,42],{11:117,12:[1,118]}),e(V,[2,7]),{9:[1,119]},e(D,[2,51]),{16:37,18:120,19:38,75:c,81:h,96:u,98:d,99:p},{13:[1,122],16:37,18:121,19:38,75:c,81:h,96:u,98:d,99:p},e(T,[2,63],{58:123,60:f,61:m,62:y,63:v,64:x}),e(T,[2,62]),{40:[1,124]},{24:91,39:125,42:22,45:o},{8:[1,126],40:[2,35]},e(b,[2,39],{38:[1,127]}),{40:[1,128]},{40:[2,45],44:129,48:J},{16:37,18:130,19:38,75:c,81:h,96:u,98:d,99:p},e(g,[2,72],{13:[1,131]}),e(g,[2,74],{13:[1,133],69:[1,132]}),e(g,[2,78],{13:[1,134],72:[1,135]}),{13:[1,136]},e(g,[2,86],{79:[1,137]}),e(et,[2,88],{80:138,22:_,74:C,75:S,81:A,82:L,83:N,84:I,85:M,86:R}),e(O,[2,90]),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(O,[2,99]),e(O,[2,100]),e(g,[2,87]),e(g,[2,55]),e(w,[2,13]),{15:139,16:80,75:c,81:h,96:u,98:d},{38:[2,11]},e(tt,[2,43]),{13:[1,140]},{1:[2,4]},e(D,[2,53]),e(D,[2,52]),{16:37,18:141,19:38,75:c,81:h,96:u,98:d,99:p},e(T,[2,61]),e(g,[2,32]),{40:[1,142]},{24:91,39:143,40:[2,36],42:22,45:o},{44:144,48:J},e(b,[2,40]),{40:[2,46]},e(g,[2,44]),e(g,[2,73]),e(g,[2,75]),e(g,[2,76],{69:[1,145]}),e(g,[2,79]),e(g,[2,80],{13:[1,146]}),e(g,[2,82],{13:[1,148],69:[1,147]}),{22:_,74:C,75:S,78:149,80:102,81:A,82:L,83:N,84:I,85:M,86:R},e(O,[2,91]),{38:[2,10]},{14:[1,150]},e(D,[2,54]),e(g,[2,33]),{40:[2,37]},{40:[1,151]},e(g,[2,77]),e(g,[2,81]),e(g,[2,83]),e(g,[2,84],{69:[1,152]}),e(et,[2,89],{80:138,22:_,74:C,75:S,81:A,82:L,83:N,84:I,85:M,86:R}),e(tt,[2,8]),e(b,[2,41]),e(g,[2,85])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],79:[2,34],116:[2,11],119:[2,4],129:[2,46],139:[2,10],143:[2,37]},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"{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),s)}function l(t,e,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;tr?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,xxt.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),Vxt(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),_xt=Ae(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Ext=Ae(async function(n,i,a=null){var s=n.append("foreignObject"),o=await jl(i.text,Mr()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:t,stopx:e,starty:r}=a;t>e&&(n=t,t=e,e=n),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),Cxt=Ae(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,s]=Y8(e.fontSize),o=[],l=0,c=Ae(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0Math.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!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||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{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"),Nxt=Ae(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t=t.append("g").lower(),s=(n||(Axt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",_xt(`actor${Axt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+Axt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),o=t.append("g"),e.actorCnt=Axt,null!=e.links&&o.attr("id","root-"+Axt)),k3()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=n?" "+wxt:" actor-top",s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,kxt(o,s));e.rectData=s,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?w3(o,s.x+s.width-20,s.y+10,n.substr(1)):b3(o,s.x+s.width-20,s.y+10,n)),Wxt(r,Gl(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(i=t.node().getBBox(),e.height=i.height,l=i.height),l},"drawActorTypeParticipant"),Ixt=Ae(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower(),l=(n||(Axt++,o.append("line").attr("id","actor"+Axt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Axt),t.append("g")),c="actor-man";return l.attr("class",c+=n?" "+wxt:" actor-top"),l.attr("name",e.name),(o=k3()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+Axt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Axt).attr("x1",a-bxt/2).attr("y1",i+33).attr("x2",a+bxt/2).attr("y2",i+33),l.append("line").attr("x1",a-bxt/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+bxt/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,Wxt(r,Gl(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),Mxt=Ae(async function(t,e,r,n){switch(e.type){case"actor":return Ixt(t,e,r,n);case"participant":return Nxt(t,e,r,n)}},"drawActor"),Rxt=Ae(function(t,e,r){t=t.append("g"),Bxt(t,e),e.name&&Wxt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),Dxt=Ae(function(t){return t.append("g")},"anchorElement"),Oxt=Ae(function(t,e,r,n,i){var a=k3(),s=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,kxt(s,a)},"drawActivation"),Pxt=Ae(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,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")}),T3());p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",Sxt(u,p),(p=Yxt()).text=e.title,p.x=e.startx+o/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=Gl(p.text)?await Ext(u,p,e):Cxt(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,Gl(p.text)?(e.starty=e.sections[f].y,await Ext(u,p,e)):Cxt(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"),Bxt=Ae(function(t,e){v3(t,e)},"drawBackgroundRect"),Fxt=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"),$xt=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"),zxt=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"),Uxt=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"),Gxt=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"),qxt=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"),jxt=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"),Yxt=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"),Hxt=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"),Wxt=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"),Vxt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Xxt={drawRect:kxt,drawText:Cxt,drawLabel:Sxt,drawActor:Mxt,drawBox:Rxt,drawPopup:Txt,anchorElement:Dxt,drawActivation:Oxt,drawLoop:Pxt,drawBackgroundRect:Bxt,insertArrowHead:Uxt,insertArrowFilledHead:Gxt,insertSequenceNumber:qxt,insertArrowCrossHead:jxt,insertDatabaseIcon:Fxt,insertComputerIcon:$xt,insertClockIcon:zxt,getTextObj:Yxt,getNoteRect:Hxt,fixLifeLineHeights:Lxt,sanitizeUrl:xxt.sanitizeUrl}});async function Jxt(t,e){B.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,s=Gl(i),i=s?await ql(i,D()):H8.calculateTextDimensions(i,abt(P));s||(s=i.height/a,e.height+=s,B.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=B.getVerticalPos()+l,P.rightAngles||(l+=P.boxMargin,o=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,o=B.getVerticalPos()+l,B.insert(r,o-10,n,o)),B.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,B.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function tbt(t,e,r,n,i){B.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=abt(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 ebt(r,n,t,e,i,a,s){function o(t,e){t.x{var e=abt(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,rt.textMaxHeight=c),L.getMax(r,P.height)}var P,B,ibt,abt,sbt,obt,lbt,cbt,hbt,ubt,dbt,pbt,gbt,fbt,mbt,ybt,vbt,xbt,bbt,wbt=t(()=>{Z3(),Qxt(),e(),Jl(),t5(),fh(),Yr(),K8(),tc(),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,dbt(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,s){let o=this,l=0;function t(r){return Ae(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",i-e*P.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*P.boxMargin,Math.max),o.updateVal(B.data,"startx",n-e*P.boxMargin,Math.min),o.updateVal(B.data,"stopx",a+e*P.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",n-e*P.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*P.boxMargin,Math.max),o.updateVal(B.data,"starty",i-e*P.boxMargin,Math.min),o.updateVal(B.data,"stopy",s+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=pbt(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:Xxt.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")},ibt=Ae(async function(t,e){B.bumpVerticalPos(P.boxMargin),e.height=P.boxMargin,e.starty=B.getVerticalPos();var r=k3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||P.width,r.class="note",t.append("g")),n=Xxt.drawRect(t,r),t=((i=T3()).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",Gl(i.text)?await Ext(t,i):Cxt(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"),abt=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),sbt=Ae(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),obt=Ae(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),Ae(Jxt,"boundMessage"),lbt=Ae(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=H8.calculateTextDimensions(s,abt(P)),u=T3();u.x=e,u.y=a+10,u.width=i-e,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=P.messageFontFamily,u.fontSize=P.messageFontSize,u.fontWeight=P.messageFontWeight,u.anchor=P.messageAlign,u.valign="center",u.textMargin=P.wrapPadding,u.tspan=!1,Gl(u.text)?await Ext(t,u,{startx:e,stopx:i,starty:r}):Cxt(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)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===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"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==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"),cbt=Ae(function(t,e,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=e.get(u)).box;c&&c!=d&&(s||B.models.addBox(c),l+=P.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+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=o+l,u.starty=B.getVerticalPos(),B.insert(u.x,i,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,B.models.addActor(u)}c&&!s&&B.models.addBox(c),B.bumpVerticalPos(h)},"addActorRenderingData"),hbt=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 Xxt.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 Xxt.drawActor(e,a,P,!1)},"drawActors"),ubt=Ae(function(t,e,r,n){let i=0,a=0;for(var s of r){var s=e.get(s),o=mbt(s);(o=Xxt.drawPopup(t,s,o,P,P.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),dbt=Ae(function(t){ie(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"),pbt=Ae(function(e){return B.activations.filter(function(t){return t.actor===e})},"actorActivations"),gbt=Ae(function(t,e){return e=e.get(t),[(t=pbt(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(tbt,"adjustLoopHeightForWrap"),Ae(ebt,"adjustCreatedDestroyedData"),fbt=Ae(async function(n,t,e,i){var{securityLevel:r,sequence:a}=D();P=a;let s;"sandbox"===r&&(s=O("#i"+t));var a=O("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.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 rbt(c,g,i);if(P.height=await nbt(c,v,d),Xxt.insertComputerIcon(l),Xxt.insertDatabaseIcon(l),Xxt.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))}cbt(l,c,h,p,0,g,!1);var x,b,w,k=await xbt(g,c,v,i);function T(t,e){var r=B.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Xxt.drawActivation(l,r,e,P,pbt(t.from).length),B.insert(r.startx,e-10,r.stopx,e)}Xxt.insertArrowHead(l),Xxt.insertArrowCrossHead(l),Xxt.insertArrowFilledHead(l),Xxt.insertSequenceNumber(l),Ae(T,"activeEnd");let _=1,E=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 ibt(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:tbt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=B.endLoop(),await Xxt.drawLoop(l,t,"loop",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:tbt(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:tbt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=B.endLoop(),await Xxt.drawLoop(l,t,"opt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:tbt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:tbt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=B.endLoop(),await Xxt.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:tbt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t)),B.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:tbt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=B.endLoop(),await Xxt.drawLoop(l,t,"par",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:_=x.message.start||_,E=x.message.step||E,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:tbt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:tbt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=B.endLoop(),await Xxt.drawLoop(l,t,"critical",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:tbt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=B.endLoop(),await Xxt.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=_,r.sequenceVisible=i.db.showSequenceNumbers();var L=await Jxt(l,r);ebt(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 hbt(l,c,p,!1);for(b of C)await lbt(l,b.messageModel,b.lineStartY,i);P.mirrorActors&&await hbt(l,c,p,!0),S.forEach(t=>Xxt.drawBackgroundRect(l,t)),Lxt(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)",Xxt.drawBox(l,w,P);m&&B.bumpVerticalPos(P.boxMargin),r=ubt(l,c,p,o),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=(No?-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,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=H8.wrapLabel(t.message,L.getMax(r+2*P.wrapPadding,P.width),abt(P))),H8.calculateTextDimensions(t.message,abt(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"),xbt=Ae(async function(t,n,e,i){let a={},s=[],o,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:s.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&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));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:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=pbt(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 ybt(r,n,i),r.noteModel=l,s.forEach(t=>{(o=t).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-P.labelBoxWidth})):(c=vbt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0{var e;o=t,c.startx===c.stopx?(t=n.get(r.from),e=n.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-P.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-P.labelBoxWidth)}))}return B.activations=[],R.debug("Loop type widths:",a),a},"calculateLoopBounds"),bbt={bounds:B,drawActors:hbt,drawActorsPopup:ubt,setConf:dbt,draw:fbt}}),kbt={};SBt(kbt,{diagram:()=>Tbt});var Tbt,_bt,Ebt,Cbt,Sbt,Abt=t(()=>{Mvt(),Kxt(),Zxt(),wbt(),Tbt={parser:Nvt,db:mxt,renderer:bbt,styles:vxt,init:Ae(({wrap:t})=>{mxt.setWrap(t)},"init")}}),Lbt=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,18],n=[1,19],i=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],F=[1,33],$=[1,34],c=[1,45],z=[1,35],U=[1,36],G=[1,37],q=[1,38],j=[1,27],Y=[1,28],H=[1,29],W=[1,30],V=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],k=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],T=[13,58,84,99,101,102],_=[13,58,71,72,84,99,101,102],J=[13,58,66,67,68,69,70,84,99,101,102],tt=[1,98],E=[1,115],C=[1,107],S=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],M=[1,112],R=[1,114],et=[22,58,59,80,84,85,86,87,88,89],rt=[1,8,9,39,41,44],D=[1,8,9,22],nt=[1,143],it=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],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,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 12:case 14:this.$=a[o];break;case 10:case 13:this.$=a[o-2]+"."+a[o];break;case 11:case 15:this.$=a[o-1]+a[o];break;case 16:case 17:this.$=a[o-1]+"~"+a[o]+"~";break;case 18:n.addRelation(a[o]);break;case 19:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],n.addNamespace(a[o]);break;case 36:this.$=[a[o]];break;case 37:this.$=[a[o-1]];break;case 38:a[o].unshift(a[o-2]),this.$=a[o];break;case 40:n.setCssClass(a[o-2],a[o]);break;case 41:n.addMembers(a[o-3],a[o-1]);break;case 42:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],n.addClass(a[o]);break;case 44:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 45:n.addAnnotation(a[o],a[o-2]);break;case 46:case 59:this.$=[a[o]];break;case 47:a[o].push(a[o-1]),this.$=a[o];break;case 48:break;case 49:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 50:case 51:break;case 52:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 54:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 55:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 56:n.addNote(a[o],a[o-1]);break;case 57:n.addNote(a[o]);break;case 58:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 66:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 67:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 91:n.setCssClass(a[o-1],a[o]);break;case 92:this.$=[a[o]];break;case 93:a[o-2].push(a[o]),this.$=a[o-2];break;case 95:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:U,62:G,63:q,73:j,74:Y,76:H,80:W,81:V,84:h,99:u,101:d,102:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(X,[2,5],{8:[1,48]}),{8:[1,49]},e(g,[2,18],{22:[1,50]}),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),e(g,[2,29]),{34:[1,51]},{36:[1,52]},e(g,[2,32]),e(g,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:f,67:m,68:y,69:v,70:x,71:K,72:Z}),{39:[1,65]},e(b,[2,39],{39:[1,67],44:[1,66]}),e(g,[2,50]),e(g,[2,51]),{16:68,58:c,84:h,99:u,101:d},{16:39,18:69,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:70,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:71,19:40,58:c,84:h,99:u,101:d,102:p},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:c,84:h,99:u,101:d,102:p},{13:Q,53:75},{56:77,58:[1,78]},e(g,[2,61]),e(g,[2,62]),e(g,[2,63]),e(g,[2,64]),e(w,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:c,84:h,99:u,101:d,102:p}),e(w,[2,14],{20:[1,82]}),{15:83,16:84,58:c,84:h,99:u,101:d},{16:39,18:85,19:40,58:c,84:h,99:u,101:d,102:p},e(k,[2,118]),e(k,[2,119]),e(k,[2,120]),e(k,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(X,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:r,35:n,37:i,42:a,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:U,62:G,63:q,73:j,74:Y,76:H,80:W,81:V,84:h,99:u,101:d,102:p}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:U,62:G,63:q,73:j,74:Y,76:H,80:W,81:V,84:h,99:u,101:d,102:p},e(g,[2,19]),e(g,[2,30]),e(g,[2,31]),{13:[1,89],16:39,18:88,19:40,58:c,84:h,99:u,101:d,102:p},{51:90,64:56,65:57,66:f,67:m,68:y,69:v,70:x,71:K,72:Z},e(g,[2,49]),{65:91,71:K,72:Z},e(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),e(_,[2,69]),e(_,[2,70]),e(_,[2,71]),e(_,[2,72]),e(_,[2,73]),e(J,[2,74]),e(J,[2,75]),{8:[1,94],24:95,40:93,43:23,46:s},{16:96,58:c,84:h,99:u,101:d},{45:97,49:tt},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:E,57:104,58:C,80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:M,89:R},{58:[1,116]},{13:Q,53:117},e(g,[2,57]),e(g,[2,123]),{22:E,57:118,58:C,59:[1,119],80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:M,89:R},e(et,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},e(rt,[2,43],{11:123,12:[1,124]}),e(X,[2,7]),{9:[1,125]},e(D,[2,52]),{16:39,18:126,19:40,58:c,84:h,99:u,101:d,102:p},{13:[1,128],16:39,18:127,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),e(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},e(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:tt},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},e(g,[2,76],{13:[1,137]}),e(g,[2,78],{13:[1,139],75:[1,138]}),e(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(g,[2,90],{59:nt}),e(it,[2,92],{83:144,22:E,58:C,80:S,84:A,85:L,86:N,87:I,88:M,89:R}),e(O,[2,94]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(O,[2,99]),e(O,[2,100]),e(O,[2,101]),e(O,[2,102]),e(O,[2,103]),e(O,[2,104]),e(g,[2,91]),e(g,[2,56]),e(g,[2,58],{59:nt}),{58:[1,145]},e(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},e(rt,[2,44]),{13:[1,147]},{1:[2,4]},e(D,[2,54]),e(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,65]),e(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:tt},e(b,[2,41]),{41:[2,47]},e(g,[2,45]),e(g,[2,77]),e(g,[2,79]),e(g,[2,80],{75:[1,152]}),e(g,[2,83]),e(g,[2,84],{13:[1,153]}),e(g,[2,86],{13:[1,155],75:[1,154]}),{22:E,58:C,80:S,82:156,83:106,84:A,85:L,86:N,87:I,88:M,89:R},e(O,[2,95]),e(et,[2,60]),{39:[2,10]},{14:[1,157]},e(D,[2,55]),e(g,[2,34]),{41:[2,38]},{41:[1,158]},e(g,[2,81]),e(g,[2,85]),e(g,[2,87]),e(g,[2,88],{75:[1,159]}),e(it,[2,93],{83:144,22:E,58:C,80:S,84:A,85:L,86:N,87:I,88:M,89:R}),e(rt,[2,8]),e(b,[2,42]),e(g,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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>)/,/^(?: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"),(cbt=new((t.prototype=k).Parser=t)).parser=cbt,hbt=cbt}),v4t=t(()=>{fh(),Jl(),ubt=["#","+","~","-",""],dbt=class{static{Ae(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",e=Cl(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Pl(this.id);"method"===this.memberType&&(t+=`(${Pl(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Pl(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():"",ubt.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),ubt.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""}}}}),x4t=t(()=>{Z3(),e(),fh(),Jl(),X8(),gh(),v4t(),pbt="classId-",gbt=[],fbt=new Map,mbt=[],ybt=0,vbt=new Map,xbt=0,bbt=[],wbt=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),kbt=Ae(function(t){let e=L.sanitizeText(t,D()),r="",n=e;return 0>")?t.annotations.push(wbt(e.substring(2,e.length-2))):0Rbt(e,t)))},"addMembers"),Obt=Ae(function(t,e){e={id:"note"+mbt.length,class:e,text:t},mbt.push(e)},"addNote"),Pbt=Ae(function(t){return t.startsWith(":")&&(t=t.substring(1)),wbt(t.trim())},"cleanupLabel"),Bbt=Ae(function(t,r){t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=pbt+e),(t=fbt.get(e))&&t.cssClasses.push(r)})},"setCssClass"),Fbt=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==e&&(fbt.get(t).tooltip=wbt(e))})},"setTooltip"),$bt=Ae(function(t,e){return(e&&vbt.has(e)?vbt.get(e).classes:fbt).get(t).tooltip},"getTooltip"),zbt=Ae(function(t,r,n){let i=D();t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=pbt+e),(t=fbt.get(e))&&(t.link=j8.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?wbt(n):"_blank")}),Bbt(t,"clickable")},"setLink"),Gbt=Ae(function(t,e,r){t.split(",").forEach(function(t){Ubt(t,e,r),fbt.get(t).haveCallback=!0}),Bbt(t,"clickable")},"setClickEvent"),Ubt=Ae(function(t,n,i){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==n&&fbt.has(t)){let e=_bt(t),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),bbt.push(Hbt),Wbt="TB",Vbt=Ae(()=>Wbt,"getDirection"),Xbt=Ae(t=>{Wbt=t},"setDirection"),Kbt=Ae(function(t){vbt.has(t)||(vbt.set(t,{id:t,classes:new Map,children:{},domId:pbt+t+"-"+xbt}),xbt++)},"addNamespace"),Zbt=Ae(function(t){return vbt.get(t)},"getNamespace"),Qbt=Ae(function(){return vbt},"getNamespaces"),Jbt=Ae(function(t,e){if(vbt.has(t))for(var r of e)r=kbt(r).className,fbt.get(r).parent=t,vbt.get(t).classes.set(r,fbt.get(r))},"addClassesToNamespace"),t4t=Ae(function(t,e){var r=fbt.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),e4t={setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,setAccDescription:hc,getConfig:Ae(()=>D().class,"getConfig"),addClass:Ebt,bindFunctions:qbt,clear:Cbt,getClass:Sbt,getClasses:Abt,getNotes:Nbt,addAnnotation:Mbt,addNote:Obt,getRelations:Lbt,addRelation:Ibt,getDirection:Vbt,setDirection:Xbt,addMember:Rbt,addMembers:Dbt,cleanupLabel:Pbt,lineType:Ybt,relationType:jbt,setClickEvent:Gbt,setCssClass:Bbt,setLink:zbt,getTooltip:$bt,setTooltip:Fbt,lookUpDomId:_bt,setDiagramTitle:dc,getDiagramTitle:pc,setClassLabel:Tbt,addNamespace:Kbt,addClassesToNamespace:Jbt,getNamespace:Zbt,getNamespaces:Qbt,setCssStyle:t4t}}),b4t=t(()=>{r4t=Ae(t=>`g.classGroup 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>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};k.lexer=r,Ae(t,"Parser"),(_bt=new((t.prototype=k).Parser=t)).parser=_bt,Ebt=_bt}),Nbt=t(()=>{fh(),Jl(),Cbt=["#","+","~","-",""],Sbt=class{static{Ae(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="",e=Cl(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Pl(this.id);"method"===this.memberType&&(t+=`(${Pl(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Pl(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(i=r[1]?r[1].trim():"",Cbt.includes(i)&&(this.visibility=i),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(e=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,i=t.substring(0,1),n=t.substring(r-1),Cbt.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,n,i=(this.visibility?"\\"+this.visibility:"")+Pl(this.id)+("method"===this.memberType?`(${Pl(this.parameters)})`+(this.returnType?" : "+Pl(this.returnType):""):"");this.text=i.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}});function Ibt(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 Mbt,Rbt,Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,Ubt,Gbt,qbt,jbt,Ybt,Hbt,Wbt,Vbt,Xbt,Kbt,Zbt,Qbt,Jbt,t4t,e4t,r4t,n4t,i4t,a4t,s4t,o4t,l4t,c4t,h4t,u4t,d4t,p4t,g4t,f4t,m4t,y4t,v4t,x4t,b4t,w4t,k4t,T4t,_4t,E4t,C4t,S4t,A4t,L4t,N4t,I4t,M4t=t(()=>{Z3(),e(),fh(),Jl(),K8(),gh(),Nbt(),Mbt="classId-",Rbt=[],Dbt=new Map,Obt=new Map,Pbt=[],Bbt=[],Fbt=0,$bt=new Map,zbt=0,Ubt=[],Gbt=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),qbt=Ae(function(t){let e=L.sanitizeText(t,D()),r="",n=e;return 0`:"")},"setClassLabel"),Ybt=Ae(function(t){var t=L.sanitizeText(t,D()),{className:t,type:e}=qbt(t);Dbt.has(t)||(t=L.sanitizeText(t,D()),Dbt.set(t,{id:t,type:e,label:t,text:t+(e?`<${e}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Mbt+t+"-"+Fbt}),Fbt++)},"addClass"),Hbt=Ae(function(t,e){t={id:"interface"+Bbt.length,label:t,classId:e},Bbt.push(t)},"addInterface"),Wbt=Ae(function(t){if(t=L.sanitizeText(t,D()),Dbt.has(t))return Dbt.get(t).domId;throw new Error("Class not found: "+t)},"lookUpDomId"),Vbt=Ae(function(){Rbt=[],Dbt=new Map,Pbt=[],Bbt=[],(Ubt=[]).push(f4t),$bt=new Map,zbt=0,m4t="TB",oc()},"clear"),Xbt=Ae(function(t){return Dbt.get(t)},"getClass"),Kbt=Ae(function(){return Dbt},"getClasses"),Zbt=Ae(function(){return Rbt},"getRelations"),Qbt=Ae(function(){return Pbt},"getNotes"),Jbt=Ae(function(t){R.debug("Adding relation: "+JSON.stringify(t));var e=[g4t.LOLLIPOP,g4t.AGGREGATION,g4t.COMPOSITION,g4t.DEPENDENCY,g4t.EXTENSION];t.relation.type1!==g4t.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==g4t.LOLLIPOP||e.includes(t.relation.type1)?(Ybt(t.id1),Ybt(t.id2)):(Ybt(t.id1),Hbt(t.id2,t.id1),t.id2="interface"+(Bbt.length-1)):(Ybt(t.id2),Hbt(t.id1,t.id2),t.id1="interface"+(Bbt.length-1)),t.id1=qbt(t.id1).className,t.id2=qbt(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),D()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),D()),Rbt.push(t)},"addRelation"),t4t=Ae(function(t,e){t=qbt(t).className,Dbt.get(t).annotations.push(e)},"addAnnotation"),e4t=Ae(function(t,e){Ybt(t),t=qbt(t).className,t=Dbt.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(Gbt(e.substring(2,e.length-2))):0e4t(e,t)))},"addMembers"),n4t=Ae(function(t,e){e={id:"note"+Pbt.length,class:e,text:t},Pbt.push(e)},"addNote"),i4t=Ae(function(t){return t.startsWith(":")&&(t=t.substring(1)),Gbt(t.trim())},"cleanupLabel"),a4t=Ae(function(t,r){t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=Mbt+e),(t=Dbt.get(e))&&(t.cssClasses+=" "+r)})},"setCssClass"),s4t=Ae(function(t,n){for(let e of t){let r=Obt.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},Obt.set(e,r)),n&&n.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),Dbt.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...n.flatMap(t=>t.split(",")))})}},"defineClass"),o4t=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==e&&(Dbt.get(t).tooltip=Gbt(e))})},"setTooltip"),l4t=Ae(function(t,e){return(e&&$bt.has(e)?$bt.get(e).classes:Dbt).get(t).tooltip},"getTooltip"),c4t=Ae(function(t,r,n){let i=D();t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=Mbt+e),(t=Dbt.get(e))&&(t.link=H8.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?Gbt(n):"_blank")}),a4t(t,"clickable")},"setLink"),h4t=Ae(function(t,e,r){t.split(",").forEach(function(t){u4t(t,e,r),Dbt.get(t).haveCallback=!0}),a4t(t,"clickable")},"setClickEvent"),u4t=Ae(function(t,n,i){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==n&&Dbt.has(t)){let e=Wbt(t),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),Ubt.push(f4t),m4t="TB",y4t=Ae(()=>m4t,"getDirection"),v4t=Ae(t=>{m4t=t},"setDirection"),x4t=Ae(function(t){$bt.has(t)||($bt.set(t,{id:t,classes:new Map,children:{},domId:Mbt+t+"-"+zbt}),zbt++)},"addNamespace"),b4t=Ae(function(t){return $bt.get(t)},"getNamespace"),w4t=Ae(function(){return $bt},"getNamespaces"),k4t=Ae(function(t,e){if($bt.has(t))for(var r of e)r=qbt(r).className,Dbt.get(r).parent=t,$bt.get(t).classes.set(r,Dbt.get(r))},"addClassesToNamespace"),T4t=Ae(function(t,e){var r=Dbt.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),Ae(Ibt,"getArrowMarker"),_4t=Ae(()=>{var t,e,r,n,i,a=[],s=[],o=D();for(t of $bt.keys()){var l=$bt.get(t);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(e of Dbt.keys()){var c,h=Dbt.get(e);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of Pbt){u++;var d={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look};a.push(d),(d=Dbt.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(n of Bbt){var p={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(i of Rbt){u++;var g={id:X8(i.id1,i.id2,{prefix:"id",counter:u}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:Ibt(i.relation.type1),arrowTypeEnd:Ibt(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:y4t()}},"getData"),E4t={setAccTitle:lc,getAccTitle:cc,getAccDescription:uc,setAccDescription:hc,getConfig:Ae(()=>D().class,"getConfig"),addClass:Ybt,bindFunctions:d4t,clear:Vbt,getClass:Xbt,getClasses:Kbt,getNotes:Qbt,addAnnotation:t4t,addNote:n4t,getRelations:Zbt,addRelation:Jbt,getDirection:y4t,setDirection:v4t,addMember:e4t,addMembers:r4t,cleanupLabel:i4t,lineType:p4t,relationType:g4t,setClickEvent:h4t,setCssClass:a4t,defineClass:s4t,setLink:c4t,getTooltip:l4t,setTooltip:o4t,lookUpDomId:Wbt,setDiagramTitle:dc,getDiagramTitle:pc,setClassLabel:jbt,addNamespace:x4t,addClassesToNamespace:k4t,getNamespace:b4t,getNamespaces:w4t,setCssStyle:T4t,getData:_4t}}),R4t=t(()=>{C4t=Ae(t=>`g.classGroup text { fill: ${t.nodeBorder||t.classText}; stroke: none; font-family: ${t.fontFamily}; @@ -1334,6 +1334,10 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .label text { fill: ${t.classText}; } + +.labelBkg { + background: ${t.mainBkg}; +} .edgeLabel .label span { background: ${t.mainBkg}; } @@ -1467,17 +1471,12 @@ g.classGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),n4t=r4t}),w4t=t(()=>{Z3(),X8(),e(),Jl(),i4t=0,a4t=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=Xb().x(function(t){return t.x}).y(function(t){return t.y}).curve(u4),l=t.append("path").attr("d",s(o)).attr("id","edge"+i4t).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=j8.calcLabelPosition(e.points)).x,d=d.y;let p,g,f,m;a%2!=0&&1"),e},"getClassTitleString"),l4t=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"),c4t=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"),h4t={getClassTitleString:s4t,drawClass:o4t,drawEdge:a4t,drawNote:l4t}}),k4t=t(()=>{Z3(),MV(),xj(),e(),w4t(),tc(),fh(),u4t={},d4t=Ae(function(e){var t=Object.entries(u4t).find(t=>t[1].label===e);if(t)return t[0]},"getGraphId"),p4t=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"),g4t=Ae(function(t,e,r,n){let i=D().class,a=(u4t={},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=(p4t(l),new yj({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=h4t.drawClass(l,d,i,n),u4t[d.id]=d,c.setNode(d.id,d),R.info("Org height: "+d.height);n.db.getRelations().forEach(function(t){R.info("tjoho"+d4t(t.id1)+d4t(t.id2)+JSON.stringify(t)),c.setEdge(d4t(t.id1),d4t(t.id2),{relation:t},t.title||"DEFAULT")}),n.db.getNotes().forEach(function(t){R.debug("Adding note: "+JSON.stringify(t));var e=h4t.drawNote(l,t,i,n);u4t[e.id]=e,c.setNode(e.id,e),t.class&&h.has(t.class)&&c.setEdge(t.id,d4t(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),aV(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))),h4t.drawEdge(l,c.edge(t),c.edge(t).relation,i,n))});var e=(t=l.node().getBBox()).width+40,p=t.height+40,t=(Wl(l,p,e,i.useMaxWidth),`${t.x-20} ${t.y-20} ${e} `+p);R.debug("viewBox "+t),l.attr("viewBox",t)},"draw"),f4t={draw:g4t}}),T4t={};_Bt(T4t,{diagram:()=>E4t});var E4t,_4t,C4t,S4t,A4t,L4t,N4t,I4t,M4t,R4t,D4t,O4t,P4t,B4t=t(()=>{y4t(),x4t(),b4t(),k4t(),E4t={parser:hbt,db:e4t,renderer:f4t,styles:n4t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,e4t.clear()},"init")}}),F4t=t(()=>{e(),_4t=Ae((e,t,r,n)=>{t.forEach(t=>{O4t[t](e,r,n)})},"insertMarkers"),C4t=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"),S4t=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"),A4t=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"),L4t=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"),N4t=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"),I4t=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"),M4t=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"),R4t=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"),D4t=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"),O4t={extension:C4t,composition:S4t,aggregation:A4t,dependency:L4t,lollipop:N4t,point:I4t,circle:M4t,cross:R4t,barb:D4t},P4t=_4t});function $4t(t,e){e&&t.attr("style",e)}function z4t(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),$4t(a,t.labelStyle),a.attr("class",i),$4t(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 G4t,U4t,q4t=t(()=>{Z3(),e(),fh(),Jl(),X8(),pN(),Ae($4t,"applyStyle"),Ae(z4t,"addHtmlLabel"),G4t=Ae((t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Rl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),R.debug("vertexText"+i),z4t({isNode:n,label:cN(W8(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|/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"),U4t=G4t});function Y4t(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 j4t,H4t,W4t,V4t,X4t,K4t,Z4t,Q4t,J4t,t3t,e3t,r3t,n3t,i3t,a3t,o3t,s3t,l3t,c3t=t(()=>{q4t(),pN(),fh(),Z3(),Jl(),X8(),j4t=Ae(async(t,e,r,i)=>{let a=D(),n,o=e.useHtmlLabels||Rl(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?hN(l,Cl(W8(c),a),{useHtmlLabels:o,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(U4t(Cl(W8(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if(Rl(a.flowchart.htmlLabels)){if(r=u.children[0],t=O(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/]*>/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"),H4t=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),Ae(Y4t,"insertPolygonShape")}),h3t=t(()=>{e(),ZV(),xj(),W4t={},V4t={},X4t={},K4t=Ae(()=>{V4t={},X4t={},W4t={}},"clear"),Z4t=Ae((t,e)=>(R.trace("In isDescendant",e," ",t," = ",V4t[e].includes(t)),!!V4t[e].includes(t)),"isDescendant"),Q4t=Ae((t,e)=>(R.info("Descendants of ",e," is ",V4t[e]),R.info("Edge is ",t),t.v!==e&&t.w!==e&&(V4t[e]?V4t[e].includes(t.v)||Z4t(t.v,e)||Z4t(t.w,e)||V4t[e].includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))),"edgeInCluster"),J4t=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{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{Q4t(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"),t3t=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)X4t[i]=t,n=[...n,...t3t(i,e)];return n},"extractDescendants"),e3t=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=e3t(r,e);if(i)return R.trace("Found replacement for",t," => ",i),i}},"findNonClusterChild"),r3t=Ae(t=>W4t[t]&&W4t[t].externalConnections&&W4t[t]?W4t[t].id:t,"getAnchorId"),n3t=Ae((s,t)=>{if(!s||10{t.v!==e&&t.w!==e&&Z4t(t.v,e)^Z4t(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",V4t[e]),W4t[e].externalConnections=!0)})):R.debug("Not a cluster ",e,V4t)});for(var e of Object.keys(W4t)){var r=W4t[e].id;(r=s.parent(r))!==e&&W4t[r]&&!W4t[r].externalConnections&&(W4t[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",W4t,"ids:",t.v,t.w,"Translating: ",W4t[t.v]," --- ",W4t[t.w]),W4t[t.v]&&W4t[t.w]&&W4t[t.v]===W4t[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=r3t(t.v),o=r3t(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")):(W4t[t.v]||W4t[t.w])&&(R.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),a=r3t(t.v),o=r3t(t.w),s.removeEdge(t.v,t.w,t.name),a!==t.v&&(r=s.parent(a),W4t[r].externalConnections=!0,i.fromCluster=t.v),o!==t.w&&(n=s.parent(o),W4t[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",RV(s)),i3t(s,0),R.trace(W4t)}},"adjustClustersAndEdges"),i3t=Ae((r,n)=>{if(R.warn("extractor - ",n,RV(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign(t);return t.forEach(t=>{t=e.children(t),t=a3t(e,t),r=[...r,...t]}),r},"sorter"),o3t=Ae(t=>a3t(t,t.children()),"sortNodesByHierarchy")}),u3t=t(()=>{s3t=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"),l3t=Ae((t,e,r)=>{var t=s3t(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 d3t(t,e){return t.intersect(e)}var p3t,g3t=t(()=>{Ae(d3t,"intersectNode"),p3t=d3t});function f3t(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{Ae(f3t,"intersectEllipse"),m3t=f3t});function v3t(t,e,r){return m3t(t,e,e,r)}var x3t,b3t=t(()=>{y3t(),Ae(v3t,"intersectCircle"),x3t=v3t});function w3t(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{Ae(w3t,"intersectLine"),Ae(k3t,"sameSign"),T3t=w3t});function _3t(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{E3t(),Ae(C3t=_3t,"intersectPolygon")}),R3t=t(()=>{S3t=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"),A3t=S3t}),D3t=t(()=>{g3t(),b3t(),y3t(),M3t(),R3t(),L3t={node:p3t,circle:x3t,ellipse:m3t,polygon:C3t,rect:A3t}}),O3t=t(()=>{c3t(),e(),fh(),D3t(),N3t=Ae(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await j4t(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),H4t(e,i),e.intersect=function(t){return L3t.rect(e,t)},t},"note"),I3t=N3t});function P3t(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 B3t,F3t,$3t,z3t,G3t,U3t,q3t,Y3t,j3t,H3t,W3t,V3t,X3t,K3t,Z3t,Q3t,J3t,t5t,e5t,r5t,n5t,i5t,a5t,o5t,s5t,l5t,c5t,h5t,u5t,d5t,p5t,g5t,f5t,m5t,y5t,v5t,x5t,b5t,w5t,k5t,T5t,E5t,_5t=t(()=>{Z3(),fh(),Jl(),e(),u3t(),q4t(),D3t(),O3t(),c3t(),B3t=Ae(t=>t?" "+t:"","formatClass"),F3t=Ae((t,e)=>`${e||"node default"}${B3t(t.classes)} `+B3t(t.class),"getClassesFromNode"),$3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,o,o,s)).attr("style",e.style),H4t(e,t),e.intersect=function(t){return R.warn("Intersect called"),L3t.polygon(e,s,t)},r},"question"),z3t=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 L3t.circle(e,14,t)},t),"choice"),G3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,o,i,s);return l.attr("style",e.style),H4t(e,l),e.intersect=function(t){return L3t.polygon(e,s,t)},r},"hexagon"),U3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,o=n.width+2*a+e.padding,s=l3t(e.directions,n,e),l=Y4t(r,o,i,s);return l.attr("style",e.style),H4t(e,l),e.intersect=function(t){return L3t.polygon(e,s,t)},r},"block_arrow"),q3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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 Y4t(r,i,a,o).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return L3t.polygon(e,o,t)},r},"rect_left_inv_arrow"),Y3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,i,a,o);return s.attr("style",e.style),H4t(e,s),e.intersect=function(t){return L3t.polygon(e,o,t)},r},"lean_right"),j3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,i,a,o);return s.attr("style",e.style),H4t(e,s),e.intersect=function(t){return L3t.polygon(e,o,t)},r},"lean_left"),H3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,i,a,o);return s.attr("style",e.style),H4t(e,s),e.intersect=function(t){return L3t.polygon(e,o,t)},r},"trapezoid"),W3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,i,a,o);return s.attr("style",e.style),H4t(e,s),e.intersect=function(t){return L3t.polygon(e,o,t)},r},"inv_trapezoid"),V3t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,i,a,o);return s.attr("style",e.style),H4t(e,s),e.intersect=function(t){return L3t.polygon(e,o,t)},r},"rect_right_inv_arrow"),X3t=Ae(async(t,i)=>{let{shapeSvg:e,bbox:r}=await j4t(t,i,F3t(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 H4t(i,c),i.intersect=function(e){var r=L3t.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)i.height/2-o)){let t=o*o*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=o-t,0{var{shapeSvg:t,bbox:r,halfPadding:n}=await j4t(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&&(P3t(i,e.props.borders,a,o),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),H4t(e,i),e.intersect=function(t){return L3t.rect(e,t)},t},"rect"),Z3t=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await j4t(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&&(P3t(i,e.props.borders,a,o),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),H4t(e,i),e.intersect=function(t){return L3t.rect(e,t)},t},"composite"),Q3t=Ae(async(t,e)=>{var r,t=(await j4t(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&&(P3t(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{R.warn("Unknown node property "+t)})),H4t(e,n),e.intersect=function(t){return L3t.rect(e,t)},t},"labelRect"),Ae(P3t,"applyNodePropertyBorders"),J3t=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(U4t(l,e.labelStyle,!0,!0))),h={width:0,height:0};Rl(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(U4t(t.join?t.join("
"):t,e.labelStyle,!0,!0)),p=(Rl(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{var{shapeSvg:t,bbox:r}=await j4t(t,e,F3t(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 H4t(e,r),e.intersect=function(t){return L3t.rect(e,t)},t},"stadium"),e5t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await j4t(t,e,F3t(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"),H4t(e,a),e.intersect=function(t){return R.info("Circle intersect",e,n.width/2+i,t),L3t.circle(e,n.width/2+i,t)},r},"circle"),r5t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await j4t(t,e,F3t(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"),H4t(e,o),e.intersect=function(t){return R.info("DoubleCircle intersect",e,n.width/2+i+5,t),L3t.circle(e,n.width/2+i+5,t)},r},"doublecircle"),n5t=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await j4t(t,e,F3t(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=Y4t(r,i,a,o);return s.attr("style",e.style),H4t(e,s),e.intersect=function(t){return L3t.polygon(e,o,t)},r},"subroutine"),i5t=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),H4t(e,r),e.intersect=function(t){return L3t.circle(e,7,t)},t},"start"),a5t=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"),H4t(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return L3t.rect(e,t)},n},"forkJoin"),o5t=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),H4t(e,n),e.intersect=function(t){return L3t.circle(e,7,t)},t},"end"),s5t=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(U4t(p,o.labelStyle,!0,!0)),f=g.getBBox(),m=(Rl(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(U4t(m,o.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Rl(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,">")),h.node().appendChild(U4t(r,e.cssStyle||o.labelStyle,!0,!0))),i=n.getBBox(),a;Rl(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,">")),h.node().appendChild(U4t(r,e.cssStyle||o.labelStyle,!0,!0))),i=n.getBBox(),a;Rl(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),H4t(o,i),o.intersect=function(t){return L3t.rect(o,t)},n},"class_box"),l5t={rhombus:$3t,composite:Z3t,question:$3t,rect:K3t,labelRect:Q3t,rectWithTitle:J3t,choice:z3t,circle:e5t,doublecircle:r5t,stadium:t5t,hexagon:G3t,block_arrow:U3t,rect_left_inv_arrow:q3t,lean_right:Y3t,lean_left:j3t,trapezoid:H3t,inv_trapezoid:W3t,rect_right_inv_arrow:V3t,cylinder:X3t,start:i5t,end:o5t,note:I3t,subroutine:n5t,fork:a5t,join:a5t,class_box:s5t},c5t={},h5t=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 l5t[r.shape](i,r,n)}else a=await l5t[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),c5t[r.id]=i,r.haveCallback&&c5t[r.id].attr("class",c5t[r.id].attr("class")+" clickable"),i},"insertNode"),u5t=Ae((t,e)=>{c5t[e.id]=t},"setNodeElem"),d5t=Ae(()=>{c5t={}},"clear"),p5t=Ae(t=>{var e=c5t[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")}),C5t=t(()=>{R3t(),e(),q4t(),pN(),Z3(),fh(),Jl(),zA(),g5t=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=Rl(r.flowchart.htmlLabels),o=n.insert("g").attr("class","cluster-label"),s="markdown"===e.labelType?hN(o,e.labelText,{style:e.labelStyle,useHtmlLabels:a},r):o.node().appendChild(U4t(e.labelText,e.labelStyle,void 0,!0)),l=s.getBBox();Rl(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),BA(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 A3t(e,t)},n},"rect"),f5t=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 A3t(e,t)},t},"noteGroup"),m5t=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(U4t(e.labelText,e.labelStyle,void 0,!0)),l=s.getBBox();Rl(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),BA(r).subGraphTitleTopMargin),h=(a.attr("transform",`translate(${e.x-l.width/2}, ${e.y-e.height/2-e.padding/3+(Rl(r.flowchart.htmlLabels)?5:3)+c})`),i.node().getBBox());return e.height=h.height,e.intersect=function(t){return A3t(e,t)},n},"roundedWithTitle"),y5t=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 A3t(e,t)},t},"divider"),v5t={rect:g5t,roundedWithTitle:m5t,noteGroup:f5t,divider:y5t},x5t={},b5t=Ae((t,e)=>{R.trace("Inserting cluster");var r=e.shape||"rect";x5t[e.id]=v5t[r](t,e)},"insertCluster"),w5t=Ae(()=>{x5t={}},"clear")}),S5t=t(()=>{e(),k5t=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&E5t(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&E5t(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),T5t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},E5t=Ae((t,e,r,n,i,a)=>{var o=T5t[r];o?t.attr("marker-"+e,`url(${n}#${i}_${a}-${o}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function A5t(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var L5t,N5t,I5t,M5t,R5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t=t(()=>{e(),q4t(),pN(),Z3(),fh(),X8(),Jl(),YN(),zA(),S5t(),L5t={},N5t={},I5t=Ae(()=>{L5t={},N5t={}},"clear"),M5t=Ae((t,e)=>{var r,n=D(),i=Rl(n.flowchart.htmlLabels),n="markdown"===e.labelType?hN(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):U4t(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+")"),L5t[e.id]=a,e.width=s.width,e.height=s.height;let l;return e.startLabelLeft&&(i=U4t(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+")"),N5t[e.id]||(N5t[e.id]={}),N5t[e.id].startLeft=r,A5t(l,e.startLabelLeft)),e.startLabelRight&&(i=U4t(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+")"),N5t[e.id]||(N5t[e.id]={}),N5t[e.id].startRight=o,A5t(l,e.startLabelRight)),e.endLabelLeft&&(i=U4t(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),N5t[e.id]||(N5t[e.id]={}),N5t[e.id].endLeft=a,A5t(l,e.endLabelLeft)),e.endLabelRight&&(r=U4t(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),N5t[e.id]||(N5t[e.id]={}),N5t[e.id].endRight=o,A5t(l,e.endLabelRight)),n},"insertEdgeLabel"),Ae(A5t,"setTerminalWidth"),R5t=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,L5t[n.id],i);var a,o=i.updatedPath||i.originalPath,s=D(),s=BA(s).subGraphTitleTotalMargin;if(n.label){let t=L5t[n.id],e=n.x,r=n.y;o&&(a=j8.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=N5t[n.id].startLeft,e=n.x,r=n.y;o&&(i=j8.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=N5t[n.id].startRight,e=n.x,r=n.y;o&&(a=j8.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=N5t[n.id].endLeft,e=n.x,r=n.y;o&&(s=j8.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=N5t[n.id].endRight,e=n.x,r=n.y;o&&(i=j8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",o),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),D5t=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),O5t=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.xMath.abs(a-n.x)*l)return t=i.y{R.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],o=!1;return t.forEach(t=>{if(D5t(n,t)||o)a=t,o||i.push(t);else{let e=O5t(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"),B5t=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.node(e.w),u=(h?.intersect&&c?.intersect&&((s=s.slice(1,r.points.length-1)).unshift(c.intersect(s[0])),s.push(h.intersect(s[s.length-1]))),r.toCluster&&(R.debug("to cluster abc88",n[r.toCluster]),s=P5t(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(R.debug("from cluster abc88",n[r.fromCluster]),s=P5t(s.reverse(),n[r.fromCluster].node).reverse(),l=!0),s.filter(t=>!Number.isNaN(t.y))),d=u4,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),zN(r)),f=Xb().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=t.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),k5t(y,r,v,o,i),a={},l&&(a.updatedPath=s),a.originalPath=r.points,a},"insertEdge")}),G5t=t(()=>{MV(),ZV(),F4t(),c3t(),h3t(),_5t(),C5t(),z5t(),e(),zA(),fh(),F5t=Ae(async(t,i,a,o,s,l)=>{R.info("Graph in recursive render: XXX",RV(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 "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",W4t,"ids:",t.v,t.w,"Translating: ",W4t[t.v],W4t[t.w]),await M5t(h,e)}),i.edges().forEach(function(t){R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))}),R.info("Graph before layout:",JSON.stringify(RV(i))),R.info("#############################################"),R.info("### Layout ###"),R.info("#############################################"),R.info(i),aV(i),R.info("Graph after layout:",JSON.stringify(RV(i))),0),p=BA(l).subGraphTitleTotalMargin;return o3t(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,p5t(e)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),B5t(n,t,e,W4t,a,i,o));R5t(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"),$5t=Ae(async(t,e,r,n,i)=>{P4t(t,r,n,i),d5t(),I5t(),w5t(),K4t(),R.warn("Graph at first:",JSON.stringify(RV(e))),n3t(e),R.warn("Graph after:",JSON.stringify(RV(e))),r=D(),await F5t(t,e,n,i,void 0,r)},"render")});function U5t(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 q5t,Y5t,j5t,H5t,W5t,V5t,X5t,K5t,Z5t,Q5t=t(()=>{Z3(),xj(),e(),fh(),G5t(),X8(),X8(),tc(),Jl(),q5t=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),Y5t={dividerMargin:10,padding:5,textHeight:10,curve:void 0},j5t=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:q5t(t.id),labelStyle:"",style:"fill: none; stroke: black",padding:D().flowchart?.padding??D().class?.padding};r.setNode(t.id,e),H5t(t.classes,r,n,i,t.id),R.info("setNode",e)})},"addNamespaces"),H5t=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=g8(t.styles),n=t.label??t.id,n={labelStyle:r.labelStyle,shape:"class_box",labelText:q5t(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"),W5t=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:q5t(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:l8(Y5t.curve,Yb)},i.setEdge(r.id,r.class,e,t))})},"addNotes"),V5t=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:V8(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:U5t(t.relation.type1),arrowTypeEnd:U5t(t.relation.type2),style:"fill:none",labelStyle:"",curve:l8(i?.curve,Yb)};R.info(r,t),void 0!==t.style&&(e=g8(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=''+t.text+""):(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"),X5t=Ae(function(t){Y5t={...Y5t,...t}},"setConf"),K5t=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 yj({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),j5t(s,o,e,n),H5t(l,o,e,n),V5t(c,o),W5t(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 $5t(c,o,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),j8.insertTitle(h,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),Vl(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(U5t,"getArrowMarker"),Z5t={setConf:X5t,draw:K5t}}),J5t={};_Bt(J5t,{diagram:()=>t6t});var t6t,e6t,r6t,n6t,i6t,a6t,o6t,s6t,l6t,c6t,h6t,u6t,d6t,p6t,g6t,f6t,m6t,y6t,v6t,x6t,b6t,w6t,k6t,T6t,E6t,_6t,C6t,S6t,A6t,L6t,N6t,I6t,M6t,R6t,D6t,O6t,P6t,B6t,F6t=t(()=>{y4t(),x4t(),b4t(),Q5t(),t6t={parser:hbt,db:e4t,renderer:Z5t,styles:n4t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,e4t.clear()},"init")}}),$6t=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"{fh(),e(),qR(),MX(),RX(),K8(),A4t=Ae((t,e="TB")=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),L4t=Ae(function(t,e){return e.db.getClasses()},"getClasses"),N4t=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing class diagram (v3)",e);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=IR(e,i);o.type=n.type,o.layoutAlgorithm=xX(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await vX(o,i),H8.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),bX(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),I4t={getClasses:L4t,draw:N4t,getDir:A4t}}),O4t={};SBt(O4t,{diagram:()=>P4t});var P4t,B4t=t(()=>{Lbt(),M4t(),R4t(),D4t(),P4t={parser:Ebt,db:E4t,renderer:I4t,styles:S4t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,E4t.clear()},"init")}}),F4t={};SBt(F4t,{diagram:()=>$4t});var $4t,z4t,U4t,G4t,q4t,j4t,Y4t,H4t,W4t,V4t,X4t,K4t,Z4t,Q4t,J4t,t3t,e3t,r3t,n3t,i3t,a3t,s3t,o3t,l3t,c3t,h3t,u3t,d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t=t(()=>{Lbt(),M4t(),R4t(),D4t(),$4t={parser:Ebt,db:E4t,renderer:I4t,styles:S4t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,E4t.clear()},"init")}}),_3t=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],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,32],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],_=[1,34],E=[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,s){var o=a.length-1;switch(i){case 3:return n.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 34:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 35:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 36: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[o].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5: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:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,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:_,49:E,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:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,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:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/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"),(e6t=new((t.prototype=r).Parser=t)).parser=e6t,r6t=e6t}),z6t=t(()=>{n6t="LR",i6t="TB",o6t="relation",s6t="classDef",l6t="style",c6t="applyClass",h6t="default",d6t="fill:none",p6t="fill: #333",g6t="c",f6t="text",m6t="normal",y6t="rect",v6t="rectWithTitle",x6t="stateStart",b6t="stateEnd",w6t=u6t="divider",k6t="roundedWithTitle",E6t="noteGroup",C6t=(_6t="statediagram")+"-state",A6t=(S6t="transition")+" note-edge",L6t=_6t+"-note",N6t=_6t+"-cluster",I6t=_6t+"-cluster-alt",D6t=a6t="state",P6t=(O6t="----")+(R6t=T6t="note"),B6t=""+O6t+(M6t="parent")});function G6t(t="",e=0,r="",n=O6t){return n=null!==r&&0"!==e.id&&""!==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 q6t(t){return t?.classes?.join(" ")??""}function Y6t(t){return t?.styles??[]}var j6t,H6t,W6t,V6t,X6t,K6t,Z6t,Q6t,J6t,twt,ewt=t(()=>{fh(),e(),Jl(),z6t(),j6t=new Map,H6t=0,Ae(G6t,"stateDomId"),W6t=Ae((r,t,n,i,a,o,s,l)=>{R.trace("items",t),t.forEach(t=>{switch(t.stmt){case a6t:case h6t:X6t(r,t,n,i,a,o,s,l);break;case o6t:X6t(r,t.state1,n,i,a,o,s,l),X6t(r,t.state2,n,i,a,o,s,l);var e={id:"edge"+H6t,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:d6t,labelStyle:"",label:L.sanitizeText(t.description,D()),arrowheadStyle:p6t,labelpos:g6t,labelType:f6t,thickness:m6t,classes:S6t,look:s};a.push(e),H6t++}})},"setupDoc"),V6t=Ae((t,e=i6t)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Ae(U6t,"insertOrUpdateNode"),Ae(q6t,"getClassesFromDbInfo"),Ae(Y6t,"getStylesFromDbInfo"),X6t=Ae((r,n,t,i,a,e,o,s)=>{var l=n.id,c=t.get(l),h=q6t(c),u=Y6t(c);if(R.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=y6t;if(!0===n.start?t=x6t:!1===n.start&&(t=b6t),n.type!==h6t&&(t=n.type),j6t.get(l)||j6t.set(l,{id:l,shape:t,description:L.sanitizeText(l,D()),cssClasses:h+" "+C6t,cssStyles:u}),c=j6t.get(l),n.description&&(Array.isArray(c.description)?(c.shape=v6t,c.description.push(n.description)):0{j6t.clear(),H6t=0},"reset")}),rwt=t(()=>{fh(),e(),$A(),vX(),xX(),X8(),z6t(),Z6t=Ae((t,e=i6t)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Q6t=Ae(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),J6t=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=PA(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 iX(s,i),j8.insertTitle(i,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),oX(i,8,_6t,a?.useMaxWidth??!0)},"draw"),twt={getClasses:Q6t,draw:J6t,getDir:Z6t}});function nwt(){return new Map}function iwt(t=""){let e=t;return"[*]"===t&&(ywt++,e="start"+ywt),e}function awt(t="",e=h6t){return"[*]"===t?"start":e}function owt(t=""){let e=t;return"[*]"===t&&(ywt++,e="end"+ywt),e}function swt(t="",e=h6t){return"[*]"===t?"end":e}function lwt(t,e,r){var n=iwt(t.id.trim()),i=awt(t.id.trim(),t.type),a=iwt(e.id.trim()),o=awt(e.id.trim(),e.type);Swt(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Swt(a,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),mwt.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,D())})}var cwt,hwt,uwt,dwt,pwt,gwt,fwt,mwt,ywt,vwt,xwt,bwt,wwt,kwt,Twt,Ewt,_wt,Cwt,Swt,Awt,Lwt,Nwt,Iwt,Mwt,Rwt,Dwt,Owt,Pwt,Bwt,Fwt,$wt,zwt,Gwt,Uwt,qwt,Ywt,jwt,Hwt,Wwt,Vwt,Xwt,Kwt,Zwt,Qwt,Jwt,tkt,ekt,rkt,nkt,ikt,akt,okt,skt,lkt,ckt,hkt,ukt,dkt,pkt,gkt,fkt,mkt,ykt,vkt,xkt,bkt,wkt=t(()=>{e(),X8(),Jl(),fh(),gh(),ewt(),rwt(),z6t(),Ae(nwt,"newClassesList"),cwt=[],hwt=[],uwt=n6t,dwt=[],pwt=nwt(),gwt=Ae(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),fwt={root:gwt()},mwt=fwt.root,xwt={LINE:vwt=ywt=0,DOTTED_LINE:1},bwt={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},wwt=Ae(t=>JSON.parse(JSON.stringify(t)),"clone"),kwt=Ae(t=>{R.info("Setting root doc",t),dwt=t},"setRootDoc"),Twt=Ae(()=>dwt,"getRootDoc"),Ewt=Ae((n,i,t)=>{if(i.stmt===o6t)Ewt(n,i.state1,!0),Ewt(n,i.state2,!1);else if(i.stmt===a6t&&("[*]"===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;rEwt(i,t,!0))}},"docTranslator"),_wt=Ae(()=>(Ewt({id:"root"},{id:"root",doc:dwt},!0),{id:"root",doc:dwt}),"getRootDocV2"),Cwt=Ae(t=>{var e=t.doc||t,t=(R.info(e),Awt(!0),R.info("Extract initial document:",e),e.forEach(e=>{switch(R.warn("Statement",e.stmt),e.stmt){case a6t:Swt(e.id.trim(),e.type,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles);break;case o6t:Rwt(e.state1,e.state2,e.description);break;case s6t:Bwt(e.id.trim(),e.classes);break;case l6t:{let t=e.id.trim().split(","),r=e.styleClass.split(",");t.forEach(t=>{let e=Lwt(t);void 0===e&&(t=t.trim(),Swt(t),e=Lwt(t)),e.styles=r.map(t=>t.replace(/;/g,"")?.trim())})}break;case c6t:$wt(e.id.trim(),e.styleClass)}}),Nwt()),e=D().look;K6t(),X6t(void 0,_wt(),t,cwt,hwt,!0,e,pwt),cwt.forEach(t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&0Dwt(l,t.trim())),i&&((t=mwt.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=>$wt(l,t.trim()))),o&&(R.info("Setting state styles",l,o),("string"==typeof o?[o]:o).forEach(t=>zwt(l,t.trim()))),s&&(R.info("Setting state styles",l,o),("string"==typeof s?[s]:s).forEach(t=>Gwt(l,t.trim())))},"addState"),Awt=Ae(function(t){cwt=[],hwt=[],fwt={root:gwt()},mwt=fwt.root,ywt=0,pwt=nwt(),t||sc()},"clear"),Lwt=Ae(function(t){return mwt.states.get(t)},"getState"),Nwt=Ae(function(){return mwt.states},"getStates"),Iwt=Ae(function(){R.info("Documents = ",fwt)},"logDocuments"),Mwt=Ae(function(){return mwt.relations},"getRelations"),Ae(iwt,"startIdIfNeeded"),Ae(awt,"startTypeIfNeeded"),Ae(owt,"endIdIfNeeded"),Ae(swt,"endTypeIfNeeded"),Ae(lwt,"addRelationObjs"),Rwt=Ae(function(t,e,r){var n,i;"object"==typeof t?lwt(t,e,r):(n=iwt(t.trim()),t=awt(t),i=owt(e.trim()),e=swt(e),Swt(n,t),Swt(i,e),mwt.relations.push({id1:n,id2:i,title:L.sanitizeText(r,D())}))},"addRelation"),Dwt=Ae(function(t,e){t=mwt.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t.descriptions.push(L.sanitizeText(e,D()))},"addDescription"),Owt=Ae(function(t){return(":"===t.substring(0,1)?t.substr(2):t).trim()},"cleanupLabel"),Pwt=Ae(()=>"divider-id-"+ ++vwt,"getDividerId"),Bwt=Ae(function(t,e=""){pwt.has(t)||pwt.set(t,{id:t,styles:[],textStyles:[]});let r=pwt.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"),Fwt=Ae(function(){return pwt},"getClasses"),$wt=Ae(function(t,r){t.split(",").forEach(function(t){let e=Lwt(t);void 0===e&&(t=t.trim(),Swt(t),e=Lwt(t)),e.classes.push(r)})},"setCssClass"),zwt=Ae(function(t,e){void 0!==(t=Lwt(t))&&t.styles.push(e)},"setStyle"),Gwt=Ae(function(t,e){void 0!==(t=Lwt(t))&&t.textStyles.push(e)},"setTextStyle"),Uwt=Ae(()=>uwt,"getDirection"),qwt=Ae(t=>{uwt=t},"setDirection"),Ywt=Ae(t=>(t&&":"===t[0]?t.substr(1):t).trim(),"trimColon"),jwt=Ae(()=>{var t=D();return{nodes:cwt,edges:hwt,other:{},config:t,direction:Z6t(_wt())}},"getData"),Hwt={getConfig:Ae(()=>D().state,"getConfig"),getData:jwt,addState:Swt,clear:Awt,getState:Lwt,getStates:Nwt,getRelations:Mwt,getClasses:Fwt,getDirection:Uwt,addRelation:Rwt,getDividerId:Pwt,setDirection:qwt,cleanupLabel:Owt,lineType:xwt,relationType:bwt,logDocuments:Iwt,getRootDoc:Twt,setRootDoc:kwt,getRootDocV2:_wt,extract:Cwt,trimColon:Ywt,getAccTitle:cc,setAccTitle:lc,getAccDescription:uc,setAccDescription:hc,addStyleClass:Bwt,setCssClass:$wt,addDescription:Dwt,setDiagramTitle:dc,getDiagramTitle:pc}}),kkt=t(()=>{Wwt=Ae(t=>` +`+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>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/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"),(z4t=new((t.prototype=r).Parser=t)).parser=z4t,U4t=z4t}),E3t=t(()=>{G4t="LR",q4t="TB",Y4t="relation",H4t="classDef",W4t="style",V4t="applyClass",X4t="default",Z4t="fill:none",Q4t="fill: #333",J4t="c",t3t="text",e3t="normal",r3t="rect",n3t="rectWithTitle",i3t="stateStart",a3t="stateEnd",s3t=K4t="divider",o3t="roundedWithTitle",c3t="noteGroup",u3t=(h3t="statediagram")+"-state",p3t=(d3t="transition")+" note-edge",g3t=h3t+"-note",f3t=h3t+"-cluster",m3t=h3t+"-cluster-alt",x3t=j4t="state",w3t=(b3t="----")+(v3t=l3t="note"),k3t=""+b3t+(y3t="parent")});function C3t(t="",e=0,r="",n=b3t){return n=null!==r&&0"!==e.id&&""!==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 A3t(t){return t?.classes?.join(" ")??""}function L3t(t){return t?.styles??[]}var N3t,I3t,M3t,R3t,D3t,O3t,P3t,B3t,F3t,$3t,z3t=t(()=>{fh(),e(),Jl(),E3t(),N3t=new Map,I3t=0,Ae(C3t,"stateDomId"),M3t=Ae((r,t,n,i,a,s,o,l)=>{R.trace("items",t),t.forEach(t=>{switch(t.stmt){case j4t:case X4t:D3t(r,t,n,i,a,s,o,l);break;case Y4t:D3t(r,t.state1,n,i,a,s,o,l),D3t(r,t.state2,n,i,a,s,o,l);var e={id:"edge"+I3t,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Z4t,labelStyle:"",label:L.sanitizeText(t.description,D()),arrowheadStyle:Q4t,labelpos:J4t,labelType:t3t,thickness:e3t,classes:d3t,look:o};a.push(e),I3t++}})},"setupDoc"),R3t=Ae((t,e=q4t)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Ae(S3t,"insertOrUpdateNode"),Ae(A3t,"getClassesFromDbInfo"),Ae(L3t,"getStylesFromDbInfo"),D3t=Ae((r,n,t,i,a,e,s,o)=>{var l=n.id,c=t.get(l),h=A3t(c),u=L3t(c);if(R.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=r3t;if(!0===n.start?t=i3t:!1===n.start&&(t=a3t),n.type!==X4t&&(t=n.type),N3t.get(l)||N3t.set(l,{id:l,shape:t,description:L.sanitizeText(l,D()),cssClasses:h+" "+u3t,cssStyles:u}),c=N3t.get(l),n.description&&(Array.isArray(c.description)?(c.shape=n3t,c.description.push(n.description)):0{N3t.clear(),I3t=0},"reset")}),U3t=t(()=>{fh(),e(),qR(),MX(),RX(),K8(),E3t(),P3t=Ae((t,e=q4t)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),B3t=Ae(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),F3t=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing state diagram (v2)",e);var{securityLevel:i,state:a,layout:s}=D(),o=(n.db.extract(n.db.getRootDocV2()),n.db.getData()),i=IR(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await vX(o,i),H8.insertTitle(i,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),bX(i,8,h3t,a?.useMaxWidth??!0)},"draw"),$3t={getClasses:B3t,draw:F3t,getDir:P3t}});function G3t(){return new Map}function q3t(t=""){let e=t;return"[*]"===t&&(r5t++,e="start"+r5t),e}function j3t(t="",e=X4t){return"[*]"===t?"start":e}function Y3t(t=""){let e=t;return"[*]"===t&&(r5t++,e="end"+r5t),e}function H3t(t="",e=X4t){return"[*]"===t?"end":e}function W3t(t,e,r){var n=q3t(t.id.trim()),i=j3t(t.id.trim(),t.type),a=q3t(e.id.trim()),s=j3t(e.id.trim(),e.type);d5t(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),d5t(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),e5t.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,D())})}var V3t,X3t,K3t,Z3t,Q3t,J3t,t5t,e5t,r5t,n5t,i5t,a5t,s5t,o5t,l5t,c5t,h5t,u5t,d5t,p5t,g5t,f5t,m5t,y5t,v5t,x5t,b5t,w5t,k5t,T5t,_5t,E5t,C5t,S5t,A5t,L5t,N5t,I5t,M5t,R5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,U5t,G5t,q5t,j5t,Y5t,H5t,W5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t6t,e6t,r6t,n6t,i6t,a6t,s6t=t(()=>{e(),K8(),Jl(),fh(),gh(),z3t(),U3t(),E3t(),Ae(G3t,"newClassesList"),V3t=[],X3t=[],K3t=G4t,Z3t=[],Q3t=G3t(),J3t=Ae(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),t5t={root:J3t()},e5t=t5t.root,i5t={LINE:n5t=r5t=0,DOTTED_LINE:1},a5t={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},s5t=Ae(t=>JSON.parse(JSON.stringify(t)),"clone"),o5t=Ae(t=>{R.info("Setting root doc",t),Z3t=t},"setRootDoc"),l5t=Ae(()=>Z3t,"getRootDoc"),c5t=Ae((n,i,t)=>{if(i.stmt===Y4t)c5t(n,i.state1,!0),c5t(n,i.state2,!1);else if(i.stmt===j4t&&("[*]"===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;rc5t(i,t,!0))}},"docTranslator"),h5t=Ae(()=>(c5t({id:"root"},{id:"root",doc:Z3t},!0),{id:"root",doc:Z3t}),"getRootDocV2"),u5t=Ae(t=>{var e=t.doc||t,t=(R.info(e),p5t(!0),R.info("Extract initial document:",e),e.forEach(e=>{switch(R.warn("Statement",e.stmt),e.stmt){case j4t:d5t(e.id.trim(),e.type,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles);break;case Y4t:v5t(e.state1,e.state2,e.description);break;case H4t:k5t(e.id.trim(),e.classes);break;case W4t:{let t=e.id.trim().split(","),r=e.styleClass.split(",");t.forEach(t=>{let e=g5t(t);void 0===e&&(t=t.trim(),d5t(t),e=g5t(t)),e.styles=r.map(t=>t.replace(/;/g,"")?.trim())})}break;case V4t:_5t(e.id.trim(),e.styleClass)}}),f5t()),e=D().look;O3t(),D3t(void 0,h5t(),t,V3t,X3t,!0,e,Q3t),V3t.forEach(t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&0x5t(l,t.trim())),i&&((t=e5t.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=>_5t(l,t.trim()))),s&&(R.info("Setting state styles",l,s),("string"==typeof s?[s]:s).forEach(t=>E5t(l,t.trim()))),o&&(R.info("Setting state styles",l,s),("string"==typeof o?[o]:o).forEach(t=>C5t(l,t.trim())))},"addState"),p5t=Ae(function(t){V3t=[],X3t=[],t5t={root:J3t()},e5t=t5t.root,r5t=0,Q3t=G3t(),t||oc()},"clear"),g5t=Ae(function(t){return e5t.states.get(t)},"getState"),f5t=Ae(function(){return e5t.states},"getStates"),m5t=Ae(function(){R.info("Documents = ",t5t)},"logDocuments"),y5t=Ae(function(){return e5t.relations},"getRelations"),Ae(q3t,"startIdIfNeeded"),Ae(j3t,"startTypeIfNeeded"),Ae(Y3t,"endIdIfNeeded"),Ae(H3t,"endTypeIfNeeded"),Ae(W3t,"addRelationObjs"),v5t=Ae(function(t,e,r){var n,i;"object"==typeof t?W3t(t,e,r):(n=q3t(t.trim()),t=j3t(t),i=Y3t(e.trim()),e=H3t(e),d5t(n,t),d5t(i,e),e5t.relations.push({id1:n,id2:i,title:L.sanitizeText(r,D())}))},"addRelation"),x5t=Ae(function(t,e){t=e5t.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t.descriptions.push(L.sanitizeText(e,D()))},"addDescription"),b5t=Ae(function(t){return(":"===t.substring(0,1)?t.substr(2):t).trim()},"cleanupLabel"),w5t=Ae(()=>"divider-id-"+ ++n5t,"getDividerId"),k5t=Ae(function(t,e=""){Q3t.has(t)||Q3t.set(t,{id:t,styles:[],textStyles:[]});let r=Q3t.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"),T5t=Ae(function(){return Q3t},"getClasses"),_5t=Ae(function(t,r){t.split(",").forEach(function(t){let e=g5t(t);void 0===e&&(t=t.trim(),d5t(t),e=g5t(t)),e.classes.push(r)})},"setCssClass"),E5t=Ae(function(t,e){void 0!==(t=g5t(t))&&t.styles.push(e)},"setStyle"),C5t=Ae(function(t,e){void 0!==(t=g5t(t))&&t.textStyles.push(e)},"setTextStyle"),S5t=Ae(()=>K3t,"getDirection"),A5t=Ae(t=>{K3t=t},"setDirection"),L5t=Ae(t=>(t&&":"===t[0]?t.substr(1):t).trim(),"trimColon"),N5t=Ae(()=>{var t=D();return{nodes:V3t,edges:X3t,other:{},config:t,direction:P3t(h5t())}},"getData"),I5t={getConfig:Ae(()=>D().state,"getConfig"),getData:N5t,addState:d5t,clear:p5t,getState:g5t,getStates:f5t,getRelations:y5t,getClasses:T5t,getDirection:S5t,addRelation:v5t,getDividerId:w5t,setDirection:A5t,cleanupLabel:b5t,lineType:i5t,relationType:a5t,logDocuments:m5t,getRootDoc:l5t,setRootDoc:o5t,getRootDocV2:h5t,extract:u5t,trimColon:L5t,getAccTitle:cc,setAccTitle:lc,getAccDescription:uc,setAccDescription:hc,addStyleClass:k5t,setCssClass:_5t,addDescription:x5t,setDiagramTitle:dc,getDiagramTitle:pc}}),o6t=t(()=>{M5t=Ae(t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; @@ -1691,12 +1690,12 @@ g.stateGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),Vwt=Wwt}),Tkt=t(()=>{Xwt={},Kwt=Ae((t,e)=>{Xwt[t]=e},"set"),Zwt=Ae(t=>Xwt[t],"get"),Qwt=Ae(()=>Object.keys(Xwt),"keys"),Jwt=Ae(()=>Qwt().length,"size"),tkt={get:Zwt,set:Kwt,keys:Qwt,size:Jwt}}),Ekt=t(()=>{Z3(),Tkt(),wkt(),X8(),Jl(),fh(),e(),ekt=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"),rkt=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"),nkt=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"),ikt=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"),akt=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(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"),skt=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"),lkt=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,"
")),s=(o=o.replace(/\n/g,"
")).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"),ckt=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}=lkt(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),hkt=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&&ekt(t),"end"===e.type&&okt(t),"fork"!==e.type&&"join"!==e.type||skt(t,e),"note"===e.type&&ckt(e.note.text,t),"divider"===e.type&&rkt(t),"default"===e.type&&0===e.descriptions.length&&nkt(t,e),"default"===e.type&&0!Number.isNaN(t.y));let t=h.points,e=Xb().x(function(t){return t.x}).y(function(t){return t.y}).curve(u4),r=c.append("path").attr("d",e(t)).attr("id","edge"+ukt).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(Hwt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:n}=j8.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(1t.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)}ukt++},"drawEdge")}),_kt=t(()=>{Z3(),MV(),xj(),e(),Jl(),Ekt(),fh(),tc(),gkt={},fkt=Ae(function(){},"setConf"),mkt=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"),ykt=Ae(function(t,e,r,n){pkt=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=(mkt(t),n.db.getRootDoc()),e=(xkt(e,t,void 0,!1,o,s,n),pkt.padding),s=(o=t.node().getBBox()).width+2*e;Wl(t,n=o.height+2*e,1.75*s,pkt.useMaxWidth),t.attr("viewBox",`${o.x-pkt.padding} ${o.y-pkt.padding} `+s+" "+n)},"draw"),vkt=Ae(t=>t?t.length*pkt.fontSizeFactor:1,"getLabelWidth"),xkt=Ae((t,e,r,n,i,a,o)=>{let s=new yj({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{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))),dkt(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*pkt.padding,v.height=d.height+2*pkt.padding,R.debug("Doc rendered",v,s),v},"renderDoc"),bkt={setConf:fkt,draw:ykt}}),Ckt={};_Bt(Ckt,{diagram:()=>Skt});var Skt,Akt=t(()=>{$6t(),wkt(),kkt(),_kt(),Skt={parser:r6t,db:Hwt,renderer:bkt,styles:Vwt,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Hwt.clear()},"init")}}),Lkt={};_Bt(Lkt,{diagram:()=>Nkt});var Nkt,Ikt,Mkt,Rkt,Dkt,Okt,Pkt,Bkt,Fkt,$kt,zkt,Gkt,Ukt,qkt,Ykt,jkt,Hkt,Wkt,Vkt,Xkt,Kkt,Zkt,Qkt,Jkt,t7t,e7t,r7t,n7t,i7t,a7t,o7t,s7t=t(()=>{$6t(),wkt(),kkt(),rwt(),Nkt={parser:r6t,db:Hwt,renderer:twt,styles:Vwt,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Hwt.clear()},"init")}}),l7t=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"{D5t={},O5t=Ae((t,e)=>{D5t[t]=e},"set"),P5t=Ae(t=>D5t[t],"get"),B5t=Ae(()=>Object.keys(D5t),"keys"),F5t=Ae(()=>B5t().length,"size"),$5t={get:P5t,set:O5t,keys:B5t,size:F5t}}),c6t=t(()=>{Z3(),l6t(),s6t(),K8(),Jl(),fh(),e(),z5t=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"),U5t=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"),G5t=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"),q5t=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"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+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"),j5t=Ae((t,e,r)=>{let n=D().state.padding,i=2*D().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=o-n,s(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"),H5t=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"),W5t=Ae((t,e,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).split(L.lineBreakRegex),l=1.25*D().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),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"),V5t=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}=W5t(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),X5t=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&&z5t(t),"end"===e.type&&Y5t(t),"fork"!==e.type&&"join"!==e.type||H5t(t,e),"note"===e.type&&V5t(e.note.text,t),"divider"===e.type&&U5t(t),"default"===e.type&&0===e.descriptions.length&&G5t(t,e),"default"===e.type&&0!Number.isNaN(t.y));let t=h.points,e=Xb().x(function(t){return t.x}).y(function(t){return t.y}).curve(u4),r=c.append("path").attr("d",e(t)).attr("id","edge"+K5t).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(I5t.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,s=[],o=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();o=Math.max(o,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)),s.push(p)}let t=a*i.length;if(1t.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-o/2-D().state.padding/2).attr("y",n-t/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",t+D().state.padding),R.info(d)}K5t++},"drawEdge")}),h6t=t(()=>{Z3(),HV(),RY(),e(),Jl(),c6t(),fh(),tc(),J5t={},t6t=Ae(function(){},"setConf"),e6t=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"),r6t=Ae(function(t,e,r,n){Q5t=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=O("#i"+e));var s=O("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,t=(R.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(e6t(t),n.db.getRootDoc()),e=(i6t(e,t,void 0,!1,s,o,n),Q5t.padding),o=(s=t.node().getBBox()).width+2*e;Wl(t,n=s.height+2*e,1.75*o,Q5t.useMaxWidth),t.attr("viewBox",`${s.x-Q5t.padding} ${s.y-Q5t.padding} `+o+" "+n)},"draw"),n6t=Ae(t=>t?t.length*Q5t.fontSizeFactor:1,"getLabelWidth"),i6t=Ae((t,e,r,n,i,a,s)=>{let o=new IY({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{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(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Z5t(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*Q5t.padding,v.height=d.height+2*Q5t.padding,R.debug("Doc rendered",v,o),v},"renderDoc"),a6t={setConf:t6t,draw:r6t}}),u6t={};SBt(u6t,{diagram:()=>d6t});var d6t,p6t=t(()=>{_3t(),s6t(),o6t(),h6t(),d6t={parser:U4t,db:I5t,renderer:a6t,styles:R5t,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,I5t.clear()},"init")}}),g6t={};SBt(g6t,{diagram:()=>f6t});var f6t,m6t,y6t,v6t,x6t,b6t,w6t,k6t,T6t,_6t,E6t,C6t,S6t,A6t,L6t,N6t,I6t,M6t,R6t,D6t,O6t,P6t,B6t,F6t,$6t,z6t,U6t,G6t,q6t,j6t,Y6t,H6t=t(()=>{_3t(),s6t(),o6t(),U3t(),f6t={parser:U4t,db:I5t,renderer:$3t,styles:R5t,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,I5t.clear()},"init")}}),W6t=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],s=[1,12],o=[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,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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{fh(),gh(),Rkt="",Dkt=[],Okt=[],Pkt=[],Bkt=Ae(function(){Dkt.length=0,Okt.length=0,Rkt="",Pkt.length=0,sc()},"clear"),Fkt=Ae(function(t){Rkt=t,Dkt.push(t)},"addSection"),$kt=Ae(function(){return Dkt},"getSections"),zkt=Ae(function(){let t=Ykt(),e=0;for(;!t&&e<100;)t=Ykt(),e++;return Okt.push(...Pkt),Okt},"getTasks"),Gkt=Ae(function(){let e=[];return Okt.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),Ukt=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:Rkt,type:Rkt,people:e,task:t,score:n},Pkt.push(e)},"addTask"),qkt=Ae(function(t){t={section:Rkt,type:Rkt,description:t,task:t,classes:[]},Okt.push(t)},"addTaskOrg"),Ykt=Ae(function(){let t=Ae(function(t){return Pkt[t].processed},"compileTask"),e=!0;for(var[r,n]of Pkt.entries())t(r),e=e&&n.processed;return e},"compileTasks"),jkt=Ae(function(){return Gkt()},"getActors"),Hkt={getConfig:Ae(()=>D().journey,"getConfig"),clear:Bkt,setDiagramTitle:dc,getDiagramTitle:pc,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addSection:Fkt,getSections:$kt,getTasks:zkt,addTask:Ukt,addTaskOrg:qkt,getActors:jkt}}),h7t=t(()=>{Wkt=Ae(t=>`.label { +`+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{fh(),gh(),v6t="",x6t=[],b6t=[],w6t=[],k6t=Ae(function(){x6t.length=0,b6t.length=0,v6t="",w6t.length=0,oc()},"clear"),T6t=Ae(function(t){v6t=t,x6t.push(t)},"addSection"),_6t=Ae(function(){return x6t},"getSections"),E6t=Ae(function(){let t=L6t(),e=0;for(;!t&&e<100;)t=L6t(),e++;return b6t.push(...w6t),b6t},"getTasks"),C6t=Ae(function(){let e=[];return b6t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),S6t=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:v6t,type:v6t,people:e,task:t,score:n},w6t.push(e)},"addTask"),A6t=Ae(function(t){t={section:v6t,type:v6t,description:t,task:t,classes:[]},b6t.push(t)},"addTaskOrg"),L6t=Ae(function(){let t=Ae(function(t){return w6t[t].processed},"compileTask"),e=!0;for(var[r,n]of w6t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),N6t=Ae(function(){return C6t()},"getActors"),I6t={getConfig:Ae(()=>D().journey,"getConfig"),clear:k6t,setDiagramTitle:dc,getDiagramTitle:pc,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addSection:T6t,getSections:_6t,getTasks:E6t,addTask:S6t,addTaskOrg:A6t,getActors:N6t}}),X6t=t(()=>{M6t=Ae(t=>`.label { font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); color: ${t.textColor}; @@ -1829,12 +1828,12 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .actor-5 { ${t.actor5?"fill: "+t.actor5:""}; } -`,"getStyles"),Vkt=Wkt}),u7t=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(//gi);for(let t=0;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};Zkt(i,e),a+=10}),i7t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),n7t=Ae(function(t,e){v3(t,e)},"drawBackgroundRect"),Ae(e,"byText"),Ae(c,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),i7t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},a7t=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"),o7t={drawRect:Xkt,drawCircle:Zkt,drawSection:t7t,drawText:Qkt,drawLabel:Jkt,drawTask:r7t,drawBackgroundRect:n7t,initGraphics:a7t}});function d7t(r){let n=D().journey,i=60;Object.keys(g7t).forEach(t=>{var e=g7t[t].color,e={cx:20,cy:i,r:7,fill:e,stroke:"#000",pos:g7t[t].position},e=(o7t.drawCircle(r,e),{x:40,y:i+7,fill:"#666",text:t,textMargin:5|n.boxTextMargin});o7t.drawText(r,e),i+=20})}var p7t,g7t,f7t,m7t,y7t,v7t,x7t,b7t,w7t,k7t,T7t=t(()=>{Z3(),u7t(),fh(),tc(),p7t=Ae(function(e){Object.keys(e).forEach(function(t){f7t[t]=e[t]})},"setConf"),g7t={},Ae(d7t,"drawActorLegend"),f7t=D().journey,m7t=f7t.leftMargin,y7t=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=(v7t.init(),l.select("#"+e)),e=(o7t.initGraphics(l),n.db.getTasks()),c=n.db.getDiagramTitle(),n=n.db.getActors();for(s in g7t)delete g7t[s];let h=0;n.forEach(t=>{g7t[t]={color:i.actorColours[h%i.actorColours.length],position:h},h++}),d7t(l),v7t.insert(0,0,m7t,50*Object.keys(g7t).length),w7t(l,e,0);var n=v7t.getBounds(),e=(c&&l.append("text").text(c).attr("x",m7t).attr("font-size","4ex").attr("font-weight","bold").attr("y",25),n.stopy-n.starty+2*i.diagramMarginY),u=m7t+n.stopx+2*i.diagramMarginX,c=(Wl(l,e,u,i.useMaxWidth),l.append("line").attr("x1",m7t).attr("y1",4*i.height).attr("x2",u-m7t-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"),v7t={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(v7t.data,"startx",n-e*s.boxMargin,Math.min),l.updateVal(v7t.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(v7t.data,"starty",i-e*s.boxMargin,Math.min),l.updateVal(v7t.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(v7t.data,"startx",i,Math.min),this.updateVal(v7t.data,"starty",r,Math.min),this.updateVal(v7t.data,"stopx",t,Math.max),this.updateVal(v7t.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")},x7t=f7t.sectionFills,b7t=f7t.sectionColours,w7t=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=x7t[s%x7t.length],h=s%x7t.length,c=b7t[s%b7t.length];let e=0,r=d.section;for(let t=u;t(g7t[e]&&(t[e]=g7t[e]),t),{}),d.x=u*i.taskMargin+u*i.width+m7t,d.y=o,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,o7t.drawTask(t,d,i),v7t.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),k7t={setConf:p7t,draw:y7t}}),E7t={};_Bt(E7t,{diagram:()=>_7t});var _7t,C7t,S7t,A7t=t(()=>{l7t(),c7t(),h7t(),T7t(),_7t={parser:Mkt,db:Hkt,renderer:k7t,styles:Vkt,init:Ae(t=>{k7t.setConf(t.journey),Hkt.clear()},"init")}}),L7t=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"{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;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};P6t(i,e),a+=10}),q6t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),G6t=Ae(function(t,e){v3(t,e)},"drawBackgroundRect"),Ae(e,"byText"),Ae(c,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),q6t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},j6t=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"),Y6t={drawRect:D6t,drawCircle:P6t,drawSection:$6t,drawText:B6t,drawLabel:F6t,drawTask:U6t,drawBackgroundRect:G6t,initGraphics:j6t}});function Z6t(r){let n=D().journey,i=60;Object.keys(J6t).forEach(t=>{var e=J6t[t].color,e={cx:20,cy:i,r:7,fill:e,stroke:"#000",pos:J6t[t].position},e=(Y6t.drawCircle(r,e),{x:40,y:i+7,fill:"#666",text:t,textMargin:5|n.boxTextMargin});Y6t.drawText(r,e),i+=20})}var Q6t,J6t,twt,ewt,rwt,nwt,iwt,awt,swt,owt,lwt=t(()=>{Z3(),K6t(),fh(),tc(),Q6t=Ae(function(e){Object.keys(e).forEach(function(t){twt[t]=e[t]})},"setConf"),J6t={},Ae(Z6t,"drawActorLegend"),twt=D().journey,ewt=twt.leftMargin,rwt=Ae(function(t,e,r,n){let i=D().journey,a=D().securityLevel,s;"sandbox"===a&&(s=O("#i"+e));var o,l=O("sandbox"===a?s.nodes()[0].contentDocument.body:"body"),l=(nwt.init(),l.select("#"+e)),e=(Y6t.initGraphics(l),n.db.getTasks()),c=n.db.getDiagramTitle(),n=n.db.getActors();for(o in J6t)delete J6t[o];let h=0;n.forEach(t=>{J6t[t]={color:i.actorColours[h%i.actorColours.length],position:h},h++}),Z6t(l),nwt.insert(0,0,ewt,50*Object.keys(J6t).length),swt(l,e,0);var n=nwt.getBounds(),e=(c&&l.append("text").text(c).attr("x",ewt).attr("font-size","4ex").attr("font-weight","bold").attr("y",25),n.stopy-n.starty+2*i.diagramMarginY),u=ewt+n.stopx+2*i.diagramMarginX,c=(Wl(l,e,u,i.useMaxWidth),l.append("line").attr("x1",ewt).attr("y1",4*i.height).attr("x2",u-ewt-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"),nwt={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,s){let o=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*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(nwt.data,"startx",n-e*o.boxMargin,Math.min),l.updateVal(nwt.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(nwt.data,"starty",i-e*o.boxMargin,Math.min),l.updateVal(nwt.data,"stopy",s+e*o.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(nwt.data,"startx",i,Math.min),this.updateVal(nwt.data,"starty",r,Math.min),this.updateVal(nwt.data,"stopx",t,Math.max),this.updateVal(nwt.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")},iwt=twt.sectionFills,awt=twt.sectionColours,swt=Ae(function(t,n,e){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=iwt[o%iwt.length],h=o%iwt.length,c=awt[o%awt.length];let e=0,r=d.section;for(let t=u;t(J6t[e]&&(t[e]=J6t[e]),t),{}),d.x=u*i.taskMargin+u*i.width+ewt,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,Y6t.drawTask(t,d,i),nwt.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),owt={setConf:Q6t,draw:rwt}}),cwt={};SBt(cwt,{diagram:()=>hwt});var hwt,uwt,dwt,pwt=t(()=>{W6t(),V6t(),X6t(),lwt(),hwt={parser:y6t,db:I6t,renderer:owt,styles:R6t,init:Ae(t=>{owt.setConf(t.journey),I6t.clear()},"init")}}),gwt=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],s=[1,12],o=[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,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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 0U7t,addSection:()=>F7t,addTask:()=>G7t,addTaskOrg:()=>q7t,clear:()=>B7t,default:()=>j7t,getCommonDb:()=>P7t,getSections:()=>$7t,getTasks:()=>z7t});var I7t,M7t,R7t,D7t,O7t,P7t,B7t,F7t,$7t,z7t,G7t,U7t,q7t,Y7t,j7t,H7t=t(()=>{gh(),I7t="",M7t=0,R7t=[],D7t=[],O7t=[],P7t=Ae(()=>rc,"getCommonDb"),B7t=Ae(function(){R7t.length=0,D7t.length=0,I7t="",O7t.length=0,sc()},"clear"),F7t=Ae(function(t){I7t=t,R7t.push(t)},"addSection"),$7t=Ae(function(){return R7t},"getSections"),z7t=Ae(function(){let t=Y7t(),e=0;for(;!t&&e<100;)t=Y7t(),e++;return D7t.push(...O7t),D7t},"getTasks"),G7t=Ae(function(t,e,r){t={id:M7t++,section:I7t,type:I7t,task:t,score:e||0,events:r?[r]:[]},O7t.push(t)},"addTask"),U7t=Ae(function(t){O7t.find(t=>t.id===M7t-1).events.push(t)},"addEvent"),q7t=Ae(function(t){t={section:I7t,type:I7t,description:t,task:t,classes:[]},D7t.push(t)},"addTaskOrg"),Y7t=Ae(function(){let t=Ae(function(t){return O7t[t].processed},"compileTask"),e=!0;for(var[r,n]of O7t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),j7t={clear:B7t,getCommonDb:P7t,addSection:F7t,getSections:$7t,getTasks:z7t,addTask:G7t,addTaskOrg:q7t,addEvent:U7t}});function W7t(t,s){t.each(function(){var e,r=O(this),n=r.text().split(/(\s+|
)/).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;ts||"
"===e)&&(i.pop(),o.text(i.join(" ").trim()),i="
"===e?[""]:[e],o=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var 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=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(//gi);for(let t=0;t/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"),Q7t=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,Z7t(t,e)},"drawLabel"),J7t=Ae(function(t,e,r){var t=t.append("g"),n=iTt();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,V7t(t,n),aTt(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),tTt=-1,eTt=Ae(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");tTt++,t.append("line").attr("id","task"+tTt).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"),X7t(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=iTt()).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,V7t(t,n),aTt(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),rTt=Ae(function(t,e){V7t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),nTt=Ae(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),iTt=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"),aTt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},oTt=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(W7t,"wrap"),sTt=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(W7t,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+")"),cTt(i,e,r,n),e},"drawNode"),lTt=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(W7t,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"),cTt=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"),hTt={drawRect:V7t,drawCircle:K7t,drawSection:J7t,drawText:Z7t,drawLabel:Q7t,drawTask:eTt,drawBackgroundRect:rTt,getTextObj:nTt,getNoteRect:iTt,initGraphics:oTt,drawNode:sTt,getVirtualNodeHeight:lTt}}),xTt=t(()=>{Z3(),vTt(),e(),fh(),tc(),uTt=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),hTt.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=hTt.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=hTt.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+=hTt.getVirtualNodeHeight(l,E,i)}w=Math.max(w,t)}R.debug("maxSectionHeight before draw",p),R.debug("maxTaskHeight before draw",g),e&&0{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=hTt.drawNode(n,r,v,i);R.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:uTt}}),bTt=t(()=>{xn(),fTt=Ae(e=>{let r="";for(let t=0;tSwt,addSection:()=>Twt,addTask:()=>Cwt,addTaskOrg:()=>Awt,clear:()=>kwt,default:()=>Nwt,getCommonDb:()=>wwt,getSections:()=>_wt,getTasks:()=>Ewt});var mwt,ywt,vwt,xwt,bwt,wwt,kwt,Twt,_wt,Ewt,Cwt,Swt,Awt,Lwt,Nwt,Iwt=t(()=>{gh(),mwt="",ywt=0,vwt=[],xwt=[],bwt=[],wwt=Ae(()=>rc,"getCommonDb"),kwt=Ae(function(){vwt.length=0,xwt.length=0,mwt="",bwt.length=0,oc()},"clear"),Twt=Ae(function(t){mwt=t,vwt.push(t)},"addSection"),_wt=Ae(function(){return vwt},"getSections"),Ewt=Ae(function(){let t=Lwt(),e=0;for(;!t&&e<100;)t=Lwt(),e++;return xwt.push(...bwt),xwt},"getTasks"),Cwt=Ae(function(t,e,r){t={id:ywt++,section:mwt,type:mwt,task:t,score:e||0,events:r?[r]:[]},bwt.push(t)},"addTask"),Swt=Ae(function(t){bwt.find(t=>t.id===ywt-1).events.push(t)},"addEvent"),Awt=Ae(function(t){t={section:mwt,type:mwt,description:t,task:t,classes:[]},xwt.push(t)},"addTaskOrg"),Lwt=Ae(function(){let t=Ae(function(t){return bwt[t].processed},"compileTask"),e=!0;for(var[r,n]of bwt.entries())t(r),e=e&&n.processed;return e},"compileTasks"),Nwt={clear:kwt,getCommonDb:wwt,addSection:Twt,getSections:_wt,getTasks:Ewt,addTask:Cwt,addTaskOrg:Awt,addEvent:Swt}});function Mwt(t,o){t.each(function(){var e,r=O(this),n=r.text().split(/(\s+|
)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;to||"
"===e)&&(i.pop(),s.text(i.join(" ").trim()),i="
"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var Rwt,Dwt,Owt,Pwt,Bwt,Fwt,$wt,zwt,Uwt,Gwt,qwt,jwt,Ywt,Hwt,Wwt,Vwt,Xwt,Kwt,Zwt,Qwt,Jwt,tkt,ekt,rkt,nkt=t(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t/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"),Bwt=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,Pwt(t,e)},"drawLabel"),Fwt=Ae(function(t,e,r){var t=t.append("g"),n=qwt();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,Rwt(t,n),jwt(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),$wt=-1,zwt=Ae(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");$wt++,t.append("line").attr("id","task"+$wt).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"),Dwt(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=qwt()).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,Rwt(t,n),jwt(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),Uwt=Ae(function(t,e){Rwt(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),Gwt=Ae(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),qwt=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"),jwt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},Ywt=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(Mwt,"wrap"),Hwt=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(Mwt,e.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Vwt(i,e,r,n),e},"drawNode"),Wwt=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(Mwt,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"),Vwt=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"),Xwt={drawRect:Rwt,drawCircle:Owt,drawSection:Fwt,drawText:Pwt,drawLabel:Bwt,drawTask:zwt,drawBackgroundRect:Uwt,getTextObj:Gwt,getNoteRect:qwt,initGraphics:Ywt,drawNode:Hwt,getVirtualNodeHeight:Wwt}}),ikt=t(()=>{Z3(),nkt(),e(),fh(),tc(),Kwt=Ae(function(t,e,r,n){let i=D(),a=i.leftMargin??50,s=(R.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=O("#i"+e)),O("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();R.debug("task",c),Xwt.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=Xwt.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=Xwt.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 _={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=Xwt.getVirtualNodeHeight(l,_,i)}w=Math.max(w,t)}R.debug("maxSectionHeight before draw",p),R.debug("maxTaskHeight before draw",g),e&&0{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=Xwt.drawNode(n,r,v,i);R.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:Kwt}}),akt=t(()=>{xn(),tkt=Ae(e=>{let r="";for(let t=0;t` + `}return r},"genSections"),ekt=Ae(t=>` .edge { stroke-width: 3; } - ${fTt(t)} + ${tkt(t)} .section-root rect, .section-root path, .section-root circle { fill: ${t.git0}; } @@ -1889,31 +1888,31 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .eventWrapper { filter: brightness(120%); } -`,"getStyles"),yTt=mTt}),wTt={};_Bt(wTt,{diagram:()=>kTt});var kTt,TTt,ETt,_Tt,CTt,STt,ATt,LTt,NTt,ITt,MTt,RTt,DTt,OTt,PTt,BTt,FTt,$Tt,zTt=t(()=>{L7t(),H7t(),xTt(),bTt(),kTt={db:N7t,renderer:gTt,parser:S7t,styles:yTt}}),GTt=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"okt});var okt,lkt,ckt,hkt,ukt,dkt,pkt,gkt,fkt,mkt,ykt,vkt,xkt,bkt,wkt,kkt,Tkt,_kt,Ekt=t(()=>{gwt(),Iwt(),ikt(),akt(),okt={db:fwt,renderer:Jwt,parser:dwt,styles:rkt}}),Ckt=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],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace: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,s){var o=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[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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{fh(),Jl(),e(),Ln(),_Tt=[],CTt=0,STt={},ATt=Ae(()=>{_Tt=[],CTt=0,STt={}},"clear"),LTt=Ae(function(e){for(let t=_Tt.length-1;0<=t;t--)if(_Tt[t].level0<_Tt.length?_Tt[0]:null,"getMindmap"),ITt=Ae((t,e,r,n)=>{R.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??vr.mindmap.padding;switch(n){case MTt.ROUNDED_RECT:case MTt.RECT:case MTt.HEXAGON:a*=2}if(e={id:CTt++,nodeId:Cl(e,i),level:t,descr:Cl(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??vr.mindmap.maxNodeWidth,padding:a},r=LTt(t))r.children.push(e);else if(0!==_Tt.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');_Tt.push(e)},"addNode"),MTt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},RTt=Ae((t,e)=>{switch(R.debug("In get type",t,e),t){case"[":return MTt.RECT;case"(":return")"===e?MTt.ROUNDED_RECT:MTt.CLOUD;case"((":return MTt.CIRCLE;case")":return MTt.CLOUD;case"))":return MTt.BANG;case"{{":return MTt.HEXAGON;default:return MTt.DEFAULT}},"getType"),DTt=Ae((t,e)=>{STt[t]=e},"setElementForId"),OTt=Ae(t=>{var e,r;t&&(e=D(),r=_Tt[_Tt.length-1],t.icon&&(r.icon=Cl(t.icon,e)),t.class)&&(r.class=Cl(t.class,e))},"decorateNode"),PTt=Ae(t=>{switch(t){case MTt.DEFAULT:return"no-border";case MTt.RECT:return"rect";case MTt.ROUNDED_RECT:return"rounded-rect";case MTt.CIRCLE:return"circle";case MTt.CLOUD:return"cloud";case MTt.BANG:return"bang";case MTt.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),BTt=Ae(()=>R,"getLogger"),FTt=Ae(t=>STt[t],"getElementById"),$Tt={clear:ATt,addNode:ITt,getMindmap:NTt,nodeType:MTt,getType:RTt,setElementForId:DTt,decorateNode:OTt,type2Str:PTt,getLogger:BTt,getElementById:FTt}});function qTt(t){return(qTt="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 YTt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jTt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=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 e8t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function r8t(t,e){return t(e={exports:{}},e.exports),e.exports}function n8t(t){for(var e=t.length;e--&&K_t.test(t.charAt(e)););return e}function i8t(t){return t&&t.slice(0,Z_t(t)+1).replace(Q_t,"")}function a8t(t){var e=tCt.call(t,rCt),r=t[rCt];try{var n=!(t[rCt]=void 0)}catch{}var i=eCt.call(t);return n&&(e?t[rCt]=r:delete t[rCt]),i}function o8t(t){return iCt.call(t)}function s8t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(oCt&&oCt in Object(t)?nCt:aCt)(t)}function l8t(t){return null!=t&&"object"==typeof t}function c8t(t){return"symbol"==typeof t||lCt(t)&&"[object Symbol]"==sCt(t)}function h8t(t){if("number"==typeof t)return t;if(cCt(t))return hCt;if(H_t(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=H_t(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=J_t(t);var e=dCt.test(t);return e||pCt.test(t)?gCt(t.slice(2),e?2:8):uCt.test(t)?hCt:+t}function u8t(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?yCt(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=X_t();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(X_t())}function w(){var t=X_t(),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=fCt(r)||0,H_t(t)&&(e=!!t.leading,u="maxWait"in t,o=u?mCt(fCt(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 d8t(t,e,r,n,i,a){var o=d_t(t)?t:UAt[t]||UAt.euclidean;return 0===e&&d_t(t)?o(i,a):o(e,r,n,i,a)}function p8t(t,e){var r;return!A9t(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!cCt(t))||N9t.test(t)||!L9t.test(t)||null!=e&&t in Object(e))}function g8t(t){return!!H_t(t)&&("[object Function]"==(t=sCt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function f8t(t){return!!R9t&&R9t in t}function m8t(t){if(null!=t){try{return O9t.call(t)}catch{}try{return t+""}catch{}}return""}function y8t(t){return!(!H_t(t)||D9t(t))&&(M9t(t)?F9t:B9t).test(P9t(t))}function v8t(t,e){return t?.[e]}function x8t(t,e){return t=z9t(t,e),$9t(t)?t:void 0}function b8t(){this.__data__=U9t?U9t(null):{},this.size=0}function w8t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function k8t(t){var e,r=this.__data__;return U9t?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:q9t.call(r,t)?r[t]:void 0}function T8t(t){var e=this.__data__;return U9t?void 0!==e[t]:Y9t.call(e,t)}function E8t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=U9t&&void 0===e?"__lodash_hash_undefined__":e,this}function _8t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{function n(t){if(YTt(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{if(i_t){if(i_t.requestAnimationFrame)return function(t){i_t.requestAnimationFrame(t)};if(i_t.mozRequestAnimationFrame)return function(t){i_t.mozRequestAnimationFrame(t)};if(i_t.webkitRequestAnimationFrame)return function(t){i_t.webkitRequestAnimationFrame(t)};if(i_t.msRequestAnimationFrame)return function(t){i_t.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(bCt())},1e3/60)}})(),kCt=Ae(function(t){return wCt(t)},"requestAnimationFrame"),TCt=bCt,ECt=Ae(function(t){for(var e,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;ny&&(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=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"),RSt=Ae(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),DSt=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"),OSt=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"),PSt=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"),BSt=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"),FSt=Ae(function(t){var e=1e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),USt=Ae(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),qSt=Ae(function(t,e){return USt(t,e.x,e.y)},"pointInBoundingBox"),YSt=Ae(function(t,e){return USt(t,e.x1,e.y1)&&USt(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),jSt=Ae(function(t,e,r,n,i,a,o){var s,l="auto"===(l=7=u&&c[1]<=s||0<(c=aAt(t,e,r,n,h=r+i-l,u=n+a-l,l+o)).length&&c[0]>=h&&c[1]>=u||0<(c=aAt(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"),HSt=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"),WSt=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!(ts&&(s=e[o][c],l=c);i[l].push(t[o])}for(var h=0;h=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;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]o&&(o=e[i*t+(a=l)])}0=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,M=0;M{var t=s[e];null!=t&&null!=t.then?t.then(function(t){o(e,t)},function(t){n(t)}):o(e,t)})(t)})},b9t.resolve=function(r){return new b9t(function(t,e){t(r)})},b9t.reject=function(r){return new b9t(function(t,e){e(r)})},C9t=typeof Promise<"u"?Promise:b9t,S9t=Ae(function(t,e,r){var n=w_t(t),i=!n;(e=this._private=B_t({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&&d_t(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"),EMt=S9t.prototype,B_t(EMt,{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),v_t(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{try{var t=G9t(Object,"defineProperty");return t({},"",{}),t}catch{}})(),gLt=JIt,Ae(Z8t,"baseAssignValue"),fLt=Z8t,dMt=Object.prototype,mLt=dMt.hasOwnProperty,Ae(Q8t,"assignValue"),yLt=Q8t,vLt=/^(?:0|[1-9]\d*)$/,Ae(J8t,"isIndex"),xLt=J8t,Ae(tEt,"baseSet"),bLt=tEt,Ae(eEt,"set"),wLt=eEt,Ae(rEt,"copyArray"),kLt=rEt,Ae(nEt,"toPath"),TLt=nEt,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=B_t({},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(u_t(t)){var l,c=-1!==t.indexOf(".")&&TLt(t);if(n.allowGetting&&void 0===e)return s&&(n.beforeGet(s),l=c&&void 0===s._private[n.field][t]?pLt(s._private[n.field],c):s._private[n.field][t]),l;if(n.allowSetting&&void 0!==e&&!n.immutableKeys[t]){a=WTt({},t,e),n.beforeSet(i,a);for(var h=0,u=o.length;h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:D_t,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+_Lt.metaChar+"))+",_Lt.className="(?:[\\w-]|(?:\\\\"+_Lt.metaChar+"))+",_Lt.value=_Lt.string+"|"+_Lt.number,_Lt.id=_Lt.variable;for(var e,r=_Lt.comparatorOp.split("|"),i=0;i{for(var t,e={},r=0;r")+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":u=!0,n=r=":u=!0,n=r<=t;break;case"<":u=!0,n=ta.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){YCt("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 ULt(o).invalid)YCt("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*$)/))){YCt("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}):YCt("Skipping property: Invalid property definition in: "+u):YCt("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(o);for(var g=0;gl.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:wSt(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;Ethis._private.maxZoom?this._private.maxZoom: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=!n.zoomingEnabled;return it(t)?r=t:g_t(t)&&(r=t.level,null!=t.position?e=gSt(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(o=!0),r=(r=r>n.maxZoom?n.maxZoom: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=r.numIter||(QNt(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature=r.animationThreshold&&o(),kCt(t)):(hIt(i,r),l())},"frame")();else{for(;h;)h=s(c),c++;hIt(i,r),l()}return this},DEt.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},DEt.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},HNt=Ae(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=MSt(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;cn.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop(e=ZSt(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(e=KSt(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;uMath.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=ESt(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=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=_St({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))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=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=mSt(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=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=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=.2*t.width&&this.retireTexture(t)},H.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,QCt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),ZCt(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=f||!YSt(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;ih.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{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;rt&&(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.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=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]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;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||s>=a[0].length))for(var l=0;l{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(IMt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(IMt()):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;in&&(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;al&&(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.heightt.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;nr&&(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]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;so&&(o=n[s].height);0{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(MMt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(MMt()):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{pN(),X8(),OMt=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"),PMt=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"),BMt=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} +`+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{fh(),Jl(),e(),Ln(),hkt=[],ukt=0,dkt={},pkt=Ae(()=>{hkt=[],ukt=0,dkt={}},"clear"),gkt=Ae(function(e){for(let t=hkt.length-1;0<=t;t--)if(hkt[t].level0{R.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??vr.mindmap.padding;switch(n){case ykt.ROUNDED_RECT:case ykt.RECT:case ykt.HEXAGON:a*=2}if(e={id:ukt++,nodeId:Cl(e,i),level:t,descr:Cl(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??vr.mindmap.maxNodeWidth,padding:a},r=gkt(t))r.children.push(e);else if(0!==hkt.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');hkt.push(e)},"addNode"),ykt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},vkt=Ae((t,e)=>{switch(R.debug("In get type",t,e),t){case"[":return ykt.RECT;case"(":return")"===e?ykt.ROUNDED_RECT:ykt.CLOUD;case"((":return ykt.CIRCLE;case")":return ykt.CLOUD;case"))":return ykt.BANG;case"{{":return ykt.HEXAGON;default:return ykt.DEFAULT}},"getType"),xkt=Ae((t,e)=>{dkt[t]=e},"setElementForId"),bkt=Ae(t=>{var e,r;t&&(e=D(),r=hkt[hkt.length-1],t.icon&&(r.icon=Cl(t.icon,e)),t.class)&&(r.class=Cl(t.class,e))},"decorateNode"),wkt=Ae(t=>{switch(t){case ykt.DEFAULT:return"no-border";case ykt.RECT:return"rect";case ykt.ROUNDED_RECT:return"rounded-rect";case ykt.CIRCLE:return"circle";case ykt.CLOUD:return"cloud";case ykt.BANG:return"bang";case ykt.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),kkt=Ae(()=>R,"getLogger"),Tkt=Ae(t=>dkt[t],"getElementById"),_kt={clear:pkt,addNode:mkt,getMindmap:fkt,nodeType:ykt,getType:vkt,setElementForId:xkt,decorateNode:bkt,type2Str:wkt,getLogger:kkt,getElementById:Tkt}});function Akt(t){return(Akt="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 Lkt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nkt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=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 zkt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ukt(t,e){return t(e={exports:{}},e.exports),e.exports}function Gkt(t){for(var e=t.length;e--&&O8t.test(t.charAt(e)););return e}function qkt(t){return t&&t.slice(0,P8t(t)+1).replace(B8t,"")}function jkt(t){var e=$8t.call(t,U8t),r=t[U8t];try{var n=!(t[U8t]=void 0)}catch{}var i=z8t.call(t);return n&&(e?t[U8t]=r:delete t[U8t]),i}function Ykt(t){return q8t.call(t)}function Hkt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(Y8t&&Y8t in Object(t)?G8t:j8t)(t)}function Wkt(t){return null!=t&&"object"==typeof t}function Vkt(t){return"symbol"==typeof t||W8t(t)&&"[object Symbol]"==H8t(t)}function Xkt(t){if("number"==typeof t)return t;if(V8t(t))return X8t;if(I8t(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=I8t(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=F8t(t);var e=Z8t.test(t);return e||Q8t.test(t)?J8t(t.slice(2),e?2:8):K8t.test(t)?X8t:+t}function Kkt(n,r,t){var i,a,s,o,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,o=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?r_t(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=D8t();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,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(D8t())}function w(){var t=D8t(),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)),o}return r=t_t(r)||0,I8t(t)&&(e=!!t.leading,u="maxWait"in t,s=u?e_t(t_t(t.maxWait)||0,r):s,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 Zkt(t,e,r,n,i,a){var s=ZTt(t)?t:SCt[t]||SCt.euclidean;return 0===e&&ZTt(t)?s(i,a):s(e,r,n,i,a)}function Qkt(t,e){var r;return!pSt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!V8t(t))||fSt.test(t)||!gSt.test(t)||null!=e&&t in Object(e))}function Jkt(t){return!!I8t(t)&&("[object Function]"==(t=H8t(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function t7t(t){return!!vSt&&vSt in t}function e7t(t){if(null!=t){try{return bSt.call(t)}catch{}try{return t+""}catch{}}return""}function r7t(t){return!(!I8t(t)||xSt(t))&&(ySt(t)?TSt:kSt).test(wSt(t))}function n7t(t,e){return t?.[e]}function i7t(t,e){return t=ESt(t,e),_St(t)?t:void 0}function a7t(){this.__data__=SSt?SSt(null):{},this.size=0}function s7t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function o7t(t){var e,r=this.__data__;return SSt?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:ASt.call(r,t)?r[t]:void 0}function l7t(t){var e=this.__data__;return SSt?void 0!==e[t]:LSt.call(e,t)}function c7t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=SSt&&void 0===e?"__lodash_hash_undefined__":e,this}function h7t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{function n(t){if(Lkt(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{if(qTt){if(qTt.requestAnimationFrame)return function(t){qTt.requestAnimationFrame(t)};if(qTt.mozRequestAnimationFrame)return function(t){qTt.mozRequestAnimationFrame(t)};if(qTt.webkitRequestAnimationFrame)return function(t){qTt.webkitRequestAnimationFrame(t)};if(qTt.msRequestAnimationFrame)return function(t){qTt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(a_t())},1e3/60)}})(),o_t=Ae(function(t){return s_t(t)},"requestAnimationFrame"),l_t=a_t,c_t=Ae(function(t){for(var e,r=1>1])<0;)t[r]=a,r=s;return t[r]=i},"_siftdown"),u=Ae(function(t,e,r){var n,i,a,s,o;for(null==r&&(r=d),i=t.length,a=t[o=e],n=2*e+1;ny&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k=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"),vEt=Ae(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),xEt=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"),bEt=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"),wEt=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"),kEt=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"),TEt=Ae(function(t){var e=1e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),SEt=Ae(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),AEt=Ae(function(t,e){return SEt(t,e.x,e.y)},"pointInBoundingBox"),LEt=Ae(function(t,e){return SEt(t,e.x1,e.y1)&&SEt(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),NEt=Ae(function(t,e,r,n,i,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=jEt(t,e,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=jEt(t,e,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),IEt=Ae(function(t,e,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=t&&t<=r+s&&i-s<=e&&e<=n+s},"inLineVicinity"),MEt=Ae(function(t,e,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(to&&(o=e[s][c],l=c);i[l].push(t[s])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p=e[s],g=e[n[s]],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;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=e[i*t+(a=l)])}0=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,M=0;M{var t=o[e];null!=t&&null!=t.then?t.then(function(t){s(e,t)},function(t){n(t)}):s(e,t)})(t)})},aSt.resolve=function(r){return new aSt(function(t,e){t(r)})},aSt.reject=function(r){return new aSt(function(t,e){e(r)})},uSt=typeof Promise<"u"?Promise:aSt,dSt=Ae(function(t,e,r){var n=s8t(t),i=!n;(e=this._private=k8t({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&&ZTt(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"),cNt=dSt.prototype,k8t(cNt,{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),n8t(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{try{var t=CSt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),JSt=FLt,Ae(P7t,"baseAssignValue"),tAt=P7t,ZLt=Object.prototype,eAt=ZLt.hasOwnProperty,Ae(B7t,"assignValue"),rAt=B7t,nAt=/^(?:0|[1-9]\d*)$/,Ae(F7t,"isIndex"),iAt=F7t,Ae($7t,"baseSet"),aAt=$7t,Ae(z7t,"set"),sAt=z7t,Ae(U7t,"copyArray"),oAt=U7t,Ae(G7t,"toPath"),lAt=G7t,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=k8t({},t,b),Ae(function(t,e){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(KTt(t)){var l,c=-1!==t.indexOf(".")&&lAt(t);if(n.allowGetting&&void 0===e)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][t]?QSt(o._private[n.field],c):o._private[n.field][t]),l;if(n.allowSetting&&void 0!==e&&!n.immutableKeys[t]){a=Mkt({},t,e),n.beforeSet(i,a);for(var h=0,u=s.length;h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:x8t,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+hAt.metaChar+"))+",hAt.className="(?:[\\w-]|(?:\\\\"+hAt.metaChar+"))+",hAt.value=hAt.string+"|"+hAt.number,hAt.id=hAt.variable;for(var e,r=hAt.comparatorOp.split("|"),i=0;i{for(var t,e={},r=0;r")+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),s=h(t.right,e);return a+(0":u=!0,n=r=":u=!0,n=r<=t;break;case"<":u=!0,n=ta.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){L_t("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=i[0],s=i[1];if("core"!==s&&new SAt(s).invalid)L_t("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){L_t("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?h.push({name:d,val:p}):L_t("Skipping property: Invalid property definition in: "+u):L_t("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:e,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:sEt(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),_=0;_this._private.maxZoom?this._private.maxZoom: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,s=!n.zoomingEnabled;return it(t)?r=t:JTt(t)&&(r=t.level,null!=t.position?e=J_t(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom: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,s=!1),it(r.y)&&(e.pan.y=r.y,s=!1),s)||i.push("pan"),0=r.numIter||(B9t(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature=r.animationThreshold&&s(),o_t(t)):(X9t(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;X9t(i,r),l()}return this},xTt.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},xTt.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},I9t=Ae(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=yEt(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={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},o=r.eles.components(),l={},c=0;cn.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop(e=PEt(y,v,h[u],h[u+1],h[u+2],h[u+3])))return _(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(e=OEt(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return _(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;uMath.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=cEt(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=e/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=t.pstyle("taxi-radius").value,g="arc-radius"===t.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,_=t._private.rscratch;"bezier"===_.edgeType&&(m=e.srcPos,r=e.tgtPos,n=e.srcW,i=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!it(_.startX)||!it(_.startY),f=!it(_.arrowStartX)||!it(_.arrowStartY),c=!it(_.endX)||!it(_.endY),h=!it(_.arrowEndX)||!it(_.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=hEt({x:_.ctrlpts[0],y:_.ctrlpts[1]},{x:_.startX,y:_.startY}))i.poolIndex()&&(t=n,n=i,i=t),e.srcPos=n.position()),s=e.tgtPos=i.position(),o=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=N.desktopTapThreshold2),v(t)),o=(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])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},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}),s={x:0,y:0},it(f[0])&&it(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&it(n[0])&&it(n[1])&&(s.x+=n[0],s.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),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=eEt(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,s,o,l;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),n=N.selection,o=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?(s={originalEvent:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,2.25<=(o=nt(x,b,w,k))/U||22500<=o)&&(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=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,o,s);if(!(0=.2*t.width&&this.retireTexture(t)},H.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,B_t(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),P_t(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=f||!LEt(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;o||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return o||(m?null:h)},j.getEleLevelForLayerLevel=function(t,e){return t},j.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))},j.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;ih.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 _(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):s||void 0!==e&&!e||t.clearRect(0,0,i,a),o||(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(_,"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,E=u.contexts[h.NODE],p=h.textureCache.texture,w=h.textureCache.viewport,E.setTransform(1,0,0,1,0,0),t?T(E,0,0,w.width,w.height):E.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(E,g[0],g[1],g[2],S),E.fillRect(0,0,w.width,w.height),y=n.zoom(),_(E,!1),E.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/r,w.height/w.zoom/r),E.drawImage(p,w.mpan.x,w.mpan.y,w.width/w.zoom/r,w.height/w.zoom/r)):h.textureOnViewport&&!s&&(h.textureCache=null);var E,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]||o||e||S[h.NODE])&&(C=t&&!S[h.NODE]&&1!==d,_(E=s||(C?h.data.bufferContexts[h.MOTIONBLUR_BUFFER_NODE]:u.contexts[h.NODE]),t&&!C?"motionBlur":void 0),p?h.drawCachedNodes(E,k.nondrag,r,g):h.drawLayeredElements(E,k.nondrag,r,g),h.debug&&h.drawDebugPoints(E,k.nondrag),o||t||(i[h.NODE]=!1)),!e&&(i[h.DRAG]||o||S[h.DRAG])&&(C=t&&!S[h.DRAG]&&1!==d,_(E=s||(C?h.data.bufferContexts[h.MOTIONBLUR_BUFFER_DRAG]:u.contexts[h.DRAG]),t&&!C?"motionBlur":void 0),p?h.drawCachedNodes(E,k.drag,r,g):h.drawCachedElements(E,k.drag,r,g),h.debug&&h.drawDebugPoints(E,k.drag),o||t||(i[h.DRAG]=!1)),(h.showFps||!e&&i[h.SELECT_BOX]&&!o)&&(_(E=s||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,E.lineWidth=C,E.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+")",E.fillRect(h.selection[0],h.selection[1],h.selection[2]-h.selection[0],h.selection[3]-h.selection[1]),0{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),s=r(9);function o(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(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=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 s(e.x,e.y,r.width,r.height):new s}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;rt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,r){function 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),s=r(6),o=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 s?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.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=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]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;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(mNt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(mNt()):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 s(t,e,r,n){i.call(this,t,e,r,n)}for(n in Ae(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;in&&(n=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(t,e,r){var 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;al&&(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.heightt.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;nr&&(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]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 s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(yNt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(yNt()):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,s={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 o(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=o(s,t),c(this.options)}Ae(o,"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 s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),c);for(var n=0;n{UE(),K8(),bNt=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"),wNt=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"),kNt=Ae(function(t,e,r){var n=r.width,i=r.height,a=.15*n,s=.25*n,o=.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${o},${o} 1 0,1 ${.4*n},${-1*n*.1} + a${s},${s} 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${s},${a} 1 0,1 ${-1*n*.25},${.15*n} + a${o},${o} 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"),FMt=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} + H0 V0 Z`)},"cloudBkg"),TNt=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} @@ -1931,9 +1930,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 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"),$Mt=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(DMt,"insertPolygonShape"),zMt=Ae(function(t,e,r){var n=r.height,i=n/4,a=r.width-r.padding+2*i;DMt(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"),GMt=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"),UMt=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(/()/g,` -`),c=(await hN(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]=Y8(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,e.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case t.nodeType.DEFAULT:OMt(t,l,r,o);break;case t.nodeType.ROUNDED_RECT:GMt(t,l,r,o);break;case t.nodeType.RECT:PMt(t,l,r,o);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),$Mt(t,l,r,o);break;case t.nodeType.CLOUD:BMt(t,l,r,o);break;case t.nodeType.BANG:FMt(t,l,r,o);break;case t.nodeType.HEXAGON:zMt(t,l,r,o)}return t.setElementForId(r.id,n),r.height},"drawNode"),qMt=Ae(function(t,e){var t=t.getElementById(e.id),r=e.x||0;t.attr("transform","translate("+r+","+(e.y||0)+")")},"positionNode")});async function jMt(r,n,t,i,a){await UMt(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>jMt(r,n,t,i<0?e:i,a)))}function HMt(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 WMt(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=>{WMt(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 VMt(n,i){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),r=LMt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),WMt(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 XMt(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,qMt(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 KMt,ZMt,QMt,JMt,tRt,eRt=t(()=>{NMt(),KMt=et(RMt(),1),Z3(),fh(),e(),jft(),tc(),YMt(),Ln(),LMt.use(KMt.default),Ae(jMt,"drawNodes"),Ae(HMt,"drawEdges"),Ae(WMt,"addNodes"),Ae(VMt,"layoutMindmap"),Ae(XMt,"positionNodes"),KMt=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=Fft(e)).append("g")).attr("class","mindmap-edges"),(o=e.append("g")).attr("class","mindmap-nodes"),await jMt(t,o,n,-1,i),HMt(a,o=await VMt(n,i)),XMt(t,o),Vl(void 0,e,i.mindmap?.padding??vr.mindmap.padding,i.mindmap?.useMaxWidth??vr.mindmap.useMaxWidth))},"draw"),ZMt={draw:KMt}}),rRt=t(()=>{xn(),QMt=Ae(e=>{let r="";for(let t=0;t)/g,` +`),c=(await zE(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]=Y8(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-"+s+" "+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-"+s+" "+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,e.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case t.nodeType.DEFAULT:bNt(t,l,r,s);break;case t.nodeType.ROUNDED_RECT:CNt(t,l,r,s);break;case t.nodeType.RECT:wNt(t,l,r,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),_Nt(t,l,r,s);break;case t.nodeType.CLOUD:kNt(t,l,r,s);break;case t.nodeType.BANG:TNt(t,l,r,s);break;case t.nodeType.HEXAGON:ENt(t,l,r,s)}return t.setElementForId(r.id,n),r.height},"drawNode"),ANt=Ae(function(t,e){var t=t.getElementById(e.id),r=e.x||0;t.attr("transform","translate("+r+","+(e.y||0)+")")},"positionNode")});async function NNt(r,n,t,i,a){await SNt(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>NNt(r,n,t,i<0?e:i,a)))}function INt(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 MNt(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=>{MNt(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 RNt(n,i){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),r=gNt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),MNt(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 DNt(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,ANt(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 ONt,PNt,BNt,FNt,$Nt,zNt=t(()=>{fNt(),ONt=et(vNt(),1),Z3(),fh(),e(),smt(),tc(),LNt(),Ln(),gNt.use(ONt.default),Ae(NNt,"drawNodes"),Ae(INt,"drawEdges"),Ae(MNt,"addNodes"),Ae(RNt,"layoutMindmap"),Ae(DNt,"positionNodes"),ONt=Ae(async(t,e,r,n)=>{var i,a,s;R.debug(`Rendering mindmap diagram +`+t),(n=(t=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(e=Jft(e)).append("g")).attr("class","mindmap-edges"),(s=e.append("g")).attr("class","mindmap-nodes"),await NNt(t,s,n,-1,i),INt(a,s=await RNt(n,i)),DNt(t,s),Vl(void 0,e,i.mindmap?.padding??vr.mindmap.padding,i.mindmap?.useMaxWidth??vr.mindmap.useMaxWidth))},"draw"),PNt={draw:ONt}}),UNt=t(()=>{xn(),BNt=Ae(e=>{let r="";for(let t=0;t` + `}return r},"genSections"),FNt=Ae(t=>` .edge { stroke-width: 3; } - ${QMt(t)} + ${BNt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } @@ -1988,16 +1987,103 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho dominant-baseline: middle; text-align: center; } -`,"getStyles"),tRt=JMt}),nRt={};_Bt(nRt,{diagram:()=>iRt});var iRt,aRt,oRt,sRt,lRt,cRt,hRt,uRt,dRt,pRt,gRt,fRt,mRt,yRt,vRt,xRt=t(()=>{GTt(),UTt(),eRt(),rRt(),iRt={db:$Tt,renderer:ZMt,parser:ETt,styles:tRt}}),bRt=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"qNt});var qNt,jNt,YNt,HNt,WNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt,rIt,nIt,iIt,aIt,sIt,oIt,lIt,cIt,hIt,uIt,dIt,pIt,gIt=t(()=>{Ckt(),Skt(),zNt(),UNt(),qNt={db:_kt,renderer:PNt,parser:ckt,styles:$Nt}}),fIt=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],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=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[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:n,9:22,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:g}),e(p,[2,22]),e(p,[2,23]),e(f,[2,25]),e(f,[2,26]),e(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(p,[2,16],{15:37,24:g}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(f,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(p,[2,15],{24:b}),e(f,[2,30]),{22:[1,41]},e(f,[2,27]),e(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};r.lexer=c,Ae(t,"Parser"),(jNt=new((t.prototype=r).Parser=t)).parser=jNt,YNt=jNt}),mIt=t(()=>{fh(),Jl(),e(),Ln(),EM(),HNt=[],WNt=[],VNt=0,XNt={},KNt=Ae(()=>{HNt=[],WNt=[],VNt=0,XNt={}},"clear"),ZNt=Ae(t=>{if(0===HNt.length)return null;let e=HNt[0].level,r=null;for(let t=HNt.length-1;0<=t;t--)if(HNt[t].level===e&&(r=r||HNt[t]),HNt[t].levelt.parentId===e.id)){var s={id:i.id,parentId:e.id,label:Cl(i.label??"",n),isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:D()}},"getData"),tIt=Ae((t,e,r,n,i)=>{let a=D(),s=a.mindmap?.padding??vr.mindmap.padding;switch(n){case eIt.ROUNDED_RECT:case eIt.RECT:case eIt.HEXAGON:s*=2}if(n={id:Cl(e,a)||"kbn"+VNt++,level:t,label:Cl(r,a),width:a.mindmap?.maxNodeWidth??vr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(` +`)?i+` +`:`{ +`+i+` +}`,(e=_M(i,{schema:TM})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(n.shape=e?.shape),e?.label&&(n.label=e?.label),e?.icon&&(n.icon=e?.icon),e?.assigned&&(n.assigned=e?.assigned),e?.ticket&&(n.ticket=e?.ticket),e?.priority&&(n.priority=e?.priority)}(r=ZNt(t))?n.parentId=r.id||"kbn"+VNt++:WNt.push(n),HNt.push(n)},"addNode"),eIt={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},rIt=Ae((t,e)=>{switch(R.debug("In get type",t,e),t){case"[":return eIt.RECT;case"(":return")"===e?eIt.ROUNDED_RECT:eIt.CLOUD;case"((":return eIt.CIRCLE;case")":return eIt.CLOUD;case"))":return eIt.BANG;case"{{":return eIt.HEXAGON;default:return eIt.DEFAULT}},"getType"),nIt=Ae((t,e)=>{XNt[t]=e},"setElementForId"),iIt=Ae(t=>{var e,r;t&&(e=D(),r=HNt[HNt.length-1],t.icon&&(r.icon=Cl(t.icon,e)),t.class)&&(r.cssClasses=Cl(t.class,e))},"decorateNode"),aIt=Ae(t=>{switch(t){case eIt.DEFAULT:return"no-border";case eIt.RECT:return"rect";case eIt.ROUNDED_RECT:return"rounded-rect";case eIt.CIRCLE:return"circle";case eIt.CLOUD:return"cloud";case eIt.BANG:return"bang";case eIt.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),sIt=Ae(()=>R,"getLogger"),oIt=Ae(t=>XNt[t],"getElementById"),lIt={clear:KNt,addNode:tIt,getSections:QNt,getData:JNt,nodeType:eIt,getType:rIt,setElementForId:nIt,decorateNode:iIt,type2Str:aIt,getLogger:sIt,getElementById:oIt}}),yIt=t(()=>{fh(),e(),smt(),tc(),Ln(),YR(),OD(),cIt=Ae(async(t,e,r,n)=>{R.debug(`Rendering kanban diagram +`+t);var i,a=n.db.getData(),s=D(),o=(s.htmlLabels=!1,(t=Jft(e)).append("g")),l=(o.attr("class","sections"),t.append("g"));l.attr("class","items");let c=a.nodes.filter(t=>t.isGroup),h=0,u=[],d=25;for(i of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,i.x=p*h+10*(h-1)/2,i.width=p,i.y=0,i.height=3*p,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+h,await zR(o,i));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let i of c){var f,m=u[g];g+=1;let t=s?.kanban?.sectionWidth||200,e=3*-t/2+d,r=e,n=a.nodes.filter(t=>t.parentId===i.id);for(f of n){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=i.x,f.width=t-15;var y=(await LD(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await RD(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-e+30,50)+(d-25);m.attr("height",v)}Vl(void 0,t,s.mindmap?.padding??vr.kanban.padding,s.mindmap?.useMaxWidth??vr.kanban.useMaxWidth)},"draw"),hIt={draw:cIt}}),vIt=t(()=>{xn(),uIt=Ae(r=>{let e="";for(let t=0;t(r.darkMode?Xe:We)(t,e),"adjuster");for(let t=0;t` + .edge { + stroke-width: 3; + } + ${uIt(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${t.textColor}; + fill: ${t.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),pIt=dIt}),xIt={};SBt(xIt,{diagram:()=>bIt});var bIt,wIt,kIt,TIt,_It,EIt,CIt,SIt,AIt,LIt,NIt,IIt,MIt,RIt,DIt,OIt=t(()=>{fIt(),mIt(),yIt(),vIt(),bIt={db:lIt,renderer:hIt,parser:YNt,styles:pIt}}),PIt=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,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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{fh(),Jl(),gh(),sRt=[],lRt=[],cRt=new Map,hRt=Ae(()=>{sRt=[],lRt=[],cRt=new Map,sc()},"clear"),uRt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{Ae(this,"SankeyLink")}},dRt=Ae((t,e,r)=>{sRt.push(new uRt(t,e,r))},"addLink"),pRt=class{constructor(t){this.ID=t}static{Ae(this,"SankeyNode")}},gRt=Ae(t=>{t=L.sanitizeText(t,D());let e=cRt.get(t);return void 0===e&&(e=new pRt(t),cRt.set(t,e),lRt.push(e)),e},"findOrCreateNode"),fRt=Ae(()=>lRt,"getNodes"),mRt=Ae(()=>sRt,"getLinks"),yRt=Ae(()=>({nodes:lRt.map(t=>({id:t.ID})),links:sRt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),vRt={nodesMap:cRt,getConfig:Ae(()=>D().sankey,"getConfig"),getNodes:fRt,getLinks:mRt,getGraph:yRt,addLink:dRt,findOrCreateNode:gRt,getAccTitle:cc,setAccTitle:lc,getAccDescription:uc,setAccDescription:hc,getDiagramTitle:pc,setDiagramTitle:dc,clear:hRt}});function kRt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{Ae(kRt,"max")});function ERt(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 _Rt=t(()=>{Ae(ERt,"min")});function CRt(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 SRt=t(()=>{Ae(CRt,"sum")}),ARt=t(()=>{TRt(),_Rt(),SRt()});function LRt(t){return t.target.depth}function NRt(t){return t.depth}function IRt(t,e){return e-1-t.height}function MRt(t,e){return t.sourceLinks.length?t.depth:e-1}function RRt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ERt(t.sourceLinks,LRt)-1:0}var DRt=t(()=>{ARt(),Ae(LRt,"targetDepth"),Ae(NRt,"left"),Ae(IRt,"right"),Ae(MRt,"justify"),Ae(RRt,"center")});function ORt(t){return function(){return t}}var PRt=t(()=>{Ae(ORt,"constant")});function BRt(t,e){return $Rt(t.source,e.source)||t.index-e.index}function FRt(t,e){return $Rt(t.target,e.target)||t.index-e.index}function $Rt(t,e){return t.y0-e.y0}function zRt(t){return t.value}function GRt(t){return t.index}function URt(t){return t.nodes}function qRt(t){return t.links}function YRt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function jRt({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 HRt(){let s=0,l=0,c=1,h=1,u=24,i=8,d,p=GRt,g=MRt,f,m,e=URt,r=qRt,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),jRt(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=YRt(o,t)),"object"!=typeof e&&(e=a.target=YRt(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(CRt(e.sourceLinks,zRt),CRt(e.targetLinks,zRt)):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=kRt(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=ERt(t,t=>(h-l-(t.length-1)*d)/CRt(t,zRt));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;tt.length)-1)),w(e);for(let t=0;t>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{ARt(),DRt(),PRt(),Ae(BRt,"ascendingSourceBreadth"),Ae(FRt,"ascendingTargetBreadth"),Ae($Rt,"ascendingBreadth"),Ae(zRt,"value"),Ae(GRt,"defaultId"),Ae(URt,"defaultNodes"),Ae(qRt,"defaultLinks"),Ae(YRt,"find"),Ae(jRt,"computeLinkBreadths"),Ae(HRt,"Sankey")});function VRt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function XRt(){return new VRt}var KRt,ZRt,QRt,JRt,tDt=t(()=>{KRt=Math.PI,QRt=(ZRt=2*KRt)-1e-6,Ae(VRt,"Path"),Ae(XRt,"path"),VRt.prototype=XRt.prototype={constructor:VRt,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{tDt()});function rDt(t){return Ae(function(){return t},"constant")}var nDt=t(()=>{Ae(rDt,"default")});function iDt(t){return t[0]}function aDt(t){return t[1]}var oDt,sDt=t(()=>{Ae(iDt,"x"),Ae(aDt,"y")}),lDt=t(()=>{oDt=Array.prototype.slice});function cDt(t){return t.source}function hDt(t){return t.target}function uDt(i){var a=cDt,o=hDt,s=iDt,l=aDt,c=null;function e(){var t,e=oDt.call(arguments),r=a.apply(this,e),n=o.apply(this,e);if(c=c||(t=JRt()),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:rDt(+t),e):s},e.y=function(t){return arguments.length?(l="function"==typeof t?t:rDt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function dDt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function pDt(){return uDt(dDt)}var gDt=t(()=>{eDt(),lDt(),nDt(),sDt(),Ae(cDt,"linkSource"),Ae(hDt,"linkTarget"),Ae(uDt,"link"),Ae(dDt,"curveHorizontal"),Ae(pDt,"linkHorizontal")}),fDt=t(()=>{gDt()});function mDt(t){return[t.source.x1,t.y0]}function yDt(t){return[t.target.x0,t.y1]}function vDt(){return pDt().source(mDt).target(yDt)}var xDt,bDt,wDt,kDt,TDt,EDt=t(()=>{fDt(),Ae(mDt,"horizontalSource"),Ae(yDt,"horizontalTarget"),Ae(vDt,"default")}),_Dt=t(()=>{WRt(),DRt(),EDt()}),CDt=t(()=>{xDt=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+")"}}}),SDt=t(()=>{fh(),Z3(),_Dt(),tc(),CDt(),bDt={left:NRt,right:IRt,center:RRt,justify:MRt},wDt=Ae(function(t,e,r,n){let{securityLevel:i,sankey:a}=D(),o=yc.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=bDt[p],x=(HRt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),h2(hb));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=xDt.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(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0(t.uid=xDt.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",vDt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Vl(void 0,c,0,d)},"draw"),kDt={draw:wDt}}),ADt=t(()=>{TDt=Ae(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` -`).trim(),"prepareTextForParsing")}),LDt={};_Bt(LDt,{diagram:()=>IDt});var NDt,IDt,MDt,RDt,DDt,ODt,PDt,BDt,FDt,$Dt,zDt,GDt,UDt,qDt,YDt,jDt,HDt,WDt,VDt=t(()=>{bRt(),wRt(),SDt(),ADt(),NDt=oRt.parse.bind(oRt),oRt.parse=t=>NDt(TDt(t)),IDt={parser:oRt,db:vRt,renderer:kDt}}),XDt=t(()=>{In(),Ln(),X8(),gh(),MDt={packet:[]},RDt=structuredClone(MDt),DDt=vr.packet,ODt=Ae(()=>{var t=x8({...DDt,...Mr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),PDt=Ae(()=>RDt.packet,"getPacket"),BDt=Ae(t=>{0{sc(),RDt=structuredClone(MDt)},"clear"),$Dt={pushWord:BDt,getPacket:PDt,getConfig:ODt,clear:FDt,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,getAccDescription:uc,setAccDescription:hc}}),KDt=t(()=>{Tpt(),e(),Spt(),XDt(),zDt=Ae(t=>{Ept(t,$Dt);let e=-1,r=[],n=1,i=$Dt.getConfig().bitsPerRow;for(var{start:a,end:o,label:s}of t.blocks){if(o&&o{if(void 0===t.end&&(t.end=t.start),t.end{t=await xpt("packet",t),R.debug(t),zDt(t)},"parse")}}),ZDt=t(()=>{jft(),tc(),qDt=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=Fft(e);d.attr("viewbox",`0 0 ${c} `+s),Wl(d,s,c,o.useMaxWidth);for([i,a]of u.entries())YDt(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"),YDt=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"),jDt={draw:qDt}}),QDt=t(()=>{X8(),HDt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},WDt=Ae(({packet:t}={})=>` +`+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{fh(),Jl(),gh(),TIt=[],_It=[],EIt=new Map,CIt=Ae(()=>{TIt=[],_It=[],EIt=new Map,oc()},"clear"),SIt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{Ae(this,"SankeyLink")}},AIt=Ae((t,e,r)=>{TIt.push(new SIt(t,e,r))},"addLink"),LIt=class{constructor(t){this.ID=t}static{Ae(this,"SankeyNode")}},NIt=Ae(t=>{t=L.sanitizeText(t,D());let e=EIt.get(t);return void 0===e&&(e=new LIt(t),EIt.set(t,e),_It.push(e)),e},"findOrCreateNode"),IIt=Ae(()=>_It,"getNodes"),MIt=Ae(()=>TIt,"getLinks"),RIt=Ae(()=>({nodes:_It.map(t=>({id:t.ID})),links:TIt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),DIt={nodesMap:EIt,getConfig:Ae(()=>D().sankey,"getConfig"),getNodes:IIt,getLinks:MIt,getGraph:RIt,addLink:AIt,findOrCreateNode:NIt,getAccTitle:cc,setAccTitle:lc,getAccDescription:uc,setAccDescription:hc,getDiagramTitle:pc,setDiagramTitle:dc,clear:CIt}});function FIt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{Ae(FIt,"max")});function zIt(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 UIt=t(()=>{Ae(zIt,"min")});function GIt(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 qIt=t(()=>{Ae(GIt,"sum")}),jIt=t(()=>{$It(),UIt(),qIt()});function YIt(t){return t.target.depth}function HIt(t){return t.depth}function WIt(t,e){return e-1-t.height}function VIt(t,e){return t.sourceLinks.length?t.depth:e-1}function XIt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?zIt(t.sourceLinks,YIt)-1:0}var KIt=t(()=>{jIt(),Ae(YIt,"targetDepth"),Ae(HIt,"left"),Ae(WIt,"right"),Ae(VIt,"justify"),Ae(XIt,"center")});function ZIt(t){return function(){return t}}var QIt=t(()=>{Ae(ZIt,"constant")});function JIt(t,e){return eMt(t.source,e.source)||t.index-e.index}function tMt(t,e){return eMt(t.target,e.target)||t.index-e.index}function eMt(t,e){return t.y0-e.y0}function rMt(t){return t.value}function nMt(t){return t.index}function iMt(t){return t.nodes}function aMt(t){return t.links}function sMt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function oMt({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 lMt(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=nMt,g=VIt,f,m,e=iMt,r=aMt,a=6;function n(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),oMt(t),t}function s({nodes:r,links:t}){for(var[e,n]of r.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];var i,a,s=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=sMt(s,t)),"object"!=typeof e&&(e=a.target=sMt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(GIt(e.sourceLinks,rMt),GIt(e.targetLinks,rMt)):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:s}of a.sourceLinks)n.add(s)}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:s}of a.targetLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function b({nodes:t}){var e,r=FIt(t,t=>t.depth)+1,n=(c-o-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=o+a*n,e.x1=e.x0+u,i[a]?i[a].push(e):i[a]=[e]}if(f)for(var s of i)s.sort(f);return i}function w(t){var r,n=zIt(t,t=>(h-l-(t.length-1)*d)/GIt(t,rMt));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;tt.length)-1)),w(e);for(let t=0;t>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{jIt(),KIt(),QIt(),Ae(JIt,"ascendingSourceBreadth"),Ae(tMt,"ascendingTargetBreadth"),Ae(eMt,"ascendingBreadth"),Ae(rMt,"value"),Ae(nMt,"defaultId"),Ae(iMt,"defaultNodes"),Ae(aMt,"defaultLinks"),Ae(sMt,"find"),Ae(oMt,"computeLinkBreadths"),Ae(lMt,"Sankey")});function hMt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function uMt(){return new hMt}var dMt,pMt,gMt,fMt,mMt=t(()=>{dMt=Math.PI,gMt=(pMt=2*dMt)-1e-6,Ae(hMt,"Path"),Ae(uMt,"path"),hMt.prototype=uMt.prototype={constructor:hMt,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,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(n=+n)-(e=+e),u=o-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{mMt()});function vMt(t){return Ae(function(){return t},"constant")}var xMt=t(()=>{Ae(vMt,"default")});function bMt(t){return t[0]}function wMt(t){return t[1]}var kMt,TMt=t(()=>{Ae(bMt,"x"),Ae(wMt,"y")}),_Mt=t(()=>{kMt=Array.prototype.slice});function EMt(t){return t.source}function CMt(t){return t.target}function SMt(i){var a=EMt,s=CMt,o=bMt,l=wMt,c=null;function e(){var t,e=kMt.call(arguments),r=a.apply(this,e),n=s.apply(this,e);if(c=c||(t=fMt()),i(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.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?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:vMt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:vMt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function AMt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function LMt(){return SMt(AMt)}var NMt=t(()=>{yMt(),_Mt(),xMt(),TMt(),Ae(EMt,"linkSource"),Ae(CMt,"linkTarget"),Ae(SMt,"link"),Ae(AMt,"curveHorizontal"),Ae(LMt,"linkHorizontal")}),IMt=t(()=>{NMt()});function MMt(t){return[t.source.x1,t.y0]}function RMt(t){return[t.target.x0,t.y1]}function DMt(){return LMt().source(MMt).target(RMt)}var OMt,PMt,BMt,FMt,$Mt,zMt=t(()=>{IMt(),Ae(MMt,"horizontalSource"),Ae(RMt,"horizontalTarget"),Ae(DMt,"default")}),UMt=t(()=>{cMt(),KIt(),zMt()}),GMt=t(()=>{OMt=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+")"}}}),qMt=t(()=>{fh(),Z3(),UMt(),tc(),GMt(),PMt={left:HIt,right:WIt,center:XIt,justify:VIt},BMt=Ae(function(t,e,r,n){let{securityLevel:i,sankey:a}=D(),s=yc.sankey,o,l=("sandbox"===i&&(o=O("#i"+e)),O("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${e}"]`):O(`[id="${e}"]`),h=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=n.db.getGraph(),v=PMt[p],x=(lMt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),h2(hb));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=OMt.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(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0(t.uid=OMt.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",DMt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Vl(void 0,c,0,d)},"draw"),FMt={draw:BMt}}),jMt=t(()=>{$Mt=Ae(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")}),YMt={};SBt(YMt,{diagram:()=>WMt});var HMt,WMt,VMt,XMt,KMt,ZMt,QMt,JMt,tRt,eRt,rRt,nRt,iRt,aRt,sRt,oRt,lRt,cRt,hRt=t(()=>{PIt(),BIt(),qMt(),jMt(),HMt=kIt.parse.bind(kIt),kIt.parse=t=>HMt($Mt(t)),WMt={parser:kIt,db:DIt,renderer:FMt}}),uRt=t(()=>{In(),Ln(),K8(),gh(),VMt={packet:[]},XMt=structuredClone(VMt),KMt=vr.packet,ZMt=Ae(()=>{var t=x8({...KMt,...Mr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),QMt=Ae(()=>XMt.packet,"getPacket"),JMt=Ae(t=>{0{oc(),XMt=structuredClone(VMt)},"clear"),eRt={pushWord:JMt,getPacket:QMt,getConfig:ZMt,clear:tRt,setAccTitle:lc,getAccTitle:cc,setDiagramTitle:dc,getDiagramTitle:pc,getAccDescription:uc,setAccDescription:hc}}),dRt=t(()=>{Fpt(),e(),Gpt(),uRt(),rRt=Ae(t=>{$pt(t,eRt);let e=-1,r=[],n=1,i=eRt.getConfig().bitsPerRow;for(var{start:a,end:s,label:o}of t.blocks){if(s&&s{if(void 0===t.end&&(t.end=t.start),t.end{t=await Dpt("packet",t),R.debug(t),rRt(t)},"parse")}}),pRt=t(()=>{smt(),tc(),aRt=Ae((t,e,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=Jft(e);d.attr("viewbox",`0 0 ${c} `+o),Wl(d,o,c,s.useMaxWidth);for([i,a]of u.entries())sRt(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),sRt=Ae((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-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"),oRt={draw:aRt}}),gRt=t(()=>{K8(),lRt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},cRt=Ae(({packet:t}={})=>` .packetByte { - font-size: ${(t=x8(HDt,t)).byteFontSize}; + font-size: ${(t=x8(lRt,t)).byteFontSize}; } .packetByte.start { fill: ${t.startByteColor}; @@ -2018,12 +2104,12 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l stroke-width: ${t.blockStrokeWidth}; fill: ${t.blockFillColor}; } - `,"styles")}),JDt={};_Bt(JDt,{diagram:()=>tOt});var tOt,eOt,rOt,nOt=t(()=>{XDt(),KDt(),ZDt(),QDt(),tOt={parser:UDt,db:$Dt,renderer:jDt,styles:WDt}}),iOt=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"mRt});var mRt,yRt,vRt,xRt=t(()=>{uRt(),dRt(),pRt(),gRt(),mRt={parser:iRt,db:eRt,renderer:oRt,styles:cRt}}),bRt=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],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],h={trace: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,s){var o=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[o-1]),n.setHierarchy(a[o-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[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:r,28:n,29:i,31:a,32:s,40:o,44:l,47:c}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},e(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError: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],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"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"),"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"),(eOt=new((t.prototype=h).Parser=t)).parser=eOt,rOt=eOt});function aOt(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 oOt(t){return"=="!==(R.debug("typeStr2Type",t),t)?"normal":"thick"}function sOt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var lOt,cOt,hOt,uOt,dOt,pOt,gOt,fOt,mOt,yOt,vOt,xOt,bOt,wOt,kOt,TOt,EOt,_Ot,COt,SOt,AOt,LOt,NOt,IOt,MOt,ROt,DOt,OOt,POt=t(()=>{BF(),In(),fh(),e(),Jl(),gh(),lOt=new Map,cOt=[],hOt=new Map,uOt=D(),dOt=new Map,pOt=Ae(t=>L.sanitizeText(t,uOt),"sanitizeText"),gOt=Ae(function(t,e=""){let r=dOt.get(t);r||(r={id:t,styles:[],textStyles:[]},dOt.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"),fOt=Ae(function(t,e=""){t=lOt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),mOt=Ae(function(t,r){t.split(",").forEach(function(t){let e=lOt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},lOt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),yOt=Ae((t,e)=>{var r,n=[];for(r of t.flat())if(r.label&&(r.label=pOt(r.label)),"classDef"===r.type)gOt(r.id,r.css);else if("applyClass"===r.type)mOt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&fOt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var i=(hOt.get(r.id)??0)+1;hOt.set(r.id,i),r.id=i+"-"+r.id,cOt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=lOt.get(r.id))?lOt.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&yOt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t{R.debug("Clear called"),sc(),xOt={id:"root",type:"composite",children:[],columns:-1},lOt=new Map([["root",xOt]]),vOt=[],dOt=new Map,cOt=[],hOt=new Map},"clear"),Ae(aOt,"typeStr2Type"),Ae(oOt,"edgeTypeStr2Type"),Ae(sOt,"edgeStrToEdgeData"),wOt=0,kOt=Ae(()=>(wOt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wOt),"generateId"),TOt=Ae(t=>{xOt.children=t,yOt(t,xOt),vOt=xOt.children},"setHierarchy"),EOt=Ae(t=>(t=lOt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),_Ot=Ae(()=>[...lOt.values()],"getBlocksFlat"),COt=Ae(()=>vOt||[],"getBlocks"),SOt=Ae(()=>cOt,"getEdges"),AOt=Ae(t=>lOt.get(t),"getBlock"),LOt=Ae(t=>{lOt.set(t.id,t)},"setBlock"),IOt=Ae(()=>console,"getLogger"),NOt=Ae(function(){return dOt},"getClasses"),IOt={getConfig:Ae(()=>Mr().block,"getConfig"),typeStr2Type:aOt,edgeTypeStr2Type:oOt,edgeStrToEdgeData:sOt,getLogger:IOt,getBlocksFlat:_Ot,getBlocks:COt,getEdges:SOt,setHierarchy:TOt,getBlock:AOt,setBlock:LOt,getColumns:EOt,getClasses:NOt,clear:bOt,generateId:kOt},MOt=IOt}),BOt=t(()=>{xn(),ROt=Ae((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),DOt=Ae(t=>`.label { +`+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"),"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"),(yRt=new((t.prototype=h).Parser=t)).parser=yRt,vRt=yRt});function wRt(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 kRt(t){return"=="!==(R.debug("typeStr2Type",t),t)?"normal":"thick"}function TRt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var _Rt,ERt,CRt,SRt,ARt,LRt,NRt,IRt,MRt,RRt,DRt,ORt,PRt,BRt,FRt,$Rt,zRt,URt,GRt,qRt,jRt,YRt,HRt,WRt,VRt,XRt,KRt,ZRt,QRt,JRt,tDt,eDt,rDt,nDt,iDt,aDt,sDt,oDt,lDt,cDt,hDt=t(()=>{KF(),In(),fh(),e(),Jl(),gh(),_Rt=new Map,ERt=[],CRt=new Map,SRt=D(),ARt=new Map,LRt=Ae(t=>L.sanitizeText(t,SRt),"sanitizeText"),NRt=Ae(function(t,e=""){let r=ARt.get(t);r||(r={id:t,styles:[],textStyles:[]},ARt.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"),IRt=Ae(function(t,e=""){t=_Rt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),MRt=Ae(function(t,r){t.split(",").forEach(function(t){let e=_Rt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},_Rt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),RRt=Ae((t,e)=>{var r,n=[];for(r of t.flat())if(r.label&&(r.label=LRt(r.label)),"classDef"===r.type)NRt(r.id,r.css);else if("applyClass"===r.type)MRt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&IRt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var i=(CRt.get(r.id)??0)+1;CRt.set(r.id,i),r.id=i+"-"+r.id,ERt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=_Rt.get(r.id))?_Rt.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&RRt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t{R.debug("Clear called"),oc(),ORt={id:"root",type:"composite",children:[],columns:-1},_Rt=new Map([["root",ORt]]),DRt=[],ARt=new Map,ERt=[],CRt=new Map},"clear"),Ae(wRt,"typeStr2Type"),Ae(kRt,"edgeTypeStr2Type"),Ae(TRt,"edgeStrToEdgeData"),BRt=0,FRt=Ae(()=>(BRt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+BRt),"generateId"),$Rt=Ae(t=>{ORt.children=t,RRt(t,ORt),DRt=ORt.children},"setHierarchy"),zRt=Ae(t=>(t=_Rt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),URt=Ae(()=>[..._Rt.values()],"getBlocksFlat"),GRt=Ae(()=>DRt||[],"getBlocks"),qRt=Ae(()=>ERt,"getEdges"),jRt=Ae(t=>_Rt.get(t),"getBlock"),YRt=Ae(t=>{_Rt.set(t.id,t)},"setBlock"),WRt=Ae(()=>console,"getLogger"),HRt=Ae(function(){return ARt},"getClasses"),WRt={getConfig:Ae(()=>Mr().block,"getConfig"),typeStr2Type:wRt,edgeTypeStr2Type:kRt,edgeStrToEdgeData:TRt,getLogger:WRt,getBlocksFlat:URt,getBlocks:GRt,getEdges:qRt,setHierarchy:$Rt,getBlock:jRt,setBlock:YRt,getColumns:zRt,getClasses:HRt,clear:PRt,generateId:FRt},VRt=WRt}),uDt=t(()=>{xn(),XRt=Ae((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),KRt=Ae(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } @@ -2093,14 +2179,14 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l /* For html labels only */ .labelBkg { - background-color: ${ROt(t.edgeLabelBackground,.5)}; + background-color: ${XRt(t.edgeLabelBackground,.5)}; // background-color: } .node .cluster { - // fill: ${ROt(t.mainBkg,.5)}; - fill: ${ROt(t.clusterBkg,.5)}; - stroke: ${ROt(t.clusterBorder,.2)}; + // fill: ${XRt(t.mainBkg,.5)}; + fill: ${XRt(t.clusterBkg,.5)}; + stroke: ${XRt(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; } @@ -2135,7 +2221,10 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),OOt=DOt});function FOt(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 $Ot(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}),0layoutBlocks) ${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 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+qOt)+c/2+qOt,R.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${e}${qOt}${u}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2`+l*(o?.widthInColumns??1)/2)),o.children&&zOt(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 GOt(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(),fh(),qOt=D()?.block?.padding??8,Ae(FOt,"calculateBlockPosition"),YOt=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($Ot,"setBlockSizes"),Ae(zOt,"layoutBlocks"),Ae(GOt,"findBounds"),Ae(UOt,"layout")});function HOt(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=g8(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:o,labelText:n.label,rx:a,ry:a,class:i,style:t.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:s??Mr()?.block?.padding??0}}async function WOt(t,e,r){var n;"group"!==(e=HOt(e,0,!1)).type&&(n=Mr(),n=(t=await h5t(t,e,{config:n})).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 VOt(t,e,r){var n=HOt(e,0,!0);"space"!==r.getBlock(n.id).type&&(r=Mr(),await h5t(t,n,{config:r}),e.intersect=n?.intersect,p5t(n))}async function XOt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await XOt(t,i.children,r,n)}async function KOt(t,e,r){await XOt(t,e,r,WOt)}async function ZOt(t,e,r){await XOt(t,e,r,VOt)}async function QOt(t,e,r,n,i){var a,o,s,l,c=new yj({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}],B5t(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 M5t(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"}),R5t({...o,x:l[1].x,y:l[1].y},{originalPath:l}))}var JOt,tPt,ePt,rPt=t(()=>{xj(),In(),z5t(),_5t(),X8(),Ae(HOt,"getNodeFromBlock"),Ae(WOt,"calculateBlockSize"),Ae(VOt,"insertBlockPositioned"),Ae(XOt,"performOperations"),Ae(KOt,"calculateBlockSizes"),Ae(ZOt,"insertBlocks"),Ae(QOt,"insertEdges")}),nPt=t(()=>{Z3(),In(),F4t(),e(),tc(),jOt(),rPt(),JOt=Ae(function(t,e){return e.db.getClasses()},"getClasses"),tPt=Ae(async function(t,e,r,n){let{securityLevel:i,block:a}=Mr(),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=(P4t(l,["point","circle","cross"],n.type,e),o.getBlocks()),c=o.getBlocksFlat(),h=o.getEdges(),u=l.insert("g").attr("class","block"),d=(await KOt(u,n,o),UOt(o));await ZOt(u,n,o),await QOt(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,Wl(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"),ePt={draw:tPt,getClasses:JOt}}),iPt={};_Bt(iPt,{diagram:()=>aPt});var aPt,oPt,sPt,lPt,cPt,hPt,uPt,dPt,pPt,gPt,fPt,mPt,yPt,vPt,xPt,bPt,wPt,kPt,TPt=t(()=>{iOt(),POt(),BOt(),nPt(),aPt={parser:rOt,db:MOt,renderer:ePt,styles:OOt}}),EPt=t(()=>{oPt={L:"left",R:"right",T:"top",B:"bottom"},sPt={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")},lPt={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")},cPt=Ae(function(t){return uPt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),hPt=Ae(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),uPt=Ae(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),dPt=Ae(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),pPt=Ae(function(t,e){var r=uPt(t)&&dPt(e),t=dPt(t)&&uPt(e);return r||t},"isArchitectureDirectionXY"),gPt=Ae(function(t){var e=t[0],t=t[1],r=uPt(e)&&dPt(t),e=dPt(e)&&uPt(t);return r||e},"isArchitecturePairXY"),fPt=Ae(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),mPt=Ae(function(t,e){return fPt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),yPt=Ae(function([t,e],r){var n=r[0],r=r[1];return uPt(n)?dPt(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:uPt(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),vPt=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"),xPt=Ae(function(t){return"service"===t.type},"isArchitectureService"),bPt=Ae(function(t){return"junction"===t.type},"isArchitectureJunction"),wPt=Ae(t=>t.data(),"edgeData"),kPt=Ae(t=>t.data(),"nodeData")});function _Pt(t){var e=D().architecture;return(e?.[t]?e:CPt)[t]}var CPt,SPt,APt,LPt,NPt,IPt,MPt,RPt,DPt,OPt,PPt,BPt,FPt,$Pt,zPt,GPt,UPt,qPt,YPt,jPt,HPt,WPt,VPt,XPt,KPt,ZPt,QPt,JPt=t(()=>{Ln(),fh(),Lpt(),gh(),EPt(),CPt=vr.architecture,SPt=new Cpt(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:CPt,dataStructures:void 0,elements:{}})),APt=Ae(()=>{SPt.reset(),sc()},"clear"),LPt=Ae(function({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==SPt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+SPt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===SPt.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"===SPt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}SPt.records.registeredIds[t]="node",SPt.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),NPt=Ae(()=>Object.values(SPt.records.nodes).filter(xPt),"getServices"),IPt=Ae(function({id:t,in:e}){SPt.records.registeredIds[t]="node",SPt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),MPt=Ae(()=>Object.values(SPt.records.nodes).filter(bPt),"getJunctions"),RPt=Ae(()=>Object.values(SPt.records.nodes),"getNodes"),DPt=Ae(t=>SPt.records.nodes[t],"getNode"),OPt=Ae(function({id:t,icon:e,in:r,title:n}){if(void 0!==SPt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+SPt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===SPt.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"===SPt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}SPt.records.registeredIds[t]="group",SPt.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),PPt=Ae(()=>Object.values(SPt.records.groups),"getGroups"),BPt=Ae(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:l}){if(!hPt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!hPt(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===SPt.records.nodes[t]&&void 0===SPt.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===SPt.records.nodes[e]&&void 0===SPt.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=SPt.records.nodes[t].in,h=SPt.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.`);SPt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:o,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:s,title:l}),SPt.records.nodes[t]&&SPt.records.nodes[e]&&(SPt.records.nodes[t].edges.push(SPt.records.edges[SPt.records.edges.length-1]),SPt.records.nodes[e].edges.push(SPt.records.edges[SPt.records.edges.length-1]))},"addEdge"),FPt=Ae(()=>SPt.records.edges,"getEdges"),$Pt=Ae(()=>{if(void 0===SPt.records.dataStructures){let o=Object.entries(SPt.records.nodes).reduce((t,[n,e])=>(t[n]=e.edges.reduce((t,e)=>{var r;return e.lhsId===n?(r=mPt(e.lhsDir,e.rhsDir))&&(t[r]=e.rhsId):(r=mPt(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{s[e]||(i[e]=yPt([r,n],t),a.push(e))})}}return i},"BFS"),e=[t(r)];for(;0{SPt.records.elements[t]=e},"setElementForId"),GPt=Ae(t=>SPt.records.elements[t],"getElementById"),UPt={clear:APt,setDiagramTitle:dc,getDiagramTitle:pc,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addService:LPt,getServices:NPt,addJunction:IPt,getJunctions:MPt,getNodes:RPt,getNode:DPt,addGroup:OPt,getGroups:PPt,addEdge:BPt,getEdges:FPt,setElementForId:zPt,getElementById:GPt,getDataStructures:$Pt},Ae(_Pt,"getConfigField")}),tBt=t(()=>{Tpt(),e(),Spt(),JPt(),qPt=Ae((t,e)=>{Ept(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"),YPt={parse:Ae(async t=>{t=await xpt("architecture",t),R.debug(t),qPt(t,UPt)},"parse")}}),eBt=t(()=>{jPt=Ae(t=>` +`,"getStyles"),ZRt=KRt}),dDt=t(()=>{e(),QRt=Ae((e,t,r,n)=>{t.forEach(t=>{lDt[t](e,r,n)})},"insertMarkers"),JRt=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"),tDt=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"),eDt=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"),rDt=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"),nDt=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"),iDt=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"),aDt=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"),sDt=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"),oDt=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"),lDt={extension:JRt,composition:tDt,aggregation:eDt,dependency:rDt,lollipop:nDt,point:iDt,circle:aDt,cross:sDt,barb:oDt},cDt=QRt});function pDt(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 gDt(s,o,l=0,c=0){if(R.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"sieblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0layoutBlocks) ${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 x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),e=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+vDt)+c/2+vDt,R.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${e}${vDt}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&fDt(s,i),t+=s?.widthInColumns??1,R.debug("abc88 columnsPos",s,t))}}R.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function mDt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2{e(),fh(),vDt=D()?.block?.padding??8,Ae(pDt,"calculateBlockPosition"),xDt=Ae(t=>{let e=0,r=0;for(var n of t.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};R.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),Ae(gDt,"setBlockSizes"),Ae(fDt,"layoutBlocks"),Ae(mDt,"findBounds"),Ae(yDt,"layout")});function wDt(t,e){e&&t.attr("style",e)}function kDt(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),wDt(a,t.labelStyle),a.attr("class",i),wDt(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 TDt,_Dt,EDt,CDt,SDt,ADt=t(()=>{Z3(),e(),fh(),Jl(),K8(),UE(),Ae(wDt,"applyStyle"),Ae(kDt,"addHtmlLabel"),TDt=Ae((t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Rl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),R.debug("vertexText"+i),kDt({isNode:n,label:$E(V8(i)),labelStyle:e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),_Dt=TDt}),LDt=t(()=>{e(),EDt=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&SDt(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&SDt(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),CDt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},SDt=Ae((t,e,r,n,i,a)=>{var s=CDt[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function NDt(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var IDt,MDt,RDt,DDt,ODt,PDt,BDt,FDt,$Dt,zDt,UDt=t(()=>{e(),ADt(),UE(),Z3(),fh(),K8(),Jl(),JR(),jR(),LDt(),IDt={},MDt={},RDt=Ae((t,e)=>{var r,n=D(),i=Rl(n.flowchart.htmlLabels),n="markdown"===e.labelType?zE(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):_Dt(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=O(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),IDt[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=_Dt(e.startLabelLeft,e.labelStyle),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),MDt[e.id]||(MDt[e.id]={}),MDt[e.id].startLeft=r,NDt(l,e.startLabelLeft)),e.startLabelRight&&(i=_Dt(e.startLabelRight,e.labelStyle),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),MDt[e.id]||(MDt[e.id]={}),MDt[e.id].startRight=s,NDt(l,e.startLabelRight)),e.endLabelLeft&&(i=_Dt(e.endLabelLeft,e.labelStyle),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),MDt[e.id]||(MDt[e.id]={}),MDt[e.id].endLeft=a,NDt(l,e.endLabelLeft)),e.endLabelRight&&(r=_Dt(e.endLabelRight,e.labelStyle),i=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),MDt[e.id]||(MDt[e.id]={}),MDt[e.id].endRight=s,NDt(l,e.endLabelRight)),n},"insertEdgeLabel"),Ae(NDt,"setTerminalWidth"),DDt=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,IDt[n.id],i);var a,s=i.updatedPath||i.originalPath,o=D(),o=MR(o).subGraphTitleTotalMargin;if(n.label){let t=IDt[n.id],e=n.x,r=n.y;s&&(a=H8.calcLabelPosition(s),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+o/2})`)}if(n.startLabelLeft){let t=MDt[n.id].startLeft,e=n.x,r=n.y;s&&(i=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=MDt[n.id].startRight,e=n.x,r=n.y;s&&(a=H8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=MDt[n.id].endLeft,e=n.x,r=n.y;s&&(o=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=MDt[n.id].endRight,e=n.x,r=n.y;s&&(i=H8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),ODt=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),PDt=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),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{R.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(ODt(n,t)||s)a=t,s||i.push(t);else{let e=PDt(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),s=!0}}),i},"cutPathAtIntersect"),FDt=Ae(function(t,e,r,n,i,a,s){let o=r.points,l=(R.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=a.node(e.w),u=(h?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(R.debug("to cluster abc88",n[r.toCluster]),o=BDt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(R.debug("from cluster abc88",n[r.fromCluster]),o=BDt(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),d=u4,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),XR(r)),f=Xb().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=t.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),EDt(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),GDt=t(()=>{$Dt=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"),zDt=Ae((t,e,r)=>{var t=$Dt(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 qDt(t,e){return t.intersect(e)}var jDt,YDt=t(()=>{Ae(qDt,"intersectNode"),jDt=qDt});function HDt(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{Ae(HDt,"intersectEllipse"),WDt=HDt});function XDt(t,e,r){return WDt(t,e,e,r)}var KDt,ZDt=t(()=>{VDt(),Ae(XDt,"intersectCircle"),KDt=XDt});function QDt(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{Ae(QDt,"intersectLine"),Ae(JDt,"sameSign"),tOt=QDt});function rOt(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h{eOt(),Ae(nOt=rOt,"intersectPolygon")}),lOt=t(()=>{iOt=Ae((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),aOt=iOt}),cOt=t(()=>{YDt(),ZDt(),VDt(),oOt(),lOt(),sOt={node:jDt,circle:KDt,ellipse:WDt,polygon:nOt,rect:aOt}});function hOt(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 uOt,dOt,pOt,gOt,fOt=t(()=>{ADt(),UE(),fh(),Z3(),Jl(),K8(),uOt=Ae(async(t,e,r,i)=>{let a=D(),n,s=e.useHtmlLabels||Rl(a.flowchart.htmlLabels),o=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?zE(l,Cl(V8(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(_Dt(Cl(V8(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if(Rl(a.flowchart.htmlLabels)){if(r=u.children[0],t=O(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/]*>/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 s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),dOt=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),Ae(hOt,"insertPolygonShape")}),mOt=t(()=>{fOt(),e(),fh(),cOt(),pOt=Ae(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await uOt(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),dOt(e,i),e.intersect=function(t){return sOt.rect(e,t)},t},"note"),gOt=pOt});function yOt(t,e,r,n){let i=[],a=Ae(t=>{i.push(t,0)},"addBorder"),s=Ae(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(R.debug("add top border"),a):s)(r),(e.includes("r")?(R.debug("add right border"),a):s)(n),(e.includes("b")?(R.debug("add bottom border"),a):s)(r),(e.includes("l")?(R.debug("add left border"),a):s)(n),t.attr("stroke-dasharray",i.join(" "))}var vOt,xOt,bOt,wOt,kOt,TOt,_Ot,EOt,COt,SOt,AOt,LOt,NOt,IOt,MOt,ROt,DOt,OOt,POt,BOt,FOt,$Ot,zOt,UOt,GOt,qOt,jOt,YOt,HOt,WOt=t(()=>{Z3(),fh(),Jl(),e(),GDt(),ADt(),cOt(),mOt(),fOt(),vOt=Ae(t=>t?" "+t:"","formatClass"),xOt=Ae((t,e)=>`${e||"node default"}${vOt(t.classes)} `+vOt(t.class),"getClassesFromNode"),bOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return R.info("Question main (Circle)"),(t=hOt(r,s,s,o)).attr("style",e.style),dOt(e,t),e.intersect=function(t){return R.warn("Intersect called"),sOt.polygon(e,o,t)},r},"question"),wOt=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 sOt.circle(e,14,t)},t),"choice"),kOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.height+e.padding,a=i/4,s=n.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=hOt(r,s,i,o);return l.attr("style",e.style),dOt(e,l),e.intersect=function(t){return sOt.polygon(e,o,t)},r},"hexagon"),TOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,s=n.width+2*a+e.padding,o=zDt(e.directions,n,e),l=hOt(r,s,i,o);return l.attr("style",e.style),dOt(e,l),e.intersect=function(t){return sOt.polygon(e,o,t)},r},"block_arrow"),_Ot=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return hOt(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return sOt.polygon(e,s,t)},r},"rect_left_inv_arrow"),EOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=hOt(r,i,a,s);return o.attr("style",e.style),dOt(e,o),e.intersect=function(t){return sOt.polygon(e,s,t)},r},"lean_right"),COt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=hOt(r,i,a,s);return o.attr("style",e.style),dOt(e,o),e.intersect=function(t){return sOt.polygon(e,s,t)},r},"lean_left"),SOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=hOt(r,i,a,s);return o.attr("style",e.style),dOt(e,o),e.intersect=function(t){return sOt.polygon(e,s,t)},r},"trapezoid"),AOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=hOt(r,i,a,s);return o.attr("style",e.style),dOt(e,o),e.intersect=function(t){return sOt.polygon(e,s,t)},r},"inv_trapezoid"),LOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{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}],o=hOt(r,i,a,s);return o.attr("style",e.style),dOt(e,o),e.intersect=function(t){return sOt.polygon(e,s,t)},r},"rect_right_inv_arrow"),NOt=Ae(async(t,i)=>{let{shapeSvg:e,bbox:r}=await uOt(t,i,xOt(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return dOt(i,c),i.intersect=function(e){var r=sOt.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)i.height/2-s)){let t=s*s*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0{var{shapeSvg:t,bbox:r,halfPadding:n}=await uOt(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/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",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(yOt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),dOt(e,i),e.intersect=function(t){return sOt.rect(e,t)},t},"rect"),MOt=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await uOt(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/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",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(yOt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),dOt(e,i),e.intersect=function(t){return sOt.rect(e,t)},t},"composite"),ROt=Ae(async(t,e)=>{var r,t=(await uOt(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&&(yOt(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{R.warn("Unknown node property "+t)})),dOt(e,n),e.intersect=function(t){return sOt.rect(e,t)},t},"labelRect"),Ae(yOt,"applyNodePropertyBorders"),DOt=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"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,R.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(_Dt(l,e.labelStyle,!0,!0))),h={width:0,height:0};Rl(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",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(_Dt(t.join?t.join("
"):t,e.labelStyle,!0,!0)),p=(Rl(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{var{shapeSvg:t,bbox:r}=await uOt(t,e,xOt(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 dOt(e,r),e.intersect=function(t){return sOt.rect(e,t)},t},"stadium"),POt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await uOt(t,e,xOt(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"),dOt(e,a),e.intersect=function(t){return R.info("Circle intersect",e,n.width/2+i,t),sOt.circle(e,n.width/2+i,t)},r},"circle"),BOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await uOt(t,e,xOt(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.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"),dOt(e,s),e.intersect=function(t){return R.info("DoubleCircle intersect",e,n.width/2+i+5,t),sOt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),FOt=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await uOt(t,e,xOt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{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}],o=hOt(r,i,a,s);return o.attr("style",e.style),dOt(e,o),e.intersect=function(t){return sOt.polygon(e,s,t)},r},"subroutine"),$Ot=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),dOt(e,r),e.intersect=function(t){return sOt.circle(e,7,t)},t},"start"),zOt=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"),dOt(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return sOt.rect(e,t)},n},"forkJoin"),UOt=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),dOt(e,n),e.intersect=function(t){return sOt.circle(e,7,t)},t},"end"),GOt=Ae((t,s)=>{let e=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",t.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(_Dt(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Rl(D().flowchart.htmlLabels)&&(t=g.children[0],y=O(g),f=t.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(D().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),O(t=h.node().appendChild(_Dt(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Rl(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=(s.classData.members.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(_Dt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Rl(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,[]);s.classData.methods.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(_Dt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Rl(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,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{O(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),i.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),dOt(s,i),s.intersect=function(t){return sOt.rect(s,t)},n},"class_box"),qOt={rhombus:bOt,composite:MOt,question:bOt,rect:IOt,labelRect:ROt,rectWithTitle:DOt,choice:wOt,circle:POt,doublecircle:BOt,stadium:OOt,hexagon:kOt,block_arrow:TOt,rect_left_inv_arrow:_Ot,lean_right:EOt,lean_left:COt,trapezoid:SOt,inv_trapezoid:AOt,rect_right_inv_arrow:LOt,cylinder:NOt,start:$Ot,end:UOt,note:gOt,subroutine:FOt,fork:zOt,join:zOt,class_box:GOt},jOt={},YOt=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 qOt[r.shape](i,r,n)}else a=await qOt[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),jOt[r.id]=i,r.haveCallback&&jOt[r.id].attr("class",jOt[r.id].attr("class")+" clickable"),i},"insertNode"),HOt=Ae(t=>{var e=jOt[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")});function VOt(t,e,r=!1){let n=t,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}var t=g8(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:t.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:o??Mr()?.block?.padding??0}}async function XOt(t,e,r){var n;"group"!==(e=VOt(e,0,!1)).type&&(n=Mr(),n=(t=await YOt(t,e,{config:n})).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 KOt(t,e,r){var n=VOt(e,0,!0);"space"!==r.getBlock(n.id).type&&(r=Mr(),await YOt(t,n,{config:r}),e.intersect=n?.intersect,HOt(n))}async function ZOt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await ZOt(t,i.children,r,n)}async function QOt(t,e,r){await ZOt(t,e,r,XOt)}async function JOt(t,e,r){await ZOt(t,e,r,KOt)}async function tPt(t,e,r,n,i){var a,s,o,l,c=new IY({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of e)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],FDt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await RDt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),DDt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var ePt,rPt,nPt,iPt=t(()=>{RY(),In(),UDt(),WOt(),K8(),Ae(VOt,"getNodeFromBlock"),Ae(XOt,"calculateBlockSize"),Ae(KOt,"insertBlockPositioned"),Ae(ZOt,"performOperations"),Ae(QOt,"calculateBlockSizes"),Ae(JOt,"insertBlocks"),Ae(tPt,"insertEdges")}),aPt=t(()=>{Z3(),In(),dDt(),e(),tc(),bDt(),iPt(),ePt=Ae(function(t,e){return e.db.getClasses()},"getClasses"),rPt=Ae(async function(t,e,r,n){let{securityLevel:i,block:a}=Mr(),s=n.db,o;"sandbox"===i&&(o=O("#i"+e));var l=O("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${e}"]`):O(`[id="${e}"]`),n=(cDt(l,["point","circle","cross"],n.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await QOt(u,n,s),yDt(s));await JOt(u,n,s),await tPt(u,h,c,s,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,Wl(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"),nPt={draw:rPt,getClasses:ePt}}),sPt={};SBt(sPt,{diagram:()=>oPt});var oPt,lPt,cPt,hPt,uPt,dPt,pPt,gPt,fPt,mPt,yPt,vPt,xPt,bPt,wPt,kPt,TPt,_Pt,EPt=t(()=>{bRt(),hDt(),uDt(),aPt(),oPt={parser:vRt,db:VRt,renderer:nPt,styles:ZRt}}),CPt=t(()=>{lPt={L:"left",R:"right",T:"top",B:"bottom"},cPt={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")},hPt={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")},uPt=Ae(function(t){return pPt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),dPt=Ae(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),pPt=Ae(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),gPt=Ae(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),fPt=Ae(function(t,e){var r=pPt(t)&&gPt(e),t=gPt(t)&&pPt(e);return r||t},"isArchitectureDirectionXY"),mPt=Ae(function(t){var e=t[0],t=t[1],r=pPt(e)&&gPt(t),e=gPt(e)&&pPt(t);return r||e},"isArchitecturePairXY"),yPt=Ae(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),vPt=Ae(function(t,e){return yPt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),xPt=Ae(function([t,e],r){var n=r[0],r=r[1];return pPt(n)?gPt(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:pPt(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),bPt=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"),wPt=Ae(function(t){return"service"===t.type},"isArchitectureService"),kPt=Ae(function(t){return"junction"===t.type},"isArchitectureJunction"),TPt=Ae(t=>t.data(),"edgeData"),_Pt=Ae(t=>t.data(),"nodeData")});function SPt(t){var e=D().architecture;return(e?.[t]?e:APt)[t]}var APt,LPt,NPt,IPt,MPt,RPt,DPt,OPt,PPt,BPt,FPt,$Pt,zPt,UPt,GPt,qPt,jPt,YPt,HPt,WPt,VPt,XPt,KPt,ZPt,QPt,JPt,tBt,eBt=t(()=>{Ln(),fh(),jpt(),gh(),CPt(),APt=vr.architecture,LPt=new Upt(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:APt,dataStructures:void 0,elements:{}})),NPt=Ae(()=>{LPt.reset(),oc()},"clear"),IPt=Ae(function({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==LPt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+LPt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===LPt.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"===LPt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}LPt.records.registeredIds[t]="node",LPt.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),MPt=Ae(()=>Object.values(LPt.records.nodes).filter(wPt),"getServices"),RPt=Ae(function({id:t,in:e}){LPt.records.registeredIds[t]="node",LPt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),DPt=Ae(()=>Object.values(LPt.records.nodes).filter(kPt),"getJunctions"),OPt=Ae(()=>Object.values(LPt.records.nodes),"getNodes"),PPt=Ae(t=>LPt.records.nodes[t],"getNode"),BPt=Ae(function({id:t,icon:e,in:r,title:n}){if(void 0!==LPt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+LPt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===LPt.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"===LPt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}LPt.records.registeredIds[t]="group",LPt.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),FPt=Ae(()=>Object.values(LPt.records.groups),"getGroups"),$Pt=Ae(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!dPt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!dPt(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===LPt.records.nodes[t]&&void 0===LPt.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===LPt.records.nodes[e]&&void 0===LPt.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=LPt.records.nodes[t].in,h=LPt.records.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);LPt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),LPt.records.nodes[t]&&LPt.records.nodes[e]&&(LPt.records.nodes[t].edges.push(LPt.records.edges[LPt.records.edges.length-1]),LPt.records.nodes[e].edges.push(LPt.records.edges[LPt.records.edges.length-1]))},"addEdge"),zPt=Ae(()=>LPt.records.edges,"getEdges"),UPt=Ae(()=>{if(void 0===LPt.records.dataStructures){let s=Object.entries(LPt.records.nodes).reduce((t,[n,e])=>(t[n]=e.edges.reduce((t,e)=>{var r;return e.lhsId===n?(r=vPt(e.lhsDir,e.rhsDir))&&(t[r]=e.rhsId):(r=vPt(e.rhsDir,e.lhsDir))&&(t[r]=e.lhsId),t},{}),t),{}),r=Object.keys(s)[0],o={[r]:1},l=Object.keys(s).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=Ae(t=>{let i={[t]:[0,0]},a=[t];for(;0{o[e]||(i[e]=xPt([r,n],t),a.push(e))})}}return i},"BFS"),e=[t(r)];for(;0{LPt.records.elements[t]=e},"setElementForId"),qPt=Ae(t=>LPt.records.elements[t],"getElementById"),jPt={clear:NPt,setDiagramTitle:dc,getDiagramTitle:pc,setAccTitle:lc,getAccTitle:cc,setAccDescription:hc,getAccDescription:uc,addService:IPt,getServices:MPt,addJunction:RPt,getJunctions:DPt,getNodes:OPt,getNode:PPt,addGroup:BPt,getGroups:FPt,addEdge:$Pt,getEdges:zPt,setElementForId:GPt,getElementById:qPt,getDataStructures:UPt},Ae(SPt,"getConfigField")}),rBt=t(()=>{Fpt(),e(),Gpt(),eBt(),YPt=Ae((t,e)=>{$pt(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"),HPt={parse:Ae(async t=>{t=await Dpt("architecture",t),R.debug(t),YPt(t,jPt)},"parse")}}),nBt=t(()=>{WPt=Ae(t=>` .edge { stroke-width: ${t.archEdgeWidth}; stroke: ${t.archEdgeColor}; @@ -2166,17 +2255,17 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l display: -webkit-box; -webkit-box-orient: vertical; } -`,"getStyles"),HPt=jPt}),rBt=bBt((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;rt?(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.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=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]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;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||s>=a[0].length))for(var l=0;l{for(var e=[];0{for(var e=[];0{for(var e=[];0=this.s[u+1]);){var R=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=R,uMath.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{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(rBt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(rBt()):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=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;en&&(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;at?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(t){var e=n.idToDummyNode[t],r=e.paddingLeft;n.adjustLocations(i[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;nh&&(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)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)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;nr&&(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]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;so&&(o=n[s].height);0{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{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eX&&(X=m[w].length,K=w);X{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})}),iBt=bBt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(nBt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(nBt()):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{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{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{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{function n(t,e){for(var r=0;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{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})}),aBt=t(()=>{Yt(),WPt=Ae(t=>`${t}`,"wrapIcon"),VPt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:WPt('')},server:{body:WPt('')},disk:{body:WPt('')},internet:{body:WPt('')},cloud:{body:WPt('')},unknown:Rt,blank:{body:WPt("")}}}}),oBt=t(()=>{Yt(),fh(),pN(),JPt(),aBt(),EPt(),XPt=Ae(async function(w,t){let k=_Pt("padding"),e=_Pt("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}=wPt(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&&(uPt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(uPt(o)?g+="L"===o?-m:m:f+="T"===o?-m:m+18),i||"junction"!==UPt.getNode(e)?.type||(uPt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==UPt.getNode(a)?.type||(uPt(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=uPt(r)?lPt[r](h,E):h-_,y=dPt(r)?lPt[r](u,E):u-_,t.insert("polygon").attr("points",sPt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),s&&(b=uPt(o)?lPt[o](g,E):g-_,y=dPt(o)?lPt[o](f,E):f-_,t.insert("polygon").attr("points",sPt[o](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=pPt(r,o)?"XY":uPt(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 hN(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=mPt(r,o))&&gPt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=vPt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` +`,"getStyles"),VPt=WPt}),iBt=kBt((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),s=r(9);function o(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(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=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 s(e.x,e.y,r.width,r.height):new s}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;rt?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,r){var 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),s=r(7),o=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 s?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.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=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]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;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{for(var e=[];0{for(var e=[];0{for(var e=[];0=this.s[u+1]);){var R=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=R,uMath.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{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(iBt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(iBt()):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),s=r(880),h=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){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 s(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new o(null,null,t)},k.prototype.initParameters=function(){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=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,s.nodesInRelativeHorizontal.includes(r)||(s.nodesInRelativeHorizontal.push(r),s.nodeToRelativeConstraintMapHorizontal.set(r,[]),s.dummyToNodeForVerticalAlignment.has(r)?s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(r).getCenterX())),s.nodesInRelativeHorizontal.includes(e)||(s.nodesInRelativeHorizontal.push(e),s.nodeToRelativeConstraintMapHorizontal.set(e,[]),s.dummyToNodeForVerticalAlignment.has(e)?s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(e).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),s.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.nodesInRelativeVertical.includes(e)||(s.nodesInRelativeVertical.push(e),s.nodeToRelativeConstraintMapVertical.set(e,[]),s.dummyToNodeForHorizontalAlignment.has(e)?s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(e).getCenterY())),s.nodesInRelativeVertical.includes(r)||(s.nodesInRelativeVertical.push(r),s.nodeToRelativeConstraintMapVertical.set(r,[]),s.dummyToNodeForHorizontalAlignment.has(r)?s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(r).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(e).push({bottom:r,gap:t.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.has(e)?o.get(e).push(r):o.set(e,[r]),o.has(r)?o.get(r).push(e):o.set(r,[e]))}),c=(l=Ae(function(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],s[c]=!1,o.push(r=e),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();i.has(r)&&(s[c]=!0),n.get(r).forEach(function(t){l.has(t)||(o.push(t),l.add(t),a[c].push(t))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var 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;en&&(n=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(t,e,r){var 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;at?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(t){var e=n.idToDummyNode[t],r=e.paddingLeft;n.adjustLocations(i[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;nh&&(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)l&&(l=t.getWidth())}),s/a),c=o/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)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;nr&&(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]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 s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in Ae(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eX&&(X=m[w].length,K=w);X{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})}),sBt=kBt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(aBt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(aBt()):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{Ae(E,"sliceIterator");var n=r(140).layoutBase.LinkedList;function E(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var n={},e=0;e{if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return E(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{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=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,s=0;s{function n(t,e){for(var r=0;r{var U=r(548),G=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"),s=new Map,m=new Map,o=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{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})}),oBt=t(()=>{jt(),XPt=Ae(t=>`${t}`,"wrapIcon"),KPt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:XPt('')},server:{body:XPt('')},disk:{body:XPt('')},internet:{body:XPt('')},cloud:{body:XPt('')},unknown:Rt,blank:{body:XPt("")}}}}),lBt=t(()=>{jt(),fh(),UE(),eBt(),oBt(),CPt(),ZPt=Ae(async function(w,t){let k=SPt("padding"),e=SPt("iconSize"),T=e/2,_=e/6,E=_/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=TPt(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&&(pPt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(pPt(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==jPt.getNode(e)?.type||(pPt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==jPt.getNode(a)?.type||(pPt(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=pPt(r)?hPt[r](h,_):h-E,y=gPt(r)?hPt[r](u,_):u-E,t.insert("polygon").attr("points",cPt[r](_)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=pPt(s)?hPt[s](g,_):g-E,y=gPt(s)?hPt[s](f,_):f-E,t.insert("polygon").attr("points",cPt[s](_)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=fPt(r,s)?"XY":pPt(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 zE(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=vPt(r,s))&&mPt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=bPt(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"),KPt=Ae(async function(l,t){let c=.75*_Pt("padding"),h=_Pt("fontSize"),u=_Pt("iconSize")/2;await Promise.all(t.nodes().map(async n=>{var i=kPt(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(`${await Ft(i.icon,{height:c,width:c,fallbackPrefix:VPt.prefix})}`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(o=t.append("g"),await hN(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"),ZPt=Ae(async function(t,e,r){for(var n of r){var i=e.append("g"),a=_Pt("iconSize"),o=(n.title&&(o=i.append("g"),await hN(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(`${await Ft(n.icon,{height:a,width:a,fallbackPrefix:VPt.prefix})}`):n.iconText?(o.html(`${await Ft("blank",{height:a,width:a,fallbackPrefix:VPt.prefix})}`),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"),QPt=Ae(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=_Pt("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 sBt(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:_Pt("iconSize"),height:_Pt("iconSize")},classes:"node-service"})})}function lBt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:_Pt("iconSize"),height:_Pt("iconSize")},classes:"node-junction"})})}function cBt(r,t){t.nodes().map(t=>{var e=kPt(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 hBt(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 uBt(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=pPt(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 dBt(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=>11[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:t,vertical:e}}function pBt(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{var e=c([n[0]+e[0],n[1]+e[1]]),r=a[e];r&&!s[e]&&(o.push(e),l.push({[oPt[t]]:r,[oPt[cPt(t)]]:i,gap:1.5*_Pt("iconSize")}))})}}}}),l}function gBt(i,a,l,c,{spatialMaps:h}){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),o=LMt({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":_Pt("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:_Pt("padding")+"px"}}]}),r=(t.remove(),hBt(l,o),sBt(i,o),lBt(a,o),uBt(c,o),dBt(h)),n=pBt(h),s=o.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=kPt(t).parent)===kPt(e).parent?1.5*_Pt("iconSize"):.5*_Pt("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=kPt(t).parent)===kPt(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=wPt(e).sourceDir,[r,n]=dPt(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 fBt,mBt,yBt=t(()=>{Yt(),NMt(),fBt=et(iBt(),1),Z3(),e(),jft(),tc(),JPt(),aBt(),EPt(),oBt(),Pt([{name:VPt.prefix,icons:VPt}]),LMt.use(fBt.default),Ae(sBt,"addServices"),Ae(lBt,"addJunctions"),Ae(cBt,"positionNodes"),Ae(hBt,"addGroups"),Ae(uBt,"addEdges"),Ae(dBt,"getAlignments"),Ae(pBt,"getRelativeConstraints"),Ae(gBt,"layoutArchitecture"),fBt=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=Fft(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 ZPt(n,u,i),QPt(n,u,a),await gBt(i,a,o,s,l));await XPt(c,u),await KPt(h,u),cBt(n,u),Vl(void 0,e,_Pt("padding"),_Pt("useMaxWidth"))},"draw"),mBt={draw:fBt}}),vBt={};_Bt(vBt,{diagram:()=>xBt});var xBt,bBt,wBt=t(()=>{tBt(),JPt(),eBt(),yBt(),xBt={parser:YPt,db:UPt,renderer:mBt,styles:HPt}}),kBt=(_Bt(bBt={},{default:()=>M$t}),Yt(),zr(),qr(),{id:"c4",detector:Ae(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:Ae(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(kE(),bE))).diagram}),"loader")}),TBt={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(()=>(UX(),TX))).diagram}),"loader")},EBt="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"),_Bt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(UX(),TX))).diagram;return{id:EBt,diagram:t}},"loader"),CBt={id:EBt,detector:t,loader:_Bt},SBt={id:"er",detector:Ae(t=>/^\s*erDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(FK(),PK))).diagram}),"loader")},ABt={id:"gitGraph",detector:Ae(t=>/^\s*gitGraph/.test(t),"detector"),loader:Ae(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(X1t(),j1t))).diagram}),"loader")},LBt={id:"gantt",detector:Ae(t=>/^\s*gantt/.test(t),"detector"),loader:Ae(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(Gft(),Ift))).diagram}),"loader")},NBt={id:"info",detector:Ae(t=>/^\s*info/.test(t),"detector"),loader:Ae(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(pmt(),Wft))).diagram}),"loader")},IBt={id:"pie",detector:Ae(t=>/^\s*pie/.test(t),"detector"),loader:Ae(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(Emt(),vmt))).diagram}),"loader")},MBt="quadrantChart",t=Ae(t=>/^\s*quadrantChart/.test(t),"detector"),_Bt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(ayt(),eyt))).diagram;return{id:MBt,diagram:t}},"loader"),RBt={id:MBt,detector:t,loader:_Bt},DBt={id:"xychart",detector:Ae(t=>/^\s*xychart-beta/.test(t),"detector"),loader:Ae(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(ovt(),g2t))).diagram}),"loader")},OBt="requirement",t=Ae(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),_Bt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(mvt(),dvt))).diagram;return{id:OBt,diagram:t}},"loader"),PBt={id:OBt,detector:t,loader:_Bt},BBt={id:"sequence",detector:Ae(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(m4t(),sbt))).diagram}),"loader")},FBt={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(()=>(B4t(),T4t))).diagram}),"loader")},$Bt="classDiagram",t=Ae((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),_Bt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(F6t(),J5t))).diagram;return{id:$Bt,diagram:t}},"loader"),zBt={id:$Bt,detector:t,loader:_Bt},GBt={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(()=>(Akt(),Ckt))).diagram}),"loader")},UBt="stateDiagram",t=Ae((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),_Bt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(s7t(),Lkt))).diagram;return{id:UBt,diagram:t}},"loader"),qBt={id:UBt,detector:t,loader:_Bt},YBt={id:"journey",detector:Ae(t=>/^\s*journey/.test(t),"detector"),loader:Ae(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(A7t(),E7t))).diagram}),"loader")},jBt=(e(),jft(),tc(),t={draw:Ae((t,e,r)=>{R.debug(`rendering svg for syntax error -`);var n=(e=Fft(e)).append("g");e.attr("viewBox","0 0 2412 512"),Wl(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")}),HBt={db:{},renderer:t,parser:{parse:Ae(()=>{},"parse")}},WBt="flowchart-elk",_Bt=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(()=>(UX(),TX))).diagram;return{id:WBt,diagram:t}},"loader"),VBt={id:WBt,detector:_Bt,loader:t},XBt={id:"timeline",detector:Ae(t=>/^\s*timeline/.test(t),"detector"),loader:Ae(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(zTt(),wTt))).diagram}),"loader")},KBt={id:"mindmap",detector:Ae(t=>/^\s*mindmap/.test(t),"detector"),loader:Ae(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(xRt(),nRt))).diagram}),"loader")},ZBt={id:"sankey",detector:Ae(t=>/^\s*sankey-beta/.test(t),"detector"),loader:Ae(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(VDt(),LDt))).diagram}),"loader")},QBt={id:"packet",detector:Ae(t=>/^\s*packet-beta/.test(t),"detector"),loader:Ae(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(nOt(),JDt))).diagram}),"loader")},JBt={id:"block",detector:Ae(t=>/^\s*block-beta/.test(t),"detector"),loader:Ae(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(TPt(),iPt))).diagram}),"loader")},tFt="architecture",_Bt=Ae(t=>/^\s*architecture/.test(t),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(wBt(),vBt))).diagram;return{id:tFt,diagram:t}},"loader"),eFt={id:tFt,detector:_Bt,loader:t},rFt=(qr(),fh(),!1),nFt=Ae(()=>{rFt||(rFt=!0,kc("error",HBt,t=>"error"===t.toLowerCase().trim()),kc("---",{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("---")),Qt(kBt,zBt,FBt,SBt,LBt,NBt,IBt,PBt,BBt,VBt,CBt,TBt,KBt,XBt,ABt,qBt,GBt,YBt,RBt,ZBt,QBt,DBt,JBt,eFt))},"addDiagrams"),iFt=(e(),qr(),fh(),Ae(async()=>{R.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Kt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Tc(t)}catch{try{var{diagram:n,id:i}=await r();kc(i,n,e)}catch(e){throw R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Kt[t],e}}}))).filter(t=>"rejected"===t.status);if(0{XFt.forEach(t=>{t()}),XFt=[]},"attachFunctions"),ZFt=(e(),Ae(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function QFt(t){var e,r,n=t.match(Ht);return n?(r={},(e="object"!=typeof(e=LS(n[1],{schema:AS})??{})||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:{}}}Gr(),NS(),Ae(QFt,"extractFrontMatter"),X8();var JFt=Ae(t=>t.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),t$t=Ae(t=>{var{text:t,metadata:e}=QFt(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"),e$t=Ae(t=>{var e=j8.detectInit(t)??{},r=j8.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:C8(t),directive:e}},"processDirectives");function r$t(t){var e=JFt(t),e=t$t(e),r=e$t(e.text),n=x8(e.config,r.directive);return{code:t=ZFt(r.text),title:e.title,config:n}}function n$t(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(r$t,"preprocessDiagram"),ec(),Sn(),X8(),Ae(n$t,"toBase64");var i$t=["foreignobject"],a$t=["dominant-baseline"];function o$t(t){return t=r$t(t),Or(),Dr(t.config??{}),t}async function s$t(t,e){nFt();try{var{code:r,config:n}=o$t(t);return{diagramType:(await y$t(r)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(o$t,"processAndSetConfigs"),Ae(s$t,"parse");var l$t=Ae((t,e,r=[])=>` -.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),c$t=Ae((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=` + `)))}))},"drawEdges"),QPt=Ae(async function(l,t){let c=.75*SPt("padding"),h=SPt("fontSize"),u=SPt("iconSize")/2;await Promise.all(t.nodes().map(async n=>{var i=_Pt(n);if("group"===i.type){var{h:n,w:a,x1:s,y1:o}=n.boundingBox();l.append("rect").attr("x",s+u).attr("y",o+u).attr("width",a).attr("height",n).attr("class","node-bkg");let t=l.append("g"),e=s,r=o;i.icon&&((n=t.append("g")).html(`${await Ft(i.icon,{height:c,width:c,fallbackPrefix:KPt.prefix})}`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(s=t.append("g"),await zE(s,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),JPt=Ae(async function(t,e,r){for(var n of r){var i=e.append("g"),a=SPt("iconSize"),s=(n.title&&(s=i.append("g"),await zE(s,n.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),s.attr("transform","translate("+a/2+", "+a+")")),i.append("g")),{width:o,height:l}=(n.icon?s.html(`${await Ft(n.icon,{height:a,width:a,fallbackPrefix:KPt.prefix})}`):n.iconText?(s.html(`${await Ft("blank",{height:a,width:a,fallbackPrefix:KPt.prefix})}`),o=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),l=parseInt(window.getComputedStyle(o.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,o.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):s.append("path").attr("class","node-bkg").attr("id","node-"+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=o,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),tBt=Ae(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=SPt("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 cBt(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:SPt("iconSize"),height:SPt("iconSize")},classes:"node-service"})})}function hBt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:SPt("iconSize"),height:SPt("iconSize")},classes:"node-junction"})})}function uBt(r,t){t.nodes().map(t=>{var e=_Pt(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 dBt(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 pBt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=t,t=fPt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:s,sourceArrow:n,sourceGroup:i,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:t})})}function gBt(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=>11[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:t,vertical:e}}function fBt(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])),s=[c([0,0])],o={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0{var e=c([n[0]+e[0],n[1]+e[1]]),r=a[e];r&&!o[e]&&(s.push(e),l.push({[lPt[t]]:r,[lPt[uPt(t)]]:i,gap:1.5*SPt("iconSize")}))})}}}}),l}function mBt(i,a,l,c,{spatialMaps:h}){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),s=gNt({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":SPt("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:SPt("padding")+"px"}}]}),r=(t.remove(),dBt(l,s),cBt(i,s),hBt(a,s),pBt(c,s),gBt(h)),n=fBt(h),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=_Pt(t).parent)===_Pt(e).parent?1.5*SPt("iconSize"):.5*SPt("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=_Pt(t).parent)===_Pt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});o.one("layoutstop",()=>{function t(t,e,r,n){var{x:t,y:i}=t,{x:e,y:a}=e,s=(n-i+(t-r)*(i-a)/(t-e))/Math.sqrt(1+Math.pow((i-a)/(t-e),2)),o=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-t,2)-Math.pow(s,2));o/=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(s)*l,weights:o*=c}}Ae(t,"getSegmentWeights"),s.startBatch();for(var e of Object.values(s.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=TPt(e).sourceDir,[r,n]=gPt(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))}s.endBatch(),o.run()}),o.run(),s.ready(t=>{R.info("Ready",t),e(s)})})}var yBt,vBt,xBt=t(()=>{jt(),fNt(),yBt=et(sBt(),1),Z3(),e(),smt(),tc(),eBt(),oBt(),CPt(),lBt(),Pt([{name:KPt.prefix,icons:KPt}]),gNt.use(yBt.default),Ae(cBt,"addServices"),Ae(hBt,"addJunctions"),Ae(uBt,"positionNodes"),Ae(dBt,"addGroups"),Ae(pBt,"addEdges"),Ae(gBt,"getAlignments"),Ae(fBt,"getRelativeConstraints"),Ae(mBt,"layoutArchitecture"),yBt=Ae(async(t,e,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),s=n.getGroups(),o=n.getEdges(),l=n.getDataStructures(),c=(e=Jft(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 JPt(n,u,i),tBt(n,u,a),await mBt(i,a,s,o,l));await ZPt(c,u),await QPt(h,u),uBt(n,u),Vl(void 0,e,SPt("padding"),SPt("useMaxWidth"))},"draw"),vBt={draw:yBt}}),bBt={};SBt(bBt,{diagram:()=>wBt});var wBt,kBt,TBt=t(()=>{rBt(),eBt(),nBt(),xBt(),wBt={parser:HPt,db:jPt,renderer:vBt,styles:VPt}}),_Bt=(SBt(kBt={},{default:()=>O$t}),jt(),zr(),qr(),{id:"c4",detector:Ae(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:Ae(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(T_(),w_))).diagram}),"loader")}),EBt={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(()=>(rK(),BX))).diagram}),"loader")},CBt="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"),SBt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(rK(),BX))).diagram;return{id:CBt,diagram:t}},"loader"),ABt={id:CBt,detector:t,loader:SBt},LBt={id:"er",detector:Ae(t=>/^\s*erDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(QK(),KK))).diagram}),"loader")},NBt={id:"gitGraph",detector:Ae(t=>/^\s*gitGraph/.test(t),"detector"),loader:Ae(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(hgt(),sgt))).diagram}),"loader")},IBt={id:"gantt",detector:Ae(t=>/^\s*gantt/.test(t),"detector"),loader:Ae(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(rmt(),Hft))).diagram}),"loader")},MBt={id:"info",detector:Ae(t=>/^\s*info/.test(t),"detector"),loader:Ae(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(Amt(),lmt))).diagram}),"loader")},RBt={id:"pie",detector:Ae(t=>/^\s*pie/.test(t),"detector"),loader:Ae(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>($mt(),Rmt))).diagram}),"loader")},DBt="quadrantChart",t=Ae(t=>/^\s*quadrantChart/.test(t),"detector"),SBt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(byt(),myt))).diagram;return{id:DBt,diagram:t}},"loader"),OBt={id:DBt,detector:t,loader:SBt},PBt={id:"xychart",detector:Ae(t=>/^\s*xychart-beta/.test(t),"detector"),loader:Ae(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(wvt(),L2t))).diagram}),"loader")},BBt="requirement",t=Ae(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),SBt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(Ivt(),Svt))).diagram;return{id:BBt,diagram:t}},"loader"),FBt={id:BBt,detector:t,loader:SBt},$Bt={id:"sequence",detector:Ae(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(Abt(),kbt))).diagram}),"loader")},zBt={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(()=>(B4t(),O4t))).diagram}),"loader")},UBt="classDiagram",t=Ae((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),SBt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(T3t(),F4t))).diagram;return{id:UBt,diagram:t}},"loader"),GBt={id:UBt,detector:t,loader:SBt},qBt={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(()=>(p6t(),u6t))).diagram}),"loader")},jBt="stateDiagram",t=Ae((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),SBt=Ae(async()=>{var t=(await Promise.resolve().then(()=>(H6t(),g6t))).diagram;return{id:jBt,diagram:t}},"loader"),YBt={id:jBt,detector:t,loader:SBt},HBt={id:"journey",detector:Ae(t=>/^\s*journey/.test(t),"detector"),loader:Ae(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(pwt(),cwt))).diagram}),"loader")},WBt=(e(),smt(),tc(),t={draw:Ae((t,e,r)=>{R.debug(`rendering svg for syntax error +`);var n=(e=Jft(e)).append("g");e.attr("viewBox","0 0 2412 512"),Wl(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")}),VBt={db:{},renderer:t,parser:{parse:Ae(()=>{},"parse")}},XBt="flowchart-elk",SBt=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(()=>(rK(),BX))).diagram;return{id:XBt,diagram:t}},"loader"),KBt={id:XBt,detector:SBt,loader:t},ZBt={id:"timeline",detector:Ae(t=>/^\s*timeline/.test(t),"detector"),loader:Ae(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(Ekt(),skt))).diagram}),"loader")},QBt={id:"mindmap",detector:Ae(t=>/^\s*mindmap/.test(t),"detector"),loader:Ae(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(gIt(),GNt))).diagram}),"loader")},JBt={id:"kanban",detector:Ae(t=>/^\s*kanban/.test(t),"detector"),loader:Ae(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(OIt(),xIt))).diagram}),"loader")},tFt={id:"sankey",detector:Ae(t=>/^\s*sankey-beta/.test(t),"detector"),loader:Ae(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(hRt(),YMt))).diagram}),"loader")},eFt={id:"packet",detector:Ae(t=>/^\s*packet-beta/.test(t),"detector"),loader:Ae(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(xRt(),fRt))).diagram}),"loader")},rFt={id:"block",detector:Ae(t=>/^\s*block-beta/.test(t),"detector"),loader:Ae(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(EPt(),sPt))).diagram}),"loader")},nFt="architecture",SBt=Ae(t=>/^\s*architecture/.test(t),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(TBt(),bBt))).diagram;return{id:nFt,diagram:t}},"loader"),iFt={id:nFt,detector:SBt,loader:t},aFt=(qr(),fh(),!1),sFt=Ae(()=>{aFt||(aFt=!0,kc("error",VBt,t=>"error"===t.toLowerCase().trim()),kc("---",{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("---")),Qt(_Bt,JBt,GBt,zBt,LBt,IBt,MBt,RBt,FBt,$Bt,KBt,ABt,EBt,QBt,ZBt,NBt,YBt,qBt,HBt,OBt,tFt,eFt,PBt,rFt,iFt))},"addDiagrams"),oFt=(e(),qr(),fh(),Ae(async()=>{R.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Kt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Tc(t)}catch{try{var{diagram:n,id:i}=await r();kc(i,n,e)}catch(e){throw R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Kt[t],e}}}))).filter(t=>"rejected"===t.status);if(0{QFt.forEach(t=>{t()}),QFt=[]},"attachFunctions"),t$t=(e(),Ae(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function e$t(t){var e,r,n=t.match(Ht);return n?(r={},(e="object"!=typeof(e=_M(n[1],{schema:TM})??{})||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:{}}}Ur(),EM(),Ae(e$t,"extractFrontMatter"),K8();var r$t=Ae(t=>t.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),n$t=Ae(t=>{var{text:t,metadata:e}=e$t(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"),i$t=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 a$t(t){var e=r$t(t),e=n$t(e),r=i$t(e.text),n=x8(e.config,r.directive);return{code:t=t$t(r.text),title:e.title,config:n}}function s$t(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(a$t,"preprocessDiagram"),ec(),Sn(),K8(),Ae(s$t,"toBase64");var o$t=["foreignobject"],l$t=["dominant-baseline"];function c$t(t){return t=a$t(t),Or(),Dr(t.config??{}),t}async function h$t(t,e){sFt();try{var{code:r,config:n}=c$t(t);return{diagramType:(await b$t(r)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(c$t,"processAndSetConfigs"),Ae(h$t,"parse");var u$t=Ae((t,e,r=[])=>` +.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),d$t=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=>{$U(e.styles)||t.forEach(t=>{n+=l$t(e.id,t,e.styles)}),$U(e.textStyles)||(n+=l$t(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),h$t=Ae((t,e,r,n)=>(r=c$t(t,r),qFt(FFt(n+`{${Ql(e,r,t.themeVariables)}}`),YFt)),"createUserStyles"),u$t=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=W8(n)).replace(/
/g,"
")},"cleanUpSvgCode"),d$t=Ae((t="",e)=>``,"putIntoIFrame"),p$t=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 g$t(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Ae(g$t,"sandboxedIframe");var f$t=Ae((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),_Bt=Ae(async function(t,e,r){nFt();var n=o$t(e),i=(e=n.code,Mr());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=g$t(O(r),o),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O(r),p$t(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(f$t(document,t,l,o),d?(y=g$t(O("body"),o),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O("body"),p$t(u,t,l));let f,m;try{f=await VFt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await VFt.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=h$t(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,Dft,f)}catch(r){throw i.suppressErrorRendering?h():jBt.draw(e,t,Dft),r}v$t(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=u$t(b,d,Rl(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=d$t(b,v)):p||(b=jFt.default.sanitize(b,{ADD_TAGS:i$t,ADD_ATTR:a$t})),KFt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function m$t(t={}){(t=ie({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Ar(t),t?.theme&&t.theme in pr?t.themeVariables=pr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=pr.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Sr(t):Nr(),k(t.logLevel),nFt()}Ae(m$t,"initialize");var y$t=Ae((t,e={})=>(t=r$t(t).code,VFt.fromText(t,e)),"getDiagramFromText");function v$t(t,e,r,n){HFt(e,t),WFt(e,r,n,e.attr("id"))}Ae(v$t,"addA11yInfo");var x$t=Object.freeze({render:_Bt,parse:s$t,getDiagramFromText:y$t,initialize:m$t,getConfig:Mr,setConfig:Ir,getSiteConfig:Nr,updateSiteConfig:Lr,reset:Ae(()=>{Or()},"reset"),globalReset:Ae(()=>{Or(wr)},"globalReset"),defaultConfig:wr}),b$t=(k(Mr().logLevel),Or(Mr()),vX(),X8(),Ae((t,e,r)=>{R.warn(t),v8(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")),w$t=Ae(async function(e={querySelector:".mermaid"}){try{await k$t(e)}catch(t){if(v8(t)&&R.error(t.str),I$t.parseError&&I$t.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),k$t=Ae(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=x$t.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),x$t.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,o=new j8.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=jt(j8.entityDecode(c)).trim().replace(//gi,"
"),j8.detectInit(c));h&&R.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await N$t(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){b$t(t,s,I$t.parseError)}}if(0{nFt(),Qt(...t),!1===e&&await iFt()},"registerExternalDiagrams"),E$t=Ae(function(){I$t.startOnLoad&&x$t.getConfig().startOnLoad&&I$t.run().catch(t=>R.error("Mermaid failed to initialize",t))},"contentLoaded"),_$t=(typeof document<"u"&&window.addEventListener("load",E$t,!1),Ae(function(t){I$t.parseError=t},"setParseErrorHandler")),C$t=[],S$t=!1,A$t=Ae(async()=>{if(!S$t){for(S$t=!0;0new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{x$t.parse(a,o).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),I$t.parseError?.(t),r(t),i(t)})}),"performCall");C$t.push(t),A$t().catch(i)}),"parse"),N$t=Ae((a,o,s)=>new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{x$t.render(a,o,s).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),I$t.parseError?.(t),r(t),i(t)})}),"performCall");C$t.push(t),A$t().catch(i)}),"render"),I$t={startOnLoad:!0,mermaidAPI:x$t,parse:L$t,render:N$t,init:t,run:w$t,registerExternalDiagrams:_Bt,registerLayoutLoaders:nX,initialize:T$t,parseError:void 0,contentLoaded:E$t,setParseErrorHandler:_$t,detectType:Zt,registerIconPacks:Pt},M$t=I$t,L$t=bBt;return J(G({},"__esModule",{value:!0}),L$t)})();globalThis.mermaid=globalThis.__esbuild_esm_mermaid.default; +`,"putIntoIFrame"),m$t=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 y$t(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Ae(y$t,"sandboxedIframe");var v$t=Ae((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),SBt=Ae(async function(t,e,r){sFt();var n=c$t(e),i=(e=n.code,Mr());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,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=Ae(()=>{var t=O(d?o: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=y$t(O(r),s),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O(r),m$t(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(v$t(document,t,l,s),d?(y=y$t(O("body"),s),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O("body"),m$t(u,t,l));let f,m;try{f=await ZFt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await ZFt.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=p$t(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,Xft,f)}catch(r){throw i.suppressErrorRendering?h():WBt.draw(e,t,Xft),r}w$t(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=g$t(b,d,Rl(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=f$t(b,v)):p||(b=VFt.default.sanitize(b,{ADD_TAGS:o$t,ADD_ATTR:l$t})),JFt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function x$t(t={}){(t=ie({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Ar(t),t?.theme&&t.theme in pr?t.themeVariables=pr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=pr.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Sr(t):Nr(),w(t.logLevel),sFt()}Ae(x$t,"initialize");var b$t=Ae((t,e={})=>(t=a$t(t).code,ZFt.fromText(t,e)),"getDiagramFromText");function w$t(t,e,r,n){XFt(e,t),KFt(e,r,n,e.attr("id"))}Ae(w$t,"addA11yInfo");var k$t=Object.freeze({render:SBt,parse:h$t,getDiagramFromText:b$t,initialize:x$t,getConfig:Mr,setConfig:Ir,getSiteConfig:Nr,updateSiteConfig:Lr,reset:Ae(()=>{Or()},"reset"),globalReset:Ae(()=>{Or(wr)},"globalReset"),defaultConfig:wr}),T$t=(w(Mr().logLevel),Or(Mr()),MX(),K8(),Ae((t,e,r)=>{R.warn(t),v8(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")),_$t=Ae(async function(e={querySelector:".mermaid"}){try{await E$t(e)}catch(t){if(v8(t)&&R.error(t.str),D$t.parseError&&D$t.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),E$t=Ae(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=k$t.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),k$t.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new H8.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];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-"+s.next(),c=a.innerHTML,h=(c=Yt(H8.entityDecode(c)).trim().replace(//gi,"
"),H8.detectInit(c));h&&R.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await R$t(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){T$t(t,o,D$t.parseError)}}if(0{sFt(),Qt(...t),!1===e&&await oFt()},"registerExternalDiagrams"),S$t=Ae(function(){D$t.startOnLoad&&k$t.getConfig().startOnLoad&&D$t.run().catch(t=>R.error("Mermaid failed to initialize",t))},"contentLoaded"),A$t=(typeof document<"u"&&window.addEventListener("load",S$t,!1),Ae(function(t){D$t.parseError=t},"setParseErrorHandler")),L$t=[],N$t=!1,I$t=Ae(async()=>{if(!N$t){for(N$t=!0;0new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{k$t.parse(a,s).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),D$t.parseError?.(t),r(t),i(t)})}),"performCall");L$t.push(t),I$t().catch(i)}),"parse"),R$t=Ae((a,s,o)=>new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{k$t.render(a,s,o).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),D$t.parseError?.(t),r(t),i(t)})}),"performCall");L$t.push(t),I$t().catch(i)}),"render"),D$t={startOnLoad:!0,mermaidAPI:k$t,parse:M$t,render:R$t,init:t,run:_$t,registerExternalDiagrams:SBt,registerLayoutLoaders:yX,initialize:C$t,parseError:void 0,contentLoaded:S$t,setParseErrorHandler:A$t,detectType:Zt,registerIconPacks:Pt},O$t=D$t,M$t=kBt;return J(U({},"__esModule",{value:!0}),M$t)})();globalThis.mermaid=globalThis.__esbuild_esm_mermaid.default;